:root {
  --gold: #f9be25;
  --gold-dark: #8b4f08;
  --navy: #0c1044;
  --navy-2: #15245f;
  --purple: #33224e;
  --cream: #fff5d2;
  --ink: #110807;
  --green: #23865f;
  --green-light: #54d489;
  --brown: #9d4d34;
  --danger: #e54848;
  --shadow: rgba(0,0,0,.55);
  --mono: "Courier New", Courier, monospace;
  --display: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; margin: 0; }
body {
  overflow-x: hidden;
  color: white;
  background: #14286b url("../../assets/game/skin-v2/mission-reinforceable-background.png") center center / cover fixed no-repeat;
  font-family: var(--display);
}
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 4px solid #fff1a3; outline-offset: 3px; }

.mr-app {
  position: relative;
  width: min(1500px, 100vw);
  min-height: 900px;
  margin: 0 auto;
  padding-bottom: 120px;
}
.screen { display: none; position: relative; min-height: 790px; padding: 1px 0; }
.screen.is-active { display: block; }
.screen-loading { min-height: 900px; display: none; align-items: center; justify-content: center; }
.screen-loading.is-active { display: flex; }
.loading-card { width: min(760px, 90vw); text-align: center; background: rgba(4, 8, 45, .82); border: 5px solid var(--gold); box-shadow: 0 0 0 4px #4f2705, 0 15px 40px var(--shadow); padding: 36px; }
.loading-card img { width: 100%; height: auto; display: block; }
.loading-card p { font: 700 22px var(--mono); text-transform: uppercase; }

.screen-login { align-items: center; justify-content: center; padding: 40px 20px; }
.screen-login.is-active { display: flex; }
.login-card { width: min(560px, 100%); padding: 32px; background: rgba(4, 8, 45, .94); }
.login-card > img { display: block; width: 100%; height: auto; }
.login-card h1, .login-card > p { text-align: center; }
.login-card form { display: grid; gap: 10px; }
.login-card label { font: 700 16px var(--mono); text-transform: uppercase; }
.login-card input { width: 100%; padding: 12px; border: 3px solid var(--gold); background: var(--cream); color: var(--ink); }
.login-card button { margin-top: 10px; }
.login-error { min-height: 1.4em; margin: 4px 0 0; color: #ffb9b9; font-weight: 700; text-align: center; }
.participant-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 9px 10px 10px;
  border: 3px solid var(--gold);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(51, 34, 78, .98), rgba(12, 16, 68, .98));
  color: #fff5d2;
  font: 700 11px/1.2 var(--mono);
  text-align: center;
  text-shadow: 1px 1px 0 #050019;
  box-shadow: inset 0 0 0 2px #6e4316, 4px 5px 0 rgba(5, 0, 25, .72), 0 9px 18px rgba(0, 0, 0, .35);
}
.participant-controls button {
  padding: 4px 9px;
  border: 1px solid var(--gold);
  border-radius: 4px;
  background: #17123f;
  color: #fff5d2;
  font: inherit;
  cursor: pointer;
}
.participant-controls button:hover,
.participant-controls button:focus-visible { color: #fff; border-color: var(--gold); }
.participant-controls button:disabled { cursor: wait; opacity: .65; }

.gold-frame {
  border: 6px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 0 0 3px var(--gold-dark), inset 0 0 0 2px #ffe273, 0 14px 30px var(--shadow);
}
.star-panel {
  background:
    radial-gradient(circle at 8% 17%, rgba(255, 218, 91, .7) 0 3px, transparent 4px),
    radial-gradient(circle at 77% 19%, rgba(255, 218, 91, .55) 0 3px, transparent 4px),
    radial-gradient(circle at 30% 13%, rgba(255, 218, 91, .48) 0 2px, transparent 3px),
    linear-gradient(180deg, rgba(12, 16, 68, .98), rgba(10, 11, 55, .98));
}
.title-logo { display: block; width: min(920px, 70vw); height: auto; margin: 76px auto 4px; filter: drop-shadow(0 7px 0 #050019) drop-shadow(0 10px 8px rgba(0,0,0,.4)); }
.title-logo.small { width: min(760px, 66vw); margin-top: 45px; }

.home-panel { position: relative; width: 100%; min-height: 1500px; margin: 2px auto 0; padding: 52px 40px 36px; }
.classroom-plaque {
  position: absolute; top: -50px; left: 50%; transform: translateX(-50%); z-index: 5;
  min-width: 310px; height: 55px; padding: 11px 30px;
  color: #fff; background: transparent url("../../assets/game/skin-v2/box-title-frame.png") center / 100% 100% no-repeat; border: 0; border-radius: 0;
  text-align: center; font: 700 24px var(--display); text-shadow: 0 2px 0 #000;
  box-shadow: none;
}
.home-tagline { margin: 0 auto; text-align: center; color: #ffc84a; text-transform: uppercase; font: 900 clamp(24px, 2.3vw, 34px)/1 var(--mono); letter-spacing: 2px; text-shadow: 3px 3px #281200; }
.home-subtitle { margin: 2px auto 26px; text-align: center; color: #fff; font: 700 clamp(18px, 1.6vw, 25px)/1.1 var(--display); }
.home-layout { 
  display: grid; 
  grid-template-columns: 1fr 405px; 
  gap: 42px; 
  align-items: start; 
}

.classroom-stage { 
  position: relative; 
  min-width: 0; 
}

.classroom-img { 
  display: block; 
  width: 105%; 
}
.home-status-bubble {
  position: absolute;
  z-index: 2;
  top: 1%;
  left: 3%;
  width: 34%;
  aspect-ratio: 2422 / 1627;
  box-sizing: border-box;
  margin: 0;
  padding: 4% 3% 7%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  background: transparent url("../../assets/game/skin-v2/speech-bubble-right.png") center / 100% 100% no-repeat;
  text-align: center;
  font: 900 clamp(12px, 1.05vw, 17px)/1.3 var(--mono);
  text-shadow: none;
  filter: drop-shadow(8px 8px 0 #090000);
}
.home-status-bubble[hidden] { display: none; }
.start-classroom-btn { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); width: 265px; height: 57px; }
.speech { position: absolute; color: #111; background: #fff; border: 0; text-align: center; font: 900 19px/1.35 var(--mono); text-shadow: none; filter: drop-shadow(10px 10px 0 #090000); display: flex; align-items: center; justify-content: center; padding: 20px; }
.speech-left { background: transparent url("../../assets/game/skin-v2/speech-bubble-left.png") center / 100% 100% no-repeat; }
.speech-right { background: transparent url("../../assets/game/skin-v2/speech-bubble-right.png") center / 100% 100% no-repeat; }
.speech-down { background: transparent url("../../assets/game/skin-v2/speech-bubble-down.png") center / 100% 100% no-repeat; }
.wizard-chime { left: 4%; top: -47px; width: 228px; height: 139px; }
.home-bubbles-return { display: none; }
.home-return .home-bubbles-normal { display: none; }
.home-return .home-bubbles-return { display: block; }
.return-one { left: 3%; top: -45px; width: 235px; height: 138px; }
.return-two { right: 12%; top: 48px; width: 212px; height: 125px; }
.return-three { left: 1%; bottom: 74px; width: 222px; height: 145px; }

.mission-menu { position: relative; display: grid; gap: 24px; padding-top: 42px; }
.menu-title {
  position: absolute; z-index: 5; top: -30px; left: 50%; transform: translateX(-50%);
  min-width: 240px; padding: 7px 22px; color: #fff; background: transparent url("../../assets/game/skin-v2/box-title-frame.png") center / 100% 100% no-repeat; border: 0; border-radius: 0;
  text-align: center; font: 800 20px var(--display); text-shadow: 0 2px #000; box-shadow: none;
}
.mission-card {
  position: relative; min-height: 118px; display: grid; grid-template-columns: 83px 1fr; gap: 18px; align-items: center;
  padding: 17px 20px 18px 20px; background: transparent url("../../assets/game/skin-v2/answer-choice-frame.png") center / 100% 100% no-repeat; border: 0; border-radius: 0;
  box-shadow: none;
}
.mission-card img { width: 83px; height: 83px; object-fit: contain; image-rendering: auto; }
.mission-card h2 { margin: 0; color: #fff; font: 900 20px/1.05 var(--display); text-transform: uppercase; }
.mission-card p { margin: 2px 0 0; font: 700 18px/1.05 var(--display); }
.mission-card .green-btn { position: absolute; right: 37px; bottom: -18px; width: 155px; height: 52px; font-size: 15px; }

.pixel-btn { border: 0; color: #fff; text-transform: uppercase; font-weight: 900; text-shadow: 0 2px 0 rgba(0,0,0,.7); background-color: transparent; background-position: center; background-size: 100% 100%; filter: drop-shadow(0 4px 0 rgba(0,0,0,.35)); }
.pixel-btn:hover { transform: translateY(-1px); filter: brightness(1.06) drop-shadow(0 5px 0 rgba(0,0,0,.35)); }
.pixel-btn:active { transform: translateY(2px); filter: drop-shadow(0 2px 0 rgba(0,0,0,.35)); }
.green-btn { background-image: url("../../assets/game/skin-v2/green-button.png"); }
.brown-btn { background-image: url("../../assets/game/skin-v2/brown-button.png"); }

.bottom-nav { position: fixed; z-index: 50; left: 50%; bottom: 120px; transform: translateX(-50%); width: min(1228px, calc(100vw - 34px)); height: 92px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 42px; align-items: center; justify-content: center; padding: 13px 96px; background: #070a3a; }
.scroll-nav-btn { height: 66px; border: 0; background: transparent url("../../assets/game/skin-v2/bottom-menu-scroll.png") center / 100% 100% no-repeat; color: #0b0500; font: 900 24px/1 var(--display); text-transform: uppercase; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 28px; text-shadow: 1px 1px rgba(255,255,255,.45); }
.scroll-nav-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.scroll-nav-btn img { width: 34px; height: 34px; object-fit: contain; }

/* PLAY */
.screen-play, .screen-results { padding-top: 58px; }
.hud { width: min(1328px, 94vw); margin: 0 auto 14px; display: grid; grid-template-columns: 390px 1fr 1fr; gap: 34px; align-items: center; }
.heart-row { display: flex; gap: 11px; align-items: center; min-height: 70px; }
.heart-row img,
.heart-half { width: 58px; height: 50px; }
.heart-row img { object-fit: contain; image-rendering: pixelated; filter: drop-shadow(5px 5px 0 #080008); }
.heart-row img.heart-empty { opacity: .23; filter: grayscale(1) drop-shadow(5px 5px 0 #080008); }
.heart-half { position: relative; display: inline-block; flex: 0 0 auto; filter: drop-shadow(5px 5px 0 #080008); }
.heart-half img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; filter: none; }
.heart-half img.half { clip-path: inset(0 50% 0 0); }
.hud-meter { color: #fff; text-align: center; font-family: Arial, sans-serif; font-weight: 900; text-shadow: 0 2px 0 #17103d; }
.hud-meter strong { display: block; margin-bottom: 8px; font-size: 16px; }
.hud-meter small { display: block; margin-top: 8px; font-size: 15px; }
.meter { height: 29px; border: 4px solid #b99d96; border-radius: 15px; background: #121737; box-shadow: inset 0 0 0 3px #030411, 0 2px 0 rgba(255,255,255,.2); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0%; border-right: 4px solid rgba(255,255,255,.65); background: linear-gradient(180deg, #48ff8f, #07a74f 48%, #086b3f); box-shadow: 0 0 10px #75ffb8; transition: width .35s ease; }
.xp-meter .meter span { background: linear-gradient(180deg, #c96eff, #8a43df 48%, #5e279f); box-shadow: 0 0 10px #cc91ff; }
.play-panel {
  width: 100%;
  min-height: 700px;
  margin: 2px auto 0;
  padding: 34px 36px;
  display: grid;
  grid-template-columns: 1.25fr .85fr;
  gap: 33px;
  background: rgba(28, 100, 123, .45);
  backdrop-filter: blur(1px);
}
.scenario-area { min-width: 0; }
.scenario-scroll { width: 100%; min-height: 485px; background: transparent url("../../assets/game/skin-v2/scenario-scroll.png") center / 100% 100% no-repeat; padding: 130px 78px 78px 98px; color: #0c0500; }
.scenario-text {
  font: 700 clamp(20px, 1.45vw, 23px)/1.38 var(--mono);
  white-space: pre-line;
}

.scenario-text .scene-label {
  display: block;
  font: 900 32px/1 var(--display);
  margin-bottom: 4px;
}
.choices-area { position: relative; padding-top: 153px; }
.wizard-hint-wrap { position: absolute; top: -10px; right: 0; width: 430px; height: 140px; }
.scenario-hint { right: 78px; top: 0; width: 310px; height: 115px; font-size: 16px; line-height: 1.35; }
.wizard-sidekick { position: absolute; right: 0; top: -6px; width: 100px; height: 130px; object-fit: contain; filter: drop-shadow(5px 5px 0 #080008); }
.choice-list { display: grid; gap: 18px; }
.choice-btn { min-height: 126px; width: 100%; border: 0; color: #fff; background: transparent url("../../assets/game/skin-v2/answer-choice-frame.png") center / 100% 100% no-repeat; padding: 18px 36px; font: 900 clamp(19px, 1.65vw, 27px)/.96 var(--display); text-align: center; text-shadow: 0 2px 0 #111; display: flex; align-items: center; justify-content: center; }
.choice-btn:hover { filter: brightness(1.13); transform: translateX(-2px); }
.choice-btn:disabled { opacity: .7; cursor: wait; }

/* RESULTS */
.results-panel {
  position: relative;
  width: 100%;
  min-height: 700px;
  margin: 2px auto 0;
  padding: 38px 66px;
  background: rgba(28, 100, 123, .4);
}
.feedback-scroll { min-height: 486px; background: transparent url("../../assets/game/skin-v2/feedback-scroll.png") center / 100% 100% no-repeat; padding: 91px 80px 90px 96px; color: #0b0400; }
.results-content { font: 700 clamp(17px, 1.3vw, 21px)/1.35 var(--mono); }
.results-content h1 { margin: 0 0 6px; font: 900 30px var(--display); }
.results-content ul { margin-top: 8px; }
.results-debrief { display: grid; gap: 14px; }
.results-debrief h1 { margin-bottom: 0; }
.results-card { padding: 14px 16px; background: rgba(255, 248, 217, .58); border: 3px solid rgba(120, 70, 14, .65); border-radius: 8px; }
.results-card h2 { margin: 0 0 8px; color: #130700; font: 900 23px/1 var(--display); }
.results-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0; }
.results-stats div { min-width: 0; padding: 8px; background: rgba(255, 255, 255, .42); border: 2px solid rgba(120, 70, 14, .35); }
.results-stats dt { font: 900 13px/1.1 var(--mono); text-transform: uppercase; }
.results-stats dd { margin: 4px 0 0; font: 900 20px/1 var(--display); }
.results-review-group { display: grid; gap: 10px; margin-top: 12px; }
.results-review-item { padding: 12px; background: rgba(255, 255, 255, .46); border-left: 5px solid #8b4f08; }
.results-review-item h3 { margin: 0 0 6px; font: 900 19px/1 var(--display); }
.results-review-item p { margin: 0 0 8px; }
.results-empty-review { margin: 0; font-weight: 900; }
.results-wizard-note { position: absolute; right: 22px; bottom: 22px; width: 415px; height: 164px; }
.results-wizard-note img { position: absolute; right: 0; bottom: -3px; width: 140px; height: 136px; object-fit: contain; transform: rotate(6deg); filter: drop-shadow(5px 5px 0 #080008); }
.small-result-bubble { right: 92px; bottom: 24px; width: 285px; height: 110px; font-size: 16px; }

/* PROGRESS */
.screen-progress { padding-top: 55px; }
.progress-title { margin: 18px auto 5px; width: min(1400px, 96vw); color: #ffc54a; text-align: center; text-transform: uppercase; letter-spacing: 2px; font: 900 clamp(38px, 4.2vw, 58px)/1 var(--mono); white-space: nowrap; text-shadow: 4px 0 0 #050005, -4px 0 0 #050005, 0 4px 0 #050005, 0 -4px 0 #050005, 4px 4px 0 #050005, 0 8px 0 rgba(0,0,0,.3); }
.progress-bubble-wrap { position: relative; width: min(1050px, 78vw); min-height: 135px; margin: -8px auto 12px; }
.progress-bubble { position: absolute; inset: 0 110px 0 0; display: flex; align-items: center; justify-content: center; text-align: center; color: #111; text-transform: uppercase; font: 900 clamp(18px, 1.7vw, 27px)/1.15 var(--mono); background: transparent url("../../assets/game/skin-v2/progress-speech-bubble.png") center / 100% 100% no-repeat; padding: 18px 72px 28px; filter: drop-shadow(8px 8px 0 #080008); }
.progress-wizard { position: absolute; right: 0; top: 3px; width: 130px; height: 130px; object-fit: contain; filter: drop-shadow(5px 5px 0 #080008); transform: rotate(6deg); }
.badge-row { width: min(1120px, 88vw); margin: -44px auto -44px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-badge { position: relative; min-height: 245px; color: #080000; text-align: center; padding-top: 82px; background-position: top center; background-repeat: no-repeat; background-size: 235px 235px; }
.stat-badge.purple { background-image: url("../../assets/game/skin-v2/purple-badge.png"); }
.stat-badge.green { background-image: url("../../assets/game/skin-v2/green-badge.png"); }
.stat-badge.blue { background-image: url("../../assets/game/skin-v2/blue-badge.png"); }
.stat-badge.orange { background-image: url("../../assets/game/skin-v2/orange-badge.png"); }
.stat-badge strong { display: block; font: 900 44px var(--mono); letter-spacing: -2px; }
.stat-badge span { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); min-width: 205px; min-height: 50px; display: flex; align-items: center; justify-content: center; background: #f3c45a url("../../assets/game/skin-v2/small-frame.png") center / 100% 100% no-repeat; color: #090400; font: 900 17px var(--display); text-transform: uppercase; padding: 10px 12px; }
.score-disclaimer { width: min(900px, 86vw); margin: -22px auto 10px; text-align: center; color: #fff4ce; font: 800 16px/1.35 var(--display); }
.progress-list { width: min(1260px, 92vw); height: 315px; margin: 0 auto; padding: 30px 38px; overflow-y: auto; background: url("../../assets/game/skin-v2/large-frame.png") center / 100% 100% no-repeat, linear-gradient(rgba(8, 22, 82, .72), rgba(8, 22, 82, .72)); border: 0; border-radius: 0; box-shadow: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; align-content: start; }
.history-heading { grid-column: 1 / -1; margin: 0; color: #ffc54a; text-align: center; text-transform: uppercase; font: 900 25px var(--mono); }
.run-card { min-height: 145px; display: grid; grid-template-columns: 72px 1fr 125px; gap: 14px; align-items: center; padding: 16px 18px; background: transparent url("../../assets/game/skin-v2/mission-cards-border-frame.png") center / 100% 100% no-repeat; border: 0; border-radius: 0; box-shadow: none; }
.run-card img { width: 75px; height: 75px; object-fit: contain; }
.run-card h3 { margin: 0 0 2px; color: #ffc54a; text-transform: uppercase; font: 900 19px var(--mono); }
.run-card p { margin: 0; font: 700 16px/1.35 var(--display); }
.run-card .accuracy-good { color: #22e37d; }
.run-card .accuracy-mid { color: #ffc54a; }
.run-card .accuracy-low { color: #ff5a75; }
.run-card button { width: 128px; height: 52px; font-size: 15px; }
.empty-progress { grid-column: 1 / -1; text-align: center; font: 800 22px var(--mono); padding: 70px 20px; }
.progress-message { grid-column: 1 / -1; text-align: center; padding: 70px 20px; font: 800 20px/1.4 var(--mono); }
.progress-error { color: #ffd6dc; }
.mission-review { grid-column: 1 / -1; padding: 22px 28px; color: #1f1608; background: #f7e5b5; border: 5px solid #8d521d; border-radius: 8px; }
.mission-review > h2 { margin-top: 0; text-align: center; font: 900 25px var(--mono); }
.review-step { padding: 14px 0; border-top: 2px solid rgba(91, 53, 20, .35); }
.review-step h3 { margin: 0 0 8px; font: 900 18px/1.3 var(--mono); }
.review-step p { margin: 6px 0; font: 700 17px/1.4 var(--display); }

/* RESOURCE STRATEGY MAP */
.resources-panel { position: relative; width: min(1260px, 92vw); height: 700px; margin: 28px auto 0; padding: 34px 44px 46px; color: #fff; display: flex; flex-direction: column; gap: 12px; }
.resources-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(360px, .9fr); gap: 28px; align-items: stretch; }
.resources-scroll { min-width: 0; height: 100%; color: #0b0400; background: transparent url("../../assets/game/skin-v2/feedback-scroll.png") center / 100% 100% no-repeat; padding: 94px 88px 86px 104px; overflow: hidden; }
.resources-scroll h1 { margin: 0 0 28px; color: #130700; font: 900 31px/1 var(--display); letter-spacing: 2px; }
#resources-content { height: calc(100% - 62px); overflow-y: auto; -webkit-overflow-scrolling: touch; padding-right: 12px; font: 700 19px/1.38 var(--mono); }
.resource-map-wrap { position: relative; align-self: center; width: min(100%, 523px); aspect-ratio: 1071 / 1499; box-shadow: 0 12px 0 rgba(0, 0, 0, .25); background: #071245; }
.resource-map-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.map-hotspot { position: absolute; border: 0; border-radius: 999px; background: transparent; cursor: zoom-in; }
.map-hotspot::before,
.map-hotspot::after { content: ""; position: absolute; left: 50%; top: 50%; pointer-events: none; opacity: 0; transition: opacity .14s ease, transform .14s ease; }
.map-hotspot::before { width: 34px; height: 34px; border: 5px solid #fff4a4; border-radius: 50%; background: rgba(7, 18, 69, .12); box-shadow: 0 0 0 3px #3a1d00, 0 0 18px rgba(255, 224, 88, .86); transform: translate(-50%, -50%) scale(.7); }
.map-hotspot::after { width: 18px; height: 6px; border-radius: 999px; background: #fff4a4; box-shadow: 0 0 0 2px #3a1d00; transform: translate(6px, 10px) rotate(45deg) scale(.7); transform-origin: left center; }
.map-hotspot:hover::before,
.map-hotspot:hover::after,
.map-hotspot:focus-visible::before,
.map-hotspot:focus-visible::after,
.map-hotspot.is-active::before,
.map-hotspot.is-active::after { opacity: 1; }
.map-hotspot:hover::before,
.map-hotspot:focus-visible::before,
.map-hotspot.is-active::before { transform: translate(-50%, -50%) scale(1); }
.map-hotspot:hover::after,
.map-hotspot:focus-visible::after,
.map-hotspot.is-active::after { transform: translate(6px, 10px) rotate(45deg) scale(1); }
.map-hotspot:focus-visible { outline: 3px solid #fff4a4; outline-offset: 4px; }
.map-hotspot-prevention { left: 33%; top: 52.8%; width: 32%; height: 7.5%; }
.map-hotspot-replacement { left: 68%; top: 45.4%; width: 28%; height: 7.5%; }
.map-hotspot-reinforcement { left: 24%; top: 9.6%; width: 29%; height: 8%; }
.map-hotspot-error-correction { left: 69%; top: 72.2%; width: 28%; height: 8%; }
.map-hotspot-library { left: 3%; top: 61%; width: 31%; height: 7%; }
.map-hotspot-function { left: 12%; top: 28%; width: 25%; height: 7.5%; }
.map-hotspot-coaching { left: 3%; top: 86%; width: 24%; height: 7%; }
.map-hotspot-fidelity { left: 54%; top: 19.5%; width: 37%; height: 7.5%; }
.resources-footer { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(360px, .9fr); gap: 28px; align-items: center; }
.resources-contact { margin: 18px auto 0; max-width: 900px; text-align: center; color: #fff5d2; font: 800 15px/1.25 var(--mono); text-shadow: 2px 2px 0 #050005; }
.resources-contact a { color: #ffc54a; text-decoration: underline; }
.back-to-bip-btn { justify-self: center; min-width: 285px; min-height: 54px; padding: 10px 22px; color: #130700; text-transform: uppercase; font: 900 15px/1.05 var(--mono); background: #f4c56a url("../../assets/game/skin-v2/brown-button.png") center / 100% 100% no-repeat; border: 0; cursor: pointer; filter: drop-shadow(4px 5px 0 rgba(0, 0, 0, .45)); }
.back-to-bip-btn:hover,
.back-to-bip-btn:focus-visible { transform: translateY(-1px); filter: drop-shadow(4px 6px 0 rgba(0, 0, 0, .5)) brightness(1.05); }
.bip-section { margin: 0 0 22px; }
.bip-section h2 { margin: 0 0 8px; color: #130700; font: 900 25px/1 var(--display); }
.bip-section p { margin: 0 0 8px; }
.bip-section ul { margin: 6px 0 0 22px; padding: 0; }
.bip-section li { margin: 0 0 6px; }
.snapshot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
.behavior-basics { display: grid; gap: 10px; margin: 0; }
.behavior-basics div { display: grid; grid-template-columns: 190px 1fr; gap: 16px; }
.behavior-basics dt { font-weight: 900; }
.behavior-basics dd { margin: 0; }
.muted { color: #dad6ff; font: 700 15px var(--mono); }
code { background: rgba(0,0,0,.28); padding: 2px 5px; border-radius: 4px; }

.account-stack {
  position: fixed;
  right: clamp(10px, 2vw, 28px);
  bottom: clamp(18px, 3vh, 32px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: clamp(112px, 10vw, 148px);
  max-height: calc(100dvh - 18px);
}

.back-to-site-cottage {
  display: block;
  width: min(86%, 128px);
  height: auto;
  text-decoration: none;
  cursor: pointer;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45));
  transition: transform .16s ease, filter .16s ease;
}

.back-to-site-cottage img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.back-to-site-cottage:hover,
.back-to-site-cottage:focus-visible {
  transform: translateY(-2px) scale(1.03);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .55));
}

.back-to-site-cottage:focus-visible {
  outline: 3px solid #f6c94c;
  outline-offset: 4px;
  border-radius: 10px;
}

/* ============================================================
   CLEAN REBUILD STARTER ADJUSTMENTS — 2026-06-24
   Purpose: smaller overall containers, no duplicate home bubbles,
   and wizard popups/briefings as left speech bubbles.
   ============================================================ */

/* Slightly reduce the overall game footprint without changing the internal layout model. */
.mr-app {
  width: min(1360px, 100vw);
  min-height: 820px;
  padding-bottom: 96px;
}

.screen {
  min-height: 700px;
}

.screen-loading {
  min-height: 760px;
}

.title-logo {
  width: min(1400px, 94vw);
  margin: -100px auto 4px;
}

.title-logo.small {
  width: min(1400px, 94vw);
  margin: -100px auto 4px;
}

.home-panel {
  width: 90%;
  min-height: 535px;
  margin-top: -150px;
  padding: 52px 48px 36px;
}

.home-tagline {
  font-size: clamp(22px, 2.05vw, 30px);
}

.home-subtitle {
  font-size: clamp(17px, 1.45vw, 23px);
  margin-bottom: 21px;
}

.home-layout {
  grid-template-columns: 1.3fr 1fr;
  gap: 36px;
}

/* The landing and return classroom images already include their speech bubbles. */
.home-bubbles,
.home-bubbles-normal,
.home-bubbles-return {
  display: none !important;
}

.mission-menu {
  gap: 20px;
}

.mission-card {
  min-height: 110px;
  padding: 14px 20px 16px;
  grid-template-columns: 76px 1fr;
  gap: 15px;
}

.mission-card img {
  width: 76px;
  height: 76px;
}

.mission-card h2 {
  font-size: 19px;
}

.mission-card p {
  font-size: 16px;
}

.mission-card .green-btn {
  width: 140px;
  height: 48px;
  right: 20px;
  bottom: -16px;
  font-size: 15px;
}

.bottom-nav {
  width: min(1088px, calc(100vw - 34px));
  height: 82px;
  padding: 10px 80px;
  gap: 34px;
}

.scroll-nav-btn {
  height: 78px;
  font-size: 22px;
  gap: 18px;
  padding: 0 34px;
  background: transparent url("../../assets/game/skin-v2/bottom-menu-scroll.png") center / 100% 100% no-repeat;
}

.scroll-nav-btn img {
  width: 42px;
  height: 42px;
}

.screen-play,
.screen-results {
  padding-top: 46px;
}

.hud {
  width: min(1180px, 92vw);
  grid-template-columns: 340px 1fr 1fr;
  gap: 28px;
  margin-bottom: 10px;
}

.heart-row img,
.heart-half {
  width: 52px;
  height: 46px;
}

.play-panel,
.results-panel {
  width: min(1140px, 90vw);
  min-height: 520px;
}

.play-panel {
  padding: 30px 32px;
  gap: 28px;
}

.scenario-scroll {
  min-height: 430px;
  padding: 88px 68px 68px 88px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.scenario-text {
  font-size: clamp(20px, 1.45vw, 23px);
  line-height: 1.38;
}

.scenario-text .scene-label {
  font-size: 32px;
}

.choices-area {
  padding-top: 135px;
}

.wizard-hint-wrap {
  width: 390px;
  height: 130px;
}

.scenario-hint {
  right: 72px;
  width: 285px;
  height: 116px;
  font-size: 15px;
}

.wizard-sidekick {
  width: 92px;
  height: 120px;
}

.choice-list {
  gap: 15px;
}

.choice-btn {
  min-height: 110px;
  padding: 16px 30px;
  font-size: clamp(18px, 1.45vw, 24px);
}

.results-panel {
  padding: 34px 58px;
}

.feedback-scroll {
  min-height: 430px;
  padding: 82px 72px 82px 88px;
}

.results-content {
  font-size: clamp(16px, 1.17vw, 19px);
  line-height: 1.38;
}

/* Wizard-linked bubbles should sit to the left of the wizard and use the left bubble asset. */
.scenario-hint,
.small-result-bubble {
  background-image: url("../../assets/game/skin-v2/speech-bubble-left.png");
}

/* BIP briefing + answer feedback modal: speech bubble on the left, wizard on the right. */
.wizard-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .28);
  backdrop-filter: blur(3px);
}

.wizard-modal-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(980px, 90vw);
  height: min(630px, 82vh);
}

.wizard-modal-bubble {
  position: absolute;
  left: 0;
  top: 0;
  right: auto;
  bottom: auto;
  width: min(760px, calc(100% - 185px));
  height: min(530px, 100%);
  color: #090303;
  background: transparent url("../../assets/game/skin-v2/speech-bubble-left.png") center / 100% 100% no-repeat;
  padding: 82px 84px 128px 108px;
  filter: drop-shadow(16px 16px 0 #090000);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.wizard-modal[data-mode="feedback"] .wizard-modal-bubble {
  justify-content: center;
}

.wizard-modal-bubble h2 {
  width: min(100%, 580px);
  margin: 0 auto 16px;
  text-align: center;
  text-transform: uppercase;
  font: 900 30px var(--mono);
  letter-spacing: 1.5px;
}

.wizard-modal-bubble p {
  width: min(100%, 590px);
  max-height: 282px;
  overflow-y: auto;
  margin: 0 auto;
  font: 900 clamp(22px, 1.65vw, 29px)/1.38 var(--mono);
  text-align: center;
  white-space: pre-line;
}

.wizard-feedback-content {
  width: min(100%, 590px);
  max-height: 300px;
  overflow-y: auto;
  font-family: var(--mono);
}

.wizard-feedback-section { margin: 0 0 14px; text-align: left; }
.wizard-feedback-section:last-child { margin-bottom: 0; }
.wizard-feedback-section h3 {
  margin: 0 0 5px;
  color: #6d3500;
  font: 900 14px/1.2 var(--mono);
  letter-spacing: .8px;
  text-transform: uppercase;
}
.wizard-feedback-section p {
  width: 100%;
  max-height: none;
  margin: 0;
  overflow: visible;
  font: 700 17px/1.35 var(--mono);
  text-align: left;
  white-space: pre-line;
}
.wizard-feedback-section.consequence {
  border-left: 5px solid #d48a16;
  padding-left: 12px;
}
.wizard-feedback-section.consequence p { font-size: 19px; font-weight: 900; }
.wizard-feedback-section.reaction p { font-style: italic; }
.wizard-feedback-section.explanation {
  border-top: 2px solid rgba(109, 53, 0, .3);
  padding-top: 10px;
}

.wizard-modal[data-mode="welcome"] .wizard-modal-bubble h2 {
  width: 78%;
  max-width: 560px;
  margin-bottom: 12px;
  font-size: 26px;
  line-height: 1.05;
}

.wizard-modal[data-mode="welcome"] .wizard-modal-bubble p {
  width: 76%;
  max-width: 540px;
  max-height: none;
  overflow-y: hidden;
  font-size: 18px;
  line-height: 1.22;
}

.wizard-modal[data-mode="briefing"] .wizard-modal-bubble p {
  max-height: 430px;
  overflow-y: scroll;
  font: 900 clamp(15px, 1.1vw, 19px)/1.35 var(--mono);
}

.wizard-modal-bubble .green-btn {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 72px;
  font-size: 16px;
}

.wizard-modal-img {
  position: absolute;
  right: 22px;
  bottom: 34px;
  width: 188px;
  height: 264px;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(10px 10px 0 #070000);
}

.wizard-modal-img.briefing,
.wizard-modal-img.happy,
.wizard-modal-img.shocked,
.wizard-modal-img.questioning {
  width: 200px;
  height: 276px;
}

.wizard-modal-img.dead {
  width: 288px;
  height: 240px;
  right: 8px;
  bottom: 38px;
  transform: rotate(6deg);
}

/* ============================================================
   GLOBAL STAGE SCALE ONLY
   Keep stable navy/gold panels; do not asset-swap containers yet.
   ============================================================ */

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background:
    linear-gradient(rgba(18, 26, 82, 0.08), rgba(18, 26, 82, 0.08)),
    url("../../assets/game/skin-v2/mission-reinforceable-background.png")
    center center / cover no-repeat;
}

.mr-app {
  --game-width: 1500px;
  --game-height: 923px;
  --fit-scale: 1;

  position: fixed;
  left: 50%;
  top: 50%;
  width: var(--game-width);
  height: var(--game-height);
  min-height: 0;
  margin: 0;
  padding-bottom: 120px;
  transform: translate(-50%, -50%) scale(var(--fit-scale));
  transform-origin: center center;
  overflow: hidden;
  background: transparent;
}

.bottom-nav {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
}

.home-panel,
.play-panel,
.results-panel,
.progress-panel,
.resources-panel {
  background: rgba(6, 11, 62, 0.92);
  border: 6px solid #f0b52d;
  box-shadow:
    0 0 0 4px #7b4a16,
    0 18px 28px rgba(0, 0, 0, 0.45),
    inset 0 0 32px rgba(255, 215, 94, 0.08);
}

.home-panel,
.play-panel,
.results-panel,
.resources-panel {
  background: transparent url("../../assets/game/skin-v2/large-frame.png") center / 100% 100% no-repeat;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.home-panel::before {
  content: "";
  position: absolute;
  inset: 14px 18px;
  z-index: 0;
  pointer-events: none;
  background: rgba(8, 22, 82, .72);
}

.home-panel > * {
  position: relative;
  z-index: 1;
}

.resources-panel::before {
  content: "";
  position: absolute;
  inset: 14px 18px;
  z-index: 0;
  pointer-events: none;
  background: rgba(8, 22, 82, .72);
}

.resources-panel > * {
  position: relative;
  z-index: 1;
}

.choice-button {
  background: #14235f;
  border: 4px solid #d99a32;
  box-shadow:
    inset 0 0 0 2px #522d11,
    0 6px 0 rgba(0, 0, 0, 0.35);
}

.bottom-nav {
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(1260px, 92vw);
  height: 112px;
  padding: 18px 110px;
  gap: 58px;
  background: url("../../assets/game/skin-v2/large-frame.png") center / 100% 100% no-repeat, linear-gradient(rgba(8, 22, 82, .72), rgba(8, 22, 82, .72));
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* POLISH OVERRIDES — medium gameplay screen */

.play-panel {
  width: min(1500px, 92vw);
  min-height: 650px;
  padding: 34px 36px;
  grid-template-columns: 1.25fr .85fr;
  gap: 33px;
}

.scenario-scroll {
  min-height: 572px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  padding: 95px 76px 76px 96px;
}

.scenario-text {
  font: 900 clamp(20px, 1.45vw, 23px)/1.38 var(--mono);
}

.scenario-text .scene-label {
  font-size: 32px;
}

.choices-area {
  padding-top: 178px;
}

.choice-list {
  gap: 18px;
}

.choice-btn {
  min-height: 118px;
  font-size: clamp(20px, 1.55vw, 26px);
  padding: 18px 34px;
  background: transparent url("../../assets/game/skin-v2/answer-choice-frame.png") center / 100% 100% no-repeat;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* POLISH OVERRIDES — gameplay wizard hint alignment */

.wizard-hint-wrap {
  width: 585px;
  height: 300px;
  top: -14px;
  right: 0;
  cursor: pointer;
}

.wizard-hint-wrap:hover .scenario-hint,
.wizard-hint-wrap:focus-visible .scenario-hint,
.wizard-hint-wrap.is-open .scenario-hint {
  filter: drop-shadow(7px 7px 0 #080008) brightness(1.06);
}

.wizard-hint-wrap:focus-visible {
  outline: 4px solid #fff1a3;
  outline-offset: 4px;
}

.scenario-hint {
  right: 124px;
  top: -4px;
  width: 446px;
  height: 188px;
  font-size: 21px;
  line-height: 1.3;
  padding: 25px 34px;
}

.wizard-sidekick {
  width: 140px;
  height: 178px;
  right: 0;
  top: -12px;
}

/* POLISH OVERRIDES — final landing vertical alignment */

.title-logo,
.title-logo.small {
  width: min(1400px, 94vw);
  margin: -70px auto 4px;
}

.home-panel {
  margin-top: -145px;
  overflow: visible;
}

.home-panel > .classroom-plaque {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
}

.mission-menu {
  position: relative;
  top: 15px;
  overflow: visible;
  padding-top: 28px;
}

.menu-title {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
}

/* POLISH OVERRIDES — feedback page scroll fit */

.screen-results .results-panel {
  display: flex;
  flex-direction: column;
  min-height: 620px;
  padding: 24px 48px;
}

.screen-results .feedback-scroll {
  flex: 1 1 auto;
  min-height: 468px;
  max-height: none;
  padding: 72px 68px 70px 82px;
  overflow: hidden;
}

.screen-results .results-content {
  max-height: 355px;
  overflow-y: auto;
  font-size: clamp(21px, 1.55vw, 25px);
  line-height: 1.45;
}

.results-wizard-note {
  width: 690px;
  height: 276px;
}

.results-wizard-note img {
  width: 247px;
  height: 240px;
}

.small-result-bubble {
  right: 205px;
  width: 465px;
  height: 168px;
  font-size: 20px;
  line-height: 1.25;
}

.survey-wizard-note {
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 500px;
  height: 205px;
  pointer-events: none;
}

.survey-wizard-note img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 182px;
  height: 177px;
  object-fit: contain;
  transform: rotate(4deg);
  filter: drop-shadow(5px 5px 0 #080008);
}

.survey-wizard-bubble {
  right: 164px;
  bottom: 42px;
  width: 285px;
  height: 110px;
  font-size: 18px;
  line-height: 1.25;
  background-image: url("../../assets/game/skin-v2/speech-bubble-left.png");
}

.survey-rating {
  margin: 16px 0 18px;
  padding: 0;
  border: 0;
}

.survey-rating legend {
  margin: 0 0 8px;
  font-weight: 900;
}

.survey-rating-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.survey-rating-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 54px;
  min-height: 44px;
  padding: 7px 10px;
  color: #fff8d9;
  background: #2b1648;
  border: 3px solid #ffc54a;
  box-shadow: inset 0 0 0 2px #6b3a8f, 2px 2px 0 #080008;
  cursor: pointer;
}

.survey-rating-option input {
  width: 18px;
  height: 18px;
  accent-color: #ffc54a;
}

.survey-helper {
  display: block;
  margin-top: 7px;
  color: #3a2311;
  font: 700 16px/1.35 var(--mono);
}

.survey-debug-marker {
  display: inline-block;
  margin: 0 0 12px;
  padding: 6px 10px;
  color: #fff8d9;
  background: #2b1648;
  border: 3px solid #ffc54a;
  box-shadow: 2px 2px 0 #080008;
  font: 900 14px/1.2 var(--mono);
}

@media (min-width: 701px) {
  .scenario-scroll {
    max-height: 572px;
  }

  #survey-screen .results-panel {
    min-height: 744px;
  }

  #survey-screen .feedback-scroll {
    min-height: 562px;
    max-height: 608px;
  }

  #survey-screen .results-content {
    max-height: 426px;
  }

  #survey-screen select,
  #survey-screen textarea,
  #survey-screen input[type="email"] {
    width: min(100%, 720px);
    max-width: 100%;
    padding: 10px 14px;
    color: #160927;
    background: #fff8d9;
    border: 3px solid #ffc54a;
    box-shadow: 3px 3px 0 #080008;
    font: 700 21px/1.25 var(--mono);
  }

  #survey-screen select,
  #survey-screen input[type="email"] {
    min-height: 54px;
  }

  #survey-screen textarea {
    min-height: 132px;
    resize: vertical;
  }
}

/* POLISH OVERRIDES — keep start/play-again button centered */

.start-classroom-btn:hover,
.start-classroom-btn:focus-visible,
.start-classroom-btn:active {
  transform: translateX(-50%) translateY(-1px);
}

/* ============================================================
   MOBILE LAYOUT — SOURCE OF TRUTH
   ============================================================ */

@media (max-width: 700px) {
  html,
  body {
    width: 100%;
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body {
    background:
      linear-gradient(rgba(18, 26, 82, 0.08), rgba(18, 26, 82, 0.08)),
      url("../../assets/game/skin-v2/media-background.png")
      center center / cover no-repeat;
  }

  .mr-app {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    min-height: 100svh;
    margin: 0;
    padding: 10px 10px calc(88px + env(safe-area-inset-bottom));
    transform: none;
    overflow: visible;
  }

  .screen {
    min-height: auto;
    padding: 0;
  }

  .screen.is-active {
    display: block;
  }

  .title-logo,
  .title-logo.small {
    width: 92vw;
    margin: 18px auto 8px;
  }

  .home-panel {
    width: 100%;
    min-height: auto;
    margin: 0 auto;
    padding: 58px 14px 24px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .home-panel::before {
    display: none;
  }

  .home-panel > .classroom-plaque {
    top: 2px;
    width: min(320px, 86vw);
    min-width: 0;
    height: 46px;
    font-size: 18px;
    padding: 9px 18px;
  }

  .home-tagline {
    display: none;
  }

  .home-subtitle {
    display: none;
  }

  .home-layout {
    display: block;
  }

  .classroom-stage {
    width: 100%;
    min-height: 240px;
    margin: -8px auto -8px;
    background: transparent url("../../assets/game/skin-v2/mobile-landing-page-wizard.png") center / 101% auto no-repeat;
  }

  .classroom-img {
    display: none;
    max-height: 150px;
    object-fit: contain;
  }

  .wizard-chime {
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 130px;
  }

  .speech {
    font-size: 16px;
    line-height: 1.25;
    padding: 14px;
  }

  .start-classroom-btn {
    display: none;
  }

  .home-return .classroom-stage {
    background-image: url("../../assets/game/skin-v2/mobile-same-day-return-wizard.png");
  }

  .home-status-bubble {
    top: 20px;
    right: auto;
    left: 2%;
    width: 76%;
    padding: 30px 20px 44px;
    font-size: clamp(14px, 4.5vw, 19px);
    filter: drop-shadow(6px 6px 0 #090000);
  }

  .mission-menu {
    width: 100%;
    margin-top: 15px;
    padding-top: 26px;
    gap: 14px;
  }

  .menu-title {
    top: 0;
    width: min(260px, 76vw);
    min-width: 0;
    font-size: 18px;
  }

  .mission-card {
    min-height: 120px;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    padding: 16px 18px 22px;
  }

  .mission-card img {
    width: 68px;
    height: 68px;
  }

  .mission-card h2 {
    font-size: 18px;
  }

  .mission-card p {
    font-size: 15px;
    line-height: 1.15;
  }

  .mission-card .green-btn {
    width: 132px;
    height: 44px;
    right: 16px;
    bottom: -12px;
    font-size: 12px;
  }

  .bottom-nav {
    position: sticky;
    bottom: 0;
    left: auto;
    transform: none;
    width: 100%;
    height: 78px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    align-items: center;
    padding: 8px 8px;
    margin: 14px auto 0;
    background: url("../../assets/game/skin-v2/large-frame.png") center / 100% 100% no-repeat,
      linear-gradient(rgba(8, 22, 82, .72), rgba(8, 22, 82, .72));
    z-index: 50;
  }

  .scroll-nav-btn {
    height: 54px;
    min-width: 0;
    padding: 0 6px;
    font-size: 13px;
    line-height: 1;
    gap: 4px;
    background: transparent url("../../assets/game/skin-v2/bottom-menu-scroll.png") center / 100% 100% no-repeat;
  }

  .scroll-nav-btn img {
    width: 22px;
    height: 22px;
  }

  .screen-play {
    padding: 0 0 18px;
  }

  .screen-play .hud {
    position: sticky;
    top: 0;
    z-index: 60;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(94px, 1.25fr) minmax(70px, .85fr) minmax(70px, .85fr);
    gap: 7px;
    align-items: center;
    margin: 0 auto 8px;
    padding: 7px 8px calc(7px + env(safe-area-inset-top) / 2);
    color: #fff8d9;
    background:
      linear-gradient(180deg, rgba(7, 12, 58, .98), rgba(10, 19, 76, .96));
    border: 3px solid #ffc54a;
    border-radius: 8px;
    box-shadow: 0 3px 0 #080008, 0 8px 18px rgba(0, 0, 0, .28);
  }

  .screen-play .heart-row {
    justify-content: center;
    min-height: auto;
    gap: 3px;
    overflow: hidden;
  }

  .screen-play .heart-row img,
  .screen-play .heart-half {
    width: 20px;
    height: 18px;
  }

  .screen-play .hud-meter {
    position: relative;
    width: 100%;
    min-width: 0;
    padding-top: 11px;
    font-size: 12px;
  }

  .screen-play .hud-meter::before {
    position: absolute;
    left: 0;
    top: 0;
    color: #ffc54a;
    font: 900 9px/1 var(--mono);
    text-transform: uppercase;
    text-shadow: 1px 1px 0 #080008;
  }

  .screen-play .mission-meter::before {
    content: "Step";
  }

  .screen-play .xp-meter::before {
    content: "XP";
  }

  .screen-play .hud-meter strong {
    display: none;
  }

  .screen-play .hud-meter small {
    position: absolute;
    right: 0;
    top: 0;
    margin: 0;
    color: #ffffff;
    font: 900 10px/1 var(--mono);
    text-shadow: 1px 1px 0 #080008;
  }

  .screen-play .meter {
    height: 9px;
    border-width: 2px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px #030411;
  }

  .play-panel {
    width: 100%;
    min-height: auto;
    display: block;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .scenario-area {
    min-width: 0;
  }

  .scenario-scroll {
    position: relative;
    width: 100%;
    min-height: auto;
    max-height: min(38svh, 330px);
    padding: 12px 14px 16px;
    color: #fff8d9;
    background:
      linear-gradient(180deg, rgba(14, 25, 78, .98), rgba(9, 15, 55, .98));
    border: 3px solid #ffc54a;
    border-radius: 8px;
    box-shadow:
      inset 0 0 0 2px rgba(255, 226, 115, .2),
      0 4px 0 #080008,
      0 10px 22px rgba(0, 0, 0, .3);
    overflow-y: auto;
  }

  .scenario-scroll::before {
    content: "Scene";
    display: inline-block;
    margin: 0 0 8px;
    padding: 3px 8px;
    color: #071245;
    background: #ffc54a;
    border-radius: 4px;
    font: 900 12px/1 var(--mono);
    text-transform: uppercase;
    letter-spacing: .04em;
  }

  .scenario-text {
    font: 800 18px/1.48 var(--mono);
    text-align: left;
    text-shadow: 1px 1px 0 #050019;
  }

  .scenario-text .scene-label {
    margin-bottom: 8px;
    color: #ffc54a;
    font-size: 22px;
    line-height: 1.05;
    text-shadow: 2px 2px 0 #281200;
  }

  .choices-area {
    position: relative;
    padding-top: 0;
    margin-top: 12px;
  }

  .wizard-hint-wrap {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0 auto 10px;
    padding: 26px 58px 12px 12px;
    color: #071245;
    background: linear-gradient(180deg, #ffd980, #e8ad37);
    border: 3px solid #fff1a3;
    border-radius: 8px;
    box-shadow:
      inset 0 0 0 2px rgba(92, 50, 8, .35),
      0 3px 0 #080008;
  }

  .wizard-hint-wrap::before {
    content: "Wizard Hint";
    position: absolute;
    left: 12px;
    top: 8px;
    color: #271000;
    font: 900 11px/1 var(--mono);
    text-transform: uppercase;
    letter-spacing: .04em;
  }

  .scenario-hint {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    color: inherit;
    background: transparent;
    filter: none;
    font: 900 15px/1.34 var(--mono);
    text-align: left;
    text-shadow: none;
  }

  .wizard-sidekick {
    position: absolute;
    right: 8px;
    top: 50%;
    width: 39px;
    height: 52px;
    transform: translateY(-50%);
    filter: drop-shadow(3px 3px 0 #080008);
  }

  .choice-list {
    display: grid;
    gap: 10px;
    padding: 30px 10px 10px;
    background: linear-gradient(180deg, rgba(73, 42, 120, .98), rgba(42, 25, 86, .98));
    border: 3px solid #d9a8ff;
    border-radius: 8px;
    box-shadow:
      inset 0 0 0 2px rgba(255, 226, 115, .18),
      0 4px 0 #080008;
  }

  .choice-list::before {
    content: "Choose Your Move";
    margin: -20px 0 0;
    color: #fff1a3;
    font: 900 12px/1 var(--mono);
    text-transform: uppercase;
    letter-spacing: .04em;
  }

  .choice-btn {
    height: 100%;
    width: 100%;
    min-height: 58px;
    padding: 13px 14px;
    color: #fff8d9;
    background:
      linear-gradient(180deg, rgba(53, 35, 97, .98), rgba(20, 35, 95, .98));
    border: 3px solid #ffc54a;
    border-radius: 8px;
    box-shadow:
      inset 0 0 0 2px rgba(107, 58, 143, .9),
      3px 3px 0 #080008;
    font: 900 16px/1.24 var(--mono);
    text-align: left;
    text-shadow: 1px 1px 0 #050019;
    align-items: center;
    justify-content: flex-start;
  }

  .choice-btn:hover {
    transform: none;
  }

  .mr-app:has(#play-screen.is-active) .bottom-nav {
    display: none;
  }

  .screen-results {
    padding: 0 0 24px;
  }

  .results-panel {
    width: 100%;
    min-height: auto;
    margin: 0 auto;
    padding: 14px 4px 20px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .feedback-scroll {
    width: 100%;
    min-height: auto;
    max-height: none;
    margin-left: 0;
    padding: 76px 28px 62px;
    background: transparent url("../../assets/game/skin-v2/feedback-scroll.png") center / 100% 100% no-repeat;
    overflow: visible;
  }

  .results-content {
    font-size: 15.5px;
    line-height: 1.4;
  }

  .results-content h1 {
    font-size: 20px;
    line-height: 1.05;
    margin-bottom: 10px;
  }

  .results-content ul {
    margin: 8px 0 10px 18px;
    padding: 0;
  }

  .results-wizard-note {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    height: 174px;
    margin: 12px auto 0;
  }

  .results-wizard-note img {
    right: 4px;
    bottom: 0;
    width: 191px;
    height: 199px;
  }

  .small-result-bubble {
    right: 118px;
    bottom: 10px;
    width: calc(100% - 132px);
    height: 136px;
    font-size: 16px;
    line-height: 1.22;
    padding: 22px 26px;
  }

  #results-screen .results-panel {
    width: calc(100% - 24px);
    margin: 0 auto;
    padding: 14px 12px 18px;
    background:
      radial-gradient(circle at 8% 17%, rgba(255, 218, 91, .7) 0 3px, transparent 4px),
      radial-gradient(circle at 77% 19%, rgba(255, 218, 91, .55) 0 3px, transparent 4px),
      radial-gradient(circle at 30% 13%, rgba(255, 218, 91, .48) 0 2px, transparent 3px),
      linear-gradient(180deg, rgba(12, 16, 68, .98), rgba(10, 11, 55, .98));
    border: 6px solid var(--gold);
    box-shadow: 0 0 0 3px var(--gold-dark), inset 0 0 0 2px #ffe273, 0 14px 30px var(--shadow);
  }

  #results-screen .feedback-scroll {
    width: 100%;
    min-height: auto;
    max-height: none;
    padding: 12px;
    background: transparent;
    overflow: visible;
  }

  #results-screen .results-content {
    max-height: none;
    padding: 10px 8px;
    overflow-y: visible;
    color: #fff8d9;
    font-size: 17px;
    line-height: 1.45;
    text-shadow: 2px 2px 0 #050019;
  }

  #results-screen .results-content h1 {
    color: #ffc84a;
    font-size: 25px;
    line-height: 1.05;
    margin: 0 0 12px;
    text-shadow: 3px 3px 0 #281200;
  }

  #results-screen .results-content h2 {
    color: #ffc84a;
    font: 900 20px/1.1 var(--display);
    margin: 16px 0 8px;
    text-shadow: 2px 2px 0 #281200;
  }

  #results-screen .results-content p {
    margin: 0 0 12px;
  }

  #results-screen .results-content ul {
    margin: 8px 0 12px 20px;
    padding: 0;
  }

  #results-screen .results-debrief {
    gap: 12px;
  }

  #results-screen .results-card {
    padding: 12px;
    background: rgba(255, 248, 217, .08);
    border-color: rgba(255, 197, 74, .72);
  }

  #results-screen .results-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #results-screen .results-stats div:last-child {
    grid-column: 1 / -1;
  }

  #results-screen .results-stats div,
  #results-screen .results-review-item {
    background: rgba(255, 248, 217, .1);
    border-color: rgba(255, 197, 74, .55);
  }

  #results-screen .results-card h2,
  #results-screen .results-review-item h3 {
    color: #ffc84a;
  }

  .mobile-results-score,
  .mobile-results-reminder {
    color: #ffffff;
  }

  #survey-screen {
    padding: 132px 0 24px;
  }

  #survey-screen .results-panel {
    position: relative;
    width: calc(100% - 24px);
    min-height: auto;
    margin: 0 auto;
    padding: 16px 14px 20px;
    background:
      radial-gradient(circle at 8% 17%, rgba(255, 218, 91, .7) 0 3px, transparent 4px),
      radial-gradient(circle at 77% 19%, rgba(255, 218, 91, .55) 0 3px, transparent 4px),
      radial-gradient(circle at 30% 13%, rgba(255, 218, 91, .48) 0 2px, transparent 3px),
      linear-gradient(180deg, rgba(12, 16, 68, .98), rgba(10, 11, 55, .98));
    border: 6px solid var(--gold);
    box-shadow: 0 0 0 3px var(--gold-dark), inset 0 0 0 2px #ffe273, 0 14px 30px var(--shadow);
  }

  #survey-screen .feedback-scroll {
    width: 100%;
    min-height: auto;
    max-height: none;
    margin: 0;
    padding: 12px;
    background: transparent;
    overflow: visible;
  }

  #survey-screen .results-content {
    max-height: calc(100vh - 230px);
    padding: 10px 8px 16px;
    overflow-y: scroll;
    color: #fff8d9;
    font-size: 16px;
    line-height: 1.45;
    text-shadow: 2px 2px 0 #050019;
  }

  #survey-screen .results-content h2 {
    color: #ffc54a;
    font: 900 25px/1.05 var(--display);
    margin: 0 0 12px;
    text-shadow: 3px 3px 0 #281200;
  }

  #survey-screen .results-content h3 {
    color: #ffc54a;
    font: 900 20px/1.1 var(--display);
    margin: 18px 0 8px;
    text-shadow: 2px 2px 0 #281200;
  }

  #survey-screen .results-content p {
    margin: 0 0 12px;
  }

  #survey-screen select,
  #survey-screen textarea,
  #survey-screen input[type="email"] {
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    padding: 8px 10px;
    color: #160927;
    background: #fff8d9;
    border: 3px solid #ffc54a;
    box-shadow: 2px 2px 0 #080008;
  }

  #survey-screen .survey-helper {
    display: block;
    margin-top: 6px;
    color: #fff8d9;
    font-size: 14px;
    line-height: 1.35;
  }

  #survey-screen textarea {
    min-height: 96px;
  }

  #survey-screen .pixel-btn {
    max-width: 100%;
    white-space: normal;
  }

  #survey-screen .survey-wizard-note {
    position: absolute;
    top: -124px;
    right: 0;
    bottom: auto;
    width: 100%;
    height: 116px;
    pointer-events: none;
  }

  #survey-screen .survey-wizard-note img {
    right: 0;
    bottom: 0;
    width: 86px;
    height: 108px;
  }

  #survey-screen .survey-wizard-bubble {
    right: 76px;
    bottom: 10px;
    width: calc(100% - 88px);
    height: 96px;
    padding: 18px 26px 20px;
    font-size: 14px;
    line-height: 1.2;
  }

  .survey-rating {
    margin: 14px 0 16px;
  }

  .survey-rating-options {
    gap: 7px;
  }

  .survey-rating-option {
    flex: 1 1 46px;
    min-width: 46px;
    min-height: 48px;
    padding: 8px 6px;
    font-size: 16px;
  }

  .wizard-modal-bubble .green-btn {
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    width: min(210px, 58vw);
    height: 52px;
    margin: 0;
    font-size: 15px;
  }

  .wizard-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    padding: 16px 10px;
  }

  .wizard-modal[hidden] {
    display: none;
  }

  .modal-backdrop {
    background: rgba(0, 0, 0, .42);
    backdrop-filter: blur(2px);
  }

  .wizard-modal-card {
    position: absolute;
    left: 50%;
    top: 48%;
    transform: translate(-50%, -50%);
    width: min(430px, calc(100vw - 20px));
    height: min(540px, calc(100dvh - 32px));
    max-height: calc(100dvh - 32px);
    display: block;
    z-index: 1;
  }

  .wizard-modal-bubble {
    position: absolute;
    left: 0;
    top: 0;
    right: auto;
    bottom: auto;
    width: calc(100% - 58px);
    height: 100%;
    max-height: calc(100dvh - 32px);
    padding: 58px 30px 92px 34px;
    color: #090303;
    background: transparent url("../../assets/game/skin-v2/speech-bubble-left.png") center / 100% 100% no-repeat;
    border: 0;
    border-radius: 0;
    filter: drop-shadow(10px 10px 0 #090000);
    box-shadow: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }

  .wizard-modal-bubble h2 {
    width: 100%;
    margin: 0 0 8px;
    color: #090303;
    font-size: 18px;
    line-height: 1.1;
    letter-spacing: 0;
    text-align: center;
    text-shadow: none;
  }

  .wizard-modal-bubble p {
    width: 100%;
    max-height: calc(100dvh - 226px);
    margin: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    color: #090303;
    font: 900 15px/1.35 var(--mono);
    text-align: center;
    text-shadow: none;
  }

  .wizard-feedback-content {
    width: 100%;
    max-height: calc(100dvh - 226px);
  }

  .wizard-feedback-section h3 { font-size: 12px; }
  .wizard-feedback-section p,
  .wizard-feedback-section.consequence p { font-size: 14px; text-align: left; }

  .wizard-modal[data-mode="welcome"] .wizard-modal-bubble h2 {
    width: 100%;
    font-size: 17px;
    margin-bottom: 8px;
  }

  .wizard-modal[data-mode="welcome"] .wizard-modal-bubble p {
    width: 100%;
    max-height: calc(100dvh - 226px);
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.34;
  }

  .wizard-modal[data-mode="briefing"] .wizard-modal-bubble p,
  .wizard-modal[data-mode="feedback"] .wizard-modal-bubble p {
    max-height: calc(100dvh - 226px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font: 900 15px/1.35 var(--mono);
    text-align: center;
  }

  .wizard-modal-img {
    position: absolute;
    right: 0;
    bottom: 22px;
    width: 82px;
    height: 118px;
    margin-left: 0;
    cursor: pointer;
    filter: drop-shadow(4px 4px 0 #080008);
  }

  .wizard-modal-img.briefing,
  .wizard-modal-img.happy,
  .wizard-modal-img.shocked,
  .wizard-modal-img.questioning {
    width: 86px;
    height: 124px;
  }

  .wizard-modal-img.dead {
    width: 104px;
    height: 88px;
    right: -2px;
    bottom: 24px;
    transform: rotate(6deg);
  }

  .wizard-modal[data-mode="welcome"] .wizard-modal-card,
  .wizard-modal[data-mode="briefing"] .wizard-modal-card {
    top: 50%;
    width: min(430px, calc(100vw - 20px));
    height: auto;
    max-height: calc(100dvh - 32px);
  }

  .wizard-modal[data-mode="welcome"] .wizard-modal-bubble,
  .wizard-modal[data-mode="briefing"] .wizard-modal-bubble {
    position: relative;
    width: 100%;
    height: auto;
    max-height: calc(100dvh - 32px);
    padding: 22px 18px 86px;
    color: #fff8d9;
    background:
      linear-gradient(180deg, rgba(12, 16, 68, .98), rgba(8, 22, 82, .98));
    border: 4px solid var(--gold);
    border-radius: 8px;
    filter: none;
    box-shadow:
      0 0 0 3px var(--gold-dark),
      inset 0 0 0 2px rgba(255, 226, 115, .35),
      0 10px 24px rgba(0, 0, 0, .42);
    display: flex;
    align-items: stretch;
  }

  .wizard-modal[data-mode="welcome"] .wizard-modal-bubble h2,
  .wizard-modal[data-mode="briefing"] .wizard-modal-bubble h2 {
    color: #ffc54a;
    font-size: 20px;
    line-height: 1.08;
    text-align: center;
    text-shadow: 2px 2px 0 #281200;
  }

  .wizard-modal[data-mode="welcome"] .wizard-modal-bubble p,
  .wizard-modal[data-mode="briefing"] .wizard-modal-bubble p {
    max-height: calc(100dvh - 198px);
    color: #fff8d9;
    font: 700 15.5px/1.42 var(--mono);
    text-align: left;
    text-shadow: 1px 1px 0 #050019;
  }

  .wizard-modal[data-mode="welcome"] .wizard-modal-img,
  .wizard-modal[data-mode="briefing"] .wizard-modal-img {
    display: none;
  }

  .screen-progress {
    padding: 0 0 24px;
  }

  .progress-title {
    width: 100%;
    margin: 18px auto 8px;
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1.05;
    white-space: normal;
    text-align: center;
  }

  .progress-bubble-wrap {
    width: 100%;
    min-height: 112px;
    margin: 0 auto 10px;
  }

  .progress-bubble {
    inset: 0 70px 0 0;
    font-size: 14px;
    line-height: 1.2;
    padding: 18px 38px 24px;
  }

  .progress-wizard {
    right: 0;
    top: 10px;
    width: 82px;
    height: 82px;
  }

  .badge-row {
    width: 100%;
    margin: 4px auto 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
  }

  .stat-badge {
    min-height: 172px;
    padding-top: 58px;
    background-size: 150px 150px;
  }

  .stat-badge strong {
    font-size: 31px;
  }

  .stat-badge span {
    bottom: 0;
    min-width: 128px;
    min-height: 42px;
    font-size: 13px;
    padding: 8px 8px;
  }

  .progress-list {
    width: 100%;
    height: auto;
    max-height: none;
    margin: 10px auto 0;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .run-card {
    min-height: 112px;
    display: grid;
    grid-template-columns: 66px 1fr;
    gap: 10px;
    padding: 14px 16px 18px;
  }

  .run-card img {
    width: 58px;
    height: 58px;
  }

  .run-card h3 {
    font-size: 16px;
  }

  .run-card p {
    font-size: 14px;
    line-height: 1.2;
  }

  .run-card button {
    grid-column: 1 / -1;
    width: 100%;
    height: 46px;
    font-size: 15px;
    margin-top: 4px;
  }

  .empty-progress {
    font-size: 17px;
    padding: 36px 12px;
  }

  .screen-resources {
    padding: 0 0 24px;
  }

  .resources-panel {
    width: 100%;
    margin: 12px auto 0;
    height: auto;
    min-height: 0;
    padding: 12px 10px 20px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .resources-panel::before {
    display: none;
  }

  .resources-layout {
    display: block;
  }

  .resources-scroll {
    width: 100%;
    height: min(68dvh, 590px);
    max-height: 68dvh;
    padding: 54px 34px 48px;
    overflow: hidden;
    color: #0b0400;
    background: transparent url("../../assets/game/skin-v2/feedback-scroll.png") center / 100% 100% no-repeat;
  }

  .resources-scroll h1 {
    margin: 0 0 16px;
    font-size: clamp(24px, 7vw, 34px);
    line-height: 1.05;
    letter-spacing: 1px;
  }

  #resources-content {
    height: calc(100% - 50px);
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 6px;
    font-size: 16px;
    line-height: 1.4;
  }

  .resource-map-wrap {
    display: none;
  }

  .resources-footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    justify-items: center;
  }

  .back-to-bip-btn {
    width: min(100%, 360px);
    min-height: 52px;
    font-size: 14px;
  }

  .bip-section {
    margin-bottom: 16px;
  }

  .bip-section h2 {
    font-size: 20px;
    line-height: 1.05;
  }

  .snapshot-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .behavior-basics {
    gap: 8px;
  }

  .behavior-basics div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .resources-contact {
    margin: 10px auto 0;
    padding: 0 10px;
    font-size: 16px;
    line-height: 1.3;
    text-align: center;
  }

  .account-stack {
    right: max(8px, env(safe-area-inset-right, 0px));
    bottom: calc(env(safe-area-inset-bottom, 0px) + 92px);
    width: clamp(98px, 28vw, 124px);
    gap: 3px;
  }

  .participant-controls {
    gap: 4px;
    padding: 7px 7px 8px;
    border-width: 2px;
    font-size: 9px;
  }

  .participant-controls button {
    padding: 3px 7px;
  }

  body .sound-toggle {
    left: 10px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    z-index: 150;
  }

}

/* BUG FIX OVERRIDES - partial hearts keep the full pixel silhouette, and decorative hint art cannot intercept answer clicks. */
.heart-half {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  overflow: visible;
  filter: none;
}

.heart-half img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.heart-half .heart-base {
  opacity: .23;
  filter: grayscale(1) drop-shadow(5px 5px 0 #080008);
}

.heart-half .heart-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  clip-path: inset(0 calc(100% - var(--heart-fill, 50%)) 0 0);
}

.heart-half .heart-fill img {
  width: 100%;
  filter: drop-shadow(5px 5px 0 #080008);
}

.choices-area {
  z-index: 2;
}

.scenario-hint,
.wizard-sidekick {
  pointer-events: none;
}

.wizard-hint-wrap {
  pointer-events: auto;
}

.choice-list {
  position: relative;
  z-index: 20;
}

.choice-btn {
  position: relative;
  z-index: 21;
  pointer-events: auto;
}

.sound-toggle {
  position: fixed;
  left: clamp(10px, 2vw, 28px);
  bottom: clamp(8px, 1.5vh, 18px);
  z-index: 10000;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px 8px;
  border: 3px solid #f6c94c;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(42, 29, 93, .98), rgba(12, 28, 61, .98));
  color: #fff4cf;
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #080008;
  box-shadow:
    inset 0 0 0 2px #3b237c,
    4px 4px 0 #080008,
    0 10px 18px rgba(0, 0, 0, .32);
  cursor: pointer;
  image-rendering: pixelated;
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  filter: brightness(1.12);
  outline: 3px solid #fff4cf;
  outline-offset: 3px;
}

.sound-toggle__switch {
  position: relative;
  width: 38px;
  height: 21px;
  border: 2px solid #f6c94c;
  border-radius: 7px;
  background: #17243a;
  box-shadow: inset 0 0 0 2px #080008;
}

.sound-toggle__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: #fff4cf;
  box-shadow: 2px 2px 0 #000;
  transition: transform .15s ease;
}

.sound-toggle[aria-pressed="true"] .sound-toggle__switch {
  background: #5b3aa4;
}

.sound-toggle[aria-pressed="true"] .sound-toggle__knob {
  transform: translateX(17px);
}
body.qa-preview { padding-top: 4.25rem; }
.qa-preview-banner {
  position: fixed; inset: 0 0 auto; z-index: 10000; padding: .8rem 1rem;
  display: flex; align-items: center; justify-content: center; gap: 2rem;
  color: #fff; background: #7b1020; border-bottom: 4px solid #ffd36a;
  font: 700 clamp(.8rem, 2vw, 1rem)/1.25 system-ui, sans-serif; text-align: center;
}
.qa-preview-banner[hidden] { display: none; }
.qa-preview-banner a { color: #fff; text-decoration: underline; }

/* Resource blocks remain easy to scan inside the existing parchment renderer. */
#resources-content > p,
#resources-content > ul,
#resources-content > dl,
#resources-content > .resource-callout { margin: 0 0 16px; }
#resources-content ul { padding-left: 1.35em; }
#resources-content li + li { margin-top: 8px; }
#resources-content .behavior-basics > div + div { margin-top: 12px; }
#resources-content .behavior-basics dt { font-weight: 900; }
#resources-content .behavior-basics dd { margin: 3px 0 0; }
#resources-content .resource-callout {
  padding: 12px 14px;
  border: 2px solid rgba(91, 53, 20, .55);
  border-radius: 6px;
  background: rgba(244, 197, 106, .35);
}
#resources-content .resource-callout strong { display: block; margin-bottom: 5px; }
#resources-content .resource-callout p { margin: 0; }

#resources-content > .resource-heading { margin: 24px 0 8px; color: #321708; font: 900 23px/1.2 var(--display); letter-spacing: .4px; }
#resources-content > .resource-heading:first-child { margin-top: 0; }
