@font-face {
  font-family: "Manrope";
  src: url("assets/manrope-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --navy-950: #0b294d;
  --navy-900: #103460;
  --navy-800: #174676;
  --blue-500: #3d78aa;
  --cream-50: #fbfcfb;
  --cream-100: #f7f3ea;
  --cream-200: #eee7d9;
  --red-700: #b4372e;
  --red-600: #c84b42;
  --amber-500: #c2a25f;
  --green-600: #28786f;
  --ink: #0e1a1a;
  --muted: #647272;
  --border: #d9e4df;
  --surface: #ffffff;
  --shadow: 0 28px 70px rgba(16, 52, 96, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--cream-100);
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.game-shell {
  width: 100vw;
  height: 100vh;
  padding: 14px;
  display: grid;
  grid-template-rows: 54px minmax(0, 1fr);
  gap: 10px;
  background:
    radial-gradient(760px 380px at 4% -18%, rgba(16, 52, 96, 0.1), transparent 68%),
    radial-gradient(620px 360px at 98% -12%, rgba(180, 55, 46, 0.1), transparent 64%),
    linear-gradient(180deg, #ffffff 0%, #f7f3ea 100%);
}

.brand-bar {
  width: min(1500px, calc((100vh - 78px) * 16 / 9), calc(100vw - 28px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-lockup,
.status-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup img {
  width: 66px;
  height: 52px;
  object-fit: contain;
  object-position: left center;
}

.edition,
.status-pill,
.icon-button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--navy-900);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.status-pill.is-connected {
  border-color: rgba(63, 141, 104, 0.35);
  color: #286f4d;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: #fff;
  outline: 3px solid rgba(78, 159, 209, 0.28);
}

.game-frame {
  position: relative;
  width: min(1500px, calc((100vh - 78px) * 16 / 9), calc(100vw - 28px));
  aspect-ratio: 16 / 9;
  margin: auto;
  overflow: hidden;
  border-radius: 13px;
  background: var(--cream-100);
  box-shadow: var(--shadow);
  border: 1px solid rgba(16, 52, 96, 0.16);
  isolation: isolate;
}

body.is-immersive .game-shell {
  padding: 0;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  background: var(--navy-950);
}

body.is-immersive .brand-bar {
  display: none;
}

body.is-immersive .game-frame,
.game-frame:fullscreen {
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  max-width: none;
  margin: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.game-frame:fullscreen {
  background: var(--navy-950);
}

#game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

body.is-playing #game-canvas {
  cursor: none;
}

.screen,
.minigame-screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 20;
  padding: clamp(24px, 5vw, 70px);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0 52%, rgba(255, 255, 255, 0.82) 67%, rgba(255, 255, 255, 0.08) 100%);
}

.screen-content {
  width: min(680px, 55vw);
  justify-self: start;
  position: relative;
}

.attract-content {
  margin-left: 2vw;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red-700);
  font-weight: 900;
  letter-spacing: 0.2em;
  font-size: clamp(11px, 1vw, 15px);
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--navy-950);
  font-weight: 800;
  letter-spacing: -0.035em;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(54px, 6.2vw, 96px);
  line-height: 0.95;
}

h1 em {
  color: var(--red-700);
  font-style: normal;
  font-weight: 800;
}

h2 {
  font-size: clamp(42px, 4.5vw, 72px);
  line-height: 0.95;
  margin-bottom: 16px;
}

.lead {
  font-size: clamp(17px, 1.6vw, 25px);
  line-height: 1.45;
  color: var(--navy-800);
  margin-bottom: 30px;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 12px;
  min-height: 62px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  color: white;
  background: var(--navy-900);
  box-shadow: 0 12px 28px rgba(16, 52, 96, 0.22);
}

.primary-button:hover,
.primary-button:focus-visible {
  transform: translateY(-2px);
  background: var(--navy-950);
  box-shadow: 0 16px 34px rgba(16, 52, 96, 0.3);
  outline: 4px solid rgba(16, 52, 96, 0.16);
}

.primary-button.compact {
  min-height: 54px;
  padding: 0 30px;
}

.secondary-button {
  color: var(--navy-900);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(18, 63, 115, 0.22);
}

.secondary-button:hover,
.secondary-button:focus-visible {
  background: white;
  outline: 4px solid rgba(78, 159, 209, 0.22);
}

.button-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  opacity: 0.82;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button-hint b {
  min-width: 28px;
  height: 26px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: #fff;
  color: var(--navy-900);
}

.control-glyph {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--navy-900);
}

.daily-record {
  margin-top: 28px;
  display: flex;
  gap: 16px;
  align-items: baseline;
  color: var(--navy-800);
}

.daily-record span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.daily-record strong {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 24px;
}

.attract-aside {
  position: absolute;
  right: 3vw;
  bottom: 4vw;
  text-align: right;
  color: var(--navy-900);
  font-weight: 900;
  font-size: clamp(18px, 2vw, 32px);
  line-height: 0.72;
  letter-spacing: 0.05em;
  text-shadow: none;
}

