/* ---- GoPlay's two looks (theme.js picks one: Telegram's setting, or the player's).
   Night (dark): near-black with a green accent. Teal day (light): warm off-white with
   white cards, teal and gold. See-through layers are written as
   rgb(var(--card-rgb) / calc(a * var(--k-card))) and the like, so one rule serves both:
     card   surfaces laid over the page     line    borders and fine edges
     shade  dark wells (inputs, badges)     shadow  shadows
   Game boards keep their own colours in both looks. ---- */
:root, :root[data-theme="dark"] {
  --bg: #05110d; --surface: #0c1f19; --surface-2: #0f2a22;
  --text: #f6f1e4; --text-rgb: 246 241 228; --muted: #a9c2b6; --dim: #8fa89c;
  --felt: #3fd19a; --felt-rgb: 63 209 154; --felt-text: #3fd19a; --felt-ink: #03261a;
  --gold: #f0c14b; --gold-rgb: 240 193 75; --gold-text: #f0c14b; --gold-ink: #2a1f03;
  --coral: #ef6c50; --danger: #ff8f80; --warn: #ffc56b;
  --card-rgb: 255 255 255; --k-card: .75; --line-rgb: 255 255 255; --k-line: 1;
  --shade-rgb: 0 0 0; --k-shade: 1; --shadow-rgb: 0 0 0; --k-shadow: 1;
  --lattice: .03; --header: rgba(5, 17, 13, .86); --nav-bg: rgba(10, 28, 22, .82);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3efe4; --surface: #ffffff; --surface-2: #e7f3f0;
  --text: #10302f; --text-rgb: 16 48 47; --muted: #4f6b6a; --dim: #6b8584;
  --felt: #1fae99; --felt-rgb: 31 174 153; --felt-text: #0b7466; --felt-ink: #032226;
  --gold: #e3ae3c; --gold-rgb: 214 160 40; --gold-text: #8a5d00; --gold-ink: #2a1f03;
  --coral: #e05a3e; --danger: #b3261e; --warn: #9a5b00;
  --card-rgb: 255 255 255; --k-card: 12; --line-rgb: 16 48 47; --k-line: 1.4;
  --shade-rgb: 16 48 47; --k-shade: .22; --shadow-rgb: 16 48 47; --k-shadow: .32;
  --lattice: 0; --header: rgba(17, 55, 59, .94); --nav-bg: rgba(255, 255, 255, .92);
  color-scheme: light;
}
:root {
  /* the lobby's own names, on top of the two looks above */
  --panel: rgb(var(--card-rgb) / calc(.065 * var(--k-card))); --panel-2: rgb(var(--card-rgb) / calc(.1 * var(--k-card)));
  --line: rgb(var(--line-rgb) / calc(.09 * var(--k-line))); --deep: rgb(var(--shade-rgb) / calc(.34 * var(--k-shade)));
  --glass: blur(16px); --glow-gold: 0 0 0 1px rgb(var(--gold-rgb) / .35), 0 8px 24px rgb(var(--gold-rgb) / .25); --glow-felt: 0 0 18px rgb(var(--felt-rgb) / .35);
  /* our mark: a woven band, after the borders on tilet cloth */
  --band: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='8'%3E%3Crect width='36' height='8' fill='%230f4348'/%3E%3Cpath d='M0 4l4-4 4 4-4 4z' fill='%23f0c14b'/%3E%3Cpath d='M12 4l4-4 4 4-4 4z' fill='%23ef6c50'/%3E%3Cpath d='M24 4l4-4 4 4-4 4z' fill='%233fd1bc'/%3E%3C/svg%3E");
  --safe-top: calc(var(--tg-safe-area-inset-top, env(safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --nav-h: 62px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Ethiopic", sans-serif; }
html { background: var(--bg); }
/* the table: felt, with a faint woven lattice */
body {
  overscroll-behavior-y: none;
  background:
    radial-gradient(520px 360px at 100% -5%, rgb(var(--felt-rgb) / .16), transparent 62%),
    radial-gradient(460px 340px at -15% 40%, rgb(var(--gold-rgb) / .09), transparent 60%),
    radial-gradient(500px 400px at 60% 110%, rgb(var(--felt-rgb) / .08), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' fill='none' stroke='%23ffffff' stroke-opacity='.03'%3E%3Cpath d='M22 2l20 20-20 20L2 22z'/%3E%3Cpath d='M22 15l7 7-7 7-7-7z'/%3E%3C/svg%3E"),
    var(--bg);
  background-attachment: fixed;
}
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
h1, h2, h3, p { margin: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.ico { display: grid; place-items: center; }
.ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }

#app { max-width: 480px; margin: 0 auto; min-height: var(--tg-viewport-stable-height, 100dvh); }
.view { padding: calc(var(--safe-top) + 14px) 16px calc(var(--nav-h) + var(--safe-bottom) + 34px); animation: rise .22s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* top of Play: who you are, and your tickets and coins */
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--panel-2); border: 2px solid var(--gold); color: var(--gold); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; object-fit: cover; }
.who { flex: 1; min-width: 0; }
.who b { display: block; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who span { font-size: 12px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.purse { display: flex; align-items: center; gap: 10px; background: var(--deep); border: 1px solid var(--line); border-radius: 14px; padding: 4px 4px 4px 12px; font-weight: 750; font-size: 13px; white-space: nowrap; }
.purse i { width: 32px; height: 32px; border-radius: 10px; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; font-style: normal; font-size: 20px; line-height: 1; font-weight: 700; }
.purse:active { transform: scale(.97); }
/* Support: opens the support chat in Telegram */
.help-btn { display: flex; align-items: center; gap: 5px; flex: none; min-height: 40px; padding: 0 11px; border-radius: 14px; background: var(--deep); border: 1px solid var(--gold); color: var(--gold); font-weight: 750; font-size: 12.5px; box-shadow: 0 0 0 3px rgb(var(--gold-rgb) / .08); }
.help-btn .ico svg { width: 17px; height: 17px; }
.help-btn:active { transform: scale(.97); }
.help-btn[hidden] { display: none; }
.bell-btn { position: relative; flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--deep); border: 1px solid var(--line); color: var(--text); }
.bell-btn .ico svg { width: 19px; height: 19px; }
.bell-btn i { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--coral); color: #fff; font: 800 11px/18px system-ui, sans-serif; font-style: normal; text-align: center; }
.bell-btn i[hidden] { display: none; }
.bell-btn:active { transform: scale(.97); }
.row.msg { display: block; }
.row.msg.new { box-shadow: inset 3px 0 0 var(--gold); }
.msg-text { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.row.msg .btn { margin-top: 10px; width: auto; }
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; padding: 4px 2px 10px; margin-bottom: 10px; }
.bubble { max-width: 84%; align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 9px 12px; }
.bubble.mine { align-self: flex-end; background: rgba(240, 193, 75, .14); border-color: rgba(240, 193, 75, .3); border-radius: 14px 14px 4px 14px; }
.bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.bubble span { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.chat-in { width: 100%; box-sizing: border-box; resize: vertical; min-height: 78px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--deep); color: var(--text); font: inherit; }
@media (max-width: 440px) { .help-btn > span:not(.ico) { display: none; } .help-btn { width: 40px; padding: 0; justify-content: center; border-radius: 50%; } }

/* page titles sit on the band */
h1.title { font-size: 23px; font-weight: 850; letter-spacing: -.01em; padding-bottom: 12px; margin-bottom: 14px; background: var(--band) left bottom / 36px 8px repeat-x; }
.headrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 20px 2px 10px; }
.headrow h2, h2.sub { font-size: 15px; font-weight: 800; }
h2.sub { margin: 18px 2px 8px; }
.link { color: var(--gold); font-size: 13px; font-weight: 750; min-height: 32px; flex: none; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); margin-right: 7px; vertical-align: 1px; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* the featured game */
.hero { position: relative; display: block; width: 100%; height: 190px; border-radius: 20px; overflow: hidden; text-align: left; background: var(--panel); }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 8px; background: var(--band) left / 36px 8px repeat-x; }
.hero .art, .tile .art { position: absolute; inset: 0; }
.hero .art img, .tile .art img { width: 100%; height: 100%; display: block; object-fit: cover; }
.hero .body { position: absolute; inset: auto 0 8px 0; padding: 40px 16px 12px; background: linear-gradient(transparent, #021a12f2 62%); display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.hero h2 { font-size: 24px; font-weight: 850; letter-spacing: -.01em; line-height: 1.1; }
.hero p { font-size: 13px; color: #cfe3e4; margin-top: 2px; }
.cta { flex: none; background: var(--gold); color: var(--gold-ink); font-weight: 800; font-size: 14px; border-radius: 12px; padding: 9px 18px; }
.hero:active, .tile:active { transform: scale(.98); }
.hero, .tile { transition: transform .12s; }

/* tournaments running now */
.live-list { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
.lcard { flex: 0 0 74%; max-width: 310px; scroll-snap-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 13px; display: grid; gap: 9px; align-content: start; }
.lcard b { display: block; font-weight: 800; }
.lcard .facts { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.lcard .facts strong { color: var(--gold); font-weight: 750; }
.lcard .btn { min-height: 42px; padding: 8px 10px; font-size: 14px; }
.lcard .pair { margin: 0; }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar, .live-list::-webkit-scrollbar { display: none; }
.chip { flex: none; display: flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 650; }
.chip img { width: 20px; height: 20px; border-radius: 6px; object-fit: cover; }
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }

/* game cards */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; text-align: left; background: var(--panel); }
.tile .name { position: absolute; inset: auto 0 0 0; padding: 20px 8px 7px; background: linear-gradient(transparent, #000000d0 70%); font-weight: 750; font-size: 12.5px; line-height: 1.2; display: grid; }
.tile .playing { font-size: 10.5px; font-weight: 650; color: var(--felt); }
.tile .playing::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--felt); margin-right: 4px; vertical-align: 1px; animation: blink 1.6s ease-in-out infinite; }
.bubble { position: absolute; top: 6px; right: 6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--coral); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); animation: pop .3s ease-out; }
.bubble[hidden], .playing[hidden] { display: none; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.tile.soon .art, .hero.soon .art { filter: saturate(.75) brightness(.85); }
.tag { position: absolute; top: 6px; left: 6px; font-size: 11px; font-weight: 750; padding: 2px 9px; border-radius: 8px; background: #000000a6; color: #e8e4d8; }
.tile.busy::before, .hero.busy::before { content: ""; position: absolute; z-index: 2; inset: 0; margin: auto; width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff5; border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* bottom tabs: floating, with the one you're on in gold */
.nav { position: fixed; z-index: 5; left: 50%; transform: translateX(-50%); bottom: calc(8px + var(--safe-bottom)); width: calc(100% - 20px); max-width: 460px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; padding: 5px; background: var(--deep); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 8px 22px #0009; }
.nav button { height: calc(var(--nav-h) - 12px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--muted); font-size: 11px; font-weight: 700; border-radius: 15px; }
.nav button.on { background: var(--gold); color: var(--gold-ink); }

/* cards */
.balance { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 12px; }
.balance small { color: var(--muted); font-size: 13px; }
.balance .big { font-size: 34px; font-weight: 850; letter-spacing: -.02em; line-height: 1.15; margin: 2px 0; }
.balance .big span { font-size: 15px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.balance .hold { font-size: 13px; color: var(--warn); }
/* tickets look like one: a stub torn at the side */
.stub { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: linear-gradient(100deg, #f4cf6c, #e6ad2c); color: var(--gold-ink); border: 0; -webkit-mask: radial-gradient(circle 10px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 10px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat; mask: radial-gradient(circle 10px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 10px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat; padding-left: 22px; padding-right: 22px; }
.stub small { color: #5b4306; font-weight: 700; }
.stub .btn { background: var(--gold-ink); color: var(--gold); border: 0; flex: none; width: auto; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.btn { display: block; width: 100%; min-height: 48px; border-radius: 13px; font-weight: 750; font-size: 15px; text-align: center; padding: 11px 14px; background: var(--panel-2); }
.btn.main { background: var(--gold); color: var(--gold-ink); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .55; }

/* a switch between lists: a line under the one you're on */
.seg { display: flex; gap: 16px; margin-bottom: 12px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.seg button { flex: none; padding: 8px 2px; font-weight: 750; font-size: 14px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.seg button.on { color: var(--text); border-bottom-color: var(--gold); }

.rows, .cards { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.row, .line-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; min-height: 56px; width: 100%; text-align: left; }
.row + .row, .line-card + .line-card { border-top: 1px solid var(--line); }
.row .l, .line-card .l { min-width: 0; flex: 1; }
.row .l b, .line-card .l b { display: block; font-weight: 650; font-size: 14px; }
.row .l span, .line-card .l span { font-size: 12px; color: var(--muted); display: block; overflow-wrap: anywhere; }
.line-card .game-id { display: inline-block; margin-top: 3px; font-size: 11px; color: var(--gold); letter-spacing: .03em; padding: 2px 0; text-align: left; }
.row .r { text-align: right; flex: none; font-weight: 750; font-size: 14px; }
.row .r > span { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.line-card .mark { width: 42px; height: 42px; border-radius: 12px; flex: none; object-fit: cover; background: var(--panel-2); color: var(--gold); }
.line-card .r { flex: none; text-align: right; font-weight: 750; font-size: 14px; display: grid; gap: 3px; justify-items: end; }
.line-card .r .rank { color: var(--gold); font-size: 13px; }
.plus { color: var(--felt); } .minus { color: var(--danger); }
.status { display: inline-block; font-size: 11px; font-weight: 750; padding: 1px 8px; border-radius: 999px; }
.status.pending, .status.active { background: #3a2d10; color: var(--warn); }
.status.completed, .status.won { background: var(--surface); color: #6fe0d0; }
.status.finished, .status.refunded { background: #2b494d; color: var(--muted); }
.status.rejected { background: #3d1b19; color: var(--danger); }
.day { font-size: 12px; font-weight: 700; color: var(--muted); margin: 16px 2px 6px; }
.day:first-child { margin-top: 0; }
.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.note { padding: 11px 13px; border-radius: 12px; font-size: 13px; background: #2c2510; color: var(--warn); margin-bottom: 14px; }
.note.bad { background: #331715; color: var(--danger); }
.more { margin-top: 12px; }

/* deposit and withdraw steps */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 650; font-size: 14px; margin-bottom: 12px; min-height: 32px; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
input.big { width: 100%; height: 56px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; font-size: 22px; font-weight: 750; outline: 0; }
input.big:focus { border-color: var(--gold); }
input.big.code { font-size: 17px; letter-spacing: .03em; }
input.big.txt { font-size: 17px; font-weight: 650; height: 52px; color: var(--text); }
/* sign up, sign in, reset: one form on a screen of its own */
.gate.auth { justify-content: flex-start; padding-top: max(48px, 9vh); }
.gate.auth .note { max-width: 340px; width: 100%; margin-bottom: 10px; }
.authform { width: 100%; max-width: 340px; text-align: left; margin-top: 6px; }
.gate.auth .authform .btn { max-width: none; }
.authlinks { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 16px; }
.linkbtn { background: none; color: var(--text); font-weight: 700; font-size: 14px; padding: 8px 4px; min-height: 40px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gold); }
.linkbtn:hover { color: var(--gold); }
.authhelp { margin-top: 18px; font-size: 13px; color: var(--muted); }
.authhelp a { color: var(--text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gold); }
.err { color: var(--danger); font-size: 13px; margin: -4px 2px 12px; min-height: 18px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.presets button { flex: 1 0 28%; height: 40px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-weight: 650; font-size: 14px; }
.presets button:active { background: var(--panel-2); }
.sendto { background: var(--panel); border: 1px solid var(--gold); border-radius: 16px; padding: 14px; margin-bottom: 14px; }
.sendto small { color: var(--muted); font-size: 12px; display: block; }
.sendto .line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sendto .amount { font-size: 26px; font-weight: 850; margin-bottom: 8px; }
.sendto .number { font-size: 21px; font-weight: 800; letter-spacing: .02em; overflow-wrap: anywhere; }
.copy { flex: none; background: var(--panel-2); border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 700; }
ol.steps { margin: 0 0 16px; padding: 0 0 0 20px; font-size: 14px; color: var(--muted); }
ol.steps li { margin-bottom: 5px; } ol.steps b { color: var(--text); font-weight: 650; }
.done { text-align: center; padding: 26px 8px 18px; }
.done i { width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 50%; background: var(--surface); color: #6fe0d0; display: grid; place-items: center; font-style: normal; font-size: 30px; }
.done h2 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.done p { color: var(--muted); margin-bottom: 20px; }

/* profile */
.me { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.me .avatar { width: 68px; height: 68px; font-size: 24px; }
.me h1 { font-size: 21px; font-weight: 850; line-height: 1.2; }
.me p { font-size: 13px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 11px 4px; text-align: center; min-width: 0; }
.stat b { display: block; font-size: 18px; font-weight: 850; overflow-wrap: anywhere; line-height: 1.2; }
.stat span { font-size: 11px; color: var(--muted); }
.section { margin-bottom: 16px; }
.rowlink { width: 100%; text-align: left; }
.rowlink::after { content: "›"; color: var(--muted); font-size: 20px; }
.rowlink .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--panel-2); color: var(--gold); flex: none; }

/* full-page messages and loading */
.gate { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px; gap: 6px; }
.gate .logo { width: 64px; height: 64px; border-radius: 18px; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; font-size: 34px; font-weight: 900; margin-bottom: 14px; }
.gate h1 { font-size: 20px; font-weight: 800; }
.gate p { color: var(--muted); max-width: 300px; margin-bottom: 16px; }
.gate .btn { max-width: 260px; }
.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot i { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--gold); animation: spin .7s linear infinite; }
.skel { background: var(--panel); border-radius: 16px; height: 150px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

#toast { position: fixed; z-index: 9; left: 50%; bottom: calc(var(--nav-h) + var(--safe-bottom) + 20px); transform: translate(-50%, 8px); max-width: calc(100vw - 32px); width: max-content; background: var(--text); color: var(--bg); font-weight: 650; font-size: 14px; padding: 9px 15px; border-radius: 12px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; text-align: center; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: #b3261e; color: #fff; }

.small { font-size: 13px; }
.hidden { display: none !important; }
.balance > .btn.main { margin-top: 12px; }
.balance .muted.small { margin-top: 4px; }
.btn.tiny { width: auto; min-width: 74px; min-height: 36px; padding: 6px 12px; font-size: 13px; flex: none; }

/* tournaments */
.tcard { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; display: grid; gap: 8px; }
.tcard .thead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tcard .thead b { font-size: 15px; font-weight: 800; }
.tcard .muted { font-size: 13px; }
.tcard .pair { margin-top: 2px; }
.tmine { font-size: 13px; font-weight: 700; color: var(--gold); }
.row.mine { background: var(--panel-2); }
.place { display: flex; align-items: center; gap: 10px; }
.place > i { font-style: normal; width: 26px; height: 26px; border-radius: 8px; background: var(--panel-2); color: var(--gold); display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.small-row { min-height: 40px; padding: 8px 14px; }
.mineline { margin-top: 8px; font-size: 13px; }

/* daily reward */
.ladder { display: flex; gap: 6px; margin: 10px 0 8px; }
.ladder span { flex: 1; text-align: center; padding: 7px 0; border-radius: 10px; background: var(--panel-2); color: var(--muted); font-weight: 750; font-size: 13px; }
.ladder span.on { background: var(--gold); color: var(--gold-ink); }

/* parental controls */
.check { display: flex; align-items: center; gap: 10px; font-weight: 650; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--gold); }

/* live tournaments, turning one by one */
.tcar { overflow: hidden; margin: 0 -16px; padding: 0 16px; }
.ttrack { display: flex; transition: transform .55s cubic-bezier(.3, .8, .25, 1); }
.tslide { flex: 0 0 100%; min-width: 0; padding-right: 0; opacity: .35; transform: scale(.94); transition: opacity .45s, transform .45s; }
.tslide.on { opacity: 1; transform: none; }
.tslide .lcard { max-width: none; }
.lhead { display: flex; align-items: center; gap: 10px; }
.lhead img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; flex: none; }
.lhead small { display: block; color: var(--muted); font-size: 12px; }
.tdots { display: flex; justify-content: center; gap: 6px; margin: 10px 0 2px; }
.tdot { width: 7px; height: 7px; padding: 0; border-radius: 4px; background: var(--line); transition: width .3s, background .3s; }
.tdot.on { width: 20px; background: var(--gold); }
.hero { margin-top: 14px; height: 168px; }
@media (prefers-reduced-motion: reduce) { .ttrack, .tslide, .tdot { transition: none; } }

/* the weekly spin */
.spin { display: flex; gap: 14px; align-items: center; background: linear-gradient(135deg, var(--panel-2), var(--panel)); border: 1px solid var(--gold); border-radius: 18px; padding: 14px; margin-bottom: 14px; }
.spin-wheel { position: relative; flex: none; width: 112px; height: 112px; }
.wheel { width: 100%; height: 100%; border-radius: 50%; border: 4px solid var(--gold); transition: transform 4.2s cubic-bezier(.12, .72, .12, 1);
  background: conic-gradient(var(--gold) 0 30deg, var(--coral) 30deg 60deg, var(--felt) 60deg 90deg, var(--deep) 90deg 120deg, var(--gold) 120deg 150deg, var(--coral) 150deg 180deg, var(--felt) 180deg 210deg, var(--deep) 210deg 240deg, var(--gold) 240deg 270deg, var(--coral) 270deg 300deg, var(--felt) 300deg 330deg, var(--deep) 330deg 360deg); }
.wheel { position: relative; }
.wheel .hub { position: absolute; inset: 40%; border-radius: 50%; background: var(--deep); border: 3px solid var(--gold); }
/* the amount on each face, written from the hub outwards */
.wheel .face { position: absolute; left: 50%; top: 0; height: 50%; width: 0; transform-origin: 50% 100%; display: flex; justify-content: center; align-items: flex-start; }
.wheel .face b { display: block; margin-top: 7px; font-size: 10px; font-weight: 900; line-height: 1; color: #2a1f03; text-shadow: 0 0 2px rgb(var(--line-rgb) / calc(.45 * var(--k-line))); white-space: nowrap; }
.wheel .face.dim b { color: var(--gold); text-shadow: none; }
.spin-wheel { width: 128px; height: 128px; }
.spin .pointer { position: absolute; top: -8px; left: 50%; margin-left: -9px; z-index: 2; border: 9px solid transparent; border-top: 16px solid var(--text); border-bottom: 0; }
.spin-body { min-width: 0; }
.spin-body h2 { margin: 0 0 2px; font-size: 17px; }
.spin-body .btn { margin-top: 8px; }
.spin-result { margin: 8px 0 0; font-weight: 800; font-size: 18px; color: var(--gold); }

/* what is going on at a game: red = tables waiting for an opponent, green = games being played */
.inds { display: flex; flex-wrap: wrap; gap: 6px; }
.ind { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 750; }
.ind::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ind.red { background: #3b1814; color: #ff8f80; }
.ind.green { background: var(--surface-2); color: var(--felt); }
.ind[hidden] { display: none; }
.bubble { background: #e5483b; }

/* ---- fusion: glass, glow and gold ---- */
.balance, .rows, .cards, .lcard, .tcard, .stat, .sendto, .spin, .chip, .purse, .help-btn, .presets button, input.big {
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
}
.balance, .rows, .cards, .lcard, .tcard { box-shadow: 0 10px 30px rgb(var(--shadow-rgb) / calc(.28 * var(--k-shadow))), inset 0 1px 0 rgb(var(--line-rgb) / calc(.05 * var(--k-line))); }
.balance { position: relative; overflow: hidden; }
.balance::before, .lcard::before, .tcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--gold), var(--felt), transparent); opacity: .75; }
.lcard, .tcard { position: relative; overflow: hidden; }
.balance .big, .stat b, .purse { font-variant-numeric: tabular-nums; }
.btn.main, .cta { background: linear-gradient(135deg, #f7d77a, var(--gold) 55%, #d9a132); box-shadow: var(--glow-gold); }
.btn.main:hover:not(:disabled), .cta:hover { filter: brightness(1.05); }
.nav { background: var(--nav-bg) !important; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line) !important; box-shadow: 0 12px 34px rgb(var(--shadow-rgb) / calc(.45 * var(--k-shadow))); }
.nav button.on { background: linear-gradient(135deg, #f7d77a, var(--gold)); box-shadow: 0 0 16px rgb(var(--gold-rgb) / .4); }
.chip.on { background: rgb(var(--gold-rgb) / .14); border-color: rgb(var(--gold-rgb) / .55); color: var(--gold); box-shadow: 0 0 12px rgb(var(--gold-rgb) / .18); }
.tile, .hero { box-shadow: 0 8px 22px rgb(var(--shadow-rgb) / calc(.35 * var(--k-shadow))); outline: 1px solid rgb(var(--line-rgb) / calc(.06 * var(--k-line))); outline-offset: -1px; }
.tile .playing, .tile .playing::before { text-shadow: var(--glow-felt); }
.avatar { box-shadow: 0 0 14px rgb(var(--gold-rgb) / .35); }
.purse i { box-shadow: 0 0 12px rgb(var(--gold-rgb) / .45); }
.help-btn { background: rgb(var(--gold-rgb) / .08); box-shadow: 0 0 14px rgb(var(--gold-rgb) / .16); }
.seg button.on { text-shadow: 0 0 14px rgb(var(--gold-rgb) / .35); }
h1.title { text-shadow: 0 0 22px rgb(var(--gold-rgb) / .12); }
/* wider screens (Telegram Desktop, a browser): the column stays phone-width and centred */
@media (min-width: 700px) { #app { max-width: 520px; } }
@media (max-width: 350px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .purse { padding-left: 8px; gap: 6px; } }

/* ---- Wallet: a balance card with round actions, and assets listed like tokens ---- */
.wallet-hero { position: relative; overflow: hidden; border-radius: 24px; padding: 18px 16px 16px; margin-bottom: 16px;
  background:
    radial-gradient(260px 160px at 100% 0%, rgb(var(--gold-rgb) / .22), transparent 70%),
    radial-gradient(300px 200px at 0% 100%, rgb(var(--felt-rgb) / .22), transparent 70%),
    linear-gradient(150deg, #174a50, #143c40 60%, #14373b);
  border: 1px solid rgb(var(--gold-rgb) / .28); box-shadow: 0 18px 40px rgb(var(--shadow-rgb) / calc(.45 * var(--k-shadow))), inset 0 1px 0 rgb(var(--line-rgb) / calc(.07 * var(--k-line))); }
.wallet-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 6px; background: var(--band) left / 36px 6px repeat-x; opacity: .9; }
.wh-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wh-top small { color: var(--muted); font-size: 13px; font-weight: 650; }
.net { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 750; color: var(--felt); background: rgb(var(--felt-rgb) / .1); border: 1px solid rgb(var(--felt-rgb) / .3); padding: 3px 9px; border-radius: 999px; }
.net i { width: 6px; height: 6px; border-radius: 50%; background: var(--felt); box-shadow: 0 0 8px var(--felt); }
.wh-big { font-size: 38px; font-weight: 850; letter-spacing: -.02em; line-height: 1.1; margin: 6px 0 2px; background: linear-gradient(180deg, #fff6dc, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wh-big span { font-size: 16px; font-weight: 750; }
.wallet-hero .hold { font-size: 13px; color: var(--warn); }
.wh-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin-top: 14px; padding-bottom: 6px; }
.wact { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.wact .ring { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgb(var(--card-rgb) / calc(.07 * var(--k-card))); border: 1px solid rgb(var(--line-rgb) / calc(.12 * var(--k-line))); color: var(--gold); backdrop-filter: blur(10px); }
.wact.main .ring { background: linear-gradient(135deg, #f7d77a, var(--gold) 55%, #d9a132); color: var(--gold-ink); border: 0; box-shadow: var(--glow-gold); }
.wact .ring .ico svg, .wact .ring svg { width: 21px; height: 21px; }
.wact .lbl { font-size: 10.5px; font-weight: 700; color: var(--text); text-align: center; line-height: 1.15; overflow-wrap: anywhere; }
.wact:active .ring { transform: scale(.94); }
.assets { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); box-shadow: 0 10px 30px rgb(var(--shadow-rgb) / calc(.28 * var(--k-shadow))); }
.asset { display: flex; align-items: center; gap: 12px; padding: 13px 14px; }
.asset + .asset { border-top: 1px solid var(--line); }
.asset .token { width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.asset.t .token { background: radial-gradient(circle at 35% 30%, #ffe9a6, var(--gold) 55%, #b98420); color: var(--gold-ink); box-shadow: 0 0 14px rgb(var(--gold-rgb) / .35); }
.asset.c .token { background: radial-gradient(circle at 35% 30%, #a8f5e6, var(--felt) 55%, #1d8a7b); color: #032226; box-shadow: 0 0 14px rgb(var(--felt-rgb) / .35); }
.asset .l { flex: 1; min-width: 0; }
.asset .l b { display: block; font-weight: 800; }
.asset .l span { display: block; font-size: 11.5px; color: var(--muted); }
.asset .r { text-align: right; flex: none; }
.asset .r > b { display: block; font-size: 19px; font-weight: 850; }
.asset .acts { display: flex; gap: 6px; justify-content: flex-end; margin-top: 4px; }
.mini { font-size: 11px; font-weight: 750; color: var(--gold); padding: 4px 9px; border-radius: 999px; border: 1px solid rgb(var(--gold-rgb) / .4); background: rgb(var(--gold-rgb) / .08); white-space: nowrap; }

/* ---- Profile: an identity card ---- */
.idcard { position: relative; overflow: hidden; border-radius: 24px; padding: 16px; margin-bottom: 14px;
  background: radial-gradient(260px 180px at 100% 0%, rgb(var(--felt-rgb) / .2), transparent 70%), linear-gradient(150deg, #1a484d, #14393e);
  border: 1px solid rgb(var(--felt-rgb) / .25); box-shadow: 0 18px 40px rgb(var(--shadow-rgb) / calc(.45 * var(--k-shadow))), inset 0 1px 0 rgb(var(--line-rgb) / calc(.06 * var(--k-line))); }
.idcard::after { content: ""; position: absolute; inset: auto 0 0 0; height: 6px; background: var(--band) left / 36px 6px repeat-x; }
.id-top { display: flex; align-items: center; gap: 12px; }
.id-av .avatar { width: 58px; height: 58px; font-size: 18px; border-width: 2px; box-shadow: 0 0 0 4px rgb(var(--gold-rgb) / .15), 0 0 22px rgb(var(--gold-rgb) / .35); }
.id-who { flex: 1; min-width: 0; }
.id-who h1 { font-size: 19px; font-weight: 850; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.id-who p { color: var(--muted); font-size: 13px; }
.id-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 750; padding: 3px 9px; border-radius: 999px; flex: none; }
.id-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.id-status.ok { color: var(--felt); background: rgb(var(--felt-rgb) / .1); border: 1px solid rgb(var(--felt-rgb) / .3); }
.id-status.bad { color: var(--danger); background: rgba(255, 143, 128, .1); border: 1px solid rgba(255, 143, 128, .3); }
.id-chip { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 14px; padding: 9px 12px; border-radius: 14px; background: rgb(var(--shade-rgb) / calc(.3 * var(--k-shade))); border: 1px solid var(--line); font-size: 13px; }
.id-chip span { color: var(--muted); }
.id-chip b { flex: 1; text-align: left; letter-spacing: .04em; }
.id-chip .ico svg { width: 17px; height: 17px; color: var(--gold); }
.id-hold { display: flex; gap: 8px; margin: 10px 0 8px; }
.id-hold span { flex: 1; text-align: center; font-size: 12.5px; font-weight: 750; padding: 7px 4px; border-radius: 12px; background: rgb(var(--card-rgb) / calc(.05 * var(--k-card))); border: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat b { background: linear-gradient(180deg, #fff6dc, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* re-entry: what it costs, and what it adds underneath */
.btn.reenter { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; margin-top: 8px; }
.btn.reenter small { font-size: 12px; font-weight: 600; opacity: .75; }

/* ---------- tournaments: woven badges per shift (bronze 6 h, silver 12 h, gold weekly), the tilet edge, a run bar ---------- */
.btn.gold { background: linear-gradient(135deg, #f7d77a, var(--gold) 55%, #d9a535); color: var(--gold-ink); box-shadow: var(--glow-gold); }
.btn.felt { background: linear-gradient(135deg, #63ecd2, #2fb9a5); color: var(--felt-ink); box-shadow: var(--glow-felt); }
.btn.big { min-height: 56px; font-size: 16px; border-radius: 16px; }
.btn.link { background: none; color: var(--muted); font-weight: 650; min-height: 40px; }
.med { position: relative; width: 62px; height: 62px; flex: none; display: grid; place-items: center; }
.med svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.med .m-out { stroke-width: 2.5; }
.med .m-in { fill: none; stroke-dasharray: 3 3; stroke-opacity: .55; }
.med b { position: relative; font-size: 13px; font-weight: 900; line-height: 1; text-align: center; }
.med b small { display: block; font-size: 8px; letter-spacing: .08em; opacity: .8; margin-top: 2px; }
.med.bronze .m-out { fill: #3a2414; stroke: #d58a5a; } .med.bronze .m-in { stroke: #d58a5a; } .med.bronze b { color: #f3b88f; }
.med.silver .m-out { fill: #343d3e; stroke: #cfd7d8; } .med.silver .m-in { stroke: #cfd7d8; } .med.silver b { color: var(--text); }
.med.gold .m-out { fill: #3a2c08; stroke: var(--gold); filter: drop-shadow(0 0 6px rgb(var(--gold-rgb) / .6)); } .med.gold .m-in { stroke: var(--gold); } .med.gold b { color: #ffe08a; }
.med.big { width: 76px; height: 76px; } .med.big b { font-size: 16px; } .med.big b small { font-size: 9px; }

.tc { position: relative; display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 12px 12px 19px; margin-bottom: 10px; border-radius: 18px;
  background: linear-gradient(100deg, rgb(var(--card-rgb) / calc(.06 * var(--k-card))), rgb(var(--card-rgb) / calc(.02 * var(--k-card)))); border: 1px solid var(--line); overflow: hidden; text-align: left; }
.tc::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='21'%3E%3Crect width='7' height='21' fill='%230f4348'/%3E%3Cpath d='M3.5 0l3.5 3.5-3.5 3.5L0 3.5z' fill='%23f0c14b'/%3E%3Cpath d='M3.5 7l3.5 3.5-3.5 3.5L0 10.5z' fill='%23ef6c50'/%3E%3Cpath d='M3.5 14l3.5 3.5-3.5 3.5L0 17.5z' fill='%233fd1bc'/%3E%3C/svg%3E"); }
.tc.mine { border-color: rgb(var(--felt-rgb) / .45); box-shadow: 0 0 22px rgb(var(--felt-rgb) / .12); cursor: pointer; }
.tc.gold:not(.mine) { border-color: rgb(var(--gold-rgb) / .3); }
.tc-body { min-width: 0; display: grid; gap: 4px; }
.tc-game { color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.tc h3 { font-size: 15.5px; font-weight: 800; }
.tc-meta { font-size: 12px; color: var(--muted); }
.tc .inds { margin-top: 2px; }
.tc-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.tc-pz { font-weight: 900; color: var(--gold); font-size: 16px; min-width: 0; }
.tc-pz small { font-size: 11px; color: var(--muted); font-weight: 600; }
.tc .btn { width: auto; min-height: 36px; padding: 6px 14px; font-size: 13.5px; border-radius: 11px; flex: none; }
.climb { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding-top: 8px; border-top: 1px dashed rgb(var(--line-rgb) / calc(.1 * var(--k-line))); }
.climb > b { color: var(--felt); }
.cbar { flex: 1; height: 6px; border-radius: 9px; background: rgb(var(--card-rgb) / calc(.08 * var(--k-card))); position: relative; }
.cbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 9px; background: linear-gradient(90deg, var(--felt), var(--gold)); box-shadow: 0 0 8px rgb(var(--felt-rgb) / .4); }
.cbar em { position: absolute; right: 0; top: -3px; width: 2px; height: 12px; background: var(--gold); }
.tslide .tc { margin-bottom: 0; }

.runcard { border-radius: 16px; padding: 11px 12px; background: var(--panel); border: 1px solid var(--line); margin: 12px 0; text-align: left; }
.runtop { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.runbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 5px; margin: 8px 0 4px; }
.runbar i { height: 9px; border-radius: 4px; background: rgb(var(--card-rgb) / calc(.08 * var(--k-card))); }
.runbar i.w { background: var(--felt); box-shadow: 0 0 8px rgb(var(--felt-rgb) / .6); }
.runbar i.d { background: var(--gold); }
.runbar i.l { background: var(--coral); opacity: .8; }
.runbar i.half { opacity: .5; }
.runbar i.next { background: transparent; border: 1.5px dashed var(--gold); }
.runcard .small { font-size: 11.5px; }

.sheetwrap { position: fixed; inset: 0; z-index: 30; background: rgba(1, 5, 6, .62); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; animation: fadein .18s ease-out; }
@keyframes fadein { from { opacity: 0; } }
.jsheet { position: relative; width: 100%; max-width: 480px; border-radius: 26px 26px 0 0; padding: 26px 18px calc(18px + var(--safe-bottom)); text-align: center; overflow: hidden;
  background: linear-gradient(180deg, var(--surface), #14383c); border-top: 1px solid rgb(var(--gold-rgb) / .35); box-shadow: 0 -20px 60px rgb(var(--shadow-rgb) / calc(.6 * var(--k-shadow))); animation: sheetup .28s cubic-bezier(.2, .9, .25, 1); }
@keyframes sheetup { from { transform: translateY(100%); } }
.jsheet::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 7px; background: var(--band) left top / 36px 7px repeat-x; }
.jsheet .med { margin: 0 auto 10px; }
.jsheet h2 { font-size: 21px; font-weight: 900; margin: 4px 0 2px; }
.jkicker { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); font-weight: 800; }
.sparks i { position: absolute; width: 7px; height: 7px; transform: rotate(45deg); animation: spark 1.6s ease-out both; }
.sparks i:nth-child(1) { left: 12%; top: 34px; background: var(--gold); } .sparks i:nth-child(2) { left: 24%; top: 76px; background: var(--coral); animation-delay: .1s; }
.sparks i:nth-child(3) { left: 80%; top: 44px; background: var(--felt); animation-delay: .2s; } .sparks i:nth-child(4) { left: 88%; top: 96px; background: var(--gold); animation-delay: .05s; }
.sparks i:nth-child(5) { left: 68%; top: 22px; background: var(--coral); animation-delay: .15s; } .sparks i:nth-child(6) { left: 36%; top: 18px; background: var(--felt); animation-delay: .25s; }
@keyframes spark { from { opacity: 0; transform: translateY(14px) rotate(45deg) scale(.4); } 40% { opacity: 1; } }

.tban { position: relative; border-radius: 22px; overflow: hidden; padding: 14px 14px 18px; background: linear-gradient(135deg, var(--surface), #173d42 60%); border: 1px solid rgb(var(--felt-rgb) / .3); }
.tban::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px; background: var(--band) left top / 36px 7px repeat-x; }
.tban-t { display: flex; align-items: center; gap: 12px; }
.tban h2 { font-size: 19px; font-weight: 850; }
.tstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.tstats div { background: rgb(var(--shade-rgb) / calc(.3 * var(--k-shade))); border: 1px solid rgb(var(--line-rgb) / calc(.07 * var(--k-line))); border-radius: 12px; padding: 7px 4px; text-align: center; }
.tstats b { display: block; font-size: 17px; font-weight: 850; }
.tstats b.gold { color: var(--gold); }
.tstats span { font-size: 10.5px; color: var(--muted); }
.ttabs { display: flex; gap: 18px; margin: 16px 2px 8px; }
.ttabs button { font-size: 14px; font-weight: 700; color: var(--muted); padding: 4px 0 7px; position: relative; }
.ttabs button.on { color: var(--text); }
.ttabs button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.tlist .tr { display: grid; grid-template-columns: 32px 30px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 8px 6px; border-bottom: 1px solid rgb(var(--line-rgb) / calc(.06 * var(--k-line))); font-size: 14px; }
.tlist .rk { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 900; font-size: 13px; background: rgb(var(--card-rgb) / calc(.06 * var(--k-card))); }
.tlist .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 900; color: #032226; }
.tlist .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlist .pts { text-align: right; font-weight: 800; }
.tlist .pts small { display: block; color: var(--gold); font-size: 11px; font-weight: 700; }
.tlist .tr:not(:has(.av)) { grid-template-columns: 32px minmax(0, 1fr) auto; }
.tlist .g1 .rk { background: linear-gradient(135deg, #f7d77a, #c9952a); color: var(--gold-ink); box-shadow: 0 0 12px rgb(var(--gold-rgb) / .5); }
.tlist .g2 .rk { background: linear-gradient(135deg, #eef3f3, #9aa8a1); color: #1b2324; }
.tlist .g3 .rk { background: linear-gradient(135deg, #f0a77a, #9c5a33); color: #2a1408; }
.tlist .tr.cut { border-bottom: 2px dashed rgb(var(--gold-rgb) / .45); }
.tlist .tr.me { background: linear-gradient(90deg, rgb(var(--felt-rgb) / .18), transparent); border-radius: 12px; }
.how { display: grid; gap: 10px; font-size: 14px; }
.how p { padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.tdock-room { height: 118px; }
.tdock { position: fixed; z-index: 6; left: 50%; transform: translateX(-50%); width: calc(100% - 24px); max-width: 456px; bottom: calc(var(--nav-h) + var(--safe-bottom) + 18px);
  border-radius: 18px; padding: 10px 12px; background: linear-gradient(90deg, var(--surface-2), var(--surface)); border: 1px solid rgb(var(--felt-rgb) / .5); box-shadow: 0 0 24px rgb(var(--felt-rgb) / .2), 0 -10px 30px rgb(var(--shadow-rgb) / calc(.5 * var(--k-shadow))); }
.tdock-t { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; }
.tdock-t b { color: var(--felt); }
.tdock .pair { margin: 0; grid-template-columns: 1.3fr 1fr; gap: 8px; }
.tdock .btn { min-height: 46px; }
.btn.reenter { margin-top: 0; }

/* ---- Teal day: the teal hero cards (wallet, profile) stay teal, with light words on
   them, and anything laid over game art keeps light words; numbers on white cards are
   a deeper colour */
:root[data-theme="light"] .idcard, :root[data-theme="light"] .wallet-hero {
  --text: #f6f1e4; --text-rgb: 246 241 228; --muted: #cfe3df; --dim: #b5ccc8;
  --gold-text: #f7d77a; --felt-text: #7fe8d6; --felt: #5fe0c4; --danger: #ffb0a3; --warn: #ffd27a;
  --card-rgb: 255 255 255; --k-card: 1.4; --line-rgb: 255 255 255; --k-line: 1.6;
  --shade-rgb: 0 0 0; --k-shade: .8;
  color: var(--text);
}
.tile .name, .hero .body { color: #fff; }
:root[data-theme="light"] .stat b { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--felt-text); }

/* ---- 2026-11 redesign, Home tab: SVG money icons, icon-only support, compact tournament strip,
   Jump back in row, band under section titles, live pill on tiles, clear unavailable state. */
.purse span { display: inline-flex; align-items: center; gap: 4px; }
.purse .ico svg { width: 17px; height: 17px; }
.purse .pt .ico { color: var(--gold); } .purse .pc .ico { color: var(--felt); }
.help-btn > span:not(.ico) { display: none; }
.help-btn { width: 40px; padding: 0; justify-content: center; border-radius: 50%; }

/* compact tournament cards on Home */
.tslide .tc { padding: 10px 10px 10px 17px; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; }
.tslide .med { width: 48px; height: 48px; } .tslide .med b { font-size: 11px; } .tslide .med b small { font-size: 7px; }
.tslide .tc h3 { font-size: 14.5px; }
.tslide .tc-pz small, .tslide .inds { display: none; }
.tslide .climb { padding-top: 6px; }

/* section titles carry the tilet band */
.headrow.band { padding-bottom: 9px; background: var(--band) left bottom / 36px 6px repeat-x; }

/* Jump back in */
.rrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rtile { position: relative; display: grid; gap: 5px; justify-items: center; font-size: 11.5px; font-weight: 700; color: var(--text); }
.rtile .art { position: relative; width: 100%; aspect-ratio: 1; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 2px rgb(var(--gold-rgb) / .45), 0 6px 16px rgb(var(--shadow-rgb) / calc(.35 * var(--k-shadow))); }
.rtile .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rtile > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* tiles: open-table count as a small coral dot-badge, players as a glass pill */
.tile .name { padding-bottom: 30px; }
.tile .playing { position: absolute; left: 7px; bottom: 7px; z-index: 1; font-size: 10.5px; font-weight: 800; color: #eafff9; padding: 2px 8px 2px 6px; border-radius: 999px;
  background: rgb(0 0 0 / .55); border: 1px solid rgb(var(--felt-rgb) / .55); backdrop-filter: blur(6px); text-shadow: none; }
.tile .playing::before { background: var(--felt); box-shadow: 0 0 6px var(--felt); }
.bubble { min-width: 22px; height: 22px; font-size: 11.5px; }
/* unavailable: grey, a wrench, still tappable to say why */
.tile.soon .art { filter: grayscale(.9) brightness(.55); }
.tile.soon .tag.soonmark { background: rgb(0 0 0 / .7); color: #ffd27a; border: 1px solid rgb(255 210 122 / .45); }
.tile .wrench { position: absolute; inset: 0; margin: auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 18px;
  background: rgb(0 0 0 / .55); border: 1px solid rgb(255 255 255 / .2); }

/* ---- 2026-11 redesign: Compete, My results, Rewards, Wallet, Profile ---- */

/* ---- shared bits: money amounts as icons, bottom sheet, segmented control ---- */
.amt { display: inline-flex; align-items: center; gap: 3px; font-weight: 850; vertical-align: -2px; }
.amt .ico svg { width: 1.05em; height: 1.05em; stroke-width: 2; }
.amt.t .ico { color: var(--gold-text); } .amt.c .ico { color: var(--felt-text); }
.btn .amt .ico { color: currentColor; }
.psheet { text-align: left; padding-top: 30px; display: grid; gap: 12px; background: var(--surface); }
.psheet h2 { text-align: center; }
.psheet .grab { justify-self: center; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin-top: -8px; }
.psheet .row { background: var(--panel); border-radius: 14px; border: 1px solid var(--line); }
.sh3 { font-size: 13px; color: var(--muted); font-weight: 750; }
.chips.wrap { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
.pseg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 13px; background: var(--deep); border: 1px solid var(--line); }
.pseg button { min-height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 750; color: var(--muted); white-space: nowrap; }
.pseg button.on { background: linear-gradient(135deg, #f7d77a, var(--gold)); color: var(--gold-ink); box-shadow: 0 0 12px rgb(var(--gold-rgb) / .3); }
.view > .pseg { display: grid; margin-bottom: 12px; }

/* ---- Compete ---- */
.gpick { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px 6px; padding: 2px 16px 6px; scrollbar-width: none; }
.gpick::-webkit-scrollbar { display: none; }
.gp-i { flex: none; width: 70px; display: grid; justify-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--muted); }
.gp-i img { width: 58px; height: 58px; border-radius: 16px; object-fit: cover; opacity: .7; border: 2px solid transparent; }
.gp-i.on { color: var(--gold-text); }
.gp-i.on img { opacity: 1; border-color: var(--gold); box-shadow: 0 0 16px rgb(var(--gold-rgb) / .45); }
.gp-i span { max-width: 70px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.infob { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--gold); color: var(--gold-text); font: italic 800 14px Georgia, serif; flex: none; }
.tc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tc-clock { font-size: 17px; font-weight: 900; color: var(--gold-text); letter-spacing: .02em; }
.tc .facts { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--muted); }
.tc .facts > span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: var(--deep); border: 1px solid var(--line); }
.tc .facts .ico svg { width: 14px; height: 14px; }
.tc .tc-line { justify-content: flex-end; }
.tc .tc-line .btn { min-height: 40px; padding: 6px 18px; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; margin: 6px 0 12px; }
.pd { position: relative; display: grid; justify-items: center; gap: 2px; padding: 12px 6px 30px; border-radius: 16px 16px 6px 6px; background: var(--panel); border: 1px solid var(--line); text-align: center; overflow: hidden; }
.pd::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--band) left / 36px 6px repeat-x; }
.pd b { font-size: 12.5px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd small { font-size: 11px; color: var(--muted); }
.pd i { position: absolute; bottom: 9px; font-style: normal; font-weight: 900; font-size: 12px; }
.pd-av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 13px; color: #1b1405; }
.pd.p1 { padding-top: 18px; border-color: rgb(var(--gold-rgb) / .6); box-shadow: 0 0 22px rgb(var(--gold-rgb) / .25); }
.pd.p1 .pd-av { width: 52px; height: 52px; background: linear-gradient(135deg, #f7d77a, #c9952a); box-shadow: 0 0 14px rgb(var(--gold-rgb) / .6); }
.pd.p2 .pd-av { background: linear-gradient(135deg, #eef3f3, #9aa8a1); }
.pd.p3 .pd-av { background: linear-gradient(135deg, #f0a77a, #9c5a33); }
/* tournament page: no bottom tabs, the Play dock at the very bottom */
body.focus .nav { display: none; }
body.focus .tdock { bottom: calc(10px + var(--safe-bottom)); }
body.focus .view { padding-bottom: calc(24px + var(--safe-bottom)); }

/* ---- My results ---- */
.stat .ico { color: var(--gold-text); margin-bottom: 2px; }
.stat .ico svg { width: 18px; height: 18px; }
.filterbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.fbtn { min-height: 36px; padding: 0 14px; border-radius: 12px; border: 1px solid rgb(var(--gold-rgb) / .5); color: var(--gold-text); font-weight: 750; font-size: 13px; background: rgb(var(--gold-rgb) / .08); }

/* ---- Rewards ---- */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin: 10px 0; }
.dy { display: grid; justify-items: center; gap: 3px; padding: 7px 2px; border-radius: 12px; background: var(--deep); border: 1px solid var(--line); opacity: .7; }
.dy small { font-size: 9.5px; color: var(--muted); font-weight: 700; }
.dy b { font-size: 12px; font-weight: 850; }
.dy .ico svg { width: 16px; height: 16px; color: var(--felt-text); }
.dy i { font-style: normal; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 900; background: var(--felt); color: var(--felt-ink); }
.dy.got { opacity: 1; border-color: rgb(var(--felt-rgb) / .45); }
.dy.now { opacity: 1; border: 1.5px solid var(--gold); background: rgb(var(--gold-rgb) / .14); box-shadow: 0 0 16px rgb(var(--gold-rgb) / .35); transform: translateY(-2px); }
.dy.now small { color: var(--gold-text); }
.task .tbar { height: 6px; border-radius: 6px; background: var(--deep); margin-top: 6px; overflow: hidden; }
.task .tbar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--felt), var(--gold)); }
.task.ready { background: rgb(var(--gold-rgb) / .07); }
.task.ready .btn { animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { box-shadow: 0 0 0 4px rgb(var(--gold-rgb) / .25), var(--glow-gold); } }

/* ---- Wallet ---- */
.wh-actions.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wh-actions.four .wact .ring { width: 52px; height: 52px; }
.wh-actions.four .wact .lbl { font-size: 11.5px; }
.track { border-radius: 18px; padding: 13px 14px; margin-bottom: 14px; background: var(--panel); border: 1px solid rgb(var(--gold-rgb) / .4); }
.tr-h { display: flex; justify-content: space-between; font-size: 14px; }
.tr-h span { font-weight: 850; color: var(--gold-text); }
.stepper { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); margin: 12px 0 2px; padding: 0; }
.stepper li { position: relative; display: grid; justify-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.stepper li::before { content: ""; position: absolute; top: 8px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li i { position: relative; z-index: 1; width: 18px; height: 18px; border-radius: 50%; background: var(--deep); border: 2px solid var(--line); }
.stepper li.ok i { background: var(--felt); border-color: var(--felt); }
.stepper li.ok::before, .stepper li.now::before { background: var(--felt); }
.stepper li.now i { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 5px rgb(var(--gold-rgb) / .2); }
.stepper li.now span { color: var(--gold-text); }

/* ---- Profile ---- */
.shimmer b, .shimmer span { display: block; height: 16px; margin: 3px auto; width: 60%; border-radius: 6px; background: linear-gradient(90deg, var(--panel), var(--panel-2), var(--panel)); background-size: 200% 100%; animation: shim 1.2s linear infinite; }
.shimmer span { height: 10px; width: 75%; }
@keyframes shim { to { background-position: -200% 0; } }
.prefs { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 14px; }
.pref { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; min-height: 58px; }
.pref + .pref { border-top: 1px solid var(--line); }
.pref > span { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14px; }
.pref > span .ico, .acct summary .ico { width: 32px; height: 32px; border-radius: 10px; background: var(--panel-2); color: var(--gold-text); }
.pref > span .ico svg { width: 18px; height: 18px; }
.acct { margin-bottom: 14px; }
.acct summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 56px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); font-weight: 700; cursor: pointer; }
.acct summary::-webkit-details-marker { display: none; }
.acct summary small { margin-left: auto; font-weight: 600; }
.acct summary::after { content: "\2304"; color: var(--muted); font-size: 18px; }
.acct[open] summary { margin-bottom: 8px; }
.row .l span.amt { display: inline-flex; font-size: 12px; color: var(--text); }
.row .l .amt .ico { display: grid; }
.task .l > span.num { display: flex; align-items: center; gap: 4px; }
.id-hold > span { display: flex; align-items: center; justify-content: center; }
.id-hold .amt, .id-hold .amt span { padding: 0; border: 0; background: none; flex: none; overflow: visible; }
/* light: the tournament banner stays teal with light words, like the wallet and profile cards */
:root[data-theme="light"] .tban { --text: #f6f1e4; --muted: #cfe3df; --card-rgb: 255 255 255; --k-card: 1.4; --line-rgb: 255 255 255; --k-line: 1.6; --shade-rgb: 0 0 0; --k-shade: .8; color: var(--text); background: linear-gradient(150deg, #1a484d, #14393e); }
.ttrack { align-items: flex-start; }

/* the wallet in tickets and coins: the card's coins line, its three actions, and the ? that explains them */
.wh-coins { display: flex; align-items: center; gap: 6px; font-weight: 750; font-size: 15px; color: var(--muted); margin-top: 2px; }
.wh-coins .ico svg { width: 18px; height: 18px; }
.wh-actions.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wh-actions.three .wact .ring { width: 54px; height: 54px; }
.wh-help { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 850; font-size: 16px; color: var(--gold-ink); background: var(--gold); box-shadow: var(--glow-gold); }
.helpsheet { max-height: 88dvh; overflow-y: auto; padding-top: 34px; }
.helpsheet .xclose { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; line-height: 1; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); }
.help-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.help-item .token { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--panel-2); color: var(--gold); }
.help-item b { display: block; font-size: 15px; font-weight: 800; margin-bottom: 2px; }
.help-item p { font-size: 13.5px; color: var(--muted); margin: 2px 0 0; }
