/* Venge.io 资源 3D 查看器 — tablet-first dark theme */
:root {
  --bg: #111317;
  --bg2: #171a1f;
  --card: #1c2027;
  --card2: #232832;
  --line: #2c323d;
  --text: #e8eaee;
  --muted: #9aa1ad;
  --dim: #6c7380;
  --accent: #4f9cff;
  --accent2: #2f6fd1;
  --ok: #3ad08a;
  --r: 12px;
  --r-sm: 8px;
  --tap: 44px;
  --side: 340px;
  --sheet: 45vh;
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); font-size: 13px; }
.noscript, .boot { padding: 40px 20px; text-align: center; color: var(--muted); }

/* ------------------------------------------------------------ pages (#app) */
#app {
  max-width: 1200px; margin: 0 auto;
  padding: calc(16px + var(--sat)) calc(20px + var(--sar)) calc(28px + var(--sab)) calc(20px + var(--sal));
}
body.in-stage #app { display: none; }

.hero { padding: 12px 0 20px; }
.brand { display: flex; align-items: center; gap: 16px; }
.logo {
  flex: none; width: 56px; height: 56px; border-radius: 14px;
  display: grid; place-items: center; font-weight: 800; font-size: 28px;
  background: linear-gradient(135deg, var(--accent), #8a5cff); color: #fff;
}
.brand h1 { margin: 0; font-size: 26px; line-height: 1.2; letter-spacing: .5px; }
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.cats {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin-bottom: 28px;
}
.cat {
  display: flex; align-items: flex-start; gap: 14px; min-height: 104px;
  padding: 18px; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line);
  transition: background .15s, border-color .15s, transform .1s;
}
.cat:active { transform: scale(.98); background: var(--card2); }
.cat .ico {
  flex: none; width: 44px; height: 44px; padding: 10px; border-radius: 10px;
  background: rgba(79,156,255,.14); fill: var(--accent); stroke: none;
}
.cat div { display: flex; flex-direction: column; min-width: 0; }
.cat b { font-size: 18px; }
.cat span { color: var(--muted); font-size: 13px; margin-top: 2px; }
.cat em { font-style: normal; color: var(--accent); font-size: 13px; margin-top: 6px; }
@media (hover: hover) {
  .cat:hover, .card:hover, .row:hover { border-color: #3d4554; background: var(--card2); }
}

.sec-title { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.foot { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--dim); font-size: 12px; text-align: center; }

/* item grids */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.grid.big { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card {
  display: flex; flex-direction: column; overflow: hidden; min-width: 0;
  border-radius: var(--r); background: var(--card); border: 1px solid var(--line);
  transition: background .15s, border-color .15s, transform .1s;
}
a.card:active { transform: scale(.98); }
.thumb { aspect-ratio: 1 / 1; background: #0d0f12; position: relative; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.ph { display: grid; place-items: center; }
.thumb.ph span { font-size: 30px; font-weight: 800; letter-spacing: 1px; color: rgba(255,255,255,.55); }
.ph-hero { background: linear-gradient(135deg, #2a3f6b, #1a2234); }
.ph-w { background: linear-gradient(135deg, #4a3622, #221a14); }
.ph-p { background: linear-gradient(135deg, #24493a, #152520); }
.ph-m { background: linear-gradient(135deg, #3d2a5c, #1c1629); }
.ph-x { background: linear-gradient(135deg, #333a46, #1b1e24); }
.grid.big .thumb { aspect-ratio: 16 / 10; }
.meta { padding: 10px 12px 12px; display: flex; flex-direction: column; min-width: 0; }
.meta b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-card .meta b { font-size: 16px; }
.map-card .actions { padding: 0 12px 12px; }

/* list page */
.topbar {
  display: flex; align-items: center; gap: 10px; min-height: 56px;
  position: sticky; top: 0; z-index: 5; margin: calc(-16px - var(--sat)) -20px 0; padding: var(--sat) 20px 0;
  background: rgba(17,19,23,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.topbar .tt { flex: 1; min-width: 0; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn {
  flex: none; width: var(--tap); height: var(--tap); display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line); background: var(--card);
  font-size: 24px; line-height: 1; padding: 0 0 2px;
}
.iconbtn:active { background: var(--card2); }

.tabs {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 8px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px;
}
.tabs::-webkit-scrollbar, .scroll::-webkit-scrollbar { display: none; }
.tab {
  flex: none; min-height: var(--tap); display: inline-flex; align-items: center; padding: 0 16px;
  border-radius: 22px; color: var(--muted); font-weight: 600;
}
.tab.on { background: var(--card2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }

.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.search {
  width: 100%; height: 48px; padding: 0 16px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--bg2); font-size: 16px; /* ≥16px avoids iOS zoom */
  -webkit-appearance: none; appearance: none;
}
.search:focus { outline: none; border-color: var(--accent); }
.count { color: var(--dim); font-size: 13px; margin: 4px 0 10px; }

.chips { display: flex; gap: 8px; }
.chips.scroll { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.chips.wrap { flex-wrap: wrap; }
.chip {
  flex: none; min-height: var(--tap); padding: 0 16px; border-radius: 22px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 14px; white-space: nowrap;
}
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip:active { filter: brightness(1.15); }

.rows { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px;
  border-radius: var(--r); background: var(--card); border: 1px solid var(--line);
}
.row .meta { padding: 0; flex: 1; }
.play {
  flex: none; width: var(--tap); height: var(--tap); border-radius: 50%; display: grid; place-items: center;
  background: rgba(79,156,255,.15); color: var(--accent); font-size: 14px;
}

.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  min-height: var(--tap); display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 18px; border-radius: 22px; border: 1px solid var(--line); background: var(--card2);
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.btn:active { filter: brightness(1.2); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.wide { display: flex; width: 100%; margin-top: 14px; }
.map-card .actions .btn { flex: 1; padding: 0 10px; }
.panel-box { margin-top: 18px; padding: 18px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.panel-box > b { font-size: 16px; }
.panel-box p { margin: 6px 0 14px; }

/* report */
.report { max-width: 860px; margin: 0 auto; line-height: 1.75; font-size: 15px; overflow-wrap: anywhere; }
.report h1, .report h2, .report h3 { line-height: 1.3; margin: 1.6em 0 .6em; }
.report h1 { font-size: 26px; } .report h2 { font-size: 21px; border-bottom: 1px solid var(--line); padding-bottom: 6px; } .report h3 { font-size: 17px; }
.report a { color: var(--accent); }
.report code { background: var(--card2); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.report pre { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; overflow-x: auto; }
.report pre code { background: none; padding: 0; }
.report img { border-radius: var(--r-sm); }
.tablewrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: var(--r-sm); -webkit-overflow-scrolling: touch; }
.report table { border-collapse: collapse; width: 100%; font-size: 13px; }
.report th, .report td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.report th { background: var(--bg2); white-space: nowrap; }

/* ------------------------------------------------------------ 3D stage */
#shell { display: none; }
body.in-stage { overflow: hidden; position: fixed; inset: 0; overscroll-behavior: none; }
body.in-stage #shell {
  display: grid; position: fixed; inset: 0; background: var(--bg);
  grid-template-columns: minmax(0, 1fr) var(--side); grid-template-rows: 100%;
}
body.in-stage #stage.panel-collapsed + #st-side,
body.in-stage #stage.map-mode.panel-collapsed + #st-side { display: none; }
body.in-stage #shell:has(#stage.panel-collapsed) { grid-template-columns: minmax(0, 1fr) 0; }

#stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #15171b; }
#gl { position: absolute; left: 0; top: 0; display: block; touch-action: none; outline: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#stage, #st-side { -webkit-user-select: none; user-select: none; }

.st-top {
  position: absolute; z-index: 4; left: 0; right: 0; top: 0;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--sat)) 12px 10px calc(12px + var(--sal));
  background: linear-gradient(rgba(17,19,23,.85), rgba(17,19,23,0));
  pointer-events: none;
}
.st-top > * { pointer-events: auto; }
.st-top .iconbtn { background: rgba(28,32,39,.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
#st-panel-toggle { font-size: 18px; }
.st-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; pointer-events: none; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.st-title b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-title small { font-size: 12px; color: var(--muted); }
.st-actions { display: flex; gap: 8px; align-items: center; }
.st-actions:empty { display: none; }

.st-tools {
  position: absolute; z-index: 3; left: calc(12px + var(--sal)); right: 12px; top: calc(66px + var(--sat));
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; pointer-events: none;
}
.st-tools::-webkit-scrollbar { display: none; }
.st-tools > * { pointer-events: auto; }
.tbtn {
  flex: none; min-height: var(--tap); min-width: var(--tap); padding: 0 14px; border-radius: 22px;
  border: 1px solid rgba(255,255,255,.1); background: rgba(28,32,39,.82); color: var(--text);
  font-size: 14px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); white-space: nowrap;
}
.tbtn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tbtn.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.tbtn:active { filter: brightness(1.2); }

.st-hud { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.st-hud > * { pointer-events: auto; }

.st-timeline {
  position: absolute; z-index: 3; left: calc(12px + var(--sal)); right: 12px; bottom: calc(12px + var(--sab));
  display: flex; flex-direction: column; gap: 6px; padding: 8px 12px;
  border-radius: var(--r); background: rgba(23,26,31,.88); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  max-width: 720px; margin: 0 auto;
}
.tl-row { display: flex; align-items: center; gap: 10px; }
.tl-row + .tl-row { justify-content: space-between; }
.tl-play {
  flex: none; width: var(--tap); height: var(--tap); border-radius: 50%; border: none;
  background: var(--accent); color: #fff; font-size: 14px;
}
.tl-time { flex: none; min-width: 92px; text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); }
.tl-speeds { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tl-speeds::-webkit-scrollbar { display: none; }
.tl-slider { flex: 1; min-width: 0; height: var(--tap); margin: 0; background: transparent; -webkit-appearance: none; appearance: none; touch-action: none; }
.tl-slider::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--line); }
.tl-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.tl-slider::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
.tl-slider::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }

.st-loading {
  position: absolute; z-index: 5; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: var(--r);
  background: rgba(17,19,23,.9); border: 1px solid var(--line); font-size: 14px; pointer-events: none;
}
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* side panel */
.st-side {
  min-width: 0; min-height: 0; display: flex; flex-direction: column;
  background: var(--bg2); border-left: 1px solid var(--line);
}
.st-grip { display: none; }
.st-panel {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: calc(14px + var(--sat)) calc(16px + var(--sar)) calc(20px + var(--sab)) 16px;
  touch-action: pan-y;
}
.st-panel > :first-child { margin-top: 0; }
.sec { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; margin: 18px 0 8px; }
.seg-row { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); }
.seg {
  flex: 1 1 auto; min-height: 40px; min-width: 44px; padding: 0 12px; border-radius: var(--r-sm);
  border: none; background: transparent; color: var(--muted); font-size: 14px; white-space: nowrap;
}
.seg.on { background: var(--card2); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.seg.big { min-height: var(--tap); font-weight: 600; font-size: 15px; }
.tl-speeds .seg { flex: none; min-height: 36px; padding: 0 10px; font-size: 13px; background: var(--bg); }
.tl-speeds .seg.on { background: var(--card2); color: var(--accent); }
.heroinfo { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--card); font-size: 13px; color: var(--muted); line-height: 1.6; }
.heroinfo b { color: var(--accent); }
.st-panel .chip { min-height: 40px; padding: 0 14px; font-size: 13px; }

.alist { display: flex; flex-direction: column; gap: 2px; }
.arow {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  min-height: var(--tap); padding: 6px 12px; border-radius: var(--r-sm); border: none; background: transparent; text-align: left;
}
.arow span { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arow small { flex: none; color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.arow:active { background: var(--card); }
.arow.on { background: rgba(79,156,255,.16); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }

.info { margin-top: 4px; }
.kv { width: 100%; border-collapse: collapse; font-size: 13px; }
.kv th { width: 34%; text-align: left; font-weight: 500; color: var(--muted); padding: 7px 8px 7px 0; vertical-align: top; }
.kv td { padding: 7px 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.kv tr + tr th, .kv tr + tr td { border-top: 1px solid var(--line); }
.texgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.matname { grid-column: 1 / -1; font-size: 12px; color: var(--muted); padding: 2px 0; overflow-wrap: anywhere; }
.tex { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tex img, .tex .noimg { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); background: #0b0c0e; border: 1px solid var(--line); }
.tex .noimg { display: grid; place-items: center; color: var(--dim); font-size: 12px; text-transform: uppercase; }
.tex span { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------ portrait / narrow: canvas on top + bottom sheet */
@media (max-width: 899px), (orientation: portrait) {
  body.in-stage #shell { grid-template-columns: 100%; grid-template-rows: minmax(0, 1fr) var(--sheet); }
  body.in-stage #shell:has(#stage.panel-collapsed) { grid-template-columns: 100%; grid-template-rows: minmax(0, 1fr) 0; }
  .st-side { border-left: none; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; box-shadow: 0 -8px 24px rgba(0,0,0,.35); position: relative; z-index: 6; }
  .st-grip { display: block; flex: none; width: 40px; height: 5px; margin: 8px auto 2px; border-radius: 3px; background: var(--line); }
  .st-panel { padding: 6px calc(16px + var(--sar)) calc(20px + var(--sab)) calc(16px + var(--sal)); }
  .texgrid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
}
/* wide but short landscape phones still get the side layout, just narrower */
@media (min-width: 900px) and (max-height: 520px) and (orientation: landscape) { :root { --side: 300px; } }

/* home on narrow screens */
@media (max-width: 600px) {
  #app { padding-left: calc(14px + var(--sal)); padding-right: calc(14px + var(--sar)); }
  .topbar { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  .brand h1 { font-size: 21px; }
  .cats { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ------------------------------------------------------------ toast */
.toast {
  position: fixed; z-index: 100; left: 50%; bottom: calc(24px + var(--sab));
  transform: translate(-50%, 20px); max-width: min(560px, calc(100vw - 32px));
  padding: 12px 18px; border-radius: var(--r); background: rgba(35,40,50,.96); border: 1px solid var(--line);
  color: var(--text); font-size: 14px; box-shadow: 0 8px 28px rgba(0,0,0,.45);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.in-stage .toast { bottom: calc(120px + var(--sab)); }

/* ------------------------------------------------------------ generic mv- fallback (map view controls) */
[class^="mv-"], [class*=" mv-"] { -webkit-user-select: none; user-select: none; }
.mv-joy, .mv-joystick, .mv-stick {
  position: absolute; z-index: 3; left: calc(24px + var(--sal)); bottom: calc(24px + var(--sab));
  width: 132px; height: 132px; border-radius: 50%;
  background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.18);
  touch-action: none; pointer-events: auto;
}
.mv-knob, .mv-joy-knob, .mv-thumb {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 50%; background: rgba(255,255,255,.35); border: 2px solid rgba(255,255,255,.5); pointer-events: none;
}
.mv-btn, .mv-round, .mv-jump, .mv-fab {
  min-width: 56px; min-height: 56px; padding: 0 14px; border-radius: 28px;
  display: inline-grid; place-items: center; border: 1px solid rgba(255,255,255,.18);
  background: rgba(28,32,39,.82); color: var(--text); font-size: 14px; font-weight: 600;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); touch-action: manipulation; pointer-events: auto;
}
.mv-btn.on, .mv-round.on, .mv-fab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.mv-btn:active, .mv-round:active, .mv-jump:active, .mv-fab:active { filter: brightness(1.25); }
.mv-pad, .mv-btns, .mv-right {
  position: absolute; z-index: 3; right: calc(24px + var(--sar)); bottom: calc(24px + var(--sab));
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: auto;
}
.mv-crosshair, .mv-cross {
  position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; pointer-events: none;
  background: linear-gradient(#fff, #fff) center / 2px 100% no-repeat, linear-gradient(#fff, #fff) center / 100% 2px no-repeat; opacity: .8;
}
.mv-list { display: flex; flex-direction: column; gap: 2px; }
.mv-item { min-height: var(--tap); display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--r-sm); background: transparent; border: none; text-align: left; width: 100%; }
.mv-item.on { background: rgba(79,156,255,.16); }
.mv-field { display: flex; align-items: center; gap: 8px; min-height: var(--tap); }
.mv-field input, .mv-input { flex: 1; min-width: 0; height: 40px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); font-size: 16px; }
.mv-hint { position: absolute; left: 50%; transform: translateX(-50%); top: calc(118px + var(--sat)); padding: 6px 12px; border-radius: 16px; background: rgba(17,19,23,.75); font-size: 12px; color: var(--muted); pointer-events: none; }
/* while the timeline shows, lift bottom-anchored stage controls above it */
#stage.has-timeline .mv-joy, #stage.has-timeline .mv-joystick, #stage.has-timeline .mv-pad, #stage.has-timeline .mv-btns { bottom: calc(130px + var(--sab)); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: .01ms !important; } }

/* home hero row: keep the 4 heroes on one row on tablets (avoid a 3 + 1 orphan) */
.home-heroes .grid.big { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
@media (max-width: 600px) { .home-heroes .grid.big { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