.sun-orbit {
  position: absolute;
  width: 52vw;
  height: 52vw;
  max-width: 760px;
  max-height: 760px;
  right: -13vw;
  top: -28vw;
  border: 1px solid rgba(16, 52, 96, 0.12);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180, 55, 46, 0.06) 0 22%, transparent 23% 58%, rgba(16, 52, 96, 0.05) 59% 60%, transparent 61%);
  animation: breathe 5s ease-in-out infinite;
}

@keyframes breathe {
  50% { transform: scale(1.04); opacity: 0.88; }
}

.screen-subtitle {
  color: var(--navy-800);
  font-size: 18px;
}

.controller-readiness {
  margin: 8px 0 14px;
  color: var(--navy-800);
  font-size: 13px;
  font-weight: 800;
}

.controller-readiness.is-ready {
  color: var(--green-600);
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.mode-card {
  min-height: 82px;
  padding: 12px 16px;
  border: 2px solid rgba(16, 52, 96, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--navy-900);
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  text-align: left;
}

.mode-card .mode-number {
  grid-row: 1 / 3;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--cream-200);
  color: var(--navy-900);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 23px;
  font-weight: 900;
}

.mode-card strong { font-size: 17px; }
.mode-card > span:last-child { color: var(--muted); font-size: 12px; }

.mode-card.is-selected {
  border-color: var(--red-700);
  box-shadow: 0 10px 24px rgba(185, 50, 43, 0.14);
}

.mode-card.is-selected .mode-number {
  background: var(--red-700);
  color: white;
}

.select-content,
.briefing-content,
.result-content {
  width: min(900px, 82vw);
  justify-self: center;
  text-align: center;
}

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

.avatar-card {
  min-height: 150px;
  padding: 12px;
  border: 2px solid transparent;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--navy-900);
  display: grid;
  justify-items: center;
  gap: 5px;
  box-shadow: 0 8px 24px rgba(7, 31, 60, 0.08);
}

.avatar-card strong {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 26px;
}

.avatar-card.is-selected {
  border-color: var(--red-700);
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(185, 50, 43, 0.16);
}

.avatar-portrait {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--cream-200);
  overflow: hidden;
}

.coop-lineup {
  margin: 18px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.coop-player {
  min-height: 116px;
  padding: 18px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 28px rgba(7, 31, 60, 0.08);
  display: grid;
  place-items: center;
  gap: 4px;
}

.coop-player > span:last-child { color: var(--muted); font-size: 12px; }
.coop-plus { color: var(--red-700); font-size: 30px; font-weight: 900; }
.player-badge { padding: 5px 10px; border-radius: 999px; color: white; font-size: 11px; font-weight: 900; }
.player-badge.p1 { background: var(--green-600); }
.player-badge.p2 { background: var(--navy-800); }

.avatar-portrait::before {
  content: "";
  position: absolute;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  left: 24px;
  top: 12px;
  background: #b97454;
  box-shadow: 0 -8px 0 #342820;
}

.avatar-portrait::after {
  content: "";
  position: absolute;
  width: 58px;
  height: 47px;
  border-radius: 30px 30px 8px 8px;
  left: 10px;
  top: 46px;
  background: var(--navy-800);
}

.avatar-teo::before {
  background: #8f563f;
  box-shadow: 0 -7px 0 #171b22;
}

.avatar-teo::after {
  background: var(--red-700);
}

.controls-strip {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  color: var(--navy-800);
  font-size: 13px;
}

.controls-strip span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.briefing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 18px;
  text-align: left;
}

.briefing-grid article {
  padding: 20px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 28px rgba(7, 31, 60, 0.08);
}

.briefing-grid article > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red-700);
  color: white;
  font-weight: 900;
  margin-bottom: 12px;
}

.briefing-grid strong {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--navy-900);
  font-size: 22px;
}

.briefing-grid p {
  margin: 8px 0 0;
  line-height: 1.45;
}

.briefing-tip {
  max-width: 620px;
  margin: 0 auto 12px;
  padding: 11px 15px;
  border: 1px solid rgba(16, 52, 96, 0.12);
  border-left: 4px solid var(--red-700);
  border-radius: 4px 12px 12px 4px;
  color: var(--navy-800);
  background: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.4;
}

.disclaimer {
  color: rgba(16, 37, 61, 0.64);
  font-size: 12px;
  margin: 18px 0;
}

.hud {
  position: absolute;
  inset: 18px 18px auto 18px;
  display: flex;
  gap: 7px;
  align-items: flex-start;
  z-index: 10;
  pointer-events: none;
}

.hud-card {
  min-height: 58px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: white;
  background: rgba(7, 31, 60, 0.92);
  box-shadow: 0 10px 26px rgba(7, 31, 60, 0.18);
  backdrop-filter: blur(10px);
}

.hud-card strong {
  display: block;
  font-size: 23px;
}

