/* 蚁核纪元 · AntCore Era — standalone app shell. Palette follows antai.meme (espresso / amber, Geist) and the teaser:
   dark brown-black, amber/gold glow, glass panels, circuit + data-flow motifs. Mobile-first. */
:root, [data-theme="dark"] {
  --bg: #0E0A06; --bg2: #17110B; --ink: #F5EDE0; --ink2: #D6C8B6; --ink3: #9C8B78;
  --amber: #E4A146; --hi: #F7C06B; --lo: rgba(228,161,70,.14); --line: rgba(247,192,107,.16); --line2: rgba(247,192,107,.32);
  --glass: rgba(34,25,17,.62); --glass2: rgba(52,39,26,.55); --glow: 0 0 0 1px rgba(247,192,107,.18), 0 10px 40px -18px rgba(247,192,107,.45);
  --up: #52C98F; --down: #F4826B; --field: rgba(20,14,9,.7);
  --r0: #A9B6C6; --r1: #4FD2FF; --r2: #B78CFF; --r3: #F7C06B; --r4: #FF6FAF;
  --sans: "Geist", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #F5F0E6; --bg2: #EFE7D8; --ink: #2B2118; --ink2: #5E5145; --ink3: #8C7E70;
  --amber: #C8872E; --hi: #B57722; --lo: rgba(200,135,46,.12); --line: rgba(43,33,24,.12); --line2: rgba(200,135,46,.4);
  --glass: rgba(251,248,242,.72); --glass2: rgba(239,231,216,.7); --glow: 0 0 0 1px rgba(200,135,46,.22), 0 10px 30px -18px rgba(200,135,46,.5);
  --up: #2F8F5B; --down: #B4432F; --field: #fff;
  --r0: #6D7C8E; --r1: #1C93C0; --r2: #7D50D6; --r3: #C8872E; --r4: #D23E86;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: radial-gradient(120% 70% at 50% -10%, #2A1D10 0%, var(--bg) 60%) fixed, var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); overflow-x: hidden; }
[data-theme="light"] body { background: radial-gradient(120% 70% at 50% -10%, #FFF6E6 0%, var(--bg) 60%) fixed, var(--bg); }
[hidden] { display: none !important; }
h1, h2, h3, p, ol, ul { margin: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.tiny { font-size: 12px; color: var(--ink3); }
.center { text-align: center; }
#bg-cv { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .55; }
[data-theme="light"] #bg-cv { opacity: .35; }
.app { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; min-height: 100%; padding-bottom: calc(78px + env(safe-area-inset-bottom)); }

/* ---- top bar ---- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  background: linear-gradient(var(--bg) 40%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.top__brand { display: flex; align-items: center; gap: 8px; text-decoration: none; margin-right: auto; min-width: 0; }
.hexmark { width: 30px; height: 30px; fill: none; stroke: var(--hi); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(247,192,107,.6)); }
.hexmark circle { fill: var(--hi); stroke: none; }
.top__t { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.top__t b { font-size: 16px; letter-spacing: .04em; color: var(--hi); white-space: nowrap; }
.top__t small { font-size: 10.5px; color: var(--ink3); letter-spacing: .08em; white-space: nowrap; }
.ib { border: 0; background: var(--glass2); min-width: 36px; height: 34px; border-radius: 10px; cursor: pointer; color: var(--ink2); font-size: 12.5px; padding: 0 7px; }
.ib svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; vertical-align: -3px; }
.ib em { font-style: normal; opacity: .5; margin: 0 1px; }
.ib [data-l].on { color: var(--hi); font-weight: 700; }
.mode { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line2); background: var(--lo); color: var(--hi); font-size: 12px; font-weight: 700; cursor: pointer; letter-spacing: .04em; }
.mode i { width: 7px; height: 7px; border-radius: 50%; background: var(--hi); box-shadow: 0 0 8px var(--hi); }
.mode[data-m="chain"] { color: var(--up); border-color: rgba(82,201,143,.45); background: rgba(82,201,143,.1); }
.mode[data-m="chain"] i { background: var(--up); box-shadow: 0 0 8px var(--up); }
.wal { height: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: linear-gradient(135deg, var(--hi), var(--amber)); color: #1B1209; font-weight: 700; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.wal[data-on="1"] { background: var(--glass2); color: var(--hi); box-shadow: inset 0 0 0 1px var(--line2); font-family: var(--mono); font-weight: 500; }
@media (max-width: 380px) { .top__t small { display: none; } .ib { min-width: 32px; padding: 0 5px; } .wal { padding: 0 9px; } }

.ribbon { margin: 2px 12px 8px; }
.ribbon:empty { display: none; }
.rib { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; font-size: 12.5px; line-height: 1.45; border: 1px solid var(--line2); background: var(--lo); color: var(--ink2); }
.rib b { color: var(--hi); }
.rib .btn { margin-left: auto; flex: none; }
.rib--trial { border-style: dashed; }

/* ---- glass, panels ---- */
.views { padding: 0 12px; display: block; }
.view { display: grid; gap: 12px; animation: vin .35s ease; }
@keyframes vin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: 18px; backdrop-filter: blur(14px) saturate(1.1); -webkit-backdrop-filter: blur(14px) saturate(1.1); box-shadow: var(--glow); position: relative; }
.glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(247,192,107,.14), transparent 30%, transparent 70%, rgba(247,192,107,.08)); mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000); -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px; }
.panel { padding: 14px; display: grid; gap: 10px; }
.panel__hd, .vh { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel h2, .vh h2 { font-size: 18px; letter-spacing: .02em; }
.panel h3 { font-size: 15px; }
.sub { font-size: 12.5px; color: var(--ink2); line-height: 1.6; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font: 600 11px/1.4 var(--mono); color: var(--hi); background: var(--lo); border: 1px solid var(--line); white-space: nowrap; }
.chip--ok { color: var(--up); border-color: rgba(82,201,143,.4); background: rgba(82,201,143,.1); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.lnk { border: 0; background: none; color: var(--hi); font-size: 12.5px; cursor: pointer; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line2); }
.msg { font-size: 12.5px; color: var(--ink2); min-height: 0; word-break: break-word; }
.msg:empty { display: none; }
.msg.ok { color: var(--up); } .msg.bad { color: var(--down); }
.msg a { color: var(--hi); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 18px; border: 0; border-radius: 14px; cursor: pointer; font-weight: 700; font-size: 15px; text-decoration: none; }
.btn--wide { width: 100%; }
.btn--glow { background: linear-gradient(135deg, var(--hi), var(--amber)); color: #1B1209; box-shadow: 0 8px 26px -10px rgba(247,192,107,.85), 0 0 0 1px rgba(247,192,107,.4); position: relative; overflow: hidden; }
.btn--glow::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); animation: sheen 3.2s ease-in-out infinite; }
@keyframes sheen { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.btn--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line2); }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn:disabled::after { display: none; }
.btn:not(:disabled):active { transform: scale(.98); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--glass2); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 9px; font-size: 13px; color: var(--ink2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--lo); color: var(--hi); font-weight: 700; box-shadow: inset 0 0 0 1px var(--line2); }
.seg--sm button { padding: 4px 9px; font-size: 12px; }

