/* =========================================================
   PACKSHIFT — front-end v1
   ========================================================= */
:root {
  color-scheme: dark;
  --bg: #040506;
  --panel-solid: #090c0d;
  --line: rgba(255, 255, 255, .065);
  --line-2: rgba(255, 255, 255, .11);
  --neon: #2bff88;
  --neon-2: #14d96d;
  --neon-ink: #021a0c;
  --neon-glow: rgba(43, 255, 136, .42);
  --neon-soft: rgba(43, 255, 136, .08);
  --text: #e8f1ed;
  --muted: #7b8984;
  --dim: #4f5b57;
  --red: #ff5c78;
  --red-soft: #ff8da0;
  --gold: #ffc53d;
  --c-common: #a6b3ad;
  --c-uncommon: #25e8cf;
  --c-rare: #9a7bff;
  --c-epic: #ffc53d;
  --rc: var(--c-common);
  --r: 14px;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --sans: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --top-h: 60px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 100px; }
body {
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 50% -8%, rgba(43, 255, 136, .10), transparent 70%),
    radial-gradient(700px 500px at 100% 100%, rgba(43, 255, 136, .04), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.35;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.is-locked { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; }
em { font-style: normal; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; border-radius: 6px; }
.pos { color: var(--neon); }
.neg { color: var(--red); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* loading skeletons */
@keyframes skel { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.sk, .sk-block, .sk-row, .sk-pk, .sk-cell, .sk-tile, .sk-tr td {
  background: linear-gradient(100deg, rgba(255,255,255,.035) 30%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.035) 70%) !important;
  background-size: 300% 100% !important;
  animation: skel 1.4s linear infinite;
  border-radius: 6px;
}
.sk { color: transparent !important; text-shadow: none !important; display: inline-block; min-width: 5ch; min-height: .9em; }
.sk-block { display: block; height: 44px; width: 100%; }
.sk-block.tall { height: 180px; }
.sk-row { height: 46px; margin: 6px 0; list-style: none; }
.sk-pk { height: 58px; border: 0 !important; }
.sk-cell { min-height: 92px; border: 0 !important; }
.sk-tile { min-height: 320px; }
.sk-tr td { height: 44px; border: 4px solid transparent !important; background-clip: padding-box !important; }

.file-warn { display: none; }
.is-file .file-warn {
  display: block; position: fixed; inset: auto 12px 12px 12px; z-index: 1000; padding: 12px 14px; border-radius: 10px;
  background: #1a1405; color: #ffd65a; border: 1px solid rgba(255,214,90,.4); font: 600 13px/1.4 var(--sans);
}
.file-warn code { font-family: var(--mono); background: rgba(255,255,255,.08); padding: 1px 5px; border-radius: 4px; }

.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 20%, transparent 80%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 20%, transparent 80%);
}

/* ---------- TOP BAR ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 26px;
  height: var(--top-h); padding: 0 20px;
  background: rgba(4, 5, 6, .82);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
          backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; flex: none; border-radius: 6px; }
.brand-full { height: 26px; width: auto; filter: drop-shadow(0 0 10px rgba(43,255,136,.25)); transition: filter .3s; }
.brand:hover .brand-full { filter: drop-shadow(0 0 16px rgba(43,255,136,.55)); }
.brand-icon { display: none; height: 30px; width: 30px; }
.nav { display: flex; gap: 2px; }
.nav a {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px;
  color: var(--muted); font-weight: 650; font-size: 13px; letter-spacing: .01em;
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav a.is-active { color: var(--text); }
.nav a.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -11px; height: 2px;
  background: var(--neon); box-shadow: 0 0 12px var(--neon);
  animation: navBar .35s var(--ease-out);
}
@keyframes navBar { from { transform: scaleX(0); } to { transform: none; } }
.nav-badge, .tab-badge {
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; display: inline-grid; place-items: center;
  font-size: 10px; font-weight: 800; font-style: normal; color: var(--neon-ink); background: var(--neon); box-shadow: 0 0 10px rgba(43,255,136,.5);
}
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 11px; border-radius: 9px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
  font-size: 12px; font-weight: 650; white-space: nowrap;
  transition: border-color .2s, background .2s, transform .15s;
}
a.chip:hover, button.chip:hover { border-color: var(--line-2); background: rgba(255,255,255,.05); }
a.chip:active, button.chip:active { transform: scale(.97); }
.chip .lbl { color: var(--muted); font-size: 10.5px; letter-spacing: .08em; }
.chip-bal .mono { font-size: 13px; font-weight: 700; }
.chip-bal.flash-up .mono { color: var(--neon); }
.chip-bal.flash-down .mono { color: var(--red-soft); }
.chip-streak { color: #ffb648; }
.chip-streak .mono { font-size: 13px; font-weight: 800; }
.chip-streak.is-risk { animation: riskPulse 2.4s ease-in-out infinite; }
.chip-streak.is-off { color: var(--dim); }
@keyframes riskPulse { 0%, 100% { border-color: var(--line); } 50% { border-color: rgba(255,182,72,.6); box-shadow: 0 0 14px -2px rgba(255,182,72,.4); } }
.chip-level b { font-size: 13px; font-weight: 800; color: var(--neon); }
.lv-ring circle { transition: stroke-dashoffset 1s var(--ease-out); }
.icon-btn {
  width: 34px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--muted);
  border: 1px solid var(--line); background: rgba(255,255,255,.03); transition: color .2s, border-color .2s, background .2s, transform .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn[aria-pressed="true"] { color: var(--neon); border-color: rgba(43,255,136,.35); background: var(--neon-soft); }
.addr-av { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(from 40deg, #2bff88, #25e8cf, #9a7bff, #2bff88); }
.pulse-dot, .live-dot, .ok-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--neon); box-shadow: 0 0 0 0 var(--neon-glow);
  animation: pulse 2s infinite;
}
.ok-dot { width: 6px; height: 6px; margin-right: 6px; vertical-align: 1px; }
.live-dot { background: #ff3b5c; animation-name: pulseRed; }
.is-offline .live-dot, .live-dot.off { background: var(--dim); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--neon-glow); } 70% { box-shadow: 0 0 0 7px rgba(43,255,136,0); } 100% { box-shadow: 0 0 0 0 rgba(43,255,136,0); } }
@keyframes pulseRed { 0% { box-shadow: 0 0 0 0 rgba(255,59,92,.55); } 70% { box-shadow: 0 0 0 7px rgba(255,59,92,0); } 100% { box-shadow: 0 0 0 0 rgba(255,59,92,0); } }

/* ---------- TAPE ---------- */
.tape {
  position: relative; z-index: 1;
  height: 30px; overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: rgba(7,10,11,.7);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.tape-track { display: flex; width: max-content; height: 100%; align-items: center; animation: tape 70s linear infinite; }
.tape:hover .tape-track { animation-play-state: paused; }
.tape-item { display: inline-flex; align-items: center; gap: 8px; padding: 0 22px; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .04em; white-space: nowrap; }
.tape-item b { color: var(--text); font-weight: 600; }
.tape-item .up { color: var(--neon); }
.tape-item .ep { color: var(--gold); }
.tape-item i { width: 4px; height: 4px; background: var(--dim); transform: rotate(45deg); margin-left: 22px; }
@keyframes tape { to { transform: translateX(-50%); } }

/* ---------- VIEWS ---------- */
#app { position: relative; z-index: 1; }
.view { animation: viewIn .45s var(--ease-out); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page { max-width: 1240px; margin: 0 auto; padding: 26px 20px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 34px; font-weight: 900; font-stretch: 125%; letter-spacing: -.01em; line-height: 1; }
.eyebrow { display: block; font-size: 11px; color: var(--neon); letter-spacing: .2em; text-transform: uppercase; margin-bottom: 8px; }

/* ---------- LAYOUT (open) ---------- */
.terminal {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 336px;
  grid-template-areas: "feed main side";
  gap: 16px;
  max-width: 1680px; margin: 0 auto;
  padding: 16px 20px 28px;
  align-items: start;
}
.col-feed { grid-area: feed; display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(var(--top-h) + 16px); max-height: calc(100vh - var(--top-h) - 32px); min-height: 0; }
.col-main { grid-area: main; min-width: 0; }
.col-side { grid-area: side; display: grid; gap: 16px; }

.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(14,19,20,.88), rgba(8,11,12,.88));
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 20px 50px -30px rgba(0,0,0,.8);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; }
.panel-head h2 {
  display: flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-stretch: 112%;
}
.head-meta { font-size: 11px; color: var(--muted); }
.head-link { font-size: 11px; color: var(--muted); transition: color .2s; }
.head-link:hover { color: var(--neon); }
.v-lbl { font-size: 11px; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; font-weight: 650; }
.empty {
  display: grid; place-items: center; gap: 8px; text-align: center; padding: 34px 18px; color: var(--muted); font-size: 13px;
}
.empty b { color: var(--text); font-size: 15px; font-weight: 800; }
.empty .empty-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--neon); background: var(--neon-soft); border: 1px solid rgba(43,255,136,.2); }
.empty .btn-ghost { margin-top: 6px; }