.hud-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 900;
  opacity: 0.72;
}

.clock-card {
  min-width: 76px;
  text-align: center;
}

.score-card {
  min-width: 104px;
}

.wellbeing-card {
  width: min(260px, 25vw);
}

.hud-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.hud-row strong {
  font-size: 16px;
}

.wellbeing-track {
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
  margin-top: 6px;
}

.wellbeing-fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #73d6a6, #a9e07a);
  transition: width 240ms ease, background 240ms ease;
}

.combo-chip {
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--amber-500);
  color: var(--navy-950);
  font-weight: 900;
  animation: pop 300ms ease;
}

.director-chip {
  min-width: 132px;
  min-height: 72px;
  padding: 12px 16px;
  display: grid;
  align-content: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  color: var(--navy-950);
  background: rgba(255, 250, 240, 0.94);
  box-shadow: 0 10px 26px rgba(7, 31, 60, 0.16);
  backdrop-filter: blur(10px);
  transition: border-color 240ms ease, background 240ms ease, transform 240ms ease;
}

.director-chip span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.director-chip strong {
  margin-top: 4px;
  color: var(--green-600);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.director-chip[data-level="1"] {
  border-color: rgba(61, 120, 170, 0.34);
  background: rgba(240, 248, 252, 0.96);
}

.director-chip[data-level="1"] strong {
  color: var(--blue-500);
}

.director-chip[data-level="2"] {
  border-color: rgba(194, 162, 95, 0.48);
  background: rgba(255, 248, 229, 0.97);
  transform: translateY(-1px);
}

.director-chip[data-level="2"] strong {
  color: #8a641c;
}

@keyframes pop {
  50% { transform: scale(1.08); }
}

.task-panel {
  position: absolute;
  z-index: 10;
  right: 18px;
  top: 18px;
  width: min(275px, 24vw);
  padding: 14px;
  border: 1px solid rgba(16, 52, 96, 0.14);
  border-radius: 13px;
  background: rgba(255, 250, 240, 0.94);
  box-shadow: 0 12px 34px rgba(7, 31, 60, 0.18);
  pointer-events: none;
}

.inventory-panel {
  position: absolute;
  z-index: 10;
  right: 18px;
  bottom: 18px;
  width: min(275px, 24vw);
  padding: 14px;
  border: 1px solid rgba(16, 52, 96, 0.14);
  border-radius: 13px;
  color: var(--navy-900);
  background: rgba(255, 250, 240, 0.95);
  box-shadow: 0 12px 34px rgba(7, 31, 60, 0.18);
  pointer-events: none;
}

.inventory-panel > p {
  margin: 9px 4px 1px;
  color: rgba(7, 31, 60, 0.65);
  font-size: 10px;
  line-height: 1.35;
}

.coach-panel {
  position: absolute;
  z-index: 10;
  right: 18px;
  top: 210px;
  width: min(275px, 24vw);
  border: 1px solid rgba(16, 52, 96, 0.14);
  border-left: 5px solid var(--red-700);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, 0.96);
  padding: 16px 16px 14px;
  color: var(--navy-900);
  box-shadow: 0 16px 34px rgba(16, 52, 96, 0.13);
  pointer-events: none;
}

.coach-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--red-700);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.coach-panel strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
}

.coach-panel p {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.coach-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.coach-progress i {
  height: 4px;
  border-radius: 99px;
  background: var(--border);
}

.coach-progress i.is-active {
  background: var(--red-700);
}

.event-banner {
  position: absolute;
  z-index: 24;
  left: 50%;
  top: 118px;
  width: min(520px, 50vw);
  min-height: 82px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 2px solid rgba(180, 55, 46, 0.25);
  border-radius: 18px;
  color: var(--navy-950);
  background: rgba(255, 250, 240, 0.97);
  box-shadow: 0 18px 52px rgba(7, 31, 60, 0.24);
  pointer-events: none;
  animation: event-arrives 0.36s cubic-bezier(.2,.9,.25,1.15) both;
}

@keyframes event-arrives {
  from { opacity: 0; transform: translate(-50%, -18px) scale(.94); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.event-banner-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: white;
  background: var(--red-700);
  font-size: 26px;
  font-weight: 900;
}

.event-banner small {
  display: block;
  margin-bottom: 2px;
  color: var(--red-700);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
}

.event-banner strong { display: block; font-size: 17px; }
.event-banner p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.event-banner > b { color: var(--red-700); font-size: 11px; white-space: nowrap; }

.event-banner.is-shift-beat {
  border-color: rgba(16, 52, 96, 0.22);
  background: rgba(249, 252, 251, 0.97);
  box-shadow: 0 18px 52px rgba(7, 31, 60, 0.2);
}

.event-banner.is-shift-beat .event-banner-icon {
  background: var(--navy-800);
}

.event-banner.is-shift-beat small,
.event-banner.is-shift-beat > b {
  color: var(--navy-800);
}

.countdown-flash {
  position: absolute;
  z-index: 23;
  left: 50%;
  top: 50%;
  width: 112px;
  height: 112px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 5px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  color: white;
  background: rgba(180, 55, 46, 0.9);
  box-shadow: 0 18px 54px rgba(180, 55, 46, 0.38);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 54px;
  font-weight: 900;
  pointer-events: none;
  animation: countdown-pop .68s ease-out both;
}

.countdown-flash.is-start-cue {
  width: auto;
  min-width: 270px;
  height: 88px;
  padding: 0 32px;
  border-width: 4px;
  border-radius: 999px;
  background: rgba(16, 52, 96, 0.94);
  box-shadow: 0 18px 58px rgba(16, 52, 96, 0.36);
  font-size: 31px;
  letter-spacing: .06em;
}

@keyframes countdown-pop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.72); }
  35% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

