:root {
  --ink: #07100e;
  --ink-soft: #0e1916;
  --panel: #13211d;
  --panel-2: #192824;
  --paper: #f1ecdf;
  --paper-dim: #bdb7aa;
  --line: rgba(242, 236, 223, 0.16);
  --red: #f04d3f;
  --red-dark: #a82c27;
  --gold: #d6a84f;
  --mint: #72c9ae;
  --blue: #70a9d8;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
  --radius: 10px;
  --font-sans: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-serif: "Iowan Old Style", "Times New Roman", "Batang", serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--ink);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 10%, rgba(31, 75, 61, 0.28), transparent 34%),
    linear-gradient(135deg, #07100e 0%, #0d1915 55%, #050907 100%);
  color: var(--paper);
  font-family: var(--font-sans);
  word-break: keep-all;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

button,
.choice-card {
  -webkit-tap-highlight-color: transparent;
}

.noise {
  position: fixed;
  z-index: 50;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.noscript {
  position: fixed;
  z-index: 100;
  inset: 16px;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--ink);
  color: var(--paper);
}

.game-shell {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 240px minmax(200px, 420px) 240px;
  align-items: center;
  gap: 32px;
  min-height: 82px;
  padding: 14px clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 14, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: var(--paper);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(240, 77, 63, 0.5);
  border-radius: 50%;
  background: var(--red);
  box-shadow: inset 0 0 0 5px var(--ink);
  color: var(--paper);
  font-family: Georgia, serif;
  font-size: 25px;
  font-style: italic;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: Georgia, serif;
  font-size: 18px;
  font-style: italic;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 2px;
  color: var(--paper-dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.chapter-meter {
  justify-self: center;
  width: 100%;
}

.chapter-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--paper-dim);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.chapter-label span:last-child {
  color: var(--red);
}

.meter-track {
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.meter-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--red-dark), var(--red));
  box-shadow: 0 0 14px rgba(240, 77, 63, 0.6);
  transition: width 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 9px;
  border: 0;
  background: transparent;
  color: var(--paper-dim);
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.icon-button > span:first-child {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 13px;
}

.icon-button[aria-pressed="true"] {
  color: var(--mint);
}

.icon-button[aria-pressed="true"] > span:first-child {
  border-color: rgba(114, 201, 174, .64);
  box-shadow:
    0 0 0 4px rgba(114, 201, 174, .08),
    0 0 18px rgba(114, 201, 174, .2);
  animation: bgm-pulse 1.8s ease-in-out infinite;
}

@keyframes bgm-pulse {
  50% {
    transform: scale(1.08);
    box-shadow:
      0 0 0 7px rgba(114, 201, 174, 0),
      0 0 22px rgba(114, 201, 174, .3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .icon-button[aria-pressed="true"] > span:first-child {
    animation: none;
  }
}

.stage {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding-top: 82px;
}

.stage::before {
  position: absolute;
  z-index: -3;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(255,255,255,.025) 50%, transparent 50.1%),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 100% 100%, 100% 48px;
  content: "";
}

.screen {
  min-height: calc(100vh - 82px);
  animation: screen-in 650ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.screen[hidden] {
  display: none !important;
}

.title-screen {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  align-items: center;
  gap: clamp(48px, 8vw, 130px);
  width: min(1220px, calc(100% - 64px));
  margin: 0 auto;
  padding: 70px 0 90px;
}

.eyebrow {
  position: absolute;
  top: 42px;
  left: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--paper-dim);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.eyebrow i {
  width: 34px;
  height: 1px;
  background: var(--red);
}

.title-lockup {
  position: relative;
  z-index: 2;
}

.title-kicker {
  margin: 0 0 8px 7px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.title-lockup h1 {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(61px, 8.8vw, 128px);
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.82;
  text-shadow: 0 22px 48px rgba(0,0,0,.45);
}

.title-lockup h1 span:first-child {
  position: relative;
  z-index: 2;
  color: var(--red);
}

.title-lockup h1 span:last-child {
  margin-left: .03em;
}

.title-copy {
  margin: 38px 0 0 8px;
  color: var(--paper-dim);
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.2vw, 27px);
  line-height: 1.6;
}

.title-copy em {
  color: var(--paper);
  font-style: normal;
  box-shadow: inset 0 -7px rgba(240, 77, 63, 0.25);
}

.start-panel {
  position: relative;
  z-index: 2;
  padding: 30px;
  border-top: 2px solid var(--red);
  background: rgba(19, 33, 29, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.start-panel label {
  display: block;
  margin-bottom: 12px;
  color: var(--paper-dim);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.name-field {
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.name-field input {
  width: 100%;
  padding: 7px 52px 13px 0;
  border: 0;
  background: transparent;
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
}

.name-field input:focus {
  outline: 0;
}

.name-field span {
  position: absolute;
  right: 0;
  bottom: 15px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 10px;
}

.start-panel > p {
  min-height: 18px;
  margin: 7px 0 18px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
}

.primary-button,
.secondary-button,
.text-button,
.next-dialogue,
.choice-card,
.league-tab,
.close-button {
  border: 0;
  cursor: pointer;
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: 0 18px 0 21px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--red);
  box-shadow: 0 14px 32px rgba(147, 34, 29, 0.28);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.primary-button b {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
  font-size: 17px;
  transition: transform 220ms ease;
}

.primary-button:hover b {
  transform: translateX(4px);
}

.text-button {
  padding: 14px 0 0;
  background: transparent;
  color: var(--paper-dim);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.phase-badge {
  position: absolute;
  right: 0;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.phase-badge span {
  padding: 6px 8px;
  border: 1px solid rgba(255,255,255,.15);
  color: var(--red);
  font-weight: 800;
}

.phase-badge p {
  margin: 0;
}

.year-ghost {
  position: fixed;
  z-index: -2;
  right: -2vw;
  bottom: -10vw;
  color: rgba(241, 236, 223, 0.025);
  font-family: Georgia, serif;
  font-size: 34vw;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.1em;
  line-height: .8;
  pointer-events: none;
}

.baseball-stitch {
  position: fixed;
  z-index: -1;
  width: 340px;
  height: 340px;
  border: 2px dashed rgba(240, 77, 63, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.baseball-stitch-left {
  left: -270px;
  bottom: -60px;
}

.baseball-stitch-right {
  top: -210px;
  right: -130px;
}

/* Cutscene */
.cutscene-screen {
  position: relative;
  background:
    linear-gradient(90deg, rgba(5,9,8,.1), rgba(5,9,8,.75) 65%, #050908),
    radial-gradient(circle at 22% 30%, #2a3d38 0, #111b18 30%, #070c0b 72%);
}

.scene-visual {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.cutscene-scene-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.82) brightness(.72);
  transition: opacity .2s ease;
}

.scene-visual::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5,9,8,.08), rgba(5,9,8,.36) 52%, rgba(5,9,8,.92));
  content: "";
}

.locker {
  position: absolute;
  top: 7%;
  left: 10%;
  width: min(380px, 34vw);
  height: 72%;
  border: 1px solid rgba(255,255,255,.1);
  background:
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(255,255,255,.04) 80px),
    linear-gradient(110deg, #1c2b27, #0e1614);
  box-shadow: inset 0 0 70px rgba(0,0,0,.45), 20px 30px 80px rgba(0,0,0,.25);
  transform: perspective(900px) rotateY(3deg);
  opacity: .16;
}

.locker::before {
  position: absolute;
  top: 18%;
  right: 13px;
  width: 3px;
  height: 56%;
  background: repeating-linear-gradient(#59635f 0 2px, transparent 2px 7px);
  content: "";
}

.locker-number {
  position: absolute;
  top: 22%;
  left: 50%;
  color: rgba(255,255,255,.08);
  font-family: Georgia, serif;
  font-size: 120px;
  font-style: italic;
  font-weight: 900;
  transform: translateX(-50%);
}

.locker-name {
  position: absolute;
  top: 54%;
  left: 50%;
  padding: 8px 18px;
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.22);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .24em;
  transform: translateX(-50%);
}

.bench {
  position: absolute;
  left: 2%;
  bottom: 15%;
  width: 52%;
  height: 35px;
  border-radius: 3px;
  background: linear-gradient(#674632, #2b1e17);
  box-shadow: 0 24px 0 -9px #160f0c, 0 45px 50px rgba(0,0,0,.6);
  transform: rotate(-1.2deg);
}

.bottle {
  position: absolute;
  left: 37%;
  bottom: calc(15% + 32px);
  width: 27px;
  height: 84px;
  border-radius: 6px 6px 10px 10px;
  background: linear-gradient(90deg, #26382f, #5c785e 48%, #1e2d27);
  box-shadow: inset 4px 0 rgba(255,255,255,.12), 10px 18px 18px rgba(0,0,0,.35);
  transform: rotate(17deg);
}

.bottle::before {
  position: absolute;
  top: -26px;
  left: 7px;
  width: 13px;
  height: 31px;
  border-radius: 3px 3px 0 0;
  background: #31463b;
  content: "";
}

.rain {
  position: absolute;
  z-index: 3;
  inset: -50%;
  opacity: .14;
  background: repeating-linear-gradient(105deg, transparent 0 38px, rgba(255,255,255,.7) 39px, transparent 40px 75px);
  animation: rain 650ms linear infinite;
}

.scene-caption {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: min(760px, calc(100% - 64px));
  min-height: calc(100vh - 82px);
  margin-left: auto;
  margin-right: clamp(32px, 8vw, 140px);
  padding: 70px 0 74px;
}

.scene-meta {
  display: flex;
  gap: 18px;
  margin: 0 0 16px 22px;
  color: rgba(255,255,255,.48);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}

.scene-meta span + span::before {
  margin-right: 18px;
  color: var(--red);
  content: "—";
}

.dialogue-card {
  position: relative;
  min-height: 214px;
  padding: 32px 40px 34px;
  border-left: 3px solid var(--red);
  background: rgba(11, 21, 18, .94);
  box-shadow: var(--shadow);
}

.speaker {
  margin: 0 0 16px;
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .22em;
}

.dialogue {
  max-width: 610px;
  min-height: 58px;
  margin: 0;
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.65;
}

.next-dialogue {
  position: absolute;
  right: 28px;
  bottom: 25px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  color: var(--paper-dim);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
}

.next-dialogue b {
  color: var(--red);
  font-size: 16px;
}

/* Shared placeholders for later screens in the first visible slice. */
.quest-screen,
.choice-screen,
.result-screen,
.dashboard-screen {
  width: min(1180px, calc(100% - 56px));
  margin: 0 auto;
  padding: clamp(44px, 8vh, 90px) 0;
}

.quest-overline {
  margin: 0 0 13px;
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .22em;
}

.secondary-button {
  padding: 13px 17px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  font-size: 11px;
  font-weight: 800;
}

/* Quest: the morning calendar */
.quest-screen {
  display: grid;
  place-items: center;
}

.quest-grid {
  display: grid;
  grid-template-columns: minmax(320px, 500px) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(54px, 8vw, 120px);
  width: 100%;
}

.calendar-card {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: #e9e2d3;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.42),
    18px 20px 0 rgba(0, 0, 0, 0.13);
  color: #19211f;
  transform: rotate(-1.1deg);
}

.calendar-card::after {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='.25'/%3E%3C/svg%3E");
  content: "";
  mix-blend-mode: multiply;
  pointer-events: none;
}

.calendar-head {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  min-height: 138px;
  padding: 22px 30px;
  background: var(--red);
  color: #fff;
}

.calendar-head > span {
  position: absolute;
  top: 22px;
  left: 30px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .22em;
}

.calendar-head strong {
  font-family: Georgia, serif;
  font-size: 86px;
  font-style: italic;
  line-height: .75;
}

.calendar-head small {
  padding-bottom: 4px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .18em;
}

.calendar-body {
  padding: 25px 30px 20px;
}

.weekday,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}

.weekday {
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(25,33,31,.12);
  color: rgba(25,33,31,.45);
  font-size: 9px;
  font-weight: 800;
}

.weekday span:first-child {
  color: var(--red);
}

.calendar-days {
  gap: 3px 0;
  padding-top: 8px;
}

.calendar-days > * {
  position: relative;
  display: grid;
  min-height: 41px;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 600;
}

.calendar-days .is-empty {
  visibility: hidden;
}

.calendar-days .is-today {
  z-index: 1;
  color: #fff;
  font-size: 20px;
}

.calendar-days .is-today::before,
.calendar-days .is-today::after {
  position: absolute;
  z-index: -1;
  border: 3px solid var(--red);
  border-radius: 47% 53% 51% 49%;
  content: "";
  transform: rotate(-8deg);
}

.calendar-days .is-today::before {
  width: 36px;
  height: 34px;
  background: var(--red);
}

.calendar-days .is-today::after {
  width: 48px;
  height: 41px;
  border-width: 2px;
  opacity: .45;
  transform: rotate(12deg);
}

.calendar-note {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 30px 20px;
  border-top: 1px dashed rgba(25,33,31,.2);
  background: rgba(203,190,164,.25);
}

.calendar-note > span {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-family: Georgia, serif;
  font-weight: 900;
}

.calendar-note p {
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
}

.calendar-note strong {
  font-size: 13px;
}

.quest-copy {
  position: relative;
  padding-left: 12px;
}

.quest-number {
  position: absolute;
  z-index: -1;
  top: -78px;
  right: 0;
  color: rgba(255,255,255,.035);
  font-family: Georgia, serif;
  font-size: 210px;
  font-style: italic;
  font-weight: 900;
  line-height: 1;
}

.quest-copy h2,
.choice-heading h2,
.result-body h2,
.dashboard-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -.045em;
}

.quest-copy h2 {
  font-size: clamp(42px, 5vw, 66px);
  line-height: 1.18;
}

.quest-copy > p:not(.quest-overline) {
  margin: 27px 0;
  color: var(--paper-dim);
  font-size: 15px;
  line-height: 1.9;
}

.memory-flash {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 15px;
  margin: 30px 0;
  padding: 16px 18px;
  border: 1px solid rgba(214,168,79,.3);
  background:
    linear-gradient(90deg, rgba(214,168,79,.12), transparent),
    rgba(0,0,0,.18);
}

.memory-flash::before {
  grid-row: 1 / 3;
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid rgba(214,168,79,.55);
  border-radius: 50%;
  color: var(--gold);
  content: "∞";
  font-family: Georgia, serif;
  font-size: 21px;
}

.memory-flash span {
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .17em;
}

.memory-flash p {
  margin: 0;
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.55;
}

.quest-copy .primary-button {
  max-width: 330px;
}

/* Choice screens */
.choice-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.choice-heading {
  max-width: 760px;
  margin-bottom: 36px;
}

.choice-heading h2 {
  font-size: clamp(34px, 4vw, 53px);
}

.choice-heading > p:last-child {
  margin: 15px 0 0;
  color: var(--paper-dim);
  font-size: 13px;
  line-height: 1.7;
}

.choice-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.choice-cards.is-position-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.choice-cards.is-position-grid .position-card {
  min-height: 200px;
  padding: 20px 18px 17px;
}

.position-card .choice-tag {
  margin-bottom: 20px;
}

.position-card .choice-index {
  top: 16px;
  right: 16px;
  font-size: 38px;
}

.position-card > strong {
  font-size: 24px;
}

.position-card > p {
  margin-bottom: 12px;
  font-size: 11px;
}

.position-card .forecast {
  margin-top: auto;
}

.choice-card {
  position: relative;
  display: flex;
  min-height: 320px;
  flex-direction: column;
  align-items: flex-start;
  padding: 31px 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(140deg, rgba(255,255,255,.035), transparent 45%),
    rgba(17,30,26,.8);
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
  text-align: left;
  transition:
    border-color 220ms ease,
    transform 220ms ease,
    background 220ms ease;
}

.choice-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--red);
  content: "";
  opacity: 0;
  transform: scaleY(.35);
  transition: 220ms ease;
}

.choice-card:hover {
  border-color: rgba(240,77,63,.55);
  background:
    linear-gradient(140deg, rgba(240,77,63,.09), transparent 52%),
    rgba(21,37,32,.96);
  transform: translateY(-5px);
}

.choice-card:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

.choice-index {
  position: absolute;
  top: 25px;
  right: 28px;
  color: rgba(255,255,255,.11);
  font-family: Georgia, serif;
  font-size: 55px;
  font-style: italic;
  font-weight: 900;
  line-height: 1;
}

.choice-tag {
  margin-bottom: 35px;
  color: var(--red);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .21em;
}

.choice-icon {
  position: absolute;
  top: 64px;
  right: 37px;
  color: rgba(255,255,255,.05);
  font-size: 130px;
  filter: grayscale(1);
  transform: rotate(-12deg);
}

.choice-icon.bat-icon {
  top: 10px;
  right: 75px;
  font-family: Georgia, serif;
  font-size: 220px;
  font-weight: 400;
  transform: rotate(-10deg);
}

.choice-card > strong {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
  font-family: var(--font-serif);
  font-size: clamp(25px, 2.4vw, 34px);
  letter-spacing: -.04em;
}

.choice-card > p {
  position: relative;
  z-index: 1;
  max-width: 430px;
  margin: 0;
  color: var(--paper-dim);
  font-size: 12px;
  line-height: 1.75;
}

.memory-clue {
  position: relative;
  z-index: 1;
  margin-top: 28px;
  padding: 10px 12px;
  border: 1px solid rgba(214,168,79,.2);
  background: rgba(214,168,79,.06);
  color: rgba(241,236,223,.72);
  font-family: var(--font-serif);
  font-size: 11px;
}

.memory-clue b {
  margin-right: 8px;
  color: var(--gold);
  font-family: var(--font-sans);
  font-size: 8px;
  letter-spacing: .12em;
}

.choice-cta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding-top: 28px;
  color: var(--paper);
  font-size: 10px;
  font-weight: 800;
}

.choice-cta b {
  color: var(--red);
  font-size: 16px;
  transition: transform 180ms ease;
}

.choice-card:hover .choice-cta b {
  transform: translateX(5px);
}

.performance-card {
  min-height: 338px;
}

.forecast {
  margin-top: 21px;
  color: var(--paper);
  font-family: Georgia, var(--font-serif);
  font-size: 17px;
  font-style: italic;
}

.stat-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}

.stat-preview span {
  padding: 6px 9px;
  border: 1px solid rgba(114,201,174,.22);
  background: rgba(114,201,174,.07);
  color: var(--mint);
  font-size: 9px;
  font-weight: 800;
}

.choice-back {
  align-self: flex-start;
}

/* Result */
.result-screen {
  display: grid;
  grid-template-columns: minmax(310px, .75fr) minmax(420px, 1.25fr);
  align-items: center;
  gap: clamp(55px, 8vw, 120px);
}

.scoreboard {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 58px 1fr;
  align-items: center;
  min-height: 370px;
  padding: 50px 27px;
  border: 1px solid rgba(255,255,255,.12);
  background:
    linear-gradient(rgba(0,0,0,.05) 49%, rgba(255,255,255,.03) 50%, rgba(0,0,0,.05) 51%),
    radial-gradient(circle at center, #1c3129, #0c1713);
  box-shadow: var(--shadow);
  text-align: center;
}

.scoreboard::before,
.scoreboard::after {
  position: absolute;
  width: 62px;
  height: 62px;
  border: 2px dashed rgba(240,77,63,.18);
  border-radius: 50%;
  content: "";
}

.scoreboard::before {
  top: 17px;
  left: 17px;
}

.scoreboard::after {
  right: 17px;
  bottom: 17px;
}

.score-team {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.score-team span {
  font-size: 12px;
  font-weight: 800;
}

.score-team strong {
  font-family: Georgia, serif;
  font-size: 105px;
  font-style: italic;
  line-height: .9;
}

.score-team.is-away {
  color: rgba(241,236,223,.5);
}

.inning {
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: var(--red);
}

.inning span {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .18em;
}

.inning b {
  font-family: Georgia, serif;
  font-size: 18px;
}

.result-body h2 {
  max-width: 700px;
  font-size: clamp(38px, 4.5vw, 62px);
  line-height: 1.2;
}

.result-body > p:not(.quest-overline) {
  max-width: 660px;
  margin: 24px 0 28px;
  color: var(--paper-dim);
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.9;
}

.result-gains {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0 0 28px;
  background: var(--line);
  border: 1px solid var(--line);
}

.result-gains > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px;
  background: var(--panel);
}

.result-gains span {
  color: var(--paper-dim);
  font-size: 9px;
  font-weight: 800;
}

.result-gains strong {
  color: var(--mint);
  font-family: Georgia, serif;
  font-size: 19px;
}

.result-body .primary-button {
  max-width: 330px;
}

/* High-school status dashboard */
.dashboard-screen {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: stretch;
  gap: 30px;
}

.player-card {
  position: relative;
  display: flex;
  min-height: 620px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(155deg, rgba(255,255,255,.04), transparent 44%),
    #101e1a;
  box-shadow: var(--shadow);
}

.player-card::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(255,255,255,.025);
  content: "";
}

.player-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  padding: 20px 21px;
  border-bottom: 1px solid var(--line);
  color: var(--paper-dim);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .18em;
}

.player-silhouette {
  position: relative;
  z-index: 1;
  display: grid;
  height: 285px;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(240,77,63,.18), transparent 32%),
    linear-gradient(transparent, rgba(0,0,0,.2));
}

.player-silhouette::before {
  position: absolute;
  bottom: -75px;
  width: 225px;
  height: 225px;
  border-radius: 48% 52% 0 0;
  background: #080f0d;
  box-shadow: inset 0 12px rgba(240,77,63,.3);
  content: "";
}

.player-silhouette::after {
  position: absolute;
  top: 43px;
  width: 108px;
  height: 125px;
  border-radius: 48% 50% 42% 45%;
  background: #080f0d;
  content: "";
}

.player-silhouette span {
  position: relative;
  z-index: 2;
  margin-top: 5px;
  color: rgba(255,255,255,.055);
  font-family: var(--font-serif);
  font-size: 136px;
  font-weight: 900;
}

.player-silhouette > img {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

.player-silhouette:has(> img)::before,
.player-silhouette:has(> img)::after,
.player-silhouette:has(> img) > span {
  display: none;
}

.player-identity {
  position: relative;
  z-index: 2;
  padding: 24px;
  border-top: 1px solid var(--line);
}

.player-identity p {
  margin: 0 0 6px;
  color: var(--red);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
}

.player-identity h2 {
  margin: 0 0 7px;
  font-family: var(--font-serif);
  font-size: 31px;
}

.player-identity span {
  color: var(--paper-dim);
  font-size: 11px;
}

.potential-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,.16);
}

.potential-row span {
  color: var(--paper-dim);
  font-size: 9px;
  font-weight: 800;
}

.potential-row strong {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 29px;
  font-style: italic;
}

.dashboard-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.dashboard-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 29px;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--line);
}

