:root {
  --violet-deep: #12091F; --violet: #2E0F8C; --violet-mid: #5B3FE6; --violet-bright: #620DFE;
  --lime: #9BE41E; --lime2: #93E401; --fur: #FBB14E; --cream: #FEE9CA; --ink: #0F0704; --amber: #F5A33C;
  --panel: rgba(18, 9, 31, .82);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; height: 100dvh; position: fixed; width: 100%; overscroll-behavior: none; background: var(--violet-deep); color: var(--cream); font-family: Nunito, system-ui, sans-serif; font-weight: 700; overflow: hidden; touch-action: manipulation; }
button { font: inherit; font-weight: 900; color: var(--ink); background: var(--lime); border: 3px solid var(--ink); border-radius: 14px; padding: 10px 16px; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
button:disabled { opacity: .45; cursor: default; }
button.ghost { background: var(--violet-mid); color: #fff; }
button.big { font-size: 28px; padding: 16px 48px; border-radius: 22px; }
#app { position: fixed; inset: 0; height: 100dvh; max-width: 520px; margin: 0 auto; background: var(--violet-deep); display: flex; flex-direction: column; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.hidden { display: none !important; }

/* title */
#title { align-items: center; justify-content: flex-end; }
#intro { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.title-inner { position: relative; text-align: center; padding: 24px 16px calc(40px + env(safe-area-inset-bottom)); width: 100%; background: linear-gradient(transparent, var(--violet-deep) 70%); }
h1 { margin: 0; font-size: 64px; font-style: italic; letter-spacing: -2px; color: #fff; text-shadow: 4px 4px 0 var(--ink), 0 0 30px var(--violet-bright); line-height: .9; }
h1 span { color: var(--lime); }
.tag { margin: 8px 0 20px; color: var(--cream); }
.note { color: var(--lime); min-height: 1.4em; font-size: 14px; }

/* home */
#hud { padding: calc(8px + env(safe-area-inset-top)) 12px 6px; background: var(--panel); z-index: 2; }
.hud-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.pill { display: flex; align-items: center; gap: 6px; background: var(--violet); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; font-size: 15px; color: #fff; }
.pill img { width: 22px; height: 22px; border-radius: 50%; }
.pill small { color: var(--lime); }
.xp { height: 8px; margin: 6px 2px; background: var(--ink); border-radius: 4px; overflow: hidden; }
#xpbar { height: 100%; width: 0; background: var(--lime); transition: width .4s; }
#needs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.need { text-align: center; font-size: 11px; }
.need .bar { height: 9px; background: var(--ink); border-radius: 5px; overflow: hidden; margin-top: 2px; }
.need .bar i { display: block; height: 100%; background: var(--lime); transition: width .4s; }
.need.low .bar i { background: var(--amber); }
.need.crit .bar i { background: #ff4a4a; }
#stage { flex: 1; width: 100%; min-height: 0; display: block; touch-action: none; }
#room-ui { position: absolute; left: 0; right: 0; bottom: calc(74px + env(safe-area-inset-bottom)); padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; z-index: 2; pointer-events: none; }
#room-ui > * { pointer-events: auto; }
.tray { display: flex; gap: 8px; background: var(--panel); border: 2px solid var(--ink); border-radius: 16px; padding: 8px 8px 24px; max-width: 100%; overflow-x: auto; }
.item { position: relative; width: 62px; height: 62px; border-radius: 12px; background: var(--violet); border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; cursor: grab; }
.item img { width: 48px; height: 48px; object-fit: contain; pointer-events: none; }
.item .n { position: absolute; right: -4px; top: -6px; background: var(--lime); color: var(--ink); border-radius: 999px; font-size: 11px; padding: 1px 6px; border: 2px solid var(--ink); }
.item.empty { opacity: .35; cursor: default; }
.item.selected { outline: 3px solid var(--lime); }
.item .label { position: absolute; bottom: -18px; font-size: 10px; white-space: nowrap; color: var(--cream); }
.panel { background: var(--panel); border: 2px solid var(--ink); border-radius: 16px; padding: 10px 12px; color: #fff; font-size: 14px; max-width: 100%; }
.panel h3 { margin: 0 0 6px; color: var(--lime); font-size: 15px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#rooms { display: flex; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 3px solid var(--ink); z-index: 3; }
#rooms button { background: transparent; border: none; box-shadow: none; color: var(--cream); display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 22px; padding: 4px 6px; }
#rooms button span { font-size: 10px; }
#rooms button.active { color: var(--lime); }
/* the green toast lives at the top under the HUD, so he is never covered */
#toast { position: absolute; top: calc(var(--hud-h, 120px) + 8px); left: 50%; transform: translate(-50%, 0); background: var(--lime); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; padding: 8px 16px; font-size: 16px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 5; text-align: center; max-width: 80%; }
#toast.show { opacity: 1; }
.dragging { position: fixed; width: 64px; height: 64px; pointer-events: none; z-index: 9; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)); }

/* bedroom cosmetics */
.panel.cosmetics { width: 100%; padding: 8px; max-height: min(52dvh, 460px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.cosmetics .tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.cosmetics .tabs button { flex: 1; padding: 6px 4px; font-size: 12px; background: transparent; color: var(--cream); border: 2px solid transparent; box-shadow: none; border-radius: 12px; }
.cosmetics .tabs button.on { background: var(--violet); color: #fff; border-color: var(--ink); box-shadow: 0 2px 0 var(--ink); }
.cosmetics .sub { margin: 8px 4px 0; font-size: 12px; color: var(--cream); opacity: .85; }
.cosmetics .tabs.closed { margin-bottom: 0; }
.cosmetics .wear { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cosmetics .wear button { min-width: 0; padding: 8px 4px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cosmetics .stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cosmetics .stage { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; border: 2px solid var(--ink); background: linear-gradient(180deg, #3a1ba8, #1c0e52); font-size: 12px; text-align: center; }
.cosmetics .stage img { height: 84px; object-fit: contain; }
.cosmetics .stage small { font-size: 10px; color: var(--cream); opacity: .9; }
.cosmetics .stage.now { border-color: var(--lime); box-shadow: 0 0 12px rgba(155,228,30,.5); }
.cosmetics .stage.locked img { filter: brightness(0) opacity(.55); }
.cosmetics .drops { display: grid; gap: 6px; }
.cosmetics .drop { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; text-align: left; color: #fff; border-radius: 14px; border: 2px solid var(--ink); background: linear-gradient(135deg, #2a1a5e, #140a33); opacity: 1; }
.cosmetics .drop .icon { font-size: 24px; text-align: center; }
.cosmetics .drop .txt { display: flex; flex-direction: column; line-height: 1.15; }
.cosmetics .drop .txt small { font-size: 11px; color: var(--cream); opacity: .85; }
.cosmetics .drop:not(:disabled) { cursor: pointer; }
.cosmetics .drop.now { border-color: var(--lime); box-shadow: 0 0 12px rgba(155,228,30,.5); }
.cosmetics .drop.back { background: transparent; }
.cosmetics .drop .soon { font-size: 10px; font-weight: 900; color: var(--ink); background: var(--lime); border-radius: 999px; padding: 3px 8px; white-space: nowrap; }

/* shop + games list */
.shop-panel { width: 100%; }
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; max-height: 44vh; overflow-y: auto; }
.shop button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px; font-size: 11px; background: var(--violet); color: #fff; }
.shop button img { width: 44px; height: 44px; object-fit: contain; }
.shop button .price { color: var(--lime); }
.shop button.owned { background: #2b6b1f; }
.panel.arcade { width: 100%; padding: 8px; }
.panel.arcade > .hint { margin: 8px 4px 0; font-size: 12px; color: var(--cream); opacity: .9; }
.games { display: grid; gap: 6px; }
.games .card { display: grid; grid-template-columns: 54px 1fr auto 26px; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; text-align: left; color: #fff; border-radius: 16px; border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink), inset 0 1px 0 rgba(255,255,255,.15); background: linear-gradient(135deg, #3a1ba8, #1c0e52); }
.games .card.runner { background: linear-gradient(135deg, #5a12c9, #1c0e52); }
.games .card.fish { background: linear-gradient(135deg, #0c6f9a, #10203f); }
.games .card.laser { background: linear-gradient(135deg, #b02650, #33112a); }
.games .card .icon { font-size: 26px; width: 54px; height: 54px; flex: none; display: grid; place-items: center; background: rgba(0,0,0,.28); border-radius: 12px; border: 1px solid rgba(255,255,255,.12); overflow: hidden; }
.games .card .icon img { width: 50px; height: 50px; object-fit: contain; display: block; }
.games .card .txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.games .card .txt b { font-size: 15px; letter-spacing: -.2px; }
.games .card .txt small { font-size: 11px; font-weight: 700; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.games .card .txt em { font-style: normal; font-size: 10px; color: var(--lime); text-transform: uppercase; letter-spacing: .4px; }
.games .card .best { display: flex; flex-direction: column; align-items: center; font-size: 9px; text-transform: uppercase; letter-spacing: .4px; opacity: .85; background: rgba(0,0,0,.28); border-radius: 10px; padding: 4px 8px; min-width: 44px; }
.games .card .best b { font-size: 14px; color: var(--lime); }
.games .card .go { font-size: 12px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); color: var(--ink); border: 2px solid var(--ink); }
.games .card:disabled { filter: grayscale(.6); }

/* game screen */
#gamecanvas { width: 100%; height: 100%; display: block; touch-action: none; }
#game-hud { position: absolute; top: calc(8px + env(safe-area-inset-top)); left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
#game-hud .pill { pointer-events: auto; }
#game-hud { flex-wrap: wrap; gap: 4px; }
#game-hud .pill { white-space: nowrap; font-size: 13px; padding: 3px 9px; }
#game-hud .pill.night { background: var(--lime); color: var(--ink); box-shadow: 0 0 14px var(--lime); }
#game-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(18,9,31,.75); text-align: center; padding: 20px; }
#game-over h2 { margin: 0; font-size: 40px; color: var(--lime); text-shadow: 3px 3px 0 var(--ink); }
#game-over .rewards { display: flex; gap: 14px; font-size: 18px; color: #fff; }
.blur { filter: blur(0.8px) saturate(.85); }

/* account sheet */
button.small { font-size: 13px; padding: 6px 12px; box-shadow: 0 2px 0 var(--ink); }
#account-modal { position: absolute; inset: 0; z-index: 50; background: rgba(8, 4, 16, .78); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
#account-modal.hidden { display: none; }
#account-modal .sheet { width: 100%; max-width: 440px; background: var(--panel, #1c1030); border: 3px solid var(--ink); border-radius: 22px; padding: 18px 16px 20px; color: #fff; box-shadow: 0 8px 0 var(--ink); max-height: 85vh; overflow: auto; }
#account-modal h2 { margin: 0 0 6px; color: var(--lime); font-size: 22px; }
#account-modal p { margin: 0 0 14px; font-size: 14px; opacity: .9; line-height: 1.4; }
#account-modal .row { display: flex; gap: 8px; flex-wrap: wrap; }
#account-modal .row.col { flex-direction: column; }
#account-modal .row button, #account-modal .btn { width: 100%; text-align: center; }
#account-modal .row:not(.col) button { flex: 1; }
#account-modal input { width: 100%; box-sizing: border-box; font: inherit; font-weight: 700; padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; border: 2px solid var(--ink); background: #fff; color: var(--ink); }
#account-modal .err { color: #ff8a8a; font-size: 13px; min-height: 18px; margin: 4px 0; }
#account-modal .ok { color: var(--lime); font-size: 14px; }
#account-modal .links { margin-top: 10px; font-size: 13px; text-align: center; }
#account-modal .links a, #account-modal a.btn { color: var(--lime); cursor: pointer; text-decoration: underline; }
#account-modal a.btn { display: block; text-decoration: none; font-weight: 900; color: var(--ink); background: var(--lime); border: 3px solid var(--ink); border-radius: 14px; padding: 10px 16px; box-shadow: 0 4px 0 var(--ink); box-sizing: border-box; }

/* hint strip: sits just under the HUD, above the cat, never over him */
#hint { position: absolute; left: 0; right: 0; top: var(--hud-h, 120px); padding: 6px 10px 0; display: flex; justify-content: center; z-index: 2; pointer-events: none; }
#hint .panel.hint { font-size: 13px; padding: 7px 11px; background: rgba(18, 9, 31, .7); pointer-events: auto; }
#hint .panel.hint h3 { display: inline; margin: 0 6px 0 0; font-size: 13px; }
#hint.quiet { visibility: hidden; } /* while a toast shows in the same spot */
#hint .chart { width: 100%; max-width: 340px; border-color: var(--lime); padding: 8px 12px 6px; }
#hint .chart .line { display: flex; gap: 8px; align-items: baseline; }
#hint .chart .line b { color: var(--lime); }
#hint .chart .px { font-size: 15px; }
#hint .chart .chg { margin-left: auto; font-size: 12px; }
#hint .chart .chg.up { color: var(--lime); } #hint .chart .chg.down { color: #ff5a5a; }
#hint .chart .muted { opacity: .7; }
#hint .chart .spark { display: block; width: 100%; height: 30px; margin: 4px 0 2px; }
#hint .chart .sub { font-size: 11px; opacity: .8; }

/* explainer close button */
#hint .panel.hint, .panel.arcade > .hint { position: relative; padding-right: 30px; }
.panel .x { position: absolute; right: 4px; top: 3px; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 2px solid var(--ink); background: var(--violet); color: #fff; font-size: 11px; line-height: 1; box-shadow: none; }

/* settings sheet */
button.pill.snd { padding: 4px 10px; box-shadow: none; border-width: 2px; font-size: 16px; line-height: 1; }
#death-modal { position: fixed; inset: 0; z-index: 60; background: rgba(8, 4, 16, .9); display: flex; align-items: center; justify-content: center; padding: 16px; }
#death-modal .sheet { width: 100%; max-width: 440px; background: var(--panel, #1c1030); border: 3px solid var(--ink); border-radius: 22px; padding: 18px 16px 20px; color: #fff; box-shadow: 0 8px 0 var(--ink); text-align: center; }
#death-modal .grave { font-size: 56px; line-height: 1; }
#death-modal h2 { margin: 8px 0 10px; color: #ff5a5a; font-size: 24px; }
#death-modal p { margin: 0 0 10px; font-size: 15px; line-height: 1.35; }
#death-modal .sub { font-size: 12px; color: var(--cream); opacity: .85; }
#death-modal .row { margin-top: 14px; } #death-modal .row button { width: 100%; }
#settings-modal { position: fixed; inset: 0; z-index: 50; background: rgba(8, 4, 16, .78); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
#settings-modal .sheet { width: 100%; max-width: 440px; background: var(--panel, #1c1030); border: 3px solid var(--ink); border-radius: 22px; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); color: #fff; box-shadow: 0 8px 0 var(--ink); }
#settings-modal h2 { margin: 0 0 12px; color: var(--lime); font-size: 22px; }
#settings-modal .opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 2px solid rgba(255,255,255,.08); font-size: 15px; }
#settings-modal .opt span { display: flex; flex-direction: column; }
#settings-modal .opt small { font-size: 12px; opacity: .7; }
#settings-modal .toggle { min-width: 64px; padding: 6px 12px; font-size: 13px; background: var(--ink); color: #fff; box-shadow: none; }
#settings-modal .toggle.on { background: var(--lime); color: var(--ink); }
#settings-modal input[type=range] { flex: 1; max-width: 200px; accent-color: var(--lime); }
#settings-modal .row { margin-top: 14px; } #settings-modal .row button { width: 100%; }
#title .row { display: flex; gap: 8px; justify-content: center; }

/* ---- Degen Desk (BTC futures) */
.games .card.trade { background: linear-gradient(135deg, #b8860b, #3a2a05); }
#trade-ui { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 10px calc(10px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; background: linear-gradient(180deg, rgba(18,9,31,0), rgba(18,9,31,.92) 30%); }
#trade-ui .row { display: flex; gap: 6px; }
#trade-ui .hint { font-size: 11px; font-weight: 800; text-align: center; color: rgba(255,255,255,.75); line-height: 1.3; min-height: 14px; }
#trade-ui .hint.win { color: var(--lime); } #trade-ui .hint.lose { color: #ff5a5a; } #trade-ui .hint.push { color: #ffd84d; }
#trade-ui .chips button { flex: 1; padding: 6px 0; font-size: 13px; background: var(--ink); color: #fff; box-shadow: none; border-color: rgba(255,255,255,.2); border-width: 2px; border-radius: 10px; }
#trade-ui .chips button.on { background: var(--lime); color: var(--ink); border-color: var(--ink); }
#trade-ui .big button { flex: 1; padding: 12px 6px; font-size: 16px; color: #fff; }
#trade-ui .big .long { background: #1f8f3a; } #trade-ui .big .short { background: #c0283a; }
#trade-ui .big .win { background: #1f8f3a; } #trade-ui .big .lose { background: #c0283a; }
#trade-ui .bets button { flex: 1; padding: 7px 4px; font-size: 11px; line-height: 1.2; background: #6b4a00; color: #fff; box-shadow: none; border-width: 2px; }
#trade-ui .bets button.ghost { background: var(--violet-mid); flex: .8; }
#trade-ui .bets button:disabled { opacity: .55; }
#trade-ui .tpsl button { flex: 1.2; } #trade-ui .tpsl button:last-child { flex: .8; }
#trade-ui .tpsl button.on { background: #2a4a10; color: #fff; border-color: var(--lime); }
#thist { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; }
#thist.hidden { display: none; }
#thist .sheet { width: 100%; max-height: 80vh; background: var(--ink); color: #fff; border-radius: 18px 18px 0 0; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
#thist h3 { margin: 0; }
#thist .tot { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: rgba(255,255,255,.75); }
#thist .tot b { font-size: 18px; } #thist .win { color: var(--lime); } #thist .lose { color: #ff5a5a; }
#thist .list { overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 6px; }
#thist .h { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; background: rgba(255,255,255,.06); border-radius: 10px; padding: 6px 10px; font-size: 13px; }
#thist .h span { font-weight: 900; } #thist .h.win span { color: var(--lime); } #thist .h.lose span { color: #ff5a5a; }
#thist .h small { grid-column: 1 / -1; color: rgba(255,255,255,.6); font-size: 11px; }
#thist button { align-self: stretch; }
.panel.desk .red { color: #ff5a5a; }
.panel.desk { width: 100%; padding: 8px 10px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.panel.desk .line { display: flex; justify-content: space-between; gap: 8px; }
.panel.desk small { opacity: .8; font-size: 11px; }
.panel.desk .lime { color: var(--lime); }
.shop .cat { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; padding: 6px 2px 0; border-top: 1px solid rgba(255,255,255,.12); margin-top: 2px; }
.shop .cat:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.shop .cat b { white-space: nowrap; font-size: 13px; color: var(--lime); text-transform: uppercase; letter-spacing: .5px; }
.shop .cat small { font-size: 11px; opacity: .75; }

/* ---- Coin Burner (flamethrower vs memecoins) */
.games .card.burn { background: linear-gradient(135deg, #d9480f, #3a1206); }
body.burn #app { max-width: none; }
#burn-ui { position: absolute; inset: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; font-weight: 800; }
#burn-ui .stick { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.35); display: none; pointer-events: none; }
#burn-ui .stick .knob { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(155,228,30,.85); border: 2px solid var(--ink); }
#burn-ui.touch .stick.on { display: block; }
#burn-ui .btns { position: absolute; right: calc(10px + env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); display: none; flex-direction: column; gap: 10px; }
#burn-ui.touch .btns { display: flex; }
#burn-ui .btns button { font-size: 14px; padding: 12px 14px; min-width: 76px; }
#burn-ui .btns #bb-gadget { background: #fff; }
#burn-ui .btns #bb-place { background: #ff7a2a; color: #fff; }
#burn-ui .banner { position: absolute; left: 0; right: 0; top: 34%; text-align: center; font-size: clamp(22px, 5vw, 44px); font-weight: 900; font-style: italic; color: var(--lime); text-shadow: 3px 3px 0 var(--ink), 0 0 24px rgba(255,120,40,.7); opacity: 0; transition: opacity .25s; pointer-events: none; letter-spacing: -1px; }
#burn-ui .banner.show { opacity: 1; }
#burn-ui .rotate { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; background: rgba(18,9,31,.96); text-align: center; padding: 24px; font-size: 44px; }
#burn-ui .rotate b { display: block; font-size: 22px; color: var(--lime); margin-top: 8px; }
#burn-ui .rotate small { display: block; font-size: 14px; color: var(--cream); margin-top: 8px; max-width: 320px; margin-inline: auto; }
#burn-ui .intro { position: absolute; inset: 0; z-index: 4; background: #000; }
#burn-ui .intro video { width: 100%; height: 100%; object-fit: contain; }
#burn-ui .intro button { position: absolute; right: calc(12px + env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom)); padding: 8px 14px; font-size: 14px; }
#settings-modal details.keys { border-bottom: 2px solid rgba(255,255,255,.08); padding: 10px 0; }
#settings-modal details.keys summary { cursor: pointer; font-size: 15px; display: flex; flex-direction: column; }
#settings-modal details.keys summary small { font-size: 12px; opacity: .7; }
#settings-modal details.keys .opt { padding: 6px 0; font-size: 13px; }
#settings-modal details.keys .ghost { margin-top: 8px; padding: 6px 12px; font-size: 13px; }
#burn-ui .intro .cap { position: absolute; left: 0; right: 0; bottom: 14%; text-align: center; font-size: clamp(20px, 4.5vw, 40px); font-weight: 900; font-style: italic; color: #fff; text-shadow: 3px 3px 0 var(--ink), 0 0 20px rgba(255,120,40,.8); pointer-events: none; }

#burn-ui .shop { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(96vw, 640px); max-height: 94%; overflow: auto; background: var(--panel, #1c1030); border: 3px solid var(--ink); border-radius: 18px; padding: 8px 12px 10px; box-shadow: 0 8px 0 var(--ink); display: flex; flex-direction: column; gap: 6px; }
#burn-ui .shop h3 { margin: 0; color: var(--lime); font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
#burn-ui .shop h3 small { color: #fff; font-size: 14px; }
#burn-ui .shop .items { display: flex; flex-direction: column; gap: 4px; }
#burn-ui .shop .sec h4 { margin: 0 0 3px; font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: rgba(255,255,255,.6); }
#burn-ui .shop .sec .row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
#burn-ui .shop .item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 6px; align-items: center; text-align: left; background: #2a1a5c; color: #fff; border-radius: 10px; padding: 5px 8px; box-shadow: 0 3px 0 var(--ink); min-width: 0; width: 100%; }
#burn-ui .shop .item .ic { grid-row: 1 / 3; font-size: 20px; line-height: 1; }
#burn-ui .shop .item b { font-size: 12px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#burn-ui .shop .item small { grid-column: 2; font-size: 9px; opacity: .75; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#burn-ui .shop .item .price { grid-column: 3; grid-row: 1; color: #ffd54a; font-size: 12px; white-space: nowrap; }
#burn-ui .shop .item em { grid-column: 3; grid-row: 2; font-style: normal; font-size: 9px; color: var(--lime); white-space: nowrap; text-align: right; }
#burn-ui .shop .item:disabled { opacity: .5; }
#burn-ui .shop .ghost { padding: 6px; font-size: 13px; }
@media (max-height: 430px) { #burn-ui .shop .item small { display: none; } #burn-ui .shop .sec h4 { display: none; } #burn-ui .shop .items { gap: 4px; } }

#burn-ui .shop { padding: 6px 10px 8px; gap: 4px; max-height: 96%; }
#burn-ui .shop h3 { font-size: 14px; }
#burn-ui .shop .item { padding: 3px 6px; column-gap: 5px; }
#burn-ui .shop .item .ic { font-size: 16px; }
#burn-ui .shop .item b { font-size: 11px; }
#burn-ui .shop .item .price { font-size: 11px; }
#burn-ui .shop .ghost { padding: 4px; font-size: 12px; }
@media (max-height: 360px) { #burn-ui .shop h3 { display: none; } #burn-ui .shop .sec .row { gap: 4px; } #burn-ui .shop .items { gap: 3px; } #burn-ui .shop .item em { display: none; } #burn-ui .shop .item { grid-template-rows: auto; } }