.inventory-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.inventory-slots.is-coop {
  grid-template-columns: 1fr;
  gap: 6px;
}

.inventory-player + .inventory-player { margin-top: 6px; }

.inventory-slots.is-coop .inventory-player {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.inventory-slots.is-coop .inventory-player > .inventory-slots {
  gap: 6px;
}

.inventory-slots.is-coop .inventory-player-head {
  margin: 0;
}

.inventory-slots.is-coop .inventory-slot {
  min-height: 36px;
  padding: 5px 6px;
  border-radius: 9px;
  font-size: 10px;
}

.inventory-slots.is-coop .inventory-slot b {
  font-size: 15px;
}

.inventory-player-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 2px 5px;
  color: var(--navy-800);
  font-size: 11px;
  font-weight: 900;
}

.task-owner {
  align-self: center;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--navy-800);
  color: white;
  font-size: 10px;
  font-weight: 900;
}

.inventory-slot {
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 8px;
  border: 2px solid color-mix(in srgb, var(--slot-color, var(--blue-500)) 55%, white);
  border-radius: 13px;
  background: color-mix(in srgb, var(--slot-color, var(--blue-500)) 13%, white);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.inventory-slot b {
  font-size: 20px;
  line-height: 1;
}

.inventory-slot.is-empty {
  border-style: dashed;
  border-color: rgba(7, 31, 60, 0.16);
  color: rgba(7, 31, 60, 0.38);
  background: rgba(7, 31, 60, 0.035);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  padding: 2px 4px 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 11px;
  font-weight: 900;
  color: var(--navy-800);
}

.task-list {
  display: grid;
  gap: 7px;
}

.task-item {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 10px 1fr auto auto;
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 12px;
  background: white;
  font-size: 12px;
  border: 1px solid transparent;
  box-shadow: 0 5px 14px rgba(7, 31, 60, 0.05);
}

.task-item::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  width: var(--task-progress, 100%);
  height: 4px;
  border-radius: 0 99px 99px 0;
  background: var(--task-color, var(--blue-500));
  transition: width 280ms linear, background 180ms ease;
}

.task-item .task-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--task-color, var(--blue-500));
}

.task-item.is-priority .task-dot {
  background: var(--red-600);
  animation: blink 850ms infinite;
}

.task-item b {
  display: block;
  color: var(--navy-900);
}

.task-item b + span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.task-item time {
  font-weight: 900;
  color: var(--red-700);
}

.task-item.is-urgent {
  border-color: rgba(180, 55, 46, 0.3);
  background: #fffaf7;
  box-shadow: 0 8px 20px rgba(180, 55, 46, 0.12);
}

.task-item.is-urgent time {
  min-width: 38px;
  padding: 4px 6px;
  border-radius: 999px;
  color: white;
  background: var(--red-700);
  text-align: center;
  animation: urgency-pulse 900ms ease-in-out infinite alternate;
}

@keyframes urgency-pulse {
  to { transform: scale(1.06); background: var(--red-600); }
}

@keyframes blink {
  50% { opacity: 0.3; }
}

.interaction-prompt {
  position: absolute;
  z-index: 11;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 10px;
  border-radius: 999px;
  color: white;
  background: rgba(7, 31, 60, 0.94);
  box-shadow: 0 12px 30px rgba(7, 31, 60, 0.25);
  font-weight: 900;
}

.minigame-screen {
  z-index: 30;
  inset: 16px 16px 16px auto;
  width: min(360px, 29vw);
  padding: 0;
  place-items: stretch;
  background: transparent;
  pointer-events: none;
}

.gamepad-debug {
  position: absolute;
  z-index: 35;
  right: 18px;
  top: 18px;
  width: min(360px, 29vw);
  padding: 16px;
  border: 1px solid rgba(16, 52, 96, .16);
  border-radius: 14px;
  color: var(--navy-900);
  background: rgba(251, 252, 251, .97);
  box-shadow: 0 18px 48px rgba(7, 31, 60, .22);
}

.gamepad-debug > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--red-700);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .11em;
}

.gamepad-debug article {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  padding: 10px;
  border-radius: 10px;
  background: white;
  box-shadow: 0 5px 14px rgba(7, 31, 60, .07);
}