.dashboard-head h2 {
  font-size: clamp(28px, 3.2vw, 43px);
}

.dashboard-head > div > p:last-child {
  margin: 10px 0 0;
  color: var(--paper-dim);
  font-size: 11px;
}

.dashboard-head .secondary-button {
  flex: 0 0 auto;
  transition: 180ms ease;
}

.secondary-button:hover {
  border-color: var(--red);
  background: rgba(240,77,63,.08);
}

.dashboard-cards {
  display: grid;
  grid-template-columns: minmax(360px, 1.25fr) minmax(260px, .75fr);
  gap: 18px;
}

.stat-panel,
.memory-panel,
.profile-panel {
  border: 1px solid var(--line);
  background: rgba(17,30,26,.8);
}

.stat-panel {
  padding: 24px 26px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.panel-title h3 {
  margin: 0;
  color: var(--paper-dim);
  font-size: 9px;
  letter-spacing: .18em;
}

.panel-title span {
  padding: 6px 8px;
  background: var(--red);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 11px;
  font-style: italic;
  font-weight: 800;
}

.stat-list {
  display: grid;
  gap: 15px;
}

.stat-row {
  display: grid;
  grid-template-columns: 52px 1fr 28px;
  align-items: center;
  gap: 13px;
}

.stat-row > span {
  color: var(--paper-dim);
  font-size: 10px;
  font-weight: 700;
}

.stat-row > strong {
  font-family: Georgia, serif;
  font-size: 14px;
  font-style: italic;
  text-align: right;
}

.stat-track {
  height: 5px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
}

.stat-track i {
  display: block;
  height: 100%;
  background: #8f9d98;
  box-shadow: 0 0 11px rgba(255,255,255,.08);
}

.stat-row.good .stat-track i {
  background: var(--mint);
}

.stat-row.elite .stat-track i {
  background: var(--red);
  box-shadow: 0 0 14px rgba(240,77,63,.28);
}

.stat-row.elite > strong {
  color: var(--red);
}

.stat-row.weak {
  opacity: .58;
}

.side-panels {
  display: grid;
  gap: 18px;
}

.memory-panel {
  position: relative;
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 15px;
  padding: 22px;
  overflow: hidden;
  border-color: rgba(214,168,79,.25);
  background:
    radial-gradient(circle at 100% 0, rgba(214,168,79,.15), transparent 43%),
    rgba(25,31,24,.9);
}

.memory-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(214,168,79,.5);
  border-radius: 50%;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 25px;
}

