@charset "UTF-8";

:root {
  --space-0: #030711;
  --space-1: #07101f;
  --space-2: #0b1730;
  --paper: #f8f4eb;
  --paper-soft: rgba(248, 244, 235, 0.74);
  --paper-faint: rgba(248, 244, 235, 0.46);
  --gold: #f1cd72;
  --orange: #f0785f;
  --mint: #cfe7dc;
  --blue: #6f8fd2;
  --content: 1120px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--space-0);
  color-scheme: dark;
}

body {
  width: 100%;
  min-height: 100%;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--paper);
  background:
    radial-gradient(circle at 18% 13%, rgba(86, 112, 188, 0.17), transparent 24%),
    radial-gradient(circle at 80% 18%, rgba(236, 202, 112, 0.06), transparent 15%),
    radial-gradient(circle at 50% 72%, rgba(78, 98, 180, 0.11), transparent 27%),
    linear-gradient(180deg, #091226 0%, #060e1d 42%, #030711 100%);
  font-family:
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    "Apple SD Gothic Neo",
    "Noto Sans KR",
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

button { font: inherit; }

.space {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.3;
  animation: nebula-drift 20s ease-in-out infinite;
}

.nebula-a {
  width: 270px;
  height: 270px;
  left: -90px;
  top: 7%;
  background: radial-gradient(circle, rgba(91, 116, 196, 0.36), transparent 70%);
}

.nebula-b {
  width: 320px;
  height: 320px;
  right: -120px;
  bottom: 3%;
  background: radial-gradient(circle, rgba(83, 70, 164, 0.21), transparent 72%);
  animation-delay: 5s;
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 250, 234, 0.88);
  box-shadow: 0 0 9px rgba(255, 250, 234, 0.4);
  animation: twinkle 4.2s ease-in-out infinite;
}

.s1 { left: 8%; top: 13%; }
.s2 { left: 27%; top: 8%; width: 2px; height: 2px; animation-delay: .8s; }
.s3 { right: 14%; top: 18%; width: 4px; height: 4px; animation-delay: 1.6s; }
.s4 { left: 14%; top: 43%; animation-delay: 2.4s; }
.s5 { right: 8%; top: 48%; width: 2px; height: 2px; animation-delay: 3.1s; }
.s6 { left: 40%; top: 30%; width: 2px; height: 2px; animation-delay: 1.2s; }
.s7 { left: 20%; bottom: 17%; width: 4px; height: 4px; animation-delay: 2.1s; }
.s8 { right: 22%; bottom: 13%; animation-delay: 3.4s; }
.s9 { left: 57%; bottom: 24%; width: 2px; height: 2px; animation-delay: .4s; }
.s10 { right: 36%; top: 9%; width: 2px; height: 2px; animation-delay: 2.8s; }
.s11 { left: 4%; bottom: 41%; width: 2px; height: 2px; animation-delay: 1.7s; }
.s12 { right: 4%; bottom: 36%; animation-delay: 3.7s; }