.gamepad-debug article span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gamepad-debug code {
  color: var(--navy-800);
  font-size: 9px;
}

.gamepad-debug p,
.gamepad-debug small {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.gamepad-debug small {
  display: block;
  margin-top: 10px;
}

.game-frame:has(.gamepad-debug) .task-panel,
.game-frame:has(.gamepad-debug) .inventory-panel,
.game-frame:has(.gamepad-debug) .coach-panel {
  display: none;
}

.minigame-card {
  width: 100%;
  min-height: 0;
  padding: 20px;
  border: 1px solid rgba(16, 52, 96, 0.16);
  border-radius: 16px;
  background: rgba(251, 252, 251, 0.97);
  box-shadow: 0 22px 54px rgba(7, 31, 60, 0.28);
  text-align: center;
  pointer-events: auto;
  animation: minigame-panel-in 180ms cubic-bezier(.2,.8,.2,1) both;
}

.minigame-card h2 {
  font-size: clamp(25px, 2.35vw, 35px);
  line-height: 1;
  margin: 16px 0 10px;
}

.minigame-card.is-hit {
  animation: minigame-hit 180ms ease-out;
}

.minigame-card.is-miss {
  animation: minigame-miss 180ms ease-out;
}

@keyframes minigame-hit {
  50% { border-color: rgba(40, 120, 111, .72); box-shadow: 0 22px 58px rgba(40, 120, 111, .24); }
}

@keyframes minigame-miss {
  35% { transform: translateX(-5px); border-color: rgba(180, 55, 46, .72); }
  70% { transform: translateX(4px); }
}

.minigame-card > p {
  margin-bottom: 0;
  color: var(--navy-800);
  font-size: 12px;
  line-height: 1.45;
}

@keyframes minigame-panel-in {
  from { opacity: 0; transform: translateX(18px) scale(.98); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.game-frame:has(.minigame-screen:not(.is-hidden)) .task-panel,
.game-frame:has(.minigame-screen:not(.is-hidden)) .inventory-panel,
.game-frame:has(.minigame-screen:not(.is-hidden)) .coach-panel {
  opacity: 0;
  transform: translateX(18px);
  pointer-events: none;
}

.task-panel,
.inventory-panel,
.coach-panel {
  transition: opacity 160ms ease, transform 160ms ease;
}

.minigame-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--red-700);
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 900;
}

.minigame-topline button {
  border: 0;
  background: transparent;
  color: var(--navy-800);
  font-weight: 800;
}

#minigame-content {
  min-height: 122px;
  display: grid;
  place-items: center;
  margin-top: 16px;
}

#minigame-content > div {
  width: 100%;
}

.pulse-meter {
  position: relative;
  width: 100%;
  height: 34px;
  border-radius: 99px;
  background: #dbe5e6;
  overflow: hidden;
  border: 5px solid white;
  box-shadow: 0 0 0 2px rgba(18, 63, 115, 0.15);
}

.pulse-target {
  position: absolute;
  left: 42%;
  width: 16%;
  inset-block: 0;
  background: #71c796;
}

.pulse-marker {
  position: absolute;
  width: 8px;
  inset-block: -4px;
  left: 0;
  border-radius: 9px;
  background: var(--red-700);
  box-shadow: 0 0 12px rgba(185, 50, 43, 0.55);
}

.pulse-hearts {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  color: #c5c9c7;
  font-size: 30px;
}

.pulse-hearts span.is-hit {
  color: var(--red-600);
}

.vitals-kit {
  width: 100%;
  display: grid;
  grid-template-columns: 68px minmax(100px, 1fr) 62px;
  align-items: center;
  gap: 10px;
}

.pressure-cuff {
  height: 62px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 5px solid white;
  border-radius: 14px;
  color: white;
  background: var(--navy-800);
  box-shadow: 0 0 0 2px rgba(16, 52, 96, 0.18), 0 12px 24px rgba(16, 52, 96, 0.14);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
}

.pressure-cuff i {
  position: absolute;
  width: 150%;
  height: 16px;
  border-block: 2px solid rgba(255,255,255,.35);
  transform: rotate(-12deg);
}

