/* BLANK PACK · house look: lemon + ink on a cool mist floor, Outfit everywhere.
   Layout: desktop = sidebar + top bar + stage; phone = top bar + pack chips + stage + bottom tabs. */
@font-face { font-family: Outfit; src: url(../fonts/Outfit-Regular.ttf) format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Outfit; src: url(../fonts/Outfit-Medium.ttf) format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: Outfit; src: url(../fonts/Outfit-Bold.ttf) format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: Outfit; src: url(../fonts/Outfit-ExtraBold.ttf) format('truetype'); font-weight: 800 900; font-display: swap; }

:root {
  --lemon: #FFFF00; --lemon-soft: #FFFDB8; --ink: #0B0B0C; --white: #FFFFFF;
  --bg: #EDF0F1; --panel: #FFFFFF; --panel-2: #F5F7F7; --line: #DDE3E4; --fg: #0B0B0C; --muted: #697174; --pat: #0B0B0C;
  --t-C: #A3ADB1; --t-R: #2F7BFF; --t-E: #8B3DFF; --t-L: #F2B200; --t-B: #FFFF00;
  --good: #17A34A; --bad: #E5372B;
  --r-lg: 22px; --r-md: 14px; --r-sm: 10px;
  --shadow: 0 1px 0 rgba(11,11,12,.04), 0 10px 30px -18px rgba(11,11,12,.35);
  --font: Outfit, "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --side: 240px; --top: 64px; --tabs: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #0D0E0F; --panel: #17191B; --panel-2: #1E2123; --line: #2A2E31; --fg: #F2F4F4; --muted: #9AA2A5; --pat: #FFFF00; --shadow: 0 10px 30px -18px rgba(0,0,0,.8); color-scheme: dark; } }
:root[data-theme="dark"] { --bg: #0D0E0F; --panel: #17191B; --panel-2: #1E2123; --line: #2A2E31; --fg: #F2F4F4; --muted: #9AA2A5; --pat: #FFFF00; --shadow: 0 10px 30px -18px rgba(0,0,0,.8); color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
html { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow-x: clip; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--t-R); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* the B mark, always at its true 0.764 ratio, coloured by background-color */
.bm { display: inline-block; aspect-ratio: 480 / 628; height: 1em; background: currentColor; -webkit-mask: url(../img/b-mark.png) center / contain no-repeat; mask: url(../img/b-mark.png) center / contain no-repeat; }
.coin { --s: 1.15em; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: inline-grid; place-items: center; vertical-align: -0.2em;
  background: radial-gradient(circle at 32% 28%, #FFFFB0 0 18%, #FFFF00 42%, #E6D200 78%, #B8A400 100%); box-shadow: inset 0 0 0 1.5px rgba(11,11,12,.85); }
.coin::after { content: ""; aspect-ratio: 480 / 628; height: 56%; background: var(--ink); -webkit-mask: url(../img/b-mark.png) center / contain no-repeat; mask: url(../img/b-mark.png) center / contain no-repeat; }

/* faint big B marks on the floor, like the pokéballs on the reference */
.floor { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .05; background: var(--pat);
  -webkit-mask: url(../img/floor.png) 0 0 / 420px 420px repeat; mask: url(../img/floor.png) 0 0 / 420px 420px repeat; }
:root[data-theme="dark"] .floor { opacity: .025; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .floor { opacity: .025; } }

/* ------------------------------------------------------------------ shell */
.app { position: relative; z-index: 1; min-height: 100%; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); }
.side { position: sticky; top: 0; height: 100vh; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; padding: 18px 14px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 6px; }
.brand .chip { width: 40px; height: 40px; border-radius: 10px; background: var(--lemon); color: var(--ink); display: grid; place-items: center; font-size: 26px; flex: none; }
.brand b { font-weight: 900; font-size: 19px; letter-spacing: -.01em; line-height: 1; }
.brand small { display: block; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .08em; margin-top: 3px; }
.nav-h { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 8px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--fg); text-decoration: none; font-weight: 600; background: var(--panel-2); }
.nav a:hover { background: var(--line); }
.nav a.on { background: var(--ink); color: var(--lemon); }
.nav a .tag { margin-left: auto; font-size: 11px; font-weight: 800; background: var(--lemon); color: var(--ink); border-radius: 999px; padding: 1px 8px; }
.packnav { display: flex; flex-direction: column; gap: 6px; }
.packnav button { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 12px; background: var(--panel-2); text-align: left; }
.packnav button.on { outline: 2px solid var(--ink); background: var(--panel); }
.packnav img { width: 38px; height: 50px; object-fit: cover; object-position: top; border-radius: 6px; }
.packnav b { font-size: 13px; font-weight: 800; display: block; line-height: 1.1; }
.packnav span { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--panel-2); border-radius: 12px; padding: 3px; }
.seg button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--ink); color: var(--lemon); }
.seg .ico { width: 15px; height: 15px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.top .brand { display: none; padding: 0; }
.top .sp { flex: 1; }
.wallet { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 8px; border-radius: 999px; background: var(--panel); box-shadow: var(--shadow); font-weight: 800; font-size: 16px; }
.wallet .coin { --s: 26px; }
.wallet.bump { animation: bump .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes bump { 40% { transform: scale(1.12); } }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--lemon); color: var(--ink); display: grid; place-items: center; font-weight: 900; font-size: 15px; box-shadow: inset 0 0 0 2px var(--ink); }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); box-shadow: var(--shadow); }
.demo-pill { font-size: 12px; font-weight: 800; background: var(--ink); color: var(--lemon); border-radius: 999px; padding: 4px 10px; letter-spacing: .04em; }

