/* =========================================================================
 * METRO RUSH - style.css
 * Mobile-first, portrait, 1080x1920 reference. Responsive down to 320px
 * and up to tablet. Touch targets >= 44px.
 * ========================================================================= */
:root {
  --bg: #0b1020;
  --bg2: #131a30;
  --panel: rgba(20, 28, 50, 0.86);
  --panel-solid: #141c32;
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef2fb;
  --dim: #93a0bd;
  --primary: #4cc9f0;
  --gold: #ffd166;
  --danger: #ff5a6a;
  --good: #06d6a0;
  --radius: 16px;
  /* Telegram Mini App insets (set by js/telegram.js) fall back to iOS/Android
     env() safe areas, so the same rules work in Telegram, PWA and browser. */
  --tg-inset-top: 0px;
  --tg-inset-bottom: 0px;
  --safe-top: max(env(safe-area-inset-top, 0px), var(--tg-inset-top, 0px));
  --safe-bot: max(env(safe-area-inset-bottom, 0px), var(--tg-inset-bottom, 0px));
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  background: #05070d;
  color: var(--text);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 560px;      /* phone-frame on desktop */
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
}
#game-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Inside Telegram: use the real Telegram viewport height (keyboard / bar aware),
   go edge-to-edge (no desktop phone-frame), no shadow. */
html[data-tg="1"], html[data-tg="1"] body { height: var(--tg-viewport-height, 100%); }
html[data-tg="1"] #app {
  max-width: none;
  height: var(--tg-viewport-height, 100%);
  box-shadow: none;
}
/* Telegram desktop is wide — keep the playfield centred and phone-shaped there */
@media (min-width: 620px) {
  html[data-tg="1"][data-tg-platform="tdesktop"] #app,
  html[data-tg="1"][data-tg-platform="weba"] #app,
  html[data-tg="1"][data-tg-platform="webk"] #app { max-width: 480px; }
}