.vitals-gauge {
  position: relative;
  height: 42px;
  border: 5px solid white;
  border-radius: 999px;
  background: linear-gradient(90deg, #d9e5e8, #edf2ef);
  box-shadow: 0 0 0 2px rgba(16, 52, 96, 0.14) inset, 0 8px 20px rgba(16, 52, 96, 0.1);
}

.vitals-target {
  position: absolute;
  inset-block: 0;
  border-radius: 8px;
  background: #71c796;
  box-shadow: 0 0 18px rgba(40, 120, 111, 0.3);
}

.vitals-needle {
  position: absolute;
  z-index: 2;
  top: -12px;
  width: 8px;
  height: 56px;
  margin-left: -4px;
  border: 2px solid white;
  border-radius: 6px;
  background: var(--red-700);
  box-shadow: 0 5px 15px rgba(180, 55, 46, 0.32);
  transition: left 70ms linear;
}

.vitals-pump {
  width: 60px;
  height: 60px;
  display: grid;
  place-content: center;
  border: 4px solid white;
  border-radius: 50%;
  color: white;
  background: var(--red-700);
  box-shadow: 0 0 0 2px rgba(180, 55, 46, 0.18), 0 12px 24px rgba(180, 55, 46, 0.2);
}

.vitals-pump span {
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
}

.vitals-pump small {
  margin-top: 4px;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .1em;
}

.balance-game {
  width: 100%;
  height: 160px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(180deg, #eef6f5, #e0ebe8);
  box-shadow: inset 0 0 0 2px rgba(16, 52, 96, 0.1);
}

.balance-safe-zone {
  position: absolute;
  inset-block: 16px 42px;
  left: 38%;
  width: 24%;
  border-inline: 2px dashed rgba(40, 120, 111, 0.46);
  background: rgba(113, 199, 150, 0.13);
}

.balance-tray {
  width: 150px;
  height: 18px;
  position: relative;
  margin-top: 28px;
  border-radius: 50%;
  background: #b99268;
  box-shadow: 0 9px 0 #846342, 0 16px 24px rgba(16,52,96,.18);
  transition: transform 45ms linear;
}

.water-glass {
  width: 46px;
  height: 72px;
  position: absolute;
  left: 52px;
  bottom: 10px;
  overflow: hidden;
  border: 4px solid rgba(61,120,170,.68);
  border-top-width: 2px;
  border-radius: 5px 5px 14px 14px;
  background: rgba(255,255,255,.72);
}

.water-glass i {
  position: absolute;
  inset: 28px 3px 3px;
  border-radius: 3px 3px 9px 9px;
  background: linear-gradient(180deg, #8fd5e6, #4e9dc5);
}

.balance-progress {
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 23px;
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(16,52,96,.12);
}

.balance-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green-600);
}

.balance-game > small {
  position: absolute;
  right: 18px;
  bottom: 8px;
  color: var(--navy-800);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
}

.sequence-game {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.sequence-step {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(16, 52, 96, 0.14);
  border-radius: 14px;
  color: rgba(16, 52, 96, 0.42);
  background: white;
  box-shadow: 0 10px 22px rgba(16, 52, 96, 0.09);
  font-size: 28px;
  font-weight: 900;
  transition: transform 140ms ease, color 140ms ease, background 140ms ease;
}

.sequence-step.is-current {
  border-color: var(--red-700);
  color: var(--red-700);
  transform: translateY(-6px) scale(1.06);
  box-shadow: 0 15px 28px rgba(180, 55, 46, 0.18);
}

.sequence-step.is-done {
  border-color: var(--green-600);
  color: white;
  background: var(--green-600);
}

.tray-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  width: 100%;
}

.tray-option {
  min-height: 66px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: white;
  color: var(--navy-900);
}

.tray-option b,
.tray-option span {
  display: inline;
}

.tray-option b {
  display: block;
  font-size: 15px;
  margin-bottom: 3px;
}

.tray-option span + span::before { content: " · "; }

.tray-option.is-selected {
  border-color: var(--red-700);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(185, 50, 43, 0.14);
}

.meal-game {
  width: 100%;
  display: grid;
  gap: 22px;
}

.meal-meter {
  height: 32px;
  position: relative;
  overflow: hidden;
  border: 4px solid white;
  border-radius: 999px;
  background: #dfe8e6;
  box-shadow: 0 0 0 2px rgba(16, 52, 96, .12);
}

.meal-target {
  position: absolute;
  inset-block: 0;
  left: 38%;
  width: 24%;
  background: rgba(113, 199, 150, .85);
}

.meal-meter i {
  position: absolute;
  inset-block: -4px;
  width: 12px;
  border-radius: 6px;
  background: var(--red-700);
  box-shadow: 0 0 12px rgba(180, 55, 46, .5);
}

.meal-plate {
  width: 138px;
  height: 68px;
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  place-items: center;
  padding: 10px;
  border: 5px solid white;
  border-radius: 50%;
  background: #e7ece9;
  box-shadow: 0 0 0 2px rgba(16, 52, 96, .12), 0 10px 22px rgba(16, 52, 96, .12);
}

.meal-plate span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(16, 52, 96, .08);
  transform: scale(.72);
  transition: transform 150ms ease, background 150ms ease;
}

.meal-plate span.is-served {
  background: var(--amber-500);
  transform: scale(1);
}

.tuck-game {
  width: 100%;
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  align-items: center;
  gap: 9px;
}

.tuck-side {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(16, 52, 96, .12);
  border-radius: 14px;
  color: rgba(16, 52, 96, .38);
  background: white;
  font-size: 25px;
  font-weight: 900;
}

