:root {
  --bg: #f1f5eb; --card: #ffffff; --ink: #17221c; --muted: #6b766f; --line: #e2e8dc; --chip: #f6f8f2;
  --dark: #111a16; --dark-2: #1b2721; --lime: #bcf478; --lime-ink: #2f4a12; --brand: #32bf8a; --warn: #b4532a; --danger: #c0392b;
  --radius: 18px; --shadow: 0 1px 2px rgba(17,26,22,.05), 0 10px 28px rgba(17,26,22,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 "IBM Plex Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif; min-height: 100vh; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.dot { color: var(--lime); }
.hidden { display: none !important; }

/* top bar + dark hero */
.top { background: var(--dark); color: #fff; padding: max(12px, env(safe-area-inset-top)) 0 12px; position: relative; }
.top .wrap { display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand img { width: 26px; height: 26px; border-radius: 8px; }
.brand small { color: var(--lime); font-weight: 700; letter-spacing: .14em; font-size: 11px; margin-left: 2px; }
.spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 13px; text-decoration: none; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; cursor: pointer; }
.pill svg { width: 16px; height: 16px; stroke: var(--lime); }
.pill.lime { background: var(--lime); color: var(--dark); border-color: var(--lime); }
.round { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; text-decoration: none; flex: none; }
.round svg { width: 18px; height: 18px; stroke: currentColor; }
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--dark-2); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--lime); }