.memory-panel span {
  color: var(--gold);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .15em;
}

.memory-panel h3 {
  margin: 4px 0 7px;
  font-family: var(--font-serif);
  font-size: 19px;
}

.memory-panel p {
  margin: 0;
  color: var(--paper-dim);
  font-size: 9px;
  line-height: 1.6;
}

.memory-panel > strong {
  position: absolute;
  top: 18px;
  right: 18px;
  color: var(--paper);
  font-family: Georgia, serif;
  font-size: 16px;
}

.memory-panel > strong span {
  color: var(--paper);
  font-size: inherit;
}

.profile-panel {
  padding: 8px 21px;
}

.profile-panel dl {
  margin: 0;
}

.profile-panel dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.profile-panel dl > div:last-child {
  border-bottom: 0;
}

.profile-panel dt {
  color: var(--paper-dim);
  font-size: 9px;
}

.profile-panel dd {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}

.profile-panel dd.good {
  color: var(--mint);
}

.dashboard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: auto;
  padding-top: 25px;
  color: var(--paper-dim);
  font-size: 9px;
}

.dashboard-footer p {
  margin: 0;
}

.dashboard-footer p span {
  margin-right: 8px;
  color: var(--mint);
  font-weight: 900;
  letter-spacing: .13em;
}

.text-button.danger {
  padding-top: 0;
  color: rgba(240,77,63,.75);
}