/* ---- hatch stage ---- */
.stage { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 1.08 / 1; border: 1px solid var(--line); box-shadow: var(--glow); background: #120C07; }
.stage__holo { position: absolute; inset: 0; }
.stage__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; opacity: .92; mask: radial-gradient(85% 80% at 50% 45%, #000 55%, transparent 100%); -webkit-mask: radial-gradient(85% 80% at 50% 45%, #000 55%, transparent 100%); animation: float 6s ease-in-out infinite; }
[data-theme="light"] .stage { background: #1A120A; }
@keyframes float { 0%, 100% { transform: translateY(0) scale(1.02); } 50% { transform: translateY(-6px) scale(1.04); } }
#holo-cv { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage__scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(247,192,107,.05) 0 1px, transparent 1px 4px); mix-blend-mode: screen; }
.stage__scan::after { content: ""; position: absolute; left: 0; right: 0; height: 22%; top: -25%; background: linear-gradient(transparent, rgba(247,192,107,.16), transparent); animation: scan 4.5s linear infinite; }
@keyframes scan { to { top: 110%; } }
.stage.is-hatching .stage__img { animation: pulse .5s ease-in-out infinite alternate; }
@keyframes pulse { from { filter: brightness(1); } to { filter: brightness(1.6) saturate(1.3); } }
.stage__hud { position: absolute; left: 10px; right: 10px; bottom: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hud { padding: 6px 8px; border-radius: 10px; background: rgba(14,10,6,.62); border: 1px solid rgba(247,192,107,.22); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; flex-direction: column; color: #D6C8B6; }
.hud span { font-size: 10.5px; letter-spacing: .06em; }
.hud b { font-size: 13.5px; color: #F7C06B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sbtn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: var(--glass2); font-size: 22px; cursor: pointer; color: var(--hi); }
.stepper__n { min-width: 64px; text-align: center; }
.stepper__n b { font-size: 26px; color: var(--hi); }
.stepper__n small { color: var(--ink3); margin-left: 3px; }
.quick { display: flex; gap: 6px; margin-left: auto; }
.quick button { border: 1px solid var(--line2); background: transparent; border-radius: 10px; padding: 8px 10px; font: 600 13px var(--mono); color: var(--ink2); cursor: pointer; }
.quick button.on { color: var(--hi); background: var(--lo); }
.cost { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cost span { color: var(--ink3); font-size: 13px; }
.cost b { font-size: 20px; color: var(--ink); }
.cost small { color: var(--ink3); font-size: 12px; margin-left: auto; }
.split { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--glass2); }
.split i { display: block; height: 100%; transition: width .4s; }
.split .s1, .splitl .d1 { background: var(--hi); box-shadow: 0 0 10px var(--hi); }
.split .s2, .splitl .d2 { background: #6B5845; }
.split .s3, .splitl .d3 { background: var(--r1); }
.splitl { list-style: none; padding: 0; display: grid; gap: 3px; font-size: 12.5px; color: var(--ink2); }
.splitl i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.splitl b { color: var(--ink); }
.pods { display: grid; gap: 8px; }
.pods:empty::before { content: attr(data-empty); font-size: 12.5px; color: var(--ink3); }
.pod { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--glass2); border: 1px solid var(--line); }
.pod__hex { width: 38px; height: 42px; flex: none; position: relative; }
.pod__hex svg { width: 100%; height: 100%; fill: rgba(247,192,107,.1); stroke: var(--hi); stroke-width: 2; }
.pod[data-st="wait"] .pod__hex svg { animation: breathe 1.1s ease-in-out infinite; }
@keyframes breathe { 50% { filter: drop-shadow(0 0 8px var(--hi)); opacity: .7; } }
.pod__b { flex: 1; min-width: 0; font-size: 13px; }
.pod__b small { display: block; color: var(--ink3); font-size: 11.5px; font-family: var(--mono); }
.blocks { display: inline-flex; gap: 3px; margin-top: 3px; }
.blocks i { width: 14px; height: 5px; border-radius: 2px; background: var(--line2); }
.blocks i.on { background: var(--hi); box-shadow: 0 0 6px var(--hi); }
.otbl { display: grid; grid-template-columns: auto 1fr 1fr 1fr; gap: 4px 10px; font-size: 12.5px; align-items: center; }
.otbl b { font-weight: 600; }
.otbl .h { color: var(--ink3); font-size: 11px; }

/* ---- ant cards ---- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 480px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.cards:empty::before { content: attr(data-empty); grid-column: 1 / -1; padding: 22px 8px; text-align: center; color: var(--ink3); font-size: 13px; border: 1px dashed var(--line2); border-radius: 16px; }
.ac { --rc: var(--r0); position: relative; border-radius: 14px; padding: 6px 6px 7px; cursor: pointer; text-align: left; border: 1px solid color-mix(in srgb, var(--rc) 45%, transparent); background:
  radial-gradient(90% 60% at 50% 30%, color-mix(in srgb, var(--rc) 22%, transparent), transparent 70%), linear-gradient(170deg, rgba(40,29,19,.9), rgba(14,10,6,.95)); overflow: hidden; color: #F5EDE0; }
.ac[data-r="1"] { --rc: var(--r1); } .ac[data-r="2"] { --rc: var(--r2); } .ac[data-r="3"] { --rc: var(--r3); } .ac[data-r="4"] { --rc: var(--r4); }
.ac[data-r="3"], .ac[data-r="4"] { box-shadow: 0 0 18px -6px var(--rc); }
.ac[data-r="4"]::after { content: ""; position: absolute; inset: 0; background: conic-gradient(from 0deg, transparent, color-mix(in srgb, var(--rc) 35%, transparent), transparent 30%); animation: spin 4s linear infinite; mix-blend-mode: screen; pointer-events: none; }
@keyframes spin { to { transform: rotate(1turn); } }
.ac svg.ant { display: block; width: 100%; aspect-ratio: 1; filter: drop-shadow(0 0 3px color-mix(in srgb, var(--rc) 70%, transparent)); }
.ac { container-type: inline-size; }
@container (max-width: 80px) { .ac__nm { font-size: 10.5px; } .ac__st { font-size: 9.5px; } .ac__top { font-size: 8.5px; } }
.ac__top { display: flex; justify-content: space-between; font: 600 10px/1 var(--mono); color: color-mix(in srgb, var(--rc) 85%, #fff); letter-spacing: .04em; }
.ac__nm { font-size: 12px; font-weight: 700; margin-top: 2px; white-space: nowrap; }
.ac__st { display: flex; justify-content: space-between; font: 500 11px var(--mono); color: #D6C8B6; }
.ac__st span { color: #9C8B78; } .ac__st b { color: #F7C06B; font-weight: 600; margin-left: 2px; }
.ac.sel { outline: 2px solid var(--hi); outline-offset: 1px; }
.ac.sel::before { content: "✓"; position: absolute; top: 4px; right: 6px; z-index: 2; width: 18px; height: 18px; border-radius: 50%; background: var(--hi); color: #1B1209; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.ac.dim { opacity: .35; }
.ac.new { animation: born .9s cubic-bezier(.2,1.4,.4,1); }
@keyframes born { 0% { transform: scale(.4) rotateY(90deg); opacity: 0; filter: brightness(3); } 60% { filter: brightness(1.6); } 100% { transform: none; opacity: 1; filter: none; } }
.ant .a-trace { stroke-dasharray: 3 4; animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -14; } }
.ant .a-eye { animation: blink 3.6s ease-in-out infinite; }
@keyframes blink { 0%, 92%, 100% { opacity: 1; } 95% { opacity: .2; } }

/* ---- evolve ---- */
.fuse { display: grid; grid-template-columns: 1fr 1fr 1fr 28px 1fr; gap: 6px; align-items: center; }
.fuse__slot, .fuse__out { aspect-ratio: .72; border-radius: 12px; border: 1px dashed var(--line2); display: grid; place-items: center; color: var(--ink3); font: 700 18px var(--mono); overflow: hidden; }
.fuse__slot .ac, .fuse__out .ac { width: 100%; height: 100%; }
.fuse__arrow svg { width: 28px; fill: none; stroke: var(--hi); stroke-width: 2.4; stroke-linecap: round; }
.fuse.is-fusing .fuse__slot { animation: fz .8s ease-in forwards; }
@keyframes fz { to { transform: translateX(60px) scale(.3); opacity: 0; filter: brightness(3); } }
.rate { font-size: 13px; color: var(--ink2); }
.rate b { color: var(--hi); }

/* ---- arena ---- */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tl { padding: 7px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass2); font-size: 11.5px; color: var(--ink3); }
.tl b { display: block; color: var(--ink2); font-size: 12px; }
.tl.on { border-color: var(--line2); background: var(--lo); }
.tl.on b { color: var(--hi); }
.lanes { display: grid; gap: 8px; position: relative; }
.lane { position: relative; display: flex; align-items: center; gap: 10px; min-height: 92px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--line); background:
  linear-gradient(90deg, var(--lo), transparent 60%); overflow: hidden; cursor: pointer; }
.lane::after { content: ""; position: absolute; left: 70px; right: 8px; top: 50%; height: 1px; background: repeating-linear-gradient(90deg, var(--line2) 0 6px, transparent 6px 12px); animation: dash 1.2s linear infinite; }
@keyframes dash { to { background-position: 24px 0; } }
.lane__n { position: absolute; right: 10px; top: 8px; font-size: 10.5px; color: var(--ink3); z-index: 1; }
.lane__slot { width: 66px; flex: none; position: relative; z-index: 1; }
.lane__slot:empty { height: 76px; border-radius: 10px; border: 1px dashed var(--line2); }
.lane__slot:empty::after { content: "+"; display: grid; place-items: center; height: 100%; color: var(--hi); font-size: 22px; }
.lane.pick { border-color: var(--hi); box-shadow: 0 0 0 1px var(--hi) inset; }
.lane .lane__info { position: relative; z-index: 1; font-size: 12px; color: var(--ink2); background: var(--glass); padding: 3px 8px; border-radius: 8px; }
.pw b { color: var(--hi); font-size: 16px; }
.fights { display: grid; gap: 8px; }
.fight { border-radius: 14px; border: 1px solid var(--line); padding: 8px 10px; background: var(--glass2); display: grid; gap: 6px; }
.fight__hd { display: flex; justify-content: space-between; font-size: 12.5px; }
.fight__hd .w { color: var(--up); font-weight: 700; } .fight__hd .l { color: var(--down); font-weight: 700; } .fight__hd .d { color: var(--ink2); font-weight: 700; }
.fl { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 6px; align-items: center; font: 11px var(--mono); color: var(--ink3); }
.bar2 { height: 7px; border-radius: 4px; background: var(--line); position: relative; overflow: hidden; }
.bar2 i { position: absolute; top: 0; bottom: 0; left: 0; width: 0; border-radius: 4px; transition: width .7s cubic-bezier(.2,.8,.2,1); }
.bar2.me i { background: var(--hi); box-shadow: 0 0 8px var(--hi); }
.bar2.op i { background: var(--r1); }
.score { display: flex; gap: 10px; align-items: baseline; }
.score b { font-size: 26px; color: var(--hi); }

/* ---- board ---- */
.poolbar { height: 14px; border-radius: 8px; padding: 2px; background: var(--glass2); border: 1px solid var(--line2); display: flex; }
.poolbar__f { height: 100%; border-radius: 5px; width: 0; transition: width 1s; background: repeating-linear-gradient(90deg, var(--hi) 0 10px, var(--amber) 10px 12px); box-shadow: 0 0 12px var(--hi); }
.poolv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.poolv div { padding: 8px 10px; border-radius: 12px; background: var(--glass2); border: 1px solid var(--line); }
.poolv small { display: block; font: 600 10.5px var(--mono); color: var(--ink3); }
.poolv b { font-size: 18px; color: var(--hi); }
.lb { list-style: none; padding: 0; display: grid; gap: 6px; counter-reset: r; }
.lb li { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--glass2); border: 1px solid var(--line); font-size: 13px; }
.lb li .rk { font: 800 14px var(--mono); color: var(--ink3); }
.lb li:nth-child(1) .rk { color: #F7C06B; } .lb li:nth-child(2) .rk { color: #D7DCE2; } .lb li:nth-child(3) .rk { color: #DE9563; }
.lb li.me { border-color: var(--hi); background: var(--lo); }
.lb li small { display: block; color: var(--ink3); font: 11px var(--mono); }
.lb li .pz { text-align: right; font: 600 12px var(--mono); color: var(--hi); }
.lb:empty::before { content: attr(data-empty); color: var(--ink3); font-size: 12.5px; }
.rules ol { padding-left: 18px; display: grid; gap: 6px; font-size: 12.5px; color: var(--ink2); }
#vid { width: 100%; border-radius: 12px; background: #000; aspect-ratio: 9 / 16; max-height: 70vh; }

/* ---- tabs ---- */
.tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 30; width: 100%; max-width: 560px; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 35%); }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 5px; text-decoration: none; color: var(--ink3); font-size: 11.5px; border-radius: 14px; }
.tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs a.on { color: var(--hi); background: var(--glass); box-shadow: var(--glow); }
.tabs a.on svg { filter: drop-shadow(0 0 6px var(--hi)); }

/* ---- modal / toast ---- */
.modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: flex-end; justify-content: center; background: rgba(8,5,3,.6); padding: 12px; }
.modal[data-open] { display: flex; animation: vin .25s; }
.modal__box { width: 100%; max-width: 520px; padding: 16px; display: grid; gap: 10px; max-height: 88vh; overflow: auto; }
@media (min-width: 640px) { .modal { align-items: center; } }
.wbtn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--glass2); cursor: pointer; text-align: left; font-weight: 700; }
.wbtn small { font-weight: 400; color: var(--ink3); font-size: 11.5px; }
.wbtn img { width: 22px; height: 22px; border-radius: 6px; vertical-align: -5px; margin-right: 8px; }
.wbtn--bn { border-color: rgba(240,185,11,.55); }
.qr { width: 220px; height: 220px; margin: 0 auto; border-radius: 14px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.qr canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 80; padding: 10px 16px; border-radius: 12px; background: #1E150D; color: #F5EDE0; border: 1px solid rgba(247,192,107,.35); font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; max-width: 92vw; text-align: center; }
.toast[data-open] { opacity: 1; transform: translate(-50%, 0); }
.sheet .ac { width: 60%; margin: 0 auto; }
.sheet__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sheet__stats div { padding: 8px; border-radius: 10px; background: var(--glass2); text-align: center; }
.sheet__stats small { display: block; font-size: 11px; color: var(--ink3); }
.sheet__stats b { font: 700 18px var(--mono); color: var(--hi); }
.reveal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.caption { position: fixed; left: 50%; transform: translateX(-50%); top: 74px; z-index: 90; width: min(94vw, 520px); padding: 12px 16px; border-radius: 16px; background: rgba(14,10,6,.88); border: 1px solid rgba(247,192,107,.5); color: #F5EDE0; font-size: 19px; line-height: 1.45; text-align: center; font-weight: 600; box-shadow: 0 10px 40px -10px rgba(247,192,107,.6); }
.caption small { display: block; font-size: 14px; color: #F7C06B; font-weight: 500; margin-top: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