.hero { background: var(--dark) radial-gradient(120% 90% at 100% 0, rgba(188,244,120,.18), transparent 55%); color: #fff; border-radius: 0 0 26px 26px; padding: 6px 0 18px; margin-bottom: 14px; }
.hero h1 { font-size: 24px; line-height: 1.15; margin: 10px 0 6px; letter-spacing: -.02em; }
.hero p { color: rgba(255,255,255,.72); margin: 0; font-size: 14px; }
.club-head { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.logo { width: 64px; height: 64px; border-radius: 18px; object-fit: cover; background: #fff; border: 3px solid var(--lime); flex: none; display: grid; place-items: center; font-size: 24px; font-weight: 800; color: var(--dark); }
.club-head h1 { margin: 0 0 5px; font-size: 21px; line-height: 1.2; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #fff; }
.tag.lime { background: rgba(188,244,120,.16); border-color: rgba(188,244,120,.5); color: var(--lime); }
.tag.light { background: var(--chip); border-color: var(--line); color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; margin-top: 12px; overflow: hidden; }
.stats div { text-align: center; padding: 8px 4px; }
.stats div + div { border-left: 1px solid rgba(255,255,255,.14); }
.stats b { display: block; font-size: 17px; line-height: 1.3; }
.stats span { font-size: 11px; color: rgba(255,255,255,.6); }
.cover { width: 100%; aspect-ratio: 16/7; object-fit: cover; border-radius: 18px; margin-top: 14px; }

/* tabs */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 6px; margin: -32px auto 12px; max-width: 640px; scrollbar-width: none; position: relative; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 7px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 13px; box-shadow: var(--shadow); }
.tabs a.on { background: var(--dark); color: #fff; border-color: var(--dark); }
.tabs a.on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.badge { background: var(--warn); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; line-height: 18px; }

/* cards, sections */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.card.dashed { border: 1.5px dashed #cfd8c8; box-shadow: none; background: rgba(255,255,255,.6); }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; margin: 18px 0 10px; }
.section-title::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: var(--lime); }
.row { display: flex; align-items: center; gap: 12px; }
.row .grow { flex: 1; min-width: 0; }
.icon-box { width: 40px; height: 40px; border-radius: 12px; background: var(--dark); display: grid; place-items: center; flex: none; }
.icon-box svg { width: 19px; height: 19px; stroke: var(--lime); }
.feature { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: #fff; border: 1px solid var(--line); margin-bottom: 10px; }
.feature b { display: block; font-size: 14px; }
.feature span { font-size: 12px; color: var(--muted); }
.empty { text-align: center; padding: 34px 12px; }
.empty .icon-box { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 12px; }
.empty .icon-box svg { width: 30px; height: 30px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 11px 16px; font-weight: 700; font-size: 14px; text-decoration: none; background: var(--dark); color: #fff; cursor: pointer; }
.btn svg { width: 17px; height: 17px; stroke: var(--lime); }
.btn.lime { background: var(--lime); color: var(--dark); }
.btn.lime svg { stroke: var(--dark); }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost svg { stroke: var(--ink); }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid #f0c8c2; }
.btn.small { padding: 7px 12px; border-radius: 11px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > * { flex: 1; white-space: nowrap; }
.btn-row > .fit { flex: none; }
.sticky-cta { position: sticky; bottom: 74px; z-index: 5; padding: 10px 0; }
.fab { position: fixed; right: max(16px, calc(50vw - 304px)); bottom: 84px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; background: var(--dark); color: #fff; border-radius: 999px; padding: 7px 16px 7px 7px; font-size: 14px; text-decoration: none; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.fab i { width: 30px; height: 30px; border-radius: 50%; background: var(--lime); display: grid; place-items: center; }
.fab svg { width: 17px; height: 17px; stroke: var(--dark); }

/* bottom nav */
.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 40; width: min(608px, calc(100% - 32px)); display: flex; justify-content: space-around; background: var(--dark); border-radius: 22px; padding: 6px; box-shadow: 0 14px 34px rgba(0,0,0,.28); }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 4px; border-radius: 16px; color: rgba(255,255,255,.62); text-decoration: none; font-size: 11px; font-weight: 600; }
.nav a svg { width: 20px; height: 20px; stroke: currentColor; }
.nav a.on { background: rgba(255,255,255,.1); color: #fff; }
.nav a.on svg { stroke: var(--lime); }
main { padding-bottom: 100px; }

/* forms */
label.field { display: block; font-weight: 700; font-size: 14px; margin: 12px 0 5px; }
.input, input[type=text], input[type=number], input[type=date], input[type=time], input[type=url], input[type=tel], select, textarea { width: 100%; border: 1px solid #dfe5d9; background: #fff; border-radius: 12px; padding: 10px 12px; font-size: 16px; }
textarea { resize: vertical; min-height: 100px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--lime); border-color: #9fd35a; }
.help { font-size: 13px; color: var(--muted); margin-top: 4px; }
.error { font-size: 13px; color: var(--danger); margin-top: 4px; font-weight: 600; }
.seg { display: flex; gap: 6px; background: var(--chip); border: 1px solid var(--line); padding: 5px; border-radius: 18px; flex-wrap: wrap; }
.seg label { flex: 1; min-width: 92px; }
.seg input, .chips input, .days input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 8px 6px; border-radius: 12px; font-weight: 700; color: var(--muted); cursor: pointer; font-size: 13px; }
.seg input:checked + span { background: var(--dark); color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.seg input:focus-visible + span, .chips input:focus-visible + span, .days input:focus-visible + span { outline: 2px solid var(--lime); }
.seg .sub { display: block; font-weight: 400; font-size: 12px; opacity: .8; margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { display: inline-block; font-size: 13px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; }
.chips input:checked + span { background: var(--dark); color: #fff; border-color: var(--dark); }
.chips input:checked + span::before { content: "● "; color: var(--lime); font-size: 11px; vertical-align: 2px; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days span { display: grid; place-items: center; width: 40px; height: 40px; font-size: 13px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; }
.days input:checked + span { background: var(--dark); color: var(--lime); border-color: var(--dark); }
.upload { display: grid; place-items: center; gap: 6px; border: 1.5px dashed #cdd6c6; border-radius: 22px; background: var(--chip); color: var(--muted); padding: 18px; cursor: pointer; text-align: center; position: relative; overflow: hidden; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload img { max-height: 160px; border-radius: 14px; object-fit: contain; }
.upload.square { width: 140px; height: 140px; margin: 0 auto; padding: 8px; }
.upload.square img { width: 100%; height: 100%; object-fit: cover; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.flash { border-radius: 14px; padding: 10px 14px; margin: 12px 0; font-weight: 600; font-size: 14px; background: #e8f8d3; color: var(--lime-ink); }
.flash.error { background: #fde8e4; color: #8f2d1f; }
/* Messages float above the page so they never overlap the hero or tabs, and fade away by themselves. */
.toasts { position: fixed; top: max(12px, env(safe-area-inset-top)); left: 0; right: 0; z-index: 60; display: grid; gap: 8px; justify-items: center; padding: 0 16px; pointer-events: none; }
.toasts .flash { margin: 0; max-width: 560px; width: 100%; box-shadow: 0 10px 30px rgba(17,26,22,.18); animation: toast 4.5s ease forwards; }
@keyframes toast { 0%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px); visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .toasts .flash { animation: none; } }
.prefix { display: flex; border: 1px solid #dfe5d9; border-radius: 14px; overflow: hidden; background: #fff; }
.prefix span { background: var(--chip); padding: 12px; color: var(--muted); border-right: 1px solid var(--line); white-space: nowrap; font-size: 15px; }
.prefix input { border: 0; border-radius: 0; }

/* share preview */
.og { background: #e9edf3; border-radius: 18px; padding: 14px; }
.og .card { margin: 6px 0 0 auto; max-width: 340px; padding: 0; overflow: hidden; }
.og img { width: 100%; aspect-ratio: 1.91/1; object-fit: cover; background: var(--dark); }
.og .og-text { padding: 10px 14px 12px; }

/* calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head a { width: 34px; height: 34px; border-radius: 50%; background: var(--chip); display: grid; place-items: center; text-decoration: none; border: 1px solid var(--line); }
.cal { width: 100%; border-collapse: collapse; text-align: center; table-layout: fixed; }
.cal th { font-size: 12px; color: var(--muted); font-weight: 500; padding: 6px 0; }
.cal td { padding: 3px 0; }
.cal a { display: grid; place-items: center; width: 36px; height: 36px; font-size: 14px; margin: 0 auto; border-radius: 50%; text-decoration: none; font-weight: 600; position: relative; }
.cal a.past { color: #b7beb9; }
.cal a.today { box-shadow: inset 0 0 0 1.5px var(--dark); }
.cal a.sel { background: var(--dark); color: #fff; }
.cal a.busy::after { content: ""; position: absolute; bottom: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.cal a.sel.busy::after { background: var(--lime); }

/* activity */
.act { display: flex; gap: 12px; text-decoration: none; align-items: center; }
.act + .act { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.thumb { width: 54px; height: 54px; border-radius: 14px; object-fit: cover; background: var(--dark); flex: none; display: grid; place-items: center; }
.thumb svg { width: 26px; height: 26px; stroke: var(--lime); }
.act strong { display: block; font-size: 15px; }
.seat { font-weight: 700; white-space: nowrap; text-align: right; font-size: 14px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.facts div { background: #fff; border-radius: 16px; border: 1px solid var(--line); padding: 10px 12px; }
.facts span { display: block; font-size: 12px; color: var(--muted); }
.facts b { font-size: 15px; }
.people { display: flex; flex-wrap: wrap; gap: 8px; }
.person { display: inline-flex; align-items: center; gap: 8px; background: var(--chip); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; font-size: 14px; font-weight: 600; }
.person img, .person .initial { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--dark); color: var(--lime); display: grid; place-items: center; font-size: 12px; }
.date-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.date-chips a { flex: none; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; text-decoration: none; }
.date-chips a.on { background: var(--dark); color: #fff; }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.rank-1 td:first-child { color: #b88a00; font-weight: 800; }
.status { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; background: var(--chip); border: 1px solid var(--line); white-space: nowrap; }
.status.due, .status.rejected { background: #fff2e8; color: var(--warn); border-color: #f5d4bd; }
.status.submitted { background: #fff8d6; color: #7a5b00; border-color: #f1e19b; }
.status.approved { background: #e8f8d3; color: var(--lime-ink); border-color: #cbeaa2; }
.qr { width: 240px; max-width: 100%; margin: 0 auto; background: #fff; border-radius: 16px; padding: 8px; }
.qr svg, .qr img { width: 100%; height: auto; }

/* match control */
.mc-top { background: var(--dark); color: #fff; padding: max(12px, env(safe-area-inset-top)) 0 14px; position: sticky; top: 0; z-index: 20; }
.mc-top .label { color: var(--lime); letter-spacing: .18em; font-weight: 700; font-size: 13px; }
.live { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: #d0342c; border-radius: 10px; padding: 4px 10px; font-weight: 800; font-size: 13px; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #e2433a; }
.courts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.court { background: var(--dark); color: #fff; border-radius: 22px; padding: 14px; }
.court.free { background: #fff; color: var(--ink); border: 1.5px dashed #c9d3c2; }
.court h3 { margin: 0 0 10px; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.court h3 span { color: var(--lime); }
.team { background: rgba(255,255,255,.07); border-radius: 14px; padding: 8px 10px; font-weight: 700; }
.court.free .team { background: var(--chip); }
.vs { text-align: center; font-size: 12px; color: rgba(255,255,255,.5); margin: 4px 0; letter-spacing: .2em; }
.score { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-top: 10px; }
.score input { text-align: center; font-size: 22px; font-weight: 800; padding: 8px; }
.queue li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.queue { list-style: none; padding: 0; margin: 0; }
.queue .n { width: 26px; height: 26px; border-radius: 50%; background: var(--dark); color: var(--lime); display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.queue .off { opacity: .45; }
.mini { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 4px 9px; font-size: 13px; font-weight: 700; cursor: pointer; }
.g-m { color: #2563eb; } .g-f { color: #db2777; }
details.card summary { cursor: pointer; font-weight: 700; list-style: none; }
details.card summary::-webkit-details-marker { display: none; }

/* TV */
body.tv { background: #0b120e; color: #fff; }
.tv-wrap { padding: 24px 32px; }
.tv-head { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.tv-head h1 { margin: 0; font-size: 34px; }
.tv .courts { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.tv .court { background: #15211b; border: 1px solid rgba(188,244,120,.2); font-size: 22px; }
.tv .court.free { background: transparent; color: rgba(255,255,255,.5); border-color: rgba(255,255,255,.2); }
.tv .court.free .team { background: rgba(255,255,255,.05); }
.tv .team { font-size: 24px; }
.tv-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-top: 24px; }
.tv-box { background: #15211b; border-radius: 22px; padding: 18px; }
.tv-box h2 { margin: 0 0 10px; font-size: 20px; color: var(--lime); }
.tv-box ol { margin: 0; padding-left: 26px; font-size: 20px; line-height: 1.7; }
@media (max-width: 760px) { .tv-cols { grid-template-columns: 1fr; } .tv-wrap { padding: 16px; } }
@media (max-width: 380px) { .facts b { font-size: 16px; } .cal a { width: 36px; height: 36px; } }

/* bottom sheet */
dialog.sheet { border: 0; padding: 0; width: 100%; max-width: 640px; margin: auto auto 0; border-radius: 28px 28px 0 0; background: #fff; color: var(--ink); max-height: 92vh; }
dialog.sheet::backdrop { background: rgba(10,16,13,.55); }
dialog.sheet .sheet-body { padding: 18px 18px max(18px, env(safe-area-inset-bottom)); }
dialog.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: #d9dfd4; margin: 0 auto 12px; }
.x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--chip); display: grid; place-items: center; cursor: pointer; font-size: 20px; }

/* quick price buttons under a number input */
.quick { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; scrollbar-width: none; }
.quick button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 700; cursor: pointer; }
.quick button.on { background: var(--dark); color: #fff; border-color: var(--dark); }
.quick button.on::before { content: "● "; color: var(--lime); font-size: 10px; vertical-align: 2px; }

/* match control */
.ic { width: 16px; height: 16px; stroke: currentColor; vertical-align: -3px; }
.mc-title { font-size: 21px; font-weight: 800; letter-spacing: .01em; }
.mc-top .small-label { font-size: 12px; letter-spacing: .14em; }
.mc-line { font-size: 14px; color: var(--muted); }
.mc-line b { color: var(--ink); }
.mc-line .ok { color: #2f8f5b; font-weight: 700; }
.mc-links { margin: 8px 0 12px; font-size: 14px; }
.mc-links a { color: var(--ink); }
.mode-row { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.mode { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 6px 12px; font-weight: 700; font-size: 13px; cursor: pointer; }
.mode.on { background: var(--dark); color: var(--lime); border-color: var(--dark); }
.btn.big { padding: 13px 16px; font-size: 15px; border-radius: 16px; margin-bottom: 12px; }
.btn.grow { flex: 1; }
.mc-court { background: #fff; border-radius: 18px; padding: 14px; margin-bottom: 12px; }
.mc-court.free { border: 1.5px dashed #cdd6c6; background: rgba(255,255,255,.65); }
.mc-court.playing { border: 2px solid var(--lime); box-shadow: var(--shadow); }
.mc-court .btn-row .btn { white-space: nowrap; }
.state-tag { border-radius: 8px; padding: 1px 8px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.state-tag.free { background: #e9f8ee; color: #2f8f5b; }
.state-tag.free.warn { background: #fff4e3; color: #b26a00; }
.state-tag.playing { background: #f1fbdf; color: var(--lime-ink); }
.timer { background: var(--dark); color: #fff; border-radius: 9px; padding: 2px 9px; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 13px; }
.timer.warn { background: #fff4e3; color: #b26a00; border: 1px solid #f2cf95; }
.timer.dark { font-size: 13px; }
.mc-team { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.mc-team .side { width: 18px; font-weight: 800; color: var(--muted); }
.mc-team [data-team] span { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; }
.score-box { width: 64px; height: 52px; text-align: center; font-size: 23px; font-weight: 800; border: 2px solid var(--line); border-radius: 14px; padding: 0; }
.mc-actions { display: flex; gap: 10px; margin-top: 14px; }
.mc-actions .btn[disabled] { background: #a9b0ab; opacity: 1; }
.pick { border: 2px solid var(--lime); }
.pick-team { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; }
.pick-team .side { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--dark); color: var(--lime); font-weight: 800; flex: none; margin-top: 8px; }
.pick-team select + select { margin-top: 6px; }
.result { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 18px; padding: 14px 18px; margin-top: 10px; color: var(--muted); }
.result .nm { display: block; font-weight: 600; }
.result b { font-size: 28px; min-width: 40px; text-align: right; }
.result .win-label { display: none; color: var(--lime); font-weight: 800; letter-spacing: .1em; font-size: 13px; }
.result.win { background: var(--dark); color: #fff; border-color: var(--dark); }
.result.win b { color: var(--lime); }
.result.win .win-label { display: inline; }
.balls { margin: 16px 0; padding-top: 14px; border-top: 1px solid var(--line); }
.step { width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-size: 22px; cursor: pointer; }
.balls [data-balls-show] { min-width: 30px; text-align: center; font-size: 20px; }
.last { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin: 10px 0; }
.last .strong { font-weight: 700; font-size: 17px; }
.last .muted { font-size: 17px; }
.last .scores { display: grid; text-align: right; font-size: 24px; line-height: 1.25; }
.icon-box.soft { background: #e9f8ee; }
.icon-box.soft svg { stroke: #2f8f5b; }
.icon-box.small-box { width: 40px; height: 40px; border-radius: 12px; }
.money-link { text-decoration: none; }
.pill-light { background: var(--chip); border-radius: 14px; padding: 8px 14px; font-weight: 700; white-space: nowrap; }
.queue2 { list-style: none; padding: 0; margin: 8px 0 0; }
.queue2 li { border-bottom: 1px solid var(--line); }
.queue2 li > button, .queue2.plain li { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; padding: 8px 0; cursor: pointer; }
.queue2 .n { width: 22px; color: var(--muted); font-size: 14px; text-align: center; flex: none; }
.queue2 .nm { font-weight: 700; font-size: 15px; }
.queue2 .meta { display: block; font-size: 12px; color: var(--muted); }
.queue2.off { opacity: .6; }
.queue2 .empty { color: var(--muted); text-align: center; padding: 16px 0; border: 0; font-size: 14px; }
.queue2 li.me { background: #f4fce8; border-radius: 12px; }
.guest { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--chip); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; vertical-align: 2px; }
.tier { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 7px; padding: 1px 8px; white-space: nowrap; }
.tier::after { content: " ●"; font-size: 8px; vertical-align: 2px; opacity: .6; }
.tier.beast { background: #f1eafe; color: #6b3fc9; }
.tier.regular { background: #e7f8ec; color: #237a4a; }
.tier.rising { background: #e8f2fd; color: #2a6db5; }
.tier.challenger { background: var(--chip); color: var(--muted); }
.fire { color: #e36b1d; font-weight: 800; font-size: 13px; }
.rest { color: var(--warn); font-size: 12px; font-weight: 700; }
.g { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.g-m { background: #e8f2fd; color: #2a6db5; } .g-f { background: #fde8f1; color: #b5326c; }
.av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #eef1eb; display: grid; place-items: center; flex: none; color: var(--muted); font-weight: 700; }
.av svg { width: 17px; height: 17px; stroke: #9aa39d; }
.av.big { width: 46px; height: 46px; }
.av.big svg { width: 22px; height: 22px; }
.tools { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-top: 14px; }
.tools input { min-width: 0; }
.rules { background: var(--chip); border-radius: 12px; padding: 10px 12px; margin-top: 12px; }
.menu { display: grid; margin-top: 6px; }
.menu button, .menu-more summary { display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 12px 2px; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; list-style: none; }
.menu-more summary::-webkit-details-marker { display: none; }
.menu button svg, .menu-more summary svg { width: 22px; height: 22px; stroke: currentColor; flex: none; }
.menu .red, .menu-more .red { color: var(--danger); }
.menu .good { color: #237a4a; }
.menu-more .purple { color: #6b3fc9; }
.pick-other { padding: 0 0 12px 36px; }

/* money sheet */
.sum-grid { display: grid; grid-template-columns: 1fr 1fr; padding: 0; overflow: hidden; }
.sum-grid > div { padding: 14px 16px; display: grid; gap: 2px; }
.sum-grid > div:nth-child(odd) { border-right: 1px solid var(--line); }
.sum-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.sum-grid b { font-size: 22px; line-height: 1.2; }
.pay-row summary { display: flex; align-items: center; gap: 12px; padding: 12px 0; list-style: none; cursor: pointer; }
.pay-row summary::-webkit-details-marker { display: none; }
.pay-row + .pay-row { border-top: 1px solid var(--line); }
.pay-row .amt { font-size: 17px; }
.pay-detail { padding: 0 0 12px 52px; }

/* live page for players */
.live-hero { background: var(--dark) radial-gradient(90% 80% at 85% 0, rgba(188,244,120,.32), transparent 60%); color: #fff; padding: max(14px, env(safe-area-inset-top)) 0 20px; }
.live-hero h1 { font-size: 25px; margin: 12px 0 6px; line-height: 1.15; }
.club-logo-sm { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #fff; }
.fmt { background: #000; color: var(--lime); font-weight: 800; letter-spacing: .08em; padding: 3px 10px; border-radius: 8px; font-size: 13px; }
.live-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.live-stats > div { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 8px 4px; text-align: center; display: grid; }
.live-stats span, .live-stats small { font-size: 11px; color: rgba(255,255,255,.6); }
.live-stats b { font-size: 20px; line-height: 1.3; }
.lime { color: var(--lime); }
.you { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 20px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); color: #fff; text-decoration: none; }
.you b { display: block; color: var(--lime); }
.you.hot { border: 2px solid var(--lime); background: rgba(188,244,120,.12); }
.you .num { text-align: center; display: grid; }
.you .num small { font-size: 12px; opacity: .6; }
.you .num b { font-size: 20px; color: #fff; }
.you .num b.lime { color: var(--lime); }
.live-tabs { position: sticky; top: 0; z-index: 15; background: #fff; display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.live-tabs a { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 11px 10px; font-size: 14px; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; white-space: nowrap; }
.live-tabs a svg { width: 16px; height: 16px; stroke: currentColor; }
.live-tabs a.on { color: var(--ink); border-bottom-color: var(--lime); }
.banner { display: flex; gap: 12px; align-items: center; background: var(--dark); color: #fff; border-radius: 18px; padding: 13px 16px; margin-bottom: 14px; }
.banner svg { width: 26px; height: 26px; stroke: var(--lime); flex: none; }
.banner.lime { background: var(--lime); color: var(--dark); }
.banner.lime svg { stroke: var(--dark); }
.court-card { background: #fff; border-radius: 18px; padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.court-card.mine { border: 2px solid var(--lime); }
.court-card .row { flex-wrap: wrap; gap: 8px; }
.yours { background: var(--lime); color: var(--dark); font-size: 12px; font-weight: 800; border-radius: 8px; padding: 2px 8px; vertical-align: 2px; }
.pitch { position: relative; display: grid; grid-template-columns: 1fr 6px 1fr; background: #0d120f; border-radius: 18px; margin-top: 12px; min-height: 170px; overflow: hidden; border: 8px solid #0d120f; outline: 1px solid #2a332d; outline-offset: -10px; }
.pitch .half { display: grid; grid-template-rows: 1fr 1fr; border: 1px solid #3a443d; }
.pitch.singles .half { grid-template-rows: 1fr; }
.pitch .net { background: var(--lime); border-radius: 3px; margin: -4px 0; }
.pitch .spot { display: grid; justify-items: center; align-content: center; gap: 6px; border-bottom: 1px solid #3a443d; padding: 10px 4px; }
.pitch .spot:last-child { border-bottom: 0; }
.pitch .spot .pn { background: rgba(0,0,0,.55); color: #fff; border-radius: 8px; padding: 2px 8px; font-weight: 700; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pitch .spot .av { background: #fff; }
.pitch.empty { background: #f4f6f2; border-color: #f4f6f2; outline-color: #e0e5dc; }
.pitch.empty .half { border-color: #dfe4db; }
.pitch.empty .net { background: #cfd5ca; }
.pitch .wait-label { position: absolute; inset: 0; display: grid; place-items: center; color: #a3aba5; font-weight: 600; }
.me-card { background: var(--dark) radial-gradient(80% 90% at 40% 0, rgba(188,244,120,.25), transparent 60%); color: #fff; border-radius: 24px; padding: 18px; }
.me-card .num { text-align: right; display: grid; }
.me-card .num small { font-size: 12px; opacity: .6; }
.big-num { font-size: 28px; line-height: 1.1; }
.big-num small { font-size: 16px; opacity: .6; }
.me-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.me-stats > div { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 10px 4px; text-align: center; display: grid; }
.me-stats span { font-size: 12px; color: rgba(255,255,255,.55); }
.me-stats b { font-size: 19px; }
.up { color: #2fb36b !important; } .down { color: #e0584c !important; }
.match { background: #fff; border-radius: 20px; overflow: hidden; margin-bottom: 12px; box-shadow: var(--shadow); }
.match.mine { border: 2px solid var(--lime); }
.match-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--chip); }
.match.live-m .match-head { background: var(--dark); color: #fff; }
.match.live-m .match-head b { color: var(--lime); }
.match-team { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: var(--muted); }
.match-team .grow { display: flex; align-items: center; gap: 0; }
.match-team .av { width: 32px; height: 32px; margin-right: -8px; border: 2px solid #fff; }
.match-team .nm { margin-left: 16px; font-weight: 600; font-size: 14px; color: var(--ink); }
.match-team.win .nm, .match-team.win b { color: var(--ink); font-weight: 800; }
.match-team b { font-size: 19px; }
.match-foot { padding: 10px 16px; border-top: 1px solid var(--line); }
.result-row { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 18px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.result-row.won { border: 2px solid var(--lime); }
.wl { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 20px; background: var(--chip); color: var(--muted); flex: none; }
.result-row.won .wl { background: var(--dark); color: var(--lime); }
.score-big { font-size: 19px; white-space: nowrap; }
.podium { background: var(--dark) radial-gradient(70% 70% at 50% 0, rgba(188,244,120,.3), transparent 65%); color: #fff; border-radius: 24px; padding: 18px 14px 0; margin-bottom: 14px; overflow: hidden; }
.pod-title { display: flex; justify-content: center; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; }
.pod-title svg { width: 24px; height: 24px; stroke: var(--lime); }
.pods { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 10px; margin-top: 14px; }
.pod { display: grid; justify-items: center; gap: 4px; text-align: center; }
.pod.p1 { order: 2; } .pod.p2 { order: 1; } .pod.p3 { order: 3; }
.pod .av.big { width: 64px; height: 64px; border: 3px solid #555; }
.pod.p1 .av.big { width: 80px; height: 80px; border-color: #f2c94c; }
.pod.p3 .av.big { border-color: #b8652d; }
.pod b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod.p1 b { color: var(--lime); }
.pod .tiny { opacity: .75; }
.pod .crown { width: 30px; height: 30px; stroke: #f2c94c; }
.pod .step { width: 100%; margin-top: 8px; background: #2c3530; border-radius: 14px 14px 0 0; display: grid; place-items: center; font-size: 24px; font-weight: 800; height: 70px; }
.pod.p1 .step { background: var(--lime); color: var(--dark); height: 110px; }
.pod.p3 .step { height: 52px; }
.board .rk { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--muted); font-size: 14px; }
.board .rk.r1 { background: #f2c94c; color: var(--dark); } .board .rk.r2 { background: #d9dcd7; color: var(--dark); } .board .rk.r3 { background: #b8652d; color: #fff; }
.board tr.me td { background: #f4fce8; }
.board .av { width: 30px; height: 30px; }
.board .av svg { width: 16px; height: 16px; }
.gold { stroke: #e0a91a; }
.player-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 8px; margin-top: 14px; }
.pl { display: grid; justify-items: center; text-align: center; gap: 2px; position: relative; }
.pl .av.big { width: 62px; height: 62px; }
.pl.me .av.big { outline: 3px solid var(--lime); outline-offset: 2px; }
.pl .badge-st { margin-top: -14px; z-index: 1; background: var(--dark); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; border: 2px solid #fff; }
.pl.in .badge-st { background: #2a6db5; } .pl.paused .badge-st, .pl.absent .badge-st, .pl.left .badge-st { background: #9aa39d; }
.pl b { font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fab { position: fixed; right: 16px; bottom: 84px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; background: var(--dark); color: var(--lime); text-decoration: none; font-weight: 800; font-size: 15px; border-radius: 999px; padding: 11px 18px; box-shadow: 0 12px 30px rgba(0,0,0,.3); }
.fab svg { width: 19px; height: 19px; stroke: var(--lime); }
.powered { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--dark); color: #fff; padding: 12px 0 max(12px, env(safe-area-inset-bottom)); }
@media (max-width: 380px) { .live-stats b { font-size: 22px; } .tools { grid-template-columns: 1fr 1fr; } .tools input { grid-column: 1 / -1; } }
input.score-box { flex: none; width: 64px; padding: 0; font-size: 23px; }
.mode-row > .tiny { white-space: nowrap; }
.mc-top .label { white-space: nowrap; letter-spacing: .12em; font-size: 12px; }
.mc-top .label.grow { overflow: hidden; text-overflow: ellipsis; }
.mc-top .small-label { flex: none; font-size: 11px; }
.btn.danger svg { stroke: var(--danger); }
.last .scores { gap: 6px; }
.grow { flex: 1; min-width: 0; }

/* ---------- profile tab ---------- */
.nav-av { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.nav a.on .nav-av { outline: 2px solid var(--lime); }
.pf-hero { background: radial-gradient(120% 90% at 100% 0, #2b3a1f 0, var(--dark) 55%); color: #fff; border-radius: 0 0 26px 26px; padding: max(14px, env(safe-area-inset-top)) 0 64px; }
.pf-hero.short { padding-bottom: 56px; }
.pf-hero h1 { font-size: 22px; margin: 0; line-height: 1.25; }
.pf-hero .brand { color: #fff; }
.pf-head { display: flex; gap: 14px; align-items: center; margin-top: 16px; }
.pf-av { position: relative; flex: none; width: 76px; height: 76px; border-radius: 50%; border: 3px solid var(--lime); background: var(--dark-2); display: grid; place-items: center; overflow: hidden; }
.pf-av img { width: 100%; height: 100%; object-fit: cover; }
.pf-av span { font-size: 28px; font-weight: 800; color: var(--lime); }
.pf-body { margin-top: -44px; position: relative; }
.pf-lift { box-shadow: 0 12px 30px rgba(17,26,22,.10); }
.lime-t { color: var(--lime); font-weight: 700; }
.wallet { display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.wallet > * { padding: 12px; display: grid; gap: 2px; text-decoration: none; color: inherit; }
.wallet > * + * { border-left: 1px solid var(--line); }
.wallet .w-h { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.wallet .w-h svg { width: 16px; height: 16px; stroke: currentColor; }
.wallet b { font-size: 20px; line-height: 1.3; }
.wallet small { font-size: 11px; color: var(--muted); }
.faint { color: #c3c9be !important; }
.lime-d { color: #4d8a12; }
.list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; color: inherit; width: 100%; background: none; border: 0; text-align: left; font: inherit; cursor: pointer; }
.list > * + *, .list > .li-form + * { border-top: 1px solid var(--line); }
.li-form { margin: 0; }
.li-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--chip); display: grid; place-items: center; object-fit: cover; }
.li-ic svg { width: 18px; height: 18px; stroke: var(--ink); }
.li-ic svg.fill, .li svg.fill { fill: currentColor; stroke: none; }
.li-ic.dark { background: var(--dark); color: var(--lime); }
.li-ic.dark svg { stroke: var(--lime); }
.li-ic.danger { background: #fde8e4; }
.li-ic.danger svg { stroke: var(--danger); }
.li b { display: block; font-size: 14px; font-weight: 700; }
.li b.red { color: var(--danger); }
.li small { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }
.li-val { font-size: 13px; color: var(--muted); max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-val.strong { color: var(--ink); font-weight: 700; }
.li .chev { flex: none; width: 16px; height: 16px; stroke: #b8beb3; }
.ok-tag { display: inline-block; font-size: 11px; background: #e3f6d2; color: #3b7a0f; border-radius: 999px; padding: 0 7px; margin-left: 4px; vertical-align: 2px; }
.lang { display: inline-flex; background: var(--chip); border-radius: 999px; padding: 3px; flex: none; }
.lang button { border: 0; background: none; border-radius: 999px; padding: 5px 13px; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.lang button.on { background: var(--dark); color: #fff; }
.pf-photo { position: relative; flex: none; margin: 0; }
.pf-photo .cam { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--dark); border: 2px solid #fff; display: grid; place-items: center; cursor: pointer; }
.pf-photo .cam svg { width: 14px; height: 14px; stroke: var(--lime); }
.pf-name { display: inline-flex; align-items: center; gap: 6px; font-size: 19px; font-weight: 800; text-decoration: none; color: inherit; }
.pf-name svg { width: 15px; height: 15px; stroke: var(--muted); }
.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0 12px; }
.bar { height: 7px; border-radius: 99px; background: var(--chip); margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--lime); border-radius: 99px; }
.add-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.add-chips a { font-size: 12px; font-weight: 600; text-decoration: none; color: var(--ink); border: 1px dashed #cdd3c8; border-radius: 999px; padding: 4px 11px; }
.sum-grid.three { grid-template-columns: repeat(3, 1fr); }
.sum-grid.three > div { border-bottom: 0 !important; border-right: 0 !important; text-align: center; }
.sum-grid.three > div + div { border-left: 1px solid var(--line); }