/* League database */
.database-dialog {
  width: min(1050px, calc(100% - 40px));
  max-height: min(820px, calc(100vh - 40px));
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 2px;
  background: #0c1714;
  box-shadow: 0 35px 100px rgba(0,0,0,.65);
  color: var(--paper);
}

.database-dialog::backdrop {
  background: rgba(2,6,5,.78);
  backdrop-filter: blur(8px);
}

.database-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 30px;
  border-bottom: 1px solid var(--line);
}

.database-head p {
  margin: 0 0 4px;
  color: var(--red);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .2em;
}

.database-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 29px;
}

.close-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper-dim);
  font-family: Arial, sans-serif;
  font-size: 25px;
}

.league-tabs {
  display: flex;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
}

.league-tab {
  padding: 15px 19px;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--paper-dim);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}

.league-tab.is-active {
  border-bottom-color: var(--red);
  color: var(--paper);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  max-height: min(570px, calc(100vh - 235px));
  padding: 1px;
  overflow-y: auto;
  background: rgba(255,255,255,.08);
}

.team-grid.is-mlb {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.team-tile {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 76px;
  padding: 13px 16px;
  background: #101d19;
}

.team-logo {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--team-color), white 25%);
  border-radius: 50%;
  background: var(--team-color);
  box-shadow: inset 0 0 0 4px #101d19;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.team-tile div {
  min-width: 0;
}