.tuck-side.is-next {
  border-color: var(--red-700);
  color: var(--red-700);
  box-shadow: 0 8px 18px rgba(180, 55, 46, .16);
  animation: tuck-prompt 650ms ease-in-out infinite alternate;
}

@keyframes tuck-prompt { to { transform: scale(1.08); } }

.tuck-bed {
  height: 98px;
  padding: 10px;
  border-radius: 15px 15px 23px 23px;
  background: #c89c6b;
  box-shadow: 0 10px 22px rgba(16, 52, 96, .14);
}

.tuck-bed i {
  --tuck-progress: 0%;
  display: block;
  height: 100%;
  border-radius: 10px 10px 18px 18px;
  background: linear-gradient(90deg, var(--green-600) var(--tuck-progress), #dce8e4 var(--tuck-progress));
  transition: background 160ms ease;
}

.bell-game {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.bell-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 8px solid #f4d7d2;
  border-radius: 50%;
  color: white;
  background: var(--red-700);
  box-shadow: 0 0 0 2px rgba(180, 55, 46, .18), 0 12px 28px rgba(180, 55, 46, .22);
  font-size: 24px;
  animation: bell-ring 700ms ease-in-out infinite alternate;
}

@keyframes bell-ring { to { transform: scale(1.06); box-shadow: 0 0 0 10px rgba(180, 55, 46, .08); } }

.bell-steps {
  display: flex;
  gap: 9px;
}

.bell-steps i {
  width: 42px;
  height: 9px;
  border-radius: 99px;
  background: #dce3e3;
}

.bell-steps i.is-done { background: var(--green-600); }

.priority-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.priority-step {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(16, 52, 96, .12);
  border-radius: 14px;
  color: rgba(16, 52, 96, .38);
  background: white;
  font-size: 23px;
  font-weight: 900;
}

.priority-step.is-current {
  border-color: var(--red-700);
  color: var(--red-700);
  transform: translateY(-5px);
  box-shadow: 0 10px 22px rgba(180, 55, 46, .16);
}

.priority-step.is-done {
  border-color: var(--green-600);
  color: white;
  background: var(--green-600);
}

.minigame-feedback {
  min-height: 28px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 900;
  color: var(--red-700);
}

.pause-screen {
  background: rgba(7, 31, 60, 0.82);
  color: white;
  backdrop-filter: blur(7px);
}

.focus-screen {
  z-index: 40;
  color: white;
  background: rgba(7, 31, 60, 0.88);
  backdrop-filter: blur(9px);
}

.small-content {
  width: auto;
  justify-self: center;
  text-align: center;
}

.small-content h2,
.small-content p {
  color: white;
}

.result-screen {
  padding: 10px 48px;
  background:
    radial-gradient(520px 260px at 50% 18%, rgba(194, 162, 95, 0.13), transparent 70%),
    linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(247, 243, 234, 0.97));
}

.result-content .eyebrow {
  margin-bottom: 8px;
}

.result-content h2 {
  margin-bottom: 5px;
  font-size: clamp(34px, 3.4vw, 46px);
}

.result-message {
  max-width: 620px;
  margin: 0 auto 7px;
  color: var(--navy-800);
  font-size: 16px;
  line-height: 1.4;
}

.result-grade {
  width: 52px;
  height: 52px;
  display: grid;
  place-content: center;
  justify-items: center;
  margin: 0 auto 5px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: white;
  background: var(--red-700);
  box-shadow: 0 8px 22px rgba(180, 55, 46, 0.2);
}

.result-grade span {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.result-grade strong {
  margin-top: -2px;
  font-size: 24px;
  line-height: 1;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 7px 0;
}

.result-stats > div {
  padding: 8px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 8px 22px rgba(7, 31, 60, 0.08);
}

.result-stats span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 900;
  color: var(--navy-800);
}

.result-stats strong {
  display: block;
  margin-top: 5px;
  font-size: 23px;
  color: var(--navy-950);
}

.result-highlight {
  width: fit-content;
  margin: 5px auto 7px;
  padding: 6px 13px;
  border-radius: 999px;
  color: white;
  background: var(--navy-800);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
}

.result-insight {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  max-width: 640px;
  margin: 5px auto 7px;
  padding: 8px 12px;
  border: 1px solid rgba(16, 52, 96, 0.12);
  border-radius: 12px;
  color: var(--navy-950);
  background: rgba(255, 255, 255, 0.74);
  text-align: left;
}

.result-insight span {
  padding-right: 10px;
  border-right: 1px solid var(--border);
  color: var(--red-700);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.11em;
  white-space: nowrap;
}

.result-insight strong {
  color: var(--navy-900);
  font-size: 13px;
  white-space: nowrap;
}

.result-insight p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.result-landing-cta {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px;
  align-items: center;
  max-width: 640px;
  margin: 6px auto 7px;
  padding: 8px 16px 8px 8px;
  border: 1px solid rgba(16, 52, 96, 0.12);
  border-radius: 16px;
  color: var(--navy-950);
  background: white;
  box-shadow: 0 12px 30px rgba(7, 31, 60, 0.1);
  text-align: left;
}