/* -------------------------------- HUD -------------------------------- */
#hud {
  position: absolute; inset: 0; z-index: 20;
  pointer-events: none;
  padding: calc(12px + var(--safe-top)) 14px 14px;
  font-variant-numeric: tabular-nums;
}
#hud button { pointer-events: auto; }
.hud-top { display: flex; justify-content: space-between; align-items: flex-start; }
.hud-score b { font-size: 34px; font-weight: 800; text-shadow: 0 2px 12px rgba(0,0,0,.6); display: block; line-height: 1; }
.hud-score small { font-size: 16px; color: var(--gold); font-weight: 700; }
.hud-score small.hot { color: #ff7ac2; animation: pulse .5s infinite alternate; }
.hud-pause {
  width: 44px; height: 44px; border-radius: 12px; border: none;
  background: rgba(0,0,0,.35); color: #fff; font-size: 18px; backdrop-filter: blur(4px);
}
.hud-sub { display: flex; gap: 12px; margin-top: 4px; font-size: 13px; color: #dfe6f5; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.hud-combo {
  position: absolute; top: 34%; left: 0; right: 0; text-align: center;
  font-size: 30px; font-weight: 900; letter-spacing: 1px; opacity: 0;
  transition: opacity .2s, transform .2s; transform: scale(.6); color: var(--gold);
  text-shadow: 0 3px 20px rgba(0,0,0,.8);
}
.hud-combo.show { opacity: 1; transform: scale(1); }
.hud-combo.gold { color: #ffe08a; font-size: 34px; }
.hud-combo.world { color: var(--primary); font-size: 22px; }
.hud-powerups { position: absolute; left: 14px; bottom: calc(16px + var(--safe-bot)); display: flex; flex-direction: column; gap: 8px; }

/* chaser proximity meter */
.hud-chaser {
  position: absolute; top: 92px; right: 14px; width: 116px; height: 24px;
  border-radius: 8px; background: rgba(0,0,0,.4); overflow: hidden;
  display: flex; align-items: center; padding: 0 8px; gap: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .5px;
  opacity: 0; transform: translateX(10px); transition: opacity .3s, transform .3s;
}
.hud-chaser.visible { opacity: 1; transform: none; }
.hud-chaser span { position: relative; z-index: 1; }
.hud-chaser i { position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: linear-gradient(90deg, #ff9f1c, #ff5a6a); transition: width .2s linear; }
.hud-chaser.danger { animation: pulse .4s infinite alternate; }
.hud-chaser.danger i { background: linear-gradient(90deg, #ff5a6a, #d00000); }
.pu-chip {
  position: relative; width: 128px; height: 30px; border-radius: 8px;
  background: rgba(0,0,0,.4); display: flex; align-items: center; gap: 8px;
  padding: 0 8px; overflow: hidden; font-size: 12px; font-weight: 700;
  border-left: 3px solid var(--c);
}
.pu-chip span { font-size: 14px; }
.pu-chip i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--c); transition: width .2s linear; }
.pu-chip b { margin-left: auto; color: var(--c); }

/* ------------------------------ screens ----------------------------- */
#ui-root { position: absolute; inset: 0; z-index: 30; overflow: hidden; }
body.in-game #ui-root { pointer-events: none; }
body.in-game #ui-root .screen { pointer-events: auto; }
.hud-spacer { display: none; }
.screen { position: absolute; inset: 0; opacity: 0; transform: translateY(14px); transition: opacity .25s, transform .25s; overflow-y: auto; overflow-x: hidden; }
.screen.in { opacity: 1; transform: none; }

/* boot / logo */
.boot {
  position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background: radial-gradient(circle at 50% 40%, #1a2748, #05070d);
  transition: opacity .5s; z-index: 80;
}
.boot.out { opacity: 0; }
.logo-badge {
  width: 96px; height: 96px; border-radius: 24px;
  background: linear-gradient(135deg, var(--primary), #b5179e);
  display: grid; place-items: center; font-size: 48px; font-weight: 900; color: #fff;
  box-shadow: 0 12px 40px rgba(76, 201, 240, .35); animation: pop .5s;
}
.logo-badge span { color: var(--gold); }
.logo-title { font-size: 40px; font-weight: 900; letter-spacing: 3px; margin-top: 8px; }
.logo-title.small { font-size: 26px; letter-spacing: 4px; }
.logo-sub { color: var(--dim); letter-spacing: 4px; text-transform: uppercase; font-size: 12px; }

/* onboarding */
.onb { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(circle at 50% 30%, #1a2748, #05070d); }
.onb-card { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 32px 24px;
  text-align: center; max-width: 360px; width: 100%; backdrop-filter: blur(10px); }
.onb-icon { font-size: 54px; margin-bottom: 12px; }
.onb-card h2 { font-size: 20px; margin-bottom: 6px; }
.onb-card p { color: var(--dim); margin-bottom: 20px; }
.onb-dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.onb-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.onb-dots i.on { background: var(--primary); }
.onb-hi { color: var(--primary); font-weight: 700; margin-bottom: 10px; font-size: 14px; }

/* main menu */
.menu { padding: calc(14px + var(--safe-top)) 14px calc(20px + var(--safe-bot)); min-height: 100%;
  background: linear-gradient(180deg, #10182e, #0a0f1e 60%); }
.menu-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mini-profile { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line);
  padding: 6px 12px 6px 6px; border-radius: 999px; }
.mini-profile small { color: var(--dim); display: block; font-size: 11px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #06121f; background: var(--primary); overflow: hidden; }
.avatar.sm { width: 26px; height: 26px; font-size: 12px; }
.avatar.big { width: 84px; height: 84px; font-size: 34px; margin: 0 auto 8px; }
.avatar.has-photo { background: var(--panel-solid); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.a1 { background: #ffd166; } .avatar.a2 { background: #f72585; color: #fff; } .avatar.a3 { background: #06d6a0; }
.avatar.a4 { background: #b5179e; color: #fff; } .avatar.a5 { background: #ff9f1c; } .avatar.a6 { background: #48cae4; }
.avatar.a7 { background: #c77dff; color: #fff; }
.curbar { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; font-weight: 700; }
.cur { background: var(--panel); border: 1px solid var(--line); padding: 5px 9px; border-radius: 999px; }
.menu-hero { text-align: center; padding: 26px 0 18px; }
.hero-stats { display: flex; gap: 16px; justify-content: center; color: var(--dim); font-size: 13px; margin: 8px 0 18px; font-weight: 700; }
.play-btn { font-size: 22px; padding: 18px 46px; border-radius: 999px; background: linear-gradient(135deg, var(--primary), #3a86ff);
  box-shadow: 0 12px 30px rgba(76,201,240,.35); font-weight: 900; letter-spacing: 1px; }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.menu-tile { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text);
  font-size: 11px; font-weight: 700; min-height: 76px; }
.menu-tile .mt-ico { font-size: 24px; }
.menu-tile em { position: absolute; top: 6px; right: 8px; font-size: 10px; color: var(--gold); font-style: normal; }
.menu-tile em.dot { width: 8px; height: 8px; background: var(--danger); border-radius: 50%; }
.debug-fab { position: fixed; right: 10px; bottom: calc(10px + var(--safe-bot)); z-index: 40;
  background: #ff5a6a; color: #fff; border: none; border-radius: 10px; padding: 8px 12px; font-weight: 800; font-size: 11px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--panel-solid); color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 18px; font-size: 15px; font-weight: 700; cursor: pointer;
  min-height: 44px; transition: transform .08s, filter .15s; width: 100%; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--primary), #3a86ff); border: none; color: #04121f; }
.btn.gold { background: linear-gradient(135deg, #ffd166, #ff9f1c); border: none; color: #3a2500; }
.btn.danger { background: linear-gradient(135deg, #ff5a6a, #d00000); border: none; color: #fff; }
.btn.ghost { background: transparent; }
.btn.disabled { opacity: .4; pointer-events: none; }
.btn.tiny { padding: 8px 12px; font-size: 12px; min-height: 36px; width: auto; }
.btn.big { padding: 16px; font-size: 17px; margin: 10px 0; }
.btn.pulse { animation: pulse 1s infinite alternate; }

/* list screens */
.list-screen { min-height: 100%; background: linear-gradient(180deg, #0e1526, #0a0f1e); }
.list-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: calc(12px + var(--safe-top)) 14px 12px; background: rgba(10,15,30,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.list-head h2 { font-size: 18px; flex: 1; }
.back-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-solid); color: #fff; font-size: 22px; line-height: 1; }
.list-body { padding: 14px 14px calc(30px + var(--safe-bot)); display: flex; flex-direction: column; gap: 12px; }
.cat-h { font-size: 13px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; margin-top: 8px; }
.cat-h small { text-transform: none; letter-spacing: 0; color: var(--dim); font-weight: 400; }
.hint { color: var(--dim); font-size: 13px; line-height: 1.5; }

/* card grid (characters / skins / shop) */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ecard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
.ecard.selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.ecard-art { width: 68px; height: 68px; border-radius: 16px; background: radial-gradient(circle at 40% 30%, var(--c), #0b1020);
  display: grid; place-items: center; font-size: 26px; font-weight: 900; color: #fff; margin-bottom: 4px; }
.ecard b { font-size: 14px; }
.ecard small { font-size: 11px; color: var(--dim); }
.ecard small.bonus { color: var(--good); font-weight: 700; }
.rarity { font-size: 10px; font-weight: 800; letter-spacing: .5px; }
.lvlbar { width: 100%; height: 6px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.lvlbar.big { height: 10px; margin: 6px 0; }
.lvlbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--good)); border-radius: 999px; transition: width .3s; }

/* chip rows */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: var(--panel-solid); border: 1px solid var(--line); color: var(--dim); border-radius: 999px;
  padding: 8px 14px; font-size: 12px; font-weight: 700; min-height: 36px; }
.chip.on { background: var(--primary); color: #04121f; border-color: transparent; }

/* upgrades */
.up-list, .friend-list { display: flex; flex-direction: column; gap: 10px; }
.up-row { display: flex; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; }
.up-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 900; color: #0b1020; font-size: 18px; flex-shrink: 0; }
.up-meta { flex: 1; min-width: 0; }
.up-meta b { font-size: 14px; } .up-meta small { font-size: 11px; color: var(--dim); display: block; }
.up-meta small.dim { margin: 2px 0 6px; }
.up-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }

/* mission rows */
.ms-row { display: flex; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; }
.ms-row.done { border-color: var(--good); }
.ms-meta { flex: 1; min-width: 0; }
.ms-meta b { font-size: 13px; display: block; margin-bottom: 6px; }
.ms-meta small { font-size: 11px; color: var(--dim); }
.ms-meta small.dim { display: block; margin: 4px 0; }

/* daily */
.daily-head, .season-head { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.season-head { grid-template-columns: repeat(4, 1fr); }
.daily-head > div, .season-head > div, .stat, .go-grid > div { background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 6px; }
.daily-head small, .season-head small, .stat small, .go-grid small { display: block; font-size: 10px; color: var(--dim); text-transform: uppercase; }
.daily-head b, .season-head b, .stat b, .go-grid b { font-size: 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 8px; }
.cal-cell { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; text-align: center;
  font-size: 10px; display: flex; flex-direction: column; gap: 3px; min-height: 54px; justify-content: center; }
.cal-cell small { color: var(--dim); }
.cal-cell span { font-weight: 700; font-size: 11px; }
.cal-cell.claimed { opacity: .4; }
.cal-cell.today { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.cal-cell.premium { background: linear-gradient(135deg, rgba(255,209,102,.15), var(--panel)); }

/* leaderboard */
.lb-list { display: flex; flex-direction: column; gap: 4px; }
.lb-row { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.lb-row.me { border-color: var(--primary); background: rgba(76,201,240,.12); }
.lb-row.sticky { position: sticky; bottom: 0; }
.lb-rank { width: 38px; font-weight: 800; color: var(--dim); }
.lb-name { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-name .flag { font-style: normal; font-size: 10px; color: var(--dim); border: 1px solid var(--line); padding: 1px 4px; border-radius: 4px; margin-left: 4px; }
.lb-score { font-weight: 800; font-variant-numeric: tabular-nums; }
.loading { color: var(--dim); text-align: center; padding: 20px; }

/* events / season track */
.event-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.event-card.live { border-color: var(--good); }
.ev-head { display: flex; justify-content: space-between; align-items: center; }
.ev-head span { font-size: 11px; color: var(--gold); }
.season-track { display: flex; flex-direction: column; gap: 6px; }
.season-tier { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 6px; align-items: center; opacity: .5; }
.season-tier.unlocked { opacity: 1; }
.tier-lvl { font-weight: 800; text-align: center; color: var(--dim); }
.tier-reward { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 4px; font-size: 11px; font-weight: 700; color: var(--text); min-height: 40px; }
.tier-reward.ready { border-color: var(--gold); }
.tier-reward.claimed { opacity: .35; }
.tier-reward.prem { background: linear-gradient(135deg, rgba(255,209,102,.12), var(--panel)); }
.tier-reward.locked { opacity: .3; }
.prog-track { display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }

/* profile */
.profile-card { text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.profile-card p { color: var(--dim); font-size: 12px; margin-bottom: 10px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.acc-box, .friends-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.text-input { background: #0c1222; border: 1px solid var(--line); border-radius: 10px; padding: 12px; color: #fff; font-size: 14px; width: 100%; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.row-btns .btn { width: auto; flex: 1; min-width: 90px; }
.friend-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.friend-row small { color: var(--dim); margin-left: auto; }
.wallet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; background: #0c1222;
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.tag.bad { border-color: var(--danger); color: var(--danger); }

/* settings */
.set-row { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.set-row label { flex: 1; font-size: 14px; }
.set-row input[type=range] { width: 120px; accent-color: var(--primary); }
.set-row select { background: #0c1222; color: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.set-row span { width: 44px; text-align: right; font-size: 13px; color: var(--dim); }

/* debug */
.debug-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.debug-grid .btn { width: 100%; }

/* modals */
.modal-screen { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center;
  background: rgba(5,8,15,.7); backdrop-filter: blur(6px); padding: 24px; }
.modal { background: var(--panel-solid); border: 1px solid var(--line); border-radius: 22px; padding: 26px;
  width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 10px; text-align: center; }
.modal h2 { margin-bottom: 8px; }
.death .modal h2 { color: var(--danger); }
.death-timer { height: 4px; background: rgba(255,255,255,.1); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.death-timer i { display: block; height: 100%; width: 100%; background: var(--danger); transition: width 8s linear; }

/* game over */
.gameover { padding: calc(30px + var(--safe-top)) 20px calc(24px + var(--safe-bot)); min-height: 100%;
  background: radial-gradient(circle at 50% 20%, #1a2748, #05070d); text-align: center; display: flex; flex-direction: column; gap: 14px; }
.gameover h2 { font-size: 22px; letter-spacing: 2px; }
.gameover h2.newhigh { color: var(--gold); animation: pop .6s; }
.go-score { font-size: 52px; font-weight: 900; }
.go-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; text-align: center; }
.go-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.tag { font-size: 11px; padding: 5px 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.tag.good { border-color: var(--good); color: var(--good); }
.tag.gold { border-color: var(--gold); color: var(--gold); }
.go-actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }

/* box opening */
.box-modal { z-index: 55; }
.box-wrap { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.box-lid { width: 120px; height: 120px; border-radius: 22px; background: linear-gradient(135deg, var(--c), #0b1020);
  display: grid; place-items: center; font-size: 46px; font-weight: 900; color: #fff; transition: transform .5s, opacity .5s; }
.box-lid.open { transform: translateY(-16px) rotate(8deg) scale(1.1); box-shadow: 0 0 60px var(--c); }
.box-items { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.box-item { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 20px; font-weight: 800; }
.box-item.pop { animation: pop .35s; }

/* toasts */
.toast-wrap { position: fixed; left: 0; right: 0; top: calc(10px + var(--safe-top)); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { background: var(--panel-solid); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; font-size: 13px; font-weight: 700;
  opacity: 0; transform: translateY(-10px); transition: opacity .25s, transform .25s; max-width: 90%; text-align: center; }
.toast.in { opacity: 1; transform: none; }
.toast.good { border-color: var(--good); }
.toast.bad { border-color: var(--danger); }
.toast.gold { border-color: var(--gold); color: var(--gold); }

/* rotate hint (landscape phones) */
#rotate-hint { display: none; }
@media (max-height: 480px) and (orientation: landscape) and (pointer: coarse) {
  #rotate-hint { display: grid; position: absolute; inset: 0; z-index: 100; place-items: center;
    background: #05070d; font-size: 16px; color: var(--dim); text-align: center; padding: 20px; }
}

/* animations */
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes pulse { from { filter: brightness(1); } to { filter: brightness(1.35); } }

/* larger screens: keep phone frame, add side gradient */
@media (min-width: 600px) {
  body { background: radial-gradient(circle at 50% 0%, #10182e, #05070d); }
}
/* low quality: disable blur for perf */
:root[data-quality="low"] .list-head,
:root[data-quality="low"] .modal-screen { backdrop-filter: none; }
