:root {
  --navy: #0d2033;
  --navy-2: #152d43;
  --ink: #2b1712;
  --burgundy: #74291f;
  --red: #a73a2d;
  --cream: #f7ecd9;
  --paper: #fffaf0;
  --mint: #9fd6b2;
  --mint-dark: #315c4d;
  --blue: #8bb5cf;
  --gold: #d6a865;
  --line: #5a3b2d;
  --shadow: 0 10px 0 #301b17, 0 18px 30px rgba(0, 0, 0, .35);
  font-family: "Courier New", ui-monospace, monospace;
  color: var(--cream);
  background: var(--navy);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 20%, rgba(112, 158, 183, .18), transparent 28rem),
    linear-gradient(180deg, #071728 0%, #10283b 52%, #081825 100%);
  overflow-x: hidden;
}

button, a { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, [role="button"]:focus-visible { outline: 3px solid #f2d38f; outline-offset: 4px; }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .17;
  background-image: url("assets/shop-background.webp");
  background-size: cover;
  mix-blend-mode: soft-light;
  filter: grayscale(1) contrast(1.8);
}

.app-shell { width: min(1580px, calc(100% - 32px)); margin: 0 auto; padding: 26px 0 42px; position: relative; }

.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.brand-block { min-width: 0; }
.eyebrow { margin: 0 0 5px; color: var(--mint); font-size: 12px; letter-spacing: .09em; font-weight: 800; }
h1 { margin: 0; font-size: clamp(34px, 3.6vw, 62px); line-height: .95; color: #f8e5bf; text-shadow: 4px 4px 0 #5c291f; letter-spacing: -.06em; }
.subtitle { margin: 9px 0 0; color: #f7d7aa; font-size: 16px; }
.header-actions { display: flex; align-items: stretch; gap: 12px; flex: 0 0 auto; }
.mint-badge { display: flex; gap: 10px; align-items: center; background: rgba(22, 18, 16, .78); border: 3px solid #43271f; padding: 9px 14px; color: #b8e4c4; font-weight: 800; box-shadow: 0 5px 0 #060d13; }
.mint-badge small { display: block; color: #6fa987; font-size: 10px; }
.mint-badge b { display: block; }
.icon-button { min-width: 68px; border: 3px solid #e2b77c; color: #fff1d5; background: #3d241d; box-shadow: 0 5px 0 #120c0a; padding: 7px; font-weight: 900; }
.icon-button span { display: block; font-size: 28px; line-height: 1; }
.icon-button small { font-size: 10px; }

.mini-scoop, .big-scoop { display: inline-block; border-radius: 50% 50% 40% 40%; border: 3px solid rgba(46, 30, 23, .7); position: relative; flex: 0 0 auto; }
.mini-scoop { width: 28px; height: 24px; }
.big-scoop { width: 58px; height: 48px; }
.mini-scoop::after, .big-scoop::after { content: ""; position: absolute; left: 22%; right: 22%; top: 20%; bottom: 18%; background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(45, 23, 18, .24) 7px 10px); }
.mint { background-color: #9edeb5 !important; }
.vanilla { background-color: #f8e4b8 !important; }

.progress-row { margin: 22px 0 18px; display: grid; grid-template-columns: 105px 1fr auto; gap: 14px; align-items: center; }
.progress-copy { display: flex; gap: 10px; align-items: center; font-size: 20px; }
.progress-track { height: 17px; border: 3px solid #4a2a21; background: #251814; box-shadow: 0 4px 0 #06101a; padding: 2px; }
.progress-track span { display: block; width: 0; height: 100%; background: repeating-linear-gradient(90deg, #9ac9b0 0 18px, #71a88c 18px 22px); transition: width .5s steps(6); }
.text-button { color: #c6d9df; border: 0; background: transparent; text-decoration: underline; padding: 5px; }

.game-layout { display: grid; grid-template-columns: minmax(215px, .72fr) minmax(500px, 1.85fr) minmax(270px, .95fr); gap: 18px; align-items: stretch; }
.panel { border: 4px solid #59352a; box-shadow: var(--shadow); background: rgba(18, 38, 54, .94); min-width: 0; }
.panel-heading { background: linear-gradient(#8d382c, #62261f); border-bottom: 4px solid #42251e; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; }
.panel-heading span { color: #d3a875; font-size: 12px; }
.panel-heading h2 { margin: 0; font-size: 19px; color: #ffe6bf; }

.wardrobe { padding-bottom: 13px; display: flex; flex-direction: column; }
.character-options { padding: 12px; display: grid; gap: 10px; }
.character-option { position: relative; height: 150px; border: 3px solid #3e5d6a; background: linear-gradient(135deg, #214157, #122a3b); overflow: hidden; padding: 0; }
.character-option::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.12) 47%, transparent 60%); pointer-events: none; }
.character-option.selected { border-color: #f3d094; box-shadow: inset 0 0 0 3px #7c2f25; }
.character-thumb { position: absolute; inset: 3px; background-repeat: no-repeat; background-position: center bottom; background-size: contain; image-rendering: pixelated; }
.thumb-0 { background-image: url("assets/look-01-v4.webp"); }
.thumb-1 { background-image: url("assets/look-02-v4.webp"); }
.thumb-2 { background-image: url("assets/look-03-v4.webp"); }
.look-number { position: absolute; left: 7px; bottom: 5px; color: #fff3d3; background: #4b291f; border: 2px solid #d7ac72; padding: 3px 6px; z-index: 2; font-weight: 900; }
.character-detail { min-height: 48px; border-top: 2px dashed #517080; margin: 0 12px; padding: 12px 2px 7px; }
.character-detail strong { display: block; color: #f3d196; font-size: 14px; }
.character-detail span { display: block; color: #a8c3cf; font-size: 11px; margin-top: 4px; line-height: 1.45; }
.primary { border: 3px solid #f4d3a1; background: linear-gradient(#9c4437, #69281f); color: #fff1d3; font-weight: 900; box-shadow: 0 5px 0 #301914; }
.primary.small { margin: auto 12px 0; padding: 10px 8px; }
.primary:disabled { filter: grayscale(.65); opacity: .72; cursor: default; }

.stage-panel { position: relative; overflow: hidden; display: flex; flex-direction: column; }
.shop-sign { display: flex; align-items: center; justify-content: center; gap: 18px; background: linear-gradient(#8d392e, #672a22); border-bottom: 5px solid #4e2a22; padding: 12px; color: #f6dfb6; }
.shop-sign h2 { margin: 0; font-size: 25px; letter-spacing: .07em; }
.stage-scene { min-height: 570px; position: relative; display: grid; grid-template-columns: 29% 54% 17%; align-items: end; padding: 28px 18px 18px; background:
  linear-gradient(rgba(11,31,47,.16), rgba(4,20,31,.75)),
  url("assets/shop-background.webp") center / cover;
}
.stage-scene::before { content: ""; position: absolute; inset: 0; background: rgba(8, 29, 44, .63); backdrop-filter: blur(1px); }
.hero-wrap { height: 490px; position: relative; z-index: 2; align-self: end; }
.hero-sprite { position: absolute; inset: 0; background-repeat: no-repeat; background-position: center bottom; background-size: contain; image-rendering: pixelated; filter: drop-shadow(0 10px 1px rgba(0,0,0,.35)); }
.character-0 { background-image: url("assets/look-01-v4.webp"); }
.character-1 { background-image: url("assets/look-02-v4.webp"); }
.character-2 { background-image: url("assets/look-03-v4.webp"); }
.hero-shadow { position: absolute; width: 75%; height: 20px; left: 13%; bottom: 10px; border-radius: 50%; background: rgba(0,0,0,.45); filter: blur(3px); z-index: -1; }
.freezer-map { z-index: 2; align-self: center; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px; border: 5px solid #765245; border-radius: 22px 22px 5px 5px; background: linear-gradient(135deg, rgba(171,207,220,.8), rgba(53,85,103,.88)); box-shadow: inset 0 0 0 4px #b9d0d8, 0 12px 0 rgba(38,24,20,.65); }
.stage-node { min-height: 107px; border: 4px solid #b7a27f; border-radius: 50%; background: #334451; color: #e8dfca; box-shadow: inset 0 0 0 3px #5d6770, 0 5px 0 #23303a; padding: 9px 6px; text-align: center; font-weight: 900; position: relative; }
.stage-node span { display: block; color: #d9be8e; font-size: 12px; margin-bottom: 5px; }
.stage-node strong { display: block; font-size: 12px; line-height: 1.15; }
.stage-node small { display: block; margin-top: 5px; color: #99acb5; }
.stage-node.locked { filter: grayscale(1); opacity: .65; cursor: not-allowed; }
.stage-node.complete { color: #233b31; background: #9ed4b1; border-color: #f0dfaf; box-shadow: inset 0 0 0 3px #6aa580, 0 5px 0 #253c33; }
.stage-node.complete span, .stage-node.complete small { color: #4a654d; }
.stage-node.current { animation: nodeGlow 1.6s steps(2) infinite; }
@keyframes nodeGlow { 50% { box-shadow: inset 0 0 0 3px #5d6770, 0 5px 0 #23303a, 0 0 20px #f4d58f; } }
.display-case { position: relative; z-index: 2; height: 210px; display: flex; align-items: flex-end; gap: 5px; padding: 20px 8px; border: 4px solid #6e5146; background: linear-gradient(145deg, rgba(164,210,221,.58), rgba(30,55,68,.82)); clip-path: polygon(25% 0, 100% 0, 100% 100%, 0 100%, 0 22%); }
.flavor-bin { width: 33.3%; height: 78px; border-radius: 50% 50% 10% 10%; border: 3px solid #39241f; }
.cocoa { background: #ae8262; }
.berry { background: #d88e92; }
.neon-sign { position: absolute; right: 2.5%; top: 32px; z-index: 4; color: #f4a360; text-align: center; text-shadow: 0 0 6px #ff723e, 0 0 14px #ff723e; cursor: pointer; transform: rotate(1deg); }
.neon-sign strong { display: block; font-size: 16px; line-height: .9; border: 3px solid #e55b43; border-radius: 12px; padding: 5px; background: rgba(18,20,18,.72); }
.neon-swirl { display: block; width: 45px; height: 35px; margin: 0 auto 4px; border: 5px solid #86e1a3; border-left-color: transparent; border-radius: 65% 35% 55% 45%; box-shadow: 0 0 12px #62e69a; }
.stage-hint { padding: 10px 14px; color: #d3e1df; background: #071823; border-top: 3px solid #4f342b; min-height: 45px; font-size: 12px; line-height: 1.4; }

.tracklist { padding: 16px 15px; background: linear-gradient(#72584a 0 7%, #253a49 7%); }
.receipt-pin { width: 95px; height: 16px; background: #b8aaa2; border: 3px solid #4d3a33; border-radius: 6px; margin: -9px auto -6px; position: relative; z-index: 2; }
.receipt { min-height: 100%; color: #3a1d16; background: var(--paper); padding: 32px 20px 20px; clip-path: polygon(0 0, 100% 0, 100% 98%, 97% 100%, 94% 98%, 91% 100%, 88% 98%, 85% 100%, 82% 98%, 79% 100%, 76% 98%, 73% 100%, 70% 98%, 67% 100%, 64% 98%, 61% 100%, 58% 98%, 55% 100%, 52% 98%, 49% 100%, 46% 98%, 43% 100%, 40% 98%, 37% 100%, 34% 98%, 31% 100%, 28% 98%, 25% 100%, 22% 98%, 19% 100%, 16% 98%, 13% 100%, 10% 98%, 7% 100%, 4% 98%, 0 100%); }
.receipt-meta { display: flex; justify-content: space-between; gap: 5px; font-weight: 900; font-size: 9px; color: #71352c; }
.receipt h2 { margin: 25px 0 12px; text-align: center; font-size: 31px; border-bottom: 2px solid #5f4036; padding-bottom: 12px; }
.receipt ol { padding: 0; margin: 0; list-style: none; }
.track-item { display: grid; grid-template-columns: 30px 1fr 22px; gap: 7px; align-items: center; padding: 13px 0; border-bottom: 1px dashed #7b5b4e; }
.track-item strong { min-width: 0; overflow-wrap: anywhere; }
.track-item .number { font-size: 17px; font-weight: 900; }
.track-item strong { font-size: 12px; line-height: 1.15; }
.track-item .status { font-size: 14px; color: #9e8b7d; }
.track-item.complete { color: #245f4a; }
.track-item.complete .status { color: #2f8b67; text-shadow: 0 0 8px #77d3a2; }
.barcode { height: 52px; margin: 20px 0 10px; background: repeating-linear-gradient(90deg, #2c1c17 0 2px, transparent 2px 4px, #2c1c17 4px 5px, transparent 5px 9px, #2c1c17 9px 13px, transparent 13px 16px); }
.receipt-note { text-align: center; font-size: 9px; font-weight: 900; }

.bottom-actions { display: grid; grid-template-columns: 1fr minmax(290px, 1.4fr) 1fr; gap: 18px; margin-top: 23px; align-items: stretch; }
.start-button, .secondary { border: 4px solid #e4bb82; background: linear-gradient(#984134, #6e2b23); color: #fff0d0; box-shadow: 0 8px 0 #2c1713; font-weight: 900; }
.start-button { padding: 10px 24px; }
.start-button span { display: block; font-size: 44px; line-height: 1; text-shadow: 3px 3px 0 #3d1c17; }
.start-button small { display: block; margin-top: 6px; color: #edcc9a; }
.secondary { padding: 12px; font-size: 14px; }
.secondary:disabled { filter: grayscale(1); opacity: .55; cursor: not-allowed; }

dialog { border: 0; padding: 0; background: transparent; color: inherit; max-width: none; }
dialog::backdrop { background: rgba(2, 10, 16, .82); backdrop-filter: blur(5px); }
.dialog-card, .help-card { position: relative; width: min(720px, calc(100vw - 30px)); background: #102b40; border: 5px solid #d5a96f; box-shadow: 0 14px 0 #341c17, 0 30px 80px #000; padding: 28px; text-align: center; }
.dialog-kicker { color: var(--mint); font-weight: 900; letter-spacing: .12em; font-size: 12px; }
.dialog-card h2, .help-card h2 { margin: 7px 0 8px; font-size: clamp(31px, 6vw, 60px); color: #f5d7a7; text-shadow: 3px 3px 0 #682d24; }
.dialog-card > p { color: #c8dce2; }
.stage-briefing { display: none; margin-top: 18px; }
.game-dialog.is-briefing .stage-briefing { display: block; }
.game-dialog.is-briefing .game-hud, .game-dialog.is-briefing .mini-game-shell, .game-dialog.is-briefing .mini-status { display: none; }
.briefing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: left; }
.briefing-grid article { min-height: 128px; padding: 13px; border: 3px solid #4d3027; background: #071823; box-shadow: inset 0 0 0 2px #24485b; }
.briefing-grid small { display: block; margin-bottom: 8px; color: #9edeb5; font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.briefing-grid strong { color: #e8dfca; font-size: 12px; line-height: 1.65; }
.stage-start-button { width: min(300px, 100%); min-height: 54px; margin-top: 16px; border: 4px solid #f2d49f; background: #8a3c31; color: #fff2d5; box-shadow: 0 6px 0 #341c17; font-size: 18px; font-weight: 900; }
.game-hud { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 0; }
.game-hud > div { border: 3px solid #4d3027; background: #071823; padding: 7px 10px; text-align: left; box-shadow: inset 0 0 0 2px #24485b; }
.game-hud small { display: block; color: #7fa9b7; font-size: 9px; letter-spacing: .12em; }
.game-hud strong { display: block; color: #f2d49f; font-size: 19px; margin-top: 2px; }
.close-button { position: absolute; right: 10px; top: 7px; width: 40px; height: 40px; border: 0; background: transparent; color: #f6d09b; font-size: 35px; line-height: 1; z-index: 10; }
.game-language-button { position: absolute; left: 10px; top: 9px; z-index: 12; min-height: 36px; display: flex; align-items: center; gap: 6px; padding: 5px 9px; border: 2px solid #d5a96f; background: #351f1b; color: #fff1d5; font-weight: 900; }
.game-language-button span { font-size: 16px; }
.game-language-button small { font-size: 9px; }
.language-card { width: min(650px, calc(100vw - 24px)); padding: clamp(24px, 5vw, 48px); border: 5px solid #9edeb5; background: #102b40; color: #f5e8ca; text-align: center; box-shadow: 0 14px 0 #173b31, 0 32px 90px #000; }
.language-card h2 { margin: 8px 0 10px; color: #f5d7a7; font-size: clamp(32px, 6vw, 54px); text-shadow: 3px 3px 0 #682d24; }
.language-card > p:not(.dialog-kicker) { max-width: 530px; margin: 0 auto 22px; color: #c8dce2; line-height: 1.65; }
.language-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.language-options button { min-height: 112px; padding: 14px 8px; border: 3px solid #d5a96f; background: #351f1b; color: #fff1d5; box-shadow: 0 6px 0 #160d0b; }
.language-options button:hover, .language-options button:focus-visible { border-color: #9edeb5; transform: translateY(-2px); outline: 0; }
.language-options strong { display: block; font-size: clamp(20px, 4vw, 30px); }
.language-options small { display: block; margin-top: 8px; color: #9edeb5; font-size: 10px; }
.mini-game { min-height: 300px; margin: 20px 0 12px; border: 4px solid #4d3027; background-color: #89afbd; background-size: cover; background-position: center; position: relative; overflow: hidden; color: #3d2019; box-shadow: inset 0 0 0 999px rgba(9, 24, 35, .12); }
.stage-theme-1 { background-image: url("assets/stage-01-v2.webp"); }
.stage-theme-2 { background-image: url("assets/stage-02.webp"); }
.stage-theme-3 { background-image: url("assets/stage-03.webp"); }
.stage-theme-4 { background-image: url("assets/stage-04.webp"); }
.stage-theme-5 { background-image: url("assets/stage-05.webp"); }
.stage-theme-6 { background-image: url("assets/stage-06.webp"); }
.mini-status { display: flex; justify-content: space-between; color: #f2d49f; font-weight: 900; }
.tap-target { position: absolute; z-index: 2; width: 76px; height: 76px; border-radius: 50%; border: 4px solid #5b3a28; background: #f5dfb6; box-shadow: 0 7px 0 #7b5037, 0 0 0 4px rgba(245, 223, 182, .25); font-size: 10px; font-weight: 900; color: #5c3523; }
.tap-target.good:hover { filter: brightness(1.12); }
.tap-target.bad { background: #6c3542; color: #ffe3cf; box-shadow: 0 7px 0 #321b27; }
.tap-target:disabled { cursor: default; }
.tap-target.pop { animation: targetPop .18s steps(2); }
@keyframes targetPop { from { transform: translate(-50%, 0) scale(.6); } to { transform: translate(-50%, 0) scale(1); } }
.vanilla-roundbar { position: absolute; z-index: 3; inset: 0 0 auto; display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 48px; padding: 7px 10px; border-bottom: 3px solid #4d3027; background: rgba(7, 24, 35, .93); color: #f2d49f; }
.vanilla-roundbar > span { padding: 5px 7px; border: 2px solid #d3a665; background: #713127; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.vanilla-roundbar > strong { color: #9edeb5; font-size: 9px; letter-spacing: .08em; text-align: left; }
.vanilla-roundbar.rush > span { background: #8a4930; }
.vanilla-roundbar.finale > span { background: #6c3542; color: #ffe3cf; }
.vanilla-order-progress { display: grid; grid-template-columns: repeat(8, 9px); gap: 4px; }
.vanilla-order-progress i { width: 9px; height: 9px; border: 2px solid #6f8792; background: #102b40; }
.vanilla-order-progress i.filled { border-color: #f2d49f; background: #9edeb5; box-shadow: 0 0 6px rgba(158, 222, 181, .7); }
.vanilla-feedback { position: absolute; z-index: 4; left: 50%; bottom: 62px; transform: translateX(-50%); min-width: 180px; padding: 7px 12px; border: 3px solid transparent; background: rgba(7, 24, 35, .9); color: transparent; font-size: 11px; font-weight: 900; letter-spacing: .05em; opacity: 0; pointer-events: none; }
.vanilla-feedback.show { opacity: 1; }
.vanilla-feedback.good { border-color: #9edeb5; color: #dff7e7; }
.vanilla-feedback.bad { border-color: #d48a78; color: #ffe3cf; }
.vanilla-feedback.miss { border-color: #7894a0; color: #c8dce2; }
.vanilla-playfield { position: absolute; inset: 48px 0 54px; cursor: crosshair; touch-action: none; overflow: hidden; }
.vanilla-lanes { position: absolute; z-index: 1; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); pointer-events: none; }
.vanilla-lane { position: relative; border-inline: 2px solid rgba(176, 210, 216, .32); background: rgba(8, 29, 44, .08); transition: background .08s steps(2), border-color .08s steps(2); }
.vanilla-lane + .vanilla-lane { border-left-width: 0; }
.vanilla-lane::after { content: ""; position: absolute; left: 50%; top: 30px; bottom: 42px; border-left: 3px dashed rgba(242, 212, 159, .58); transform: translateX(-50%); }
.vanilla-lane > span { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); padding: 3px 7px; border: 2px solid #718d98; background: rgba(7, 24, 35, .88); color: #d5e5e6; font-size: 8px; font-weight: 900; white-space: nowrap; }
.vanilla-lane > i { position: absolute; left: 50%; bottom: 7px; width: 58px; height: 22px; transform: translateX(-50%); border: 3px solid #7894a0; background: rgba(16, 43, 64, .78); }
.vanilla-lane.selected { border-color: rgba(158, 222, 181, .8); background: rgba(83, 151, 117, .18); }
.vanilla-lane.selected::after { border-left-color: #9edeb5; filter: drop-shadow(0 0 5px #9edeb5); }
.vanilla-lane.selected > span, .vanilla-lane.selected > i { border-color: #9edeb5; color: #eaffef; box-shadow: 0 0 8px rgba(158, 222, 181, .6); }
.vanilla-drop-layer { position: absolute; inset: 0; pointer-events: none; }
.vanilla-character-reaction { position: absolute; z-index: 4; left: 74%; top: 49%; width: 38px; height: 38px; transform: translate(-50%, -50%) scale(0); display: grid; place-items: center; border: 3px solid #4d3027; border-radius: 50%; background: #f5d7a7; font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif; font-size: 27px; line-height: 1; opacity: 0; pointer-events: none; }
.vanilla-character-reaction.show { opacity: 1; animation: vanillaFacePop .68s steps(3) both; }
.vanilla-character-reaction.love { border-color: #b44b67; box-shadow: 0 0 0 3px rgba(244, 141, 174, .34), 0 0 14px #f48dae; }
.vanilla-character-reaction.sick { border-color: #627e2d; box-shadow: 0 0 0 3px rgba(147, 184, 60, .36), 0 0 14px #94b83c; }
@keyframes vanillaFacePop {
  0% { transform: translate(-50%, -50%) scale(.35) rotate(-8deg); }
  22%, 72% { transform: translate(-50%, -50%) scale(1.12) rotate(4deg); }
  100% { transform: translate(-50%, -50%) scale(.85) rotate(0); opacity: 0; }
}
.catch-zone { position: absolute; z-index: 3; bottom: 7px; width: 72px; height: 46px; transform: translateX(-50%); border: 4px solid #5d3928; background: repeating-linear-gradient(55deg, transparent 0 7px, rgba(93,57,40,.28) 7px 10px), repeating-linear-gradient(-55deg, #d6a660 0 7px, #c28a4c 7px 10px); clip-path: polygon(12% 0, 88% 0, 63% 100%, 37% 100%); transition: left .08s steps(2); box-shadow: 0 0 0 3px rgba(158, 222, 181, .42), 0 6px 0 rgba(35, 20, 16, .55); }
.catch-zone.caught-scoop { animation: vanillaConeCatch .28s steps(3) both; box-shadow: 0 0 0 4px #9edeb5, 0 6px 0 rgba(35, 20, 16, .55), 0 0 16px rgba(158,222,181,.9); }
.falling-scoop { position: absolute; z-index: 2; width: 74px; height: 74px; transform: translateX(-50%); display: grid; place-items: center; }
.falling-scoop img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 6px 0 rgba(35, 20, 16, .62)); }
.falling-scoop.landed-on-cone { z-index: 4; pointer-events: none; animation: vanillaScoopLand .34s steps(4) both; }
.falling-scoop.landed-on-cone img { filter: drop-shadow(0 4px 0 rgba(35,20,16,.5)) drop-shadow(0 0 7px rgba(158,222,181,.8)); }
@keyframes vanillaScoopLand {
  0% { transform: translateX(-50%) translateY(-18px) scale(1.04); }
  45% { transform: translateX(-50%) translateY(5px) scale(.94, 1.06); }
  72% { transform: translateX(-50%) translateY(-3px) scale(1.03, .97); }
  100% { transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes vanillaConeCatch {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(4px); }
}
.falling-scoop.coriander { width: 82px; height: 82px; }
.falling-scoop.coriander img { filter: drop-shadow(0 0 5px rgba(175, 48, 58, .9)) drop-shadow(0 6px 0 rgba(35, 20, 16, .7)); }
.vanilla-controls { position: absolute; z-index: 5; inset: auto 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-items: center; min-height: 54px; padding: 6px 8px; border-top: 3px solid #4d3027; background: rgba(7, 24, 35, .95); }
.vanilla-controls button { min-height: 34px; border: 3px solid #d3a665; background: #713127; color: #fff0d0; font-size: 9px; font-weight: 900; }
.vanilla-controls button.selected { border-color: #9edeb5; background: #315c4d; color: #effff3; box-shadow: 0 0 8px rgba(158, 222, 181, .62); }
.stage-theme-2 { background-color: #d8a76d; box-shadow: inset 0 0 0 999px rgba(42, 19, 17, .22); }
.match-shop-header { display: grid; grid-template-columns: minmax(145px, .8fr) minmax(120px, 1.3fr) auto; gap: 12px; align-items: center; padding: 9px 14px; border-bottom: 3px solid #4d3027; background: #f1d9a6; color: #4d2d25; text-align: left; }
.match-shop-header > div:first-child { display: grid; gap: 2px; }
.match-shop-header small { color: #8b4036; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.match-shop-header strong { font-size: 10px; letter-spacing: .06em; }
.match-shop-header > b { min-width: 62px; padding: 6px; border: 3px solid #6b352c; background: #803a31; color: #fff0cf; font-size: 12px; text-align: center; }
.match-order-meter { height: 14px; padding: 2px; border: 3px solid #5a342b; background: #163448; }
.match-order-meter span { display: block; height: 100%; background: #9edeb5; box-shadow: 0 0 8px rgba(158, 222, 181, .65); transition: width .25s steps(5); }
.match-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: rgba(7, 24, 35, .9); color: #f2d49f; font-size: 10px; font-weight: 900; letter-spacing: .06em; }
.match-toolbar span b { color: #9edeb5; }
.shuffle-button { min-height: 34px; border: 3px solid #d9b87f; background: #713127; color: #fff0d0; padding: 4px 10px; font-size: 10px; font-weight: 900; }
.shuffle-button:disabled { opacity: .45; cursor: default; }
.match-board { width: min(430px, calc(100% - 20px)); margin: 10px auto; display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; padding: 11px; border: 4px solid #513328; background: rgba(12, 39, 55, .9); box-shadow: inset 0 0 0 3px #416579; }
.match-tile { aspect-ratio: 1; min-width: 0; display: grid; place-items: center; border: 3px solid #55372b; background: #f1d9a6; box-shadow: inset -4px -5px 0 rgba(77, 48, 39, .16), inset 3px 3px 0 rgba(255, 255, 255, .28), 0 4px 0 #38231d; padding: 2px; transition: transform .12s steps(2), filter .12s steps(2); }
.ice-icon { position: relative; display: block; width: 42px; height: 42px; image-rendering: pixelated; filter: drop-shadow(2px 3px 0 rgba(62, 34, 27, .42)); }
.ice-icon i, .ice-icon b, .ice-icon em { position: absolute; display: block; box-sizing: border-box; font-style: normal; }
.ice-scoop i { left: 7px; top: 4px; width: 28px; height: 27px; border: 4px solid #4e392b; border-radius: 50% 48% 43% 46%; background: #9edeb5; box-shadow: inset 4px 4px 0 #dff0d7, inset -4px -3px 0 #6caa8b; }
.ice-scoop b { left: 10px; top: 27px; width: 22px; height: 7px; background: #8fcaa6; box-shadow: -4px 0 #4e392b, 4px 0 #4e392b, 0 3px #4e392b; }
.ice-cone i { left: 7px; top: 2px; width: 28px; height: 22px; border: 4px solid #513228; border-radius: 50%; background: #dc8e98; box-shadow: inset 4px 3px #f3bdc2; }
.ice-cone b { left: 11px; top: 22px; width: 20px; height: 18px; border: 4px solid #513228; background: #d9a45f; clip-path: polygon(0 0,100% 0,62% 100%,38% 100%); }
.ice-cup i { left: 7px; top: 8px; width: 28px; height: 17px; border: 4px solid #4b342b; border-radius: 52% 52% 20% 20%; background: #8bb5cf; box-shadow: inset 4px 3px #c5ddea; }
.ice-cup b { left: 10px; top: 23px; width: 22px; height: 16px; border: 4px solid #4b342b; background: #f6dfad; clip-path: polygon(0 0,100% 0,84% 100%,16% 100%); }
.ice-pop i { left: 10px; top: 2px; width: 22px; height: 31px; border: 4px solid #513228; border-radius: 10px 10px 4px 4px; background: #9b73b2; box-shadow: inset 5px 4px #c7a5d6; }
.ice-pop b { left: 17px; top: 31px; width: 8px; height: 10px; border: 3px solid #513228; background: #d9a45f; }
.ice-sandwich i { left: 4px; top: 9px; width: 34px; height: 25px; border: 4px solid #4d3027; background: #8a5a3d; box-shadow: inset 0 6px #b37a53, inset 0 11px #f6dfad, inset 0 16px #8a5a3d; }
.ice-sandwich b { left: 9px; top: 14px; width: 4px; height: 4px; background: #543629; box-shadow: 10px 0 #543629, 20px 0 #543629, 5px 14px #543629, 15px 14px #543629; }
.ice-softserve i { left: 7px; top: 2px; width: 28px; height: 25px; border: 4px solid #4d3027; border-radius: 52% 48% 43% 40%; background: #f6dfad; box-shadow: inset 0 5px #fff0ca, inset 0 9px #d9b77e, inset 0 13px #fff0ca; }
.ice-softserve b { left: 12px; top: 25px; width: 18px; height: 16px; border: 4px solid #4d3027; background: #c98b52; clip-path: polygon(0 0,100% 0,58% 100%,42% 100%); }
.shape-scoop { background: #c9e8d4; }.shape-cone { background: #f1bec1; }.shape-cup { background: #b9d5e5; }.shape-pop { background: #d4b9df; }.shape-sandwich { background: #d5ae83; }.shape-softserve { background: #f4e3ba; }
.match-tile.selected { transform: translateY(-3px) scale(1.06); border-color: #fff0b9; box-shadow: 0 6px 0 #6d3129, 0 0 14px #fff0b9; z-index: 2; }
.match-tile.matched { animation: matchPop .32s steps(4) both; }
@keyframes matchPop { 50% { transform: scale(1.15); filter: brightness(1.45); } 100% { transform: scale(.15); opacity: 0; } }
.lane-controls { position: absolute; inset: auto 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 10px; }
.lane-controls button, .simon-buttons button, .road-controls button { min-height: 54px; border: 3px solid #4b3027; background: #f4d39d; font-weight: 900; color: #4c2e23; }
.stage-theme-3 { background-color: #183247; box-shadow: inset 0 0 0 999px rgba(4, 13, 27, .38); }
.call-console { min-height: 300px; display: grid; grid-template-rows: auto 1fr auto; padding: 10px; background: rgba(8, 23, 38, .88); color: #f2d49f; }
.call-topline { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border: 3px solid #4f7180; background: #0a1c2b; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.call-topline b { padding: 4px 7px; border: 2px solid #d3a665; color: #d3a665; }
.call-topline b.your-turn { border-color: #9edeb5; color: #9edeb5; box-shadow: 0 0 9px rgba(158, 222, 181, .45); }
.call-display { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 3px 12px; padding: 13px 14px 9px; text-align: left; }
.call-display small { color: #88aeba; font-size: 8px; font-weight: 900; letter-spacing: .11em; }
.call-display strong { grid-column: 1; color: #fff0c8; font-size: clamp(20px, 4vw, 32px); text-shadow: 3px 3px 0 #6f3028; }
.call-rounds { grid-column: 2; grid-row: 1 / 3; display: grid; grid-template-columns: repeat(4, 14px); gap: 5px; }
.call-rounds i { width: 14px; height: 14px; border: 3px solid #587787; background: #0c2637; }
.call-rounds i.complete { border-color: #f0cf91; background: #9edeb5; box-shadow: 0 0 7px rgba(158, 222, 181, .7); }
.simon-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 7px 10px 10px; }
.simon-buttons button { min-height: 69px; display: grid; align-content: center; gap: 3px; border-color: #bd925f; background: #d5aa6f; box-shadow: 0 5px 0 #4d2d25; }
.simon-buttons button small { color: #714235; font-size: 7px; letter-spacing: .1em; }
.simon-buttons button strong { font-size: 15px; }
.simon-buttons button.flash { background: #9ed6b2; box-shadow: 0 0 20px #76f0ac, 0 5px 0 #315c4d; transform: translateY(2px); }
.call-caption { padding: 6px 10px 3px; color: #8fb0bc; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.disco-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 32px; }
.disco-tile { aspect-ratio: 1; border: 3px solid #4a2c25; background: #476171; }
.disco-tile.on { background: #dd7155; box-shadow: 0 0 18px #ff9f6f; }
.puzzle-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; background: rgba(13, 23, 48, .92); color: #f1d28e; font-size: 9px; font-weight: 900; letter-spacing: .06em; }
.puzzle-toolbar button { min-height: 34px; border: 3px solid #e1bc77; background: #782e31; color: #fff0cc; padding: 4px 9px; font-size: 9px; font-weight: 900; }
.puzzle-toolbar button:disabled { opacity: .45; cursor: default; }
.jigsaw-mode .dialog-card { width: min(860px, calc(100vw - 30px)); padding: 12px 18px 14px; }
.jigsaw-mode .dialog-card h2 { margin: 2px 0 4px; font-size: clamp(32px, 5vw, 46px); }
.jigsaw-mode .dialog-card > p { margin: 2px 0 5px; font-size: 11px; }
.jigsaw-mode .game-hud, .jigsaw-mode .mini-status { display: none; }
.jigsaw-mode .mini-game { min-height: 0; margin: 6px 0 0; background: #102b40; box-shadow: none; }
.jigsaw-loading { min-height: 360px; display: grid; place-content: center; justify-items: center; gap: 10px; color: #f2d49f; text-align: center; }
.jigsaw-loading span { width: 34px; height: 34px; border: 5px solid #315064; border-top-color: #9edeb5; border-radius: 50%; animation: puzzle-load-spin .8s steps(8) infinite; }
.jigsaw-loading strong { font-size: 15px; letter-spacing: .1em; }
.jigsaw-loading small { color: #9edeb5; font-size: 8px; letter-spacing: .08em; }
.jigsaw-loading.failed button { min-width: 180px; min-height: 44px; border: 3px solid #d3a665; background: #713127; color: #fff0d0; font-weight: 900; }
.mini-game.is-loading-photo { pointer-events: none; opacity: .68; }
@keyframes puzzle-load-spin { to { transform: rotate(360deg); } }
.contact-kicker { padding: 7px 10px 5px; color: #9edeb5; background: #102b40; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-align: center; }
.photo-contact-strip { display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 10px; align-items: center; padding: 8px 10px; background: #542a2c; border-block: 3px solid #28181a; }
.contact-thumbnails { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; min-width: 0; }
.contact-thumb { aspect-ratio: 1 / 1; min-width: 0; border: 3px solid #2c2020; background: #172b3d var(--puzzle-image) center / cover no-repeat; filter: grayscale(1) brightness(.34); opacity: .72; image-rendering: pixelated; transition: filter .2s steps(3), opacity .2s steps(3), border-color .2s steps(3); }
.contact-thumb.completed { border-color: #d3a665; filter: none; opacity: 1; box-shadow: 0 0 0 2px #6d3a2e, 0 0 12px rgba(242, 212, 159, .35); }
.contact-thumb.active { border-color: #9edeb5; filter: grayscale(.45) brightness(.72); opacity: 1; box-shadow: 0 0 0 2px #274c45; }
.contact-thumb.completed.active { filter: none; box-shadow: 0 0 0 2px #274c45, inset 0 0 0 2px #f2d49f, 0 0 14px rgba(158, 222, 181, .48); }
.photo-pool-count { display: grid; gap: 2px; padding: 5px 7px; border: 2px solid #d3a665; background: #102b40; color: #f2d49f; }
.photo-pool-count strong { font-size: 13px; }
.photo-pool-count span { color: #9edeb5; font-size: 7px; font-weight: 900; letter-spacing: .08em; }
.jigsaw-contact-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 10px; padding: 10px 12px 8px; }
.jigsaw-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 0; overflow: hidden; border: 2px solid #587081; background: rgba(13, 25, 47, .94); box-shadow: 0 0 0 2px rgba(211, 166, 101, .3); }
.jigsaw-slot, .jigsaw-piece { aspect-ratio: 1 / 1; min-width: 0; position: relative; overflow: hidden; border: 0; }
.jigsaw-slot.empty { background: rgba(11, 29, 47, .78); box-shadow: inset 0 0 0 1px rgba(113, 136, 155, .45); }
.jigsaw-slot.placed, .jigsaw-piece { background: #162941 var(--puzzle-image) var(--tile-x) var(--tile-y) / 300% 300% no-repeat; image-rendering: pixelated; }
.jigsaw-slot.placed { cursor: grab; touch-action: none; box-shadow: none; }
.jigsaw-slot.placed.selected { filter: brightness(1.12); box-shadow: inset 0 0 0 2px rgba(255, 242, 173, .8); z-index: 2; }
.jigsaw-slot.placed.correct { filter: saturate(1.08) brightness(1.04); box-shadow: inset 0 -6px 0 rgba(158, 222, 181, .9); }
.jigsaw-slot.placed.incorrect { filter: saturate(.82) brightness(.86); box-shadow: inset 0 -6px 0 rgba(163, 71, 75, .92); }
.reference-lightbox { padding: 0; border: 0; background: transparent; box-shadow: none; }
.jigsaw-reference { width: 100%; box-sizing: border-box; aspect-ratio: 1 / 1; border: 5px solid #5f2a2d; background: #162941 var(--puzzle-image) center / cover no-repeat; image-rendering: pixelated; box-shadow: inset 0 0 0 3px #d3a665, 0 4px 0 #311b1a; }
.reference-lightbox > span { display: block; margin-top: 6px; color: #4c3027; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.jigsaw-tray { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; align-items: center; padding: 7px 10px; margin: 0 12px; border: 3px solid #d3a665; background: rgba(7, 24, 35, .92); }
.jigsaw-piece { cursor: grab; touch-action: none; user-select: none; -webkit-user-drag: none; border: 3px solid #f0cf91; box-shadow: 0 4px 0 #3e2524; transition: transform .12s steps(2), filter .12s steps(2); }
.jigsaw-piece:hover { transform: translateY(-2px); }
.jigsaw-piece:active { cursor: grabbing; }
.jigsaw-piece.selected { transform: translateY(-3px) scale(1.06); border-color: #fff2ad; box-shadow: 0 0 0 3px #7a3132, 0 0 18px #fff2ad; z-index: 2; }
.jigsaw-piece.dragging { opacity: .58; filter: brightness(1.3); }
.jigsaw-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 7px 12px 0; }
.jigsaw-controls button { min-width: 0; min-height: 42px; border: 3px solid #d3a665; background: #173748; color: #fff0d0; padding: 5px 7px; font-size: 10px; font-weight: 900; }
.jigsaw-controls button small { display: block; margin-top: 2px; color: #9edeb5; font-size: 6px; letter-spacing: .07em; }
.jigsaw-controls button:disabled { opacity: .42; cursor: default; }
.jigsaw-controls .submit-jigsaw:not(:disabled) { border-color: #9edeb5; background: #315c4d; box-shadow: 0 0 10px rgba(158, 222, 181, .52); }
.jigsaw-validation { min-height: 18px; padding: 4px 12px 0; color: #8fb0bc; font-size: 8px; font-weight: 900; text-align: center; }
.jigsaw-validation.show { color: #f2d49f; }
.jigsaw-contact-footer { display: grid; grid-template-columns: 1fr minmax(200px, 1.3fr) 1fr; gap: 10px; align-items: center; padding: 7px 12px 8px; color: #f2d49f; }
.jigsaw-contact-footer > div { display: flex; align-items: baseline; justify-content: center; gap: 9px; }
.jigsaw-contact-footer small { color: #9edeb5; font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.jigsaw-contact-footer strong { font-size: 19px; }
.jigsaw-contact-footer button { min-height: 42px; border: 3px solid #d3a665; background: #713127; color: #fff0d0; font-size: 10px; font-weight: 900; letter-spacing: .05em; }
.jigsaw-contact-footer button small { display: block; margin-top: 2px; color: #f2d49f; font-size: 6px; }
.jigsaw-contact-footer button:disabled { opacity: .45; cursor: default; }

.photo-pool-card-shell { position: relative; width: min(1120px, calc(100vw - 28px)); max-height: calc(100vh - 28px); overflow: auto; padding: 24px; border: 5px solid #d5a96f; background: #102b40; color: #e8dfca; box-shadow: 0 14px 0 #341c17, 0 30px 80px #000; }
.photo-pool-card-shell h2 { margin: 5px 0 8px; color: #f5d7a7; font-size: clamp(28px, 5vw, 52px); text-shadow: 3px 3px 0 #682d24; text-align: center; }
.photo-pool-card-shell > p { margin: 0 auto 12px; max-width: 850px; color: #c8dce2; font-size: 12px; line-height: 1.6; text-align: center; }
.photo-pool-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-bottom: 12px; }
.photo-pool-legend span { padding: 5px 7px; border: 2px solid #4f7180; background: #071823; color: #9edeb5; font-size: 8px; font-weight: 900; }
.photo-pool-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.photo-pool-card { position: relative; min-width: 0; padding: 7px; border: 3px solid #5f4637; background: #f1dfbd; color: #40271f; box-shadow: 0 4px 0 #2e2020; }
.photo-pool-card img, .photo-pool-empty { display: block; width: 100%; aspect-ratio: 1 / 1; border: 3px solid #342722; background: #0c1d2b; }
.photo-pool-card img { object-fit: contain; image-rendering: pixelated; }
.photo-pool-number { position: absolute; z-index: 2; left: 11px; top: 11px; min-width: 29px; padding: 4px; border: 2px solid #f2d49f; background: #6f3028; color: #fff0d0; font-size: 10px; font-weight: 900; text-align: center; }
.photo-pool-card > strong { display: block; margin-top: 6px; color: #6f3028; font-size: 9px; }
.photo-pool-card > p { min-height: 31px; margin: 3px 0 0; font-size: 7px; line-height: 1.45; }
.photo-pool-card.missing { background: #b7b2a3; filter: saturate(.72); }
.photo-pool-empty { position: relative; display: grid; place-items: center; overflow: hidden; background: repeating-linear-gradient(135deg, #142b3c 0 10px, #1c3a4b 10px 20px); }
.photo-pool-empty::before, .photo-pool-empty::after { content: ""; position: absolute; width: 36%; height: 4px; background: #7a8990; transform: rotate(35deg); }
.photo-pool-empty::after { transform: rotate(-35deg); }
.photo-pool-empty i { width: 20px; height: 15px; border: 3px solid #82959b; }
.photo-pool-empty b { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #82959b; }
.photo-pool-findings { margin-top: 15px; padding: 12px 14px; border: 3px solid #6f3028; background: #f1dfbd; color: #40271f; }
.photo-pool-findings strong { color: #6f3028; }
.photo-pool-findings ul { margin: 7px 0 0; padding-left: 20px; font-size: 10px; line-height: 1.6; }
.photo-developed { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(230px, .75fr); gap: 16px; align-items: center; min-height: 410px; padding: 24px; background: #102b40; }
.developed-print { width: 100%; max-width: 520px; justify-self: center; box-sizing: border-box; aspect-ratio: 1 / 1; border: 10px solid #f4e6c9; outline: 5px solid #5f2a2d; background: #162941 var(--puzzle-image) center / cover no-repeat; image-rendering: pixelated; box-shadow: 10px 11px 0 rgba(4, 13, 24, .45); transform: rotate(-1deg); }
.developed-copy { display: grid; gap: 12px; color: #f4e6c9; }
.developed-copy > span { color: #9edeb5; font-size: 9px; font-weight: 900; letter-spacing: .11em; }
.developed-copy > strong { color: #f2d49f; font-size: clamp(27px, 4vw, 42px); line-height: .92; }
.developed-copy p { margin: 0; color: #d8e6df; font-size: 11px; line-height: 1.65; }
.developed-count { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 12px; border-block: 3px solid #5f2a2d; }
.developed-count small { color: #9edeb5; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.developed-count b { color: #f2d49f; font-size: 23px; }
.developed-actions { display: grid; gap: 8px; }
.developed-actions button { min-height: 46px; border: 3px solid #d3a665; background: #713127; color: #fff0d0; font-size: 10px; font-weight: 900; letter-spacing: .05em; }
.developed-actions button.secondary { background: #18384b; border-color: #7797a5; color: #d7e8e1; }
.puzzle-board { width: min(300px, calc(100% - 24px)); margin: 10px auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px; background: rgba(13, 25, 47, .94); border: 4px solid #d3a665; box-shadow: inset 0 0 0 3px #3f5f78; }
.puzzle-slot { aspect-ratio: 1; min-width: 0; border: 3px solid #f0cf91; position: relative; overflow: hidden; }
.puzzle-tile { cursor: grab; touch-action: none; user-select: none; -webkit-user-drag: none; background-image: url("assets/stage-05.webp"); background-size: 300% 300%; background-position: var(--tile-x) var(--tile-y); image-rendering: pixelated; box-shadow: 0 4px 0 #3e2524; transition: transform .12s steps(2), filter .12s steps(2); }
.puzzle-tile:hover { transform: translateY(-2px); }
.puzzle-tile:active { cursor: grabbing; }
.puzzle-tile.selected { transform: translateY(-3px) scale(1.04); border-color: #fff2ad; box-shadow: 0 0 0 3px #7a3132, 0 0 18px #fff2ad; z-index: 2; }
.puzzle-tile.dragging { opacity: .55; filter: brightness(1.3); }
.puzzle-tile.correct { border-color: #9edeb5; box-shadow: 0 0 0 2px #315c4d, 0 4px 0 #263a34; }
.puzzle-slot span { position: absolute; right: 4px; bottom: 3px; min-width: 20px; padding: 2px 4px; background: rgba(43, 23, 18, .86); color: #fff0ca; font-size: 10px; font-weight: 900; text-align: center; }
.puzzle-slot.empty { display: grid; place-items: center; border-style: dashed; border-color: #71889b; background: rgba(11, 29, 47, .75); }
.puzzle-slot.empty span { position: static; background: transparent; color: #8da8b5; }
.puzzle-preview { position: absolute; inset: 43px 12px 12px; z-index: 5; border: 5px solid #f2d090; background: #162941 url("assets/stage-05.webp") center / 100% 100% no-repeat; image-rendering: pixelated; box-shadow: 0 0 0 999px rgba(4, 12, 24, .62); }
.puzzle-preview span { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); background: #702b31; border: 3px solid #f2d090; color: #fff0cf; padding: 5px 9px; font-size: 10px; font-weight: 900; white-space: nowrap; }
.road { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; background: #314854; padding: 15px; }
.road-lane { border-left: 3px dashed #d3c091; border-right: 3px dashed #d3c091; position: relative; }
.road-block { position: absolute; top: 30px; left: 18%; right: 18%; height: 72px; background: #8a3d30; border: 3px solid #4b251e; color: #fff0cd; display: grid; place-items: center; font-weight: 900; }
.rider { position: absolute; bottom: 78px; width: 55px; height: 70px; border: 3px solid #31231d; background: #f0cf86; transition: left .18s steps(3); }
.road-controls { position: absolute; z-index: 4; left: 10px; right: 10px; bottom: 10px; display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.stage-theme-4 { background-color: #261331; box-shadow: inset 0 0 0 999px rgba(21, 7, 29, .36); }
.disco-reaction { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; background: #261331; }
.disco-reaction::before, .disco-reaction::after { content: ""; position: absolute; z-index: 0; top: 22px; bottom: 48px; width: 34%; opacity: .42; pointer-events: none; transform-origin: top center; animation: discoSweep 1.55s ease-in-out infinite alternate; }
.disco-reaction::before { left: 5%; background: linear-gradient(105deg, transparent 8%, rgba(99, 227, 190, .36) 48%, transparent 82%); }
.disco-reaction::after { right: 4%; background: linear-gradient(75deg, transparent 8%, rgba(239, 105, 176, .38) 48%, transparent 82%); animation-delay: -.8s; }
.disco-marquee { display: flex; align-items: center; justify-content: space-between; padding: 9px 13px; border-bottom: 3px solid #63375f; background: #150c20; color: #f3d49c; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.disco-marquee, .disco-stage, .reaction-button { position: relative; z-index: 1; }
.disco-marquee span { color: #e48aad; text-shadow: 0 0 10px rgba(228, 138, 173, .7); animation: marqueeFlicker .72s steps(2) infinite; }
.disco-stage { display: grid; grid-template-columns: 1fr auto; gap: 18px; place-items: center; padding: 12px 28px 10px; background-image: linear-gradient(90deg, transparent 49%, rgba(208, 112, 166, .16) 50%, transparent 51%), linear-gradient(rgba(126, 213, 190, .14) 1px, transparent 1px); background-size: 48px 100%, 100% 32px; animation: floorRush 1.2s linear infinite; }
.disco-signal { width: 154px; height: 154px; display: grid; place-content: center; gap: 3px; border-radius: 50%; border: 7px solid #4a2c55; color: #fff0c7; font-weight: 900; box-shadow: 0 0 0 8px #170d20; }
.disco-signal small { font-size: 8px; letter-spacing: .12em; }
.disco-signal strong { font-size: 27px; }
.disco-signal.go { background: #2f936d; box-shadow: 0 0 28px #5af0aa, 0 0 0 8px #173b31; animation: signalBounce .42s steps(2) infinite; }
.disco-signal.stop { background: #8f3143; box-shadow: 0 0 28px #ff5d78, 0 0 0 8px #421c28; animation: freezePulse .78s ease-in-out infinite alternate; }
.beat-ladder { display: grid; grid-template-columns: repeat(2, 34px); gap: 7px; }
.beat-ladder i { width: 34px; height: 28px; display: grid; place-items: center; border: 3px solid #76506e; background: #1a1024; color: #8c7389; font-size: 8px; font-style: normal; font-weight: 900; }
.beat-ladder i.complete { border-color: #f0cf91; background: #cf6898; color: #fff7d5; box-shadow: 0 0 10px rgba(234, 109, 170, .65); animation: beatPop .38s steps(2); }
.reaction-button { min-height: 58px; margin: 0 14px 12px; border: 4px solid #f0d39a; background: #742f5d; color: #fff4d5; font-weight: 900; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.reaction-button span, .reaction-button small { display: block; }
.reaction-button span { font-size: 13px; }
.reaction-button small { margin-top: 3px; color: #e1b9d0; font-size: 7px; letter-spacing: .08em; }
.reaction-button:active { transform: translateY(3px) scale(.99); filter: brightness(1.3); }
@keyframes discoSweep { from { transform: translateX(-8%) skewX(-10deg); } to { transform: translateX(18%) skewX(10deg); } }
@keyframes floorRush { from { background-position: 0 0, 0 0; } to { background-position: 48px 0, 0 32px; } }
@keyframes signalBounce { 50% { transform: scale(1.055) rotate(1deg); } }
@keyframes freezePulse { to { filter: brightness(1.18); transform: scale(.98); } }
@keyframes marqueeFlicker { 50% { opacity: .72; } }
@keyframes beatPop { 50% { transform: scale(1.18); } }

.stage-theme-6 { background-color: #071c2e; box-shadow: inset 0 0 0 999px rgba(3, 10, 20, .3); }
.radio-cockpit { min-height: 300px; display: grid; grid-template-rows: auto 1fr auto; background: rgba(5, 15, 27, .9); color: #f2d49f; }
.radio-windshield { display: flex; align-items: center; justify-content: space-between; padding: 8px 13px; border-bottom: 3px solid #684136; background: #0a2031; text-align: left; }
.radio-windshield div { display: grid; gap: 2px; }
.radio-windshield small { color: #80a9b7; font-size: 7px; font-weight: 900; letter-spacing: .12em; }
.radio-windshield strong { font-size: 10px; letter-spacing: .08em; }
.radio-windshield > span { padding: 5px 7px; border: 2px solid #9f7954; color: #d9bd8c; font-size: 8px; font-weight: 900; }
.radio-unit { width: min(540px, calc(100% - 28px)); margin: 11px auto 7px; padding: 11px 13px; border: 5px solid #3c2b27; background: #122c3b; box-shadow: inset 0 0 0 3px #466373, 0 6px 0 #050d15; }
.radio-readout { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: end; padding: 7px 11px; border: 3px solid #5c3a31; background: #08161e; text-align: left; }
.radio-readout small { grid-column: 1 / -1; color: #7595a0; font-size: 7px; font-weight: 900; letter-spacing: .13em; }
.radio-readout strong { color: #f0c16f; font-size: 31px; line-height: 1; text-shadow: 0 0 11px rgba(240, 193, 111, .5); }
.radio-readout span { color: #9eb7bd; font-size: 9px; font-weight: 900; }
.radio-unit.in-range .radio-readout strong { color: #9edeb5; text-shadow: 0 0 13px rgba(158, 222, 181, .75); }
.radio-scale { position: relative; height: 42px; margin: 10px 2px 5px; padding-top: 5px; }
.radio-target { position: absolute; left: var(--target-start); top: 0; width: var(--target-width); height: 100%; border: 3px solid #9edeb5; background: rgba(91, 165, 127, .22); box-shadow: 0 0 10px rgba(158, 222, 181, .52); pointer-events: none; transition: left .1s linear, width .1s linear; animation: targetGlow .65s ease-in-out infinite alternate; }
.radio-scale input { position: relative; z-index: 2; width: 100%; height: 32px; accent-color: #d9ab69; cursor: ew-resize; }
.signal-panel { display: grid; grid-template-columns: auto 1fr auto; gap: 7px; align-items: center; color: #7898a4; font-size: 7px; font-weight: 900; }
.signal-meter { height: 10px; padding: 2px; border: 2px solid #4c6772; background: #07141d; }
.signal-meter i { display: block; height: 100%; background: #d9ab69; transition: width .08s steps(4); }
.radio-unit.in-range .signal-meter i { background: #9edeb5; box-shadow: 0 0 7px rgba(158, 222, 181, .7); }
.radio-hold { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; margin-top: 8px; padding: 7px 9px; border: 3px solid #755342; background: #0a1c28; text-align: left; }
.hold-meter { grid-column: 1 / -1; height: 11px; padding: 2px; border: 2px solid #4c6772; background: #061119; }
.hold-meter i { display: block; width: 0; height: 100%; background: #d9ab69; transition: width .1s linear; }
.radio-hold strong { color: #d9bd8c; font-size: 8px; }
.radio-hold small { color: #7898a4; font-size: 7px; }
.radio-unit.in-range .radio-hold { border-color: #9edeb5; background: #193c37; }
.radio-unit.in-range .hold-meter i { background: #9edeb5; box-shadow: 0 0 8px rgba(158, 222, 181, .75); }
.radio-unit.in-range .radio-hold strong { color: #e9fff0; }
@keyframes targetGlow { to { box-shadow: 0 0 18px rgba(158, 222, 181, .85), inset 0 0 8px rgba(210, 255, 224, .35); } }
.route-stops { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; padding: 6px 12px 9px; }
.route-stops i { height: 23px; display: grid; place-items: center; border: 2px solid #44606d; background: #0a1c28; color: #66818c; font-style: normal; }
.route-stops i span { font-size: 7px; font-weight: 900; }
.route-stops i.current { border-color: #d3a665; color: #f2d49f; }
.route-stops i.complete { border-color: #9edeb5; background: #315c4d; color: #effff3; }
.retry-panel { min-height: 300px; display: grid; place-content: center; gap: 14px; padding: 25px; background: #4b2330; color: #fff0d0; }
.retry-panel strong { font-size: 30px; }
.retry-panel button { min-height: 52px; border: 4px solid #efd19a; background: #8b3b32; color: #fff0d0; font-weight: 900; }
.success-burst { min-height: 300px; display: grid; place-items: center; background: radial-gradient(circle, #dff7e7, #86c6a0 40%, #315b50 70%); }
.success-burst strong { font-size: clamp(27px, 7vw, 64px); color: #fff1ca; text-shadow: 4px 4px 0 #75372a; }
.final-celebration { position: relative; overflow: hidden; animation: final-celebration 3s ease-in-out both; }
.stage-result { display: grid; gap: 14px; min-height: 300px; padding: 12px; background: rgba(9, 24, 35, .82); }
.stage-result .success-burst { min-height: 238px; margin: 0; border: 3px solid #fff1ca; text-decoration: none; }
.stage-result-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; position: relative; z-index: 30; }
.stage-result-actions > * { min-height: 48px; display: grid; place-items: center; padding: 10px 14px; text-align: center; text-decoration: none; }
.final-result-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 240px); gap: 12px; align-items: stretch; }
.stage-trophy-link { display: block; min-width: 0; aspect-ratio: 1672 / 941; border: 3px solid #fff1ca; background: #243f42; cursor: pointer; text-decoration: none; }
.stage-trophy-link img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; image-rendering: pixelated; }
.final-celebration:focus-visible { outline: 5px solid #fff; outline-offset: -7px; }
.final-album-prompt { display: grid; align-content: center; gap: 12px; padding: 22px 18px; border: 3px solid #fff1ca; background: #75372a; color: #fff1ca; text-align: center; box-shadow: inset 0 0 0 4px #c86d54; }
.final-album-prompt small { color: #9edeb5; font-weight: 900; letter-spacing: .14em; }
.final-album-prompt strong { font-size: clamp(22px, 4vw, 34px); text-shadow: 3px 3px 0 #3d2019; }
.final-album-prompt span { color: #fff; font-weight: 800; line-height: 1.5; }
@keyframes final-celebration { 0% { filter: brightness(.7); } 15%, 85% { filter: brightness(1); } 100% { filter: brightness(1.18); } }

@media (max-width: 760px) {
  .final-result-layout { grid-template-columns: 1fr; }
  .final-album-prompt { padding: 14px; }
}

@media (max-width: 430px) {
  .stage-result { padding: 8px; }
  .stage-result-actions { grid-template-columns: 1fr; }
  .stage-result .success-burst { min-height: 210px; }
}

.album-card { position: relative; width: min(1100px, calc(100vw - 28px)); max-height: 94vh; overflow: auto; display: grid; grid-template-columns: 1fr; background: #f1e8d9; color: #3c2119; border: 6px solid #b27451; box-shadow: 0 18px 0 #351c16, 0 40px 90px #000; }
.album-visual { min-height: 0; aspect-ratio: 1672 / 941; position: relative; overflow: hidden; background: #243f42; }
.album-visual img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(.92) contrast(1.02); }
.album-visual-link { color: inherit; text-decoration: none; cursor: pointer; }
.album-visual-link:focus-visible { outline: 6px solid #fff1ca; outline-offset: -8px; }
.album-sticker { position: absolute; left: 22px; bottom: 22px; border: 4px solid #f4e0b5; background: #6c2d24; color: #fff0cc; padding: 12px; font-weight: 900; transform: rotate(-3deg); box-shadow: 0 6px 0 #3b211b; }
.album-copy { padding: 22px 30px 25px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(240px, .75fr); gap: 26px; align-items: center; border-top: 5px solid #b27451; }
.album-copy h2 { margin: 5px 0 10px; font-size: clamp(36px, 4vw, 60px); line-height: .86; color: #742f25; letter-spacing: -.07em; }
.album-copy p:not(.eyebrow) { line-height: 1.65; }
.album-copy-actions { display: grid; gap: 10px; }
.mint-finale { display: flex; gap: 14px; align-items: center; color: #2f6a50; margin: 20px 0; }
.apple-link { display: block; text-align: center; padding: 15px; background: #1d1816; color: #fff; text-decoration: none; border: 3px solid #a66d4d; font-weight: 900; }
.replay { margin-top: 15px; box-shadow: none; }
.close-button.light { color: #56271f; }

.help-card { text-align: left; }
.help-card h2 { font-size: 38px; }
.help-card li { margin: 12px 0; color: #d5e2e3; line-height: 1.5; }
.ost-note { color: #9ed7b2; border-top: 2px dashed #587486; padding-top: 13px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 130px); background: #f8ebd3; color: #46251d; border: 4px solid #7c3529; box-shadow: 0 8px 0 #251410; padding: 12px 20px; font-weight: 900; z-index: 100; transition: transform .25s steps(3); text-align: center; }
.toast.show { transform: translate(-50%, 0); }
.qa-unlock { position: fixed; right: 12px; bottom: 12px; z-index: 120; border: 3px solid #f2d49f; background: #1b4d40; color: #fff0d0; padding: 9px 12px; font-size: 10px; font-weight: 900; }
.qa-reaction-tools { position: absolute; right: 12px; bottom: 10px; z-index: 120; display: flex; gap: 6px; }
.game-dialog.is-briefing .qa-reaction-tools { display: none; }
.qa-reaction-tools button { border: 3px solid #f2d49f; background: #713127; color: #fff0d0; padding: 7px 9px; font-size: 9px; font-weight: 900; }

@media (max-width: 1100px) {
  .game-layout { grid-template-columns: 240px 1fr; }
  .tracklist { grid-column: 1 / -1; }
  .receipt { min-height: auto; }
  .receipt ol { display: grid; grid-template-columns: 1fr 1fr; column-gap: 30px; }
  .stage-scene { min-height: 540px; grid-template-columns: 32% 58% 10%; }
  .display-case { display: none; }
}

@media (min-width: 761px) and (max-height: 950px) {
  .app-shell { padding-top: 14px; padding-bottom: 22px; }
  .progress-row { margin: 14px 0 12px; }
  .character-option { height: 128px; }
  .character-detail { min-height: 46px; padding-top: 9px; }
  .stage-scene { min-height: 480px; }
  .hero-wrap { height: 405px; }
  .display-case { height: 180px; }
  .track-item { padding-block: 9px; }
  .receipt h2 { margin-top: 16px; }
  .barcode { margin-top: 13px; height: 42px; }
  .bottom-actions { margin-top: 14px; }
  .start-button span { font-size: 38px; }
}

@media (max-width: 760px) {
  .app-shell { width: min(100% - 18px, 620px); padding-top: 14px; }
  .topbar { display: block; }
  .header-actions { margin-top: 16px; flex-wrap: wrap; }
  .mint-badge { flex: 1; }
  .progress-row { grid-template-columns: 90px 1fr; }
  .text-button { grid-column: 2; justify-self: end; }
  .game-layout { display: flex; flex-direction: column; }
  .stage-panel { order: 1; }
  .wardrobe { order: 2; }
  .tracklist { order: 3; }
  .character-options { grid-template-columns: repeat(3, 1fr); }
  .character-option { height: 135px; }
  .character-detail { min-height: 44px; }
  .stage-scene { min-height: 520px; grid-template-columns: minmax(0, 34%) minmax(0, 66%); padding: 20px 8px 12px; }
  .hero-wrap { height: 340px; }
  .freezer-map { padding: 10px; gap: 8px; }
  .stage-node { min-height: 92px; border-width: 3px; }
  .stage-node strong { font-size: 10px; }
  .freezer-map { min-width: 0; width: 100%; }
  .neon-sign { right: 8px; top: 15px; transform: scale(.78); transform-origin: top right; }
  .receipt ol { display: block; }
  .bottom-actions { grid-template-columns: 1fr 1fr; }
  .start-button { grid-column: 1 / -1; grid-row: 1; }
  .start-button span { font-size: 37px; }
  .album-card { grid-template-columns: 1fr; max-height: 93vh; overflow: auto; }
  .album-visual { min-height: 0; }
  .album-copy { grid-template-columns: 1fr; gap: 10px; padding: 22px 24px; }
  .simon-buttons, .disco-grid { padding: 25px 16px; }
  .call-console { padding: 8px; }
  .call-body { grid-template-columns: minmax(150px, .72fr) minmax(0, 1.28fr); gap: 7px; }
  .caller-scene { min-height: 205px; }
  .simon-buttons { padding: 6px 10px; }
  .disco-stage { padding-inline: 18px; }
  .match-shop-header { grid-template-columns: minmax(125px, .9fr) 1fr auto; gap: 8px; padding-inline: 10px; }
  .radio-unit { width: calc(100% - 20px); }
  .match-board { gap: 4px; padding: 7px; }
  .match-tile { border-width: 2px; font-size: 7px; box-shadow: 0 3px 0 #38231d; }
  .jigsaw-contact-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 8px; }
  .jigsaw-tray { grid-template-columns: repeat(5, 1fr); margin-inline: 8px; gap: 4px; padding: 6px; }
  .photo-developed { min-height: 350px; padding: 17px; gap: 13px; }
  .puzzle-board { width: min(270px, calc(100% - 12px)); }
}

@media (max-width: 430px) {
  .photo-pool-card-shell { width: calc(100vw - 14px); max-height: calc(100vh - 14px); padding: 18px 10px 12px; border-width: 4px; }
  .photo-pool-card-shell h2 { font-size: 27px; }
  .photo-pool-card-shell > p { font-size: 10px; }
  .photo-pool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .photo-pool-card > p { min-height: 0; }
  .jigsaw-controls { gap: 3px; margin-inline: 6px; }
  .jigsaw-controls button { min-height: 38px; padding: 3px; font-size: 8px; }
  .jigsaw-controls button small { font-size: 5px; }
  .briefing-grid { grid-template-columns: 1fr; gap: 7px; }
  .briefing-grid article { min-height: 0; padding: 9px 10px; }
  .briefing-grid small { margin-bottom: 4px; }
  .briefing-grid strong { font-size: 10px; line-height: 1.45; }
  .stage-start-button { min-height: 48px; margin-top: 10px; }
  .ice-icon { transform: scale(.78); }
  .app-shell { width: calc(100% - 12px); }
  h1 { font-size: 32px; }
  .subtitle { font-size: 13px; }
  .mint-badge { min-width: 100%; }
  .icon-button { flex: 1; }
  .language-options { grid-template-columns: 1fr; }
  .language-options button { min-height: 68px; }
  .language-card { padding: 22px 14px; }
  .character-options { gap: 6px; padding: 8px; }
  .character-option { height: 112px; }
  .stage-scene { min-height: 470px; grid-template-columns: minmax(92px, 31%) minmax(0, 69%); padding-inline: 5px; }
  .hero-wrap { height: 290px; }
  .freezer-map { gap: 6px; padding: 7px; border-width: 3px; }
  .stage-node { min-height: 78px; padding: 6px 3px; }
  .stage-node span, .stage-node small { font-size: 9px; }
  .stage-node strong { overflow-wrap: anywhere; }
  .bottom-actions { gap: 10px; }
  .secondary { padding-inline: 6px; font-size: 11px; }
  .dialog-card, .help-card { width: calc(100vw - 14px); padding: 22px 12px; }
  .mini-game { min-height: 280px; }
  .match-toolbar { padding-inline: 8px; font-size: 8px; }
  .match-shop-header { grid-template-columns: 1fr auto; padding: 6px 8px; }
  .match-shop-header .match-order-meter { grid-column: 1 / -1; grid-row: 2; }
  .match-shop-header > b { grid-column: 2; grid-row: 1; }
  .match-toolbar { gap: 6px; }
  .shuffle-button { min-height: 30px; padding-inline: 6px; font-size: 8px; }
  .match-board { width: calc(100% - 8px); margin-block: 6px; gap: 3px; padding: 5px; border-width: 3px; }
  .match-tile { font-size: 6px; }
  .call-body { grid-template-columns: 96px minmax(0, 1fr); gap: 5px; padding: 6px 0 3px; }
  .caller-scene { min-height: 191px; border-width: 3px; background-position: center; }
  .caller-scene span { left: 4px; right: 4px; bottom: 18px; line-height: 1.25; }
  .caller-scene b { left: 4px; right: auto; bottom: 4px; }
  .call-controls { border-width: 2px; }
  .call-display { padding: 8px 9px 5px; }
  .call-display strong { font-size: 20px; }
  .call-rounds { grid-template-columns: repeat(4, 11px); gap: 3px; }
  .call-rounds i { width: 11px; height: 11px; border-width: 2px; }
  .simon-buttons { gap: 6px; padding: 5px 7px; }
  .simon-buttons button { min-height: 59px; }
  .disco-stage { grid-template-columns: 1fr auto; gap: 10px; padding: 10px 13px 8px; }
  .disco-signal { width: 126px; height: 126px; }
  .disco-signal strong { font-size: 22px; }
  .beat-ladder { grid-template-columns: repeat(2, 28px); gap: 5px; }
  .beat-ladder i { width: 28px; height: 23px; }
  .reaction-button { min-height: 50px; margin: 0 10px 9px; }
  .radio-unit { width: calc(100% - 14px); margin-top: 7px; padding: 8px; border-width: 4px; }
  .radio-readout strong { font-size: 25px; }
  .radio-scale { margin-block: 6px 2px; }
  .radio-hold { padding: 5px 6px; gap: 3px 5px; }
  .radio-hold strong { font-size: 7px; }
  .radio-hold small { font-size: 6px; }
  .route-stops { gap: 3px; padding-inline: 7px; }
  .photo-contact-strip { grid-template-columns: 1fr 78px; gap: 5px; padding: 5px; }
  .contact-thumbnails { gap: 3px; }
  .contact-thumb { border-width: 2px; }
  .photo-pool-count strong { font-size: 9px; }
  .jigsaw-contact-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 6px; }
  .jigsaw-board { width: auto; margin-inline: 0; }
  .reference-lightbox { padding: 0; border-width: 0; }
  .jigsaw-tray { width: auto; margin-inline: 6px; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 4px; }
  .jigsaw-contact-footer { grid-template-columns: 1fr 1.4fr 1fr; gap: 4px; padding: 6px; }
  .jigsaw-contact-footer > div { display: grid; gap: 1px; }
  .jigsaw-contact-footer button { min-height: 34px; font-size: 7px; padding: 3px; }
  .photo-developed { grid-template-columns: 1fr; min-height: 0; padding: 15px; overflow: auto; }
  .developed-print { border-width: 7px; outline-width: 3px; }
  .developed-copy { gap: 8px; }
  .developed-copy > strong { font-size: 28px; }
  .developed-copy p { font-size: 9px; }
  .developed-actions { grid-template-columns: 1fr 1fr; }
  .developed-actions button { min-height: 40px; padding: 5px; font-size: 8px; }
  .album-card { width: calc(100vw - 12px); }
  .album-visual { min-height: 0; }
}

@media (max-width: 430px) and (max-height: 700px) {
  .dialog-card { padding: 14px 10px 10px; }
  .dialog-card h2 { margin-block: 2px 4px; font-size: 28px; }
  .dialog-card > p { margin: 4px 20px; font-size: 10px; line-height: 1.25; }
  .game-hud { margin-top: 6px; }
  .game-hud > div { padding: 4px 6px; }
  .game-hud strong { font-size: 15px; }
  .mini-game { min-height: 255px; margin: 8px 0 5px; }
  .match-board { width: min(240px, calc(100% - 8px)); }
  .match-shop-header { padding-block: 4px; }
  .match-shop-header strong { font-size: 8px; }
  .call-console, .radio-cockpit { min-height: 255px; }
  .caller-scene { min-height: 155px; }
  .call-topline, .call-caption { padding-block: 3px; }
  .simon-buttons button { min-height: 48px; }
  .disco-signal { width: 108px; height: 108px; border-width: 5px; }
  .disco-stage { padding-block: 5px; }
  .reaction-button { min-height: 42px; }
  .radio-windshield { padding-block: 5px; }
  .radio-unit { margin-block: 5px 3px; }
  .radio-readout { padding-block: 4px; }
  .radio-readout strong { font-size: 22px; }
  .radio-hold { margin-top: 4px; padding-block: 4px; }
  .puzzle-toolbar { padding: 5px 7px; font-size: 7px; }
  .puzzle-toolbar button { min-height: 28px; padding: 3px 6px; font-size: 8px; }
  .jigsaw-mode .mini-game { min-height: 0; }
  .contact-kicker { padding-block: 4px; font-size: 7px; }
  .jigsaw-contact-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 4px; }
  .jigsaw-board { width: auto; gap: 0; padding: 0; border-width: 2px; }
  .jigsaw-reference { border-width: 2px; }
  .jigsaw-tray { grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 4px; }
  .jigsaw-piece { border-width: 2px; }
  .puzzle-board { width: min(210px, calc(100% - 8px)); margin-block: 5px; gap: 3px; padding: 5px; border-width: 3px; }
  .puzzle-slot { border-width: 2px; }
  .puzzle-preview { inset: 34px 8px 8px; }
  .mini-status { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.call-body { display: grid; grid-template-columns: minmax(185px, .78fr) minmax(0, 1.22fr); gap: 10px; padding: 10px 4px 5px; }
.caller-scene { min-height: 218px; position: relative; overflow: hidden; border: 4px solid #c49b68; background: #261c3a url("assets/stage-03.webp") center / cover no-repeat; image-rendering: pixelated; box-shadow: inset 0 0 0 3px rgba(18, 31, 50, .72), 0 5px 0 #351f2d; }
.caller-scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(5, 15, 28, .88)); pointer-events: none; }
.caller-scene span, .caller-scene b { position: absolute; z-index: 2; bottom: 8px; font-size: 7px; letter-spacing: .08em; }
.caller-scene span { left: 8px; color: #e9d49f; }
.caller-scene b { right: 8px; color: #9edeb5; }
.call-controls { min-width: 0; display: grid; grid-template-rows: auto 1fr; border: 3px solid #35596c; background: rgba(7, 20, 34, .82); }

@media (max-width: 760px) {
  .call-body { grid-template-columns: minmax(150px, .72fr) minmax(0, 1.28fr); gap: 7px; }
  .caller-scene { min-height: 205px; }
}

@media (max-width: 430px) {
  .call-body { grid-template-columns: 1fr; gap: 7px; padding: 6px 0 3px; }
  .caller-scene { min-height: 108px; border-width: 3px; background-position: center 48%; }
  .caller-scene span { left: 5px; right: auto; bottom: 5px; }
  .caller-scene b { right: 5px; left: auto; bottom: 5px; }
  .call-controls { border-width: 2px; }
}

@media (max-width: 430px) and (max-height: 700px) {
  .caller-scene { min-height: 82px; }
}

/* Every stage has three wardrobe-driven scene treatments and a persistent actor layer. */
.mini-game-shell { position: relative; display: flow-root; --look-accent: #9edeb5; --look-deep: #173b31; }
.game-dialog[data-look="0"] .mini-game-shell { --look-accent: #9edeb5; --look-deep: #173b31; }
.game-dialog[data-look="1"] .mini-game-shell { --look-accent: #8bb5cf; --look-deep: #101d38; }
.game-dialog[data-look="2"] .mini-game-shell { --look-accent: #f2d49f; --look-deep: #6b4632; }
.mini-game.look-theme-0 { --look-accent: #9edeb5; --look-deep: #173b31; background-color: #7db99d; background-blend-mode: soft-light; border-color: #9edeb5; }
.mini-game.look-theme-1 { --look-accent: #8bb5cf; --look-deep: #101d38; background-color: #172844; background-blend-mode: multiply; border-color: #8bb5cf; }
.mini-game.look-theme-2 { --look-accent: #f2d49f; --look-deep: #6b4632; background-color: #ead2a5; background-blend-mode: soft-light; border-color: #f2d49f; }
.mini-game.look-theme-0::after, .mini-game.look-theme-1::after, .mini-game.look-theme-2::after { content: ""; position: absolute; inset: 0; z-index: 25; pointer-events: none; }
.mini-game.look-theme-0::after { border: 5px solid rgba(158, 222, 181, .34); background: repeating-linear-gradient(90deg, rgba(158, 222, 181, .72) 0 18px, rgba(23, 59, 49, .68) 18px 25px) top / auto 7px no-repeat; }
.mini-game.look-theme-1::after { border: 5px solid rgba(139, 181, 207, .28); background: repeating-linear-gradient(115deg, transparent 0 16px, rgba(139, 181, 207, .78) 17px 20px, transparent 21px 36px) top / auto 9px no-repeat; }
.mini-game.look-theme-2::after { border: 5px solid rgba(242, 212, 159, .34); background: radial-gradient(circle, rgba(242, 212, 159, .95) 0 2px, transparent 3px) top / 17px 9px repeat-x; }
.game-dialog[data-look="0"] .dialog-card { border-color: #9edeb5; box-shadow: 0 14px 0 #173b31, 0 30px 80px #000; }
.game-dialog[data-look="1"] .dialog-card { border-color: #8bb5cf; box-shadow: 0 14px 0 #101d38, 0 30px 80px #000; }
.game-dialog[data-look="2"] .dialog-card { border-color: #f2d49f; box-shadow: 0 14px 0 #6b4632, 0 30px 80px #000; }
.game-dialog[data-look="0"] .game-hud > div { box-shadow: inset 0 0 0 2px #48866d; }
.game-dialog[data-look="1"] .game-hud > div { box-shadow: inset 0 0 0 2px #416a86; }
.game-dialog[data-look="2"] .game-hud > div { box-shadow: inset 0 0 0 2px #9e7453; }

.stage-actor { position: absolute; right: 8px; bottom: 19px; z-index: 30; width: 118px; height: 154px; pointer-events: none; transform-origin: 50% 100%; }
.stage-actor-sprite { position: absolute; inset: 0 3px 21px; background-position: center bottom; background-repeat: no-repeat; background-size: contain; image-rendering: pixelated; filter: drop-shadow(0 5px 0 rgba(5, 14, 22, .72)); }
.actor-look-0 .stage-actor-sprite { background-image: url("assets/look-01-v4.webp"); }
.actor-look-1 .stage-actor-sprite { background-image: url("assets/look-02-v4.webp"); }
.actor-look-2 .stage-actor-sprite { background-image: url("assets/look-03-v4.webp"); }
.actor-look-0.reaction-good .stage-actor-sprite { background-image: url("assets/look-01-happy-v2.webp"); }
.actor-look-1.reaction-good .stage-actor-sprite { background-image: url("assets/look-02-happy-v2.webp"); }
.actor-look-2.reaction-good .stage-actor-sprite { background-image: url("assets/look-03-happy-v2.webp"); }
.actor-look-0.reaction-bad .stage-actor-sprite, .actor-look-0.reaction-miss .stage-actor-sprite { background-image: url("assets/look-01-sad-v2.webp"); }
.actor-look-1.reaction-bad .stage-actor-sprite, .actor-look-1.reaction-miss .stage-actor-sprite { background-image: url("assets/look-02-sad-v2.webp"); }
.actor-look-2.reaction-bad .stage-actor-sprite, .actor-look-2.reaction-miss .stage-actor-sprite { background-image: url("assets/look-03-sad-v2.webp"); }
.stage-actor > small { position: absolute; left: 50%; bottom: 0; translate: -50% 0; width: max-content; max-width: 155px; padding: 4px 6px; border: 2px solid var(--look-accent); background: var(--look-deep); color: #fff5d9; font-size: 7px; font-weight: 900; letter-spacing: .04em; box-shadow: 0 3px 0 rgba(0, 0, 0, .55); }
.stage-reaction { position: absolute; right: 92px; top: 3px; min-width: 86px; max-width: 135px; padding: 6px 8px; border: 3px solid var(--look-deep); background: #fff3d7; color: #382019; font-size: 9px; font-weight: 900; line-height: 1.1; text-align: center; opacity: 0; transform: translateY(6px) scale(.86); transition: opacity .12s, transform .12s; box-shadow: 4px 4px 0 rgba(5, 14, 22, .55); }
.stage-reaction::after { content: ""; position: absolute; right: -9px; bottom: 8px; width: 12px; height: 12px; border-right: 3px solid var(--look-deep); border-bottom: 3px solid var(--look-deep); background: #fff3d7; transform: rotate(-45deg); }
.reaction-good .stage-reaction, .reaction-bad .stage-reaction, .reaction-miss .stage-reaction { opacity: 1; transform: translateY(0) scale(1); }
.reaction-good .stage-reaction { color: #245842; border-color: #4d8e6f; }
.reaction-bad .stage-reaction { color: #8b2d25; border-color: #9b3d31; }
.reaction-miss .stage-reaction { color: #765020; border-color: #aa7a3b; }
.reaction-good .stage-actor-sprite { animation: actor-celebrate .82s steps(4); }
.reaction-bad .stage-actor-sprite, .reaction-miss .stage-actor-sprite { animation: actor-sob .86s steps(4); filter: saturate(.72) drop-shadow(0 5px 0 rgba(5, 14, 22, .72)); }
@keyframes actor-celebrate { 0%, 100% { transform: translateY(0) rotate(0); } 28% { transform: translateY(-15px) rotate(-5deg); } 62% { transform: translateY(-7px) rotate(5deg); } }
@keyframes actor-sob { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(5px) rotate(-2deg); } 52% { transform: translateY(2px) rotate(2deg); } 76% { transform: translateY(7px) rotate(-1deg); } }
.jigsaw-mode .stage-actor { right: 7px; bottom: 9px; width: 92px; height: 120px; }
.jigsaw-mode .stage-actor > small { display: none; }

@media (max-width: 430px) {
  .stage-actor { right: 2px; bottom: 13px; width: 86px; height: 112px; }
  .stage-actor-sprite { bottom: 17px; }
  .stage-actor > small { max-width: 104px; padding: 3px 4px; font-size: 5px; }
  .stage-reaction { right: 65px; top: 8px; min-width: 70px; max-width: 92px; padding: 4px 5px; border-width: 2px; font-size: 7px; }
  .stage-reaction::after { right: -7px; width: 9px; height: 9px; border-width: 0 2px 2px 0; }
}

/* Mobile completion pass: compact navigation, thumb-friendly actions, and safe game dialogs. */
@media (max-width: 430px) {
  body { overscroll-behavior-x: none; }
  .app-shell { padding-top: 10px; padding-bottom: 18px; }
  .topbar { gap: 0; }
  .eyebrow { font-size: 10px; }
  h1 { font-size: clamp(29px, 8.3vw, 34px); line-height: 1; }
  .subtitle { margin-top: 7px; line-height: 1.4; }

  .header-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
  }
  .mint-badge { grid-column: 1 / -1; min-width: 0; min-height: 58px; padding: 8px 12px; }
  .icon-button { min-width: 0; min-height: 62px; padding: 6px 4px; }
  .icon-button span { font-size: 24px; }

  .progress-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    margin: 15px 0 13px;
  }
  .progress-copy { gap: 6px; font-size: 17px; }
  .progress-track { min-width: 0; }
  .text-button { grid-column: auto; justify-self: auto; padding: 4px 0; font-size: 10px; white-space: nowrap; }

  .game-layout { gap: 11px; }
  .stage-scene { min-height: 452px; }
  .character-option { height: 104px; }
  .track-item { padding-block: 10px; }

  .bottom-actions {
    position: sticky;
    z-index: 60;
    bottom: 7px;
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.36fr) minmax(0, .82fr);
    gap: 5px;
    margin-top: 12px;
    padding: 6px;
    border: 3px solid #d5a96f;
    background: rgba(7, 24, 35, .96);
    box-shadow: 0 7px 0 #2c1713, 0 -7px 24px rgba(0, 0, 0, .34);
  }
  .bottom-actions .start-button { grid-column: 2; grid-row: 1; min-width: 0; min-height: 54px; padding: 6px 4px; }
  .bottom-actions .start-button span { font-size: 22px; }
  .bottom-actions .start-button small { margin-top: 3px; font-size: 7px; line-height: 1.15; overflow-wrap: anywhere; }
  .bottom-actions .secondary { min-width: 0; min-height: 54px; padding: 5px 3px; font-size: 8px; overflow-wrap: anywhere; }
  .bottom-actions #collectionButton { grid-column: 1; grid-row: 1; }
  .bottom-actions #albumButton { grid-column: 3; grid-row: 1; }

  dialog { max-width: 100vw; max-height: 100dvh; }
  .game-dialog .dialog-card,
  .help-card,
  .language-card {
    max-height: calc(100dvh - 12px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .game-dialog .dialog-card { padding: 56px 12px 14px; }
  .game-dialog.jigsaw-mode .dialog-card { width: calc(100vw - 14px); padding: 56px 10px 10px; }
  .game-language-button { left: 8px; top: 8px; min-height: 40px; }
  .close-button { right: 7px; top: 6px; width: 44px; height: 44px; }
  .dialog-kicker { font-size: 10px; }
  .dialog-card h2, .help-card h2 { font-size: clamp(27px, 8vw, 34px); line-height: 1.05; }
  .dialog-card > p { margin: 6px 16px; font-size: 10px; line-height: 1.4; }
  .game-hud { gap: 5px; margin-top: 10px; }
  .game-hud > div { min-width: 0; padding: 6px 7px; }
  .game-hud strong { font-size: 17px; }
  .mini-game { margin-top: 10px; }
  .mini-status { min-height: 20px; font-size: 10px; }

  .language-card { width: calc(100vw - 14px); padding: 24px 14px 18px; }
  .language-card h2 { font-size: 32px; }
  .language-card > p:not(.dialog-kicker) { margin-bottom: 14px; font-size: 11px; }
  .language-options { gap: 9px; }
  .language-options button { min-height: 64px; }

  .jigsaw-mode .mini-game { margin-top: 8px; }
  .game-dialog.jigsaw-mode .dialog-card h2 { margin: 0 0 2px; font-size: 26px; }
  .game-dialog.jigsaw-mode .dialog-card > p { margin: 2px 8px 4px; font-size: 9px; line-height: 1.3; }
  .jigsaw-mode .contact-kicker { padding-block: 4px; font-size: 8px; }
  .jigsaw-mode .contact-thumbnails { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; }
  .jigsaw-mode .contact-thumb { border-width: 1px; }
  .jigsaw-controls button { min-height: 42px; }
  .jigsaw-contact-footer button { min-height: 42px; }
  .jigsaw-mode .stage-actor { right: 1px; bottom: 7px; width: 80px; height: 104px; }
  .photo-developed { max-height: calc(100dvh - 178px); }

  .stage-result,
  .album-card { max-height: calc(100dvh - 12px); overflow-y: auto; overscroll-behavior: contain; }
  .album-copy { padding: 16px 14px 18px; }
  .album-copy-main h2 { font-size: clamp(32px, 10vw, 46px); }
  .apple-link, .album-copy .secondary { min-height: 48px; }
}

@media (max-width: 370px) {
  .stage-scene { grid-template-columns: minmax(82px, 29%) minmax(0, 71%); padding-inline: 3px; }
  .stage-node { min-height: 74px; }
  .freezer-map { gap: 4px; padding: 5px; }
  .dialog-card h2 { font-size: 26px; }
  .jigsaw-contact-layout { gap: 3px; padding-inline: 3px; }
  .jigsaw-tray { margin-inline: 3px; }
}
