/* Themes. The default is naranja (Retador's bright orange on a warm black); ?theme=violet is the other. */
:root,:root[data-theme=naranja]{--bg:#110d0a;--bar:#16110d;--panel:#1e1712;--panel2:#2a2019;--line:#33271e;--text:#f7f2ec;--muted:#a3968a;
  --accent:#ff7a1a;--on-accent:#190b02;--accent2:#35e0a1;--coin:#ffd34d;--live:#ff5a4e;
  --hero:radial-gradient(120% 140% at 85% 10%,#7a3206 0%,#35190a 38%,#15100c 75%)}
:root[data-theme=violet]{--bg:#0f0e1a;--bar:#141324;--panel:#1b1a2e;--panel2:#25233d;--line:#2d2b49;--text:#f3f2ff;--muted:#908eb5;
  --accent:#8f6bff;--on-accent:#ffffff;--accent2:#2ee6d6;--coin:#ffd34d;--live:#ff4f7b;
  --hero:radial-gradient(120% 140% at 85% 10%,#5a2fd0 0%,#2a1b6b 40%,#151329 78%)}

*{box-sizing:border-box;margin:0}
html,body{background:var(--bg);height:100%}
body{color:var(--text);font:14px/1.4 'Poppins','Segoe UI',system-ui,-apple-system,sans-serif;-webkit-font-smoothing:antialiased}
button{font:inherit;color:inherit;cursor:pointer;border:0;background:none;text-align:inherit}
a{color:inherit;text-decoration:none}
.display{font-family:'Poppins Display','Arial Black','Segoe UI Black',Impact,sans-serif;font-weight:900;letter-spacing:-.02em}
.muted,.m{color:var(--muted)}
.small{font-size:11px}
.spacer{flex:1}

.topbar{position:sticky;top:0;z-index:10;height:64px;background:var(--bar);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:12px;padding:0 20px}
.logo{font-size:22px;display:flex;align-items:center;gap:8px}
.logo{font-style:italic;padding-right:4px}
.logo img{height:36px;width:auto;flex:none;display:block}
.logo em{font-style:inherit;color:var(--accent)}
.wallet{background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:8px 12px;font-weight:800;display:flex;gap:8px;align-items:center}
.wallet small{font-size:9px;font-weight:900;color:var(--muted);letter-spacing:.08em}
.coin{width:16px;height:16px;border-radius:50%;background:var(--coin);box-shadow:inset 0 0 0 3px #0003;display:inline-block;flex:none;vertical-align:-2px}
/* Buttons: one system for the whole site.
   Kind:   .btn            secondary, the default: a second choice beside a primary one, or an action that is not the screen's main one
           .btn.primary    the one main action of a screen, card or sheet
           .btn.ghost      a quiet action laid over art or a photo
           .btn.danger     cancels or takes away something that matters (logging out, cancelling a withdrawal)
           .btn.wa         WhatsApp, in WhatsApp's green
   Size:   .btn.sm 36px (inside rows and lists), .btn 44px, .btn.big 52px (a screen's main action)
   Width:  .btn.block fills its line; .btn-row lays two or three buttons side by side in equal parts
   An icon (a Lucide svg) goes before the label: the button sizes and spaces it. A button with only an icon is .btn.icon. */
:root{--r-btn:12px;--r-card:14px;--r-sheet:20px;--h-sm:36px;--h-md:44px;--h-lg:52px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:var(--h-md);padding:9px 18px;border-radius:var(--r-btn);background:var(--panel2);color:var(--text);
  font-weight:800;font-size:14px;line-height:1.15;white-space:nowrap;text-align:center;vertical-align:middle;
  -webkit-tap-highlight-color:transparent;touch-action:manipulation;transition:filter .12s,transform .08s,background-color .12s}
.btn svg.lucide{width:18px;height:18px;vertical-align:0;flex:none}
@media (hover:hover){.btn:hover{filter:brightness(1.12)}}
.btn:active{transform:translateY(1px) scale(.985);filter:brightness(.92)}
.btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.btn.primary{background:var(--accent);color:var(--on-accent)}
.btn.ghost{background:#ffffff1c;color:#fff}
.btn.danger{background:color-mix(in srgb,var(--live) 12%,transparent);color:var(--live);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--live) 45%,transparent)}
.btn.wa{background:#25d366;color:#05210f}
.btn.sm{min-height:var(--h-sm);padding:7px 12px;font-size:13px;border-radius:10px;gap:6px}
.btn.sm svg.lucide{width:16px;height:16px}
.btn.big{min-height:var(--h-lg);padding:12px 24px;font-size:16px;border-radius:var(--r-card);gap:10px}
.btn.big svg.lucide{width:20px;height:20px}
.btn.block{display:flex;width:100%}
.btn.icon{padding:0;width:var(--h-md);flex:none}
.btn.sm.icon{width:var(--h-sm)}
.btn[disabled],.btn.busy{opacity:.45;cursor:default;filter:none;transform:none;pointer-events:none}
.btn-row{display:flex;gap:8px;width:100%}
.btn-row>.btn{flex:1 1 0;min-width:0;white-space:normal;padding-left:10px;padding-right:10px}
@media (max-width:400px){.btn-row>.btn{font-size:13px;gap:6px}.btn-row>.btn svg.lucide{width:16px;height:16px}}
.chip{background:var(--panel2);border-radius:8px;padding:9px 16px;font-weight:700;font-size:13px}
.chip.on{background:var(--text);color:var(--bg)}
.chips{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 14px}
/* The language switch: two words side by side, the one in use lit. */
.lang{display:inline-flex;flex:none;gap:2px;padding:3px;background:var(--panel2);border-radius:9px}
.lang button{border-radius:7px;padding:6px 11px;font-size:12.5px;font-weight:700;line-height:1.2;color:var(--muted)}
.lang button.on{background:var(--text);color:var(--bg)}
.lang button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}

.shell{display:flex}
.side{width:248px;flex:none;position:sticky;top:64px;height:calc(100vh - 64px);overflow:auto;padding:18px 14px;display:flex;flex-direction:column;gap:14px;background:var(--bar);border-right:1px solid var(--line)}
.nav{background:var(--panel);border-radius:12px;padding:6px}
.nav a{display:flex;align-items:center;gap:12px;padding:11px 12px;border-radius:8px;font-weight:700}
.nav a.on{background:var(--panel2)}
.nav a span{width:20px;text-align:center;color:var(--muted)}
.nav a.on span{color:var(--accent)}
.sidecard{background:var(--panel);border-radius:12px;padding:16px}
.sidecard b{display:block;font-size:15px;margin-bottom:4px}
.sidecard p{color:var(--muted);font-size:12px;margin-bottom:12px}
.sidecard .btn{width:100%}
main{flex:1;min-width:0;padding:22px 28px 60px}
.wrap{max-width:1120px;margin:0 auto;display:flex;flex-direction:column;gap:26px}
.wrap.narrow{max-width:640px;gap:14px}

/* Lobby banner: the games' characters (web/art/hero.webp, made by tools/lobby-art.js) fading into the panel on the left, where the words are */
.hero{background:var(--hero);border-bottom:1px solid var(--line);margin:-22px -28px 26px;padding:40px max(28px,calc((100% - 1120px)/2));position:relative;overflow:hidden;isolation:isolate;min-height:330px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:14px}
.heroart{position:absolute;right:calc(max(28px,(100% - 1120px)/2) - 40px);top:50%;height:116%;transform:translateY(-50%);z-index:-1;pointer-events:none;-webkit-mask:linear-gradient(90deg,transparent 30%,#000 56%);mask:linear-gradient(90deg,transparent 30%,#000 56%)}
.kicker{display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--accent);background:#0000005c;border:1px solid #ffffff1f;border-radius:999px;padding:6px 12px}
.kicker i,.badge.live i{width:7px;height:7px;border-radius:50%;background:var(--live);flex:none;animation:pulse 1.6s ease-in-out infinite}
@keyframes pulse{50%{opacity:.35}}
.hero h1{font-size:54px;line-height:1;max-width:560px;text-shadow:0 3px 18px #000a}
.hero h1 em{font-style:normal;color:var(--accent)}
.hero p{color:#ffffffd0;max-width:440px;font-size:15px;text-shadow:0 1px 8px #000}
.hero .cta{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}

.note{display:none;background:var(--panel);border:1px dashed var(--line);border-radius:12px;padding:12px 16px;color:var(--muted);font-size:13px}
.note .textlink{color:var(--accent);font-weight:700}
.banner{background:var(--panel);border:1px solid var(--accent);border-radius:14px;padding:16px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.banner b{font-size:16px}
.banner p{color:var(--muted);font-size:13px}
.banner b svg.lucide{vertical-align:-3px}
/* On a phone a banner's words take the whole width and its button goes under them, as wide as the card. */
@media (max-width:560px){.banner{flex-direction:column;align-items:stretch;gap:12px}.banner .btn{width:100%}}

.head{display:flex;align-items:baseline;gap:12px;margin-bottom:14px}
.head h2{font-size:22px;font-weight:800}
.head .muted{font-size:13px}

.tiers{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.tier{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:4px}
.tier.on{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.tier[disabled]{opacity:.35;cursor:default}
/* The bet is picked in the sheet of a game that has a mode choice; the other games ask on their own first screen. */
.sheet .tiers{grid-template-columns:repeat(4,1fr);gap:8px}
.sheet .tier{padding:11px 4px;align-items:center;border-radius:12px}
.sheet .tier .amt{font-size:16px;gap:5px}
.sheet .tier .winamt{font-size:11px}
.tier .amt{font-size:24px;display:flex;align-items:center;gap:8px}
.tier .winamt{font-size:12px;color:var(--accent2);font-weight:700}

/* Game tiles: portrait covers (art.cover) with the name centred at the foot. Seven across on a wide desktop, stepping down to three on a phone. */
.tiles{display:grid;grid-template-columns:repeat(7,1fr);gap:14px}
.tile{min-width:0;display:block;border-radius:16px}
.art{display:block;aspect-ratio:3/4;border-radius:16px;position:relative;overflow:hidden;transition:transform .15s,box-shadow .15s;box-shadow:0 10px 26px #0006}
.tile:hover .art,.tile:focus-visible .art{transform:translateY(-4px);box-shadow:0 0 0 2px var(--accent),0 18px 36px #0009}
.tile:active .art{transform:scale(.98)}
.art .cover{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .35s}
.tile:hover .cover{transform:scale(1.05)}
.art:before{content:'';position:absolute;inset:0;z-index:1;pointer-events:none;background:radial-gradient(circle at 50% 28%,#ffffff40,transparent 55%),linear-gradient(180deg,transparent 45%,#000000a0)}
.art.covered:before{background:linear-gradient(180deg,#00000040 0,transparent 22%,transparent 48%,#000000e6 92%)}
.art:after{content:'';position:absolute;inset:0;z-index:3;border-radius:inherit;box-shadow:inset 0 0 0 1px #ffffff24;pointer-events:none}
.art .glyph{position:absolute;top:16%;left:0;right:0;text-align:center;font-family:'Poppins Display','Arial Black',Impact,sans-serif;font-size:clamp(34px,4.5vw,60px);line-height:1;color:#fff;text-shadow:0 4px 0 #0004,0 10px 24px #0006}
.badges{position:absolute;z-index:2;top:8px;left:8px;right:8px;display:flex;gap:4px}
.badge{display:inline-flex;align-items:center;gap:5px;background:#000000a8;color:#fff;font-size:9.5px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;border-radius:999px;padding:4px 7px;line-height:1.2}
.badge:last-child{margin-left:auto}
.badge svg.lucide{vertical-align:0}
.label{position:absolute;z-index:2;left:8px;right:8px;bottom:12px;text-align:center}
.art .name{font-family:'Poppins Display','Arial Black',Impact,sans-serif;font-size:15px;line-height:1.05;color:#fff;text-shadow:0 2px 0 #0008,0 4px 14px #000a;overflow-wrap:break-word}
.art .genre{font-size:9px;letter-spacing:-.02em;color:#ffffffb0;margin-top:6px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* How it works */
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.step{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:16px 18px;display:flex;gap:14px;align-items:flex-start}
.step b{font-size:30px;line-height:1;color:var(--accent)}
.step strong{font-size:15px}
.step p{color:var(--muted);font-size:13px;margin-top:2px}

.table{background:var(--panel);border-radius:14px;overflow:hidden}
.tr{display:grid;gap:10px;padding:12px 18px;align-items:center;border-top:1px solid var(--line);font-weight:600;width:100%}
.tr.r3{grid-template-columns:1.6fr 1fr .8fr}
/* The weekly rankings (Ranks): the games as a strip of tiles, the first three on a podium, the rest in a table. */
.wrap.ranks{max-width:760px;gap:16px}
.rank-games{display:flex;gap:6px;overflow-x:auto;padding-bottom:6px;scrollbar-width:thin}
.rank-games .picker-tile{flex:0 0 78px}
.podium{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:end}
.podium-card{position:relative;background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:22px 12px 14px;display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;min-width:0}
.podium-card .place{position:absolute;top:-14px;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-weight:900;font-size:14px;color:#190b02;background:#c9c3bc}
.podium-card.p1{order:2;padding-top:34px;border-color:var(--coin);background:linear-gradient(180deg,color-mix(in srgb,var(--coin) 16%,var(--panel)),var(--panel))}
.podium-card.p1 .place{background:var(--coin);width:36px;height:36px;top:-18px;font-size:16px}
.podium-card.p2{order:1}
.podium-card.p3{order:3}
.podium-card.p3 .place{background:#d08a4e}
.podium-card .who{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.podium-card .best{font-size:26px;color:var(--accent)}
.podium-card.me,.tr.mine{box-shadow:inset 0 0 0 2px var(--accent)}
.tr.r4{grid-template-columns:36px 1.6fr 1fr .9fr}
.tr .who{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rank-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.rank-empty{align-items:center;text-align:center;gap:10px;padding:34px 18px}
.rank-empty svg{color:var(--coin)}
@media (max-width:520px){.podium-card .best{font-size:20px}.podium-card .who{font-size:12px}}
.tr.th{border:0;background:var(--panel2);color:var(--muted);font-size:11px;font-weight:700}
.tr.link:hover{background:var(--panel2)}
.outcome{font-weight:800}
.outcome.win{color:var(--accent2)}
.outcome.loss{color:var(--live)}

.panel{background:var(--panel);border-radius:14px;padding:18px;display:flex;flex-direction:column;gap:6px}
.panel .big{font-size:20px}
.form{gap:12px}
.form label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--muted);font-weight:700}
.form input{background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:12px;color:var(--text);font:inherit;font-size:16px}
.form input:focus{outline:2px solid var(--accent);border-color:transparent}
.textlink{color:var(--muted);font-size:13px;text-align:center;text-decoration:underline}
/* Log in and register (AuthForm, AuthDialog). On a phone the dialog is a sheet with the art as a banner; from 820px it is two panes side by side. */
.form label small{font-weight:600;opacity:.8}
.form input::placeholder{color:var(--muted);opacity:.6;font-size:14px}
.authtabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;background:var(--bg);border:1px solid var(--line);border-radius:12px;padding:4px}
.authtabs button{padding:10px;border-radius:9px;font-weight:800;color:var(--muted);text-align:center}
.authtabs button.on{background:var(--panel2);color:var(--text)}
.pwd{position:relative;display:flex}
.pwd input{flex:1;min-width:0;padding-right:76px}
.pwd button{position:absolute;right:6px;top:50%;transform:translateY(-50%);padding:6px 8px;font-size:12px;font-weight:800;color:var(--muted)}
.formerr{color:#ffb4ac;font-size:13px;font-weight:700;background:#3a1f1f;border-radius:10px;padding:9px 12px}
.giftline{display:flex;align-items:center;gap:8px;color:var(--coin);font-size:13px;font-weight:800;border-radius:10px;padding:9px 12px;background:color-mix(in srgb,var(--coin) 11%,transparent);border:1px solid color-mix(in srgb,var(--coin) 32%,transparent)}
.giftline svg{flex:none}
.center-text{text-align:center}
/* Identity documents asked for by the back office (KycPanel) */
.panel.kyc{gap:10px;border:1px solid var(--coin)}
.kycrow{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;font-weight:700;font-size:14px}
.kycrow .chip button{margin-left:6px;font-weight:900}
.textlink.left{text-align:left;align-self:flex-start}
.form.rename{display:flex;flex-direction:column;gap:10px;margin:6px 0 10px}
/* Add funds (DepositSheet): the same kind of dialog. One column on a phone; from 820px the amount and the way of paying on the left, what it comes to on the right. */
.cashbox{position:relative;background:var(--bar);border:1px solid var(--line);border-radius:20px 20px 0 0;width:100%;max-width:520px;max-height:96dvh;overflow-y:auto;display:flex;flex-direction:column}
.cashmain{display:flex;flex-direction:column;gap:12px;padding:22px 20px 14px}
.cashbox.one .cashmain{padding-bottom:calc(22px + env(safe-area-inset-bottom))}
.cashmain h3{font-size:24px;padding-right:40px}
.cashstep{display:flex;align-items:center;gap:8px;font-weight:800;font-size:13px;margin-top:4px}
.cashstep i{font-style:normal;width:22px;height:22px;border-radius:50%;background:var(--panel2);color:var(--accent);display:grid;place-items:center;font-size:12px}
.amounts.four{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.amounts.four .amount{padding:12px 4px;display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0}
.amounts.four .amount b{font-size:18px}
.amounts.four .amount small{font-size:10px;line-height:1.15;font-weight:800;color:var(--coin);text-align:center}
@media (max-width:819px){.amounts.four .amount b{font-size:16px}.cashside{gap:7px;padding-top:12px}.cashside>.muted.small,.cashside .sumrow:first-child{display:none}.sumrow.total{border-top:0;padding-top:0}}
.amounts.six{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.amounts.six .amount{padding:11px 4px;display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0}
.amounts.six .amount b{font-size:18px}
.amounts.six .amount small{font-size:10px;line-height:1.15;font-weight:800;color:var(--coin);text-align:center}
/* The first-deposit match, step by step: the one the amount has reached is lit, the ones below it ticked off. */
.tiers-match{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:6px}
.mtier{display:flex;flex-direction:column;align-items:center;gap:1px;padding:8px 2px;border-radius:10px;background:var(--panel);border:1px solid var(--line);min-width:0}
.mtier b{font-size:15px;color:var(--muted)}
.mtier small{font-size:10px;color:var(--muted);font-weight:700;white-space:nowrap}
.mtier.past b{color:var(--text)}
.mtier.on{border-color:var(--coin);background:color-mix(in srgb,var(--coin) 12%,transparent)}
.mtier.on b,.mtier.on small{color:var(--coin)}
.nudge{font-size:13px;font-weight:800;color:var(--accent);min-height:18px}
.nudge.top{color:var(--coin)}
.methods{display:flex;flex-direction:column;gap:8px}
.method{display:flex;align-items:center;gap:12px;text-align:left;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:12px 14px}
.method:hover{border-color:var(--accent)}
.method.on{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.mico{flex:none;width:40px;height:40px;border-radius:12px;background:var(--panel2);color:var(--accent);display:grid;place-items:center}
.mtext{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.mtext small{color:var(--muted);font-size:12px}
.coins{display:flex;gap:5px;flex-wrap:wrap;margin-top:4px}
.coins em{font-style:normal;font-size:10px;font-weight:800;letter-spacing:.03em;background:var(--bg);border:1px solid var(--line);border-radius:6px;padding:2px 6px;color:var(--text)}
.mtick{flex:none;width:22px;height:22px;border-radius:50%;border:1px solid var(--line);display:grid;place-items:center}
.method.on .mtick{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.coinpick{display:flex;flex-direction:column;gap:8px;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:12px 14px}
.cashside{display:flex;flex-direction:column;gap:10px;padding:16px 20px calc(20px + env(safe-area-inset-bottom));background:var(--panel);border-top:1px solid var(--line);position:sticky;bottom:0}
.sumrow{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:14px}
.sumrow span{color:var(--muted);display:flex;align-items:center;gap:6px}
.sumrow b{font-variant-numeric:tabular-nums}
.sumrow.gift b,.sumrow.gift span{color:var(--coin)}
.sumrow.total{border-top:1px solid var(--line);padding-top:10px}
.sumrow.total span{color:var(--text);font-weight:800}
.sumrow.total b{font-size:26px;color:var(--accent)}
@media (min-width:820px){
  .scrim.cash{align-items:center;padding:24px}
  .cashbox{flex-direction:row;max-width:900px;border-radius:22px;box-shadow:0 30px 90px #000c;overflow:hidden}
  .cashbox.one{max-width:480px}
  .cashmain{flex:1 1 60%;padding:30px 28px;overflow-y:auto;max-height:calc(96dvh - 48px)}
  .cashside{flex:1 1 40%;position:static;border-top:0;border-left:1px solid var(--line);padding:64px 26px 28px;gap:14px}
  .cashside .btn.big{margin-top:6px}
}
.authbox{position:relative;background:var(--bar);border:1px solid var(--line);border-radius:20px 20px 0 0;width:100%;max-width:520px;max-height:96dvh;overflow-y:auto;display:flex;flex-direction:column}
.authbox .form{display:flex;flex-direction:column;padding:18px 20px calc(20px + env(safe-area-inset-bottom))}
.authx{position:absolute;top:10px;right:10px;z-index:3;width:32px;height:32px;border-radius:50%;background:#000000a8;color:#fff;font-size:20px;line-height:1;display:grid;place-items:center}
.authart{position:relative;isolation:isolate;overflow:hidden;flex:none;min-height:132px;padding:16px 20px;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:6px;background:#1c0f06}
.authart img{position:absolute;inset:0;z-index:-2;width:100%;height:100%;object-fit:cover;object-position:100% 42%}
.authart::after{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#0d0907f0 0%,#0d0907a8 46%,transparent 78%)}
.authart .kicker{font-size:10px;padding:4px 9px;color:var(--coin)}
.authart h2{font-size:25px;line-height:1.04;max-width:64%;text-shadow:0 2px 14px #000c}
.authart h2 em{font-style:normal;color:var(--accent)}
.authart p{color:#ffffffd0;font-size:14px;text-shadow:0 1px 8px #000}
.authart ul{display:none}
@media (min-width:820px){
  .scrim.auth{align-items:center;padding:24px}
  .authbox{flex-direction:row;max-width:920px;min-height:560px;border-radius:22px;overflow:hidden;box-shadow:0 30px 90px #000c}
  .authart{flex:1 1 46%;padding:30px;gap:12px}
  .authart img{object-position:90% 50%}
  .authart::after{background:linear-gradient(0deg,#0d0907f5 0%,#0d0907c4 34%,#0d090740 58%,transparent 74%)}
  .authart .kicker{font-size:12px;padding:6px 12px}
  .authart h2{font-size:38px;max-width:none}
  .authart ul{display:grid;gap:9px;list-style:none;padding:0;margin:2px 0 0;font-size:14px;font-weight:700;color:#fffffff0;text-shadow:0 1px 8px #000}
  .authart li{display:flex;gap:9px;align-items:flex-start}
  .authart li svg{flex:none;margin-top:2px;color:var(--accent)}
  .authbox .form{flex:1 1 54%;padding:60px 32px 34px;gap:14px} /* from the top, so the tabs stay put when the side changes */
  .authbox .giftline{display:none} /* the pane beside the form already says it */
}

/* Live wins under the hero: a strip of game covers; a new win comes in on the left and pushes the rest right (LiveWins in main.js) */
.wins{--tile:128px;min-width:0}
.wins .head h2{display:flex;align-items:center;gap:12px}
.livedot{width:12px;height:12px;border-radius:50%;background:#5fe01f;box-shadow:0 0 0 5px #5fe01f33;flex:none;margin-left:5px;animation:pulse 1.6s ease-in-out infinite}
.winstrip{display:flex;gap:14px;overflow:hidden;-webkit-mask:linear-gradient(90deg,#000 calc(100% - 70px),transparent);mask:linear-gradient(90deg,#000 calc(100% - 70px),transparent)}
.win{flex:none;width:var(--tile);text-align:center;font-weight:800}
.win.in{animation:winin .5s ease-out}
@keyframes winin{from{margin-left:calc(-1*var(--tile) - 14px);opacity:0}}
.winart{position:relative;aspect-ratio:1;border-radius:18px;overflow:hidden;margin-bottom:8px;display:flex;align-items:center;justify-content:center}
.winart img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.winart img.loose{inset:8% 15% auto;width:70%;height:62%;object-fit:contain}
.winart span{font:900 54px/1 'Poppins Display','Arial Black',Impact,sans-serif;color:#fff;margin-bottom:18%}
.winart:after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,transparent 45%,#000000d0 96%);box-shadow:inset 0 0 0 1px #ffffff24;border-radius:inherit}
.winart b{position:absolute;z-index:1;left:6px;right:6px;bottom:8px;font:900 13px/1.05 'Poppins Display','Arial Black',Impact,sans-serif;color:#fff;text-shadow:0 2px 0 #0008}
.win:hover .winart{box-shadow:0 0 0 2px var(--accent)}
.winuser{color:var(--muted);font-size:14px}
.winamt{color:var(--accent2);font-size:15px}
.winamt small{font-size:10px;letter-spacing:.04em;opacity:.75}
@media (prefers-reduced-motion:reduce){.win.in{animation:none}}
@media (max-width:860px){.wins{--tile:96px}.winstrip{gap:10px}.win.in{animation-name:wininsm}.winart{border-radius:14px}.winart b{font-size:10.5px}.winuser{font-size:12px}.winamt{font-size:13px}}
@keyframes wininsm{from{margin-left:calc(-1*var(--tile) - 10px);opacity:0}}

/* Bets feed above the footer: tabs, then rows that drop in from the top (LiveBets in main.js) */
.bets{--step:62px;min-width:0}
.bets-bar{display:flex;align-items:center;gap:6px;margin-bottom:8px}
.bets-tab{padding:13px 20px;border-radius:999px;font-weight:800;font-size:15px;color:var(--muted);white-space:nowrap}
.bets-tab.on{background:var(--panel2);color:#fff}
.bets-hide{width:48px;height:48px;border-radius:50%;background:var(--panel2);color:var(--muted);display:flex;align-items:center;justify-content:center;flex:none}
.bets-hide.on{background:var(--accent);color:var(--on-accent)}
.bets-size{position:relative;flex:none;margin-left:8px}
.bets-size select{appearance:none;-webkit-appearance:none;background:var(--panel2);color:#fff;border:0;border-radius:999px;height:48px;padding:0 46px 0 28px;font:inherit;font-weight:800;font-size:15px;cursor:pointer}
.bets-size select option{background:var(--panel2);color:#fff}
.bets-size svg{position:absolute;right:18px;top:15px;pointer-events:none;color:var(--muted)}
.betrow{display:grid;grid-template-columns:1.6fr 1.2fr .9fr 1.1fr 1.1fr;gap:12px;align-items:center;height:56px;margin-bottom:6px;padding:0 20px;background:var(--panel);border-radius:28px;font-weight:800;font-size:15px;flex:none}
.betrow>div{min-width:0;display:flex;align-items:center;gap:7px;justify-content:flex-end;white-space:nowrap}
.betrow>div:nth-child(-n+2){justify-content:flex-start}
.betrow>.c-time{justify-content:center;color:var(--muted)}
.betrow.th{background:none;height:38px;margin:0;color:var(--muted);font-size:13px}
.c-game span,.betrow>.c-user{overflow:hidden;text-overflow:ellipsis}
.betrow>.c-user{display:block}
.c-game svg{color:var(--muted)}
.c-pay{color:var(--muted)}
.c-pay.won{color:var(--accent2)}
.betcur{font-size:11px;font-weight:800;letter-spacing:.04em;color:var(--muted)}
.betlist{display:flex;flex-direction:column;overflow:hidden;height:calc(var(--n)*var(--step) + 40px);-webkit-mask:linear-gradient(180deg,#000 calc(100% - 64px),transparent);mask:linear-gradient(180deg,#000 calc(100% - 64px),transparent)}
.betrow.in{animation:betin .4s ease-out}
@keyframes betin{from{margin-top:calc(-1*var(--step));opacity:0}}
.bets-empty{color:var(--muted);padding:18px 20px}
@media (prefers-reduced-motion:reduce){.betrow.in{animation:none}}
@media (max-width:1100px){.betrow{grid-template-columns:1.5fr 1fr 1fr 1fr}.betrow>.c-time{display:none}}
@media (max-width:860px){
  .bets{--step:52px}
  .bets-bar{gap:3px}
  .bets-tab{padding:9px 9px;font-size:12.5px}
  .bets-hide{width:36px;height:36px}
  .bets-hide svg{width:18px;height:18px}
  .bets-size{margin-left:1px}
  .bets-size select{height:36px;padding:0 26px 0 12px;font-size:12.5px}
  .bets-size svg{right:8px;top:10px;width:16px;height:16px}
  .betrow{grid-template-columns:1.4fr .9fr 1fr;gap:8px;height:46px;padding:0 14px;font-size:12.5px;border-radius:23px}
  .betrow.th{font-size:11px;height:30px}
  .betrow>.c-amt,.c-game svg{display:none}
  .betcur{font-size:9.5px}
}

/* Lobby footer: logo on the left, four columns of links, then the small print */
.foot{border-top:1px solid var(--line);margin-top:14px;padding:48px 0 8px;color:var(--muted);font-size:13.5px;font-weight:600;line-height:1.45;display:flex;flex-direction:column;gap:26px}
.foot-top{display:grid;grid-template-columns:1.25fr repeat(4,1fr);gap:28px;margin-bottom:22px}
.foot-brand{display:flex;flex-direction:column;align-items:flex-start;gap:38px}
.foot .logo{font-size:26px;color:var(--text)}
.foot .logo img{height:44px}
.foot-col{display:flex;flex-direction:column;align-items:flex-start;gap:20px;min-width:0}
.foot-col h4{color:#fff;font-size:15px;font-weight:800;margin-bottom:6px}
.foot-col a{font-size:15px}
.foot-col a:hover,.foot u a:hover{color:var(--text)}
/* The site's pages about itself (web/src/info.js) */
.wrap.info{max-width:720px;gap:18px;line-height:1.6}
.info .back{align-self:flex-start}
.info h1{font-size:34px;line-height:1.05}
.info section{display:flex;flex-direction:column;gap:8px}
.info h2{font-size:17px}
.info p,.info li{color:#ffffffd0;font-size:15px}
.info ul{display:flex;flex-direction:column;gap:6px;padding-left:20px}
.info li::marker{color:var(--accent)}
.info-cta{padding-top:6px}
@media (max-width:860px){.info h1{font-size:26px}}
.foot u a{cursor:default}
.foot-end{display:flex;flex-direction:column;gap:6px}
@media (max-width:1100px){.foot-top{grid-template-columns:repeat(4,1fr)}.foot-brand{grid-column:1/-1;flex-direction:row;align-items:center;justify-content:space-between;gap:16px}}
@media (max-width:860px){.foot{padding-top:30px;gap:18px;font-size:12.5px}.foot-top{grid-template-columns:repeat(2,1fr);gap:26px 16px;margin-bottom:8px}.foot .logo{font-size:20px}.foot-col{gap:14px}.foot-col a{font-size:14px}}

.scrim{position:fixed;inset:0;z-index:30;background:#000a;display:flex;align-items:flex-end;justify-content:center}
.sheet{background:var(--bar);border:1px solid var(--line);border-radius:20px 20px 0 0;padding:22px 20px calc(22px + env(safe-area-inset-bottom));width:100%;max-width:480px;display:flex;flex-direction:column;gap:12px}
.sheet h3{font-size:24px}
.option{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:3px}
.option:hover{border-color:var(--accent)}
.option b{font-size:16px}
.option span{color:var(--muted);font-size:12px}

.center{min-height:60vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;text-align:center;padding:20px}
.spinner{width:36px;height:36px;border-radius:50%;border:4px solid var(--panel2);border-top-color:var(--accent);animation:spin .8s linear infinite;display:inline-block}
.spinner.small{width:16px;height:16px;border-width:3px}
@keyframes spin{to{transform:rotate(360deg)}}
.toast{position:fixed;left:50%;bottom:calc(90px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:50;background:var(--live);color:#fff;font-weight:700;border-radius:10px;padding:12px 18px;max-width:90vw;text-align:center}

.gamescreen{position:fixed;inset:0;display:flex;flex-direction:column;background:var(--bg)}
.hud{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 14px;background:var(--bar);border-bottom:1px solid var(--line)}
.side-score{display:flex;flex-direction:column;min-width:96px}
.side-score.right{text-align:right;align-items:flex-end}
.side-score span{font-size:11px;color:var(--muted);font-weight:700}
.side-score b{font:900 20px 'Poppins Display','Arial Black',Impact,sans-serif}
.clock{font:900 22px 'Poppins Display','Arial Black',Impact,sans-serif;background:var(--panel2);border-radius:10px;padding:4px 14px}
.clock.low{color:var(--live)}
.gamescreen iframe{flex:1;border:0;width:100%}
.overlay{position:absolute;inset:0;background:#000c;display:flex;flex-direction:column;gap:14px;align-items:center;justify-content:center;font-weight:700}

.result{max-width:440px;margin:0 auto;display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center;padding-top:24px}
.result h1{font-size:44px}
.result h1.win{color:var(--accent2)}
.result h1.loss{color:var(--live)}
.prize{font-size:26px;font-weight:800;color:var(--coin);display:flex;align-items:center;gap:8px}
.vs{width:100%;display:flex;flex-direction:column;gap:10px}
.row{display:flex;align-items:center;gap:12px;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:16px}
.row.me{background:var(--panel2);border-color:var(--accent)}
.row .n{flex:1;text-align:left;font-weight:700}
.row b{font:900 22px 'Poppins Display','Arial Black',Impact,sans-serif}
.result .btn{width:100%}

.tabs{display:none}

/* On a wide screen the hero picture stops at the right edge of the content column, so it fades out on that side too */
@media (min-width:1440px){.heroart{-webkit-mask:linear-gradient(90deg,transparent 30%,#000 56%,#000 84%,transparent);mask:linear-gradient(90deg,transparent 30%,#000 56%,#000 84%,transparent)}}
@media (max-width:1500px){.tiles{grid-template-columns:repeat(6,1fr)}}
@media (max-width:1250px){.tiles{grid-template-columns:repeat(5,1fr)}}
@media (max-width:1100px){.hero h1{font-size:44px}.heroart{right:-8%}.tiles{grid-template-columns:repeat(4,1fr)}}
@media (max-width:860px){
  .side{display:none}
  .topbar{height:56px;padding:0 14px}
    .logo img{height:30px}
  main{padding:14px 14px calc(70px + env(safe-area-inset-bottom))}
  .wrap{gap:22px}
  .hero{margin:-14px -14px 22px;padding:18px 14px 18px;min-height:216px;gap:10px;justify-content:flex-end}
  .heroart{height:100%;right:0;transform:translate(3%,-50%);-webkit-mask:linear-gradient(90deg,transparent 34%,#000 60%);mask:linear-gradient(90deg,transparent 34%,#000 60%)}
  .kicker{font-size:10px;padding:5px 9px;gap:6px}
  .hero h1{font-size:26px;max-width:56%}
  .hero p{display:none}
  .hero .cta{margin-top:2px}
  .hero .btn.big{padding:12px 22px}
  .note{display:block}
  .head h2{font-size:20px}
  .steps{grid-template-columns:1fr;gap:10px}
  .logo{font-size:15px;gap:6px}
  .topbar{gap:8px}
  .userbtn{padding:10px 12px}
  .userbtn span{display:none}
  .wallet small,.hero .ghost{display:none}
  .topbar .btn{padding:7px 12px}
  .logo{min-width:0;overflow:hidden;white-space:nowrap}
  .wallet{flex:none;padding:0 10px}
  .tiles{grid-template-columns:repeat(3,1fr);gap:9px}
  .tile,.art{border-radius:13px}
  .badges{top:6px;left:6px;right:6px}
  .badge{font-size:8.5px;padding:3px 6px;gap:3px}
  .label{left:5px;right:5px;bottom:8px}
  .art .name{font-size:12px}
  .art .genre{font-size:9px;margin-top:4px}
  .tiers{grid-template-columns:repeat(2,1fr);gap:10px}
  /* The bar at the foot of a phone: one fixed, low height. It is not padded by the phone's safe area,
     which a browser changes as its own toolbar hides and shows on scrolling: the bar would grow and shrink with it. */
  .tabs{display:flex;align-items:stretch;position:fixed;left:0;right:0;bottom:0;z-index:10;height:calc(46px + env(safe-area-inset-bottom));background:var(--bar);border-top:1px solid var(--line);padding:0 6px env(safe-area-inset-bottom)}
  .tabs a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;text-align:center;font-size:9.5px;line-height:1.1;font-weight:700;color:var(--muted);padding:0}
  .tabs a span{display:block;line-height:1}
  .tabs a svg{width:18px;height:18px}
  .tabs a.on{color:var(--accent)}
}

/* Lucide icons */
svg.lucide{vertical-align:-3px;flex:none}
.nav a span,.tabs a span{display:flex;justify-content:center}
.tabs a span{margin-bottom:0}
.userbtn{display:inline-flex;align-items:center;gap:8px;max-width:180px}
.userbtn span{overflow:hidden;text-overflow:ellipsis}
.art .tileimg{position:absolute;top:9%;left:50%;transform:translateX(-50%);height:48%;filter:drop-shadow(0 8px 10px #0005)}

/* Sound toggle */
.soundbtn{display:inline-flex;align-items:center;gap:8px;background:var(--panel2);border-radius:10px;padding:8px 10px;color:var(--text);font-weight:700;font-size:13px}
.hud .mid{display:flex;align-items:center;gap:8px}
.row-between{flex-direction:row;align-items:center;justify-content:space-between}

/* Result: a win is loud, a loss is calm */
.result{position:relative;isolation:isolate}
.result h1.loss{color:var(--text);font-size:34px}
.result h1.win{font-size:52px;text-shadow:0 0 34px color-mix(in srgb,var(--accent2) 60%,transparent)}
.result .prize{font-size:32px}
.result .row.winner{box-shadow:0 0 0 2px var(--accent2),0 0 28px color-mix(in srgb,var(--accent2) 35%,transparent)}
.result.fx h1.win{animation:winpop .7s cubic-bezier(.2,1.7,.35,1) both}
.result.fx .prize{animation:winpop .6s .25s cubic-bezier(.2,1.7,.35,1) both}
.result.fx .vs,.result.fx .btn{animation:rise .5s .5s ease-out both}
.result.fx h1.loss,.result.fx h1.tie{animation:rise .45s ease-out both}
@keyframes winpop{from{transform:scale(.2) rotate(-8deg);opacity:0}to{transform:none;opacity:1}}
@keyframes rise{from{transform:translateY(14px);opacity:0}to{transform:none;opacity:1}}
.rays{position:absolute;left:-14px;right:-14px;top:-120px;aspect-ratio:1;z-index:-1;pointer-events:none;border-radius:50%;
  background:repeating-conic-gradient(from 0deg,color-mix(in srgb,var(--accent) 24%,transparent) 0 9deg,transparent 9deg 18deg);
  -webkit-mask:radial-gradient(circle,#000 0,transparent 68%);mask:radial-gradient(circle,#000 0,transparent 68%);animation:spinrays 14s linear infinite}
@keyframes spinrays{to{transform:rotate(360deg)}}
.confetti{position:fixed;inset:0;width:100vw;height:100vh;pointer-events:none;z-index:40}
@media (prefers-reduced-motion:reduce){.rays,.confetti{display:none}.result.fx *{animation:none!important}}
/* The rotating win glow is wider than the page when turned; clip it instead of letting the page scroll sideways. */
main{overflow-x:clip}

/* 3-2-1 before a live match */
.countdown{position:absolute;inset:0;top:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;background:#0006;color:#fff;pointer-events:none}
.countdown b{font:900 120px 'Poppins Display','Arial Black',Impact,sans-serif;color:var(--accent);text-shadow:0 6px 0 #0006;animation:count .8s ease-out both}
.countdown span{font-weight:800;font-size:18px;text-shadow:0 2px 6px #000}
@keyframes count{from{transform:scale(1.7);opacity:0}30%{opacity:1}to{transform:scale(.85);opacity:.9}}
.result .textlink{margin-top:-4px}

/* ?debug=1: live connection panel over the match */
.livepanel{position:absolute;left:8px;bottom:8px;z-index:5;max-width:78%;background:#000c;color:#d7ffd9;border:1px solid #2a5;border-radius:8px;padding:7px 9px;font:11px/1.45 ui-monospace,Consolas,monospace;pointer-events:none}
.livepanel b{color:#fff}
.livepanel .in{color:#8fd3ff}
.livepanel .out{color:#ffd98a}
.livepanel .key{color:#9aa;margin-top:3px;font-size:10px}

/* Arena: a live game with matchmaking and the result drawn over it */
.arena{position:fixed;inset:0;z-index:20;background:var(--bg)}
.arena-back{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;filter:brightness(.55)}
.arena-back img{width:min(60vw,280px);filter:drop-shadow(0 20px 30px #0008)}
.arena-over{position:fixed;inset:0;z-index:25;background:#000a;display:flex;align-items:center;justify-content:center;padding:16px;overflow:auto;animation:fadein .2s ease-out}
.arena-card{background:var(--bar);border:1px solid var(--line);border-radius:22px;padding:24px 20px;width:100%;max-width:400px;display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center;box-shadow:0 30px 80px #000a}
.arena-card .result{padding-top:0;width:100%}
.arena-card .result h1.win{font-size:46px}
.arena-card .rays{top:-150px;left:-20px;right:-20px}
.arena-card{position:relative;overflow:hidden}
.arena-card .btn{width:100%}
/* Switching games from inside one (Arena: picker): every game as a small tile, and the way home. */
.arena-card.picker{max-width:520px;max-height:92dvh;overflow:hidden;align-items:stretch;text-align:left;padding:18px 16px;gap:12px}
.picker-head{display:flex;align-items:center;justify-content:space-between;font-size:18px}
.picker-head .authx{position:static;background:var(--panel2)}
.picker-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;overflow-y:auto;min-height:0}
.picker-tile{display:flex;flex-direction:column;gap:5px;min-width:0;border-radius:12px;padding:4px;border:1px solid transparent}
.picker-tile:hover,.picker-tile.on{border-color:var(--accent);background:var(--panel)}
.picker-art{display:block;aspect-ratio:1;border-radius:10px;overflow:hidden;position:relative}
.picker-art img{width:100%;height:100%;object-fit:cover;display:block}
.picker-art i{font-style:normal;font-size:28px;position:absolute;inset:0;display:grid;place-items:center}
.picker-name{font-size:11px;font-weight:800;text-align:center;line-height:1.15;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:420px){.picker-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@keyframes fadein{from{opacity:0}to{opacity:1}}

/* Result art: a game can supply its own picture for a win, a loss and a tie (art.results in game.json) */
.result-art{display:block;height:170px;max-width:86%;object-fit:contain;margin:-6px auto -6px;filter:drop-shadow(0 14px 18px #0007);position:relative}
.result-art.win{height:200px}
.result.fx .result-art.win{animation:artwin .9s cubic-bezier(.2,1.6,.35,1) both, artbob 2.2s ease-in-out .9s infinite}
.result.fx .result-art.loss{animation:artloss .7s ease-out both}
.result.fx .result-art.tie{animation:rise .5s ease-out both}
@keyframes artwin{0%{transform:translateY(60px) scale(.2) rotate(-18deg);opacity:0}60%{opacity:1}100%{transform:none;opacity:1}}
@keyframes artbob{50%{transform:translateY(-8px) rotate(2deg)}}
@keyframes artloss{0%{transform:translateY(-40px) rotate(8deg);opacity:0}60%{transform:translateY(4px) rotate(-3deg);opacity:1}100%{transform:none;opacity:1}}
.arena-card .result h1.win{font-size:42px}
.arena-card .result h1.loss{font-size:30px}
@media (prefers-reduced-motion:reduce){.result-art{animation:none!important}}

/* How to play: shown before a first match and while waiting for an opponent */
.howto{list-style:none;padding:0;margin:0;width:100%;display:flex;flex-direction:column;gap:8px;text-align:left}
.howto li{display:flex;align-items:center;gap:12px;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:9px 12px;font-size:13.5px;line-height:1.35}
.howto img{width:42px;height:42px;object-fit:contain;flex:none;filter:drop-shadow(0 3px 4px #0006)}
.finding-head{display:flex;align-items:center;gap:10px}
.finding-head h2{font-size:19px}

/* The verdict painted on a signboard the game supplies (art.signs). The words are live text. */
.result h1.signed{width:92%;aspect-ratio:640/255;margin:0 auto;display:flex;align-items:center;justify-content:center;
  background:center/100% 100% no-repeat;filter:drop-shadow(0 10px 14px #0008);text-shadow:none;padding:0 9% 1%}
.result h1.signed span{display:block;line-height:1;font-size:clamp(22px,8.2vw,38px);color:#fff6dc;
  text-shadow:0 2px 0 #6b3d14,0 -1px 0 #6b3d14,2px 0 0 #6b3d14,-2px 0 0 #6b3d14,0 5px 0 #4a2a0c,0 8px 10px #0006;letter-spacing:.01em}
.result h1.signed.win span{color:#fff3a8;font-size:clamp(26px,9.4vw,44px)}
.result h1.signed.loss span,.result h1.signed.tie span{color:#f3e6cf}
.arena-card .result h1.signed.win,.arena-card .result h1.signed.loss{font-size:inherit}
.result.fx h1.signed.win{animation:winpop .7s .15s cubic-bezier(.2,1.7,.35,1) both}

/* Match screen on phones: exactly the visible screen, nothing wider, and the page behind cannot scroll */
.arena,.gamescreen{height:100dvh;width:100%;max-width:100vw;overflow:hidden;overscroll-behavior:none;touch-action:none}
.gamescreen iframe{touch-action:none;min-height:0;display:block}
/* A preloaded game (ArenaFrames in main.js): the page on screen, and copies loading or leaving behind it.
   The bar is written after the pages, so that adding it never moves (and so reloads) a page. */
.gamescreen.keep{isolation:isolate}
.gamescreen.keep .hud{order:-1}
.gamescreen.keep iframe.behind{position:absolute;inset:0;height:100%;opacity:0;pointer-events:none;z-index:-1}
html.playing,html.playing body{overflow:hidden;overscroll-behavior:none;position:fixed;inset:0;width:100%}
/* Header: the clock keeps its size, the two sides share what is left and cut long names short */
.hud{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:8px;padding:8px 10px}
.side-score{min-width:0}
.side-score span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.side-score.right span{display:flex;align-items:center;justify-content:flex-end;gap:4px}
@media (max-width:380px){.clock{font-size:18px;padding:4px 9px}.soundbtn{padding:7px 8px}.side-score b{font-size:18px}.hud .mid{gap:5px}}
/* Offer to double the bet mid-match: in the bar, beside the clock, never over the game. */
.dblchip{flex:none;background:var(--coin);color:#190b02;border:0;border-radius:9px;padding:8px;font:900 12px/1 inherit;font-family:inherit;white-space:nowrap;cursor:pointer;box-shadow:0 2px 0 #b98a12;animation:dblin .5s cubic-bezier(.2,1.6,.35,1) both}
.dblchip:active{transform:translateY(1px);box-shadow:0 1px 0 #b98a12}
@keyframes dblin{from{transform:scale(.4);opacity:0}}
/* ...offered, and waiting for the rival's answer: the same chip, gone quiet. */
.dblchip.wait{display:inline-flex;align-items:center;gap:5px;background:var(--panel2);color:var(--coin);box-shadow:none;cursor:default;animation:none}
.dblchip.wait i{width:6px;height:6px;border-radius:50%;background:currentColor;animation:dblwait .7s ease-in-out infinite alternate}
@keyframes dblwait{to{opacity:.15}}
/* The rival offers a double: the bar itself becomes the question, with buttons as tall as the bar. Nothing is
   laid over the game, and the bar keeps its height, so the game is not resized under the player's hands. */
.hud{position:relative}
.dblask{position:absolute;inset:0;z-index:2;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:stretch;gap:8px;padding:6px 10px 9px;background:#3a1d06;animation:dblask .18s ease-out}
.dblask-txt{display:flex;flex-direction:column;justify-content:center;min-width:0;line-height:1.15}
.dblask-txt span{font-size:11px;font-weight:700;color:#ffd9a8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dblask-txt b{font:900 20px/1.1 'Poppins Display','Arial Black',Impact,sans-serif;color:var(--coin);white-space:nowrap}
.dblask button{display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:10px;padding:0 16px;font:900 15px/1 inherit;font-family:inherit;white-space:nowrap;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.dblyes{min-width:132px;background:var(--coin);color:#190b02;box-shadow:0 2px 0 #b98a12}
.dblyes:active{transform:translateY(1px);box-shadow:0 1px 0 #b98a12}
.dblno{background:#ffffff24;color:#fff}
.dblask-txt b i{font:800 12px/1 'Poppins',sans-serif;font-style:normal;color:#ffd9a8;opacity:.8;margin-left:7px}
.dblyes kbd{display:none;font:800 11px/1 inherit;font-family:inherit;background:#190b0229;border-radius:5px;padding:4px 7px}
@media (hover:hover) and (pointer:fine){.dblyes kbd{display:inline-block}}
.dbltime{position:absolute;left:0;right:0;bottom:0;height:3px;background:var(--coin);transform-origin:left;animation:dbltime linear both}
@keyframes dbltime{to{transform:scaleX(0)}}
@keyframes dblask{from{opacity:0}}
.dblnow{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;gap:8px;background:#3a1d06;font-weight:800;font-size:14px;pointer-events:none;animation:dblask .18s ease-out}
.dblnow b{font:900 20px/1 'Poppins Display','Arial Black',Impact,sans-serif;color:var(--coin)}
@media (max-width:380px){.dblask{gap:6px;padding:6px 8px 9px}.dblask button{padding:0 11px;font-size:14px}.dblyes{min-width:104px}}
@media (prefers-reduced-motion:reduce){.dblask,.dblnow,.dblchip.wait i{animation:none}}
.oppname{font-style:normal;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* The connection dropped mid-match and the page is getting back in: a small pill under the bar, over the game. */
.netpill{position:fixed;left:50%;top:60px;transform:translateX(-50%);z-index:60;display:flex;align-items:center;gap:8px;background:#110d0aeb;color:#fff;border:1px solid #ffffff2e;border-radius:999px;padding:8px 14px;font-size:13px;font-weight:800;line-height:1;white-space:nowrap;pointer-events:none;box-shadow:0 6px 18px #00000066}
.netpill i{width:12px;height:12px;border-radius:50%;border:2px solid #ffffff40;border-top-color:var(--accent);animation:netspin .7s linear infinite}
@keyframes netspin{to{transform:rotate(360deg)}}
.oppname.oppaway{opacity:.6;font-style:italic}

/* Money: wallet extras, deposits, first-deposit offer, quests, the bet stepper, notifications */
.wallet .add{width:22px;height:22px;border-radius:7px;background:var(--accent);color:var(--on-accent);display:flex;align-items:center;justify-content:center;flex:none}
.wallet .tix{font-style:normal;display:flex;align-items:center;gap:3px;color:var(--coin);font-size:12px}
.bell{position:relative;width:38px;height:38px;border-radius:10px;background:var(--bg);border:1px solid var(--line);display:flex;align-items:center;justify-content:center;flex:none}
.bell i{position:absolute;top:-5px;right:-5px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:var(--live);color:#fff;font:800 10px/17px 'Poppins','Segoe UI',system-ui,sans-serif;text-align:center;font-style:normal}
.banner.offer{border-color:var(--coin);background:linear-gradient(100deg,#ffd34d24,var(--panel) 60%)}
.banner .left,.offerline{color:var(--coin);font-weight:800;font-variant-numeric:tabular-nums}
.offerline{font-size:13px}
.quests .questlist{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px}
.quest{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:14px;display:flex;align-items:center;gap:12px;text-align:left;color:inherit;font:inherit}
.quest:not(.done):hover{border-color:var(--accent)}
.quest .go{display:inline-block;font-size:12px;font-weight:800;color:var(--accent)}
.quest>div{flex:1;min-width:0}
.quest b{display:block;font-size:14px;margin-bottom:7px}
.quest .tick{flex:none;width:38px;height:38px;border-radius:50%;background:var(--panel2);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:12px;color:var(--muted)}
.quest.done{opacity:.6}
.quest.done .tick{background:var(--accent);color:var(--on-accent)}
.quest .bar{height:6px;border-radius:3px;background:var(--panel2);overflow:hidden}
.quest .bar i{display:block;height:100%;background:var(--accent2);border-radius:3px}
.quest .reward{flex:none;display:flex;align-items:center;gap:4px;color:var(--coin);font-weight:800;font-size:12px}
.stepper{display:flex;gap:10px;align-items:stretch}
.stepper .pm{flex:none;width:58px;border-radius:14px;background:var(--panel2);font:900 26px/1 'Poppins Display','Arial Black',Impact,sans-serif;text-align:center}
.stepper .pm[disabled],.option[disabled],.amount[disabled]{opacity:.35;cursor:default}
.stepper .amt{flex:1;border:1px solid var(--accent);border-radius:14px;padding:12px;display:flex;flex-direction:column;align-items:center;gap:2px}
.stepper .amt b{font-size:26px}
.stepper .amt span{font-size:12px;color:var(--accent2);font-weight:700}
.amounts{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.amount{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:18px 8px;font-size:22px;text-align:center}
.amount:hover{border-color:var(--accent)}
.walletrow{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 0;border-top:1px solid var(--line)}
.walletrow span{display:flex;align-items:center;gap:6px;color:var(--muted)}
.walletrow b{font-size:16px}
.walletrow small{font-size:10px;color:var(--muted);letter-spacing:.06em}
.inboxrow{grid-template-columns:1fr}
.inboxrow.new{box-shadow:inset 3px 0 0 var(--accent)}
.result .prize small{font-size:.45em;color:var(--muted)}
.toast.good{background:var(--accent2);color:#04130d}
/* The 7-day challenge. On the lobby, one card (.chcard): today's ring, a line, the week as seven dashes
   and what today pays. On its own page (.chpage): today (.chnow), then the week as seven cards. */
.chcard{display:flex;align-items:center;gap:14px;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:12px 16px;color:inherit}
.chcard:hover{border-color:var(--accent)}
.chcard .ring,.chnow .ring{--p:0%;width:46px;height:46px;border-radius:50%;padding:4px;background:conic-gradient(var(--accent) var(--p),var(--panel2) 0);display:flex;flex:none}
.chcard .ring i,.chnow .ring i{flex:1;border-radius:50%;background:var(--panel);display:flex;align-items:center;justify-content:center;font-style:normal;font-weight:800;font-size:13px}
.chcard .ring.full,.chnow .ring.full{background:var(--accent2)}
.chcard .ring.full i,.chnow .ring.full i{background:var(--accent2);color:#04130d}
.chcard-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.chcard-text b{font-size:15px;line-height:1.2}
.chcard-text>span{font-size:12.5px;color:var(--muted);line-height:1.3}
.chdots{display:flex;gap:5px;margin-top:4px}
.chdots i{width:18px;height:5px;border-radius:3px;background:var(--panel2)}
.chdots i.done{background:var(--accent2)}
.chdots i.today{background:var(--accent)}
.chcard-prize{flex:none;display:flex;flex-direction:column;align-items:flex-end;line-height:1.25}
.chcard-prize b{color:var(--coin);font-size:17px}
.chcard-prize em{font-style:normal;font-size:11px;color:var(--muted)}
.chcard-prize .left{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.chcard>svg{flex:none;color:var(--muted);margin-left:-6px}
.chpage h1{font-size:30px}
.chpage .head{margin-bottom:10px}
.chnow{display:flex;align-items:center;gap:16px;flex-wrap:wrap;background:linear-gradient(120deg,color-mix(in srgb,var(--accent) 16%,var(--panel)),var(--panel) 70%);border:1px solid var(--accent);border-radius:16px;padding:18px}
.chnow.done{border-color:var(--accent2);background:linear-gradient(120deg,color-mix(in srgb,var(--accent2) 12%,var(--panel)),var(--panel) 70%)}
.chnow .ring{width:84px;height:84px;padding:7px}
.chnow .ring i{font-size:22px}
.chnow>div{flex:1;min-width:180px;display:flex;flex-direction:column;gap:3px}
.chnow small{font-size:11px;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.chnow b{font-size:18px;line-height:1.2}
.chnow span{font-size:13px;color:var(--muted)}
.chnow .left{color:var(--coin);font-weight:800;font-variant-numeric:tabular-nums}
.chrules{gap:12px}
.chrules h2{font-size:18px}
.chrules ol{padding-left:20px;display:flex;flex-direction:column;gap:8px;font-size:14px;color:var(--muted)}
.chrules .textlink{align-self:flex-start}
.chdays{display:grid;grid-template-columns:repeat(7,1fr);gap:10px}
.chday{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:12px 6px;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;min-width:0}
.chday small{font-size:11px;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.chday b{font-size:17px;line-height:1}
.chday em{font-style:normal;font-size:11px;color:var(--muted);line-height:1.15}
.chday .ring{--p:0%;width:46px;height:46px;border-radius:50%;padding:4px;background:conic-gradient(var(--accent) var(--p),var(--panel2) 0);display:flex;flex:none}
.chday .ring i{flex:1;border-radius:50%;background:var(--panel);display:flex;align-items:center;justify-content:center;font-style:normal;font-weight:800;font-size:13px;color:var(--muted)}
.chday.today{border-color:var(--accent);background:linear-gradient(180deg,color-mix(in srgb,var(--accent) 14%,var(--panel)),var(--panel))}
.chday.today small,.chday.today .ring i{color:var(--text)}
.chday.done .ring{background:var(--accent2)}
.chday.done .ring i{background:var(--accent2);color:#04130d}
.chday.done b,.chday.done em{opacity:.6}
.chday.missed{opacity:.45}
.chday.missed b{text-decoration:line-through}
.chday:last-child:not(.done):not(.missed) b{color:var(--coin)}
.chfoot{display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;margin-top:10px;font-size:12.5px;color:var(--muted)}
.chfoot .saver{display:inline-flex;align-items:center;gap:6px}
.chfoot .saver::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--accent2)}
.chfoot .saver.used::before{background:var(--live)}
/* A sheet that asks one thing (notifications, installing the app). */
.sheet.ask{align-items:center;text-align:center;gap:14px}
.sheet.ask h3{font-size:22px;line-height:1.15}
.sheet.ask .btn{align-self:stretch}
.sheet.ask.long{max-height:94dvh;overflow-y:auto}

/* How to install, step by step (install.js): each step's line, and under it a drawing of the part of
   the screen to tap. The drawings are in the device's own colours, not the site's; what to tap is
   ringed in orange and pulses. */
.iguide{align-self:stretch;list-style:none;padding:0;display:flex;flex-direction:column;gap:14px;text-align:left}
.iguide li{display:flex;flex-direction:column;gap:8px}
.istep{display:flex;gap:10px;align-items:flex-start;font-size:14px;line-height:1.4}
.istep b{flex:none;width:22px;height:22px;border-radius:50%;background:var(--accent);color:var(--on-accent);font-size:12px;display:flex;align-items:center;justify-content:center}
.iart{--tint:#007aff;margin-left:32px;border-radius:12px;overflow:hidden;background:#f2f2f7;color:#1c1c1e;border:1px solid #0004;font:13px/1.25 -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif}
.iart.android{--tint:#444746;background:#fff;color:#1f1f1f}
.iart-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;height:44px;padding:0 16px;color:var(--tint)}
.iart-bar .dim{opacity:.3}
.iart-url{flex:1;min-width:0;height:28px;border-radius:14px;background:#00000012;color:#3c3c43;display:flex;align-items:center;gap:5px;padding:0 10px;font-size:11.5px}
.iart-url>span:first-of-type{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.iart-tabs{flex:none;width:18px;height:18px;border:2px solid currentColor;border-radius:5px;font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center}
.iart-page{height:30px;background:var(--bg);display:flex;align-items:center;gap:8px;padding:0 12px}
.iart-page img{height:20px;width:auto}
.iart-page i{flex:1;height:6px;border-radius:3px;background:#ffffff1f}
.iart-page i:last-child{flex:.5}
.iart .hot{position:relative;display:inline-flex;align-items:center;justify-content:center;color:#f26a00}
.iart .hot::before{content:"";position:absolute;inset:-8px;border-radius:999px;background:#ff7a1a2e}
.iart .hot::after{content:"";position:absolute;inset:-8px;border-radius:999px;border:2px solid #ff7a1a;animation:hot 1.5s ease-out infinite}
.iart .hot.sq::before,.iart .hot.sq::after{inset:-5px;border-radius:14px}
@keyframes hot{0%{transform:scale(.75);opacity:1}100%{transform:scale(1.4);opacity:0}}
.iart-rows{padding:8px;display:flex;flex-direction:column;gap:1px}
.iart-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 12px;background:#fff;color:#8e8e93}
.iart.android .iart-row{background:none}
.iart-row:first-child{border-radius:9px 9px 0 0}
.iart-row:last-child{border-radius:0 0 9px 9px}
.iart .iart-row.hot{display:flex;justify-content:space-between;font-weight:600;color:#1c1c1e;border-radius:9px}
.iart .iart-row.hot svg{color:#f26a00}
.iart .iart-row.hot::before{inset:0;border-radius:9px;background:#ff7a1a24}
.iart .iart-row.hot::after{inset:0;border-radius:9px;animation-name:hotrow}
@keyframes hotrow{0%,100%{opacity:1}50%{opacity:.2}}
.iart-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;color:#007aff}
.iart-head b{color:#1c1c1e}
.iart-head .hot,.iart-btns .hot{font-weight:700;color:inherit}
.iart-head .hot::before,.iart-head .hot::after,.iart-btns .hot::before,.iart-btns .hot::after{inset:-6px -10px}
.iart-named{display:flex;align-items:center;gap:10px;padding:10px 16px 12px}
.iart-toggle{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 8px 8px;padding:8px 12px;border-radius:9px;background:#fff}
.iart-toggle i{flex:none;width:36px;height:22px;border-radius:11px;background:#34c759;position:relative}
.iart-toggle i::after{content:"";position:absolute;top:2px;right:2px;width:18px;height:18px;border-radius:50%;background:#fff}
.iart-app{display:block;width:36px;height:36px;border-radius:9px;flex:none}
.iart-btns{display:flex;justify-content:flex-end;gap:26px;padding:2px 22px 14px;font-weight:600;color:#0b57d0}
.iart.home{background:linear-gradient(135deg,#31507d,#6d4380);border-color:#0006}
.iart-home{display:flex;justify-content:space-around;align-items:flex-start;padding:14px 10px 10px}
.iart-home>i{width:40px;height:40px;border-radius:10px;background:#ffffff38}
.iart-home>div{display:flex;flex-direction:column;align-items:center;gap:5px;color:#fff;font-size:10.5px}
.iart-home .iart-app{width:40px;height:40px;border-radius:10px}
@media (prefers-reduced-motion:reduce){.iart .hot::after{animation:none}}

/* The install bar (install.js): above the top bar, in the device's own font and colours so it reads
   as the phone's, not the page's. It is part of the page and scrolls away with it. */
.installbar{display:flex;align-items:center;gap:10px;padding:8px 12px 8px 6px;background:#f2f2f7;color:#1c1c1e;border-bottom:1px solid #0003;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif}
.installbar img{flex:none;width:44px;height:44px;border-radius:10px}
.ib-x{flex:none;width:28px;height:36px;display:flex;align-items:center;justify-content:center;color:#8e8e93}
.ib-text{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.25}
.ib-text b{font-size:15px;font-weight:600}
.ib-text span{font-size:12px;color:#6c6c70;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ib-go{flex:none;background:#007aff;color:#fff;font-size:14px;font-weight:700;border-radius:999px;padding:7px 16px}
.installbar.android{background:#fff;color:#1f1f1f;padding:8px 6px 8px 14px;box-shadow:0 1px 3px #0004}
.installbar.android img{border-radius:12px}
.installbar.android .ib-x{order:9;color:#5f6368}
.installbar.android .ib-text b{font-weight:500}
.installbar.android .ib-text span{color:#5f6368}
.installbar.android .ib-go{background:#0b57d0;font-weight:500;padding:9px 20px}
@media (prefers-color-scheme:dark){
  .installbar{background:#1c1c1e;color:#fff;border-bottom-color:#fff2}
  .ib-text span,.installbar.android .ib-text span{color:#98989f}
  .ib-go{background:#0a84ff}
  .installbar.android{background:#1f1f1f;color:#e3e3e3}
  .installbar.android .ib-go{background:#a8c7fa;color:#062e6f}
}
.ask-icon{width:56px;height:56px;border-radius:18px;background:color-mix(in srgb,var(--accent) 18%,transparent);color:var(--accent);display:flex;align-items:center;justify-content:center}
.ask-steps{align-self:stretch;text-align:left;display:flex;flex-direction:column;gap:10px;padding-left:22px;font-size:14px}
@media (max-width:760px){.chdays{grid-template-columns:repeat(4,1fr);gap:8px}.chday{padding:10px 4px}.chnow .btn{width:100%}.chpage h1{font-size:26px}}
@media (max-width:420px){.chcard{gap:10px;padding:12px}.chcard-text b{font-size:14px}.chdots i{width:14px}}
@media (max-width:760px){.quests .questlist{grid-template-columns:1fr}}
/* The top bar's controls (bell, wallet, buttons) are all one height. */
.topbar .btn{min-height:38px;padding-top:7px;padding-bottom:7px}
.topbar .wallet{height:38px;padding-top:0;padding-bottom:0}

/* The cashier: deposit and withdraw sheets, and the list of both on the profile. */
.sheet.cashier{max-height:92vh;overflow:auto}
.chips.tight{margin:0}
.amount.on{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.cashbtns{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.payrow{display:flex;flex-direction:column;gap:4px}
.payline{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:10px 12px}
.payline .display{font-size:24px}
.payline code{font:12px/1.35 ui-monospace,Consolas,monospace;word-break:break-all;flex:1;min-width:0}
.payline .copy{margin-left:auto}
.qr{align-self:center;width:168px;height:168px;background:#fff;border-radius:12px;padding:6px}
.qr svg{display:block;width:100%;height:100%}
.qr .spinner{margin:auto}
.qr:has(.spinner){display:flex}
.paystate{font-weight:700;text-align:center}
.paystate.seen{color:var(--accent2)}
.withmax{display:flex;gap:8px;align-items:stretch}
.withmax .chip{border-radius:10px;padding:0 16px}
.withmax input{flex:1;min-width:0}
.tr.cashrow{grid-template-columns:1fr auto}
.quoteline{font-weight:700;font-size:13px}
.quoteline.bad{color:var(--live)}

/* ----- friend duels: the challenge sheet, sharing, a link's page, the lobby over the game, the friends list (web/src/friends.js) ----- */
.fr-over{z-index:40}
.fr-card{gap:12px;max-height:94dvh;overflow:auto}
.fr-card .picker-head{display:flex;align-items:center;justify-content:space-between;width:100%}
.fr-card .picker-head b{font-size:18px}
.fr-field{display:flex;flex-direction:column;gap:6px;width:100%;text-align:left;font-size:13px;color:var(--muted)}
.fr-field select{background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:10px;padding:10px;font:inherit;font-size:15px}
.fr-gamehead,.fr-head{display:flex;align-items:center;gap:12px;width:100%;text-align:left}
.fr-gamehead img,.fr-head img{width:64px;height:64px;border-radius:14px;object-fit:cover;flex:none}
.fr-gamehead b,.fr-head b{font-size:17px;line-height:1.2}
.fr-head small{display:block;color:var(--accent);font-weight:800;font-size:11px;letter-spacing:.08em;text-transform:uppercase}
.fr-seg{display:flex;gap:8px;width:100%}
.fr-seg button{flex:1;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:10px 8px;display:flex;flex-direction:column;gap:2px;color:var(--text)}
.fr-seg button b{font-size:14px}
.fr-seg button small{font-size:11px;color:var(--muted)}
.fr-seg button.on{border-color:var(--accent);background:linear-gradient(160deg,color-mix(in srgb,var(--accent) 22%,transparent),var(--panel))}
.fr-stake{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%}
.fr-stake .btn{width:52px;font-size:22px;padding:0}
.fr-stake div{display:flex;flex-direction:column;align-items:center}
.fr-stake b{font-size:26px}
.fr-stake small{color:var(--muted);font-size:12px}
.fr-small{font-size:12px}
.fr-share{display:flex;flex-direction:column;gap:8px;width:100%}
.fr-url{display:flex;gap:6px}
.fr-url input{flex:1;min-width:0;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:10px;padding:10px;font:inherit;font-size:14px}
.fr-url .btn{width:auto;flex:none}
.fr-url input{min-height:var(--h-md)}
.fr-qr{background:#fff;border-radius:12px;padding:10px;width:200px;height:200px;align-self:center}
.fr-qr svg{width:100%;height:100%}
.fr-wait{display:flex;align-items:center;gap:12px;justify-content:center}
.fr-wait .spinner{width:26px;height:26px;margin:0}
.fr-wait b{font-size:18px}
.fr-clock{font-variant-numeric:tabular-nums;font-weight:800;color:var(--text)}
.fr-banner{position:fixed;left:50%;top:calc(10px + env(safe-area-inset-top));transform:translateX(-50%);z-index:45;display:flex;align-items:center;gap:10px;background:var(--bar);border:1px solid var(--coin);border-radius:14px;padding:10px 12px;box-shadow:0 12px 40px #000a;max-width:calc(100vw - 20px);font-weight:700;font-size:14px}
.fr-banner .btn{width:auto}
.fr-banner.bad{border-color:var(--live)}
.fr-page{display:flex;flex-direction:column;gap:12px;padding-top:16px}
.fr-landing{position:relative;overflow:hidden;align-items:flex-start;gap:12px;padding:24px 20px;background:linear-gradient(160deg,#00000066,var(--panel) 70%),var(--fr-grad,var(--panel))}
.fr-landing .fr-art{position:absolute;right:-30px;top:-20px;width:58%;max-width:300px;opacity:.55;border-radius:24px;transform:rotate(6deg);pointer-events:none}
.fr-landing h1{font-size:34px;line-height:1.05;max-width:85%;position:relative}
.fr-landing p{position:relative;max-width:85%}
.fr-landing .btn{position:relative;width:100%;max-width:360px}
.fr-why{color:var(--text)}
.fr-foot{text-align:center}
.fr-friends{display:flex;flex-direction:column;gap:12px;padding-top:16px}
.fr-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.fr-row{flex-direction:row;align-items:center;gap:12px;padding:12px 14px}
.fr-row .btn{width:auto}
.fr-dot{width:10px;height:10px;border-radius:50%;background:var(--panel2);flex:none}
.fr-dot.on{background:var(--accent2);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent2) 25%,transparent)}
.fr-dot.playing{background:var(--coin)}
.fr-who{flex:1;min-width:0;display:flex;flex-direction:column}
.fr-who b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fr-who small{color:var(--muted);font-size:12px}
.fr-rec{font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.fr-empty{align-items:center;text-align:center}
.fr-notice{position:fixed;left:50%;top:calc(10px + env(safe-area-inset-top));transform:translateX(-50%);z-index:60;display:flex;align-items:center;gap:10px;background:var(--bar);border:1px solid var(--accent);border-radius:16px;padding:10px 10px 10px 16px;box-shadow:0 14px 50px #000c;width:min(560px,calc(100vw - 20px));font-weight:700;animation:fadein .2s ease-out}
.fr-notice span{flex:1;min-width:0}
.fr-notice .btn{width:auto}

/* The history page (web/src/history.js): the record over a period, by game, and the matches. Gains in --accent2, losses in --live. */
.hist .up{color:var(--accent2)}
.hist .down{color:var(--live)}
.hist-head{justify-content:space-between;margin-bottom:0}
.hist-head .textlink{font-size:12.5px}
.hist-bar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between}
.hist-bar .chip{padding:8px 14px}
.hist-label{color:var(--muted);font-size:12px;font-weight:700}
.hist-hero{gap:4px}
.hist-net{font-size:38px;line-height:1.1;font-variant-numeric:tabular-nums}
.hist-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.hist-tile{background:var(--panel);border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:3px;min-width:0}
.hist-value{font-size:19px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hist-curve{margin-top:12px;border-top:1px solid var(--line);padding-top:12px}
.hist-curve-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:2px 8px;min-height:18px;align-items:baseline}
.hist-tip{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.hist-tip b{color:var(--text)}
.hist-tip b.up{color:var(--accent2)}.hist-tip b.down{color:var(--live)}
.hist-plot{position:relative;margin-top:6px}
.hist-zero{position:absolute;right:0;transform:translateY(-120%);font-size:10px;pointer-events:none}
.hist-zero.below{transform:translateY(20%)}
.hist-curve svg{display:block;width:100%;height:110px;touch-action:pan-y;cursor:crosshair;overflow:visible}
.hist-curve .zero{stroke:var(--line);stroke-width:1;stroke-dasharray:4 4}
.hist-curve .line{fill:none;stroke:var(--text);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.hist-curve .line.up{stroke:var(--accent2)}
.hist-curve .line.down{stroke:var(--live)}
.hist-curve .cross{stroke:var(--muted);stroke-width:1}
.hist-curve-foot{display:flex;justify-content:space-between;margin-top:4px}
.hist-extra{gap:10px}
.hist-extra-row{display:flex;gap:10px;align-items:flex-start}
.hist-extra-row svg{color:var(--coin);flex:none;margin-top:1px}
.hist-icon{width:40px;height:40px;border-radius:10px;overflow:hidden;position:relative;flex:none;display:block;background:var(--panel2)}
.hist-icon img{width:100%;height:100%;object-fit:cover;display:block}
.hist-icon i{font-style:normal;font-size:20px;position:absolute;inset:0;display:grid;place-items:center}
.tr.hist-game,.tr.hist-row{grid-template-columns:40px 1fr auto;text-align:left;padding:10px 14px}
.tr.hist-row{grid-template-columns:40px 1fr auto 16px}
.tr.hist-game.on{box-shadow:inset 0 0 0 2px var(--accent)}
.hist-main{min-width:0;display:flex;flex-direction:column;gap:1px}
.hist-main b,.hist-who{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hist-amt{text-align:right;display:flex;flex-direction:column;gap:1px;font-variant-numeric:tabular-nums;white-space:nowrap}
.hist-amt>b{font-size:15px}
.hist-amt>b.m{font-size:13px}
.hist-res{font-weight:700}
.hist-res.win{color:var(--accent2)}
.hist-res.loss{color:var(--live)}
.hist-res.tie,.hist-res.void,.hist-res.pending{color:var(--muted)}
.hist-cube{background:var(--coin);color:#1a1200;border-radius:5px;padding:0 4px;font-weight:900;font-size:10px}
.hist-go{color:var(--muted)}
.hist-listhead{display:flex;flex-direction:column;gap:8px;margin-top:6px;scroll-margin-top:76px}
.hist-listhead h3{font-size:17px;font-weight:800}
.hist-gamechip{display:inline-flex;align-items:center;gap:6px}
.hist-loading{justify-items:center;padding:22px}
.hist-more{align-self:center;min-width:160px}
#hist-currency button{white-space:nowrap}
@media (max-width:560px){
  .hist-tiles{grid-template-columns:repeat(2,1fr);gap:8px}
  .hist-tile{padding:12px}
  .hist-value{font-size:17px}
  .hist-net{font-size:32px}
  .hist-bar .chip,#hist-result .chip{padding:7px 11px;font-size:12.5px}
  .hist-bar .chips,#hist-result{gap:6px}
}
