:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #461716;
  color: #fff5de;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #461716; }
button { font: inherit; color: inherit; }
#game { position: relative; width: 100%; height: 100%; min-height: 560px; overflow: hidden; background: radial-gradient(ellipse at 50% 42%, #9a3c1e 0, #5c241c 34%, #2c1a1d 70%, #17151a 100%); isolation: isolate; }
#art-backdrop { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% center; opacity: .04; mix-blend-mode: screen; filter: saturate(1.08) contrast(1.04) brightness(.64); pointer-events: none; transform-origin: 50% 50%; will-change: transform, filter; }
#scene { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; opacity: 1; touch-action: none; cursor: crosshair; }
#battle-feedback { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.impact { position: absolute; padding: 0; color: #fff5de; font-family: "Courier New", ui-monospace, monospace; font-size: 18px; font-style: italic; font-variant-numeric: tabular-nums; font-weight: 950; letter-spacing: .05em; line-height: 1; text-shadow: 0 2px 0 #2a1516, 0 0 8px #ffb31a; animation: impact-float 1.8s ease-in-out infinite; }
.impact::before { content: ""; }
.impact-one { left: 42%; top: 23%; }
.impact-two { left: 45%; top: 49%; animation-delay: .35s; }
.impact-three { left: 63%; top: 69%; animation-delay: .7s; }
#game::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2; background: none; }
#hud { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
footer, .message, #platform-buttons, .cue { position: absolute; z-index: 3; }
.brand { position: absolute; left: 18px; top: 15px; display: flex; flex-direction: column; gap: 2px; letter-spacing: .14em; }
.eyebrow { font-size: 10px; letter-spacing: .21em; font-weight: 800; color: #ffd978; }
.brand strong { font-size: 19px; letter-spacing: .08em; }
.readouts { position: absolute; right: 64px; top: 15px; display: flex; gap: 12px; padding: 8px 10px; border: 2px solid #ffd978; border-radius: 12px; background: #211319f5; box-shadow: 0 5px 18px #1b101099; }
.readouts span { min-width: 62px; text-align: right; }
.readouts span + span { border-left: 1px solid #d9a06166; padding-left: 10px; }
.readouts b { display: block; font-size: 17px; font-weight: 950; letter-spacing: .04em; color: #fff5de; text-shadow: 0 1px 0 #1b1010; }
.readouts small { display: block; color: #ffd978; font-size: 9px; font-weight: 800; letter-spacing: .12em; margin-top: 2px; }
.icon-button { position: absolute; right: 14px; top: 12px; width: 48px; height: 48px; border: 2px solid #ffd978; border-radius: 12px; background: #211319f5; color: #fff5de; font-weight: 950; cursor: pointer; pointer-events: auto; box-shadow: 0 5px 18px #1b101099; }
.icon-button:hover, .platform-button:hover { border-color: #58b9ff; color: #58b9ff; }
.message { left: 50%; top: 83px; transform: translateX(-50%); font-size: 11px; letter-spacing: .12em; color: #ffe1b1; text-align: center; white-space: nowrap; }
.platform-button { position: absolute; transform: translate(-50%, -50%); width: 56px; height: 56px; border: 2px solid #9d806866; border-radius: 12px; background: #3b282555; box-shadow: 0 3px 0 #1b101066, 0 0 0 5px #2ea5ff00; color: #fff5deaa; font-weight: 800; font-size: 12px; cursor: pointer; touch-action: manipulation; text-shadow: 0 1px 5px #2a1516; }
.platform-button.selected { border-color: #58b9ff; box-shadow: 0 3px 0 #1b1010, 0 0 0 5px #2ea5ff55, 0 0 24px #2ea5ff66; color: #58b9ff; background: #244d76cc; }
.platform-button small { display: block; color: #ffd978; font-size: 8px; margin-top: 1px; }
.cue { left: 50%; bottom: 82px; transform: translateX(-50%); padding: 9px 13px; display: flex; gap: 8px; align-items: center; border: 1px solid #58b9ff88; border-radius: 999px; background: #2a1516ee; color: #fff1d2; font-size: 11px; white-space: nowrap; transition: opacity .2s; }
.cue.hidden { opacity: 0; pointer-events: none; }
.cue-dot { width: 7px; height: 7px; border-radius: 50%; background: #58b9ff; box-shadow: 0 0 12px #58b9ff; animation: pulse 1.2s ease-in-out infinite; }
.cue b { font-size: 9px; letter-spacing: .14em; color: #58b9ff; }
footer { left: 18px; right: 18px; bottom: 15px; display: flex; justify-content: space-between; color: #fff5de; font-size: 10px; font-weight: 800; letter-spacing: .14em; opacity: .96; text-shadow: 0 1px 4px #1b1010; }
#upgrade-tray { display: none; }
.upgrade-card { min-height: 54px; padding: 7px 8px; border: 2px solid #d9a06188; border-radius: 11px; background: #3b2825dd; box-shadow: 0 7px 0 #1b101099, 0 8px 20px #1b101055; color: #fff5de; transform: translateY(0); }
.upgrade-card b { display: block; margin-top: 4px; font-size: 9px; letter-spacing: .1em; }
.upgrade-card small { display: block; color: #ffd978; font-size: 9px; letter-spacing: .08em; }
.upgrade-icon { display: inline-block; padding: 3px 5px; border-radius: 5px; color: #211315; font-size: 8px; font-weight: 950; letter-spacing: .08em; }
.upgrade-blue .upgrade-icon { background: #2ea5ff; }
.upgrade-gold .upgrade-icon { background: #ffb31a; }
.upgrade-cream .upgrade-icon { background: #e9f1f5; }
.overlay { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 22px; background: #3b171599; backdrop-filter: blur(5px); opacity: 0; pointer-events: none; transition: opacity .2s; }
.overlay.visible { opacity: 1; pointer-events: auto; }
.card { width: min(410px, 92vw); padding: 28px; border: 1px solid #d9a061; border-radius: 22px; background: linear-gradient(150deg, #3b2825ee, #2a1516f5); box-shadow: 0 18px 60px #180909cc; }
.card h1 { margin: 10px 0 14px; font-size: clamp(38px, 12vw, 68px); line-height: .88; letter-spacing: -.07em; }
.card h1 em { font-style: normal; color: #ff9d2e; }
.card h2 { margin: 10px 0; font-size: 42px; letter-spacing: -.06em; }
.card p { margin: 0 0 20px; color: #ffe1b1; line-height: 1.55; font-size: 14px; }
.primary { width: 100%; padding: 15px 17px; border: 0; border-radius: 12px; background: #2ea5ff; color: #211315; font-weight: 900; letter-spacing: .08em; cursor: pointer; box-shadow: 0 0 22px #2ea5ff55; }
.primary span { float: right; font-size: 10px; opacity: .65; }
.controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 15px; margin-top: 18px; color: #e0aa78; font-size: 10px; }
.controls b { color: #fff5de; }
.compact { text-align: center; }
.compact .primary { margin-top: 4px; }
.compact .eyebrow { display: block; }
.compact p { margin-bottom: 15px; }
@keyframes pulse { 50% { transform: scale(1.5); opacity: .6; } }
@keyframes impact-float { 50% { transform: translateY(-7px) rotate(-2deg); } }
@media (min-width: 760px) { #game { max-width: 620px; margin: 0 auto; border-inline: 1px solid #7b3427; } .card { width: 420px; } }
@media (max-width: 500px) { .readouts { left: 18px; right: 56px; top: 53px; justify-content: space-between; gap: 6px; } .readouts span { min-width: 0; text-align: left; } .readouts b { font-size: 12px; } .readouts small { font-size: 7px; } .message { top: 86px; } }
@media (max-height: 680px) { .message { top: 68px; } .cue { bottom: 54px; } footer { bottom: 8px; } .brand, .readouts { top: 9px; } .icon-button { top: 7px; } .card { padding: 22px; } }
