/* Chess Arena mockup. Two styles (classic, japan) x two modes (light, dark).
   Every colour is a token; a style is just a different set of tokens plus a few flourishes. */

/* ---------- tokens ---------- */
[data-style="classic"][data-mode="light"] {
  --bg: #efefef; --bg2: #e3e3e3; --card: #fdfdfd; --card2: #f2f2f2; --line: #dadada; --line2: #e8e8e8;
  --ink: #1d1d1d; --ink2: #404040; --muted: #7f7f7f;
  --accent: #505050; --accent-ink: #f9f9f9; --accent-soft: #e4e4e4; --gold: #8e8e8e;
  --good: #3c7a4b; --good-soft: #e3efe4; --warn: #a86a12; --warn-soft: #f6ead6; --bad: #b23b2e; --bad-soft: #f6e1dd;
  --sq-l: #dbdbdb; --sq-d: #8f8f8f; --frame: #424242;
  --shadow: 0 1px 2px rgba(43, 43, 43, .06), 0 8px 24px rgba(43, 43, 43, .07);
  --glow: rgba(142, 142, 142, .14);
}
[data-style="classic"][data-mode="dark"] {
  --bg: #0e0e0e; --bg2: #151515; --card: #181818; --card2: #1e1e1e; --line: #2b2b2b; --line2: #232323;
  --ink: #eaeaea; --ink2: #c4c4c4; --muted: #838383;
  --accent: #b1b1b1; --accent-ink: #161616; --accent-soft: #252525; --gold: #b1b1b1;
  --good: #6cc488; --good-soft: #17271c; --warn: #e2a64a; --warn-soft: #2b2214; --bad: #ec7a6c; --bad-soft: #2d1916;
  --sq-l: #7f7f7f; --sq-d: #474747; --frame: #222222;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
  --glow: rgba(177, 177, 177, .08);
}
[data-style="japan"][data-mode="light"] {
  --bg: #e6e6e6; --bg2: #dadada; --card: #f1f1f1; --card2: #e8e8e8; --line: #c3c3c3; --line2: #d5d5d5;
  --ink: #171717; --ink2: #343434; --muted: #787878;
  --accent: #b8322a; --accent-ink: #f7f7f7; --accent-soft: #e0e0e0; --gold: #838383;
  --good: #3d6b4a; --good-soft: #dfe7d6; --warn: #9c6a1a; --warn-soft: #f1e2c4; --bad: #b8322a; --bad-soft: #f2dccf;
  --sq-l: #d1d1d1; --sq-d: #a8a8a8; --frame: #4b4b4b;
  --shadow: 0 1px 0 rgba(54, 54, 54, .08), 0 10px 26px rgba(54, 54, 54, .1);
  --glow: rgba(184, 50, 42, .1);
}
[data-style="japan"][data-mode="dark"] {
  --bg: #07080d; --bg2: #0e1018; --card: #12131c; --card2: #1b1c27; --line: #2b2c3a; --line2: #22232f;
  --ink: #e7e7e7; --ink2: #c0c0c0; --muted: #858585;
  --accent: #d9483b; --accent-ink: #f5f5f5; --accent-soft: #2c1918; --gold: #adadad;
  --good: #7cc495; --good-soft: #15241b; --warn: #e8a54b; --warn-soft: #2a2015; --bad: #ef6d5f; --bad-soft: #2c1918;
  --sq-l: #a8a8a8; --sq-d: #6f6f6f; --frame: #1d1d1d;
  --shadow: 0 1px 0 rgba(0, 0, 0, .5), 0 14px 34px rgba(0, 0, 0, .45);
  --glow: rgba(173, 173, 173, .1);
}
[data-style="classic"] { --fh: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif; --fb: 'Inter', system-ui, sans-serif; --r: 12px; --rs: 8px; }
[data-style="japan"] {
  --fh: 'Shippori Mincho B1', serif; --fb: 'Zen Kaku Gothic New', 'Inter', sans-serif; --fbrush: 'Shippori Mincho B1', serif;
  --r: 4px; --rs: 3px;
  --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .32 0 0 0 0 .18 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--fb); color: var(--ink); background: var(--bg); min-height: 100vh;
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  transition: background-color .35s, color .35s;
}
html[data-style="classic"] body { background: radial-gradient(1200px 500px at 15% -10%, var(--glow), transparent 70%), var(--bg); }
html[data-style="japan"] body { background: var(--tex), radial-gradient(1000px 520px at 85% -10%, var(--glow), transparent 70%), var(--bg); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--accent); cursor: pointer; text-decoration: none; }
a:hover { text-decoration: underline; }
svg { display: block; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.page { max-width: 1180px; margin: 0 auto; padding: 16px 20px 110px; }

/* ---------- card ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; position: relative; }
[data-style="japan"] .card { background: var(--tex), var(--card); }
[data-style="japan"] .card::before { content: ''; position: absolute; inset: 5px; border: 1px solid var(--line2); border-radius: 2px; pointer-events: none; }
.card-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--ink2); margin-bottom: 14px; }
.card-h .jp { display: none; }
[data-style="japan"] .card-h .jp { display: inline; font-family: var(--fh); color: var(--accent); font-weight: 700; }
.card-h .r { margin-left: auto; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; margin-bottom: 22px; border-radius: calc(var(--r) + 4px); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; min-width: 0; }
.brand b { display: block; font-family: var(--fh); font-size: 17px; font-weight: 700; line-height: 1.1; }
.brand small { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #6a6a6a, #383838); color: #e9e9e9; font-size: 20px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .15); }
[data-style="japan"] .logo { border-radius: 4px; background: var(--accent); color: #fff3e3; font-family: var(--fbrush); font-size: 21px; transform: rotate(-4deg); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22), 0 2px 0 rgba(0, 0, 0, .15); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.net { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink2); padding: 5px 10px; border: 1px solid var(--line); border-radius: 99px; white-space: nowrap; }
.net i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--rs); border: 1px solid var(--line); color: var(--ink2); }
.icon-btn:hover { background: var(--card2); }
.icon-btn svg { width: 16px; height: 16px; }

/* ---------- page head ---------- */
.ph { display: flex; align-items: flex-end; gap: 14px; margin: 0 4px 18px; }
.ph h1 { font-family: var(--fh); font-weight: 700; font-size: 28px; letter-spacing: -.01em; line-height: 1.15; }
.ph p { color: var(--muted); margin-top: 4px; }
[data-style="japan"] .ph h1 { font-weight: 800; padding-bottom: 8px; background: no-repeat left bottom / 220px 9px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 9'%3E%3Cpath d='M2 6 C40 2 90 3 130 4 S200 5 218 2' fill='none' stroke='%23b8322a' stroke-width='3' stroke-linecap='round' opacity='.85'/%3E%3C/svg%3E"); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--rs); font-weight: 600; font-size: 13.5px; white-space: nowrap; border: 1px solid transparent; transition: transform .12s, background .2s, opacity .2s, box-shadow .2s; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.pri { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 0 rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn.pri:hover { filter: brightness(1.07); }
.btn.ghost { border-color: var(--line); background: var(--card); color: var(--ink); }
.btn.ghost:hover { background: var(--card2); }
.btn.quiet { color: var(--ink2); }
.btn.quiet:hover { background: var(--card2); }
.btn.danger { border-color: color-mix(in srgb, var(--bad) 40%, transparent); color: var(--bad); background: var(--bad-soft); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 12.5px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 14.5px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
[data-style="japan"] .btn { letter-spacing: .03em; }
[data-style="japan"] .btn.pri { box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .22), 0 1px 0 rgba(0, 0, 0, .1); }
.btn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }

/* ---------- form ---------- */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 12px; color: var(--ink2); margin-bottom: 5px; font-weight: 500; }
.input { width: 100%; height: 40px; border-radius: var(--rs); border: 1px solid var(--line); background: var(--card2); padding: 0 12px; outline: none; transition: border-color .2s, box-shadow .2s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .04em; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px; background-size: 5px 5px; background-repeat: no-repeat; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11.5px; margin: 16px 0 14px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.note { font-size: 12px; color: var(--muted); margin-top: 12px; }
.note.err { color: var(--bad); }

/* segmented + chips */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: calc(var(--rs) + 3px); background: var(--card2); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button { height: 32px; padding: 0 12px; border-radius: var(--rs); font-size: 12.5px; font-weight: 600; color: var(--ink2); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 0 0 1px var(--line); }
[data-style="japan"] .seg button.on { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.seg.sm button { height: 26px; padding: 0 9px; font-size: 11.5px; }
.seg.full { display: flex; } .seg.full button { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 11.5px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink2); background: var(--card); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.wait { color: var(--warn); background: var(--warn-soft); }
.badge.ready { color: var(--good); background: var(--good-soft); }
.badge.live { color: var(--accent); background: var(--accent-soft); }
.badge.live::before { animation: pulse 1.4s infinite; }
.badge.done { color: var(--muted); background: var(--card2); }
.badge.ok { color: var(--good); background: var(--good-soft); }
.badge.bad { color: var(--bad); background: var(--bad-soft); }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- layout helpers ---------- */
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 18px; align-items: start; }
.center { display: grid; place-items: start center; }
.form-card { width: 100%; max-width: 440px; padding: 24px; }
.stack > * + * { margin-top: 14px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; }
.sp { flex: 1; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv small { color: var(--muted); font-size: 12.5px; }
.kv b { font-weight: 600; text-align: right; }
.box { border: 1px solid var(--line); border-radius: var(--rs); padding: 4px 14px; background: var(--card2); }

/* ---------- landing ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 32px; padding: 40px; align-items: center; overflow: hidden; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.eyebrow b { display: none; }
[data-style="japan"] .eyebrow b { display: inline; font-family: var(--fbrush); font-size: 18px; letter-spacing: .12em; color: var(--accent); text-transform: none; font-weight: 400; }
.display { font-family: var(--fh); font-size: clamp(30px, 4.4vw, 50px); line-height: 1.12; letter-spacing: -.02em; margin: 14px 0 14px; font-weight: 700; }
[data-style="japan"] .display { font-weight: 800; letter-spacing: 0; }
.lead { color: var(--ink2); font-size: 15px; max-width: 470px; margin-bottom: 22px; }
.hero .chips { margin-top: 18px; }
.hero-r { position: relative; }
.hero-board { position: relative; max-width: 380px; margin: 0 auto; }
.enso { display: none; }
[data-style="japan"] .enso { display: block; position: absolute; inset: -12%; width: 124%; height: 124%; color: var(--accent); opacity: .16; pointer-events: none; }
[data-style="japan"][data-mode="dark"] .enso { opacity: .28; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 380px; margin: 16px auto 0; }
.hero-stats div { text-align: center; padding: 10px 6px; border: 1px solid var(--line); border-radius: var(--rs); background: var(--card2); }
.hero-stats b { display: block; font-family: var(--fh); font-size: 18px; }
.hero-stats small { color: var(--muted); font-size: 11px; }
.feat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.feat { display: flex; gap: 14px; align-items: flex-start; }
.feat-ic { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-family: var(--fh); }
[data-style="japan"] .feat-ic { border-radius: 3px; background: var(--accent); color: var(--accent-ink); font-family: var(--fbrush); font-size: 20px; font-weight: 400; transform: rotate(-3deg); }
.feat h3 { font-family: var(--fh); font-size: 16px; margin-bottom: 4px; }
.feat p { color: var(--muted); font-size: 13px; }

/* ---------- board ---------- */
.board-frame { padding: 12px; border-radius: calc(var(--r) + 2px); background: var(--frame); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 14px 30px rgba(0, 0, 0, .22); }
[data-style="japan"] .board-frame { border-radius: 3px; padding: 14px; background: linear-gradient(135deg, rgba(255, 255, 255, .06), transparent 40%), repeating-linear-gradient(95deg, rgba(0, 0, 0, .07) 0 2px, transparent 2px 9px), var(--frame); }
.board { container-type: inline-size; display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; width: 100%; border-radius: 4px; overflow: hidden; user-select: none; -webkit-user-select: none; }
.sq { position: relative; display: grid; place-items: center; aspect-ratio: 1; }
.sq.l { background-color: var(--sq-l); }
.sq.d { background-color: var(--sq-d); }
[data-style="japan"] .board { border-radius: 1px; background: var(--sq-l); }
[data-style="japan"] .sq { background-image: repeating-linear-gradient(88deg, rgba(110, 65, 25, .07) 0 1px, transparent 1px 7px); box-shadow: inset 0 0 0 .5px rgba(45, 25, 10, .5); }
.sq em { position: absolute; font-style: normal; font-weight: 700; font-size: calc(100cqw / 8 * .19); line-height: 1; opacity: .85; pointer-events: none; }
.sq .rk { top: 5%; left: 6%; }
.sq .fl { bottom: 5%; right: 7%; }
.sq.l em { color: var(--sq-d); }
.sq.d em { color: var(--sq-l); }
[data-style="japan"] .sq em { color: rgba(45, 25, 10, .6); font-family: var(--fh); }
.sq.last { background-image: linear-gradient(rgba(255, 210, 80, .42), rgba(255, 210, 80, .42)); }
[data-style="japan"] .sq.last { background-image: linear-gradient(rgba(200, 55, 40, .26), rgba(200, 55, 40, .26)); }
.sq.sel { box-shadow: inset 0 0 0 calc(100cqw / 8 * .07) var(--accent); }
.sq.mv::after { content: ''; width: 30%; height: 30%; border-radius: 50%; background: rgba(16, 16, 16, .25); }
.sq.cap::after { content: ''; position: absolute; inset: 6%; border-radius: 50%; border: calc(100cqw / 8 * .07) solid rgba(16, 16, 16, .28); }
.sq.chk { background-image: radial-gradient(circle, rgba(230, 40, 30, .85), rgba(230, 40, 30, .3) 45%, transparent 70%); }
.board.play .sq { cursor: pointer; }

/* classic Staunton glyphs */
.pc { pointer-events: none; position: relative; z-index: 1; }
.pc.cl { font-size: calc(100cqw / 8 * .8); line-height: 1; font-family: 'Segoe UI Symbol', 'Noto Sans Symbols 2', 'DejaVu Sans', 'Apple Symbols', serif; transform: translateY(-2%); }
.pc.cl.w { color: #f6f6f6; -webkit-text-stroke: calc(100cqw / 8 * .028) #212121; paint-order: stroke fill; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .3)); }
.pc.cl.b { color: #171717; -webkit-text-stroke: calc(100cqw / 8 * .012) #000; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .35)); }
[data-mode="dark"] .pc.cl.b { color: #121212; -webkit-text-stroke: calc(100cqw / 8 * .016) #b1b1b166; }


/* ---------- lists ---------- */
.mlist { display: flex; flex-direction: column; gap: 10px; }
.mitem { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--rs); background: var(--card2); transition: border-color .2s, transform .15s; }
.mitem:hover { border-color: var(--accent); transform: translateY(-1px); }
.mitem .id { font-family: ui-monospace, Consolas, monospace; font-weight: 700; font-size: 13px; }
.mitem small { display: block; color: var(--muted); font-size: 12px; }
.mitem .badge { margin-left: auto; }
.av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: var(--c, var(--accent)); }
[data-style="japan"] .av { border-radius: 4px; font-family: var(--fh); }
.who { display: flex; align-items: center; gap: 10px; }
.who b { display: block; font-size: 13.5px; }
.who small { color: var(--muted); font-size: 12px; }
.wallet-chip { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 8px 10px; border-radius: var(--rs); background: var(--good-soft); color: var(--good); font-weight: 600; }
.wallet-chip .sp { flex: 1; }
.wallet-chip .bal { color: var(--ink); }
.tabs { display: flex; gap: 6px; margin: 14px 0; }
.hr { height: 1px; background: var(--line); margin: 16px 0; }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: rgba(8, 8, 8, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .2s; }
.modal { width: 100%; max-width: 400px; padding: 20px; animation: rise .25s cubic-bezier(.2, .9, .3, 1.2); }
.modal-h { display: flex; align-items: flex-start; margin-bottom: 14px; }
.modal-h h3 { font-family: var(--fh); font-size: 19px; }
.modal-h p { color: var(--muted); font-size: 12.5px; }
.x { margin-left: auto; width: 30px; height: 30px; border-radius: var(--rs); font-size: 20px; color: var(--muted); }
.x:hover { background: var(--card2); }
.wl { display: flex; width: 100%; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--rs); margin-bottom: 8px; text-align: left; background: var(--card2); transition: border-color .2s; }
.wl:hover { border-color: var(--accent); }
.wl-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 11px; flex: none; }
.wl b { display: block; font-size: 13.5px; }
.wl small { color: var(--muted); font-size: 11.5px; }
.wl em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--muted); }
.wl em.rec { color: var(--good); font-weight: 600; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* ---------- match flow ---------- */
.idbox { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px dashed var(--accent); border-radius: var(--rs); background: var(--accent-soft); }
.idbox b { font-family: ui-monospace, Consolas, monospace; font-size: 22px; letter-spacing: .08em; }
.idbox small { display: block; color: var(--muted); font-size: 11.5px; }
.players { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.pcard { border: 1px solid var(--line); border-radius: var(--rs); padding: 16px; background: var(--card2); text-align: center; }
.pcard .av { width: 54px; height: 54px; font-size: 20px; margin: 0 auto 10px; }
.pcard b { display: block; font-size: 15px; }
.pcard small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.pcard.ghosted { border-style: dashed; }
.pcard.ghosted .av { background: var(--line); color: var(--muted); animation: pulse 1.6s infinite; }
.vs { font-family: var(--fh); font-weight: 800; font-size: 22px; color: var(--accent); }
[data-style="japan"] .vs { font-family: var(--fbrush); font-weight: 400; font-size: 30px; }
.steps { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; margin: 12px 0 16px; }
.steps li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink2); }
.steps li i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; border: 1px solid var(--line); color: var(--muted); flex: none; }
.steps li.on i { border-color: var(--accent); color: var(--accent); }
.steps li.done i { background: var(--good); border-color: var(--good); color: #fff; }
.steps li.done { color: var(--ink); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12.5px; }
.sum { border-radius: var(--rs); padding: 12px 14px; background: var(--card2); border: 1px solid var(--line); font-size: 13px; }
.sum b { color: var(--accent); }

/* ---------- live ---------- */
.livegrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.live-board { max-width: 600px; width: 100%; margin: 0 auto; }
.pbar { display: flex; align-items: center; gap: 10px; padding: 10px 2px; }
.pbar .tag { display: none; }
[data-style="japan"] .pbar .tag { display: inline-block; font-family: var(--fh); font-size: 11px; font-weight: 700; color: var(--accent); border: 1px solid var(--accent); border-radius: 2px; padding: 1px 5px; }
.clock { margin-left: auto; font-family: ui-monospace, Consolas, monospace; font-size: 20px; font-weight: 700; padding: 6px 12px; border-radius: var(--rs); background: var(--card2); border: 1px solid var(--line); color: var(--muted); min-width: 92px; text-align: center; }
.clock.run { background: var(--ink); color: var(--card); border-color: var(--ink); }
.clock.low { background: var(--bad); color: #fff; border-color: var(--bad); }
.moves { max-height: 190px; overflow-y: auto; font-size: 13px; border: 1px solid var(--line); border-radius: var(--rs); background: var(--card2); }
.moves div { display: grid; grid-template-columns: 34px 1fr 1fr; padding: 4px 10px; }
.moves div:nth-child(even) { background: var(--card); }
.moves span:first-child { color: var(--muted); }
.moves .cur { font-weight: 700; color: var(--accent); }
.sig { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--good); padding: 8px 10px; border-radius: var(--rs); background: var(--good-soft); }
.sig svg { width: 14px; height: 14px; }
.status-line { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }

/* ---------- result ---------- */
.res-hero { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; padding-bottom: 20px; border-bottom: 1px dashed var(--line); margin-bottom: 18px; }
.res-mark { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 58px; line-height: 1; position: relative; font-family: 'Segoe UI Symbol', 'DejaVu Sans', serif; }
[data-style="japan"] .res-mark { border-radius: 4px; background: none; font-family: var(--fbrush); font-size: 92px; color: var(--ink); }
.seal { display: none; }
[data-style="japan"] .seal { display: grid; position: absolute; right: -16px; bottom: -8px; width: 46px; height: 46px; place-items: center; background: var(--accent); color: #fff4e6; font-family: var(--fbrush); font-size: 15px; line-height: 1.05; text-align: center; border-radius: 3px; transform: rotate(-8deg); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); animation: stamp .45s .35s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes stamp { from { transform: scale(2.4) rotate(-20deg); opacity: 0; } }
.res-hero h2 { font-family: var(--fh); font-size: 30px; line-height: 1.15; }
.res-hero p { color: var(--muted); }
.payout { font-family: var(--fh); font-size: 38px; font-weight: 700; color: var(--good); line-height: 1.1; margin: 4px 0 2px; }
.payout.neg { color: var(--bad); }
.proof { font-size: 12.5px; }
.hash { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

/* ---------- security ---------- */
.toggle { width: 42px; height: 24px; border-radius: 99px; background: var(--line); position: relative; flex: none; transition: background .2s; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s; }
.toggle.on { background: var(--good); }
.toggle.on::after { transform: translateX(18px); }
.setrow { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.setrow:last-child { border-bottom: 0; }
.setrow b { display: block; font-size: 13.5px; }
.setrow small { display: block; color: var(--muted); font-size: 12px; }
.setrow > div:first-child { flex: 1; min-width: 0; }

/* ---------- chooser (frame 00) ---------- */
.chooser { min-height: 100vh; display: flex; flex-direction: column; padding: 28px 20px 110px; max-width: 1240px; margin: 0 auto; }
.ch-head { text-align: center; margin: 10px auto 28px; max-width: 600px; }
.ch-head .logo { margin: 0 auto 14px; width: 46px; height: 46px; font-size: 26px; }
.ch-head h1 { font-family: var(--fh); font-size: clamp(28px, 4vw, 42px); line-height: 1.1; letter-spacing: -.01em; }
.ch-head p { color: var(--muted); margin-top: 10px; font-size: 15px; }
.ch-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; flex: 1; }
.ch-panel { position: relative; overflow: hidden; border-radius: 18px; text-align: left; color: var(--ink); background: var(--bg); border: 1px solid var(--line); display: flex; flex-direction: column; padding: 28px; gap: 22px; transition: transform .3s cubic-bezier(.2, .9, .3, 1), box-shadow .3s; box-shadow: var(--shadow); font-family: var(--fb); }
.ch-panel:hover { transform: translateY(-4px); box-shadow: 0 24px 60px rgba(0, 0, 0, .22); }
.ch-panel[data-style="japan"] { border-radius: 6px; background: var(--tex), radial-gradient(600px 300px at 80% 0, var(--glow), transparent 70%), var(--bg); }
.ch-panel[data-style="classic"] { background: radial-gradient(600px 300px at 20% 0, var(--glow), transparent 70%), var(--bg); }
.ch-art { position: relative; width: min(100%, 330px); margin: 0 auto; }
.ch-art .board-frame { transform: perspective(900px) rotateX(18deg); transition: transform .4s; }
.ch-panel:hover .ch-art .board-frame { transform: perspective(900px) rotateX(8deg) translateY(-4px); }
.ch-txt small { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.ch-txt h2 { font-family: var(--fh); font-size: 32px; margin: 4px 0 6px; display: flex; align-items: center; gap: 12px; }
.ch-txt h2 span { font-family: var(--fbrush); font-size: 26px; color: var(--accent-ink); background: var(--accent); padding: 2px 8px; border-radius: 3px; transform: rotate(-4deg); }
.ch-txt p { color: var(--ink2); font-size: 14.5px; margin-bottom: 18px; max-width: 420px; }
.ch-txt .btn { pointer-events: none; }
.ch-panel .lantern { display: none; }
.ch-panel[data-style="japan"] .lantern { display: block; position: absolute; top: 18px; right: 22px; width: 34px; height: 48px; border-radius: 45%; background: radial-gradient(circle at 50% 45%, #ffcf7a, #e8853a 55%, #a8321f); box-shadow: 0 0 40px rgba(255, 170, 70, .55); }
.ch-panel[data-style="japan"] .lantern::before, .ch-panel[data-style="japan"] .lantern::after { content: ''; position: absolute; left: 30%; right: 30%; height: 5px; background: #2a1a10; border-radius: 2px; }
.ch-panel[data-style="japan"] .lantern::before { top: -3px; } .ch-panel[data-style="japan"] .lantern::after { bottom: -3px; }
.ch-panel[data-style="japan"] .lantern i { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--fbrush); font-style: normal; color: #5a1a10; font-size: 18px; }
.ch-mode { display: flex; justify-content: center; margin-top: 18px; gap: 10px; align-items: center; color: var(--muted); font-size: 12.5px; }

/* ---------- footer ---------- */
.foot { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: space-between; margin-top: 28px; padding: 14px 4px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.foot b { color: var(--ink2); }

/* ---------- mockup navigator ---------- */
.mockbar { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 99px; background: rgba(18, 18, 18, .88); color: #ededed; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-family: 'Inter', system-ui, sans-serif; max-width: calc(100vw - 24px); }
.mb-tag { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 0 8px 0 10px; color: #ababab; }
.mb-btn { width: 34px; height: 34px; border-radius: 50%; font-size: 20px; line-height: 1; color: #ededed; }
.mb-btn:hover, .mb-cur:hover { background: rgba(255, 255, 255, .1); }
.mb-cur { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 99px; color: #ededed; min-width: 0; }
.mb-cur span { font-family: ui-monospace, Consolas, monospace; color: #ababab; font-size: 12px; }
.mb-cur b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
.mb-cur i { font-style: normal; font-size: 10px; opacity: .6; }
.mb-menu { position: fixed; left: 50%; bottom: 66px; transform: translateX(-50%); z-index: 61; width: min(560px, calc(100vw - 24px)); max-height: 60vh; overflow: auto; padding: 8px; border-radius: 16px; background: rgba(18, 18, 18, .96); color: #ededed; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; font-family: 'Inter', system-ui, sans-serif; }
.mb-menu[hidden] { display: none; }
.mb-menu button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: #ededed; text-align: left; font-size: 13px; }
.mb-menu button:hover { background: rgba(255, 255, 255, .08); }
.mb-menu button.on { background: rgba(171, 171, 171, .2); }
.mb-menu button span { font-family: ui-monospace, Consolas, monospace; color: #ababab; font-size: 11.5px; width: 20px; }
.mb-menu button em { margin-left: auto; font-style: normal; font-family: serif; color: #e0705f; }

/* toasts */
.toasts { position: fixed; top: 16px; right: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { padding: 10px 14px; border-radius: var(--rs); background: var(--ink); color: var(--card); font-size: 13px; font-weight: 500; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); animation: rise .25s; max-width: 320px; }
.toast.out { opacity: 0; transform: translateY(-6px); transition: .3s; }

/* page enter */
.enter > * { animation: rise .35s cubic-bezier(.2, .9, .3, 1) both; }
.enter > *:nth-child(2) { animation-delay: .04s; }
.enter > *:nth-child(3) { animation-delay: .08s; }
.enter > *:nth-child(4) { animation-delay: .12s; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .livegrid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding: 26px 20px; }
  .feat3 { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .ch-panels { grid-template-columns: 1fr; }
  .net { display: none; }
}
@media (max-width: 560px) {
  .page { padding: 12px 16px 100px; }
  .top { gap: 8px; padding: 8px 8px 8px 10px; }
  .brand small { display: none; }
  .top .style-seg { display: none; }
  .top .btn { padding: 0 10px; }
  .ph h1 { font-size: 23px; }
  .players { grid-template-columns: 1fr; }
  .vs { text-align: center; }
  .res-hero { grid-template-columns: 1fr; justify-items: start; }
  .mb-tag { display: none; }
  .mb-menu { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .form-card { padding: 18px; }
}

/* fixes after first review */
.pcard .who .av { width: 34px; height: 34px; font-size: 13px; margin: 0; }
.live-board { max-width: min(600px, calc(100vh - 150px)); }


/* =========================================================
   Japanese style: Yoru's motion. A three.js night garden behind
   everything, ink between pages, brush-in titles, stamped seals,
   lantern flicker. English text and normal pieces throughout.
   ========================================================= */
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; opacity: 0; transition: opacity 1.2s; pointer-events: none; }
#scene.on { opacity: 1; }
#app { position: relative; z-index: 1; transition: opacity .45s, filter .45s, transform .45s; }
#app.leaving { opacity: 0; filter: blur(6px); transform: translateY(6px); }
html[data-style="japan"] body { background: var(--bg); }

/* Paper and lacquer panels floating over the garden */
[data-style="japan"][data-mode="dark"] .card { background: rgba(14, 15, 24, .6); border-color: rgba(239, 230, 210, .1); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 20px 50px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 200, 150, .05); }
[data-style="japan"][data-mode="light"] .card { background: var(--tex), rgba(250, 243, 228, .8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
[data-style="japan"] .card::before { border-color: rgba(200, 64, 47, .14); }
[data-style="japan"][data-mode="dark"] .card-h, [data-style="japan"][data-mode="dark"] .ph p { color: #b9b0a0; }
[data-style="japan"] .ph h1 { text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
[data-style="japan"][data-mode="light"] .ph h1 { text-shadow: 0 1px 14px rgba(255, 245, 230, .9); }
[data-style="japan"] .foot { border-color: rgba(200, 64, 47, .2); }
[data-style="japan"] .box, [data-style="japan"] .pcard, [data-style="japan"] .mitem, [data-style="japan"] .input, [data-style="japan"] .sum, [data-style="japan"] .hero-stats div { background: color-mix(in srgb, var(--card2) 70%, transparent); }

/* Brush-in titles (Yoru's brushIn) */
.bi { display: inline-block; opacity: 0; animation: brushIn .5s forwards; }
@keyframes brushIn { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

/* Seal-stamped moments */
[data-style="japan"] .logo { font-family: 'Segoe UI Symbol', 'DejaVu Sans', serif; font-size: 20px; }
[data-style="japan"] .badge.ok { animation: stampIn .45s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes stampIn { from { transform: scale(1.7) rotate(-8deg); opacity: 0; } }
[data-style="japan"] .res-mark { font-family: 'Segoe UI Symbol', 'DejaVu Sans', serif; font-size: 80px; color: var(--ink); animation: brushIn .7s both; }
[data-style="japan"] .seal { font-family: 'Segoe UI Symbol', 'DejaVu Sans', sans-serif; font-size: 22px; }
[data-style="japan"] .feat-ic { font-family: var(--fh); font-weight: 800; font-size: 18px; }
[data-style="japan"] .vs { font-family: var(--fh); font-weight: 800; font-size: 24px; }

/* Lantern flicker on anything live */
@keyframes flicker { 0%, 100% { opacity: 1; } 45% { opacity: .78; } 50% { opacity: .95; } 70% { opacity: .84; } }
[data-style="japan"] .badge.live::before, [data-style="japan"] .net i { animation: flicker 2.2s infinite; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
[data-style="japan"] .clock.run { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 22px rgba(217, 72, 59, .45); }

/* Pieces on the Japanese board: ivory and black lacquer with gold, same shapes */
[data-style="japan"] .pc.cl.w { color: #fff6e6; -webkit-text-stroke-color: #3a2414; }
[data-style="japan"] .pc.cl.b { color: #120c09; -webkit-text-stroke: calc(100cqw / 8 * .02) #d9a24a; }
[data-style="japan"][data-mode="dark"] .board-frame { box-shadow: 0 0 0 1px rgba(255, 180, 110, .12), 0 0 60px rgba(255, 120, 60, .18), 0 20px 50px rgba(0, 0, 0, .5); }

/* Moves: pieces slide; captures leave an ink splash */
.splash { position: absolute; inset: -20%; border-radius: 50%; pointer-events: none; z-index: 2; background: radial-gradient(circle, rgba(16, 16, 16, .55) 0 30%, rgba(16, 16, 16, .25) 45%, transparent 66%); animation: splash .85s ease-out forwards; }
[data-style="japan"] .splash { background: radial-gradient(circle, rgba(184, 50, 42, .7) 0 26%, rgba(10, 8, 6, .45) 42%, transparent 66%); }
@keyframes splash { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }

/* Sound button: shown only in the Japanese style */
.snd { display: none; font-size: 16px; }
[data-style="japan"] .snd { display: grid; }
.snd.on { color: var(--gold); border-color: var(--gold); animation: flicker 1.6s infinite; }

/* Toasts carry a seal, like Yoru */
.toast { display: flex; align-items: center; gap: 10px; }
.toast-seal { flex: none; display: grid; place-content: center; width: 28px; height: 28px; border-radius: 3px; background: var(--accent); color: var(--accent-ink); font-size: 16px; transform: rotate(-4deg); animation: stampIn .5s .15s both; }
[data-style="japan"] .toast { background: rgba(12, 12, 18, .92); color: #efe6d2; border: 1px solid rgba(239, 230, 210, .12); }

/* Chooser: the Japanese card is a little night garden */
.ch-panel[data-style="japan"][data-mode] { background: radial-gradient(500px 260px at 75% 8%, rgba(255, 150, 70, .2), transparent 70%), linear-gradient(180deg, #04050b, #151a30 70%, #0b0d18); color: #efe6d4; border-color: rgba(239, 230, 210, .12); }
.ch-panel[data-style="japan"] .ch-txt p { color: #c9bfae; }
.ch-night { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ch-night .moon { position: absolute; top: 26px; right: 40px; width: 64px; height: 64px; border-radius: 50%; background: #eaeaea; box-shadow: 0 0 60px rgba(170, 190, 255, .55); }
.ch-night .l1, .ch-night .l2, .ch-night .l3 { position: absolute; top: 0; width: 26px; height: 36px; border-radius: 45%; background: radial-gradient(circle at 50% 45%, #d3d3d3, #959595 55%, #a8321f); box-shadow: 0 0 34px rgba(181, 181, 181, .6); transform-origin: 50% -30px; animation: sway 3.4s ease-in-out infinite, flicker 2.4s infinite; }
.ch-night .l1 { left: 12%; top: 22px; } .ch-night .l2 { left: 30%; top: 34px; animation-delay: -1.2s, -.6s; } .ch-night .l3 { left: 48%; top: 26px; animation-delay: -2.1s, -1.3s; }
@keyframes sway { 50% { transform: rotate(6deg); } 0%, 100% { transform: rotate(-6deg); } }

/* Loader, from Yoru: a seal stamps down, a brush line fills */
#loader { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #07080d; color: #e6e6e6; transition: opacity .9s, visibility .9s; font-family: 'Shippori Mincho B1', serif; }
#loader[hidden] { display: none; }
#loader.done { opacity: 0; visibility: hidden; }
.loader-glow { position: absolute; left: 50%; top: 46%; width: 520px; height: 520px; transform: translate(-50%, -50%) scale(calc(.6 + var(--p, 0) * .5)); border-radius: 50%; background: radial-gradient(circle, rgba(167, 167, 167, calc(.08 + var(--p, 0) * .22)), transparent 62%); pointer-events: none; }
.loader-seal { position: relative; display: grid; place-content: center; width: 92px; height: 92px; border-radius: 6px; background: #c8402f; color: #e6e6e6; font-family: 'Segoe UI Symbol', 'DejaVu Sans', serif; font-size: 3.2rem; line-height: 1; transform: rotate(-4deg); box-shadow: 0 0 0 1px rgba(225, 225, 225, .2) inset, 0 18px 50px rgba(200, 64, 47, .35); animation: loaderStamp .9s cubic-bezier(.2, .9, .25, 1.2) both; }
@keyframes loaderStamp { 0% { opacity: 0; transform: scale(1.9) rotate(-14deg); filter: blur(6px); } 60% { opacity: 1; filter: blur(0); } 100% { opacity: 1; transform: rotate(-4deg); } }
.loader-name { margin-top: 1.4rem; font-weight: 700; font-size: 1.5rem; letter-spacing: .32em; padding-left: .32em; animation: loaderFade 1s .5s both; }
.loader-line { position: relative; width: 180px; height: 2px; margin-top: 1.1rem; background: rgba(230, 230, 230, .12); border-radius: 2px; overflow: hidden; animation: loaderFade 1s .7s both; }
.loader-line span { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, #c8402f, #adadad); box-shadow: 0 0 10px #9d9d9d; transition: transform .25s linear; }
.loader-label { margin-top: .9rem; font-style: italic; font-size: .95rem; letter-spacing: .04em; color: rgba(230, 230, 230, .6); animation: loaderFade 1s .9s both, loaderBreathe 2.4s 1.9s ease-in-out infinite; }
@keyframes loaderFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes loaderBreathe { 50% { opacity: .55; } }

@media (prefers-reduced-motion: reduce) {
  .bi, .ch-night i, .badge.ok, .toast-seal, .loader-seal { animation: none !important; opacity: 1; }
}

/* =========================================================
   Token and network marks, settings, and the phone pass
   ========================================================= */
.tk { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -.22em; margin-right: .32em; flex: none; }
.amt { white-space: nowrap; }
.net .tk { margin-right: 0; width: 15px; height: 15px; }
.seg button { display: inline-flex; align-items: center; justify-content: center; }
.seg button .tk { width: 14px; height: 14px; margin-right: 5px; }
.chip { display: inline-flex; align-items: center; }
.chip .tk { width: 14px; height: 14px; }
.hero-stats b .tk { width: .8em; height: .8em; vertical-align: -.05em; }
.payout { display: flex; align-items: center; gap: 10px; }
.payout .tk { width: .8em; height: .8em; margin: 0; }
.pill .tk { margin-right: 2px; }
.steps li .tk { margin: 0 -4px 0 0; }
.foot .tk { width: 14px; height: 14px; margin: 0; }

/* Settings: the two styles as live previews */
.ss-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.ss { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 12px; text-align: left; border-radius: var(--r); border: 1px solid var(--line); background: var(--bg); color: var(--ink); overflow: hidden; transition: border-color .2s, box-shadow .2s, transform .2s; font-family: var(--fb); }
.ss:hover { transform: translateY(-2px); }
.ss.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.ss[data-style="japan"] { background: radial-gradient(260px 140px at 80% 0, rgba(255, 150, 70, .22), transparent 70%), linear-gradient(180deg, #04050b, #151a30 80%); color: #efe6d4; border-color: rgba(239, 230, 210, .14); }
.ss[data-style="japan"].on { border-color: #d9483b; box-shadow: 0 0 0 2px #d9483b; }
.ss-art { position: relative; display: block; padding: 6px 10px 0; }
.ss-art .board-frame { padding: 6px; transform: perspective(600px) rotateX(16deg); }
.ss .ch-night .moon { width: 30px; height: 30px; top: 8px; right: 10px; }
.ss .ch-night .l1, .ss .ch-night .l2 { width: 14px; height: 19px; top: 4px; }
.ss-txt b { display: block; font-family: var(--fh); font-size: 16px; }
.ss-txt small { display: block; font-size: 12px; opacity: .7; }
.ss-check { position: absolute; top: 10px; left: 10px; width: 24px; height: 24px; border-radius: 50%; display: none; place-items: center; background: var(--accent); color: var(--accent-ink); z-index: 2; }
.ss[data-style="japan"] .ss-check { background: #d9483b; color: #fff; }
.ss.on .ss-check { display: grid; }
.ss-check svg { width: 14px; height: 14px; }
.setrow .seg { flex: none; }

/* ---------- tablets ---------- */
@media (max-width: 1024px) {
  .hero { gap: 24px; padding: 32px; }
  .top .net { display: none; }
}
@media (max-width: 820px) {
  .hero-r { order: -1; }
  .hero-board { max-width: 340px; }
  .ch-panel { padding: 22px; }
  .ch-art { width: min(100%, 280px); }
  .live-board { max-width: 560px; }
}

/* ---------- phones ---------- */
@media (max-width: 560px) {
  body { font-size: 13.5px; }
  .top .mode-btn { display: none; }
  .top-r { gap: 6px; }
  .icon-btn { width: 32px; height: 32px; }
  .brand b { font-size: 15.5px; }
  .logo { width: 30px; height: 30px; font-size: 17px; }
  .ph { margin-bottom: 14px; }
  .ph p { font-size: 13px; }
  .hero { padding: 20px 16px; gap: 18px; }
  .hero-board { max-width: 100%; }
  .display { font-size: 31px; margin: 10px 0; }
  .lead { font-size: 14px; margin-bottom: 18px; }
  .hero .row .btn { flex: 1; }
  .hero-stats { gap: 6px; }
  .hero-stats b { font-size: 16px; }
  .feat3 { gap: 12px; margin-top: 12px; }
  .seg.full button { padding: 0 6px; }
  .seg { max-width: 100%; }
  .setrow { flex-wrap: wrap; }
  .setrow > .seg, .setrow > select { margin-left: auto; }
  .idbox b { font-size: 18px; }
  .idbox { flex-wrap: wrap; }
  .pcard { padding: 14px; }
  .row > .btn { flex: 1 1 auto; }
  .row > .sp { display: none; }
  .wallet-chip { flex-wrap: wrap; row-gap: 4px; }
  .mitem { padding: 10px 12px; gap: 10px; }
  .mitem .badge { font-size: 10.5px; padding: 3px 7px; }
  .board-frame { padding: 7px; }
  [data-style="japan"] .board-frame { padding: 8px; }
  .livegrid .card:first-child { padding: 10px; }
  .live-board { max-width: 100%; }
  .pbar { padding: 8px 0; }
  .clock { font-size: 17px; min-width: 78px; padding: 5px 10px; }
  .res-hero { gap: 14px; }
  .res-mark { width: 84px; height: 84px; font-size: 46px; }
  [data-style="japan"] .res-mark { font-size: 64px; }
  .res-hero h2 { font-size: 23px; }
  .payout { font-size: 30px; }
  .kv { font-size: 12.5px; }
  .ss-grid { gap: 8px; }
  .ss { padding: 8px; }
  .ss-art { padding: 4px 4px 0; }
  .ss-txt b { font-size: 14px; }
  .chooser { padding: 20px 16px 100px; }
  .ch-head { margin-bottom: 20px; }
  .ch-head p { font-size: 14px; }
  .ch-panels { gap: 14px; }
  .ch-panel { padding: 18px; gap: 16px; }
  .ch-txt h2 { font-size: 26px; }
  .ch-txt p { font-size: 13.5px; margin-bottom: 14px; }
  .ch-night .moon { width: 46px; height: 46px; top: 18px; right: 22px; }
  .foot { flex-direction: column; gap: 6px; font-size: 11.5px; }
  .toasts { left: 12px; right: 12px; top: 12px; align-items: stretch; }
  .toast { max-width: none; }
  .modal-bg { align-items: end; padding: 0; }
  .modal { max-width: none; border-radius: 16px 16px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .mockbar { bottom: max(10px, env(safe-area-inset-bottom)); }
  .mb-cur b { max-width: 38vw; }
}
@media (max-width: 380px) {
  .brand small, .brand b { display: none; }
  .ss-grid { grid-template-columns: 1fr; }
}
/* Phones held sideways: keep the board inside the screen */
@media (max-height: 520px) and (orientation: landscape) {
  .live-board { max-width: min(420px, calc(100vh - 110px)); }
  .chooser { padding-top: 14px; }
  .ch-panels { grid-template-columns: 1fr 1fr; }
  .ch-art { width: min(100%, 200px); }
  .hero-r { order: 0; }
}
@media (max-width: 560px) { .startbox > div { flex-basis: 100%; } .startbox .btn { flex: 1; } }
[data-mode="dark"] .tk rect[fill="#0b0b0b"], [data-mode="dark"] .tk circle[fill="#111"] { fill: #2b2b30; }
[data-mode="dark"] .tk rect[stroke] { stroke-opacity: .4; }
.brand b { white-space: nowrap; }
@media (max-width: 560px) { .brand b { font-size: 15px; } }


/* =========================================================
   v4: Classic first. Grey call-to-action buttons, the sticker
   logo, real avatars, flags, Privy sign-in, bigger stakes.
   ========================================================= */
[data-style="classic"][data-mode="light"] { --accent: #4a4d55; --accent-ink: #ffffff; --accent-soft: #ebebee; }
[data-style="classic"][data-mode="dark"] { --accent: #c7cad1; --accent-ink: #15161a; --accent-soft: #26272c; }
[data-style="classic"] .btn.pri { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent)); box-shadow: 0 1px 0 rgba(0, 0, 0, .15), 0 6px 16px -8px rgba(30, 32, 38, .55), inset 0 1px 0 rgba(255, 255, 255, .14); }
[data-style="classic"][data-mode="dark"] .btn.pri { background: linear-gradient(180deg, #e2e4e8, #b9bcc4); box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .6); }
[data-style="classic"] .seg button.on { background: var(--accent); color: var(--accent-ink); box-shadow: none; }

/* sticker logo */
.logo-img { width: 44px; height: auto; flex: none; filter: drop-shadow(0 3px 5px rgba(27, 27, 27, .25)); transform: rotate(-4deg); transition: transform .3s; }
.brand:hover .logo-img { transform: rotate(0) scale(1.06); }
.hero-board { position: relative; }
.hero-sticker { position: absolute; z-index: 3; width: 128px; left: -46px; top: -40px; transform: rotate(-10deg); filter: drop-shadow(0 10px 18px rgba(20, 20, 20, .35)); animation: stickIn .7s .25s cubic-bezier(.3, 1.5, .5, 1) both; pointer-events: none; }
@keyframes stickIn { from { opacity: 0; transform: rotate(-30deg) scale(1.6); } }
.auth { text-align: center; padding: 30px 26px 26px; }
.auth-logo { width: 150px; margin: -6px auto 10px; display: block; filter: drop-shadow(0 8px 16px rgba(20, 20, 20, .25)); transform: rotate(-3deg); }
.auth h2 { font-family: var(--fh); font-size: 24px; margin-bottom: 4px; }
.auth > .muted { margin-bottom: 20px; }
.auth .btn .tk { width: 20px; height: 20px; margin-right: 2px; }
.loader-logo { width: 120px; position: relative; filter: drop-shadow(0 18px 40px rgba(200, 64, 47, .35)); animation: loaderStamp .9s cubic-bezier(.2, .9, .25, 1.2) both; }

/* real avatars */
img.av { display: block; flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--card2); box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--line); }
img.av.sm { width: 24px; height: 24px; box-shadow: 0 0 0 1.5px var(--card), 0 0 0 2.5px var(--line); }
img.av.lg { width: 64px; height: 64px; margin: 0 auto 10px; }
.who img.av.lg { margin: 0; }
img.av.xl { width: 88px; height: 88px; }
.pcard .who img.av { width: 40px; height: 40px; margin: 0; }
.ghost-av { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: var(--muted); background: var(--line); animation: pulse 1.6s infinite; }
.res-mark img.av.xl { width: 100%; height: 100%; box-shadow: none; }
.me-chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 5px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 12.5px; color: var(--ink); }
.me-chip:hover { background: var(--card2); }
.me-chip img.av.sm { box-shadow: none; }
.flag { display: inline-block; width: 18px; height: 13px; border-radius: 2px; object-fit: cover; vertical-align: -1px; margin-right: 5px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }
b .flag { margin: 0 0 0 4px; }

/* lists and cards */
.mi-txt { min-width: 0; }
.mi-txt small { display: flex; align-items: center; flex-wrap: wrap; }
.mi-r { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mi-r .amt { display: inline-flex; align-items: center; font-size: 14px; }
.mi-r .badge { margin: 0; }
.pcard.left { text-align: left; }
.backlink { gap: 6px; font-size: 13px; width: max-content; margin-bottom: 4px; }
.wallet-chip { margin-top: 12px; color: var(--ink); background: var(--card2); border: 1px solid var(--line); }
.wallet-chip .wc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.wallet-chip .mono { color: var(--muted); }
.wallet-chip .bal { display: inline-flex; align-items: center; font-weight: 700; }

/* stakes */
.stake-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stake-grid button { height: 46px; border-radius: var(--rs); border: 1px solid var(--line); background: var(--card2); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; transition: border-color .15s, background .15s, transform .1s; }
.stake-grid button:hover { border-color: var(--accent); }
.stake-grid button:active { transform: translateY(1px); }
.stake-grid button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.at-wrap { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 0 0 12px; border-radius: var(--rs); border: 1px solid var(--line); background: var(--card2); }
.at-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.at-wrap > b { color: var(--muted); }
.at-wrap .tk { margin: 0; }
.at-wrap .input { border: 0; background: none; box-shadow: none !important; padding-left: 0; height: 38px; }
.note.ok { color: var(--good); }

/* onboarding */
.ob { max-width: 540px; }
.ob-top { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.ob-top b { display: block; font-size: 15px; }
.ob-top small { color: var(--muted); }
.av-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 10px; }
.av-pick { aspect-ratio: 1; border-radius: 50%; padding: 0; overflow: hidden; background: var(--card2); box-shadow: 0 0 0 1px var(--line); transition: transform .15s, box-shadow .15s; }
.av-pick img { width: 100%; height: 100%; display: block; }
.av-pick:hover { transform: scale(1.06); }
.av-pick.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.ob-actions { margin-bottom: 16px; }
.ob-actions .btn { flex: 0 0 auto; }

/* country picker */
.cp { position: relative; }
.cp-btn { display: flex; align-items: center; gap: 4px; text-align: left; cursor: pointer; }
.cp-btn span { flex: 1; }
.cp-btn i { font-style: normal; color: var(--muted); font-size: 11px; }
.cp-pop { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); padding: 8px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0, 0, 0, .18); }
.cp-pop[hidden] { display: none; }
.cp-list { max-height: 240px; overflow-y: auto; margin-top: 6px; }
.cp-list button { display: flex; width: 100%; align-items: center; gap: 4px; padding: 8px 10px; border-radius: var(--rs); text-align: left; font-size: 13px; }
.cp-list button:hover, .cp-list button.on { background: var(--card2); }
.cp-list button.on { font-weight: 700; }

/* Privy's sign-in window (stand-in; the real one comes from the Privy SDK) */
.privy-bg { z-index: 90; }
.modal.privy { position: relative; max-width: 380px; padding: 0; border-radius: 22px; background: #fff; color: #111; border: 0; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); overflow: hidden; font-family: 'Inter', system-ui, sans-serif; animation: rise .25s cubic-bezier(.2, .9, .3, 1.2); }
.modal.privy::before { display: none; }
.modal.privy .x { position: absolute; top: 12px; right: 12px; color: #666; }
.privy-body { padding: 34px 26px 18px; text-align: center; min-height: 230px; }
.privy-logo { width: 74px; margin: 0 auto 10px; display: block; }
.privy-body h3 { font-size: 17px; font-weight: 600; margin-bottom: 16px; }
.privy-sub { color: #666; font-size: 13px; margin: -8px 0 16px; }
.privy-in { display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 6px 0 14px; border: 1px solid #e3e3e8; border-radius: 14px; text-align: left; }
.privy-in:focus-within { border-color: #676fff; box-shadow: 0 0 0 3px rgba(103, 111, 255, .15); }
.privy-in .pi-ic svg { width: 18px; height: 18px; color: #888; }
.privy-in input { flex: 1; border: 0; outline: none; font-size: 14px; background: none; color: #111; min-width: 0; }
.privy-in button { height: 38px; padding: 0 14px; border-radius: 10px; background: #f1f1f4; font-weight: 600; font-size: 13px; color: #333; }
.privy-in button:hover { background: #e7e7ee; }
.otp { display: flex; justify-content: center; gap: 8px; }
.otp span { width: 40px; height: 48px; display: grid; place-items: center; border: 1px solid #e3e3e8; border-radius: 10px; font-size: 20px; font-weight: 600; animation: rise .3s both; }
.otp span:nth-child(2) { animation-delay: .05s; } .otp span:nth-child(3) { animation-delay: .1s; } .otp span:nth-child(4) { animation-delay: .15s; } .otp span:nth-child(5) { animation-delay: .2s; } .otp span:nth-child(6) { animation-delay: .25s; }
.privy-wait { padding-top: 40px; }
.privy-wait .spin { width: 28px; height: 28px; border-width: 3px; color: #676fff; margin-bottom: 14px; }
.privy-foot { padding: 12px; border-top: 1px solid #f0f0f3; text-align: center; font-size: 12px; color: #888; }
.privy-foot b { color: #111; letter-spacing: -.02em; }

@media (max-width: 560px) {
  .logo-img { width: 38px; }
  .hero-sticker { width: 96px; left: -8px; top: -30px; }
  .av-grid { grid-template-columns: repeat(4, 1fr); }
  .stake-grid button { height: 44px; font-size: 14px; }
  .me-chip span { display: none; }
  .me-chip { padding: 0 3px; }
  .mi-r .amt { font-size: 13px; }
  img.av.xl { width: 72px; height: 72px; }
  .modal.privy { border-radius: 22px 22px 0 0; max-width: none; }
}

.field > .at-wrap { display: flex; margin-bottom: 0; font-size: inherit; font-weight: 400; color: var(--ink); }
.field > .at-wrap > b { color: var(--muted); font-weight: 600; }

@media (max-width: 560px) { .startbox > div { flex: 1 1 100% !important; } }


/* ---------- v5: move checks, USDC, tournaments ---------- */
.feat4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .feat4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feat4 { grid-template-columns: 1fr; } }
.chip .tk { width: 14px; height: 14px; }
.tape { border: 1px solid var(--line); border-radius: var(--rs); padding: 10px 12px 8px; background: var(--card2); }
.tape-h { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.tape-h .tk { width: 18px; height: 18px; margin: 0; color: var(--ink); }
.tape-h .badge { margin-left: auto; }
.tape .kv { padding: 7px 0; }
.tape-st { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 8px 10px; border-radius: var(--rs); background: var(--good-soft); color: var(--good); font-size: 12px; font-weight: 600; }
.tape-st svg { width: 14px; height: 14px; flex: none; }
.tape-st.busy { background: var(--warn-soft); color: var(--warn); }
.tape-st .spin { width: 12px; height: 12px; }
.moves .vf { font-style: normal; color: var(--good); font-size: 10px; margin-left: 4px; font-weight: 700; }
.good-t { color: var(--good); }
.proof .kv b { font-size: 12.5px; }
.t-ic { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.t-ic svg { width: 18px; height: 18px; }
.titem .mi-txt b { display: block; font-size: 14px; }
.titem .mi-txt small .tk { width: 13px; height: 13px; margin: 0 3px 0 4px; }
.titem.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.bk { display: grid; grid-template-columns: 1.15fr 1fr .9fr; gap: 10px; align-items: center; }
.bk-col { display: flex; flex-direction: column; justify-content: space-around; gap: 8px; height: 100%; }
.bk-col > small { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.bk-m { border: 1px solid var(--line); border-radius: var(--rs); overflow: hidden; background: var(--card); }
.bk-p { display: flex; align-items: center; gap: 5px; padding: 5px 7px; font-size: 11.5px; min-width: 0; }
.bk-p + .bk-p { border-top: 1px solid var(--line); }
.bk-p span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-p .flag { width: 14px; height: 10px; margin: 0; }
.bk-p b { width: 14px; text-align: right; color: var(--muted); }
.bk-p.win { font-weight: 700; }
.bk-p.win b { color: var(--good); }
.bk-p img.av.sm { width: 18px; height: 18px; box-shadow: none; }
.bk-tbd .bk-p { color: var(--muted); font-style: italic; }
@media (max-width: 560px) {
  .bk { grid-template-columns: 1fr; }
  .bk-col { height: auto; }
}


/* ---------- v6: live two-player play ---------- */
.net.srv-off i { background: var(--muted); box-shadow: none; }
.off-t { color: var(--bad); font-weight: 600; }
.mitem.joinable { cursor: pointer; }
.mitem.joinable:hover .badge { background: var(--accent); color: var(--accent-ink); }
.status-line { flex-wrap: wrap; min-height: 34px; }
.status-line .btn { height: 30px; }
#live-board { position: relative; }
.promo { position: absolute; inset: 0; z-index: 5; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 10px; padding: 20px; background: rgba(12, 12, 12, .62); backdrop-filter: blur(2px); border-radius: 4px; container-type: inline-size; }
.promo p { width: 100%; text-align: center; color: #fff; font-weight: 600; margin-bottom: 4px; }
.promo button[data-promo]:not(.promo-x) { width: 19%; aspect-ratio: 1; border-radius: 12px; background: var(--sq-l); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); transition: transform .12s; }
.promo button[data-promo]:not(.promo-x):hover { transform: scale(1.07); }
.promo .pc.cl { font-size: 13cqw; }
.promo-x { width: 100%; color: #fff; text-decoration: underline; font-size: 13px; margin-top: 4px; }


/* =========================================================
   v7: button colour #282828, dynamic island, win/lose effects
   ========================================================= */
[data-style="classic"][data-mode="light"] { --accent: #282828; --accent-ink: #eeeeee; --accent-soft: #e5e5e5; }
[data-style="classic"][data-mode="dark"] { --accent: #282828; --accent-ink: #eeeeee; --accent-soft: #212121; }
[data-style="classic"] .btn.pri { background: linear-gradient(180deg, #4f4f4f, #282828); color: #eeeeee; box-shadow: 0 1px 0 rgba(0, 0, 0, .18), 0 8px 18px -10px rgba(40, 40, 40, .8), inset 0 1px 0 rgba(255, 255, 255, .12); }
[data-style="classic"][data-mode="dark"] .btn.pri { background: linear-gradient(180deg, #4f4f4f, #282828); box-shadow: inset 0 0 0 1px rgba(240, 240, 240, .2), inset 0 1px 0 rgba(255, 255, 255, .14), 0 8px 22px -12px rgba(0, 0, 0, .9); }
[data-style="classic"][data-mode="dark"] .seg button.on, [data-style="classic"][data-mode="dark"] .stake-grid button.on { box-shadow: inset 0 0 0 1px rgba(240, 240, 240, .22); }
[data-style="classic"][data-mode="dark"] a { color: #c0c0c0; }

/* dynamic island */
.island {
  position: fixed; z-index: 75; left: 50%; top: 27px; transform: translateX(-50%);
  height: 40px; width: 160px; max-width: calc(100vw - 24px); padding: 0 15px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer;
  color: #f4f4f4; font: 600 13px/1 'Inter', system-ui, sans-serif;
  background: linear-gradient(180deg, rgba(51, 51, 51, .58), rgba(17, 17, 17, .74));
  -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 12px 34px -8px rgba(11, 11, 11, .45), inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 -1px 0 rgba(0, 0, 0, .25);
  transition: width .55s cubic-bezier(.2, .95, .25, 1.18), height .45s cubic-bezier(.2, .95, .25, 1.18), top .3s, background .4s, box-shadow .4s;
  user-select: none; -webkit-user-select: none;
}
.island:hover { box-shadow: 0 14px 38px -8px rgba(11, 11, 11, .55), inset 0 1px 0 rgba(255, 255, 255, .24), 0 0 0 4px rgba(255, 255, 255, .06); }
.island:active { transform: translateX(-50%) scale(.97); }
.isl-c { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; animation: islIn .4s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes islIn { from { opacity: 0; filter: blur(5px); transform: scale(.9); } }
.island .tk { width: 16px; height: 16px; margin: 0; }
.island img.av.sm { width: 24px; height: 24px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .5); }
.isl-dot { width: 7px; height: 7px; border-radius: 50%; background: #7ee08f; box-shadow: 0 0 10px #7ee08f; }
.isl-dot.off { background: #999999; box-shadow: none; }
.isl-dot.pulse { background: #c3c3c3; box-shadow: 0 0 10px #c3c3c3; animation: pulse 1.2s infinite; }
.isl-dim { color: rgba(244, 244, 244, .62); font-weight: 600; }
.isl-clk { font-size: 13.5px; letter-spacing: .02em; color: rgba(244, 244, 244, .7); }
.isl-turn { font-size: 12px; color: rgba(244, 244, 244, .85); }
.island.live.mine { background: linear-gradient(180deg, rgba(69, 69, 69, .7), rgba(28, 28, 28, .82)); box-shadow: 0 12px 34px -8px rgba(30, 60, 25, .55), inset 0 1px 0 rgba(255, 255, 255, .22), 0 0 0 1px rgba(126, 224, 143, .25); }
.island.live.mine .isl-clk:first-of-type { color: #fff; }
.isl-ic { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .14); font-size: 13px; }
.isl-ic svg { width: 13px; height: 13px; }
.isl-msg { max-width: calc(100vw - 110px); overflow: hidden; text-overflow: ellipsis; }
.island.note { height: 48px; font-size: 13.5px; }
.island.note.win, .island.over.won { background: linear-gradient(180deg, rgba(82, 82, 82, .78), rgba(37, 37, 37, .86)); }
.island.note.win .isl-ic, .island.over.won .isl-ic { background: #bababa; color: #282828; }
.island.note.lose, .island.over.lost { background: linear-gradient(180deg, rgba(70, 40, 38, .74), rgba(30, 18, 17, .86)); }
.island.note.lose .isl-ic, .island.over.lost .isl-ic { background: rgba(255, 255, 255, .2); }
.island.over { height: 44px; }
.isl-up { color: #9ff0a9; }
.isl-down { color: #ff9c8f; }
.top { padding-left: 14px; }
@media (max-width: 1024px) { .island { top: 26px; } }
@media (max-width: 560px) {
  .island { top: max(19px, env(safe-area-inset-top)); height: 36px; font-size: 12.5px; padding: 0 12px; }
  .island.note { height: 44px; }
  .isl-turn { display: none; }
  .brand > span { display: none; }
}

/* win: Victory ribbon; lose: Defeat ribbon and the screen drains to grey */
#fx { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 96; pointer-events: none; }
.ribbon-banner { position: fixed; inset: 0; z-index: 97; display: grid; place-items: center; pointer-events: none; }
.ribbon-banner .rb { position: relative; padding: 16px 64px 14px; text-align: center; color: #fff; animation: rbIn .7s cubic-bezier(.2, 1.4, .4, 1) both; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); }
.ribbon-banner .rb::before, .ribbon-banner .rb::after { content: ''; position: absolute; top: 14px; width: 54px; height: 100%; z-index: -2; }
.ribbon-banner .rb::before { left: -46px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 26% 50%); }
.ribbon-banner .rb::after { right: -46px; clip-path: polygon(0 0, 100% 0, 74% 50%, 100% 100%, 0 100%); }
.ribbon-banner .rb b { display: block; font: 700 clamp(34px, 7vw, 64px)/1 var(--fh); letter-spacing: .04em; text-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.ribbon-banner .rb small { display: block; margin-top: 8px; font: 600 14px 'Inter', sans-serif; opacity: .9; letter-spacing: .02em; }
.ribbon-banner .rb { background: linear-gradient(180deg, #434343, #282828); border-top: 3px solid #bababa; border-bottom: 3px solid #bababa; }
.ribbon-banner.win .rb::before, .ribbon-banner.win .rb::after { background: #222222; }
.ribbon-banner.win .rb b { background: linear-gradient(180deg, #f1f1f1, #bababa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ribbon-banner.lose .rb { background: linear-gradient(180deg, #515151, #363636); border-color: #848484; }
.ribbon-banner.lose .rb::before, .ribbon-banner.lose .rb::after { background: #272727; }
.ribbon-banner.draw .rb { background: linear-gradient(180deg, #636363, #464646); border-color: #ababab; }
.ribbon-banner.draw .rb::before, .ribbon-banner.draw .rb::after { background: #353535; }
.ribbon-banner.out .rb { animation: rbOut .55s ease-in forwards; }
@keyframes rbIn { 0% { opacity: 0; transform: scale(.3) rotate(-8deg); } 60% { opacity: 1; transform: scale(1.08) rotate(1deg); } 100% { transform: scale(1) rotate(-2deg); } }
@keyframes rbOut { to { opacity: 0; transform: scale(1.15) translateY(-30px) rotate(-2deg); } }
body.defeat #app { filter: grayscale(.95) brightness(.9); transition: filter .7s ease; }
#app { transition: filter 1.2s ease; }
body.defeat::after { content: ''; position: fixed; inset: 0; z-index: 94; pointer-events: none; background: radial-gradient(ellipse at center, transparent 40%, rgba(17, 17, 17, .55)); animation: fadeIn .6s both; }
@keyframes fadeIn { from { opacity: 0; } }
@media (max-width: 560px) { .ribbon-banner .rb { padding: 12px 40px 10px; } .ribbon-banner .rb::before { left: -34px; width: 40px; } .ribbon-banner .rb::after { right: -34px; width: 40px; } }


/* =========================================================
   v8: landing slides, stake entry, match room, chat, intro film
   ========================================================= */
.page { padding-bottom: 96px; }
.mockbar, .mb-menu, .ph { display: none !important; }

/* built on 0G */
.powered { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 8px; border-radius: 99px; border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 80%, transparent); color: var(--ink2) !important; font-size: 12px; text-decoration: none !important; transition: border-color .2s, transform .2s; }
.powered:hover { border-color: var(--accent); transform: translateY(-1px); }
.powered > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.powered b { color: var(--ink); }
.powered .tk { width: 18px; height: 18px; margin: 0; }
.powered > span:first-child .tk { color: var(--ink); }
.powered > i { width: 1px; height: 14px; background: var(--line); }
.foot .powered { padding: 4px 10px 4px 6px; }

/* hero: sliding headlines */
.hero2 .hero-l { min-width: 0; }
.hero2 .powered { margin-bottom: 16px; }
.rot { display: grid; }
.rot-s { grid-area: 1 / 1; pointer-events: none; visibility: hidden; }
.rot-s.on { pointer-events: auto; visibility: visible; }
.rot-s .display { margin: 12px 0; }
.rot-s .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; }
.rot-s .w > span { display: inline-block; transform: translateY(105%); opacity: 0; }
.rot-s.on .w > span { animation: wordUp .8s cubic-bezier(.2, .9, .25, 1) both; animation-delay: calc(var(--w) * 70ms); }
.rot-s.out { visibility: visible; }
.rot-s.out .w > span { animation: wordOut .5s cubic-bezier(.5, 0, .75, 0) both; animation-delay: calc(var(--w) * 30ms); }
.rot-s .eyebrow, .rot-s .lead { opacity: 0; }
.rot-s.on .eyebrow { animation: slideIn .6s .05s cubic-bezier(.2, .9, .25, 1) both; }
.rot-s.on .lead { animation: slideIn .7s .35s cubic-bezier(.2, .9, .25, 1) both; }
.rot-s.out .eyebrow, .rot-s.out .lead { animation: fadeOut .35s both; }
@keyframes wordUp { from { transform: translateY(105%) rotate(4deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes wordOut { from { transform: none; opacity: 1; } to { transform: translateY(-105%); opacity: 0; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-18px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
.rot-dots { display: flex; gap: 6px; margin: 0 0 20px; }
.rot-dots button { width: 26px; height: 18px; display: grid; align-items: center; padding: 0; transition: width .3s; }
.rot-dots i { display: block; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; position: relative; }
.rot-dots button.on { width: 46px; }
.rot-dots button.on i::after { content: ''; position: absolute; inset: 0; background: var(--accent); transform-origin: left; animation: dotFill 4.4s linear both; }
[data-mode="dark"] .rot-dots button.on i::after { background: var(--gold); }
@keyframes dotFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero2 .row .btn svg { transition: transform .2s; }
.hero2 .row .btn:hover svg { transform: translateX(3px); }

/* floating cards around the hero board */
.hb-float { position: absolute; z-index: 4; display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border-radius: 14px; background: color-mix(in srgb, var(--card) 88%, transparent); border: 1px solid var(--line); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 12px; white-space: nowrap; animation: floatIn .7s cubic-bezier(.2, 1.3, .4, 1) both, bob 5s ease-in-out infinite; }
.hb-float b { display: block; font-size: 12px; line-height: 1.2; }
.hb-float small { display: block; color: var(--muted); font-size: 11px; }
.hb-float > svg { width: 22px; height: 22px; color: var(--gold); }
.hb-float img.av.sm { width: 28px; height: 28px; box-shadow: none; }
.hb-float.f1 { right: -26px; top: 14%; animation-delay: .9s, 1.6s; }
.hb-float.f2 { left: -34px; bottom: 26%; animation-delay: 1.3s, 2.2s; }
.hb-float.f3 { right: -14px; bottom: -14px; animation-delay: 1.7s, 2.8s; }
.hb-ok { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--good); color: #fff; }
.hb-ok svg { width: 13px; height: 13px; }
@keyframes floatIn { from { opacity: 0; transform: translateY(14px) scale(.85); } }
@keyframes bob { 50% { translate: 0 -7px; } }

/* how it works: four connected steps */
.how { margin-top: 22px; }
.how-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 0 4px 16px; }
.how-h h3 { font-family: var(--fh); font-size: clamp(20px, 2.6vw, 28px); line-height: 1.2; margin-top: 6px; }
.how-h .btn svg { width: 12px; height: 12px; }
.flow { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.flow::before { content: ''; position: absolute; left: 6%; right: 6%; top: 47px; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px); }
.flow::after { content: ''; position: absolute; top: 43px; left: 6%; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px color-mix(in srgb, var(--gold) 25%, transparent), 0 0 18px var(--gold); animation: travel 5s cubic-bezier(.6, 0, .4, 1) infinite; }
@keyframes travel { 0% { left: 6%; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { left: 93%; opacity: 0; } }
.fstep { position: relative; z-index: 1; padding: 20px 18px 18px; border-radius: calc(var(--r) + 4px); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .3s cubic-bezier(.2, .9, .3, 1.3), box-shadow .3s, border-color .3s; animation: rise .7s cubic-bezier(.2, .9, .25, 1) both; animation-delay: calc(.15s + var(--i) * .12s); overflow: hidden; }
.fstep::after { content: ''; position: absolute; inset: auto -30% -60% auto; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 70%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.fstep:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: 0 22px 40px -18px rgba(0, 0, 0, .35); }
.fstep:hover::after { opacity: 1; }
.fs-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.fs-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(180deg, #4f4f4f, #282828); color: #eeeeee; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .15); transition: transform .4s cubic-bezier(.2, 1.4, .4, 1); }
[data-style="japan"] .fs-ic { background: var(--accent); color: var(--accent-ink); border-radius: 4px; }
.fstep:hover .fs-ic { transform: rotate(-8deg) scale(1.08); }
.fs-ic svg, .fs-ic .tk { width: 26px; height: 26px; margin: 0; color: currentColor; }
.glyph-ic { font-size: 30px; line-height: 1; font-family: 'Segoe UI Symbol', 'DejaVu Sans', serif; }
.fs-n { font-family: var(--fh); font-size: 44px; font-weight: 700; line-height: 1; color: transparent; -webkit-text-stroke: 1.2px color-mix(in srgb, var(--ink) 30%, transparent); }
.fstep h4 { font-family: var(--fh); font-size: 19px; margin-bottom: 6px; }
.fstep p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.fs-tag { display: inline-block; margin-top: 14px; font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 4px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--ink2); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

.feat-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.fb { display: flex; align-items: center; gap: 14px; color: var(--ink) !important; text-decoration: none !important; cursor: pointer; transition: transform .25s, border-color .25s; padding: 16px 18px; }
.fb:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.fb-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--ink); }
.fb-ic svg { width: 20px; height: 20px; }
.fb b { display: block; font-size: 14px; }
.fb small { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 2px; }
.fb-go { margin-left: auto; flex: none; color: var(--muted); transition: transform .2s; }
.fb-go svg { width: 16px; height: 16px; }
.fb:hover .fb-go { transform: translateX(4px); color: var(--ink); }
@media (max-width: 1024px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } .flow::before, .flow::after { display: none; } }
@media (max-width: 820px) { .feat-band { grid-template-columns: 1fr; } .hb-float.f1 { right: -6px; } .hb-float.f2 { left: -6px; } .hb-float.f3 { right: 4px; } }
@media (max-width: 560px) {
  .flow { grid-template-columns: 1fr; gap: 12px; }
  .flow::before { display: block; left: 43px; right: auto; top: 30px; bottom: 30px; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--line) 0 8px, transparent 8px 14px); }
  .fstep { display: grid; grid-template-columns: 54px 1fr; column-gap: 14px; padding: 16px; }
  .fs-top { grid-row: span 3; flex-direction: column; justify-content: flex-start; gap: 6px; margin: 0; }
  .fs-n { font-size: 22px; }
  .fstep h4 { font-size: 17px; }
  .fs-tag { justify-self: start; margin-top: 10px; }
  .hb-float { font-size: 11px; padding: 6px 10px 6px 6px; }
  .hb-float.f2 { display: none; }
  .powered { font-size: 11px; gap: 7px; }
  .rot-dots { margin-bottom: 16px; }
}

/* stake entry */
.stk { margin-top: 16px; padding: 16px; border-radius: calc(var(--r) + 2px); border: 1px solid var(--line); background: linear-gradient(180deg, var(--card2), var(--card)); }
.stk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 600; color: var(--ink2); }
.stk-top .seg .tk { width: 14px; height: 14px; margin-right: 4px; }
.stk-main { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; }
.stk-step { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--card); color: var(--ink); transition: transform .15s, background .2s, color .2s; }
.stk-step:hover { background: #282828; color: #eeeeee; border-color: transparent; }
.stk-step:active { transform: scale(.9); }
.stk-step svg { width: 18px; height: 18px; }
.stk-val { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: text; }
.stk-val .tk { width: 30px; height: 30px; margin: 0; flex: none; }
.stk-val input { width: 100%; max-width: 5.2ch; min-width: 2ch; border: 0; background: none; outline: none; text-align: center; font-family: var(--fh); font-size: 44px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); padding: 0; }
.stk-val em { font-style: normal; font-weight: 700; font-size: 13px; color: var(--muted); }
.stk-val.bump input { animation: bump .3s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 40% { transform: scale(1.12); } }
.stk-range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; margin: 10px 0 14px; outline: none; background: linear-gradient(90deg, #282828 0 var(--v, 5%), var(--line) var(--v, 5%) 100%); }
[data-mode="dark"] .stk-range { background: linear-gradient(90deg, var(--gold) 0 var(--v, 5%), var(--line) var(--v, 5%) 100%); }
[data-style="japan"] .stk-range { background: linear-gradient(90deg, var(--accent) 0 var(--v, 5%), var(--line) var(--v, 5%) 100%); }
.stk-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--card); border: 2px solid var(--ink2); box-shadow: 0 4px 12px rgba(0, 0, 0, .25); cursor: grab; }
.stk-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--card); border: 2px solid var(--ink2); cursor: grab; }
.stk-quick { grid-template-columns: repeat(6, 1fr) !important; gap: 6px !important; }
.stk-quick button { height: 34px !important; font-size: 12.5px !important; padding: 0 !important; }
.chev { margin: 14px 0; }
.chev-row { display: flex; gap: 3px; }
.chev-i { flex: 1; min-width: 0; position: relative; padding: 9px 10px 9px 24px; background: var(--card2); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%); animation: chevIn .5s cubic-bezier(.2, .9, .3, 1) both; animation-delay: calc(var(--i) * 90ms); overflow: hidden; }
.chev-i:first-child { padding-left: 14px; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); border-radius: var(--rs) 0 0 var(--rs); }
.chev-i small { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.chev-i b { display: flex; align-items: center; gap: 4px; font-size: 15px; font-family: var(--fh); white-space: nowrap; }
.chev-i b .tk { width: 15px; height: 15px; margin: 0; }
.chev-i.win { background: linear-gradient(180deg, #4f4f4f, #282828); color: #eeeeee; }
[data-style="japan"] .chev-i.win { background: var(--accent); color: var(--accent-ink); }
.chev-i.win small { color: rgba(238, 238, 238, .7); }
.chev-i.win::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); transform: translateX(-100%); animation: shine 2.6s 1s ease-in-out infinite; }
@keyframes shine { 60%, 100% { transform: translateX(100%); } }
@keyframes chevIn { from { opacity: 0; transform: translateX(-12px); } }
.chev.big .chev-i { padding-top: 12px; padding-bottom: 12px; }
.chev.big .chev-i b { font-size: 18px; }
.chev-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.post-chk { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink2); margin-top: 4px; cursor: pointer; }
.post-chk input { width: 18px; height: 18px; accent-color: #282828; flex: none; }

/* slide to confirm */
.s2 { --p: 0; position: relative; height: 56px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; margin: 4px 0 2px; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .06); }
.s2-fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(60px + (100% - 60px) * var(--p)); border-radius: 99px; background: linear-gradient(90deg, rgba(40, 40, 40, .12), rgba(40, 40, 40, .4)); transition: width .45s cubic-bezier(.3, 1.3, .5, 1); }
[data-mode="dark"] .s2-fill { background: linear-gradient(90deg, rgba(177, 177, 177, .1), rgba(177, 177, 177, .35)); }
.s2.drag .s2-fill { transition: none; }
.s2-txt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px 0 64px; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; opacity: calc(1 - var(--p) * 1.3); color: var(--ink2); background: linear-gradient(100deg, var(--ink2) 0 35%, var(--muted) 50%, var(--ink2) 65% 100%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: txtShine 2.4s linear infinite; }
@keyframes txtShine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.s2-knob { position: absolute; left: 4px; top: 4px; z-index: 2; width: 56px; height: 46px; border-radius: 99px; display: grid; place-items: center; background: linear-gradient(180deg, #4f4f4f, #282828); color: #eeeeee; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .15); cursor: grab; transition: transform .45s cubic-bezier(.3, 1.3, .5, 1), background .3s; touch-action: none; }
[data-style="japan"] .s2-knob { background: var(--accent); color: var(--accent-ink); }
.s2.drag .s2-knob { transition: none; cursor: grabbing; }
.s2-knob svg { width: 20px; height: 20px; }
.s2:not(.done) .s2-knob svg { animation: nudgeX 1.5s ease-in-out infinite; }
@keyframes nudgeX { 50% { transform: translateX(4px); } }
.s2.nudge .s2-knob { animation: knobHint .6s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes knobHint { 40% { transform: translateX(34px); } }
.s2.done .s2-fill { width: 100%; background: linear-gradient(180deg, #4f4f4f, #282828); }
[data-style="japan"] .s2.done .s2-fill { background: var(--accent); }
.s2.done .s2-txt { opacity: 1; padding: 0 70px 0 18px; animation: none; background: none; -webkit-text-fill-color: currentColor; color: #eeeeee; }
.s2.done .s2-knob { cursor: default; background: rgba(255, 255, 255, .16); box-shadow: none; }
.s2.done .s2-knob .spin { width: 18px; height: 18px; }
.s2.ok .s2-fill { background: var(--good) !important; }
.s2.ok .s2-knob { left: auto; right: 4px; transform: none !important; }
.s2.ok .s2-txt svg { width: 16px; height: 16px; }

/* match room */
.room { padding: 22px; }
.room > * + * { margin-top: 16px; }
.room-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.center-t { text-align: center; }
.versus { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 22px 16px; border-radius: calc(var(--r) + 4px); overflow: hidden; background: radial-gradient(120% 140% at 0% 50%, rgba(40, 40, 40, .14), transparent 55%), radial-gradient(120% 140% at 100% 50%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 55%), var(--card2); border: 1px solid var(--line); }
.versus::before { content: ''; position: absolute; left: 50%; top: -20%; bottom: -20%; width: 2px; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--gold) 60%, transparent), transparent); transform: rotate(12deg); }
.vs-side { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-width: 0; animation: vsInL .7s cubic-bezier(.2, 1.1, .3, 1) both; }
.vs-side.opp { animation-name: vsInR; }
@keyframes vsInL { from { opacity: 0; transform: translateX(-30px); } }
@keyframes vsInR { from { opacity: 0; transform: translateX(30px); } }
.vs-side b { font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.vs-side small { color: var(--ink2); font-size: 12px; }
.vs-meta { font-size: 11.5px; color: var(--muted); }
.vs-side .badge { margin-top: 4px; }
.vs-av { position: relative; width: 88px; height: 88px; margin-bottom: 6px; }
.vs-av img.av.xl { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px color-mix(in srgb, var(--ink) 35%, var(--line)), 0 14px 28px -10px rgba(0, 0, 0, .45); }
.vs-side.opp .vs-av img.av.xl { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px color-mix(in srgb, var(--gold) 60%, var(--line)), 0 14px 28px -10px rgba(0, 0, 0, .45); }
.vs-dep { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 3px solid var(--card2); background: var(--warn); color: #fff; }
.vs-dep.ok { background: var(--good); animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
.vs-dep svg { width: 13px; height: 13px; }
@keyframes pop { from { transform: scale(0); } }
.ghost-av { width: 88px !important; height: 88px !important; font-size: 30px !important; background: var(--line) !important; color: var(--muted) !important; position: relative; z-index: 1; }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--gold); opacity: 0; animation: radar 2.4s ease-out infinite; }
.radar i:nth-child(3) { animation-delay: .8s; }
.radar i:nth-child(4) { animation-delay: 1.6s; }
@keyframes radar { from { transform: scale(1); opacity: .7; } to { transform: scale(1.9); opacity: 0; } }
.vs-mid { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.vs-x { font-family: var(--fh); font-weight: 800; font-size: 30px; font-style: italic; letter-spacing: -.02em; color: var(--ink); animation: vsSlam .6s .3s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes vsSlam { from { transform: scale(2.6); opacity: 0; } }
.vs-pot { text-align: center; padding: 10px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .4); }
.vs-pot small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.vs-pot b { display: flex; align-items: center; justify-content: center; gap: 5px; font-family: var(--fh); font-size: 22px; }
.vs-pot b .tk { width: 20px; height: 20px; margin: 0; }
.vs-pot em { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 600; }
.vs-tc { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--ink2); }
@media (max-width: 560px) {
  .versus { grid-template-columns: 1fr 1fr; padding: 16px 10px; }
  .vs-mid { grid-column: 1 / -1; grid-row: 2; flex-direction: row; justify-content: center; }
  .vs-x { font-size: 22px; }
  .vs-av, .vs-av img.av.xl, .ghost-av { width: 68px !important; height: 68px !important; }
  .versus::before { display: none; }
  .room { padding: 16px; }
  .stk-val input { font-size: 38px; }
  .stk-quick { grid-template-columns: repeat(3, 1fr) !important; }
  .chev-i { padding-left: 20px; }
  .chev-i b { font-size: 13px; }
  .chev-i small { font-size: 9.5px; }
}

/* chat drawer */
.cx-fab { position: fixed; right: 18px; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 81; display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 18px 0 15px; border-radius: 99px; color: #eeeeee; font-weight: 700; font-size: 13.5px; background: linear-gradient(180deg, #4f4f4f, #282828); box-shadow: 0 14px 30px -10px rgba(23, 23, 23, .6), inset 0 1px 0 rgba(255, 255, 255, .15); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1), opacity .25s; }
[data-style="japan"] .cx-fab { background: var(--accent); }
.cx-fab:hover { transform: translateY(-2px) scale(1.03); }
.cx-fab svg { width: 20px; height: 20px; }
.cx-badge { position: absolute; top: -4px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: #e5484d; color: #fff; font: 700 11px/20px 'Inter', sans-serif; font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--bg); animation: pop .4s cubic-bezier(.3, 1.6, .5, 1); }
.cx-badge[hidden] { display: none; }
body.chat-open .cx-fab { opacity: 0; pointer-events: none; transform: scale(.8); }
.cx { position: fixed; right: 18px; bottom: 18px; z-index: 82; width: min(390px, calc(100vw - 36px)); height: min(600px, calc(100vh - 110px)); display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: color-mix(in srgb, var(--card) 94%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--line); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .45); opacity: 0; visibility: hidden; transform: translateY(24px) scale(.94); transform-origin: bottom right; transition: opacity .3s, transform .45s cubic-bezier(.2, 1.1, .3, 1), visibility 0s .3s; }
.cx.open { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .45s cubic-bezier(.2, 1.1, .3, 1), visibility 0s; }
.cx-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px 14px; border-bottom: 1px solid var(--line); }
.cx-hl { flex: 1; min-width: 0; }
.cx-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cx-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.cx-tabs button.on { background: linear-gradient(180deg, #4f4f4f, #282828); color: #eeeeee; }
[data-style="japan"] .cx-tabs button.on { background: var(--accent); color: var(--accent-ink); }
.cx-tabs svg { width: 15px; height: 15px; }
.cx-tabs img.av.sm { width: 20px; height: 20px; box-shadow: none; }
.cx-n { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #e5484d; color: #fff; font-size: 10.5px; line-height: 18px; text-align: center; }
.cx-sub { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin: 6px 0 0 4px; }
.cx-sub svg { width: 12px; height: 12px; }
.cx-x { width: 34px; height: 34px; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--ink2); flex: none; align-self: flex-start; }
.cx-x:hover { background: var(--card2); }
.cx-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cx-people { display: flex; align-items: center; gap: 2px; padding: 8px 14px; border-bottom: 1px solid var(--line2); overflow: hidden; }
.cx-p { position: relative; margin-right: -6px; }
.cx-p img.av.sm { width: 28px; height: 28px; box-shadow: 0 0 0 2px var(--card); }
.cx-p .flag { position: absolute; right: -2px; bottom: -2px; width: 13px; height: 9px; margin: 0; }
.cx-more { margin-left: 10px; font-size: 11.5px; font-weight: 700; color: var(--ink2); }
.cx-on { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--good); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cx-on::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.cx-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 12px 12px; overscroll-behavior: contain; }
.cx-day { display: flex; justify-content: center; margin: 14px 0 4px; position: sticky; top: 0; z-index: 1; }
.cx-day span { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted); padding: 3px 10px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); }
.cm { display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; }
.cm.new { animation: cmIn .35s cubic-bezier(.2, 1.1, .3, 1) both; }
.cm.grp { margin-top: 3px; }
.cm.me { flex-direction: row-reverse; }
@keyframes cmIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.cm-av { flex: none; width: 28px; }
.cm-av img.av.sm { width: 28px; height: 28px; box-shadow: none; }
.cm-b { max-width: 78%; min-width: 0; padding: 7px 11px 5px; border-radius: 16px 16px 16px 5px; background: var(--card2); border: 1px solid var(--line); }
.cm.grp .cm-b { border-radius: 5px 16px 16px 5px; }
.cm.me .cm-b { border-radius: 16px 16px 5px 16px; background: linear-gradient(180deg, #4f4f4f, #282828); color: #eeeeee; border-color: transparent; }
[data-style="japan"] .cm.me .cm-b { background: var(--accent); color: var(--accent-ink); }
.cm.me.grp .cm-b { border-radius: 16px 5px 5px 16px; }
.cm-h { display: flex; align-items: center; gap: 2px; font-size: 11.5px; margin-bottom: 1px; }
.cm-h b { color: var(--ink2); }
.cm.me .cm-h b { color: rgba(238, 238, 238, .75); }
.cm-h .flag { width: 14px; height: 10px; }
.cm-b p { color: inherit; font-size: 13.5px; line-height: 1.4; overflow-wrap: anywhere; }
.cm-b time { display: block; text-align: right; font-size: 10px; opacity: .55; margin-top: 2px; font-variant-numeric: tabular-nums; }
.cm.inv .cm-b, .cm.me.inv .cm-b { width: 250px; max-width: 86%; padding: 10px; background: var(--card); color: var(--ink); border: 1px solid color-mix(in srgb, var(--gold) 60%, var(--line)); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .35); }
.cm.me.inv .cm-h b { color: var(--ink2); }
.cx-inv-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.cx-inv-h svg { width: 15px; height: 15px; color: var(--gold); }
.cx-inv-h .mono { margin-left: auto; font-size: 11px; color: var(--muted); }
.cx-inv-b { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.cx-inv-b span { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 3px 8px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); }
.cx-inv-b .tk { width: 13px; height: 13px; margin: 0; }
.cx-inv-st { display: block; text-align: center; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 6px; border-radius: var(--rs); background: var(--card2); }
.cx-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 40px 20px; color: var(--muted); }
.cx-empty svg { width: 30px; height: 30px; margin-bottom: 6px; opacity: .6; }
.cx-empty b { color: var(--ink2); }
.cx-empty small { font-size: 12px; }
.cx-form { display: flex; align-items: center; gap: 6px; padding: 10px; border-top: 1px solid var(--line); background: var(--card); }
.cx-in { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card2); outline: none; font-size: 14px; }
.cx-in:focus { border-color: var(--ink2); box-shadow: 0 0 0 3px var(--accent-soft); }
.cx-send, .cx-chal { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; transition: transform .15s; }
.cx-send { background: linear-gradient(180deg, #4f4f4f, #282828); color: #eeeeee; }
[data-style="japan"] .cx-send { background: var(--accent); color: var(--accent-ink); }
.cx-chal { border: 1px solid var(--line); color: var(--ink2); }
.cx-chal:hover { color: var(--gold); border-color: var(--gold); }
.cx-send:active, .cx-chal:active { transform: scale(.9); }
.cx-send svg, .cx-chal svg { width: 18px; height: 18px; }
.mchat { border: 1px solid var(--line); border-radius: var(--rs); overflow: hidden; background: var(--card); }
.mchat-h { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.mchat-h svg { width: 15px; height: 15px; }
.mchat-h small { margin-left: auto; font-size: 11px; color: var(--muted); }
.mchat .cx-list { height: 210px; flex: none; }
.mchat .cx-empty { padding: 26px 14px; }
@media (max-width: 560px) {
  .cx { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; transform: translateY(40px); }
  .cx-fab { right: 14px; height: 46px; padding: 0 14px; }
  .cx-fab span { display: none; }
}

/* =========================================================
   the intro film
   ========================================================= */
body.intro-on { overflow: hidden; }
body.intro-on .island, body.intro-on .cx-fab, body.intro-on .cx { opacity: 0 !important; pointer-events: none !important; }
.intro { position: fixed; inset: 0; z-index: 90; overflow: hidden; color: #c6c6c6; font-family: 'Inter', system-ui, sans-serif; background: radial-gradient(90% 70% at 50% 0%, #282828 0%, #131313 60%, #0c0c0c 100%); }
.intro.bye { animation: introBye .75s cubic-bezier(.6, 0, .3, 1) forwards; pointer-events: none; }
@keyframes introBye { to { opacity: 0; transform: scale(1.08); filter: blur(10px); } }
.in-bg { position: absolute; inset: 0; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; }
.o1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -16vmax; background: #4f4f4f; animation: orb 14s ease-in-out infinite; }
.o2 { width: 36vmax; height: 36vmax; right: -10vmax; top: 20%; background: #898989; opacity: .35; animation: orb 18s ease-in-out infinite reverse; }
.o3 { width: 30vmax; height: 30vmax; left: 30%; bottom: -18vmax; background: #282828; animation: orb 16s ease-in-out infinite; }
@keyframes orb { 50% { transform: translate(6vmax, 4vmax) scale(1.1); } }
.in-floor { position: absolute; left: -50%; right: -50%; bottom: -10%; height: 70%; transform: perspective(500px) rotateX(62deg); transform-origin: bottom; opacity: .18; background-image: linear-gradient(rgba(137, 137, 137, .5) 1px, transparent 1px), linear-gradient(90deg, rgba(137, 137, 137, .5) 1px, transparent 1px); background-size: 70px 70px; animation: floor 6s linear infinite; -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 90%); mask-image: linear-gradient(to top, #000 10%, transparent 90%); }
@keyframes floor { to { background-position: 0 70px; } }
.in-prog { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255, 255, 255, .08); z-index: 3; }
.in-prog i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #4f4f4f, #898989); transform-origin: left; transform: scaleX(0); }
.intro.run .in-prog i { animation: dotFill 22.6s linear forwards; }
.intro.still .in-prog i { transform: none; }
.in-skip { position: absolute; z-index: 4; right: max(16px, env(safe-area-inset-right)); top: max(16px, env(safe-area-inset-top)); display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 16px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: rgba(198, 198, 198, .85); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.in-skip:hover { background: rgba(255, 255, 255, .16); }
.in-skip svg { width: 14px; height: 14px; }
.sc { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 70px 20px 40px; text-align: center; opacity: 0; visibility: hidden; pointer-events: none; transform: scale(1.06); filter: blur(10px); transition: opacity .7s, transform .9s cubic-bezier(.2, .9, .25, 1), filter .7s, visibility 0s .7s; }
.sc.on { opacity: 1; visibility: visible; pointer-events: auto; transform: none; filter: none; transition: opacity .7s, transform .9s cubic-bezier(.2, .9, .25, 1), filter .7s, visibility 0s; }
.sc.out { transform: scale(.92); }
.in-kicker { font-size: 12.5px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #898989; }
.sc.on .in-kicker { animation: slideUp .7s .1s both; }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } }

/* scene 1: the name */
.in-logo { width: min(250px, 58vw); filter: drop-shadow(0 22px 40px rgba(0, 0, 0, .55)); }
.in-logo.sm { width: min(150px, 40vw); }
.sc1.on .in-logo { animation: logoIn 1.1s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes logoIn { 0% { opacity: 0; transform: scale(.2) rotate(-25deg); } 70% { opacity: 1; transform: scale(1.06) rotate(3deg); } 100% { transform: rotate(-4deg); } }
.in-title { font: 700 clamp(40px, 8vw, 92px)/1 var(--fh); letter-spacing: -.02em; perspective: 600px; }
.in-title span { display: inline-block; opacity: 0; }
.sc1.on .in-title span { animation: letterUp .8s cubic-bezier(.2, 1.2, .4, 1) both; animation-delay: calc(.45s + var(--i) * 45ms); }
@keyframes letterUp { from { opacity: 0; transform: translateY(45%) scale(.85); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.in-tag { font-size: clamp(16px, 2.4vw, 22px); color: rgba(198, 198, 198, .75); }
.in-tag span { display: inline-block; opacity: 0; }
.sc1.on .in-tag span { opacity: 1; }
.sc1.on .in-tag span:first-child { animation: slideUp .7s 1.3s both; }
.sc1.on .in-tag span:last-child { animation: slideUp .7s 1.55s both; color: #898989; font-weight: 600; }

/* scene 2: stakes */
.in-duel { display: flex; align-items: center; gap: clamp(16px, 6vw, 80px); }
.in-p { display: flex; flex-direction: column; align-items: center; gap: 6px; width: min(240px, 38vw); padding: 22px 12px 16px; border-radius: 22px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); }
.in-p img.av.xl { width: clamp(64px, 12vw, 104px); height: clamp(64px, 12vw, 104px); margin: 0 0 6px; box-shadow: 0 0 0 3px #131313, 0 0 0 5px #4f4f4f; }
.in-p.r img.av.xl { box-shadow: 0 0 0 3px #131313, 0 0 0 5px #898989; }
.in-p b { font-size: clamp(14px, 2vw, 18px); }
.in-p small { display: flex; align-items: center; color: rgba(198, 198, 198, .7); font-size: clamp(11px, 1.5vw, 13px); }
.in-p .flag { width: 20px; height: 14px; }
.sc2.on .in-p.l { animation: duelL .9s cubic-bezier(.2, 1.1, .3, 1) both; }
.sc2.on .in-p.r { animation: duelR .9s cubic-bezier(.2, 1.1, .3, 1) both; }
@keyframes duelL { from { opacity: 0; transform: translateX(-60vw) rotate(-10deg); } }
@keyframes duelR { from { opacity: 0; transform: translateX(60vw) rotate(10deg); } }
.in-vs { font: italic 800 clamp(30px, 6vw, 64px)/1 var(--fh); color: #898989; text-shadow: 0 0 40px rgba(137, 137, 137, .6); opacity: 0; }
.sc2.on .in-vs { animation: vsSlam .6s .75s cubic-bezier(.3, 1.6, .5, 1) both; opacity: 1; }
.in-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 12px; border-radius: 99px; font-weight: 700; font-size: 13px; background: rgba(137, 137, 137, .16); border: 1px solid rgba(137, 137, 137, .5); }
.in-chip .tk { width: 18px; height: 18px; margin: 0; }
.sc2.lock .in-p.l .in-chip { animation: chipL .9s cubic-bezier(.6, 0, .3, 1) forwards; }
.sc2.lock .in-p.r .in-chip { animation: chipR .9s cubic-bezier(.6, 0, .3, 1) forwards; }
@keyframes chipL { to { transform: translate(min(22vw, 190px), 110px) scale(.4); opacity: 0; } }
@keyframes chipR { to { transform: translate(max(-22vw, -190px), 110px) scale(.4); opacity: 0; } }
.in-pot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 12px 20px; border-radius: 99px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(137, 137, 137, .35); opacity: 0; transform: scale(.6); transition: opacity .5s .55s, transform .6s .55s cubic-bezier(.3, 1.6, .5, 1), box-shadow .6s .55s; }
.sc2.lock .in-pot { opacity: 1; transform: none; box-shadow: 0 0 60px -10px rgba(137, 137, 137, .5); }
.in-pot > svg { width: 20px; height: 20px; color: #898989; }
.in-pot span { font-size: 13px; color: rgba(198, 198, 198, .75); }
.in-pot b { display: inline-flex; align-items: center; gap: 6px; font: 700 22px var(--fh); }
.in-pot b .tk { width: 22px; height: 22px; margin: 0; }
.in-pot em { font-style: normal; font-variant-numeric: tabular-nums; }

/* scene 3: the game */
.sc3 { flex-direction: row; gap: clamp(16px, 4vw, 48px); }
.in-match { width: min(430px, 58vh, 84vw); }
.sc3.on .in-match { animation: boardIn 1s cubic-bezier(.2, 1, .3, 1) both; }
@keyframes boardIn { from { opacity: 0; transform: perspective(900px) rotateX(40deg) translateY(60px) scale(.85); } }
.in-bar { display: flex; align-items: center; gap: 8px; padding: 8px 4px; font-size: 13.5px; }
.in-bar img.av.sm { width: 30px; height: 30px; box-shadow: none; }
.in-bar .flag { width: 18px; height: 13px; }
.in-clk { margin-left: auto; font: 600 14px ui-monospace, Consolas, monospace; padding: 4px 10px; border-radius: 8px; background: rgba(255, 255, 255, .08); }
.in-bar.me .in-clk { background: #898989; color: #131313; }
.in-board { position: relative; }
.in-board .board-frame { box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .06); }
.ib { position: relative; }
.ib .sq { position: relative; }
.ib .sq.chk { animation: chkPulse .8s ease-in-out 3; }
@keyframes chkPulse { 50% { filter: brightness(1.4); } }
.in-stamp { position: absolute; left: 50%; top: 50%; z-index: 6; padding: 10px 26px; border: 4px solid #848484; border-radius: 10px; color: #bebebe; font: 800 clamp(26px, 5vw, 44px)/1 var(--fh); letter-spacing: .04em; text-transform: uppercase; background: rgba(19, 19, 19, .7); opacity: 0; transform: translate(-50%, -50%) scale(2.4) rotate(-14deg); pointer-events: none; white-space: nowrap; }
.sc3.mate .in-stamp { animation: stamp .55s cubic-bezier(.4, 1.6, .6, 1) forwards; }
@keyframes stamp { to { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-10deg); } }
.sc3.won .in-stamp { opacity: 0; transition: opacity .3s; animation: none; }
.in-log { width: 220px; text-align: left; padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); align-self: center; }
.sc3.on .in-log { animation: slideUp .8s .4s both; }
.in-log-h { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 13px; }
.in-log-h .tk { width: 18px; height: 18px; margin: 0; color: #898989; }
.in-log-h small { margin-left: auto; font-size: 10.5px; color: rgba(198, 198, 198, .55); }
.in-log ol { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 5px; min-height: 196px; }
.in-log li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; font-size: 13px; padding: 4px 8px; border-radius: 8px; background: rgba(255, 255, 255, .04); animation: logIn .4s cubic-bezier(.2, 1.3, .4, 1) both; }
.in-log li span { color: rgba(198, 198, 198, .5); font-size: 11.5px; }
.in-log li em { display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: 11px; font-weight: 700; color: #cccccc; }
.in-log li em svg { width: 11px; height: 11px; }
.in-log li:last-child b { color: #aeaeae; }
@keyframes logIn { from { opacity: 0; transform: translateX(20px) scale(.9); } }
.in-win { position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; pointer-events: none; }
.in-rb { position: relative; padding: 18px 70px 16px; text-align: center; background: linear-gradient(180deg, #4f4f4f, #282828); border-top: 3px solid #898989; border-bottom: 3px solid #898989; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .6)); opacity: 0; transform: scale(.3) rotate(-8deg); }
.in-rb::before, .in-rb::after { content: ''; position: absolute; top: 16px; width: 60px; height: 100%; z-index: -1; background: #1d1d1d; }
.in-rb::before { left: -50px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 26% 50%); }
.in-rb::after { right: -50px; clip-path: polygon(0 0, 100% 0, 74% 50%, 100% 100%, 0 100%); }
.sc3.won .in-rb { animation: inRb .8s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes inRb { 0% { opacity: 0; transform: scale(.3) rotate(-8deg); } 60% { opacity: 1; transform: scale(1.08) rotate(1deg); } 100% { opacity: 1; transform: scale(1) rotate(-2deg); } }
.sc3.won .in-match { filter: blur(3px) brightness(.6); transition: filter .6s; }
.sc3.won .in-log { opacity: .3; transition: opacity .6s; }
.in-rb small { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 13px; color: rgba(198, 198, 198, .8); }
.in-rb small .flag { margin: 0 0 0 4px; }
.in-rb b { display: block; margin: 6px 0; font: 700 clamp(40px, 8vw, 78px)/1 var(--fh); background: linear-gradient(180deg, #ececec, #898989); -webkit-background-clip: text; background-clip: text; color: transparent; }
.in-amt { display: inline-flex; align-items: center; gap: 8px; font: 700 clamp(22px, 4vw, 34px)/1 'Inter', sans-serif; color: #e7e7e7; font-variant-numeric: tabular-nums; }
.in-amt .tk { width: 1em; height: 1em; margin: 0; }

/* scene 4: features */
.in-feats { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); gap: 16px; }
.in-f { text-align: left; padding: 16px; border-radius: 20px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); min-height: 172px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.sc4.on .in-f { animation: featIn .8s cubic-bezier(.2, 1.1, .3, 1) both; animation-delay: calc(.2s + var(--d) * .18s); }
@keyframes featIn { from { opacity: 0; transform: translateY(40px) scale(.9); } }
.in-f h5 { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.in-f h5 svg, .in-f h5 .tk { width: 18px; height: 18px; margin: 0; color: #898989; }
.in-msgs { display: flex; flex-direction: column; gap: 6px; }
.im { display: flex; align-items: flex-end; gap: 6px; opacity: 0; }
.sc4.on .im { opacity: 1; animation: logIn .45s cubic-bezier(.2, 1.3, .4, 1) both; animation-delay: calc(.9s + var(--m) * .55s); }
.im img.av.sm { width: 22px; height: 22px; box-shadow: none; }
.im p { font-size: 11.5px; line-height: 1.35; padding: 5px 9px; border-radius: 12px 12px 12px 4px; background: rgba(255, 255, 255, .1); }
.im p b { display: flex; align-items: center; font-size: 10px; color: rgba(198, 198, 198, .65); }
.im p b .flag { width: 12px; height: 9px; margin: 0 0 0 4px; }
.im time { display: block; text-align: right; font-size: 9px; opacity: .5; }
.im.me { justify-content: flex-end; }
.im.me p { background: #4f4f4f; border-radius: 12px 12px 4px 12px; }
.im.inv { justify-content: space-between; padding: 6px 8px; border-radius: 10px; border: 1px solid rgba(137, 137, 137, .5); font-size: 11.5px; }
.im.inv span { display: inline-flex; align-items: center; gap: 5px; }
.im.inv svg, .im.inv .tk { width: 13px; height: 13px; margin: 0; color: #898989; }
.im.inv i { font-style: normal; font-weight: 700; font-size: 11px; padding: 3px 10px; border-radius: 99px; background: #898989; color: #131313; }
.in-s2 { position: relative; height: 46px; border-radius: 99px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .12); overflow: hidden; container-type: inline-size; }
.in-s2 .s2-fill { width: 46px; background: linear-gradient(90deg, rgba(137, 137, 137, .3), rgba(137, 137, 137, .7)); transition: none; }
.in-s2 span { position: absolute; inset: 0; display: grid; place-items: center; padding-left: 40px; font-size: 12px; font-weight: 600; color: rgba(198, 198, 198, .8); }
.in-s2 i { position: absolute; left: 3px; top: 3px; width: 46px; height: 38px; border-radius: 99px; display: grid; place-items: center; background: #898989; color: #131313; }
.in-s2 i svg { width: 18px; height: 18px; }
.sc4.on .in-s2 i { animation: autoSlide 2.6s 1.2s cubic-bezier(.6, 0, .3, 1) infinite; }
.sc4.on .in-s2 .s2-fill { animation: autoFill 2.6s 1.2s cubic-bezier(.6, 0, .3, 1) infinite; }
.sc4.on .in-s2 span { animation: autoTxt 2.6s 1.2s infinite; }
@keyframes autoSlide { 0%, 10% { transform: none; } 55%, 85% { transform: translateX(calc(100cqw - 54px)); } 100% { transform: none; } }
@keyframes autoFill { 0%, 10% { width: 46px; } 55%, 85% { width: 100%; } 100% { width: 46px; } }
@keyframes autoTxt { 0%, 20% { opacity: 1; } 45%, 90% { opacity: 0; } 100% { opacity: 1; } }
.in-f .chev-row { gap: 2px; }
.in-f .chev-i { background: rgba(255, 255, 255, .08); padding: 6px 6px 6px 18px; }
.in-f .chev-i:first-child { padding-left: 10px; }
.in-f .chev-i small { color: rgba(198, 198, 198, .6); font-size: 9.5px; }
.in-f .chev-i b { font-size: 12.5px; font-family: 'Inter', sans-serif; }
.in-f .chev-i.win { background: #898989; color: #131313; }
.in-f .chev-i.win small { color: rgba(28, 28, 28, .7); }
.in-gates { display: grid; grid-template-columns: repeat(15, 1fr); gap: 3px; }
.in-gates i { aspect-ratio: 1; border-radius: 3px; background: rgba(137, 137, 137, .25); }
.sc4.on .in-gates i { animation: gate 1.2s ease-in-out infinite; }
.in-gates i:nth-child(3n) { animation-delay: .2s !important; }
.in-gates i:nth-child(5n) { animation-delay: .5s !important; }
.in-gates i:nth-child(7n) { animation-delay: .8s !important; }
.in-gates i:nth-child(4n+1) { animation-delay: 1s !important; }
@keyframes gate { 50% { background: #e7e7e7; box-shadow: 0 0 8px #cccccc; } }
.in-g { font: 700 26px var(--fh); }
.in-g em { font-style: normal; font-variant-numeric: tabular-nums; color: #898989; }
.in-f small { font-size: 12px; color: rgba(198, 198, 198, .65); margin-top: -6px; }
.in-pay { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; font-weight: 600; }
.in-pay > span { display: inline-flex; align-items: center; gap: 5px; }
.ip-pot { padding: 6px 10px; border-radius: 99px; background: rgba(255, 255, 255, .08); }
.ip-pot svg, .ip-pot .tk { width: 14px; height: 14px; margin: 0; }
.ip-arrow svg { width: 18px; height: 18px; color: #898989; }
.sc4.on .ip-arrow { animation: nudgeX 1s ease-in-out infinite; }
.ip-to img.av.sm { width: 22px; height: 22px; box-shadow: none; }
.ip-to .flag { width: 14px; height: 10px; margin: 0; }
.in-fee { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.in-fee b { font: 700 34px var(--fh); color: #e7e7e7; }
.in-fee small { margin: 0; }

/* scene 5: launch */
.in-big { font: 700 clamp(38px, 7vw, 80px)/1.08 var(--fh); letter-spacing: -.02em; }
.in-big .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; }
.in-big .w > span { display: inline-block; }
.sc5.on .in-big .w > span { animation: wordUp .9s cubic-bezier(.2, .9, .25, 1) both; animation-delay: calc(.25s + var(--w) * 120ms); }
.in-big .w:last-child > span { background: linear-gradient(180deg, #ececec, #898989); -webkit-background-clip: text; background-clip: text; color: transparent; }
.in-sub { max-width: 480px; color: rgba(198, 198, 198, .72); font-size: clamp(14px, 1.8vw, 16px); }
.sc5.on .in-logo { animation: logoIn 1s cubic-bezier(.2, 1.4, .4, 1) both; }
.sc5.on .in-sub { animation: slideUp .7s .7s both; }
.in-cta { height: 58px !important; padding: 0 34px !important; font-size: 17px !important; border-radius: 99px !important; background: linear-gradient(180deg, #d5d5d5, #898989) !important; color: #131313 !important; box-shadow: 0 20px 40px -14px rgba(137, 137, 137, .7), inset 0 1px 0 rgba(255, 255, 255, .5) !important; position: relative; }
.in-cta::after { content: ''; position: absolute; inset: -6px; border-radius: 99px; border: 2px solid rgba(137, 137, 137, .6); animation: ring 1.8s ease-out infinite; pointer-events: none; }
@keyframes ring { from { opacity: 1; transform: scale(.95); } to { opacity: 0; transform: scale(1.18); } }
.in-cta svg { width: 20px !important; height: 20px !important; transition: transform .2s; }
.in-cta:hover svg { transform: translateX(4px); }
.sc5.on .in-cta { animation: ctaIn .8s 1s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes ctaIn { from { opacity: 0; transform: translateY(20px) scale(.8); } }
.in-paper { display: inline-flex; align-items: center; gap: 6px; color: rgba(198, 198, 198, .8) !important; font-size: 13.5px; font-weight: 600; }
.in-paper svg { width: 16px; height: 16px; }
.sc5.on .in-paper, .sc5.on .powered { animation: slideUp .7s 1.3s both; }
.sc5 .powered { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: rgba(198, 198, 198, .75) !important; }
.sc5 .powered b { color: #fff; }
.sc5 .powered > span:first-child .tk { color: #898989; }
.sc5 .powered > i { background: rgba(255, 255, 255, .2); }
.intro.still .sc { transition: none; }

@media (max-width: 760px) {
  .sc3 { flex-direction: column; gap: 10px; padding-top: 64px; }
  .in-match { width: min(360px, 88vw, 52vh); }
  .in-log { width: min(360px, 88vw); padding: 10px; }
  .in-log ol { min-height: 0; flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .in-log li { grid-template-columns: auto auto; gap: 4px; padding: 3px 7px; font-size: 12px; }
  .in-log li em { display: none; }
  .in-log-h { margin-bottom: 6px; }
  .in-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 420px; }
  .in-f { min-height: 0; padding: 12px; border-radius: 16px; gap: 8px; }
  .in-f h5 { font-size: 12.5px; }
  .im p { font-size: 10.5px; }
  .im.inv { font-size: 10px; }
  .in-g { font-size: 20px; }
  .in-gates { grid-template-columns: repeat(10, 1fr); }
  .in-gates i:nth-child(n+41) { display: none; }
  .in-fee b { font-size: 26px; }
  .in-f .chev-i small { font-size: 8.5px; }
  .in-f .chev-i b { font-size: 11px; }
  .in-s2 span { font-size: 10.5px; }
  .in-rb { padding: 14px 40px 12px; }
  .in-rb::before { left: -36px; width: 44px; }
  .in-rb::after { right: -36px; width: 44px; }
}
@media (max-width: 420px) {
  .im.me, .in-pay .ip-arrow { display: none; }
  .in-feats { gap: 8px; }
  .in-duel { gap: 10px; }
  .in-p { padding: 16px 8px 12px; }
}
@media (max-height: 640px) and (min-width: 761px) { .in-match { width: min(380px, 52vh); } }
@media (prefers-reduced-motion: reduce) { .hb-float, .flow::after, .chev-i.win::after, .s2-txt, .radar i { animation: none !important; } }

/* ---------- intro v2: palette #131313 #282828 #4f4f4f #898989 #c6c6c6 #4A4A46, sound, enter gate ---------- */
.orb { display: none; }
.glow { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.glow.g1 { width: 60vmax; height: 34vmax; left: 50%; top: -14vmax; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(137, 137, 137, .55), rgba(79, 79, 79, .25) 60%, transparent); animation: breathe 7s ease-in-out infinite; }
.glow.g2 { width: 28vmax; height: 46vmax; left: -14vmax; top: 18%; background: radial-gradient(closest-side, rgba(158, 158, 158, .5), transparent); animation: breathe 9s ease-in-out infinite reverse; }
.glow.g3 { width: 28vmax; height: 46vmax; right: -14vmax; top: 30%; background: radial-gradient(closest-side, rgba(121, 121, 121, .42), transparent); animation: breathe 8s 1s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; transform: translateX(var(--tx, 0)) scale(1.12); } }
.glow.g1 { --tx: -50%; }
.in-floor { opacity: .12 !important; }
.in-embers { position: absolute; inset: 0; width: 100%; height: 100%; }
.in-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 45%, rgba(7, 7, 7, .75)); }
.in-top { position: absolute; z-index: 5; right: max(16px, env(safe-area-inset-right)); top: max(16px, env(safe-area-inset-top)); display: flex; gap: 8px; }
.in-top .in-skip { position: static; }
.in-snd { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(198, 198, 198, .08); border: 1px solid rgba(198, 198, 198, .16); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; height: 100%; border-radius: 2px; background: #c6c6c6; transform-origin: bottom; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .4s; } .eq i:nth-child(4) { animation-delay: .1s; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.in-snd.off .eq i { animation: none; transform: scaleY(.25); opacity: .5; }
.intro:not(.run) .in-snd, .intro:not(.run) .in-skip, .intro:not(.run) .in-prog { opacity: 0; pointer-events: none; }
.in-top > *, .in-prog { transition: opacity .5s; }

/* the enter gate */
.in-halo { position: relative; display: grid; place-items: center; }
.in-halo i { position: absolute; width: 120%; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(198, 198, 198, .25); animation: halo 3.2s ease-out infinite; }
.in-halo i:last-child { animation-delay: 1.6s; }
@keyframes halo { from { transform: scale(.7); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
.sc0 .in-logo { animation: floaty 4s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-10px) rotate(-3deg); } }
.in-enter { position: relative; display: inline-flex; align-items: center; gap: 12px; height: 60px; padding: 0 30px 0 10px; margin-top: 8px; border-radius: 99px; font: 700 17px 'Inter', sans-serif; color: #131313; background: linear-gradient(180deg, #d5d5d5, #898989); box-shadow: 0 22px 50px -16px rgba(137, 137, 137, .8), inset 0 1px 0 rgba(255, 255, 255, .6); transition: transform .2s; }
.in-enter:hover { transform: scale(1.04); }
.in-enter svg { width: 40px; height: 40px; padding: 12px 11px 12px 13px; border-radius: 50%; background: #131313; color: #c6c6c6; }
.in-enter::after { content: ''; position: absolute; inset: -7px; border-radius: 99px; border: 2px solid rgba(137, 137, 137, .55); animation: ring 1.8s ease-out infinite; pointer-events: none; }
.in-quiet { font-size: 13px; color: rgba(198, 198, 198, .6); text-decoration: underline; text-underline-offset: 3px; }
.sc0.on .in-kicker { animation: slideUp .8s .3s both; }
.sc0.on .in-enter { animation: ctaIn .9s .6s cubic-bezier(.3, 1.5, .5, 1) both; }
.sc0.on .in-quiet { animation: slideUp .7s 1s both; }

/* impact effects */
.in-shock { position: fixed; z-index: 3; left: 50%; top: 45%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 3px solid rgba(198, 198, 198, .8); box-shadow: 0 0 30px rgba(137, 137, 137, .7), inset 0 0 20px rgba(137, 137, 137, .5); pointer-events: none; animation: shockw 1.1s cubic-bezier(.1, .7, .3, 1) forwards; }
@keyframes shockw { to { transform: scale(22); opacity: 0; border-width: .5px; } }
.intro.shake .sc.on { animation: shakeA .4s cubic-bezier(.36, .07, .19, .97); }
.intro.shake2 .sc.on { animation: shakeB .55s cubic-bezier(.36, .07, .19, .97); }
@keyframes shakeA { 20% { translate: -4px 2px; } 40% { translate: 4px -2px; } 60% { translate: -3px 1px; } 80% { translate: 2px -1px; } }
@keyframes shakeB { 10% { translate: -9px 4px; rotate: -.6deg; } 30% { translate: 8px -5px; rotate: .5deg; } 50% { translate: -6px 3px; } 70% { translate: 4px -2px; } 90% { translate: -2px 1px; } }

/* richer scenes */
.in-title { perspective: none; }
.in-title span { color: #dddddd; text-shadow: 0 0 40px rgba(137, 137, 137, .45); }
.in-p { background: linear-gradient(180deg, rgba(79, 79, 79, .28), rgba(40, 40, 40, .35)); border-color: rgba(198, 198, 198, .16); }
.in-f { background: linear-gradient(180deg, rgba(79, 79, 79, .22), rgba(19, 19, 19, .5)); border-color: rgba(198, 198, 198, .14); }
.in-log { background: rgba(40, 40, 40, .45); border-color: rgba(198, 198, 198, .12); }
.in-clk, .ip-pot { background: rgba(198, 198, 198, .1); }
.in-board .board-frame { background: linear-gradient(145deg, #4f4f4f, #282828); }
.sc3.on .in-match { animation: boardIn 1s cubic-bezier(.2, 1, .3, 1) both, tilt 9s 1s ease-in-out infinite; }
@keyframes tilt { 0%, 100% { transform: perspective(1100px) rotateX(8deg) rotateY(-4deg); } 50% { transform: perspective(1100px) rotateX(10deg) rotateY(4deg); } }
.in-rays { position: absolute; width: 140vmax; height: 140vmax; left: 50%; top: 50%; margin: -70vmax 0 0 -70vmax; background: repeating-conic-gradient(from 0deg, rgba(198, 198, 198, .1) 0 6deg, transparent 6deg 18deg); -webkit-mask-image: radial-gradient(circle, #000 0, transparent 55%); mask-image: radial-gradient(circle, #000 0, transparent 55%); opacity: 0; }
.sc3.won .in-rays { animation: rays 14s linear infinite, fadeInR .8s both; }
@keyframes rays { to { transform: rotate(360deg); } }
@keyframes fadeInR { from { opacity: 0; } to { opacity: 1; } }
.in-rb { border-color: #898989; box-shadow: 0 0 80px -10px rgba(137, 137, 137, .6); }
.in-amt { text-shadow: 0 0 24px rgba(231, 231, 231, .5); }
.in-cta { background: linear-gradient(180deg, #d5d5d5, #898989) !important; }
.sc5 .powered { background: rgba(40, 40, 40, .5); }
.in-gates i { background: rgba(137, 137, 137, .18); }
@keyframes gate { 50% { background: #d5d5d5; box-shadow: 0 0 8px #898989; } }
.in-log li em { color: #cccccc; }
.intro .splash { background: radial-gradient(circle, rgba(132, 132, 132, .7) 0 26%, rgba(19, 19, 19, .4) 42%, transparent 66%); }
.chev.ready .chev-i { animation: none; }
@media (max-width: 480px) {
  .sc4 { gap: 12px; padding-top: 60px; }
  .in-feats { grid-template-columns: 1fr; gap: 8px; max-width: 340px; }
  .in-f { padding: 10px 12px; gap: 7px; }
  .in-f .chev-row, .in-gates { display: none; }
  .im p { font-size: 11.5px; }
  .im.inv { font-size: 11.5px; }
  .in-g { font-size: 22px; }
  .in-fee { margin-top: 0; }
  .in-fee b { font-size: 24px; }
  .in-s2 span { font-size: 12px; }
}

/* powered-by line: plain text, no container */
.powered, .foot .powered, .sc5 .powered { padding: 0 !important; border: 0 !important; background: none !important; border-radius: 0; box-shadow: none; gap: 12px; }
.powered:hover { transform: none; opacity: .8; }
.powered > i { height: 12px; }

/* intro spacing: give every scene room to breathe */
.sc { gap: 30px; padding: 90px 24px 60px; }
.sc0 { gap: 26px; }
.sc0 .in-kicker { margin-top: 18px; }
.sc0 .in-enter { margin-top: 10px; }
.sc1 { gap: 34px; }
.sc1 .in-logo { margin-bottom: 8px; }
.in-tag { margin-top: 4px; letter-spacing: .02em; }
.sc2 { gap: 40px; }
.in-p { padding: 28px 18px 22px; gap: 10px; }
.in-p .in-chip { margin-top: 12px; }
.in-pot { padding: 14px 26px; gap: 14px; }
.sc3 { gap: clamp(24px, 5vw, 64px); }
.in-bar { padding: 12px 4px; }
.in-log { padding: 18px; }
.in-log ol { gap: 8px; }
.sc4 { gap: 34px; }
.in-feats { gap: 22px; }
.in-f { padding: 20px; gap: 14px; }
.sc5 { gap: 0; }
.sc5 .in-logo { margin-bottom: 38px; }
.sc5 .in-big { margin-bottom: 26px; line-height: 1.15; }
.sc5 .in-sub { margin-bottom: 40px; line-height: 1.65; }
.sc5 .in-cta { margin-bottom: 44px; }
@media (max-width: 760px) {
  .sc { gap: 22px; padding: 76px 20px 40px; }
  .sc3 { gap: 16px; }
  .sc4 { gap: 20px; }
  .in-feats { gap: 12px; }
  .in-f { padding: 14px; gap: 10px; }
  .sc5 .in-logo { margin-bottom: 26px; }
  .sc5 .in-big { margin-bottom: 18px; }
  .sc5 .in-sub { margin-bottom: 30px; }
  .sc5 .in-cta { margin-bottom: 34px; }
}
@media (max-width: 480px) { .sc4 { gap: 14px; padding-top: 64px; } .in-feats { gap: 8px; } .in-f { padding: 11px 13px; gap: 7px; } }

/* ---------- v9: navbar, how it works, intro headline font ---------- */
.navl { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.navl a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--ink2) !important; text-decoration: none !important; white-space: nowrap; transition: background .2s, color .2s; cursor: pointer; }
.navl a svg { width: 14px; height: 14px; opacity: .75; }
.navl a:hover, .navl a.on { background: var(--card2); color: var(--ink) !important; }
.navl + .top-r { margin-left: 6px; }
@media (max-width: 1100px) { .top .net { display: none; } }
@media (max-width: 900px) {
  .top { flex-wrap: wrap; }
  .navl { order: 3; width: 100%; margin: 6px 0 0; padding-top: 8px; border-top: 1px solid var(--line); justify-content: center; }
  .navl + .top-r { margin-left: auto; }
}
@media (max-width: 420px) { .navl a { padding: 0 8px; font-size: 12px; gap: 5px; } }

.how2 { position: relative; overflow: hidden; margin-top: 22px; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 40px; padding: clamp(26px, 4vw, 48px); border-radius: calc(var(--r) + 8px); color: #dddddd; background: radial-gradient(70% 90% at 0% 0%, rgba(137, 137, 137, .35), transparent 60%), radial-gradient(60% 80% at 100% 100%, rgba(79, 79, 79, .45), transparent 60%), linear-gradient(160deg, #282828, #131313 70%); box-shadow: 0 30px 60px -30px rgba(19, 19, 19, .7); }
.how2::before { content: ''; position: absolute; inset: 0; opacity: .07; pointer-events: none; background: conic-gradient(#c6c6c6 25%, transparent 0 50%, #c6c6c6 0 75%, transparent 0) 0 0 / 56px 56px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); mask-image: linear-gradient(90deg, transparent, #000 70%); }
.h2-head { position: relative; align-self: center; }
.h2-k { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #898989; }
.how2 h3 { font: 800 clamp(30px, 3.6vw, 46px)/1.1 'Playfair Display', Georgia, serif; margin: 12px 0 16px; color: #e7e7e7; }
.how2 h3 em { color: #a7a7a7; font-style: italic; }
.h2-head p { color: rgba(198, 198, 198, .75); font-size: 15px; max-width: 380px; }
.h2-btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; height: 44px; padding: 0 18px 0 6px; border-radius: 99px; font-weight: 700; font-size: 13.5px; color: #131313; background: linear-gradient(180deg, #d5d5d5, #898989); box-shadow: 0 14px 30px -12px rgba(137, 137, 137, .7); transition: transform .2s; }
.h2-btn:hover { transform: translateY(-2px); }
.h2-btn svg { width: 32px; height: 32px; padding: 10px 9px 10px 11px; border-radius: 50%; background: #131313; color: #c6c6c6; }
.h2-steps { position: relative; list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.h2-steps::before { content: ''; position: absolute; left: 27px; top: 30px; bottom: 30px; width: 2px; background: linear-gradient(180deg, #898989, rgba(137, 137, 137, .1)); }
.h2-s { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 16px 14px 0; border-radius: 18px; transition: background .3s, transform .3s; animation: rise .7s cubic-bezier(.2, .9, .25, 1) both; animation-delay: calc(.1s + var(--i) * .12s); }
.h2-s:hover { background: rgba(198, 198, 198, .06); transform: translateX(6px); }
.h2-ic { position: relative; z-index: 1; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: #e7e7e7; background: linear-gradient(160deg, #4f4f4f, #282828); border: 1px solid rgba(198, 198, 198, .2); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .7); }
.h2-ic svg, .h2-ic .tk { width: 24px; height: 24px; margin: 0; color: currentColor; }
.h2-ic .glyph-ic { font-size: 28px; }
.h2-ic b { position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: #131313; background: #c6c6c6; box-shadow: 0 0 0 3px #1d1d1d; }
.h2-t h4 { font: 700 19px 'Playfair Display', Georgia, serif; color: #e7e7e7; margin-bottom: 2px; }
.h2-t p { font-size: 13.5px; line-height: 1.55; color: rgba(198, 198, 198, .72); }
.h2-vis { display: flex; align-items: center; gap: 5px; justify-self: end; padding: 8px 10px; border-radius: 14px; background: rgba(19, 19, 19, .55); border: 1px solid rgba(198, 198, 198, .12); font-size: 12px; font-weight: 600; white-space: nowrap; }
.h2-vis .tk { width: 14px; height: 14px; margin: 0; }
.h2-vis svg { width: 13px; height: 13px; }
.hv-chip, .hv-eq, .hv-win { display: inline-flex; align-items: center; gap: 4px; }
.hv-plus { color: #898989; }
.hv-eq { margin-left: 4px; padding: 3px 8px; border-radius: 99px; background: rgba(137, 137, 137, .25); }
.hv-clk { font-family: ui-monospace, Consolas, monospace; padding: 3px 7px; border-radius: 6px; background: #c6c6c6; color: #131313; }
.hv-mv { padding: 3px 7px; border-radius: 6px; color: rgba(198, 198, 198, .6); }
.hv-mv.on { background: rgba(137, 137, 137, .3); color: #e7e7e7; }
.hv-gates { display: grid; grid-template-columns: repeat(6, 7px); gap: 2px; }
.hv-gates i { width: 7px; height: 7px; border-radius: 2px; background: rgba(137, 137, 137, .3); animation: gate 1.4s ease-in-out infinite; }
.hv-gates i:nth-child(3n) { animation-delay: .3s; } .hv-gates i:nth-child(4n) { animation-delay: .7s; } .hv-gates i:nth-child(5n) { animation-delay: 1s; }
.hv-ok { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; color: #cccccc; }
.hv-win { font-size: 15px; color: #e7e7e7; }
.hv-fee { padding: 3px 8px; border-radius: 99px; background: rgba(198, 198, 198, .14); color: #c6c6c6; }
@media (max-width: 900px) { .how2 { grid-template-columns: 1fr; gap: 26px; } }
@media (max-width: 560px) {
  .h2-s { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 10px 0; }
  .h2-ic { width: 48px; height: 48px; border-radius: 14px; }
  .h2-steps::before { left: 23px; }
  .h2-vis { grid-column: 2; justify-self: start; }
}

.in-big { font-family: 'Playfair Display', Georgia, serif !important; font-weight: 800 !important; letter-spacing: -.01em !important; }
.in-big .w:last-child > span, .in-big .w:nth-last-child(2) > span { font-style: italic; background: linear-gradient(180deg, #ececec, #898989); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
/* nav sits in the right-hand group, clear of the island in the middle */
.top-r .navl { margin: 0 4px 0 0; padding-right: 8px; border-right: 1px solid var(--line); }
@media (max-width: 1239px) and (min-width: 901px) { .navl a span { display: none; } .navl a { width: 34px; padding: 0; justify-content: center; } .navl a svg { width: 16px; height: 16px; opacity: 1; } }
@media (max-width: 900px) {
  .top-r { flex-wrap: wrap; }
  .top-r .navl { order: 0; width: auto; margin: 0; padding: 0; border: 0; }
}
@media (max-width: 900px) {
  .top { flex-wrap: wrap; }
  .top-r { display: contents; }
  .top-r > :not(.navl) { order: 1; }
  .top .brand { margin-right: auto; }
  .top-r .navl { order: 3; width: 100%; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); justify-content: center; }
}
/* "Play. Verify. Get paid." — Poppins, one line, never wraps */
.in-big { font-family: 'Poppins', 'Inter', system-ui, sans-serif !important; font-weight: 600 !important; font-size: min(6.2vw, 78px) !important; line-height: 1.1 !important; letter-spacing: -.035em !important; white-space: nowrap; color: #e7e7e7; }
.in-big br { display: none; }
.in-big .w > span { font-style: normal !important; }
.in-big .w:nth-last-child(2) > span { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: #e7e7e7; padding-right: 0; }
.in-big .w:nth-last-child(2) > span, .in-big .w:last-child > span { background: linear-gradient(180deg, #e7e7e7 10%, #898989 110%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .02em; }
.sc5 .in-sub { font-size: clamp(14px, 1.6vw, 17px); letter-spacing: .01em; }
@media (max-width: 480px) { .in-big { font-size: 8.6vw !important; letter-spacing: -.04em !important; } }
@media (min-width: 1240px) { .navl a { padding: 0 8px; gap: 5px; } .top-r .navl { padding-right: 6px; } }
.me-chip span { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 901px) { body.isl-wide .navl a span { display: none; } body.isl-wide .navl a { width: 34px; padding: 0; justify-content: center; } }
.in-launch { height: 40px; padding: 0 16px 0 18px; gap: 7px; font-size: 13px; font-weight: 700; color: #131313 !important; background: linear-gradient(180deg, #d5d5d5, #898989) !important; border: 0 !important; box-shadow: 0 10px 24px -10px rgba(137, 137, 137, .7); }
.in-launch:hover { filter: brightness(1.06); }
.in-launch svg { width: 15px; height: 15px; }

/* ---------- v10: real tournaments and direct messages ---------- */
a.mitem { color: var(--ink) !important; text-decoration: none !important; cursor: pointer; }
.bk.t4 { grid-template-columns: 1.1fr 1fr; }
.bk.t8 { grid-template-columns: 1.1fr 1fr .95fr; }
.bk-m { position: relative; }
.bk-m.is-live { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.bk-live { position: absolute; right: 6px; top: -8px; font-size: 9px; font-weight: 800; letter-spacing: .08em; padding: 1px 6px; border-radius: 99px; background: #c0392b; color: #fff; animation: pulse 1.4s infinite; }
.bk-p.lost { opacity: .5; }
.bk-p.lost span { text-decoration: line-through; }
.bk-p.you span { font-weight: 700; }
.bk-p.tbd { color: var(--muted); font-style: italic; min-height: 31px; }
.t-seats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.t-seat { position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.t-seat img.av.sm { width: 38px; height: 38px; }
.t-seat .flag { position: absolute; right: -3px; bottom: -2px; width: 15px; height: 11px; margin: 0; }
.t-seat.empty { border: 2px dashed var(--line); color: var(--muted); font-weight: 700; }
.t-in { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--rs); background: var(--good-soft); color: var(--good); font-size: 13px; font-weight: 600; }
.t-in svg { width: 16px; height: 16px; flex: none; }
.t-in span { flex: 1; }
.t-champ { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: calc(var(--r) + 2px); color: #e7e7e7; background: linear-gradient(135deg, #4f4f4f, #1d1d1d); }
.t-champ > svg { width: 30px; height: 30px; color: #d5d5d5; flex: none; }
.t-champ div { flex: 1; }
.t-champ small { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #a7a7a7; }
.t-champ b { display: block; font: 700 19px 'Playfair Display', Georgia, serif; }
.t-champ span { font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; color: #c6c6c6; }
.t-champ .tk { width: 14px; height: 14px; margin: 0; }
.t-champ img.av.lg { margin: 0; width: 54px; height: 54px; box-shadow: 0 0 0 3px #d5d5d5; }
.t-form { padding: 14px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: calc(var(--r) + 2px); background: var(--card2); }
.t-form[hidden] { display: none; }

/* direct messages */
button.cx-p { padding: 0; cursor: pointer; transition: transform .15s; }
button.cx-p:hover { transform: translateY(-2px); z-index: 1; }
.cm-av[data-dm], .cm-h b[data-dm] { cursor: pointer; }
.cm-h b[data-dm]:hover { text-decoration: underline; }
.cx-dmh { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line2); font-size: 13.5px; }
.cx-dmh img.av.sm { width: 30px; height: 30px; box-shadow: none; }
.cx-dmh .flag { margin: 0; }
.cx-back { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--ink2); }
.cx-back:hover { background: var(--card2); }
.cx-back svg { width: 16px; height: 16px; }
.cx-st { margin-left: auto; font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.cx-st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.cx-st.on { color: var(--good); }
.cx-st.on::before { background: var(--good); }
.cx-dms { padding: 6px 8px 12px; }
.cx-sec { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 12px 8px 6px; }
.cx-thread { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 12px; text-align: left; }
.cx-thread:hover { background: var(--card2); }
.cx-thread img.av.sm { width: 38px; height: 38px; box-shadow: none; flex: none; }
.cx-tt { flex: 1; min-width: 0; }
.cx-tt b { display: flex; align-items: center; font-size: 13.5px; }
.cx-tt b .flag { width: 14px; height: 10px; }
.cx-tt small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-thread time { font-size: 10.5px; color: var(--muted); }
.cx-none { font-size: 12.5px; color: var(--muted); padding: 6px 8px; }


/* ---------- v11: real stakes, faucet, quick match ---------- */
.faucet-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 2px; }
.faucet-row small { flex: 1; min-width: 160px; color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.quick-btn { display: flex; align-items: center; gap: 12px; justify-content: flex-start; text-align: left; margin: 14px 0 10px; padding: 14px 16px; }
.quick-btn > svg { flex: none; width: 20px; height: 20px; }
.quick-btn span { display: flex; flex-direction: column; gap: 2px; }
.quick-btn b { font-size: 15.5px; }
.quick-btn small { font-weight: 500; opacity: .78; font-size: 12px; }
.wait-bot { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; margin: 14px 0 4px; padding: 12px 14px; animation: wbIn .45s ease both; }
.wait-bot[hidden] { display: none; }
.wait-bot span { color: var(--muted); font-size: 13px; line-height: 1.45; }
@keyframes wbIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tx-a { font-family: ui-monospace, Consolas, monospace; font-size: .92em; color: var(--good); text-decoration: none; border-bottom: 1px dashed currentColor; white-space: nowrap; }
.tx-a:hover { border-bottom-style: solid; }
.bad-t { color: var(--bad); }

/* intro impact: sparks instead of the expanding ring */
.in-burst { position: fixed; z-index: 5; left: 50%; top: 45%; width: 0; height: 0; pointer-events: none; }
.in-burst i { position: absolute; left: 0; top: 0; width: 4px; height: 30px; margin: -15px 0 0 -2px; border-radius: 3px; opacity: 0;
  background: linear-gradient(to top, rgba(189, 189, 189, 0), #bdbdbd 50%, #f5f5f5); box-shadow: 0 0 8px rgba(169, 169, 169, .9), 0 0 2px rgba(40, 40, 40, .6);
  animation: inSpark .8s cubic-bezier(.12, .8, .3, 1) forwards; }
@keyframes inSpark {
  0% { opacity: 1; transform: rotate(var(--a)) translateY(-14px) scaleY(.3); }
  55% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d))) scaleY(1.1); }
}
@media (prefers-reduced-motion: reduce) { .in-burst { display: none; } }

/* ---------- v12: clear notification cards ---------- */
.toasts { top: 84px; right: 18px; z-index: 120; gap: 10px; pointer-events: none; }
.nt { pointer-events: auto; position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 12px; width: min(360px, calc(100vw - 24px)); padding: 14px 40px 14px 14px; border-radius: 16px;
  background: #181818; color: #e7e7e7; border: 1px solid rgba(198, 198, 198, .18); box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .2);
  font-family: 'Inter', system-ui, sans-serif; animation: ntIn .45s cubic-bezier(.2, 1.2, .35, 1) both; }
.nt.out { animation: ntOut .3s ease forwards; }
.nt::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--nt, #898989); }
.nt-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--nt, #898989); color: #131313; font-weight: 800; font-size: 16px; }
.nt-ic svg { width: 18px; height: 18px; }
.nt-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 1px; }
.nt-t b { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.nt-t small { font-size: 12.5px; color: rgba(231, 231, 231, .72); line-height: 1.4; }
.nt-x { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; color: rgba(231, 231, 231, .6); font-size: 18px; line-height: 1; }
.nt-x:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nt-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--nt, #898989); opacity: .55; transform-origin: left; animation: ntBar var(--life, 4s) linear forwards; }
.nt-ok { --nt: #7FC98F; } .nt-win { --nt: #bababa; } .nt-lose { --nt: #D9776B; } .nt-warn { --nt: #a4a4a4; } .nt-draw { --nt: #c6c6c6; } .nt-info { --nt: #898989; }
@keyframes ntIn { from { opacity: 0; transform: translateX(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes ntOut { to { opacity: 0; transform: translateX(30px) scale(.96); } }
@keyframes ntBar { to { transform: scaleX(0); } }
@media (max-width: 640px) {
  .toasts { top: 70px; left: 12px; right: 12px; align-items: stretch; }
  .nt { width: auto; }
  @keyframes ntIn { from { opacity: 0; transform: translateY(-16px) scale(.97); } to { opacity: 1; transform: none; } }
  @keyframes ntOut { to { opacity: 0; transform: translateY(-12px); } }
}
@media (prefers-reduced-motion: reduce) { .nt, .nt.out, .nt-bar { animation-duration: .01ms; } }

.nt-act { display: flex; gap: 8px; margin-top: 10px; }
.nt-act .btn.pri { background: #c6c6c6; color: #131313; }
.nt-act .btn.ghost { background: transparent; color: #e7e7e7; border: 1px solid rgba(198, 198, 198, .35); }

/* ---------- v13: mobile chat with the keyboard up ---------- */
@media (max-width: 560px) {
  /* Fit the chat sheet to the part of the screen the keyboard leaves visible (set from visualViewport). */
  .cx { top: var(--vv-top, 0px); bottom: auto; height: var(--vv-h, 100dvh); max-height: none; }
  .cx-form { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); gap: 8px; }
  body.kb-up .cx-form { padding-bottom: 8px; }
  body.kb-up .cx-people, body.kb-up .cx-sub { display: none; }
  body.chat-open { overflow: hidden; }
  body.chat-open .cx-fab { opacity: 0; pointer-events: none; }
}
/* 16px text stops phones from zooming into the box (which pushed the send button off screen). */
@media (max-width: 900px) { .cx-in, .mchat .cx-in, .input { font-size: 16px; } }
.cx-send { min-width: 42px; }

/* ----- profile setup ----- */
.ob2 { max-width: 520px; }
.ob-head { text-align: center; margin-bottom: 18px; }
.ob-kick { margin: 0 0 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.ob-head h2 { margin: 0 0 6px; }
.ob-head .muted { margin: 0 auto; max-width: 380px; }
.ob-pfp { display: flex; align-items: center; gap: 18px; padding: 14px; margin-bottom: 12px; border-radius: 18px; background: var(--card2); border: 1px solid var(--line); }
.ob-ph { position: relative; flex: 0 0 auto; width: 92px; height: 92px; border-radius: 50%; cursor: pointer; }
.ob-ph img.av { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--accent), 0 10px 24px -8px rgba(0,0,0,.35); transition: transform .2s; }
.ob-ph:hover img.av { transform: scale(1.03); }
.ob-cam { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--accent); box-shadow: 0 0 0 3px var(--card); }
.ob-cam svg { width: 17px; height: 17px; }
.ob-pfp-t { min-width: 0; }
.ob-pfp-t b { display: block; font-size: 15px; }
.ob-pfp-t small { display: block; color: var(--muted); margin: 2px 0 10px; }
.ob-pfp-t .row { gap: 8px; flex-wrap: wrap; }
.ob-pfp-t .btn svg { width: 15px; height: 15px; }
.ob2 .av-grid { grid-template-columns: repeat(6, 1fr); margin-bottom: 16px; }
.ob-at { height: 48px; position: relative; }
.ob-at .input { height: 46px; font-size: 16px; font-weight: 600; }
.ob-st { flex: 0 0 auto; width: 26px; height: 26px; margin-right: 10px; border-radius: 50%; display: grid; place-items: center; }
.ob-st.ok { color: #fff; background: #3c8a5a; }
.ob-st.ok svg { width: 15px; height: 15px; }
.ob-st .spin { width: 16px; height: 16px; }
.ob-prev { margin: 4px 0 12px; padding: 12px 14px; border-radius: 16px; border: 1px dashed var(--line); }
.ob-prev > small { display: block; font-size: 11.5px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.ob-prev-row { display: flex; align-items: center; gap: 12px; }
.ob-prev-row .ch-av { position: relative; }
.ob-prev-row .isl-dot { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; box-shadow: 0 0 0 2px var(--card); }
.ob-prev-t { flex: 1; min-width: 0; }
.ob-prev-t b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-prev-t small { color: var(--muted); font-size: 12.5px; }
.ob-prev-dm { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); }
.ob-prev-dm svg { width: 18px; height: 18px; }
.ob-wal { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 10px 14px; border-radius: 14px; background: var(--card2); font-size: 13px; }
.ob-wal > svg { width: 18px; height: 18px; color: var(--accent); flex: 0 0 auto; }
.ob-wal span { flex: 1; min-width: 0; }
.ob-wal small { color: var(--muted); font-size: 11.5px; }
@media (max-width: 760px) {
  .ob2 .av-grid { gap: 6px; }
  .ob-pfp { gap: 14px; padding: 12px; }
  .ob-ph, .ob-ph img.av { width: 80px; height: 80px; }
}

/* ---------- replay and coach ---------- */
.rp-load { padding: 60px 10px; text-align: center; color: var(--muted); }
.rp-h h2 { font-size: 22px; margin: 6px 0 2px; overflow-wrap: anywhere; } .rp-h i { color: var(--muted); font-style: normal; font-size: .7em; } .rp-h p { margin: 0 0 16px; font-size: 13px; }
.rp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 20px; align-items: start; }
.rp-bw { display: flex; gap: 8px; max-width: 560px; margin: 0 auto; }
.rp-board { flex: 1; min-width: 0; }
.rp-bar { display: none; width: 10px; border-radius: 5px; overflow: hidden; background: #252525; position: relative; border: 1px solid var(--line); }
.rp-bar.on { display: block; } .rp-bar i { position: absolute; left: 0; right: 0; bottom: 0; background: #eaeaea; transition: height .3s; } .rp-bar.flip i { bottom: auto; top: 0; }
.rp-ctl { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 12px 0; } .rp-ctl span { min-width: 72px; text-align: center; font-size: 13px; } .rp-ctl .btn { min-width: 44px; min-height: 40px; justify-content: center; }
.rp-list { max-width: 560px; margin: 0 auto; max-height: 132px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--rs); background: var(--card2); padding: 8px 10px; font-size: 13px; line-height: 1.9; }
.rp-list .no { color: var(--muted); margin: 0 3px 0 6px; } .rp-list button { border: 0; background: none; color: inherit; font: inherit; padding: 1px 6px; border-radius: 6px; cursor: pointer; }
.rp-list button:hover { background: var(--line2); } .rp-list button.on { background: var(--accent); color: #fff; }
.rp-list .k-inaccuracy:not(.on), .rp-m .k-inaccuracy { color: var(--warn); } .rp-list .k-mistake:not(.on), .rp-m .k-mistake { color: #c2611f; } .rp-list .k-blunder:not(.on), .rp-m .k-blunder { color: var(--bad); }
.rp-list [class*=k-] { font-weight: 700; }
.rp-coach { padding: 14px; } .rp-coach > p { font-size: 13.5px; line-height: 1.55; margin: 10px 0; }
.rp-ch b { font-size: 16px; } .rp-ch small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; margin-top: 3px; }
.rp-acc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; } .rp-acc div { border: 1px solid var(--line); border-radius: var(--rs); padding: 8px 10px; background: var(--card); min-width: 0; } .rp-acc small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; } .rp-acc b { font-size: 20px; }
.rp-acc div::after { content: 'accuracy'; font-size: 11px; color: var(--muted); margin-left: 5px; }
.rp-m { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: var(--rs); padding: 10px 12px; margin-top: 8px; cursor: pointer; }
.rp-m:hover, .rp-m.on { border-color: var(--accent); } .rp-m span { font-size: 12px; font-weight: 700; margin-right: 8px; } .rp-m p { margin: 5px 0; font-size: 13px; line-height: 1.5; } .rp-m small { color: var(--muted); font-size: 12px; }
@media (max-width: 900px) { .rp-grid { grid-template-columns: minmax(0, 1fr); } }
