:root {
  color-scheme: dark;
  --bg: #050814;
  --panel: rgba(9, 20, 45, 0.78);
  --panel-strong: rgba(13, 31, 68, 0.94);
  --line: rgba(124, 197, 255, 0.42);
  --text: #f5fbff;
  --muted: #abc0d8;
  --blue: #1374ff;
  --cyan: #23d3ff;
  --red: #ff3e5c;
  --amber: #ffb42d;
  --green: #36e27e;
  --violet: #9b6cff;
  --surface: #101829;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

@font-face {
  font-family: "Shopee";
  src: url("/assets/fonts/Shopee2021-regular.ttf") format("truetype");
  font-weight: 400;
}

@font-face {
  font-family: "Shopee";
  src: url("/assets/fonts/Shopee2021-bold.ttf") format("truetype");
  font-weight: 700;
}

@font-face {
  font-family: "Shopee";
  src: url("/assets/fonts/Shopee2021-extrabold.ttf") format("truetype");
  font-weight: 900;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  min-height: 44px;
  border: 1px solid rgba(126, 200, 255, 0.32);
  border-radius: 8px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(34, 116, 255, 0.96), rgba(8, 57, 159, 0.96));
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

button:active {
  transform: translateY(1px);
}

button.secondary {
  background: rgba(255, 255, 255, 0.08);
}

button.danger {
  background: linear-gradient(180deg, #d73550, #8b1633);
}

button.success {
  background: linear-gradient(180deg, #13a95a, #087642);
}

input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(126, 200, 255, 0.38);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.panel p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.display-page {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(45, 128, 255, 0.45), transparent 34%),
    radial-gradient(circle at 78% 45%, rgba(35, 211, 255, 0.16), transparent 28%),
    linear-gradient(180deg, #030816 0%, #06132d 50%, #030712 100%);
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-width: 1024px;
  min-height: 576px;
  padding: clamp(18px, 2vw, 32px);
  isolation: isolate;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(74, 165, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 165, 255, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 86%, transparent);
}

.light-rig {
  position: absolute;
  top: 0;
  left: 7vw;
  right: 7vw;
  height: 46px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 26px;
  pointer-events: none;
}

.light-rig span {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: #dfeeff;
  box-shadow: 0 0 18px #fff, 0 36px 54px rgba(63, 154, 255, 0.62);
}

.display-header {
  display: grid;
  grid-template-columns: 260px 1fr 260px;
  align-items: center;
  gap: 22px;
  height: 132px;
}

.brand {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.brand strong {
  font-size: 28px;
  letter-spacing: 0;
}

.brand span {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

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

.game-kicker {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 210px;
  min-height: 42px;
  padding: 0 24px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(180deg, #1d89ff, #084dc9);
  font-weight: 800;
  font-size: 24px;
}

.game-title h1 {
  margin: 12px 0 8px;
  font-size: clamp(40px, 5.3vw, 78px);
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tagline {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 26px;
  border-radius: 999px;
  color: #eaf7ff;
  background: linear-gradient(90deg, #0759d7, #0795ff, #0759d7);
  font-weight: 700;
  font-size: 18px;
}

.scorebox {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.metric {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  font-size: 36px;
  line-height: 1;
  margin-top: 4px;
}

.playfield {
  height: calc(100vh - 180px);
  min-height: 380px;
  display: grid;
  grid-template-columns: minmax(230px, 0.86fr) minmax(520px, 1.56fr) minmax(230px, 0.86fr);
  align-items: center;
  gap: clamp(18px, 2.2vw, 34px);
}

.info-card {
  min-height: 270px;
  padding: 28px 26px;
  border: 2px solid currentColor;
  border-radius: 8px;
  background: rgba(8, 18, 42, 0.82);
  box-shadow: inset 0 0 36px rgba(255, 255, 255, 0.04), 0 20px 50px rgba(0, 0, 0, 0.26);
}

.info-card small {
  display: block;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.info-card strong {
  display: block;
  margin-top: 20px;
  font-size: clamp(38px, 4vw, 60px);
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.info-card.red {
  color: var(--red);
}

.info-card.amber {
  color: var(--amber);
}

.info-card.green {
  color: var(--green);
}

.info-card.violet {
  color: var(--violet);
}

.symptom-icon {
  width: 82px;
  height: 82px;
  margin: 26px auto 0;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 30px currentColor;
}

.target-copy {
  color: var(--green);
}

.body-wrap {
  position: relative;
  width: min(100%, 720px);
  margin: 0 auto;
  aspect-ratio: 1 / 1;
}

.human-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 34px rgba(25, 138, 255, 0.55));
}

.body-line {
  fill: rgba(7, 25, 58, 0.64);
  stroke: rgba(90, 197, 255, 0.98);
  stroke-width: 4;
}

.body-core {
  fill: rgba(21, 87, 178, 0.24);
  stroke: rgba(100, 210, 255, 0.5);
  stroke-width: 2;
}

.hotspot {
  cursor: default;
  outline: none;
}

.hotspot.selectable {
  cursor: pointer;
}

.hotspot .hit-area {
  fill: transparent;
  pointer-events: all;
}

.hotspot .pulse {
  fill: rgba(255, 255, 255, 0.08);
  stroke: rgba(255, 255, 255, 0.32);
  stroke-width: 2;
}

.hotspot .dot {
  fill: var(--cyan);
  filter: drop-shadow(0 0 10px var(--cyan));
}

.hotspot text {
  fill: #eaf7ff;
  font-size: 20px;
  font-weight: 900;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #031128;
  stroke-width: 5px;
  stroke-linejoin: round;
}

.hotspot.active .pulse {
  animation: pulse 1.05s infinite;
}

.hotspot.correct .dot,
.hotspot.correct .pulse {
  fill: var(--green);
  stroke: var(--green);
}

.hotspot.wrong .dot,
.hotspot.wrong .pulse {
  fill: var(--red);
  stroke: var(--red);
}

@keyframes pulse {
  0% {
    r: 28;
    opacity: 1;
  }
  100% {
    r: 58;
    opacity: 0;
  }
}

.result-banner {
  position: absolute;
  left: 50%;
  bottom: 30px;
  min-width: min(760px, 88vw);
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  padding: 18px 26px;
  text-align: center;
  background: rgba(5, 12, 28, 0.9);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
}

.result-banner strong {
  display: block;
  font-size: 32px;
}

.result-banner span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 18px;
}

.result-banner.good strong {
  color: var(--green);
}

.result-banner.bad strong {
  color: var(--red);
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 40px;
  background: rgba(2, 7, 18, 0.72);
  z-index: 5;
}

.overlay-panel {
  width: min(980px, 88vw);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 40px;
  background: rgba(7, 18, 44, 0.95);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.overlay-panel h2 {
  margin: 0 0 18px;
  font-size: 54px;
  line-height: 1;
  text-transform: uppercase;
}

.overlay-panel p,
.overlay-panel li {
  color: #d5e5f8;
  font-size: 24px;
  line-height: 1.45;
}

.overlay-panel .result-rank {
  margin: 12px 0 0;
  color: var(--amber);
  font-size: 36px;
  font-weight: 900;
  text-transform: uppercase;
}

.overlay-panel .event-prize {
  margin: 8px 0 0;
  color: #f6fbff;
  font-size: 22px;
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.rule-tile,
.leader-tile {
  min-height: 130px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.06);
}

.rule-tile b {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue);
  font-size: 20px;
}

.rule-tile span {
  display: block;
  margin-top: 14px;
  color: #eaf7ff;
  font-size: 20px;
  font-weight: 700;
}

.leaderboard {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.leader-tile {
  min-height: 72px;
  display: grid;
  grid-template-columns: 56px 1fr 90px;
  align-items: center;
  gap: 12px;
}

.rank {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffc247, #d8870a);
  color: #101010;
  font-weight: 900;
}

.leader-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 22px;
  font-weight: 800;
}

.leader-score {
  text-align: right;
  color: var(--amber);
  font-size: 26px;
  font-weight: 900;
}

.control-page {
  min-height: 100vh;
  background: #0b1020;
}

.control-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.control-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.control-header h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
}

.connection {
  min-width: 146px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 10px 14px;
  text-align: center;
  color: var(--green);
  background: rgba(255, 255, 255, 0.07);
  font-weight: 800;
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(360px, 1.2fr) minmax(280px, 0.92fr);
  gap: 18px;
}

.panel {
  border: 1px solid rgba(126, 200, 255, 0.24);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel-strong);
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.status-list {
  display: grid;
  gap: 10px;
}

.status-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.status-row span {
  color: var(--muted);
}

.status-row strong {
  text-align: right;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.button-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.region-pad {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.region-btn {
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
}

.region-btn b {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--cyan);
  color: #02111e;
  font-size: 24px;
}

.region-btn span {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
}

.region-btn.forehead b {
  background: var(--red);
}

.region-btn.abdomen b {
  background: var(--amber);
}

.region-btn.chest b {
  background: var(--green);
}

.region-btn.knee b {
  background: var(--violet);
}

.hit-log {
  min-height: 104px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.18);
}

.hit-log strong {
  display: block;
  font-size: 24px;
}

.hit-log.good strong {
  color: var(--green);
}

.hit-log.bad strong {
  color: var(--red);
}

.hint-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.hint-list span {
  padding: 10px;
  border-radius: 8px;
  color: #dcecff;
  background: rgba(255, 255, 255, 0.06);
}

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

.display-stage {
  width: 100vw;
  height: 100dvh;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: clamp(18px, 2vw, 34px) clamp(28px, 4vw, 72px) clamp(20px, 2.4vw, 40px);
  background:
    radial-gradient(circle at 43% 12%, rgba(88, 159, 247, 0.62), transparent 28%),
    radial-gradient(circle at 76% 54%, rgba(230, 244, 255, 0.2), transparent 25%),
    linear-gradient(115deg, #06133a 0%, #0b3d8a 48%, #061126 100%);
  overflow: hidden;
}

.display-metrics {
  height: auto;
  margin-bottom: clamp(12px, 1.5vw, 22px);
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 280px));
  justify-content: center;
  gap: clamp(24px, 5vw, 78px);
  align-items: start;
}

.display-metric {
  min-height: clamp(78px, 10vh, 112px);
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: clamp(16px, 1.6vw, 24px);
  background: linear-gradient(145deg, rgba(6, 48, 128, 0.98), rgba(21, 67, 147, 0.96));
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.22);
}

.display-metric span {
  display: block;
  font-size: clamp(17px, 1.55vw, 25px);
  font-weight: 800;
  color: #f7fbff;
}

.display-metric strong {
  margin-top: 6px;
  font-size: clamp(34px, 3.6vw, 50px);
  line-height: 1;
  color: #fff;
}

.display-metric.time-warning {
  border-color: rgba(255, 62, 92, 0.88);
  background: linear-gradient(145deg, rgba(184, 23, 55, 0.98), rgba(117, 10, 36, 0.96));
  box-shadow: 0 22px 50px rgba(255, 40, 82, 0.28);
}

.display-metric.time-warning strong {
  color: #ffe1e5;
}

.display-board {
  height: auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(460px, 0.98fr) minmax(390px, 0.86fr);
  align-items: center;
  gap: clamp(22px, 4vw, 72px);
  overflow: hidden;
}

.anatomy-wrap {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  align-content: center;
  overflow: visible;
}

.anatomy-viewport {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.anatomy-svg {
  width: min(660px, 48vw);
  max-width: 100%;
  height: auto;
  max-height: min(100%, calc(100dvh - 210px));
  overflow: visible;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.3));
}

.anatomy-image {
  pointer-events: none;
  user-select: none;
}

.body-guide {
  fill: rgba(255, 255, 255, 0.035);
  stroke: rgba(247, 252, 255, 0.42);
  stroke-width: 3;
  stroke-dasharray: 11 10;
}

.anatomy-figure circle,
.anatomy-figure rect {
  fill: rgba(247, 252, 255, 0.2);
  stroke: rgba(247, 252, 255, 0.78);
  stroke-width: 4;
}

.anatomy-figure .figure-head {
  fill: rgba(247, 252, 255, 0.16);
}

.anatomy-figure .figure-neck,
.anatomy-figure .figure-pelvis {
  fill: rgba(247, 252, 255, 0.14);
}

.whole-body-glow {
  fill: transparent;
  stroke: transparent;
  stroke-width: 2;
  pointer-events: none;
}

.whole-body-glow.active {
  fill: rgba(255, 55, 67, 0.18);
  stroke: var(--red);
  filter: drop-shadow(0 0 18px var(--red));
}

.body-zone {
  cursor: default;
  outline: none;
}

.body-zone.selectable {
  cursor: pointer;
}

.body-zone .hit-area {
  fill: transparent;
  pointer-events: all;
}

.leader-line {
  stroke: rgba(242, 248, 255, 0.78);
  stroke-width: 3;
  stroke-linecap: round;
}

.zone-dot {
  fill: rgba(130, 191, 255, 0.86);
  stroke: rgba(238, 249, 255, 0.95);
  stroke-width: 3;
}

.zone-ring {
  fill: transparent;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 2;
}

.body-zone text {
  fill: #f9fcff;
  font-size: 22px;
  font-weight: 750;
  paint-order: stroke;
  stroke: rgba(3, 16, 43, 0.76);
  stroke-width: 5px;
  stroke-linejoin: round;
}

.body-zone.correct .zone-dot,
.body-zone.correct .zone-ring {
  fill: var(--red);
  stroke: #ffe1e5;
  filter: drop-shadow(0 0 18px var(--red));
}

.body-zone.correct text {
  fill: #ff3448;
}

.whole-body-button {
  min-width: 176px;
  min-height: 44px;
  margin-top: 8px;
  border: 2px solid rgba(87, 221, 105, 0.72);
  border-radius: 999px;
  color: #d9ffe4;
  background: rgba(29, 131, 57, 0.5);
  font-weight: 900;
}

.whole-body-button.correct {
  border-color: #ffe1e5;
  background: var(--red);
  color: #fff;
  box-shadow: 0 0 24px rgba(255, 62, 92, 0.72);
}

.question-panel {
  display: grid;
  gap: clamp(16px, 2.4vh, 28px);
  align-content: center;
  min-width: 0;
}

.symptom-panel,
.answer-panel {
  border-radius: clamp(16px, 1.7vw, 24px);
  padding: clamp(20px, 2vw, 28px) clamp(22px, 2.2vw, 30px);
  color: #073178;
  background: rgba(213, 241, 250, 0.9);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.18);
}

.symptom-panel span {
  display: block;
  font-size: clamp(20px, 1.85vw, 27px);
  font-weight: 900;
}

.symptom-panel strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(30px, 3vw, 46px);
  line-height: 1.12;
}

.answer-panel {
  min-height: clamp(150px, 22vh, 190px);
}

.answer-panel strong {
  display: block;
  font-size: clamp(23px, 2vw, 29px);
  line-height: 1.18;
}

.answer-panel .answer-good {
  color: #05b956;
}

.answer-panel .answer-bad {
  color: #ee2432;
}

.answer-panel .correct-region {
  display: block;
  margin-top: 12px;
  color: #05b956;
  font-size: clamp(22px, 2vw, 28px);
}

.answer-panel p {
  margin: clamp(22px, 3vh, 38px) 0 0;
  color: #073178;
  font-size: clamp(21px, 1.9vw, 27px);
  line-height: 1.36;
}

.answer-panel p b {
  font-weight: 900;
}

.muted-answer strong {
  color: #123f86;
}

.muted-answer span,
.muted-answer p {
  display: block;
  margin-top: 12px;
  color: #54709b;
  font-size: 22px;
  line-height: 1.35;
}

.display-next {
  justify-self: center;
  min-width: clamp(220px, 22vw, 300px);
  min-height: clamp(62px, 8vh, 82px);
  padding: 0 clamp(24px, 2.6vw, 34px);
  border-radius: clamp(20px, 2vw, 28px);
  background: linear-gradient(145deg, #0b3c98, #062c7f);
  font-size: clamp(28px, 3vw, 39px);
  font-weight: 900;
}

.full-button {
  width: 100%;
  margin-top: 10px;
}

.expanded-region-pad {
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.expanded-region-pad .region-btn {
  min-height: 88px;
  padding: 10px;
}

.expanded-region-pad .region-btn b {
  width: 36px;
  height: 36px;
  font-size: 18px;
}

.expanded-region-pad .region-btn span {
  font-size: clamp(15px, 1.6vw, 21px);
  line-height: 1.15;
}

.control-region-map {
  min-height: 520px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(126, 200, 255, 0.18);
  border-radius: 8px;
  padding: 12px 10px;
  background:
    radial-gradient(circle at 50% 20%, rgba(35, 128, 255, 0.22), transparent 40%),
    rgba(255, 255, 255, 0.035);
}

.control-region-map .anatomy-wrap {
  width: 100%;
  min-height: 0;
}

.control-region-map .anatomy-svg {
  width: min(100%, 440px);
  max-height: 470px;
  overflow: hidden;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.24));
}

.control-region-map .body-zone text {
  font-size: 21px;
  stroke-width: 6px;
}

.control-region-map .leader-line {
  stroke-width: 4;
}

.control-region-map .zone-dot {
  r: 17px;
}

.control-region-map .zone-ring {
  r: 25px;
}

.control-region-map .whole-body-button {
  min-width: 156px;
  min-height: 42px;
  margin-top: 6px;
}

.control-key-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.control-key-strip span {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  color: #dcecff;
  background: rgba(255, 255, 255, 0.055);
  font-size: 13px;
  line-height: 1.1;
}

.control-key-strip b {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: #031128;
  background: var(--cyan);
  font-size: 12px;
}

.hit-log {
  margin-top: 14px;
}

@media (max-width: 900px) {
  .control-grid {
    grid-template-columns: 1fr;
  }

  .control-header {
    grid-template-columns: 1fr;
  }

  .region-btn {
    min-height: 126px;
  }
}

/* Event display — 1920 × 1080 master layout */
.display-page,
.display-stage {
  font-family: "Shopee", Arial, sans-serif;
}

.display-page {
  background: #03132d url("/assets/images/bg-f1.jpg") center / cover no-repeat;
}

.display-stage {
  --display-stage-pad: clamp(28px, 3.5vw, 68px);
  position: relative;
  display: block;
  padding: var(--display-stage-pad);
  background: transparent;
  isolation: isolate;
}

.display-brand {
  position: absolute;
  z-index: 5;
  top: clamp(25px, 5.8vh, 64px);
  left: clamp(30px, 3.6vw, 70px);
  right: clamp(30px, 3.7vw, 72px);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.display-logo { width: clamp(170px, 15.8vw, 303px); height: auto; }
.display-brand-mark {
  width: clamp(170px, 14.5vw, 280px);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.display-mini-title { width: 100%; height: auto; margin-top: -8px; }
.display-brand-tagline {
  width: 100%;
  height: auto;
  aspect-ratio: 878 / 255;
  margin-top: -10px;
}
.display-brand-tagline .light-image-stack__light {
  top: 21%;
  width: 106%;
  transform: translate(-50%, -50%);
}

.display-metrics {
  position: relative;
  z-index: 4;
  width: min(53vw, 1020px);
  margin: clamp(38px, 5.5vh, 60px) auto 0;
  grid-template-columns: repeat(3, minmax(180px, 270px));
  gap: clamp(34px, 5.1vw, 98px);
}

.display-metric,
.symptom-panel,
.answer-panel,
.rules-card,
.result-card {
  border: 3px solid rgba(255, 255, 255, .96);
  border-radius: clamp(24px, 2.4vw, 46px);
  background:
    linear-gradient(35deg, rgba(3, 18, 52, .42) 0%, transparent 48%),
    linear-gradient(35deg, #06152f 0%, #123b86 52%, #2879ff 100%);
  box-shadow:
    0 0 6px #fff,
    0 0 15px rgba(188, 226, 255, .9),
    0 0 28px rgba(83, 164, 255, .48),
    inset 0 0 0 2px rgba(176, 221, 255, .75),
    inset 0 0 14px rgba(255, 255, 255, .22),
    0 12px 28px rgba(0, 0, 0, .35);
}

.display-metric {
  min-height: clamp(88px, 11.5vh, 124px);
  padding-top: 6px;
}
.display-metric span { font-size: clamp(18px, 1.45vw, 28px); line-height: 1; }
.display-metric strong { font-size: clamp(48px, 4.9vw, 94px); text-shadow: 3px 4px 0 #071838; }

.display-board {
  height: calc(
    100dvh
    - var(--display-stage-pad)
    - var(--display-stage-pad)
    - clamp(38px, 5.5vh, 60px)
    - clamp(88px, 11.5vh, 124px)
  );
  grid-template-columns: minmax(380px, .78fr) minmax(600px, 1.35fr);
  gap: clamp(35px, 7vw, 135px);
  padding: 0 clamp(16px, 13vw, 250px) 0 clamp(16px, 13vw, 250px);
}

.anatomy-svg {
  width: min(39vw, 610px);
  max-height: min(100%, calc(100dvh - 230px));
  filter: drop-shadow(0 0 18px rgba(0, 173, 255, .85));
  transition: filter .35s ease;
}

.display-board .anatomy-wrap:not(.camera-full) .anatomy-svg {
  filter: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 5%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 5%, #000 100%);
}

.display-board .anatomy-wrap:not(.camera-full) .anatomy-viewport {
  overflow: visible;
  filter: drop-shadow(0 0 22px rgba(0, 173, 255, .95));
}

.body-guide { fill: transparent; stroke: transparent; }
.anatomy-figure circle,
.anatomy-figure rect {
  fill: rgba(0, 83, 176, .42);
  stroke: #6fe3ff;
  stroke-width: 3;
}
.leader-line { stroke: rgba(94,220,255,.58); }
.zone-dot { fill: #fb263d; stroke: #fff; filter: drop-shadow(0 0 10px #ff3349); }
.zone-ring { stroke: rgba(89,221,255,.8); }
.body-zone text { fill: #d9f8ff; stroke: #061634; }
.whole-body-button { margin-top: -52px; position: relative; z-index: 3; }

.question-panel {
  position: relative;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
  gap: clamp(8px, 1vh, 12px);
}
.question-blocks {
  min-height: 0;
  display: grid;
  align-content: center;
  gap: clamp(18px, 3vh, 32px);
}
.question-actions {
  min-height: 58px;
  display: grid;
  place-items: center;
}
.symptom-panel { color: #fff; padding: clamp(24px, 2.2vw, 42px) clamp(28px, 2.8vw, 54px); }
.symptom-panel span { font-size: clamp(23px, 1.8vw, 35px); }
.symptom-panel strong { font-size: clamp(34px, 3.1vw, 60px); line-height: 1.08; text-shadow: 2px 3px 0 #0a255a; }

.answer-panel {
  min-height: 150px;
  padding: 14px 28px;
  display: grid;
  grid-template-columns: minmax(220px, .95fr) minmax(300px, 1.35fr);
  align-items: stretch;
  color: #fff;
}
.answer-result {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-right: clamp(18px, 2vw, 30px);
  border-right: 2px solid #fff;
  text-align: center;
}
.answer-result small { font-size: clamp(19px, 1.6vw, 31px); font-weight: 900; }
.answer-result strong {
  margin-top: 8px;
  font-size: clamp(30px, 2.6vw, 52px);
}
.answer-product { display: flex; flex-direction: column; justify-content: center; align-items: center; padding-left: 24px; text-align: center; }
.answer-product strong { font-size: clamp(30px, 3vw, 58px); }
.answer-product span { margin-top: 18px; font-size: clamp(19px, 1.6vw, 31px); font-weight: 700; }
.muted-answer { display: flex; flex-direction: column; justify-content: center; text-align: center; }
.muted-answer strong { color: #fff; font-size: clamp(22px, 2vw, 38px); }
.muted-answer span { color: #cfedff; font-size: clamp(17px, 1.3vw, 25px); }
.display-next { min-height: 58px; font-size: clamp(21px, 2vw, 32px); }

.game-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
}

.welcome-content { width: 100%; height: 100%; position: relative; display: flex; align-items: center; flex-direction: column; }
.welcome-logo { width: auto; height: clamp(52px, 7.3vh, 79px); margin-top: clamp(28px, 5vh, 54px); }
.welcome-kicker { width: auto; height: clamp(54px, 6.7vh, 72px); aspect-ratio: 343 / 71; margin-top: clamp(46px, 6.8vh, 74px); }
.welcome-title { width: auto; height: clamp(245px, 35vh, 378px); max-width: 82vw; object-fit: contain; margin-top: clamp(8px, 1.2vh, 14px); }
.welcome-tagline {
  width: clamp(594px, 84.8vh, 916px);
  height: auto;
  max-width: 82vw;
  aspect-ratio: 878 / 255;
  margin-top: 0;
}
.light-image-stack {
  position: relative;
  display: block;
  flex: 0 0 auto;
  isolation: auto;
}
.light-image-stack__base {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.light-image-stack__light {
  position: absolute;
  z-index: 1;
  left: 50%;
  width: 110%;
  height: auto;
  max-width: none;
  transform: translateX(-50%);
  mix-blend-mode: screen;
  pointer-events: none;
}
.welcome-kicker .light-image-stack__light {
  top: 6%;
  width: 110%;
  transform: translate(-50%, -50%);
}
.welcome-tagline .light-image-stack__light {
  top: 21%;
  width: 106%;
  transform: translate(-50%, -50%);
}
.start-button,
.primary-game-button {
  border: 3px solid white;
  border-radius: 16px;
  padding: 0 42px;
  min-height: 62px;
  color: #fff;
  background: linear-gradient(180deg, #3483ff, #082764);
  box-shadow: 0 0 12px #9bddff, 0 12px 28px rgba(0,0,0,.38);
  font-weight: 900;
  font-size: clamp(20px, 1.7vw, 32px);
}
.start-button { margin-top: clamp(-8px, -.7vh, -4px); }

.rules-overlay { padding-top: clamp(130px, 22vh, 235px); }
.rules-card { width: min(53vw, 1020px); padding: clamp(25px, 2.5vw, 48px); border-radius: 28px; color: #fff; text-align: center; }
.rules-card h2 { margin: 0 0 6px; font-size: clamp(24px, 2vw, 38px); }
.rules-card > strong { display: block; font-size: clamp(32px, 3.1vw, 60px); }
.rules-card p { margin: 12px 0 0; font-size: clamp(20px, 1.75vw, 34px); }
.rules-card .primary-game-button { margin-top: 28px; }

.result-overlay { align-content: center; gap: clamp(40px, 7vh, 75px); padding-top: 40px; }
.total-title { width: min(50vw, 965px); }
.result-card { width: min(39vw, 750px); padding: clamp(28px, 3vw, 56px) clamp(38px, 4vw, 72px); border-radius: 28px; }
.result-card > div { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 16px; margin-bottom: 24px; }
.result-card span { font-size: clamp(21px, 1.9vw, 36px); font-weight: 900; }
.result-card i { border-bottom: 2px solid #fff; margin-bottom: 9px; }
.result-card strong { min-width: 70px; font-size: clamp(45px, 4.5vw, 86px); line-height: .8; text-align: center; }
.result-card h2 { margin: 36px 0 0; font-size: clamp(30px, 3vw, 58px); text-align: center; }
.result-card .primary-game-button { display: block; margin: 34px auto 0; }

/* Cân lại tỉ lệ body và nội dung trên màn hình LED lớn */
@media (min-width: 1501px) and (orientation: landscape) {
  .display-board {
    grid-template-columns: minmax(520px, 1fr) minmax(560px, 1.08fr);
    gap: clamp(30px, 5vw, 60px);
  }

  .anatomy-svg {
    width: min(42vw, 680px);
  }

  .question-panel {
    width: 100%;
    max-width: 680px;
    justify-self: start;
  }

  .symptom-panel {
    padding: clamp(26px, 1.7vw, 32px) clamp(32px, 2.1vw, 40px);
  }

  .symptom-panel span {
    font-size: clamp(23px, 1.5vw, 30px);
  }

  .symptom-panel strong {
    font-size: clamp(34px, 2.65vw, 52px);
  }

  .answer-panel {
    padding: 12px 24px;
  }

  .muted-answer strong {
    font-size: clamp(22px, 1.75vw, 34px);
  }

  .muted-answer span {
    font-size: clamp(17px, 1.15vw, 22px);
  }
}

/* Màn hình rộng nhưng thấp: giữ đủ chỗ cho nút chuyển câu */
@media (min-width: 901px) and (max-height: 800px) and (orientation: landscape) {
  .display-stage {
    --display-stage-pad: clamp(24px, 3vh, 32px);
  }

  .display-metrics {
    margin-top: clamp(18px, 3vh, 24px);
  }

  .display-metric {
    min-height: 82px;
  }

  .display-metric span {
    font-size: clamp(17px, 1.3vw, 24px);
  }

  .display-metric strong {
    font-size: clamp(42px, 4.2vw, 68px);
  }

  .display-board {
    height: calc(
      100dvh
      - var(--display-stage-pad)
      - var(--display-stage-pad)
      - clamp(18px, 3vh, 24px)
      - 82px
    );
  }

  .question-panel {
    gap: 8px;
  }

  .question-blocks {
    gap: 12px;
  }

  .symptom-panel {
    padding: 18px 30px;
  }

  .symptom-panel span {
    font-size: 24px;
  }

  .symptom-panel strong {
    font-size: clamp(30px, 2.3vw, 44px);
    line-height: 1.04;
  }

  .answer-panel {
    min-height: 122px;
    padding: 10px 20px;
  }

  .answer-result small {
    font-size: 22px;
  }

  .answer-result strong,
  .answer-product strong {
    font-size: clamp(28px, 2.2vw, 42px);
  }

  .answer-product span {
    margin-top: 10px;
    font-size: 21px;
  }

  .muted-answer strong {
    font-size: clamp(22px, 1.65vw, 31px);
  }

  .muted-answer span {
    font-size: 19px;
  }

  .question-actions,
  .display-next {
    min-height: 50px;
  }

  .display-next {
    font-size: 25px;
  }
}

@media (max-aspect-ratio: 4/3) {
  .display-board { padding-left: 20px; padding-right: 20px; grid-template-columns: minmax(330px,.8fr) minmax(430px,1fr); }
  .display-metrics { margin-top: 95px; width: 72vw; }
  .display-brand { top: 24px; }
  .rules-card { width: 76vw; }
  .result-card { width: 65vw; }
}

@media (max-width: 1500px) and (orientation: landscape) {
  .display-brand { top: 24px; left: 48px; right: 50px; }
  .display-logo { width: 215px; }
  .display-brand-mark { width: 210px; }
  .display-metrics { width: 54vw; margin-top: 12px; grid-template-columns: repeat(3, minmax(150px, 195px)); gap: 5vw; }
  .display-metric { min-height: 88px; }
  .display-board {
    height: calc(
      100dvh
      - var(--display-stage-pad)
      - var(--display-stage-pad)
      - 12px
      - 88px
    );
    padding: 0 5vw;
    grid-template-columns: minmax(390px,.8fr) minmax(520px,1.2fr);
    gap: 6vw;
  }
  .anatomy-svg { width: min(43vw, 560px); max-height: min(100%, calc(100dvh - 155px)); }
  .question-panel { gap: clamp(8px, 1.5vh, 12px); }
  .rules-overlay { padding-top: 150px; }
  .rules-card { width: min(53vw, 760px); padding: 28px 38px; }
}

@media (max-width: 900px) {
  .display-page { min-height: 100dvh; overflow: auto; }
  .display-stage { min-height: 100dvh; height: auto; overflow: auto; padding: 18px; }
  .display-brand { position: relative; inset: auto; align-items: center; margin-bottom: 14px; }
  .display-logo { width: 150px; }
  .display-brand-mark { width: 150px; }
  .display-mini-title { margin: 0; }
  .display-metrics { width: 100%; margin: 0 0 18px; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .display-metric { min-height: 70px; border-radius: 12px; }
  .display-metric span { font-size: 13px; }
  .display-metric strong { font-size: clamp(28px, 8vw, 50px); }
  .display-board { height: auto; display: flex; flex-direction: column; padding: 0; gap: 20px; overflow: visible; }
  .anatomy-wrap { width: 100%; height: auto; }
  .anatomy-svg { width: min(100%, 520px); max-height: none; }
  .whole-body-button { margin-top: -18px; }
  .question-panel { width: 100%; gap: 16px; }
  .question-blocks { gap: 16px; }
  .question-actions { min-height: 58px; }
  .symptom-panel, .answer-panel { border-radius: 16px; }
  .symptom-panel strong { font-size: clamp(27px, 7vw, 42px); }
  .answer-panel { grid-template-columns: 1fr; min-height: 130px; }
  .answer-result { border-right: 0; border-bottom: 1px solid #fff; padding: 12px 0; text-align: center; }
  .answer-product { padding: 18px 0; }
  .game-overlay { position: fixed; overflow-y: auto; padding: 18px; }
  .welcome-content { justify-content: center; }
  .welcome-logo { height: auto; width: min(68vw, 300px); margin: 0 0 8vh; }
  .welcome-kicker { height: auto; width: min(70vw, 340px); margin: 0; }
  .welcome-title { height: auto; width: min(94vw, 640px); margin-top: 2vh; }
  .welcome-tagline { height: auto; width: min(92vw, 620px); }
  .start-button { margin-top: 0; }
  .rules-overlay { padding-top: 150px; align-items: start; }
  .rules-card { width: 100%; padding: 24px 18px; }
  .rules-card > strong { font-size: clamp(27px, 7vw, 42px); }
  .rules-card p { font-size: clamp(17px, 4.4vw, 24px); }
  .result-overlay { padding-top: 120px; align-content: start; }
  .total-title { width: min(92vw, 700px); }
  .result-card { width: min(92vw, 620px); padding: 28px 24px; }
}

@media (max-height: 650px) and (orientation: landscape) {
  .welcome-logo { height: 48px; margin-top: 22px; }
  .welcome-kicker { height: 54px; margin-top: 34px; }
  .welcome-title { height: 220px; margin-top: 3px; }
  .welcome-tagline { width: min(82vw, 533px); height: auto; }
  .start-button { min-height: 48px; font-size: 18px; }
}

/* Body hotspots: dot nhỏ theo artwork, vùng chạm lớn và dễ thao tác */
.display-board .anatomy-wrap {
  width: 100%;
  padding-bottom: clamp(10px, 1.5vh, 18px);
  justify-items: center;
}

.display-board .anatomy-viewport {
  padding-block: clamp(16px, 2vh, 26px);
}

@media (min-width: 901px) and (max-height: 800px) and (orientation: landscape) {
  .display-board .anatomy-viewport {
    padding-block: 8px;
  }
}

.display-board .body-zone .hit-area {
  r: 36px;
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
}

.display-board .body-zone .zone-dot {
  r: 10px;
  fill: #ff182f;
  stroke: #fff;
  stroke-width: 3px;
  filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 9px #ff1f38);
  pointer-events: none;
}

.display-board .body-zone .zone-ring {
  r: 14px;
  fill: transparent;
  stroke: rgba(255, 89, 103, .5);
  stroke-width: 2px;
  pointer-events: none;
}

.display-board .body-zone.correct .zone-dot {
  fill: #20d866;
  stroke: #effff4;
  filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 12px #20d866);
}

.display-board .body-zone.correct .zone-ring {
  stroke: rgba(76, 255, 139, .9);
}

.display-board .body-zone.correct text {
  fill: #43ef80;
}

.display-board .body-zone.correct .leader-line {
  stroke: rgba(76, 255, 139, .9);
}

.display-board .body-zone.wrong text {
  fill: #ff3448;
}

.display-board .body-zone.wrong .leader-line {
  stroke: rgba(255, 52, 72, .9);
}

.display-board .body-zone.correct-answer text {
  fill: #43ef80;
}

.display-board .body-zone.correct-answer .leader-line {
  stroke: rgba(76, 255, 139, .9);
}

.display-board .whole-body-glow.active {
  fill: rgba(32, 216, 102, .18);
  stroke: #43ef80;
  filter: drop-shadow(0 0 18px #20d866);
}

.display-board .whole-body-button.correct {
  border-color: #effff4;
  color: #fff;
  background: linear-gradient(180deg, #20d866, #087f3a);
  box-shadow: 0 0 20px rgba(32, 216, 102, .85);
}

.display-board .whole-body-button.correct-answer {
  border-color: #43ef80;
  color: #43ef80;
  box-shadow: 0 0 16px rgba(32, 216, 102, .65);
}

.display-board .whole-body-button.wrong {
  border-color: #ff3448;
  color: #ff6a79;
  box-shadow: 0 0 16px rgba(255, 52, 72, .65);
}

.display-board .body-zone.selectable:hover .zone-dot,
.display-board .body-zone.selectable:focus .zone-dot {
  r: 12px;
  filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 14px #ff1835);
}

.display-board .body-zone.selectable:hover .zone-ring,
.display-board .body-zone.selectable:focus .zone-ring {
  r: 18px;
  stroke: rgba(255, 255, 255, .9);
}

.display-board .whole-body-button {
  position: relative;
  z-index: 6;
  inset: auto;
  justify-self: center;
  transform: none;
  min-width: 145px;
  min-height: 42px;
  margin: 4px 0 0;
  padding: 0 20px;
  white-space: nowrap;
}

.display-board .whole-body-button:active {
  transform: translateY(1px);
}

@media (max-width: 900px) {
  .display-board .anatomy-viewport {
    height: auto;
  }

  .display-board .whole-body-button {
    inset: auto;
    min-width: 122px;
    min-height: 38px;
    padding: 0 14px;
    font-size: 14px;
  }
}

/* Control dùng cùng hệ hotspot với màn Display */
.control-region-map .anatomy-wrap {
  position: relative;
}

.control-region-map .body-zone .hit-area {
  r: 36px;
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
}

.control-region-map .body-zone .zone-dot {
  r: 10px;
  fill: #ff182f;
  stroke: #fff;
  stroke-width: 3px;
  filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 9px #ff1f38);
  pointer-events: none;
}

.control-region-map .body-zone .zone-ring {
  r: 14px;
  fill: transparent;
  stroke: rgba(255, 89, 103, .5);
  stroke-width: 2px;
  pointer-events: none;
}

.control-region-map .body-zone.selectable:hover .zone-dot,
.control-region-map .body-zone.selectable:focus .zone-dot {
  r: 12px;
  filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 14px #ff1835);
}

.control-region-map .body-zone.selectable:hover .zone-ring,
.control-region-map .body-zone.selectable:focus .zone-ring {
  r: 18px;
  stroke: rgba(255, 255, 255, .9);
}

.control-region-map .whole-body-button {
  position: relative;
  z-index: 6;
  inset: auto;
  justify-self: center;
  min-width: 122px;
  min-height: 38px;
  margin: 6px 0 0;
  padding: 0 14px;
  white-space: nowrap;
  font-size: 14px;
}

/* Trạng thái đúng/sai trên Control đồng bộ với màn Display */
.control-region-map .body-zone.correct .zone-dot {
  fill: #20d866;
  stroke: #effff4;
  filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 12px #20d866);
}

.control-region-map .body-zone.correct .zone-ring {
  stroke: rgba(76, 255, 139, .9);
}

.control-region-map .body-zone.correct text,
.control-region-map .body-zone.correct-answer text {
  fill: #43ef80;
}

.control-region-map .body-zone.correct .leader-line,
.control-region-map .body-zone.correct-answer .leader-line {
  stroke: rgba(76, 255, 139, .9);
}

.control-region-map .body-zone.wrong text {
  fill: #ff3448;
}

.control-region-map .body-zone.wrong .leader-line {
  stroke: rgba(255, 52, 72, .9);
}

.control-region-map .whole-body-glow.active {
  fill: rgba(32, 216, 102, .18);
  stroke: #43ef80;
  filter: drop-shadow(0 0 18px #20d866);
}

.control-region-map .whole-body-button.correct {
  border-color: #effff4;
  color: #fff;
  background: linear-gradient(180deg, #20d866, #087f3a);
  box-shadow: 0 0 20px rgba(32, 216, 102, .85);
}

.control-region-map .whole-body-button.correct-answer {
  border-color: #43ef80;
  color: #43ef80;
  box-shadow: 0 0 16px rgba(32, 216, 102, .65);
}

.control-region-map .whole-body-button.wrong {
  border-color: #ff3448;
  color: #ff6a79;
  box-shadow: 0 0 16px rgba(255, 52, 72, .65);
}