.team-tile strong,
.team-tile div > span {
  display: block;
}

.team-tile strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-tile div > span {
  margin-top: 5px;
  overflow: hidden;
  color: var(--paper-dim);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.database-note {
  margin: 0;
  padding: 11px 30px 14px;
  border-top: 1px solid var(--line);
  color: rgba(255,255,255,.35);
  font-size: 8px;
}

.toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 26px;
  padding: 12px 18px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(5,10,8,.94);
  box-shadow: var(--shadow);
  color: var(--paper);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: 220ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rain {
  to { transform: translate(65px, 100px); }
}

.cutscene-screen.is-wake {
  animation: wake-flash 380ms ease both;
}

.cutscene-screen.is-morning {
  background:
    linear-gradient(90deg, rgba(13,22,18,.12), rgba(13,22,18,.7) 65%, #0a110e),
    radial-gradient(circle at 18% 20%, #8f7b56 0, #334238 24%, #0a110e 72%);
}

.cutscene-screen.is-morning .rain,
.cutscene-screen.is-morning .bottle {
  opacity: 0;
}

.cutscene-screen.is-morning .locker {
  filter: sepia(.32);
  opacity: .72;
}

@keyframes wake-flash {
  0% { filter: brightness(1); }
  40% { filter: brightness(2.4); }
  100% { filter: brightness(1); }
}

.face-picker {
  min-width: 0;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.face-picker legend {
  margin-bottom: 8px;
  color: var(--paper-dim);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.face-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.face-option {
  min-width: 0;
  padding: 3px 3px 6px;
  overflow: hidden;
  border: 1px solid rgba(241, 236, 223, .14);
  border-radius: 4px;
  background: rgba(255,255,255,.025);
  color: rgba(241, 236, 223, .6);
  cursor: pointer;
}

.face-option img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 2px;
  filter: saturate(.82) brightness(.84);
}

.face-option span {
  display: block;
  padding-top: 5px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.face-option.is-selected {
  border-color: var(--red);
  background: rgba(240,77,63,.12);
  color: var(--paper);
  box-shadow: 0 0 0 1px rgba(240,77,63,.25);
}

.face-option.is-selected img {
  filter: none;
}

/* Larger type, tighter rhythm: keep the information-rich prologue in one viewport. */
.title-screen {
  gap: clamp(18px, 3vw, 42px);
  padding-block: 52px 54px;
}

.title-lockup h1 {
  font-size: clamp(72px, 10vw, 142px);
}

.title-copy {
  margin-top: 24px;
}

.start-panel {
  padding: 22px;
}

.start-panel label,
.start-panel > p {
  font-size: 11px;
}

.start-panel > p {
  margin-bottom: 10px;
}

.name-field input {
  font-size: 28px;
}

.choice-card p,
.result-body > p,
.quest-copy > p {
  font-size: 14px;
  line-height: 1.65;
}

.choice-card .choice-tag,
.quest-overline {
  font-size: 10px;
}

@media (max-width: 1100px) {
  .quest-grid {
    gap: 55px;
  }

  .result-screen {
    gap: 50px;
  }

  .score-team strong {
    font-size: 78px;
  }

  .dashboard-screen {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
  }

  .dashboard-cards {
    grid-template-columns: 1fr;
  }

  .player-card {
    min-height: 650px;
  }

  .team-grid.is-mlb {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: 1fr auto;
    min-height: 68px;
    padding: 11px 18px;
  }

  .chapter-meter {
    display: none;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .stage {
    padding-top: 68px;
  }

  .screen {
    min-height: calc(100vh - 68px);
  }

  .title-screen {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 42px;
    width: min(100% - 36px, 540px);
    padding: 76px 0 82px;
  }

  .eyebrow {
    top: 28px;
  }

  .title-lockup h1 {
    font-size: clamp(66px, 23vw, 112px);
  }

  .start-panel {
    padding: 24px;
  }

  .phase-badge {
    right: auto;
    bottom: 25px;
    left: 0;
  }

  .phase-badge p {
    display: none;
  }

  .locker {
    left: -8%;
    width: 72vw;
    opacity: .5;
  }

  .scene-caption {
    width: calc(100% - 36px);
    min-height: calc(100vh - 68px);
    margin: 0 auto;
    padding: 52px 0 30px;
  }

  .dialogue-card {
    min-height: 235px;
    padding: 28px 25px 55px;
  }

  .dialogue {
    font-size: 19px;
  }

  .scene-meta {
    margin-left: 0;
    flex-wrap: wrap;
  }

  .quest-screen,
  .choice-screen,
  .result-screen,
  .dashboard-screen {
    width: min(100% - 32px, 560px);
    padding: 38px 0 55px;
  }

  .quest-grid {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .calendar-card {
    width: min(100%, 440px);
    justify-self: center;
    transform: none;
  }

  .calendar-head {
    min-height: 115px;
  }

  .calendar-head strong {
    font-size: 70px;
  }

  .calendar-body {
    padding: 20px 20px 14px;
  }

  .calendar-note {
    padding: 15px 20px 18px;
  }

  .quest-copy {
    padding-left: 0;
  }

  .quest-number {
    top: -45px;
    font-size: 145px;
  }

  .quest-copy h2 {
    font-size: 42px;
  }

  .quest-copy > p:not(.quest-overline) {
    font-size: 13px;
  }

  .choice-heading {
    margin-bottom: 25px;
  }

  .choice-cards {
    grid-template-columns: 1fr;
  }

  .choice-card,
  .performance-card {
    min-height: 300px;
    padding: 27px 25px;
  }

  .result-screen {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .scoreboard {
    min-height: 270px;
  }

  .score-team strong {
    font-size: 76px;
  }

  .result-body h2 {
    font-size: 39px;
  }

  .result-body > p:not(.quest-overline) {
    font-size: 14px;
  }

  .dashboard-screen {
    grid-template-columns: 1fr;
  }

  .player-card {
    display: grid;
    grid-template-columns: 40% 60%;
    min-height: 270px;
  }

  .player-card-top {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
    right: 0;
  }

  .player-silhouette {
    grid-row: 1 / 3;
    height: 100%;
    min-height: 270px;
  }

  .player-silhouette::before {
    width: 165px;
    height: 165px;
  }

  .player-silhouette::after {
    top: 62px;
    width: 82px;
    height: 96px;
  }

  .player-silhouette span {
    font-size: 93px;
  }

  .player-identity {
    align-self: end;
    padding: 78px 20px 22px;
    border: 0;
  }

  .potential-row {
    padding: 16px 20px;
  }

  .dashboard-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-head h2 {
    font-size: 33px;
  }

  .dashboard-cards {
    grid-template-columns: 1fr;
  }

  .stat-panel {
    padding: 21px 18px;
  }

  .dashboard-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .database-dialog {
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
  }

  .database-head {
    padding: 19px 18px;
  }

  .database-head h2 {
    font-size: 23px;
  }

  .league-tabs {
    padding: 0 14px;
  }

  .team-grid,
  .team-grid.is-mlb {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 210px);
  }

  .database-note {
    padding-right: 18px;
    padding-left: 18px;
  }
}

@media (max-width: 820px) {
  .choice-cards.is-position-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .brand small,
  .icon-button-label {
    display: none;
  }

  .title-lockup h1 {
    font-size: clamp(56px, 22vw, 88px);
  }

  .title-copy {
    margin-top: 26px;
    font-size: 18px;
  }

  .start-panel {
    padding: 20px;
  }

  .scene-meta {
    gap: 7px;
  }

  .scene-meta span + span::before {
    margin-right: 8px;
  }

  .calendar-days > * {
    min-height: 35px;
  }

  .memory-flash {
    grid-template-columns: 36px 1fr;
    padding: 14px;
  }

  .memory-flash::before {
    width: 34px;
    height: 34px;
  }

  .result-gains {
    grid-template-columns: 1fr;
  }

  .result-gains > div {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }

  .choice-screen:has(.is-position-grid) {
    justify-content: flex-start;
    width: calc(100% - 18px);
    height: calc(100dvh - 68px);
    min-height: 0;
    padding: 8px 0;
    overflow: hidden;
  }

  .choice-screen:has(.is-position-grid) .choice-heading {
    margin-bottom: 8px;
  }

  .choice-screen:has(.is-position-grid) .choice-heading h2 {
    font-size: 25px;
  }

  .choice-screen:has(.is-position-grid) .choice-heading > p:last-child {
    display: -webkit-box;
    margin-top: 5px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .choice-cards.is-position-grid {
    min-height: 0;
    flex: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .choice-cards.is-position-grid .position-card {
    min-height: 0;
    padding: 9px 10px;
  }

  .position-card .choice-index {
    top: 7px;
    right: 8px;
    font-size: 23px;
  }

  .position-card .choice-tag {
    margin-bottom: 6px;
    font-size: 7px;
  }

  .position-card > strong {
    font-size: 17px;
  }

  .position-card > p {
    display: -webkit-box;
    margin: 4px 0;
    overflow: hidden;
    font-size: 9px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .position-card .forecast {
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .position-card .choice-cta {
    display: none;
  }

  .player-card {
    grid-template-columns: 36% 64%;
  }

  .player-identity h2 {
    font-size: 26px;
  }

  .memory-panel {
    grid-template-columns: 42px 1fr;
    padding: 18px;
  }

  .memory-icon {
    width: 40px;
    height: 40px;
  }
}

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

@media (max-width: 590px) {
  html,
  body,
  .game-shell {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .stage {
    height: 100dvh;
    min-height: 0;
    padding-top: 68px;
    overflow: hidden;
  }

  .screen {
    height: calc(100dvh - 68px);
    min-height: 0;
    overflow: hidden;
  }

  .title-screen {
    width: calc(100% - 18px);
    grid-template-columns: 1fr;
    align-content: center;
    gap: 9px;
    padding: 8px 0;
  }

  .title-screen .eyebrow,
  .phase-badge {
    display: none;
  }

  .title-lockup {
    text-align: center;
  }

  .title-lockup h1 {
    margin-block: 0;
    font-size: clamp(50px, 18vw, 76px);
  }

  .title-kicker {
    font-size: 9px;
  }

  .title-copy {
    margin-top: 3px;
    font-size: 13px;
    line-height: 1.35;
  }

  .start-panel {
    width: 100%;
    padding: 10px 12px;
  }

  .start-panel > label,
  .face-picker legend {
    margin-bottom: 4px;
    font-size: 9px;
  }

  .name-field input {
    height: 39px;
    font-size: 16px;
  }

  .start-panel > p {
    margin-block: 3px 6px;
  }

  .face-picker {
    margin: 0 0 7px;
  }

  .face-options {
    gap: 5px;
  }

  .face-option {
    min-height: 68px;
    padding: 3px;
  }

  .face-option img {
    height: 46px;
  }

  .face-option span {
    font-size: 8px;
  }

  .start-panel .primary-button {
    min-height: 40px;
  }

  .scene-caption {
    width: calc(100% - 18px);
    height: calc(100dvh - 68px);
    min-height: 0;
    padding: 12px 0 8px;
  }

  .scene-meta {
    font-size: 9px;
  }

  .dialogue-card {
    min-height: 0;
    margin-top: auto;
    padding: 15px 14px 48px;
  }

  .dialogue {
    font-size: 16px;
    line-height: 1.55;
  }

  .quest-screen,
  .choice-screen,
  .result-screen,
  .dashboard-screen {
    width: calc(100% - 18px);
    padding: 7px 0;
  }

  .quest-grid {
    height: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: 34% minmax(0, 66%);
    gap: 6px;
  }

  .calendar-card {
    width: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .calendar-head {
    min-height: 78px;
  }

  .calendar-head strong {
    font-size: 52px;
  }

  .calendar-body {
    display: none;
  }

  .calendar-note {
    padding: 8px 12px;
  }

  .quest-copy {
    display: flex;
    min-height: 0;
    flex-direction: column;
    justify-content: center;
    padding: 8px 3px;
  }

  .quest-number {
    display: none;
  }

  .quest-copy h2 {
    margin-block: 5px;
    font-size: 28px;
  }

  .quest-copy > p:not(.quest-overline) {
    margin-block: 4px;
    font-size: 11px;
    line-height: 1.45;
  }

  .memory-flash {
    margin-block: 6px;
    padding: 9px;
  }

  .memory-flash p {
    font-size: 10px;
  }

  .quest-copy .primary-button {
    min-height: 40px;
  }

  .choice-screen {
    justify-content: flex-start;
  }

  .choice-heading {
    flex: 0 0 auto;
    margin-bottom: 7px;
  }

  .choice-heading h2 {
    font-size: 25px;
  }

  .choice-heading > p:last-child {
    display: -webkit-box;
    margin-top: 4px;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .choice-cards:not(.is-position-grid) {
    min-height: 0;
    flex: 1;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .choice-cards:not(.is-position-grid) .choice-card {
    min-height: 0;
    padding: 13px 15px;
  }

  .choice-cards:not(.is-position-grid) .choice-tag {
    margin-bottom: 8px;
  }

  .choice-cards:not(.is-position-grid) .choice-card > strong {
    font-size: 21px;
  }

  .choice-cards:not(.is-position-grid) .choice-card > p {
    margin-block: 5px;
    font-size: 10px;
  }

  .choice-cards:not(.is-position-grid) .choice-icon,
  .choice-cards:not(.is-position-grid) .memory-clue {
    display: none;
  }

  .choice-back {
    flex: 0 0 30px;
  }

  .result-screen {
    grid-template-columns: 1fr;
    grid-template-rows: 34% minmax(0, 66%);
    gap: 7px;
  }

  .scoreboard {
    min-height: 0;
    height: 100%;
  }

  .score-team strong {
    font-size: 55px;
  }

  .result-body {
    min-height: 0;
  }

  .result-body h2 {
    margin-block: 5px;
    font-size: 27px;
  }

  .result-body > p:not(.quest-overline) {
    display: -webkit-box;
    margin-block: 5px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .result-gains {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    margin-block: 7px;
  }

  .result-gains > div {
    padding: 7px;
  }

  .dashboard-screen {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 25% minmax(0, 75%);
    gap: 5px;
  }

  .dashboard-screen .player-card {
    min-height: 0;
    height: 100%;
    grid-template-columns: 30% 70%;
  }

  .dashboard-screen .player-silhouette {
    min-height: 0;
  }

  .dashboard-screen .player-identity {
    padding: 42px 12px 8px;
  }

  .dashboard-screen .potential-row {
    padding: 7px 12px;
  }

  .dashboard-main {
    display: flex;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
  }

  .dashboard-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5px;
  }

  .dashboard-head h2 {
    font-size: 21px;
  }

  .dashboard-head p:last-child,
  .dashboard-head .secondary-button,
  .dashboard-footer > p,
  .memory-panel {
    display: none;
  }

  .dashboard-cards {
    min-height: 0;
    flex: 1;
    grid-template-columns: 1fr;
    overflow: hidden;
  }

  .stat-panel {
    min-height: 0;
    padding: 8px 10px;
    overflow: hidden;
  }

  .stat-list {
    gap: 4px;
  }

  .profile-panel {
    display: none;
  }

  .dashboard-footer {
    flex: 0 0 auto;
    margin-top: 5px;
  }

  .dashboard-actions {
    display: grid;
    width: 100%;
    grid-template-columns: .7fr 1.3fr;
    gap: 5px;
  }

  .dashboard-actions .career-start-button {
    width: 100%;
    min-height: 40px;
  }
}