.result-qr {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 6px solid white;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(7, 31, 60, 0.12);
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.result-qr svg { width: 100%; height: 100%; display: block; }
.result-landing-cta > div:last-child > span { color: var(--red-700); font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.result-landing-cta strong { display: block; margin: 1px 0 2px; font-size: 21px; }
.result-landing-cta p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.result-landing-cta small { display: block; margin-top: 5px; color: var(--navy-800); font-weight: 900; }

.record-entry {
  margin: 5px auto;
  padding: 8px;
  max-width: 480px;
  border-radius: 12px;
  color: white;
  background: var(--navy-900);
}

.record-entry > span {
  color: #ffd38a;
  font-weight: 900;
  letter-spacing: 0.12em;
  font-size: 11px;
}

.record-entry p {
  margin: 3px 0;
}

.record-entry small {
  opacity: 0.72;
}

.initials-editor {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin: 5px 0;
}

.initial-letter {
  width: 40px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 25px;
  font-weight: 900;
  border: 2px solid transparent;
}

.initial-letter.is-active {
  border-color: #ffd38a;
  background: rgba(255, 255, 255, 0.2);
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.toast {
  position: absolute;
  z-index: 25;
  left: 50%;
  top: 112px;
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 999px;
  color: white;
  background: rgba(7, 31, 60, 0.94);
  box-shadow: 0 10px 28px rgba(7, 31, 60, 0.24);
  font-weight: 900;
}

.is-hidden {
  display: none !important;
}

@media (max-height: 760px) {
  .result-screen {
    padding: 6px 32px;
  }

  .result-content {
    width: min(900px, 92vw);
  }

  .result-content .eyebrow {
    margin-bottom: 2px;
    font-size: 10px;
  }

  .result-grade {
    width: 42px;
    height: 42px;
    margin-bottom: 2px;
  }

  .result-grade strong {
    font-size: 20px;
  }

  .result-content h2 {
    margin-bottom: 2px;
    font-size: 30px;
  }

  .result-message {
    max-width: 760px;
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.25;
  }

  .result-stats {
    gap: 8px;
    margin: 4px 0;
  }

  .result-stats > div {
    padding: 5px;
  }

  .result-stats span {
    font-size: 9px;
  }

  .result-stats strong {
    margin-top: 1px;
    font-size: 19px;
  }

  .result-highlight {
    margin: 3px auto 4px;
    padding: 4px 11px;
    font-size: 10px;
  }

  .result-insight {
    margin: 3px auto 4px;
    padding: 6px 10px;
  }

  .result-insight strong {
    font-size: 12px;
  }

  .result-insight p {
    font-size: 10px;
  }

  .result-landing-cta {
    grid-template-columns: 78px 1fr;
    gap: 10px;
    margin: 4px auto;
    padding: 5px 12px 5px 5px;
  }

  .result-qr {
    width: 74px;
    height: 74px;
    border-width: 4px;
  }

  .result-landing-cta strong {
    font-size: 17px;
  }

  .result-landing-cta p {
    font-size: 10px;
  }

  .result-landing-cta small {
    margin-top: 2px;
  }

  .record-entry {
    max-width: 420px;
    margin: 3px auto;
    padding: 6px;
  }

  .record-entry p {
    margin: 1px 0;
  }

  .initials-editor {
    margin: 3px 0;
  }

  .initial-letter {
    width: 34px;
    height: 35px;
    font-size: 21px;
  }

  .result-actions {
    margin-top: 5px;
  }
}

@media (max-width: 900px) {
  .edition,
  .status-pill,
  #fullscreen-toggle {
    display: none;
  }

  .game-shell {
    padding: 8px;
    grid-template-rows: 44px minmax(0, 1fr);
  }

  .brand-bar {
    padding: 0 4px;
  }

  .brand-lockup img {
    width: 38px;
  }

  .game-frame {
    width: min(calc((100vh - 62px) * 16 / 9), calc(100vw - 16px));
    border-radius: 18px;
  }

  .brand-bar {
    width: min(calc((100vh - 62px) * 16 / 9), calc(100vw - 16px));
  }

  .screen-content {
    width: 78vw;
  }

  .briefing-grid {
    grid-template-columns: 1fr;
  }

  .briefing-grid article {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 0 10px;
    padding: 12px;
  }

  .briefing-grid article > span {
    grid-row: 1 / 3;
  }

  .briefing-grid p {
    font-size: 12px;
  }

  .task-panel {
    top: 98px;
    width: 29vw;
  }

  .director-chip {
    display: none;
  }

  .minigame-screen {
    width: min(350px, 44vw);
  }

  .result-insight {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .result-insight span {
    padding-right: 0;
    border-right: 0;
  }

  .inventory-panel {
    width: 29vw;
  }

  .coach-panel {
    top: 190px;
    width: 29vw;
  }
}

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