/* ---------- BIGGEST PULL ---------- */
.bigpull {
  display: block; width: 100%; flex: none; text-align: left; padding: 12px 14px; overflow: hidden;
  background: linear-gradient(120deg, rgba(255,197,61,.10), rgba(14,19,20,.9) 55%);
  border-color: rgba(255,197,61,.22);
  transition: border-color .25s, transform .25s var(--ease-out);
}
.bigpull:hover { border-color: rgba(255,197,61,.5); transform: translateY(-1px); }
.bigpull::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255,230,160,.12) 50%, transparent 60%);
  transform: translateX(-100%); animation: shine 5s ease-in-out infinite 2s;
}
.bp-eyebrow { display: flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.bp-body { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; }
.bp-body img { width: 38px; height: 58px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(255,197,61,.45)); }
.bp-name { display: block; font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-who { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.bp-val { text-align: right; font-family: var(--mono); }
.bp-val b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.04em; }
.bp-val small { font-size: 10.5px; color: var(--gold); font-weight: 700; }
.bp-empty { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }

/* ---------- FEED ---------- */
.feed-panel { display: flex; flex-direction: column; min-height: 0; flex: 1; overflow: hidden; }
.feed-cols {
  display: grid; grid-template-columns: 1fr auto; gap: 8px;
  padding: 0 16px 8px; font-size: 10px; color: var(--dim); letter-spacing: .1em; text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.feed-cols span:nth-child(n+2) { text-align: right; }
.feed { list-style: none; margin: 0; padding: 4px 8px 8px; overflow: hidden; flex: 1; min-height: 0; }
.feed li.f-item { position: relative; }
.feed li.f-item + li.f-item { border-top: 1px solid rgba(255,255,255,.035); }
.feed .f-btn {
  width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left;
  padding: 7px 8px; border-radius: 9px; transition: background .2s;
}
.feed .f-btn:hover { background: rgba(255,255,255,.035); }
.feed .f-btn:active { background: rgba(255,255,255,.06); }
.feed .f-thumb { width: 30px; height: 44px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); transition: transform .3s var(--ease-spring); }
.feed .f-btn:hover .f-thumb { transform: scale(1.12) rotate(-4deg); }
.feed .f-card { min-width: 0; }
.feed .f-name { display: block; font-size: 12px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed .f-meta { display: flex; gap: 6px; align-items: center; font-family: var(--mono); font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.feed .f-r { color: var(--rc); font-weight: 700; letter-spacing: .04em; }
.feed .f-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.feed .f-val { font-family: var(--mono); font-size: 12.5px; font-weight: 700; }
.feed .f-res { font-family: var(--mono); font-size: 9.5px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.feed .f-res small { font-size: 9.5px; font-weight: 600; letter-spacing: 0; }
.feed .f-res.win { color: var(--neon); }
.feed .f-res.loss { color: var(--text); }
.feed .f-res.loss small { color: var(--red-soft); }
.feed .f-res.kept, .feed .f-res.pending { color: var(--muted); }
.feed .f-res.win small { color: var(--neon); opacity: .8; }
.feed li.is-new { animation: feedIn .7s var(--ease-out); }
.feed li.is-new::before {
  content: ""; position: absolute; inset: 0; border-radius: 9px; pointer-events: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--rc) 24%, transparent), transparent 70%);
  animation: feedFlash 2s ease-out forwards;
}
.feed li.r-epic .f-btn { background: linear-gradient(90deg, rgba(255,197,61,.08), transparent 60%); }
.feed li.r-epic .f-thumb { filter: drop-shadow(0 0 8px rgba(255,197,61,.55)); }
.feed li.is-you .f-name::after { content: " · YOU"; color: var(--neon); font-family: var(--mono); font-size: 10px; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes feedFlash { from { opacity: 1; } to { opacity: 0; } }
.r-common { --rc: var(--c-common); } .r-uncommon { --rc: var(--c-uncommon); } .r-rare { --rc: var(--c-rare); } .r-epic { --rc: var(--c-epic); }

/* ---------- MACHINE ---------- */
.machine { padding: 16px; overflow: hidden; }
.machine::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px;
  background: linear-gradient(160deg, rgba(43,255,136,.45), rgba(43,255,136,0) 30%, rgba(43,255,136,0) 70%, rgba(43,255,136,.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.machine-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.mt-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mt-id { padding: 4px 7px; border-radius: 6px; font-size: 11px; font-weight: 800; color: var(--neon-ink); background: var(--neon); box-shadow: 0 0 16px rgba(43,255,136,.35); }
.mt-name { font-size: 20px; font-weight: 900; font-stretch: 125%; letter-spacing: .02em; white-space: nowrap; }
.mt-set { font-size: 12px; font-weight: 600; color: var(--muted); font-stretch: 100%; letter-spacing: .02em; margin-left: 6px; }
.mt-right { font-size: 11px; color: var(--muted); white-space: nowrap; }

.pack-select { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.pk {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 11px; text-align: left;
  border: 1px solid var(--line); background: rgba(255,255,255,.02);
  transition: border-color .25s, background .25s, transform .25s var(--ease-out), box-shadow .25s;
}
.pk img { width: 30px; height: 44px; object-fit: contain; filter: drop-shadow(0 3px 8px rgba(0,0,0,.6)); transition: transform .35s var(--ease-spring); }
.pk-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pk-txt b { font-size: 17px; font-weight: 800; letter-spacing: -.03em; }
.pk-txt small { font-size: 10px; font-weight: 700; letter-spacing: .14em; color: var(--muted); }
.pk:hover { border-color: var(--line-2); background: rgba(255,255,255,.035); transform: translateY(-1px); }
.pk:active { transform: translateY(0) scale(.98); }
.pk:hover img { transform: rotate(-6deg) scale(1.06); }
.pk[aria-checked="true"] {
  border-color: rgba(43,255,136,.6);
  background: linear-gradient(180deg, rgba(43,255,136,.12), rgba(43,255,136,.03));
  box-shadow: 0 0 0 1px rgba(43,255,136,.18) inset, 0 8px 28px -10px rgba(43,255,136,.5);
}
.pk[aria-checked="true"] .pk-txt small { color: var(--neon); }
.pk.is-short { opacity: .55; }
.pk-hot { position: absolute; top: -7px; right: 8px; padding: 2px 5px; border-radius: 4px; font-size: 9px; font-weight: 800; letter-spacing: .1em; background: #0b0f10; color: var(--neon); border: 1px solid rgba(43,255,136,.45); }

/* stage */
.stage {
  position: relative; height: 344px; border-radius: 12px; overflow: hidden;
  background:
    radial-gradient(ellipse 40% 55% at 50% 58%, rgba(43,255,136,.20), transparent 70%),
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(43,255,136,.10), transparent 70%),
    linear-gradient(180deg, #050808, #030505);
  border: 1px solid rgba(255,255,255,.05);
  perspective: 900px; isolation: isolate;
}
.stage-floor {
  position: absolute; left: -30%; right: -30%; bottom: -10%; height: 70%;
  background-image: linear-gradient(rgba(43,255,136,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(43,255,136,.22) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: rotateX(72deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(0deg, #000 10%, transparent 85%); mask-image: linear-gradient(0deg, #000 10%, transparent 85%);
  animation: floor 3s linear infinite; opacity: .55;
}
@keyframes floor { to { background-position: 0 40px; } }
.stage-ring {
  position: absolute; left: 50%; top: 50%; width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 20%, rgba(43,255,136,.7) 25%, transparent 32% 55%, rgba(37,232,207,.6) 62%, transparent 70% 100%);
  -webkit-mask: radial-gradient(circle, transparent 64%, #000 65%, #000 66.5%, transparent 67.5%); mask: radial-gradient(circle, transparent 64%, #000 65%, #000 66.5%, transparent 67.5%);
  animation: spin 9s linear infinite;
}
.stage-ring.r2 { width: 380px; height: 380px; margin: -190px 0 0 -190px; opacity: .45; animation-duration: 16s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.stage-scan {
  position: absolute; left: 0; right: 0; height: 80px; top: -80px; pointer-events: none; z-index: 3;
  background: linear-gradient(180deg, transparent, rgba(43,255,136,.07) 70%, rgba(43,255,136,.35) 98%, transparent);
  animation: scan 5.5s cubic-bezier(.5,0,.5,1) infinite;
}
@keyframes scan { 0%, 30% { transform: translateY(0); } 80%, 100% { transform: translateY(470px); } }
.brk { position: absolute; width: 16px; height: 16px; border: 2px solid rgba(43,255,136,.55); z-index: 4; }
.brk.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.brk.tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.brk.bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.brk.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }

.odds-rail { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); z-index: 5; width: 150px; display: grid; gap: 9px; }
.rail-title { font-size: 10px; color: var(--dim); letter-spacing: .16em; margin-bottom: 2px; text-transform: uppercase; }
.odd { display: grid; grid-template-columns: 1fr auto; row-gap: 4px; font-size: 11.5px; font-weight: 650; }
.odd span { color: var(--c); }
.odd b { font-size: 12px; font-weight: 700; color: var(--text); }
.odd i { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.06); position: relative; overflow: hidden; }
.odd i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: max(var(--w), 3%); background: var(--c); box-shadow: 0 0 8px var(--c); border-radius: 2px; transform-origin: left; animation: barIn 1s var(--ease-out) both; }
@keyframes barIn { from { transform: scaleX(0); } }
.readout { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); z-index: 5; display: grid; gap: 12px; text-align: right; }
.readout span { display: block; font-size: 9.5px; color: var(--dim); letter-spacing: .14em; text-transform: uppercase; }
.readout b { font-size: 16px; font-weight: 700; }
.price-tag {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 6;
  display: flex; align-items: baseline; gap: 8px; padding: 5px 12px; border-radius: 999px;
  background: rgba(3,6,5,.75); border: 1px solid rgba(43,255,136,.3);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); white-space: nowrap;
}
.price-tag span { font-size: 15px; font-weight: 800; color: var(--neon); }
.price-tag small { font-size: 9.5px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }

.pack { position: absolute; left: 50%; top: 50%; z-index: 4; width: 196px; height: 290px; margin: -158px 0 0 -98px; animation: float 5s ease-in-out infinite; cursor: pointer; }
.pack-tilt { position: relative; width: 100%; height: 100%; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; transition: transform .35s var(--ease-out); }
.pack-img, .pack-holo, .pack-glare { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pack-img { filter: drop-shadow(0 0 22px rgba(43,255,136,.35)) drop-shadow(0 18px 30px rgba(0,0,0,.8)); }
.pack-img:not([src]), .pack-holo:not([src]), .pack-glare:not([src]) { visibility: hidden; }
.pack-holo, .pack-glare { -webkit-mask-size: 300% 300%; mask-size: 300% 300%; animation: holoSweep 4.5s ease-in-out infinite; }
.pack-holo {
  mix-blend-mode: screen; opacity: .75; filter: hue-rotate(90deg) saturate(2.6) brightness(1.15);
  -webkit-mask-image: linear-gradient(115deg, transparent 30%, #000 44%, #000 52%, transparent 66%); mask-image: linear-gradient(115deg, transparent 30%, #000 44%, #000 52%, transparent 66%);
}
.pack-glare {
  mix-blend-mode: screen; opacity: .9; filter: brightness(2.4) saturate(.3) contrast(1.4);
  -webkit-mask-image: linear-gradient(115deg, transparent 46%, #000 49%, transparent 52%); mask-image: linear-gradient(115deg, transparent 46%, #000 49%, transparent 52%);
}
.stage.is-hover .pack-holo, .stage.is-hover .pack-glare { animation: none; -webkit-mask-position: var(--mx, 50%) 50%; mask-position: var(--mx, 50%) 50%; }
@keyframes holoSweep { 0%, 100% { -webkit-mask-position: 100% 50%; mask-position: 100% 50%; } 50% { -webkit-mask-position: 0% 50%; mask-position: 0% 50%; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.pack-shadow { position: absolute; left: 50%; bottom: -26px; width: 150px; height: 18px; margin-left: -75px; border-radius: 50%; background: radial-gradient(ellipse, rgba(43,255,136,.4), transparent 70%); filter: blur(4px); }
.pack.swap .pack-tilt { animation: packSwap .55s var(--ease-out); }
@keyframes packSwap { 0% { transform: translateY(40px) scale(.85) rotateY(-50deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

.charge { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; }
.charge i { position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; margin: -110px 0 0 -110px; border-radius: 50%; border: 2px solid var(--neon); box-shadow: 0 0 20px var(--neon), inset 0 0 20px var(--neon); }
.stage.is-charging .charge { opacity: 1; }
.stage.is-charging .charge i { animation: implode .7s cubic-bezier(.6,0,.9,.4) infinite; }
.stage.is-charging .charge i:nth-child(2) { animation-delay: .23s; }
.stage.is-charging .charge i:nth-child(3) { animation-delay: .46s; }
@keyframes implode { from { transform: scale(2.4); opacity: 0; } 40% { opacity: .9; } to { transform: scale(.3); opacity: 0; } }
.stage.is-charging .pack { animation: shake .09s linear infinite; }
.stage.is-charging .pack-img { filter: drop-shadow(0 0 40px rgba(43,255,136,.9)) brightness(1.3); transition: filter 1s; }
.stage.is-charging .stage-ring { animation-duration: .7s; }
.stage.is-charging .stage-ring.r2 { animation-duration: 1s; }
.stage.is-flash::after { content: ""; position: absolute; inset: 0; z-index: 8; background: #eafff2; pointer-events: none; animation: stageFlash .35s ease-in forwards; }
@keyframes stageFlash { from { opacity: 0; } to { opacity: .95; } }
@keyframes shake { 0% { transform: translate(0,0) rotate(0); } 25% { transform: translate(-2px,1px) rotate(-1deg); } 50% { transform: translate(2px,-1px) rotate(1deg); } 75% { transform: translate(-1px,-2px) rotate(0); } 100% { transform: translate(1px,2px) rotate(.5deg); } }

/* controls */
.controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; }
.seg { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 11px; background: rgba(255,255,255,.025); border: 1px solid var(--line); }
.seg-lbl { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 0 8px 0 6px; }
.seg-btn { position: relative; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 16px; border-radius: 8px; font-family: var(--mono); font-weight: 800; font-size: 14px; transition: background .2s, color .2s, transform .15s; }
.seg-btn:not(.is-locked):hover { background: rgba(255,255,255,.05); }
.seg-btn[aria-checked="true"] { background: var(--neon); color: var(--neon-ink); box-shadow: 0 0 18px rgba(43,255,136,.4); }
.seg-btn.is-locked { color: var(--dim); cursor: not-allowed; background: repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 6px, transparent 6px 12px); border: 1px dashed rgba(255,255,255,.1); }
.seg-btn.is-locked.nope { animation: nope .35s; }
@keyframes nope { 20%, 60% { transform: translateX(-3px); } 40%, 80% { transform: translateX(3px); } }
.soon { font-size: 8.5px; font-weight: 800; letter-spacing: .12em; padding: 2px 4px; border-radius: 3px; background: rgba(255,255,255,.06); color: var(--muted); }
.ctrl-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.seg-btn { padding: 0 13px; }
.pay-btn { font-size: 12.5px; gap: 4px; }
.pay-btn[aria-checked="true"] { background: rgba(43,255,136,.14); color: var(--neon); box-shadow: inset 0 0 0 1px rgba(43,255,136,.55); }
.pay-btn:disabled { color: var(--dim); }
.pay-btn .soon { margin-left: 2px; }
.fig-alt { font-size: 11px; color: var(--neon); font-weight: 600; animation: drop .35s var(--ease-out); }
.settle-line { flex-basis: 100%; font-size: 10.5px; color: var(--muted); letter-spacing: .02em; }
.ob-price { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.ob-price small { font-size: 9.5px; font-weight: 700; opacity: .7; letter-spacing: 0; }
.ctrl-meta { font-size: 11px; color: var(--muted); text-align: right; }
.ctrl-meta b { color: var(--text); }

/* figures */
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.fig { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px 13px; background: var(--panel-solid); min-width: 0; }
.fig-lbl { font-size: 11px; color: var(--muted); font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.fig-num { font-size: 36px; font-weight: 800; letter-spacing: -.045em; line-height: 1.05; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.fig-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fig-vault .fig-num { color: var(--neon); text-shadow: 0 0 24px rgba(43,255,136,.35); }
.x-tag { font-style: normal; font-size: 13px; font-weight: 800; padding: 3px 6px; border-radius: 6px; color: var(--neon); border: 1px solid rgba(43,255,136,.4); letter-spacing: 0; }
.x-tag:empty { display: none; }

/* confirm */
.confirm { margin-top: 12px; border-radius: 12px; border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01)); }
.confirm-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 10px 10px 16px; }
.confirm-info { display: flex; align-items: center; gap: 16px; min-width: 0; flex-wrap: wrap; }
.maxloss { font-size: 13px; color: var(--muted); font-weight: 650; white-space: nowrap; }
.maxloss b { color: var(--text); font-size: 15px; font-weight: 800; margin-left: 4px; }
.outcomes-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; color: var(--neon); white-space: nowrap; border-bottom: 1px dashed rgba(43,255,136,.4); padding-bottom: 1px; transition: border-color .2s; }
.outcomes-link:hover { border-bottom-color: var(--neon); }
.outcomes-link svg { transition: transform .3s var(--ease-out); }
.outcomes-link[aria-expanded="true"] svg { transform: rotate(180deg); }

.open-btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  height: 54px; padding: 0 24px 0 28px; border-radius: 11px; flex: none;
  background: var(--neon); color: var(--neon-ink);
  font-weight: 900; font-size: 16px; font-stretch: 118%; letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(43,255,136,.9), 0 10px 40px -8px rgba(43,255,136,.65), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .2s var(--ease-out), box-shadow .2s, filter .2s, opacity .2s;
}
.open-btn:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px #6bffab, 0 14px 50px -6px rgba(43,255,136,.85), inset 0 1px 0 rgba(255,255,255,.6); }
.open-btn:active { transform: translateY(1px) scale(.985); }
.open-btn:disabled { filter: grayscale(.7) brightness(.6); box-shadow: none; transform: none; }
.ob-price { font-size: 15px; font-weight: 800; padding: 4px 8px; border-radius: 7px; background: rgba(2,26,12,.14); letter-spacing: -.02em; }
.ob-shine { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.65) 48%, transparent 60%); transform: translateX(-120%); animation: shine 3.6s ease-in-out infinite 1s; }
.open-btn:disabled .ob-shine { display: none; }
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.open-btn.is-busy { pointer-events: none; }
.open-btn.is-busy .ob-txt::after { content: "…"; }

.outcomes { padding: 2px 16px 14px; border-top: 1px solid var(--line); animation: drop .4s var(--ease-out); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.outcomes table { width: 100%; border-collapse: collapse; font-size: 13px; }
.outcomes th { text-align: right; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 700; padding: 10px 0 6px; }
.outcomes th:first-child, .outcomes td:first-child { text-align: left; }
.outcomes td { text-align: right; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.04); font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.outcomes td:first-child { font-family: var(--sans); font-weight: 750; color: var(--rc); }
.outcomes td:first-child small { display: block; font-family: var(--mono); font-weight: 500; font-size: 10.5px; color: var(--muted); }
.outcomes td.get { color: var(--text); font-weight: 800; }
.outcomes tr { animation: rowIn .4s var(--ease-out) both; }
.outcomes tr:nth-child(2) { animation-delay: .04s; } .outcomes tr:nth-child(3) { animation-delay: .08s; } .outcomes tr:nth-child(4) { animation-delay: .12s; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-6px); } }
.outcomes-note { margin: 8px 0 0; font-size: 10.5px; color: var(--dim); }

/* ---------- VAULT MINI ---------- */
.vault-mini { display: block; transition: border-color .25s; }
.vault-mini:hover { border-color: rgba(43,255,136,.28); }
.vault-glyph { width: 12px; height: 12px; border: 2px solid var(--neon); border-radius: 3px; box-shadow: 0 0 8px rgba(43,255,136,.5); }
.v-main { padding: 0 16px; display: flex; flex-direction: column; gap: 3px; }
.v-big { font-size: 30px; font-weight: 800; letter-spacing: -.045em; line-height: 1.1; transition: color .8s; }
.v-big.up, .vp-big.up { color: var(--neon); transition: none; }
.v-big.down, .vp-big.down { color: var(--red-soft); transition: none; }
.v-delta { font-size: 11px; color: var(--neon); }
.v-delta.neg { color: var(--red-soft); }
.spark { display: block; width: 100%; height: 54px; margin: 6px 0 2px; overflow: visible; }
.spark.big { height: 160px; margin-top: 16px; }
.spark .sp-line { filter: drop-shadow(0 0 4px rgba(43,255,136,.6)); }
.v-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.v-cell { background: var(--panel-solid); padding: 11px 16px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.v-cell b { font-size: 19px; font-weight: 800; letter-spacing: -.035em; }
.v-cell small { font-size: 10.5px; color: var(--muted); }
.v-limit { padding: 12px 16px 15px; }
.v-limit-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.v-limit-top b { color: var(--text); }
.v-limit-bot { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10.5px; color: var(--muted); }
.bar { position: relative; height: 6px; border-radius: 3px; background: rgba(255,255,255,.06); }
.bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--neon-2), var(--neon)); box-shadow: 0 0 10px rgba(43,255,136,.5); transition: width 1s var(--ease-out); }
.bar-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: rgba(255,255,255,.4); border-radius: 1px; }
.bar-mark:not([style]) { display: none; }

/* ---------- EDGE MINI ---------- */
.edge-mini { padding-bottom: 14px; }
.edge-glyph { width: 11px; height: 11px; background: var(--neon); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); box-shadow: 0 0 8px var(--neon); }
.em-row { padding: 0 16px; margin-top: 10px; }
.em-row:first-of-type { margin-top: 0; }
.em-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.em-level { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; }
.lv-badge {
  position: relative; width: 46px; height: 46px; display: grid; place-items: center;
  clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background: linear-gradient(140deg, #2bff88, #0d7a44);
}
.lv-badge::before { content: ""; position: absolute; inset: 2px; clip-path: inherit; background: #07130d; }
.lv-badge span { position: relative; font-family: var(--mono); font-weight: 800; font-size: 16px; color: var(--neon); }
.em-level-txt { min-width: 0; }
.em-level-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.em-level-top b { font-size: 15px; font-weight: 900; font-stretch: 112%; }
.em-level-top span { font-size: 10.5px; color: var(--muted); font-family: var(--mono); }
.em-next { margin-top: 6px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em-next b { color: var(--text); font-weight: 650; }
.bar.xp i { background: linear-gradient(90deg, #0f9a52, var(--neon)); }
.em-holder { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-radius: 10px; background: rgba(43,255,136,.05); border: 1px solid rgba(43,255,136,.14); }
.em-holder b { font-size: 13px; font-weight: 800; }
.em-holder small { display: block; font-size: 10.5px; color: var(--muted); font-family: var(--mono); }
.em-perks { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.perk { font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--neon); padding: 2px 6px; border-radius: 5px; background: rgba(43,255,136,.08); white-space: nowrap; }
.ex { font-family: var(--mono); font-size: 9px; color: var(--dim); letter-spacing: .04em; font-weight: 500; }
.mini-card { padding: 9px 11px; border-radius: 10px; background: rgba(255,255,255,.025); border: 1px solid var(--line); height: 100%; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mini-card .v-lbl { font-size: 9.5px; }
.mini-card b { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.mini-card small { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.streak-b { color: #ffb648; }
.streak-b.off { color: var(--dim); }
.mini-card .bar { height: 4px; margin-top: 2px; }
.tag-example { font-size: 9px; letter-spacing: .12em; padding: 3px 6px; border-radius: 4px; color: var(--muted); border: 1px dashed rgba(255,255,255,.18); font-family: var(--mono); white-space: nowrap; }

/* ---------- COLLECTION ---------- */
.pnl { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 1px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--line); margin-bottom: 18px; }
.pnl-cell { background: var(--panel-solid); padding: 16px 18px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pnl-cell b { font-family: var(--mono); font-size: 24px; font-weight: 800; letter-spacing: -.04em; white-space: nowrap; }
.pnl-cell.main b { font-size: 34px; }
.pnl-cell small { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.025); border: 1px solid var(--line); width: max-content; max-width: 100%; margin-bottom: 16px; }
.tabs [role="tab"] { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 9px; font-weight: 700; font-size: 13px; color: var(--muted); transition: background .2s, color .2s; white-space: nowrap; }
.tabs [role="tab"]:hover { color: var(--text); }
.tabs [role="tab"][aria-selected="true"] { background: rgba(255,255,255,.07); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.tabs .count { font-size: 11px; color: var(--muted); }
.tabs [aria-selected="true"] .count { color: var(--neon); }
.tabs-inline { margin-bottom: 0; }
.slab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.slab-tile {
  position: relative; display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden;
  background: linear-gradient(180deg, rgba(14,19,20,.9), rgba(8,11,12,.9)); border: 1px solid var(--line);
  transition: border-color .25s, transform .3s var(--ease-out), box-shadow .3s;
  animation: tileIn .5s var(--ease-out) both;
}
@keyframes tileIn { from { opacity: 0; transform: translateY(10px); } }
.slab-tile:hover { border-color: color-mix(in srgb, var(--rc) 45%, transparent); transform: translateY(-2px); box-shadow: 0 18px 40px -20px color-mix(in srgb, var(--rc) 50%, transparent); }
.st-art { position: relative; display: grid; place-items: center; padding: 18px 18px 8px; background: radial-gradient(ellipse 60% 60% at 50% 55%, color-mix(in srgb, var(--rc) 18%, transparent), transparent 70%); cursor: zoom-in; }
.st-art img { height: 210px; width: auto; object-fit: contain; filter: drop-shadow(0 12px 22px rgba(0,0,0,.7)); transition: transform .4s var(--ease-spring); }
.slab-tile:hover .st-art img { transform: scale(1.04) rotate(-1.5deg); }
.st-body { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.st-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.st-name { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-val { font-family: var(--mono); font-weight: 800; font-size: 15px; }
.st-meta { font-family: var(--mono); font-size: 10.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.st-rc { color: var(--rc); font-weight: 800; letter-spacing: .06em; }
.st-clock { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.st-clock b { color: var(--text); }
.st-clock.urgent b { color: #ffb648; }
.st-clock + .bar { height: 3px; }
.st-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.st-actions button { height: 40px; border-radius: 9px; font-weight: 800; font-size: 12px; letter-spacing: .02em; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; transition: transform .15s, filter .2s, background .2s, border-color .2s; }
.st-actions button small { font-family: var(--mono); font-size: 10.5px; font-weight: 700; }
.st-actions .a-sell { background: var(--neon); color: var(--neon-ink); }
.st-actions .a-sell:hover { filter: brightness(1.1); }
.st-actions .a-keep { border: 1px solid var(--line-2); background: rgba(255,255,255,.03); }
.st-actions .a-keep:hover { border-color: color-mix(in srgb, var(--rc) 60%, transparent); }
.st-actions button:active { transform: scale(.97); }
.st-actions button:disabled { opacity: .5; }
.st-share { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); background: rgba(0,0,0,.45); border: 1px solid var(--line); transition: color .2s; z-index: 2; }
.st-share:hover { color: var(--neon); }
.st-status { position: absolute; top: 10px; left: 10px; z-index: 2; font-family: var(--mono); font-size: 9.5px; font-weight: 800; letter-spacing: .12em; padding: 3px 6px; border-radius: 5px; background: rgba(0,0,0,.55); border: 1px solid var(--line-2); color: var(--muted); text-transform: uppercase; }
.st-status.urgent { color: #ffb648; border-color: rgba(255,182,72,.45); }

.hist { width: 100%; border-collapse: collapse; font-size: 13px; }
.hist-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel-solid); }
.hist th { text-align: left; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 700; padding: 12px 14px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.hist td { padding: 9px 14px; border-bottom: 1px solid rgba(255,255,255,.035); white-space: nowrap; }
.hist tr:last-child td { border-bottom: 0; }
.hist tbody tr { cursor: pointer; transition: background .2s; }
.hist tbody tr:hover { background: rgba(255,255,255,.025); }
.hist .num { text-align: right; font-family: var(--mono); font-weight: 650; }
.hist .h-card { display: flex; align-items: center; gap: 10px; }
.hist .h-card img { width: 22px; height: 33px; object-fit: contain; }
.hist .h-card b { display: block; font-size: 12.5px; }
.hist .h-card small { font-family: var(--mono); font-size: 10px; color: var(--rc); font-weight: 700; letter-spacing: .06em; }
.status-pill { font-family: var(--mono); font-size: 10px; font-weight: 800; letter-spacing: .08em; padding: 3px 7px; border-radius: 5px; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--muted); }
.status-pill.sold { color: var(--text); }
.status-pill.kept { color: var(--c-rare); border-color: rgba(154,123,255,.4); }
.status-pill.pending { color: #ffb648; border-color: rgba(255,182,72,.4); }

/* ---------- LEADERBOARD ---------- */
.lb-hero {
  display: grid; grid-template-columns: auto 1fr auto; gap: 26px; align-items: center; padding: 22px 26px; margin-bottom: 16px; overflow: hidden;
  background: radial-gradient(ellipse 50% 120% at 12% 50%, rgba(255,197,61,.16), transparent 70%), linear-gradient(180deg, rgba(14,19,20,.9), rgba(8,11,12,.9));
  border-color: rgba(255,197,61,.25); cursor: pointer; text-align: left; width: 100%;
}
.lb-hero:hover { border-color: rgba(255,197,61,.5); }
.lb-hero img { height: 170px; width: auto; filter: drop-shadow(0 0 30px rgba(255,197,61,.45)) drop-shadow(0 18px 30px rgba(0,0,0,.7)); animation: heroFloat 5s ease-in-out infinite; }
@keyframes heroFloat { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(1deg); } }
.lbh-txt .eyebrow { color: var(--gold); }
.lbh-txt b { display: block; font-size: 26px; font-weight: 900; font-stretch: 120%; }
.lbh-txt span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.lbh-num { text-align: right; }
.lbh-num b { display: block; font-family: var(--mono); font-size: 44px; font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.lbh-num small { font-family: var(--mono); font-size: 13px; color: var(--gold); font-weight: 800; }
.lb-panel { overflow: hidden; }
.lb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lb-table th { text-align: left; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 700; padding: 13px 14px 9px; border-bottom: 1px solid var(--line); }
.lb-table th.num, .lb-table td.num { text-align: right; }
.lb-table td { padding: 9px 14px; border-bottom: 1px solid rgba(255,255,255,.035); white-space: nowrap; }
.lb-table tbody tr { cursor: pointer; transition: background .2s; animation: rowIn .4s var(--ease-out) both; }
.lb-table tbody tr:hover { background: rgba(255,255,255,.03); }
.lb-table tr.is-you { background: rgba(43,255,136,.06); box-shadow: inset 2px 0 0 var(--neon); }
.lb-table .rank { font-family: var(--mono); font-weight: 800; color: var(--muted); width: 44px; }
.lb-table tr:nth-child(1) .rank { color: var(--gold); }
.lb-table tr:nth-child(2) .rank { color: #d9e2ec; }
.lb-table tr:nth-child(3) .rank { color: #d99a6c; }
.lb-table .who { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.lb-table .av { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.lb-table .num { font-family: var(--mono); font-weight: 700; }
.lb-table .mult { color: var(--neon); }

/* ---------- VAULT PAGE ---------- */
.vault-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 16px; }
.vp-main { padding: 22px 24px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vp-big { font-family: var(--mono); font-size: 54px; font-weight: 800; letter-spacing: -.05em; line-height: 1; transition: color .8s; }
.vp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vp-stat { padding: 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vp-stat b { font-family: var(--mono); font-size: 24px; font-weight: 800; letter-spacing: -.04em; }
.vp-stat small { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.vp-stat .bar { margin-top: 4px; }
.how { padding-bottom: 18px; }
.how-steps { list-style: none; margin: 0; padding: 4px 16px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: s; }
.how-steps li { position: relative; padding: 14px; border-radius: 12px; background: rgba(255,255,255,.025); border: 1px solid var(--line); counter-increment: s; }
.how-steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--mono); font-size: 10px; color: var(--neon); letter-spacing: .1em; }
.how-steps b { display: block; font-family: var(--mono); font-size: 22px; font-weight: 800; letter-spacing: -.04em; margin: 6px 0 4px; }
.how-steps span { font-size: 12px; color: var(--muted); }

/* ---------- EDGE PAGE ---------- */
.edge-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.edge-grid .panel { padding-bottom: 16px; min-width: 0; }
.ep-pad { padding: 0 18px; }
.ep-levelhead { display: grid; grid-template-columns: 76px 1fr; gap: 18px; align-items: center; padding: 4px 18px 0; }
.ep-levelhead .lv-badge { width: 76px; height: 76px; }
.ep-levelhead .lv-badge span { font-size: 26px; }
.ep-levelhead b { display: block; font-size: 26px; font-weight: 900; font-stretch: 120%; }
.ep-levelhead small { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ep-levelhead .bar { margin-top: 10px; height: 8px; }
.unlocks { list-style: none; margin: 16px 18px 0; padding: 0; display: grid; gap: 1px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.unlocks li { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; background: var(--panel-solid); font-size: 12.5px; }
.unlocks .lvl { font-family: var(--mono); font-weight: 800; font-size: 11px; color: var(--muted); }
.unlocks li.on .lvl { color: var(--neon); }
.unlocks li.on { opacity: .7; }
.unlocks li.next { background: linear-gradient(90deg, rgba(43,255,136,.12), rgba(43,255,136,.02)); box-shadow: inset 2px 0 0 var(--neon); }
.unlocks li.lock { opacity: .5; }
.unlocks .st { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: var(--muted); }
.unlocks li.on .st { color: var(--neon); }
.streak-big { display: flex; align-items: baseline; gap: 10px; padding: 4px 18px 0; }
.streak-big b { font-family: var(--mono); font-size: 56px; font-weight: 800; letter-spacing: -.05em; line-height: 1; color: #ffb648; text-shadow: 0 0 30px rgba(255,182,72,.35); }
.streak-big.off b { color: var(--dim); text-shadow: none; }
.streak-big span { font-size: 14px; color: var(--muted); font-weight: 650; }
.week-dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 14px 18px 0; }
.week-dots div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.week-dots i { width: 100%; aspect-ratio: 1; max-width: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.035); border: 1px solid var(--line); color: transparent; }
.week-dots i.on { background: linear-gradient(160deg, #ffb648, #ff7a1a); border-color: transparent; color: #2a1300; box-shadow: 0 0 16px -2px rgba(255,150,40,.6); }
.week-dots i.today { border: 1px dashed rgba(255,182,72,.7); }
.streak-msg { margin: 14px 18px 0; font-size: 12.5px; color: var(--muted); }
.streak-msg b { color: var(--text); }
.missions { list-style: none; margin: 0; padding: 0 18px; display: grid; gap: 10px; }
.missions li { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.025); border: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
.missions li.done { border-color: rgba(43,255,136,.3); background: rgba(43,255,136,.05); }
.missions .m-label { font-weight: 750; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.missions .m-label svg { color: var(--neon); }
.missions .m-xp { font-family: var(--mono); font-size: 12px; font-weight: 800; color: var(--neon); }
.missions .bar { grid-column: 1 / -1; height: 5px; }
.missions .m-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.holder-head { display: flex; align-items: center; gap: 14px; padding: 4px 18px 0; }
.holder-head b { display: block; font-size: 20px; font-weight: 900; font-stretch: 115%; }
.holder-head small { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.holder-prog { padding: 14px 18px 0; }
.holder-prog .top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.tiers { list-style: none; margin: 14px 18px 0; padding: 0; display: grid; gap: 1px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.tiers li { display: grid; grid-template-columns: 34px 74px 1fr; gap: 8px; align-items: center; padding: 9px 12px; background: var(--panel-solid); font-size: 12px; }
.tiers .lv { font-family: var(--mono); font-weight: 800; font-size: 11px; }
.tiers .req { font-family: var(--mono); color: var(--muted); font-size: 10.5px; }
.tiers .pk2 { display: flex; gap: 4px; flex-wrap: wrap; }
.tiers li.done { opacity: .55; }
.tiers li.current { background: linear-gradient(90deg, rgba(43,255,136,.14), rgba(43,255,136,.02)); box-shadow: inset 2px 0 0 var(--neon); }
.tiers li.current .lv { color: var(--neon); }
.tiers li.locked { opacity: .45; }

/* ---------- BUTTONS (shared) ---------- */
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.03); font-weight: 750; font-size: 13px; letter-spacing: .02em;
  transition: border-color .2s, background .2s, transform .15s, color .2s;
}
.btn-ghost:hover { border-color: rgba(43,255,136,.45); color: var(--neon); }
.btn-ghost:active { transform: scale(.97); }
.btn-ghost.sm { height: 34px; font-size: 12px; padding: 0 12px; }

/* ---------- MOBILE BARS ---------- */
.mbar, .tabbar { display: none; }

/* ---------- PREVIEW PICKER ---------- */
.preview {
  position: fixed; right: 14px; bottom: calc(46px + var(--seal-lift, 0px)); z-index: 60;
  display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 9px; border-radius: 8px;
  background: rgba(8,10,11,.85); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: .45; transition: opacity .2s;
}
.preview:hover, .preview:focus-within { opacity: 1; }
.preview > span { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-right: 3px; }
.preview button { width: 22px; height: 22px; border-radius: 5px; font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); transition: background .15s, color .15s; }
.preview button:hover { color: var(--bg); background: var(--rc); border-color: transparent; }

/* =========================================================
   REVEAL OVERLAY
   ========================================================= */
.reveal { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; overflow: hidden; }
.rv-dim {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 45%, rgba(10,22,16,.88), rgba(1,2,2,.97));
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  animation: fadeIn .35s ease-out; transition: background .8s;
}
.reveal.r-epic.is-building .rv-dim, .reveal.r-epic.is-revealed .rv-dim { background: radial-gradient(ellipse 60% 60% at 50% 45%, rgba(40,28,4,.88), rgba(1,1,0,.985)); }
.reveal.r-rare.is-building .rv-dim, .reveal.r-rare.is-revealed .rv-dim { background: radial-gradient(ellipse 60% 60% at 50% 45%, rgba(26,14,52,.88), rgba(1,1,3,.975)); }
.reveal.r-uncommon.is-revealed .rv-dim { background: radial-gradient(ellipse 60% 60% at 50% 45%, rgba(4,34,32,.88), rgba(1,2,2,.97)); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.rv-rays {
  position: absolute; left: 50%; top: 46%; width: 200vmax; height: 200vmax; margin: -100vmax 0 0 -100vmax;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 22%, transparent) 0deg 5deg, transparent 5deg 18deg);
  -webkit-mask-image: radial-gradient(circle, #000 0, rgba(0,0,0,.6) 12%, transparent 34%); mask-image: radial-gradient(circle, #000 0, rgba(0,0,0,.6) 12%, transparent 34%);
  opacity: 0; transform: scale(.6); transition: opacity .8s, transform 1.2s var(--ease-out); pointer-events: none;
}
.reveal.is-building.r-epic .rv-rays, .reveal.is-revealed.r-rare .rv-rays, .reveal.is-revealed.r-epic .rv-rays { opacity: 1; transform: scale(1); }
.reveal.is-building.r-rare .rv-rays { opacity: .55; transform: scale(.85); }
.reveal.r-epic .rv-rays { animation: spin 16s linear infinite; }
.reveal.r-epic.is-building .rv-rays { animation-duration: 2.6s; }
.reveal.r-rare .rv-rays { animation: spin 24s linear infinite; }

.rv-word {
  position: absolute; left: 0; right: 0; top: 44%; transform: translateY(-50%) scale(1.3);
  text-align: center; pointer-events: none;
  font-family: var(--sans); font-weight: 900; font-stretch: 125%;
  font-size: clamp(90px, 22vw, 340px); letter-spacing: .06em; line-height: 1;
  color: transparent; -webkit-text-stroke: 2px color-mix(in srgb, var(--rc) 55%, transparent);
  opacity: 0; transition: opacity .8s, transform 1.4s var(--ease-out), letter-spacing 1.4s var(--ease-out);
  white-space: nowrap; text-transform: uppercase;
}
.reveal.r-epic .rv-word { -webkit-text-stroke: 2px rgba(255,197,61,.75); text-shadow: 0 0 60px rgba(255,197,61,.35); }
.reveal.is-revealed.r-epic .rv-word { opacity: .85; transform: translateY(-50%) scale(1); letter-spacing: -.01em; }
.reveal.is-revealed.r-rare .rv-word { opacity: .45; transform: translateY(-50%) scale(1); letter-spacing: 0; }
.reveal.is-result .rv-word { opacity: .12 !important; transition: opacity .6s; }

.rv-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }
.rv-flash { position: absolute; inset: 0; z-index: 6; pointer-events: none; background: #fff; opacity: 0; }
.rv-flash.go { animation: flash .65s ease-out; }
.reveal.r-rare .rv-flash { background: #d6caff; }
@keyframes flash { 0% { opacity: 0; } 15% { opacity: .95; } 100% { opacity: 0; } }

.rv-top { position: relative; z-index: 7; display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.rv-close { font-size: 11px; color: var(--muted); padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 7px; letter-spacing: .08em; text-transform: uppercase; transition: color .2s, border-color .2s; }
.rv-close:hover { color: var(--text); border-color: rgba(255,255,255,.25); }

.rv-stage { position: relative; z-index: 5; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 0; padding: 0 24px 24px; transition: gap .8s var(--ease-out); }
.reveal.is-result .rv-stage { gap: 64px; }
.rv-cardcol { --h: min(62vh, 560px); display: flex; flex-direction: column; align-items: center; gap: 18px; }
.reveal.is-pack .rv-hint { margin-top: calc(var(--h) * .07); }

.rv-unit { position: relative; height: var(--h); aspect-ratio: .625; transition: height .6s var(--ease-out); flex: none; }
.rv-card { position: absolute; inset: 0; z-index: 2; perspective: 1400px; cursor: pointer; outline: none; }
.rv-card.in-pack { transform: translateY(7%) scale(.78); }
.rv-card.rising { transform: translateY(-34%) scale(.84); transition: transform .75s cubic-bezier(.2,.85,.25,1); }
.rv-card.settle { transform: none; transition: transform .7s var(--ease-spring); }
.reveal.is-pack .rv-card { cursor: default; pointer-events: none; }

/* ---- tear-open pack ---- */
.rv-pack {
  --tear-y: 14; position: absolute; left: 50%; top: -6%; height: 112%; aspect-ratio: var(--pack-ar, .6); z-index: 3;
  transform: translateX(-50%); touch-action: none; cursor: grab; outline: none; user-select: none; -webkit-user-select: none;
}
.rv-pack:active { cursor: grabbing; }
.rv-pack.enter { animation: packIn .6s var(--ease-spring) both; }
@keyframes packIn { from { transform: translateX(-50%) translateY(80px) scale(.7) rotate(-4deg); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
.rv-pack:focus-visible { outline: 1px dashed rgba(43,255,136,.55); outline-offset: 10px; border-radius: 14px; }
.tp-part { position: absolute; inset: 0; }
.tp-part img { width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.tp-body img { filter: drop-shadow(0 30px 50px rgba(0,0,0,.8)) drop-shadow(0 0 28px rgba(43,255,136,.3)); }
.tp-body { z-index: 1; }
.tp-top { z-index: 3; transform-origin: var(--peel-x, 100%) calc(var(--tear-y) * 1%); transform: rotate(var(--peel, 0deg)) translateY(var(--lift, 0px)); transition: transform .25s var(--ease-out); }
.rv-pack.is-dragging .tp-top { transition: none; }
.tp-top.torn { transition: transform .75s cubic-bezier(.3,.6,.3,1), opacity .75s ease-in; transform: translate(var(--fly-x, 40%), -150%) rotate(var(--fly-r, 32deg)); opacity: 0; }
.tp-body.drop { transition: transform .6s cubic-bezier(.5,0,.75,0), opacity .5s .1s; transform: translateY(70%) rotate(3deg); opacity: 0; }
.tp-light {
  position: absolute; z-index: 2; left: 7%; right: 7%; top: calc(var(--tear-y) * 1%); height: 3px; margin-top: -1px; border-radius: 3px;
  background: #f2fff8; box-shadow: 0 0 14px 4px rgba(43,255,136,.9), 0 0 50px 10px rgba(43,255,136,.45); opacity: var(--glow, 0); pointer-events: none;
}
.tp-light::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: 0; height: 0; border-radius: 50% 50% 0 0 / 30% 30% 0 0;
  background: linear-gradient(0deg, rgba(200,255,225,.75), rgba(43,255,136,.25) 40%, transparent); filter: blur(6px); opacity: 0;
}
.rv-pack.torn .tp-light { opacity: 1; transition: opacity .2s; }
.rv-pack.torn .tp-light::after { animation: beam 1.1s ease-out forwards; }
@keyframes beam { 0% { height: 0; opacity: 0; } 25% { height: 260%; opacity: 1; } 100% { height: 340%; opacity: 0; } }
.tp-seam { position: absolute; z-index: 4; left: 5%; right: 5%; top: calc(var(--tear-y) * 1%); height: 0; border-top: 2px dashed rgba(234,255,242,.75); filter: drop-shadow(0 0 6px rgba(43,255,136,.9)); animation: seam 1.6s ease-in-out infinite; pointer-events: none; transition: opacity .25s; }
.tp-arrow { position: absolute; top: -8px; left: 0; width: 14px; height: 14px; border-top: 3px solid #eafff2; border-right: 3px solid #eafff2; transform: rotate(45deg); filter: drop-shadow(0 0 6px #2bff88); animation: seamArrow 1.6s cubic-bezier(.5,0,.3,1) infinite; }
@keyframes seam { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes seamArrow { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 14px); opacity: 0; } }
.rv-pack.is-dragging .tp-seam, .rv-pack.torn .tp-seam, .reveal.is-loading .tp-seam { opacity: 0; }
.reveal.is-loading .rv-pack { cursor: progress; }
.reveal.is-loading .tp-body img { animation: sealPulse 1s ease-in-out infinite; }
@keyframes sealPulse { 50% { filter: drop-shadow(0 30px 50px rgba(0,0,0,.8)) drop-shadow(0 0 44px rgba(43,255,136,.6)); } }
.rv-card.enter { animation: cardIn .85s var(--ease-spring) both; }
@keyframes cardIn { 0% { transform: translateY(90px) scale(.55) rotateX(35deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.rv-card:focus-visible { outline: 2px solid var(--neon); outline-offset: 10px; border-radius: 16px; }
.reveal:not(.is-hidden) .rv-card:focus-visible { outline: none; }
.reveal.is-revealed .rv-card { cursor: default; }
.flip { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateY(0deg) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.reveal.is-hidden .flip { animation: idleFloat 3.2s ease-in-out infinite; }
@keyframes idleFloat { 0%, 100% { transform: translateY(0) rotateZ(-.6deg) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); } 50% { transform: translateY(-10px) rotateZ(.6deg) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); } }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 5% / 3.2%; }
.face img { width: 100%; height: 100%; object-fit: contain; }
.face.back img { filter: drop-shadow(0 30px 60px rgba(0,0,0,.8)) drop-shadow(0 0 30px rgba(43,255,136,.25)); }
.face.front { transform: rotateY(180deg); }
.face.front img { filter: drop-shadow(0 30px 60px rgba(0,0,0,.85)) drop-shadow(0 0 36px color-mix(in srgb, var(--rc) 55%, transparent)); }
.back-glow { position: absolute; inset: 0; border-radius: inherit; transition: box-shadow .6s; pointer-events: none; }
.back-scan { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; overflow: hidden; }
.back-scan::after { content: ""; position: absolute; left: 0; right: 0; height: 30%; top: -30%; background: linear-gradient(180deg, transparent, rgba(43,255,136,.18), transparent); animation: backScan 2.4s ease-in-out infinite; }
@keyframes backScan { to { transform: translateY(440%); } }

/* holo/glare confined to the card window inside the slab */
.holo, .glare, .sweep { position: absolute; left: 9%; right: 9%; top: 19.5%; bottom: 5.5%; border-radius: 3%; pointer-events: none; opacity: 0; }
.holo {
  mix-blend-mode: color-dodge;
  background: repeating-linear-gradient(115deg, #ff2d8a 0%, #ffd23d 7%, #2bff88 14%, #25d8ff 21%, #a86bff 28%, #ff2d8a 35%);
  background-size: 300% 300%; background-position: var(--hx, 50%) var(--hy, 50%);
  filter: saturate(1.2) brightness(.75); transition: opacity .6s;
}
.glare { mix-blend-mode: overlay; background: radial-gradient(circle at var(--gx, 30%) var(--gy, 20%), rgba(255,255,255,.85), rgba(255,255,255,.15) 25%, transparent 55%); transition: opacity .6s; }
.sweep { mix-blend-mode: screen; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.7) 48%, color-mix(in srgb, var(--rc) 80%, white) 50%, transparent 62%); background-size: 250% 100%; background-position: 150% 0; }
.reveal.r-uncommon.is-revealed .holo { opacity: .2; }
.reveal.r-rare.is-revealed .holo { opacity: .42; }
.reveal.r-epic.is-revealed .holo { opacity: .6; animation: holoShift 5s linear infinite; }
.reveal.is-revealed .glare { opacity: .65; }
.reveal.r-common.is-revealed .glare { opacity: .3; }
.reveal.sweep-go .sweep { opacity: 1; animation: sweep 1.1s var(--ease-out) forwards; }
@keyframes sweep { from { background-position: 150% 0; } to { background-position: -60% 0; } }
@keyframes holoShift { from { background-position: 0% 0%; } to { background-position: 300% 300%; } }

.rv-rings { position: absolute; inset: 0; pointer-events: none; }
.rv-rings i { position: absolute; left: 50%; top: 50%; width: 120%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(.2); border-radius: 50%; border: 2px solid var(--rc); box-shadow: 0 0 30px var(--rc), inset 0 0 30px var(--rc); opacity: 0; }
.reveal.ring-go .rv-rings i { animation: ring 1s var(--ease-out) forwards; }
.reveal.ring-go .rv-rings i:nth-child(2) { animation-delay: .12s; }
.reveal.ring-go .rv-rings i:nth-child(3) { animation-delay: .24s; }
.reveal.r-uncommon.ring-go .rv-rings i:nth-child(n+2) { display: none; }
@keyframes ring { 0% { opacity: .9; transform: translate(-50%, -50%) scale(.3); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.1); } }

.flip.do-flip { transition: transform .5s cubic-bezier(.3,.1,.2,1); transform: rotateY(180deg); }
.flip.do-flip-slow { transition: transform .75s cubic-bezier(.4,0,.1,1); transform: rotateY(180deg); }
.flip.do-spin { transition: transform 1.05s cubic-bezier(.2,.7,.1,1); transform: rotateY(540deg); }
.flip.is-front { transform: rotateY(180deg) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s var(--ease-out); }
.flip.is-front-spin { transform: rotateY(540deg) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s var(--ease-out); }
.rv-card.anticipate { animation: anticipate .3s ease-in-out both; }
@keyframes anticipate { 0% { transform: scale(1); } 60% { transform: scale(.94); } 100% { transform: scale(1.02); } }
.rv-card.tremble { animation: tremble .08s linear infinite; }
.rv-card.tremble-hard { animation: trembleHard .06s linear infinite; }
@keyframes tremble { 0% { transform: translate(0,0) rotate(0); } 33% { transform: translate(-2px,1px) rotate(-.6deg); } 66% { transform: translate(2px,-1px) rotate(.6deg); } 100% { transform: translate(0,0); } }
@keyframes trembleHard { 0% { transform: translate(0,0) scale(1.04); } 25% { transform: translate(-5px,2px) scale(1.05) rotate(-1.4deg); } 50% { transform: translate(4px,-3px) scale(1.06) rotate(1.2deg); } 75% { transform: translate(-3px,-2px) scale(1.05) rotate(.6deg); } 100% { transform: translate(3px,3px) scale(1.04) rotate(-.8deg); } }
.reveal.r-rare.is-building .back-glow { box-shadow: 0 0 60px 6px rgba(154,123,255,.6), inset 0 0 40px rgba(154,123,255,.4); }
.reveal.r-epic.is-building .back-glow { box-shadow: 0 0 90px 14px rgba(255,197,61,.65), inset 0 0 60px rgba(255,197,61,.5); }
.reveal.r-rare.is-building .face.back img { animation: glitch .5s steps(2) infinite; }
@keyframes glitch { 0% { filter: drop-shadow(0 0 30px rgba(154,123,255,.6)); } 50% { filter: drop-shadow(-4px 0 0 rgba(37,232,255,.7)) drop-shadow(4px 0 0 rgba(255,45,138,.6)) hue-rotate(40deg); } 100% { filter: drop-shadow(0 0 30px rgba(154,123,255,.6)); } }
.reveal.shake .rv-stage { animation: screenShake .5s cubic-bezier(.36,.07,.19,.97); }
@keyframes screenShake { 10%, 90% { transform: translate3d(-2px, 1px, 0); } 20%, 80% { transform: translate3d(5px, -2px, 0); } 30%, 50%, 70% { transform: translate3d(-9px, 3px, 0); } 40%, 60% { transform: translate3d(9px, -3px, 0); } }

.rv-hint { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--neon); animation: hintPulse 1.6s ease-in-out infinite; height: 16px; }
@keyframes hintPulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.reveal:not(.is-hidden):not(.is-pack) .rv-hint { visibility: hidden; }
.reveal.is-tearing .rv-hint { visibility: hidden; }
.reveal.is-loading .rv-hint { color: var(--muted); }

.rv-meta { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin-top: -16px; min-height: 70px; }
.reveal:not(.is-revealed) .rv-meta { visibility: hidden; }

/* staged stats: each line enters on its own */
.reveal .st { opacity: 0; transform: translateY(10px); visibility: hidden; transition: opacity .3s ease, transform .45s var(--ease-out), visibility 0s linear .3s; }
.reveal .st.in { opacity: 1; transform: none; visibility: visible; transition: opacity .3s ease, transform .45s var(--ease-out), visibility 0s; }
.res-total.pending b { color: var(--muted) !important; text-shadow: none !important; }
.res-total.pending b::after { content: ""; display: inline-block; width: 1.4em; text-align: left; animation: dots 1s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.res-total.in { position: relative; }
.res-total.in::before { content: ""; position: absolute; left: -22px; right: -22px; top: 4px; bottom: -2px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--rc) 10%, transparent), transparent); opacity: 0; pointer-events: none; }
.res-total.pending::before { animation: totalScan 1s ease-in-out infinite; }
@keyframes totalScan { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.res-total.final b { animation: finalPop .5s var(--ease-spring); }
@keyframes finalPop { 0% { transform: scale(.9); } 60% { transform: scale(1.08); } 100% { transform: none; } }
.res-value.counting, .res-math b.counting { color: var(--text); }
.rv-skip { position: absolute; z-index: 7; left: 50%; bottom: 16px; transform: translateX(-50%); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); opacity: 0; transition: opacity .3s; pointer-events: none; white-space: nowrap; }
.reveal.is-stats .rv-skip { opacity: .75; }
.reveal.is-stats { cursor: pointer; }
.rchip { font-size: 11px; font-weight: 800; letter-spacing: .22em; padding: 4px 10px; border-radius: 5px; color: #050607; background: var(--rc); box-shadow: 0 0 22px color-mix(in srgb, var(--rc) 60%, transparent); text-transform: uppercase; }
.reveal.r-epic .rchip { background: linear-gradient(100deg, #ffc53d, #fff2b8 40%, #ffc53d 60%, #ff9f1a); background-size: 200% 100%; animation: chipShine 2s linear infinite; }
@keyframes chipShine { to { background-position: -200% 0; } }
.rv-meta b { font-size: 22px; font-weight: 900; font-stretch: 118%; letter-spacing: .01em; }
.rv-sub { font-size: 11.5px; color: var(--muted); }
.xp-pop { position: absolute; right: -64px; top: -6px; font-size: 12px; font-weight: 800; color: var(--neon); opacity: 0; }
.rv-meta.xp-go .xp-pop:not(:empty) { animation: xpPop 1.8s .2s var(--ease-out) both; }
@keyframes xpPop { 0% { opacity: 0; transform: translateY(8px) scale(.8); } 20% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }

/* result panel */
.result { width: 0; opacity: 0; overflow: hidden; pointer-events: none; transform: translateX(30px); transition: width .8s var(--ease-out), opacity .5s .25s, transform .8s var(--ease-out); flex: none; }
.reveal.is-result .result { width: 440px; opacity: 1; transform: none; pointer-events: auto; overflow: visible; }
.res-inner {
  width: 440px; padding: 22px 22px 18px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(10,14,15,.86), rgba(6,8,9,.9));
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.9), 0 0 0 1px color-mix(in srgb, var(--rc) 14%, transparent) inset;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.res-head { display: flex; flex-direction: column; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.res-value { font-size: 48px; font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.res-math { display: grid; padding: 6px 0 4px; }
.res-math > div { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; font-size: 14px; color: var(--muted); border-bottom: 1px dashed rgba(255,255,255,.07); }
.res-math b { color: var(--text); font-weight: 700; font-size: 16px; }
.res-math .neg b { color: var(--red-soft); }
.res-math .res-total { border-bottom: 0; padding-top: 14px; color: var(--text); font-size: 15px; font-weight: 700; }
.res-math .res-total b { font-size: 34px; letter-spacing: -.04em; }
.res-math .res-total b.win { color: var(--neon); text-shadow: 0 0 28px rgba(43,255,136,.45); }
.res-math .res-net { border-bottom: 0; padding-top: 0; font-size: 12px; }
.res-math .res-net b { font-size: 14px; }
.res-net b.pos { color: var(--neon); }
.res-net b.neg { color: var(--red); }
.res-actions { display: grid; gap: 10px; margin-top: 14px; }
.btn-sell, .btn-keep {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 64px; padding: 0 22px; border-radius: 12px; text-align: left;
  font-weight: 900; font-stretch: 112%; font-size: 15px; letter-spacing: .04em; text-transform: uppercase;
  transition: transform .2s var(--ease-out), box-shadow .2s, background .2s, border-color .2s, opacity .3s;
}
.btn-sell { background: var(--neon); color: var(--neon-ink); box-shadow: 0 12px 40px -10px rgba(43,255,136,.7), inset 0 1px 0 rgba(255,255,255,.5); }
.btn-sell b { font-size: 17px; letter-spacing: -.02em; }
.btn-sell:hover { transform: translateY(-1px); box-shadow: 0 16px 50px -8px rgba(43,255,136,.9), inset 0 1px 0 rgba(255,255,255,.6); }
.btn-sell:active, .btn-keep:active { transform: scale(.985); }
.btn-sell.sm { min-height: 44px; font-size: 13px; padding: 0 18px; justify-content: center; }
.btn-keep { flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); }
.btn-keep small { font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0; text-transform: none; font-stretch: 100%; }
.btn-keep:hover { border-color: color-mix(in srgb, var(--rc) 70%, transparent); background: color-mix(in srgb, var(--rc) 8%, transparent); }
.btn-sell.is-busy, .btn-keep.is-busy { opacity: .7; pointer-events: none; }
.res-actions.is-done { display: none; }
.res-timer { display: flex; justify-content: space-between; margin-top: 14px; font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.res-timer b { color: var(--text); }
.bar-timer { height: 3px; margin-top: 6px; }
.res-done { margin-top: 14px; padding: 14px; border-radius: 12px; font-size: 13px; color: var(--neon); background: rgba(43,255,136,.07); border: 1px solid rgba(43,255,136,.25); animation: drop .4s var(--ease-out); display: flex; gap: 10px; align-items: center; }
.res-done.kept { color: var(--c-rare); background: rgba(154,123,255,.07); border-color: rgba(154,123,255,.3); }
.res-next { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.btn-again {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 50px; border-radius: 11px;
  border: 1px solid rgba(43,255,136,.45); color: var(--neon); background: rgba(43,255,136,.06);
  font-weight: 900; font-stretch: 112%; font-size: 14px; letter-spacing: .06em; text-transform: uppercase;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.btn-again:hover { background: rgba(43,255,136,.12); box-shadow: 0 0 24px -6px rgba(43,255,136,.6); }
.btn-again:active { transform: scale(.98); }
.btn-again svg { transition: transform .5s var(--ease-out); }
.btn-again:hover svg { transform: rotate(-200deg); }
.btn-again b { font-size: 13px; color: var(--text); }
.btn-again:disabled { opacity: .45; }
.res-later { margin: 10px 0 0; font-size: 10.5px; color: var(--dim); }

/* =========================================================
   MODALS
   ========================================================= */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; }
.modal-dim { position: absolute; inset: 0; background: rgba(1,2,2,.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fadeIn .25s; }
.modal-box {
  position: relative; max-width: 100%; max-height: calc(100vh - 40px); overflow: auto;
  background: linear-gradient(180deg, #0e1314, #080b0c); border: 1px solid var(--line-2); border-radius: 18px;
  box-shadow: 0 40px 120px -20px rgba(0,0,0,.9); animation: modalIn .45s var(--ease-out);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(.97); } }
.modal-x { position: absolute; top: 12px; right: 12px; z-index: 3; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line-2); background: rgba(0,0,0,.4); transition: color .2s; }
.modal-x:hover { color: var(--text); }
.viewer-box { width: 860px; display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.vw-card { position: relative; display: grid; place-items: center; padding: 36px 28px; perspective: 1200px; background: radial-gradient(ellipse 60% 60% at 50% 50%, color-mix(in srgb, var(--rc) 22%, transparent), transparent 70%); border-right: 1px solid var(--line); }
.vw-tilt { position: relative; height: min(56vh, 460px); aspect-ratio: .625; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .3s var(--ease-out); transform-style: preserve-3d; }
.vw-tilt img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 24px 40px rgba(0,0,0,.8)) drop-shadow(0 0 30px color-mix(in srgb, var(--rc) 45%, transparent)); }
.viewer-box .glare { opacity: .6; }
.viewer-box.r-uncommon .holo { opacity: .2; } .viewer-box.r-rare .holo { opacity: .4; } .viewer-box.r-epic .holo { opacity: .58; animation: holoShift 5s linear infinite; }
.vw-info { padding: 34px 28px 26px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.vw-info .rchip { align-self: flex-start; }
.vw-info h3 { font-size: 26px; font-weight: 900; font-stretch: 118%; line-height: 1.05; }
.vw-sub { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: -6px; }
.vw-value { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.vw-value b { font-family: var(--mono); font-size: 40px; font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.vw-rows { display: grid; gap: 0; font-family: var(--mono); font-size: 13px; }
.vw-rows div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed rgba(255,255,255,.06); color: var(--muted); }
.vw-rows b { color: var(--text); font-weight: 700; }
.vw-actions { display: grid; gap: 8px; margin-top: auto; }
.vw-actions .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vw-actions .btn-sell, .vw-actions .btn-keep { min-height: 52px; font-size: 13px; padding: 0 16px; }
.share-box { width: 520px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.share-box h3 { font-size: 18px; font-weight: 900; font-stretch: 115%; }
.share-preview { position: relative; border-radius: 12px; overflow: hidden; background: #050707; aspect-ratio: 4 / 5; border: 1px solid var(--line); }
.share-preview img { width: 100%; height: 100%; object-fit: contain; }
.share-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.share-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }

/* toasts */
.toasts { position: fixed; z-index: 200; left: 50%; top: calc(var(--top-h) + 14px); transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; width: min(420px, calc(100vw - 24px)); }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; pointer-events: auto;
  background: rgba(10,14,15,.95); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -10px rgba(0,0,0,.8);
  font-size: 13px; font-weight: 650; animation: toastIn .45s var(--ease-spring);
}
.toast.out { animation: toastOut .3s ease-in forwards; }
.toast .t-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--neon-soft); color: var(--neon); }
.toast.lvl { border-color: rgba(43,255,136,.45); box-shadow: 0 0 40px -10px rgba(43,255,136,.6), 0 20px 50px -10px rgba(0,0,0,.8); }
.toast.warn .t-ico { background: rgba(255,92,120,.12); color: var(--red); }
.toast small { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 500; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px); } }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1280px) {
  .terminal { grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "main side" "main feed"; }
  .col-feed { position: relative; top: 0; max-height: 640px; }
  .chip-addr .mono { display: none; }
  .how-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
  .nav a { padding: 8px 9px; }
  .chip-net { display: none; }
}
@media (max-width: 900px) {
  .terminal { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side" "feed"; }
  .col-side { grid-template-columns: 1fr 1fr; }
  .readout { display: none; }
  .vault-grid, .edge-grid { grid-template-columns: 1fr; }
  .pnl { grid-template-columns: 1fr 1fr; }
  .pnl-cell.main { grid-column: 1 / -1; }
  .viewer-box { grid-template-columns: 1fr; width: 480px; }
  .vw-card { border-right: 0; border-bottom: 1px solid var(--line); padding: 26px; }
  .vw-tilt { height: min(42vh, 360px); }
}
@media (max-width: 760px) {
  .col-side { grid-template-columns: 1fr; }
  .nav { display: none; }
  .lb-table .c-mach, .lb-table td.c-mach, .lb-table .c-mult, .lb-table td.c-mult { display: none; }
  .lb-hero { grid-template-columns: auto 1fr; }
  .lbh-num { grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 760px) {
  :root { --top-h: 54px; --seal-lift: 146px; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  body.on-open { padding-bottom: calc(146px + env(safe-area-inset-bottom)); }
  body:not(.on-open) { --seal-lift: 68px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .brand-full { display: none; }
  .brand-icon { display: block; }
  .top-right { gap: 6px; }
  .chip { height: 30px; padding: 0 9px; }
  .chip-addr { display: none; }
  .icon-btn { width: 32px; height: 30px; }
  .tape { height: 26px; }
  .tape-item { font-size: 10px; padding: 0 14px; }
  .terminal { padding: 10px 10px 20px; gap: 10px; }
  .page { padding: 18px 12px 30px; }
  .page-head h1 { font-size: 26px; }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(4,5,6,.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: .02em; transition: color .2s; }
  .tabbar a.is-active { color: var(--neon); }
  .tabbar a.is-active::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 2px; background: var(--neon); box-shadow: 0 0 10px var(--neon); border-radius: 0 0 2px 2px; }
  .tabbar a:active svg { transform: scale(.9); }
  .tab-badge { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 15px; height: 15px; font-size: 9px; }

  .mbar {
    position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 50;
    display: none; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px;
    background: linear-gradient(180deg, rgba(6,9,9,.9), rgba(4,5,6,.97));
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid rgba(43,255,136,.22);
  }
  body.on-open .mbar { display: flex; }
  .mbar-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .mbar .maxloss { font-size: 12px; }
  .mbar .outcomes-link { font-size: 12px; align-self: flex-start; }
  .mbar .open-btn { height: 56px; padding: 0 16px 0 20px; font-size: 15px; gap: 10px; flex: 1; max-width: 230px; }
  /* demo-only chrome rides on the decorative ticker, away from controls */
  .preview { right: 8px; top: calc(var(--top-h) + 2px); bottom: auto; padding: 2px 2px 2px 7px; }
  .preview button { width: 20px; height: 20px; }
  #demo-seal { top: calc(var(--top-h) + 4px) !important; bottom: auto !important; left: 8px; right: auto !important; }
  .lb-table .h-card img { display: none !important; }
  .lb-table td { white-space: normal; }
  .lb-table td.num, .lb-table .rank { white-space: nowrap; }
  .lb-panel { overflow-x: auto; }
  .toasts { top: calc(var(--top-h) + 8px); }
}

@media (max-width: 480px) {
  .chip-level span { display: none; }
  .chip-level { padding: 0 6px; }
  .chip-bal .lbl { display: none; }
  .machine { padding: 12px 10px; }
  .machine-top { margin-bottom: 10px; }
  .mt-name { font-size: 17px; }
  .mt-set { display: none; }
  .mt-right { font-size: 10px; }
  .pack-select { gap: 6px; margin-bottom: 10px; }
  .pk { flex-direction: column; gap: 3px; padding: 7px 4px 6px; text-align: center; }
  .pk img { width: 24px; height: 34px; }
  .pk-txt { align-items: center; }
  .pk-txt b { font-size: 15px; }
  .pk-txt small { font-size: 8.5px; letter-spacing: .1em; }
  .pk-hot { right: 50%; transform: translateX(50%); top: -7px; font-size: 8px; }
  .stage { height: 290px; }
  .pack { width: 140px; height: 228px; margin: -122px 0 0 -70px; }
  .stage-ring { width: 236px; height: 236px; margin: -118px 0 0 -118px; }
  .stage-ring.r2 { width: 296px; height: 296px; margin: -148px 0 0 -148px; }
  .odds-rail { left: 12px; top: 14px; transform: none; width: 92px; gap: 6px; }
  .rail-title { display: none; }
  .odd { font-size: 10px; row-gap: 3px; }
  .odd b { font-size: 10px; }
  .price-tag { bottom: 10px; }
  .col-main .machine { display: flex; flex-direction: column; }
  .figures { margin-top: 10px; }
  .fig { padding: 10px 8px 11px; gap: 3px; }
  .fig-lbl { font-size: 9px; letter-spacing: .06em; }
  .fig-num { font-size: 21px; gap: 4px; }
  .x-tag { font-size: 10px; padding: 2px 4px; }
  .fig-sub { font-size: 9.5px; white-space: normal; }
  .controls { order: 5; margin: 10px 0 0; flex-wrap: wrap; gap: 8px; }
  .ctrl-group { width: 100%; flex-wrap: nowrap; }
  .ctrl-group .seg { flex: none; }
  .ctrl-group .seg-pay { flex: 1; justify-content: space-between; }
  .ctrl-meta { font-size: 10px; width: 100%; text-align: left; }
  .seg-lbl { display: none; }
  .seg-btn { padding: 0 10px; }
  .pay-btn { padding: 0 7px; font-size: 12px; }
  .pay-btn .soon { font-size: 7.5px; padding: 1px 3px; }
  .mbar .settle-line { font-size: 9.5px; }
  .confirm { order: 6; margin-top: 10px; border: 0; background: none; }
  .confirm-row { display: none; }
  .outcomes { padding: 0; border: 0; }
  .outcomes table { font-size: 11.5px; }
  .outcomes th { font-size: 8.5px; letter-spacing: .06em; }
  .outcomes td:first-child small { font-size: 9.5px; }
  .outcomes-note { font-size: 9.5px; }
  .v-big { font-size: 26px; }
  .pnl-cell { padding: 12px; }
  .pnl-cell b { font-size: 19px; }
  .pnl-cell.main b { font-size: 28px; }
  .slab-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .st-art { padding: 12px 8px 4px; }
  .st-art img { height: 150px; }
  .st-body { padding: 8px 10px 10px; gap: 6px; }
  .st-name { font-size: 12.5px; }
  .st-val { font-size: 13px; }
  .st-actions { grid-template-columns: 1fr; }
  .st-actions button { height: 38px; }
  .tabs { width: 100%; }
  .tabs [role="tab"] { flex: 1; justify-content: center; padding: 0 8px; font-size: 12px; }
  .lb-hero { padding: 16px; gap: 14px; }
  .lb-hero img { height: 120px; }
  .lbh-txt b { font-size: 19px; }
  .lbh-num b { font-size: 34px; }
  .lb-table td, .lb-table th { padding-left: 10px; padding-right: 10px; }
  .vp-big { font-size: 36px; }
  .vp-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .vp-stat b { font-size: 18px; }
  .how-steps { grid-template-columns: 1fr 1fr; padding: 4px 12px 0; gap: 8px; }
  .how-steps b { font-size: 18px; }
  .streak-big b { font-size: 44px; }

  /* reveal on phones */
  .rv-top { padding: 12px 14px; font-size: 10px; }
  .rv-stage { flex-direction: column; justify-content: flex-start; padding: 4px 16px 24px; overflow-y: auto; overscroll-behavior: contain; }
  .reveal.is-hidden .rv-stage, .reveal.is-building .rv-stage { justify-content: center; }
  .reveal.is-result .rv-stage { gap: 16px; }
  .rv-cardcol { --h: min(52vh, 440px); padding-top: calc(var(--h) * .07) !important; }
  .reveal.is-result .rv-cardcol { --h: 30vh; padding-top: 4px !important; }
  .reveal.is-pack .rv-stage, .reveal.is-tearing .rv-stage { justify-content: center; }
  body.is-locked .toasts { top: 48px; left: 50%; right: auto; transform: translateX(-50%); }
  .controls .ctrl-meta { max-width: none; }
  .res-inner { padding: 16px 16px 14px; }
  .rv-skip { bottom: calc(10px + env(safe-area-inset-bottom)); }
  .rv-meta b { font-size: 18px; }
  .rv-cardcol { gap: 12px; padding-top: 6px; }
  .xp-pop { right: auto; left: calc(100% + 8px); }
  .result { width: 100%; transform: translateY(20px); }
  .reveal.is-result .result { width: 100%; }
  .res-inner { width: 100%; }
  .res-value { font-size: 36px; }
  .res-math > div { padding: 7px 0; font-size: 13px; }
  .res-math .res-total b { font-size: 28px; }
  .btn-sell, .btn-keep { min-height: 56px; padding: 0 16px; font-size: 13.5px; }
  .modal { padding: 0; align-items: end; }
  .modal-box { width: 100% !important; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .vw-info { padding: 20px 18px 24px; }
  .vw-value b { font-size: 32px; }
  .share-box { padding: 18px; }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .15s !important; }
  .tape-track { animation: none !important; }
  .sk, .sk-block, .sk-row, .sk-pk, .sk-cell, .sk-tile, .sk-tr td { animation: none !important; }
  .rv-word { transition: opacity .2s !important; }
  .flip.do-flip, .flip.do-flip-slow, .flip.do-spin { transition: none !important; }
}

.reveal:focus, .modal-box:focus { outline: none; }
/* toasts sit low while an overlay owns the top of the screen */
body.is-locked .toasts { top: 58px; left: auto; right: 20px; transform: none; width: min(380px, calc(100vw - 24px)); }
.controls .ctrl-group { flex: none; flex-wrap: nowrap; }
.controls .ctrl-meta { flex: 1 1 auto; min-width: 0; max-width: 170px; line-height: 1.5; }
/* result tail (actions, timer, next) expands only when the stats are done */
.res-tail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease-out); }
.res-tail.in { grid-template-rows: 1fr; }
.res-tail > div { min-height: 0; overflow: hidden; }
.reveal.r-epic .rv-rays { background: repeating-conic-gradient(from 0deg, rgba(255,197,61,.24) 0deg 5deg, transparent 5deg 18deg); }
