.quiet-mode-entry-button {
  width: 100%;
  max-width: 22rem;
  min-height: 3.25rem;
  margin: 0 0 0.75rem;
  padding: 0.82rem 1rem;
  border: 1px solid var(--color-kin);
  border-radius: 0.9rem;
  background: linear-gradient(145deg, #242018, #15120e);
  color: #f7edcf;
  box-shadow:
    0 10px 24px rgba(30, 24, 15, 0.18),
    inset 0 0 0 1px rgba(216, 189, 120, 0.12);
  font-family: var(--font-mincho);
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.quiet-mode-entry-button:focus-visible {
  outline: 3px solid rgba(185, 138, 45, 0.34);
  outline-offset: 3px;
}

body.quiet-mode-active {
  background: #15120e;
}

body.quiet-mode-active::before,
body.quiet-mode-active::after,
body.quiet-mode-active .guidance-header {
  opacity: 0;
  pointer-events: none;
}

body.quiet-mode-active .app-shell {
  width: 100%;
  max-width: none;
  padding: 0;
}

body.quiet-mode-active #guidance-view {
  min-height: 100dvh;
}

.quiet-mode-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  overflow: hidden;
  padding: max(2rem, env(safe-area-inset-top)) 1.5rem max(2rem, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 43%, rgba(185, 138, 45, 0.08), transparent 18rem),
    linear-gradient(180deg, #18140f 0%, #100e0b 100%);
  color: #f5ecd8;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  animation: quiet-mode-fade-in 220ms ease-out both;
}

.quiet-mode-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(185, 138, 45, 0.08), transparent) 0 18% / 100% 1px no-repeat,
    linear-gradient(90deg, transparent, rgba(185, 138, 45, 0.06), transparent) 0 82% / 100% 1px no-repeat;
  pointer-events: none;
}

.quiet-mode-panel:focus-visible {
  outline: 2px solid rgba(216, 189, 120, 0.5);
  outline-offset: -6px;
}

.quiet-mode-content {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(100%, 28rem);
  flex-direction: column;
  align-items: center;
}

.quiet-mode-symbol {
  display: grid;
  width: 4.7rem;
  height: 4.7rem;
  margin-bottom: 1.6rem;
  place-items: center;
  border: 1px solid rgba(216, 189, 120, 0.75);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(166, 32, 32, 0.32), rgba(77, 22, 20, 0.15) 62%, transparent 63%);
  box-shadow:
    0 0 0 0.45rem rgba(185, 138, 45, 0.04),
    inset 0 0 0 1px rgba(255, 244, 215, 0.06);
}

.quiet-mode-symbol .torii-glyph {
  transform: scale(1.1);
}

.quiet-mode-target {
  margin: 0;
  color: #d9bc77;
  font-family: var(--font-mincho);
  font-size: clamp(1.15rem, 5.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.14em;
}

.quiet-mode-rule {
  display: flex;
  width: min(14rem, 58vw);
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin: 1.45rem auto 1.7rem;
}

.quiet-mode-rule::before,
.quiet-mode-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 189, 120, 0.62));
}

.quiet-mode-rule::after {
  background: linear-gradient(90deg, rgba(216, 189, 120, 0.62), transparent);
}

.quiet-mode-rule span {
  width: 0.45rem;
  height: 0.45rem;
  border: 1px solid rgba(216, 189, 120, 0.86);
  transform: rotate(45deg);
}

.quiet-mode-message {
  margin: 0;
  color: #f5ecd8;
  font-family: var(--font-mincho);
  font-size: clamp(1.8rem, 8vw, 2.65rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.55;
}

.quiet-mode-exit-hint {
  margin: 3.2rem 0 0;
  color: rgba(245, 236, 216, 0.54);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.quiet-mode-decoration {
  position: absolute;
  width: 12rem;
  height: 12rem;
  background: url('/assets/wagara-pattern.svg') center / contain no-repeat;
  opacity: 0.07;
  pointer-events: none;
}

.quiet-mode-decoration-top {
  top: -4rem;
  right: -4rem;
}

.quiet-mode-decoration-bottom {
  bottom: -4rem;
  left: -4rem;
  transform: rotate(180deg);
}

@keyframes quiet-mode-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quiet-mode-panel {
    animation-duration: 0.001ms;
  }
}