.chips { display: flex; gap: 10px; overflow-x: auto; padding: 4px 24px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.pchip { flex: none; display: grid; grid-template-columns: 44px auto; align-items: center; gap: 10px; height: 58px; padding: 0 16px 0 0; border-radius: 16px; overflow: hidden; color: var(--white); text-align: left; box-shadow: var(--shadow); transition: transform .15s, opacity .15s; }
.pchip img { width: 44px; height: 58px; object-fit: cover; object-position: center 12%; }
.pchip b { display: block; font-weight: 900; font-size: 15px; letter-spacing: .01em; line-height: 1.05; }
.pchip span { font-size: 12px; font-weight: 700; display: inline-flex; gap: 4px; align-items: center; opacity: .9; }
.pchip:not(.on) { opacity: .62; }
.pchip.on { outline: 3px solid var(--ink); outline-offset: -3px; }
.pchip:hover { transform: translateY(-2px); opacity: 1; }
.g-single { background: linear-gradient(120deg, #C9D0D3, #8E989C); color: var(--ink); }
.g-middle { background: linear-gradient(120deg, #4C8DFF, #1F4FC4); }
.g-master { background: linear-gradient(120deg, #9A5BFF, #4D17B0); }
.g-studio { background: linear-gradient(120deg, #F7CF4A, #B98A00); color: var(--ink); }
.g-penthouse { background: linear-gradient(120deg, #2B2B2E, #000); color: var(--lemon); }
.g-custom { background: linear-gradient(120deg, #3A3F42, #16191B); }

.view { flex: 1; padding: 8px 24px 120px; display: flex; flex-direction: column; gap: 22px; max-width: 1240px; width: 100%; margin: 0 auto; }
.tabs { display: none; }

/* ------------------------------------------------------------------ stage */
.stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; padding-top: 6px; }
.carousel { position: relative; width: 100%; height: clamp(330px, 52vh, 500px); perspective: 1400px; touch-action: pan-y; user-select: none; overflow: clip; overflow-clip-margin: 24px; }
.stage { width: 100%; min-width: 0; }
.pk { position: absolute; left: 50%; top: 50%; height: 92%; aspect-ratio: 2 / 3; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .35s, filter .35s; cursor: pointer; }
.pk .pk-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .2s; }
.pk.c .pk-in { animation: floaty 4.5s ease-in-out infinite; }
@keyframes floaty { 50% { translate: 0 -8px; } }
.pk img.pk-img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 26px 22px rgba(11,11,12,.28)); pointer-events: none; }
.pk-logo { position: absolute; display: grid; place-items: center; color: var(--ink); pointer-events: none; }
.pk-logo .bm { height: 64%; }
.pk-shine { position: absolute; inset: 4% 3%; border-radius: 6px; pointer-events: none; mix-blend-mode: soft-light; opacity: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.9) 48%, transparent 60%); background-size: 260% 100%; }
.pk.c:hover .pk-shine, .pk.c .pk-shine.run { opacity: 1; animation: sweep 1.4s ease; }
@keyframes sweep { from { background-position: 120% 0; } to { background-position: -40% 0; } }
.pk:not(.c) { filter: saturate(.8); }
.pk:not(.c) img.pk-img { filter: drop-shadow(0 16px 14px rgba(11,11,12,.18)); }

.buybar { position: relative; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 999px; background: var(--panel); box-shadow: 0 0 0 2px var(--ink), var(--shadow); }
.qty { display: flex; align-items: center; gap: 2px; padding: 0 4px; }
.qty button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); }
.qty button:disabled { opacity: .35; cursor: default; }
.qty output { min-width: 30px; text-align: center; font-weight: 800; font-size: 17px; }
.openbtn { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 999px; background: var(--ink); color: var(--white); font-weight: 900; font-size: 16px; letter-spacing: .02em; transition: transform .12s; }
.openbtn .price { display: inline-flex; align-items: center; gap: 6px; color: var(--lemon); }
.openbtn:hover:not(:disabled) { transform: translateY(-1px) scale(1.02); }
.openbtn:active:not(:disabled) { transform: scale(.97); }
.openbtn:disabled { background: #6B7275; cursor: not-allowed; }
.short { font-size: 13px; font-weight: 700; color: var(--bad); text-align: center; min-height: 18px; }

.facts { display: grid; grid-template-columns: repeat(3, auto); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.facts div { padding: 9px 18px; text-align: center; border-left: 1px solid var(--line); }
.facts div:first-child { border-left: 0; }
.facts small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.facts b { font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; gap: 5px; }

/* ------------------------------------------------------------------ panels */
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.panel { background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ph { display: flex; align-items: center; gap: 10px; }
.ph h3 { margin: 0; font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.ph .r { margin-left: auto; font-size: 13px; color: var(--muted); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
h1.title { margin: 0; font-size: clamp(26px, 4vw, 38px); font-weight: 900; letter-spacing: -.02em; line-height: 1.05; text-wrap: balance; }
.sub { color: var(--muted); margin: 4px 0 0; }

.odds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.odd { position: relative; border-radius: 14px; padding: 12px 12px 10px; color: var(--white); overflow: hidden; min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; isolation: isolate; }
.odd::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35; background: radial-gradient(circle at 20% 10%, rgba(255,255,255,.45), transparent 40%), repeating-linear-gradient(45deg, rgba(255,255,255,.07) 0 2px, transparent 2px 6px); }
.odd .otop { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 11px; letter-spacing: .07em; }
.odd .lt { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: rgba(0,0,0,.25); font-weight: 900; font-size: 12px; letter-spacing: 0; }
.odd .pc { margin: 6px 0 2px; }
.odd .pc { font-weight: 900; font-size: clamp(20px, 2.4vw, 28px); letter-spacing: -.02em; line-height: 1; }
.odd .sv { font-size: 12px; font-weight: 700; opacity: .9; display: inline-flex; align-items: center; gap: 4px; }
.odd.z { opacity: .35; }
.odd.t-C { background: linear-gradient(140deg, #B9C2C5, #7D878B); }
.odd.t-R { background: linear-gradient(140deg, #4F8FFF, #1D4FC7); }
.odd.t-E { background: linear-gradient(140deg, #A06BFF, #5617C2); }
.odd.t-L { background: linear-gradient(140deg, #FFD54A, #C78F00); color: var(--ink); }
.odd.t-B { background: var(--ink); color: var(--lemon); }
.odd.t-B::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(115deg, transparent 20%, rgba(255,255,0,.25) 40%, rgba(255,255,255,.35) 50%, rgba(255,255,0,.25) 60%, transparent 80%); background-size: 250% 100%; animation: sweep 3s linear infinite; }
.ev { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.ev b { color: var(--good); }

.strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.strip > * { scroll-snap-align: start; flex: none; }
.strip .cw { width: 132px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.strip .cap { font-size: 12px; color: var(--muted); font-weight: 600; text-align: center; line-height: 1.25; }
.strip .cap b { color: var(--fg); display: block; font-size: 13px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--muted); padding: 28px 12px; }
.empty img { width: 110px; border-radius: 20px; }

/* ------------------------------------------------------------------ card */
.card { --tc: var(--t-C); position: relative; width: 100%; aspect-ratio: 5 / 7; container-type: inline-size; perspective: 900px; }
.card .ci { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3,1.3,.4,1); }
.card.down .ci { transform: rotateY(180deg); }
.card .face, .card .back { position: absolute; inset: 0; border-radius: 7cqw; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.card .face { padding: 3.6cqw; background: var(--tc); box-shadow: 0 10px 24px -14px rgba(0,0,0,.55); }
.card .fi { position: relative; height: 100%; border-radius: 4.5cqw; background: #FFFFFF; color: var(--ink); display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }
.card .hd { display: flex; align-items: center; gap: 2cqw; padding: 3.2cqw 4cqw; background: var(--tc); color: var(--white); }
.card .hd b { font-weight: 900; font-size: 9cqw; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.card .hd i { margin-left: auto; font-style: normal; font-weight: 900; font-size: 6cqw; letter-spacing: .06em; padding: 1cqw 2.6cqw; border-radius: 99px; background: rgba(0,0,0,.25); }
.card .art { position: relative; overflow: hidden; background: #EEE; }
.card .art img { width: 100%; height: 100%; object-fit: cover; }
.card .ft { display: flex; align-items: center; padding: 2.6cqw 4cqw; font-size: 6.8cqw; font-weight: 800; }
.card .ft .no { color: #6A7275; }
.card .ft .val { margin-left: auto; display: inline-flex; align-items: center; gap: 1.6cqw; }
.card .ft .coin { --s: 8cqw; }
.card .ft .pz { color: var(--ink); background: var(--lemon); border-radius: 99px; padding: .6cqw 3cqw; font-size: 6cqw; }
.card.t-C { --tc: #9AA4A8; } .card.t-R { --tc: #2F7BFF; } .card.t-E { --tc: #8B3DFF; } .card.t-L { --tc: #E9A800; }
.card.t-B { --tc: var(--ink); }
.card.t-L .hd { color: var(--ink); }
.card.t-B .hd { color: var(--lemon); }
.card.t-B .face { background: conic-gradient(from var(--ang, 0deg), #FFFF00, #FFFFFF, #FFE600, #0B0B0C, #FFFF00, #FFF6A0, #FFFF00); animation: spin 4s linear infinite; }
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --ang: 360deg; } }
.card .holo { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: 0; transition: opacity .3s;
  background: linear-gradient(115deg, transparent 25%, rgba(255,0,170,.35) 38%, rgba(255,255,0,.45) 46%, rgba(0,220,255,.35) 54%, transparent 66%);
  background-size: 220% 220%; background-position: var(--hx, 50%) var(--hy, 50%); }
.card.t-E .holo, .card.t-L .holo, .card.t-B .holo { opacity: .55; }
.card.tilt .ci { transition: transform .12s; }
.card .back { transform: rotateY(180deg); background: var(--ink); padding: 5cqw; }
.card .back .bi { height: 100%; border-radius: 4.5cqw; border: 1.2cqw solid var(--lemon); display: grid; place-items: center; position: relative; overflow: hidden; }
.card .back .bi::before { content: ""; position: absolute; inset: -10%; opacity: .1; background: var(--lemon); -webkit-mask: url(../img/b-mark.png) 0 0 / 16cqw auto space; mask: url(../img/b-mark.png) 0 0 / 16cqw auto space; transform: rotate(-12deg); }
.card .back .bm { height: 38cqw; color: var(--lemon); position: relative; }
.card .back small { position: absolute; bottom: 5cqw; font-weight: 900; font-size: 6cqw; letter-spacing: .2em; color: var(--lemon); }
.card .cnt { position: absolute; top: -2.5cqw; right: -2.5cqw; z-index: 3; min-width: 15cqw; height: 15cqw; border-radius: 99px; padding: 0 3cqw; background: var(--ink); color: var(--lemon); font-weight: 900; font-size: 7.5cqw; display: grid; place-items: center; box-shadow: 0 0 0 1cqw var(--panel); }
.card.locked .face { background: var(--line); box-shadow: none; }
.card.locked .fi { background: var(--panel-2); }
.card.locked .hd { background: transparent; color: var(--muted); }
.card.locked .hd i { background: var(--line); color: var(--muted); }
.card.locked .art img { filter: brightness(0) opacity(.12); }
:root[data-theme="dark"] .card.locked .art img { filter: brightness(0) invert(1) opacity(.08); }
.card.locked .ft { color: var(--muted); }
.card.locked .art { background: var(--panel-2); }
.card.sel::after { content: ""; position: absolute; inset: -4px; border-radius: calc(7cqw + 4px); box-shadow: 0 0 0 4px var(--good); pointer-events: none; }
.card .tick { position: absolute; z-index: 4; left: 50%; bottom: -3cqw; translate: -50% 0; background: var(--good); color: #fff; border-radius: 99px; font-size: 6.5cqw; font-weight: 900; padding: 1cqw 4cqw; display: none; }
.card.sel .tick { display: block; }

/* ------------------------------------------------------------------ dex */
.dexhead { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.ring { --p: 0; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ink) calc(var(--p) * 1%), var(--line) 0); }
.ring div { width: 64px; height: 64px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font-weight: 900; font-size: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { padding: 7px 14px; border-radius: 999px; background: var(--panel); font-weight: 700; font-size: 13px; box-shadow: var(--shadow); display: inline-flex; align-items: center; gap: 6px; }
.fchip.on { background: var(--ink); color: var(--lemon); }
.fchip .d { width: 9px; height: 9px; border-radius: 3px; }
.dexgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; }
.dexgrid .card { cursor: pointer; transition: transform .15s; }
.dexgrid .card:hover { transform: translateY(-3px); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px; font-weight: 800; background: var(--panel-2); white-space: nowrap; }
.btn.dark { background: var(--ink); color: var(--lemon); }
.btn.lemon { background: var(--lemon); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .coin { --s: 18px; }

/* ------------------------------------------------------------------ missions / board / prizes */
.checkin { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; background: var(--ink); color: var(--white); border-radius: var(--r-lg); padding: 18px 20px; overflow: hidden; position: relative; }
.checkin .big { width: 64px; height: 64px; border-radius: 18px; background: var(--lemon); color: var(--ink); display: grid; place-items: center; }
.checkin .big .ico { width: 32px; height: 32px; }
.checkin h3 { margin: 0; font-size: 20px; font-weight: 900; }
.checkin p { margin: 2px 0 0; color: #B9C0C2; font-size: 14px; }
.mlist { display: flex; flex-direction: column; gap: 10px; }
.mission { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; background: var(--panel-2); }
.mission .mi { width: 44px; height: 44px; border-radius: 12px; background: var(--panel); display: grid; place-items: center; }
.mission b { font-weight: 800; }
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--ink); }
.mission.done .bar i { background: var(--good); }
.mission small { font-size: 12.5px; color: var(--muted); font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.pod { border-radius: 18px; padding: 14px 10px; text-align: center; background: var(--panel-2); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pod .avatar { width: 52px; height: 52px; font-size: 18px; }
.pod.p1 { background: var(--lemon); color: var(--ink); padding-top: 22px; }
.pod.p1 .avatar { background: var(--ink); color: var(--lemon); box-shadow: none; }
.pod .rk { font-weight: 900; font-size: 13px; letter-spacing: .1em; }
.pod b { font-weight: 800; }
.pod small { font-size: 12px; opacity: .8; }
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 34px 36px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 6px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .avatar { width: 34px; height: 34px; font-size: 13px; }
.row.me { background: var(--lemon-soft); border-radius: 12px; }
:root[data-theme="dark"] .row.me { background: #2B2A10; }
.row .rk { font-weight: 900; color: var(--muted); text-align: center; }
.prize { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 10px; border-radius: 16px; background: var(--panel-2); }
.prize img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.status { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 99px; background: var(--line); }
.status.given { background: #D9F5E2; color: #0F6B30; }
.status.claimed { background: #FFF4C2; color: #6B5500; }

/* ------------------------------------------------------------------ modal, toast */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(11,11,12,.55); display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 14px; animation: pop .25s cubic-bezier(.3,1.4,.5,1); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.modal .mh { display: flex; align-items: center; gap: 10px; }
.modal .mh h2 { margin: 0; font-size: 20px; font-weight: 900; }
.modal .mh .x { margin-left: auto; }
.detail { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.detail .card { width: 220px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.toasts { position: fixed; z-index: 200; left: 50%; bottom: calc(var(--tabs) + 24px + env(safe-area-inset-bottom)); translate: -50% 0; width: max-content; max-width: calc(100vw - 32px); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--white); border-radius: 999px; padding: 10px 18px; font-weight: 700; box-shadow: 0 12px 30px -10px rgba(0,0,0,.5); display: inline-flex; gap: 8px; align-items: center; animation: pop .25s; }
.toast.bad { background: var(--bad); }
.toast .coin { --s: 20px; }

/* ------------------------------------------------------------------ opening overlay */
.ov { position: fixed; inset: 0; z-index: 100; overflow: hidden; color: var(--white); display: grid; place-items: center;
  background: radial-gradient(circle at 50% 42%, #2A2914 0%, #0C0C0A 55%, #000 100%); animation: fade .25s; }
.ov .rays { position: absolute; left: 50%; top: 42%; width: 220vmax; height: 220vmax; translate: -50% -50%; pointer-events: none; opacity: .18;
  background: repeating-conic-gradient(from 0deg, rgba(255,255,0,.6) 0 6deg, transparent 6deg 18deg); animation: rot 40s linear infinite; -webkit-mask: radial-gradient(circle, #000 0 8%, transparent 45%); mask: radial-gradient(circle, #000 0 8%, transparent 45%); }
@keyframes rot { to { rotate: 360deg; } }
.ov canvas.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.ov .close { position: absolute; z-index: 20; top: calc(14px + env(safe-area-inset-top)); right: calc(14px + env(safe-area-inset-right)); background: rgba(255,255,255,.12); color: #fff; }
.ov .hint { position: absolute; z-index: 6; left: 0; right: 0; bottom: calc(28px + env(safe-area-inset-bottom)); text-align: center; font-weight: 800; letter-spacing: .04em; color: rgba(255,255,255,.85); }
.ov .hint small { display: block; font-weight: 600; color: rgba(255,255,255,.55); margin-top: 4px; letter-spacing: 0; }
.ov .hint .btn { background: var(--lemon); color: var(--ink); }
/* nothing in the opening scene can be selected or dragged (a swipe used to paint the pack blue) */
.ov, .ov * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ov img { -webkit-user-drag: none; pointer-events: none; }
.tearpack { position: relative; z-index: 4; height: min(64vh, 560px); aspect-ratio: 2 / 3; touch-action: none; cursor: grab; animation: drop .6s cubic-bezier(.2,1.3,.4,1); }
.tearpack:active { cursor: grabbing; }
@keyframes drop { from { transform: translateY(-40px) scale(.7); opacity: 0; } }
.tearpack .part { position: absolute; inset: 0; will-change: transform; }
.tearpack .part img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 24px 30px rgba(0,0,0,.55)); }
.tearpack .p-top { z-index: 3; }
.tearpack .p-body { z-index: 2; }
.tearpack .peek { position: absolute; z-index: 1; aspect-ratio: 5 / 7; filter: drop-shadow(0 0 18px rgba(255,255,0,.55)); }
.tearpack .peek .card { width: 100%; }
.tearpack .guide { position: absolute; z-index: 4; height: 0; border-top: 3px dashed rgba(255,255,0,.95); filter: drop-shadow(0 0 6px #FF0); animation: blink 1s ease-in-out infinite; pointer-events: none; }
.tearpack .rip { position: absolute; z-index: 4; height: 5px; width: 0; translate: 0 -50%; background: linear-gradient(90deg, #FFFFFF, #FFFF00 60%, #FFFFFF); border-radius: 99px; box-shadow: 0 0 14px 4px rgba(255,255,0,.85); pointer-events: none; }
@keyframes blink { 50% { opacity: .35; } }
.tearpack .glow { position: absolute; z-index: 1; height: 10%; border-radius: 50%; background: radial-gradient(closest-side, #FFFFF0, rgba(255,255,0,.75), transparent); opacity: 0; filter: blur(8px); pointer-events: none; }
.tearpack .pk-logo .bm { height: 64%; }

.reveal { position: relative; z-index: 4; width: min(1100px, 100%); padding: 70px 18px 150px; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 18px; max-height: 100vh; overflow-y: auto; }
.reveal .slot { width: var(--cw, 180px); animation: rise .55s cubic-bezier(.2,1.2,.4,1) backwards; }
@keyframes rise { from { transform: translateY(80px) scale(.6); opacity: 0; } }
.reveal .card { cursor: pointer; }
.reveal .card.down.tease-E .back { box-shadow: 0 0 26px 6px rgba(139,61,255,.85); }
.reveal .card.down.tease-L .back { box-shadow: 0 0 34px 10px rgba(242,178,0,.95); animation: shake .6s infinite; }
.reveal .card.down.tease-B .back { box-shadow: 0 0 44px 14px rgba(255,255,0,1); animation: shake .45s infinite; }
.reveal .card.flash .face { animation: flashin .8s ease; }
@keyframes flashin { from { filter: brightness(2.2); } }
.banner { position: absolute; z-index: 30; left: 50%; top: 40%; translate: -50% -50%; text-align: center; pointer-events: none; animation: banner 2.2s ease forwards; }
/* outline from stacked shadows, not text-stroke: stroke also traces the font's inner contours and looks broken */
.banner b { display: block; font-size: clamp(42px, 9vw, 110px); font-weight: 900; letter-spacing: -.02em; line-height: .92; color: var(--lemon);
  text-shadow: 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 3px 0 var(--ink), 0 -3px 0 var(--ink), 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink), 0 9px 0 var(--ink), 0 0 40px rgba(255,255,0,.7); }
.banner span { display: inline-block; margin-top: 14px; font-weight: 800; letter-spacing: .24em; font-size: 13px; color: var(--lemon); background: var(--ink); border-radius: 999px; padding: 6px 14px; }
@keyframes banner { 0% { transform: scale(.4); opacity: 0; } 15% { transform: scale(1.08); opacity: 1; } 25% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1.05); } }
.whiteout { position: absolute; inset: 0; z-index: 25; background: #FFFFF0; pointer-events: none; animation: whiteout 1s ease forwards; }
@keyframes whiteout { from { opacity: .95; } to { opacity: 0; } }
.sumbar { position: absolute; z-index: 10; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); translate: -50% 0; width: min(760px, calc(100% - 24px)); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 12px 12px 18px; border-radius: 22px; background: rgba(255,255,255,.96); color: var(--ink); box-shadow: 0 20px 50px -20px #000; animation: rise .4s cubic-bezier(.2,1.2,.4,1); }
.sumbar .tot { font-weight: 800; display: flex; flex-direction: column; line-height: 1.2; margin-right: auto; }
.sumbar .tot small { font-weight: 600; color: #697174; }
.sumbar .btn { background: #EEF1F2; }
.sumbar .btn.dark { background: var(--ink); color: var(--lemon); }

/* ------------------------------------------------------------------ lucky draw */
.draws { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.dcard { background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.dcard .pz { display: flex; gap: 8px; }
.dcard .pz img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.dstage { background: var(--ink); color: var(--white); border-radius: 26px; padding: 22px; display: flex; flex-direction: column; gap: 18px; position: relative; overflow: hidden; }
.dstage .now { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; }
.dstage .now img { width: 120px; height: 120px; border-radius: 20px; object-fit: cover; box-shadow: 0 0 0 3px var(--lemon); }
.dstage .now small { color: var(--lemon); font-weight: 800; letter-spacing: .14em; font-size: 12px; }
.dstage .now h2 { margin: 2px 0 0; font-size: clamp(24px, 3.4vw, 40px); font-weight: 900; line-height: 1.05; }
.reel { position: relative; height: 128px; overflow: hidden; border-radius: 18px; background: #151617; -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.reel .track { position: absolute; left: 0; top: 14px; display: flex; gap: 10px; will-change: transform; }
.reel .tk { flex: none; width: 110px; height: 100px; border-radius: 14px; background: #232527; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.reel .tk .avatar { width: 40px; height: 40px; font-size: 14px; }
.reel .tk b { font-size: 13px; font-weight: 800; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reel .tk small { font-size: 11px; color: #9AA2A5; font-weight: 700; }
.reel .tk.win { background: var(--lemon); color: var(--ink); }
.reel .tk.win small { color: #5C5C00; }
.reel .ptr { position: absolute; z-index: 2; left: 50%; top: 0; bottom: 0; width: 3px; translate: -50% 0; background: var(--lemon); box-shadow: 0 0 12px var(--lemon); }
.reel .ptr::before { content: ""; position: absolute; top: 0; left: 50%; translate: -50% 0; border: 9px solid transparent; border-top-color: var(--lemon); }
.dctrl { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dstage .btn { background: rgba(255,255,255,.12); color: var(--white); }
.dstage .btn.lemon { background: var(--lemon); color: var(--ink); box-shadow: none; }
.dctrl .sp { flex: 1; }
.winners { display: flex; flex-direction: column; gap: 8px; }
.winner { display: grid; grid-template-columns: 44px 48px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 14px; background: var(--panel-2); }
.winner img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.winner .pl { font-weight: 900; text-align: center; }
.dstage.big { position: fixed; inset: 0; z-index: 90; border-radius: 0; justify-content: center; padding: 4vh 5vw; }
.dstage.big .reel { height: 200px; }
.dstage.big .reel .tk { width: 160px; height: 170px; }
.dstage.big .reel .tk .avatar { width: 64px; height: 64px; font-size: 22px; }
.dstage.big .reel .tk b { font-size: 18px; max-width: 140px; }
.dstage.big .now img { width: 200px; height: 200px; }
.dstage.big .now { grid-template-columns: 200px 1fr; }
.dstage .winname { font-size: clamp(30px, 6vw, 80px); font-weight: 900; color: var(--lemon); line-height: 1; min-height: 1em; }

/* ------------------------------------------------------------------ admin */
.atabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.atabs button { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 12px; background: var(--panel); font-weight: 700; font-size: 14px; box-shadow: var(--shadow); }
.atabs button.on { background: var(--ink); color: var(--lemon); }
.atabs .tag { font-size: 11px; background: var(--bad); color: #fff; border-radius: 99px; padding: 0 7px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tablewrap { overflow-x: auto; }
.table th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.table .thumb.pack { height: 58px; object-fit: cover; object-position: top; }
.oddsbar { display: flex; height: 10px; width: 160px; border-radius: 99px; overflow: hidden; background: var(--line); }
.oddsbar i { display: block; height: 100%; }
.tierdot { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 12.5px; }
.tierdot::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; border: 1.5px solid var(--line); background: var(--panel); border-radius: 12px; padding: 10px 12px; outline: none; }
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); }
.field .help { font-size: 12px; color: var(--muted); }
.oddsedit { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.oddsedit .field input { text-align: center; font-weight: 800; padding: 8px 4px; }
.sumline { display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 14px; }
.sumline .ok { color: var(--good); }
.sumline .no { color: var(--bad); }
.upl { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; }
.upl .pv { width: 96px; height: 96px; border-radius: 14px; background: var(--panel-2) center / cover no-repeat; box-shadow: inset 0 0 0 1.5px var(--line); }
.upl .pv.tall { height: 128px; background-size: contain; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--panel-2); font-size: 13px; font-weight: 700; color: var(--fg); cursor: pointer; white-space: nowrap; }
.field .checks input { width: 16px; height: 16px; padding: 0; border: 0; accent-color: var(--ink); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; cursor: pointer; }
.switch input { width: 40px; height: 24px; appearance: none; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; transition: background .2s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked { background: var(--ink); }
.switch input:checked::after { left: 19px; background: var(--lemon); }
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 16px 12px; }
.cardgrid .it { display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.cardgrid .it small { font-size: 12px; color: var(--muted); font-weight: 600; text-align: center; }
.cardgrid .it.off { opacity: .45; }
.addtile { aspect-ratio: 5 / 7; border-radius: 14px; border: 2px dashed var(--line); display: grid; place-items: center; color: var(--muted); font-weight: 800; gap: 6px; align-content: center; }
.tickets { display: flex; flex-wrap: wrap; gap: 6px; max-height: 180px; overflow: auto; }
.tickets span { font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--panel-2); }

/* ------------------------------------------------------------------ login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; z-index: 1; }
.login .box { width: min(440px, 100%); background: var(--panel); border-radius: 28px; padding: 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); text-align: center; align-items: center; }
.login .fan { display: flex; justify-content: center; margin: 4px 0 6px; }
.login .fan .card { width: 104px; margin: 0 -14px; }
.login .fan .card:nth-child(1) { rotate: -12deg; translate: 0 10px; }
.login .fan .card:nth-child(3) { rotate: 12deg; translate: 0 10px; }
.login h1 { margin: 0; font-size: 32px; font-weight: 900; letter-spacing: -.02em; }

/* ------------------------------------------------------------------ phone */
@media (max-width: 979px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .top { padding: 0 max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)); top: 0; }
  .top .brand { display: flex; }
  .top .brand .chip { width: 34px; height: 34px; font-size: 22px; }
  .top .brand b { font-size: 17px; }
  .top .brand small { display: none; }
  .chips { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .view { padding: 4px max(14px, env(safe-area-inset-right)) calc(var(--tabs) + 110px) max(14px, env(safe-area-inset-left)); gap: 18px; }
  .tabs { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: calc(var(--tabs) + env(safe-area-inset-bottom)); padding: 0 max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left)); background: var(--panel); border-top: 1px solid var(--line); }
  .tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); text-decoration: none; }
  .tabs a.on { color: var(--fg); }
  .tabs a.on .ico { color: var(--ink); background: var(--lemon); border-radius: 10px; padding: 3px; width: 30px; height: 26px; }
  .stage .buybar { position: fixed; z-index: 35; left: 50%; translate: -50% 0; bottom: calc(var(--tabs) + 12px + env(safe-area-inset-bottom)); }
  .short { position: fixed; z-index: 35; left: 50%; translate: -50% 0; width: max-content; max-width: calc(100% - 28px); bottom: calc(var(--tabs) + 82px + env(safe-area-inset-bottom)); background: var(--panel); border-radius: 999px; padding: 6px 14px; box-shadow: var(--shadow); font-size: 12px; }
  .short:empty { display: none; }
  .demo-pill { font-size: 10px; padding: 3px 7px; }
  .top [data-sound] { display: none; }
  .top { gap: 8px; }
  .top .brand b { white-space: nowrap; font-size: 16px; }
  .wallet { padding: 0 12px 0 6px; font-size: 15px; height: 36px; }
  .wallet .coin { --s: 24px; }
  .avatar { width: 36px; height: 36px; }
  .table { min-width: 600px; }
  .checkin { grid-template-columns: auto 1fr; }
  .checkin .btn { grid-column: 1 / -1; }
  .mission { grid-template-columns: 1fr auto; }
  .mission .mi { display: none; }
  .carousel { height: clamp(300px, 50vh, 440px); }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .odds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .odds .odd:last-child { grid-column: 1 / -1; }
  .facts div { padding: 8px 10px; }
  .dexgrid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 10px; }
  .detail { grid-template-columns: 1fr; justify-items: center; }
  .detail .card { width: 200px; }
  .form { grid-template-columns: 1fr; }
  .oddsedit { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dstage .now { grid-template-columns: 84px 1fr; }
  .dstage .now img { width: 84px; height: 84px; }
  .row { grid-template-columns: 26px 32px 1fr auto; }
  .row .hide-s { display: none; }
  .openbtn { padding: 0 16px; font-size: 15px; }
  .reveal { padding: 64px 12px 190px; gap: 12px; }
  .toasts { bottom: calc(var(--tabs) + 86px + env(safe-area-inset-bottom)); }
  .dexhead { grid-template-columns: auto 1fr; }
  .dexhead > .btn { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .pchip { grid-template-columns: 36px auto; height: 50px; padding-right: 12px; }
  .pchip img { width: 36px; height: 50px; }
  .pchip b { font-size: 13px; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .facts div { padding: 8px 6px; }
  .facts b { font-size: 13px; }
  .qty button { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