.game-shell {
  position: relative;
  z-index: 1;
  width: min(100%, var(--content));
  min-height: 100svh;
  margin: 0 auto;
  padding:
    max(16px, env(safe-area-inset-top))
    clamp(10px, 2.5vw, 24px)
    max(14px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

.game-header {
  height: 46px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.home-link {
  color: rgba(248, 244, 235, 0.58);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.2em;
}

.game-controls {
  display: flex;
  align-items: center;
  gap: 11px;
}

.sound-toggle {
  min-height: 34px;
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(248, 244, 235, 0.18);
  border-radius: 999px;
  background: rgba(7, 14, 29, 0.34);
  color: rgba(248, 244, 235, 0.58);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.sound-toggle.is-on {
  border-color: rgba(241, 205, 114, 0.48);
  background: rgba(241, 205, 114, 0.08);
  color: #f6df9b;
}

.timer-wrap {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--paper-faint);
}

.timer-label { font-size: 0.68rem; }
.timer {
  min-width: 38px;
  color: var(--paper-soft);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.home-link:focus-visible,
.sound-toggle:focus-visible,
.start-button:focus-visible,
.focus-button:focus-visible,
.distraction-card:focus-visible,
.result-home:focus-visible,
.result-button:focus-visible {
  outline: 3px solid rgba(241, 205, 114, 0.58);
  outline-offset: 4px;
}

.game-screen {
  flex: 1;
  min-height: 0;
}

.game-arena {
  position: relative;
  width: 100%;
  min-height: calc(100svh - 82px);
  overflow: hidden;
  border: 1px solid rgba(248, 244, 235, 0.09);
  border-radius: 32px;
  background:
    linear-gradient(rgba(248, 244, 235, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(248, 244, 235, 0.018) 1px, transparent 1px),
    radial-gradient(circle at 50% 42%, rgba(24, 43, 81, 0.5), transparent 58%),
    rgba(4, 10, 22, 0.28);
  background-size: 32px 32px, 32px 32px, auto, auto;
  isolation: isolate;
}

.ready-screen {
  position: absolute;
  inset: 0;
  z-index: 12;
  padding: clamp(26px, 5vw, 54px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(4, 9, 20, 0.24);
  backdrop-filter: blur(3px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--paper-faint);
  font-size: 0.66rem;
  font-weight: 760;
  letter-spacing: 0.22em;
}

.ready-screen h1 {
  margin: 0;
  font-size: clamp(2.15rem, 7vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.ready-hook {
  margin: 16px 0 0;
  color: rgba(248, 244, 235, 0.76);
  font-size: clamp(0.95rem, 3vw, 1.12rem);
}

.experiment-note {
  width: min(100%, 610px);
  margin-top: clamp(28px, 5vw, 38px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.experiment-note div {
  min-height: 92px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(248, 244, 235, 0.12);
  border-radius: 19px;
  background: rgba(8, 17, 35, 0.42);
  text-align: left;
}

.experiment-note span {
  color: var(--gold);
  font-size: 0.67rem;
  font-weight: 760;
  letter-spacing: 0.12em;
}

.experiment-note strong {
  color: rgba(248, 244, 235, 0.82);
  font-size: clamp(0.8rem, 2.5vw, 0.94rem);
  line-height: 1.42;
}

.control-note {
  margin: 20px 0 0;
  color: rgba(248, 244, 235, 0.4);
  font-size: 0.72rem;
}

.start-button {
  min-width: 168px;
  min-height: 56px;
  margin-top: 17px;
  padding: 14px 25px;
  border: 1px solid rgba(248, 244, 235, 0.86);
  border-radius: 999px;
  background: rgba(248, 244, 235, 0.96);
  color: #152039;
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: clamp(22px, 4vw, 38px);
}

.planner-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.planner-head p {
  margin: 0 0 5px;
  color: rgba(248, 244, 235, 0.4);
  font-size: 0.68rem;
  font-weight: 740;
  letter-spacing: 0.12em;
}

.planner-head strong {
  display: block;
  color: rgba(248, 244, 235, 0.88);
  font-size: clamp(1.15rem, 3.5vw, 1.72rem);
  letter-spacing: -0.035em;
}

.fake-progress {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(248, 244, 235, 0.12);
  border-radius: 999px;
  color: rgba(248, 244, 235, 0.48);
  font-size: 0.69rem;
  font-variant-numeric: tabular-nums;
}

.distraction-board {
  width: min(100%, 780px);
  margin: clamp(28px, 6vh, 60px) auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(11px, 2vw, 16px);
}

.distraction-card {
  position: relative;
  min-height: 132px;
  padding: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(248, 244, 235, 0.13);
  border-radius: 23px;
  background: rgba(9, 18, 37, 0.6);
  color: var(--paper);
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.distraction-card:hover {
  transform: translateY(-2px) rotate(var(--card-rotate, 0deg));
  border-color: rgba(241, 205, 114, 0.34);
  background: rgba(15, 27, 52, 0.78);
}

.distraction-card.is-clicked {
  animation: card-pop 300ms ease;
}

.card-icon {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 1.15rem;
}

.distraction-card strong {
  font-size: clamp(0.9rem, 2.6vw, 1.02rem);
  letter-spacing: -0.025em;
}

.distraction-card small {
  color: rgba(248, 244, 235, 0.42);
  font-size: clamp(0.68rem, 2vw, 0.77rem);
  line-height: 1.4;
}

.play-caption {
  margin: clamp(22px, 4vh, 36px) auto 0;
  min-height: 1.5em;
  color: rgba(248, 244, 235, 0.66);
  font-size: clamp(0.82rem, 2.4vw, 0.94rem);
  text-align: center;
}

.focus-button {
  position: absolute;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(28px, env(safe-area-inset-bottom));
  z-index: 11;
  min-height: 49px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(241, 205, 114, 0.42);
  border-radius: 999px;
  background: rgba(7, 15, 31, 0.8);
  color: #f4d98f;
  font-size: 0.78rem;
  font-weight: 760;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.shortcut-hint {
  position: absolute;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  margin: 0;
  color: rgba(248, 244, 235, 0.32);
  font-size: 0.61rem;
}

.warning-layer {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(240, 120, 95, 0.1), rgba(3, 7, 17, 0.62) 68%);
  pointer-events: none;
  backdrop-filter: blur(2px);
}

.warning-radar {
  position: relative;
  width: 94px;
  height: 94px;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
}

.warning-radar span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(240, 120, 95, 0.48);
  border-radius: 50%;
  animation: radar-pulse 1.25s ease-out infinite;
}

.warning-radar span:nth-child(2) { animation-delay: .38s; }
.warning-radar span:nth-child(3) { animation-delay: .76s; }

.warning-layer p {
  margin: 0;
  color: #ffb09e;
  font-size: clamp(0.88rem, 2.7vw, 1rem);
  font-weight: 820;
  letter-spacing: 0.1em;
}

.warning-layer strong {
  margin-top: 4px;
  color: var(--paper);
  font-size: clamp(4.2rem, 14vw, 8rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.07em;
  text-shadow: 0 0 36px rgba(240, 120, 95, 0.2);
}

.warning-layer small {
  margin-top: 9px;
  color: rgba(248, 244, 235, 0.54);
  font-size: 0.76rem;
}

.study-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  padding: clamp(20px, 4vw, 44px);
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(20, 37, 69, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 37, 69, 0.035) 1px, transparent 1px),
    #f0eee7;
  background-size: 26px 26px;
  color: #17213a;
}

.research-paper {
  position: relative;
  width: min(100%, 760px);
  padding: clamp(22px, 4.5vw, 44px);
  overflow: hidden;
  border: 1px solid rgba(23, 33, 58, 0.16);
  border-radius: 4px;
  background: rgba(255, 255, 252, 0.9);
  box-shadow: 0 28px 70px rgba(23, 33, 58, 0.14);
}

.paper-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: rgba(23, 33, 58, 0.52);
  font-size: clamp(0.55rem, 1.7vw, 0.66rem);
  font-weight: 800;
  letter-spacing: 0.13em;
}

.research-paper h2 {
  margin: clamp(28px, 4vw, 40px) 0 0;
  color: #17213a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 5vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.research-list {
  margin: clamp(24px, 4vw, 34px) 0 0;
  border-top: 2px solid #17213a;
}

.research-list > div {
  display: grid;
  grid-template-columns: minmax(86px, 0.28fr) 1fr;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(23, 33, 58, 0.15);
}

.research-list dt {
  color: rgba(23, 33, 58, 0.54);
  font-size: clamp(0.66rem, 2vw, 0.78rem);
  font-weight: 800;
}

.research-list dd {
  margin: 0;
  color: #17213a;
  font-size: clamp(0.82rem, 2.4vw, 1rem);
  font-weight: 720;
  line-height: 1.42;
}

.research-result {
  background: linear-gradient(90deg, rgba(241, 205, 114, 0.2), transparent 92%);
}

.research-result dd {
  color: #9b651c;
}

.paper-footer {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: rgba(23, 33, 58, 0.5);
  font-size: 0.7rem;
}

.paper-footer strong {
  color: #315f51;
}

.leak-badge {
  padding: 6px 9px;
  border-radius: 999px;
  background: #e9513d;
  color: white;
  font-size: 0.66rem;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(233, 81, 61, 0.2);
  animation: leak-pop 420ms ease both;
}

.false-alarm {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 16;
  width: min(88%, 430px);
  padding: 13px 17px;
  border: 1px solid rgba(23, 33, 58, 0.18);
  border-radius: 15px;
  background: rgba(255, 255, 252, 0.96);
  color: #17213a;
  text-align: center;
  transform: translateX(-50%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}

.false-alarm strong,
.false-alarm span {
  display: block;
}

.false-alarm strong { font-size: 0.86rem; }
.false-alarm span {
  margin-top: 4px;
  color: rgba(23, 33, 58, 0.6);
  font-size: 0.72rem;
}

.mom-scene {
  position: absolute;
  right: max(8px, env(safe-area-inset-right));
  bottom: max(2px, env(safe-area-inset-bottom));
  z-index: 18;
  width: min(62vw, 310px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}

.mom-bubble {
  position: relative;
  width: fit-content;
  max-width: 230px;
  margin-right: 34px;
  margin-bottom: 4px;
  padding: 10px 13px;
  border: 1.5px solid rgba(255, 216, 120, 0.9);
  border-radius: 16px 16px 5px 16px;
  background: rgba(6, 12, 26, 0.84);
  color: #ffe29a;
  font-size: clamp(0.77rem, 2.4vw, 0.92rem);
  font-weight: 780;
  line-height: 1.4;
  box-shadow: 0 15px 36px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(7px);
}

.mom-bubble::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: -7px;
  width: 11px;
  height: 11px;
  border-right: 1.5px solid rgba(255, 216, 120, 0.9);
  border-bottom: 1.5px solid rgba(255, 216, 120, 0.9);
  background: rgba(6, 12, 26, 0.84);
  transform: rotate(45deg);
}

.study-layer:not([hidden]) ~ .mom-scene .mom-bubble {
  background: rgba(23, 33, 58, 0.9);
}

.mom-image {
  display: block;
  width: clamp(128px, 25vw, 200px);
  height: auto;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.24));
  transform-origin: center bottom;
  animation: mom-arrive 460ms cubic-bezier(.16, .86, .22, 1) both;
}

.result-screen {
  flex: 1;
  min-height: calc(100svh - 70px);
  padding: 12px 0 4px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 17px;
}

.result-card {
  width: min(100%, 620px);
  padding: clamp(23px, 5vw, 40px);
  border: 1px solid rgba(248, 244, 235, 0.14);
  border-radius: 28px;
  background: rgba(7, 15, 30, 0.58);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  text-align: center;
}

.result-kicker {
  margin: 0 0 12px;
  color: var(--paper-faint);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.18em;
}

.result-card h2 {
  margin: 0;
  font-size: clamp(1.75rem, 5.5vw, 2.75rem);
  line-height: 1.17;
  letter-spacing: -0.052em;
  white-space: pre-line;
  text-wrap: balance;
}

.result-message {
  margin: 13px auto 19px;
  max-width: 430px;
  color: var(--paper-soft);
  font-size: clamp(0.9rem, 2.8vw, 1.04rem);
  line-height: 1.58;
  white-space: pre-line;
}

.result-hypothesis {
  margin-bottom: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border: 1px solid rgba(241, 205, 114, 0.18);
  border-radius: 15px;
  background: rgba(241, 205, 114, 0.055);
  text-align: left;
}

.result-hypothesis span {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 800;
}

.result-hypothesis strong {
  color: rgba(248, 244, 235, 0.78);
  font-size: 0.79rem;
}

.result-stats {
  margin: 0;
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(248, 244, 235, 0.1);
  border-radius: 17px;
  background: rgba(248, 244, 235, 0.07);
}

.result-stats div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 14px;
  background: rgba(4, 9, 20, 0.5);
}

.result-stats dt {
  color: var(--paper-faint);
  font-size: 0.77rem;
}

.result-stats dd {
  margin: 0;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 740;
}

.result-conclusion {
  margin: 16px 0 0;
  color: rgba(248, 244, 235, 0.48);
  font-size: 0.72rem;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

.result-button,
.result-home {
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid rgba(248, 244, 235, 0.25);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.result-button.primary {
  border-color: rgba(248, 244, 235, 0.86);
  background: var(--paper);
  color: #152039;
}

.save-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--paper-faint);
  font-size: 0.73rem;
  text-align: center;
}

@keyframes nebula-drift {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(11px,-9px,0) scale(1.05); }
}

@keyframes twinkle {
  0%, 100% { opacity: .2; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

@keyframes card-pop {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(.975) rotate(var(--card-rotate, 0deg)); }
}

@keyframes radar-pulse {
  from { opacity: .72; transform: scale(.22); }
  to { opacity: 0; transform: scale(1); }
}

@keyframes mom-arrive {
  from { opacity: 0; transform: translateY(70px) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes leak-pop {
  from { opacity: 0; transform: scale(.5) rotate(-8deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@media (max-width: 640px) {
  .game-shell { padding-inline: 9px; }
  .game-header { padding-inline: 3px; }
  .game-arena { border-radius: 24px; }

  .experiment-note {
    grid-template-columns: 1fr;
    max-width: 440px;
  }

  .experiment-note div {
    min-height: 72px;
    padding: 13px 15px;
  }

  .play-layer {
    padding: 21px 15px;
  }

  .distraction-board {
    margin-top: 24px;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .distraction-card {
    min-height: 120px;
    padding: 14px 12px;
    border-radius: 19px;
  }

  .distraction-card small {
    display: none;
  }

  .focus-button {
    right: 14px;
    bottom: max(28px, env(safe-area-inset-bottom));
  }

  .shortcut-hint {
    right: 14px;
  }

  .study-layer {
    padding: 14px;
  }

  .research-paper {
    padding: 22px 18px;
  }

  .research-list > div {
    grid-template-columns: 78px 1fr;
    gap: 10px;
    padding: 12px 0;
  }

  .mom-scene {
    width: 66vw;
  }

  .mom-image {
    width: clamp(120px, 36vw, 162px);
  }

  .mom-bubble {
    margin-right: 15px;
    max-width: 190px;
  }
}

@media (max-width: 390px) {
  .timer-label,
  .sound-toggle span:last-child {
    display: none;
  }

  .sound-toggle {
    width: 34px;
    justify-content: center;
    padding-inline: 0;
  }

  .ready-screen {
    padding: 20px 14px;
  }

  .ready-screen h1 {
    font-size: 2.1rem;
  }

  .ready-hook {
    max-width: 250px;
    line-height: 1.45;
  }

  .experiment-note {
    margin-top: 22px;
  }

  .control-note {
    font-size: .64rem;
  }

  .planner-head strong {
    font-size: 1.08rem;
  }

  .distraction-card {
    min-height: 108px;
  }

  .research-paper h2 {
    font-size: 1.58rem;
  }

  .research-list > div {
    grid-template-columns: 68px 1fr;
  }

  .paper-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .result-card {
    padding: 21px 16px;
    border-radius: 22px;
  }

  .result-hypothesis {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

@media (max-height: 700px) {
  .game-header { height: 38px; }
  .game-arena { min-height: calc(100svh - 70px); }
  .ready-screen { justify-content: flex-start; padding-top: 24px; }
  .experiment-note { margin-top: 19px; }
  .control-note { margin-top: 13px; }
  .start-button { margin-top: 12px; }
  .distraction-board { margin-top: 20px; }
  .distraction-card { min-height: 104px; }
  .play-caption { margin-top: 14px; }
  .result-card { padding-block: 18px; }
  .result-message { margin-bottom: 13px; }
  .result-stats div { padding-block: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}


/* v22: robust study-report centering and local character asset */
.game-shell,
.game-screen,
.game-arena,
.study-layer {
  max-width: 100%;
}

.game-shell {
  overflow: hidden;
}

.study-layer {
  overflow: hidden;
  place-items: initial;
}

.research-paper {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(calc(100% - clamp(28px, 8vw, 88px)), 760px);
  max-width: calc(100% - 28px);
  transform: translate(-50%, -50%);
}

.mom-image {
  max-width: 100%;
}

@media (max-width: 640px) {
  .research-paper {
    width: calc(100% - 28px);
    max-height: calc(100% - 28px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (max-height: 720px) and (min-width: 641px) {
  .research-paper {
    max-height: calc(100% - 34px);
    overflow-y: auto;
  }
}


/* v23: higher-legibility experiment result report */
.result-screen {
  gap: 22px;
  padding-top: 18px;
  padding-bottom: 14px;
}

.result-card {
  width: min(100%, 720px);
  padding: clamp(30px, 5vw, 48px);
  border-color: rgba(248, 244, 235, 0.22);
  background:
    radial-gradient(circle at 86% 10%, rgba(241, 205, 114, 0.075), transparent 28%),
    rgba(7, 15, 30, 0.86);
  box-shadow:
    0 30px 84px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
  text-align: left;
}

.result-kicker {
  margin-bottom: 16px;
  color: rgba(248, 244, 235, 0.62);
  font-size: clamp(0.66rem, 1.5vw, 0.74rem);
  letter-spacing: 0.2em;
}

.result-card h2 {
  max-width: 620px;
  margin: 0;
  color: #fffdf7;
  font-size: clamp(2.15rem, 5.4vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.055em;
}

.result-message {
  max-width: 570px;
  margin: 17px 0 26px;
  color: rgba(248, 244, 235, 0.86);
  font-size: clamp(1.02rem, 2.7vw, 1.2rem);
  font-weight: 560;
  line-height: 1.65;
}

.result-hypothesis {
  margin-bottom: 20px;
  padding: 17px 18px;
  display: block;
  border-color: rgba(241, 205, 114, 0.32);
  border-radius: 18px;
  background: rgba(241, 205, 114, 0.075);
}

.result-hypothesis span {
  display: block;
  margin-bottom: 7px;
  color: #f4d98f;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.result-hypothesis strong {
  display: block;
  color: rgba(255, 253, 247, 0.94);
  font-size: clamp(0.96rem, 2.4vw, 1.08rem);
  line-height: 1.45;
}

.result-stats {
  gap: 0;
  border-color: rgba(248, 244, 235, 0.18);
  border-radius: 19px;
  background: rgba(248, 244, 235, 0.04);
}

.result-stats div {
  min-height: 58px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(248, 244, 235, 0.11);
  background: rgba(4, 9, 20, 0.38);
}

.result-stats div:last-child {
  border-bottom: 0;
}

.result-stats dt {
  color: rgba(248, 244, 235, 0.68);
  font-size: clamp(0.84rem, 2vw, 0.94rem);
  font-weight: 630;
}

.result-stats dd {
  color: #f6d778;
  font-size: clamp(0.92rem, 2.2vw, 1.05rem);
  font-weight: 820;
}

.result-conclusion {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(241, 205, 114, 0.24);
  color: rgba(255, 244, 191, 0.9);
  font-size: clamp(0.86rem, 2.1vw, 0.98rem);
  font-weight: 680;
  line-height: 1.55;
}

.result-actions {
  gap: 11px;
}

.result-button,
.result-home {
  min-height: 52px;
  padding: 13px 21px;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .result-screen {
    align-content: start;
    padding-top: 12px;
    overflow-y: auto;
  }

  .result-card {
    width: 100%;
    padding: 27px 20px;
    border-radius: 24px;
  }

  .result-card h2 {
    font-size: clamp(2rem, 10vw, 2.65rem);
  }

  .result-message {
    font-size: 1rem;
  }

  .result-stats div {
    min-height: 54px;
    padding: 13px 15px;
  }
}

@media (max-width: 390px) {
  .result-card {
    padding: 24px 17px;
  }

  .result-hypothesis {
    padding: 15px;
  }

  .result-stats div {
    gap: 12px;
  }

  .result-actions {
    width: 100%;
  }

  .result-button,
  .result-home {
    flex: 1 1 auto;
    min-width: 92px;
    padding-inline: 14px;
  }
}

@media (max-height: 700px) and (min-width: 641px) {
  .result-screen {
    align-content: start;
    overflow-y: auto;
  }

  .result-card {
    margin-top: 8px;
    padding-block: 28px;
  }
}


/* v24: unmistakable sound state */
.sound-toggle.is-on {
  border-color: rgba(241, 205, 114, 0.68);
  background: rgba(241, 205, 114, 0.14);
  color: #ffe49a;
  box-shadow: 0 0 0 1px rgba(241, 205, 114, 0.08);
}
