/* game-v1 (27 Nov 2026): the ScoreProb Challenge card page ("today's card"). Light and dark, phone first. */
.chg {
    --g-card: #ffffff; --g-card2: #f4f7fb; --g-line: #dbe3ed; --g-ink: #0b1526; --g-soft: #5a6880;
    --g-acc: #2f67f6; --g-acc-ink: #ffffff; --g-gold: #8a5a00; --g-gold-bg: #fff3d6; --g-ok: #0f7a55; --g-ok-bg: #e3f6ee;
    --g-bad: #b42318; --g-bad-bg: #fdecea; --g-blue-bg: #eef3ff; --g-blue-line: #c9d8ff;
    padding: 24px 0 64px; color: var(--g-ink); background: #f5f7fa;
}
html[data-theme="dark"] .chg {
    --g-card: #121c2c; --g-card2: #0e1726; --g-line: #24344f; --g-ink: #e8eef8; --g-soft: #9fb0c9;
    --g-acc: #3a72ff; --g-gold: #f5c451; --g-gold-bg: #2a2412; --g-ok: #3fd29b; --g-ok-bg: #0f2e24;
    --g-bad: #ff8a80; --g-bad-bg: #351a1a; --g-blue-bg: #13213f; --g-blue-line: #2a4276;
    background: #0b1220;
}
.chg *, .chg *::before, .chg *::after { box-sizing: border-box; }
.chg .chg-wrap { display: flex; flex-direction: column; gap: 16px; max-width: 860px; margin-left: auto; margin-right: auto; }
.chg a { color: var(--g-acc); }
.chg .chg-crumb { display: flex; gap: 8px; font-size: 13px; color: var(--g-soft); }
.chg .chg-crumb a { color: var(--g-soft); text-decoration: none; }
.chg .chg-crumb a:hover { text-decoration: underline; }
.chg .chg-head { display: flex; flex-direction: column; gap: 6px; }
.chg h1 { margin: 0; font-size: clamp(30px, 5vw, 42px); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; }
.chg .chg-sub { margin: 0; font-size: 16px; color: var(--g-soft); }
.chg .chg-practice { margin: 4px 0 0; align-self: flex-start; font-size: 12.5px; font-weight: 700; color: var(--g-gold);
    background: var(--g-gold-bg); border-radius: 999px; padding: 5px 12px; }
.chg .chg-flag { margin: 0; align-self: flex-start; font-size: 12px; font-weight: 800; color: #fff; background: #b42318; border-radius: 6px; padding: 3px 8px; }
.chg .chg-prev { align-self: flex-start; font-weight: 700; font-size: 14px; text-decoration: none; background: var(--g-blue-bg);
    border: 1px solid var(--g-blue-line); border-radius: 999px; padding: 8px 14px; }
.chg .chg-empty { margin: 12px 0; font-size: 17px; color: var(--g-soft); }
.chg .chg-how { margin: 0; font-size: 13.5px; color: var(--g-soft); line-height: 1.5; }
.chg .chg-small { margin: 4px 0 0; font-size: 12.5px; color: var(--g-soft); }

/* the player's status line */
.chg .chg-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 56px;
    background: var(--g-blue-bg); border: 1px solid var(--g-blue-line); border-radius: 14px; padding: 10px 14px; font-size: 15px; }
.chg .chg-status-t b { font-weight: 800; }
.chg .chg-status-c { font-size: 13px; color: var(--g-soft); }
.chg .chg-status-a { display: flex; gap: 8px; flex-wrap: wrap; }
.chg .chg-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 16px; border-radius: 10px;
    background: var(--g-acc); color: #fff; font-weight: 800; font-size: 14px; text-decoration: none; border: 0; }
.chg .chg-btn.ghost { background: transparent; color: var(--g-acc); border: 1.5px solid var(--g-acc); }
.chg .chg-btn:hover { filter: brightness(1.06); text-decoration: none; }

/* matches */
.chg .chg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.chg .chg-m { background: var(--g-card); border: 1px solid var(--g-line); border-radius: 18px; padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 10px; }
.chg .chg-m-top { display: flex; align-items: baseline; gap: 10px; font-size: 13px; color: var(--g-soft); flex-wrap: wrap; }
.chg .chg-ko { font-weight: 800; color: var(--g-ink); font-size: 14px; }
.chg .chg-league { flex: 1 1 auto; min-width: 0; }
.chg .chg-state { font-weight: 700; color: var(--g-soft); }
.chg .chg-state b { color: var(--g-ink); font-size: 15px; }
.chg .chg-state.is-soon { color: var(--g-gold); }
.chg .chg-teams { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; }
.chg .chg-teams a { color: inherit; text-decoration: none; }
.chg .chg-teams a:hover { text-decoration: underline; }
.chg .chg-void { margin: 0; font-size: 13px; color: var(--g-soft); }
.chg .chg-row { display: flex; flex-direction: column; gap: 6px; }
.chg .chg-row-l { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--g-soft); }
.chg .chg-opts { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 8px; }
.chg .chg-o { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    min-height: 56px; padding: 8px 6px; border-radius: 12px; border: 1.5px solid var(--g-line); background: var(--g-card2); color: var(--g-ink);
    font: inherit; cursor: pointer; transition: background .12s, border-color .12s, transform .06s; -webkit-tap-highlight-color: transparent; }
.chg .chg-o:hover:not([disabled]) { border-color: var(--g-acc); }
.chg .chg-o:active:not([disabled]) { transform: scale(.98); }
.chg .chg-o:focus-visible { outline: 3px solid var(--g-blue-line); outline-offset: 2px; }
.chg .chg-o-l { font-size: 12.5px; color: var(--g-soft); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.chg .chg-o-p { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.chg .chg-o-p small { font-size: 11px; font-weight: 700; color: var(--g-soft); }
.chg .chg-sp { position: absolute; top: -7px; right: -5px; font-size: 9.5px; font-weight: 900; letter-spacing: .04em; color: #1a1405;
    background: #f5c451; border-radius: 6px; padding: 1px 5px; }
.chg .chg-o[aria-pressed="true"] { background: var(--g-acc); border-color: var(--g-acc); color: #fff; }
.chg .chg-o[aria-pressed="true"] .chg-o-l, .chg .chg-o[aria-pressed="true"] .chg-o-p small { color: rgba(255, 255, 255, .85); }
.chg .chg-o.is-busy { opacity: .6; }
.chg .chg-o[disabled] { cursor: default; }
.chg .chg-m.is-locked .chg-o:not([aria-pressed="true"]):not(.is-right) { opacity: .62; }
.chg .chg-o.is-right { border-color: var(--g-ok); border-width: 2px; }
.chg .chg-o.is-right[aria-pressed="true"] { background: var(--g-ok); border-color: var(--g-ok); }
.chg .chg-o.is-wrong[aria-pressed="true"] { background: var(--g-bad-bg); border-color: var(--g-bad); color: var(--g-bad); }
.chg .chg-o.is-wrong[aria-pressed="true"] .chg-o-l, .chg .chg-o.is-wrong[aria-pressed="true"] .chg-o-p small { color: var(--g-bad); }
.chg .chg-msg { margin: 0; font-size: 12.5px; color: var(--g-soft); }
.chg .chg-msg:empty { display: none; }
.chg .chg-msg.is-bad { color: var(--g-bad); font-weight: 700; }
.chg .chg-msg.is-ok { color: var(--g-ok); }

@media (min-width: 700px) {
    .chg .chg-m { padding: 18px 20px 12px; }
    .chg .chg-row { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 12px; }
    .chg .chg-teams { font-size: 21px; }
}

/* game-v1c (27 Nov 2026): tabs, leaderboards, profiles */
.chg .chg-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.chg .chg-tabs a { padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; text-decoration: none; color: var(--g-ink);
    background: var(--g-card); border: 1px solid var(--g-line); }
.chg .chg-tabs a[aria-current="page"] { background: var(--g-ink); color: var(--g-card); border-color: var(--g-ink); }
.chg .chg-periods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; background: var(--g-card); border: 1px solid var(--g-line);
    border-radius: 12px; padding: 4px; }
.chg .chg-periods a { text-align: center; padding: 9px 4px; border-radius: 9px; font-weight: 700; font-size: 14px; text-decoration: none; color: var(--g-soft); }
.chg .chg-periods a[aria-selected="true"] { background: var(--g-acc); color: #fff; }
.chg .chg-when { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.chg .chg-when a { text-decoration: none; font-weight: 700; }
.chg .chg-board-wrap { background: var(--g-card); border: 1px solid var(--g-line); border-radius: 16px; overflow-x: auto; }
.chg .chg-board { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.chg .chg-board th { text-align: left; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--g-soft); padding: 10px 12px; border-bottom: 1px solid var(--g-line); }
.chg .chg-board td { padding: 10px 12px; border-bottom: 1px solid var(--g-line); }
.chg .chg-board tr:last-child td { border-bottom: 0; }
.chg .chg-board .r { text-align: right; }
.chg .chg-board a { color: var(--g-ink); font-weight: 700; text-decoration: none; }
.chg .chg-board a:hover { text-decoration: underline; }
.chg .chg-board .mono, .chg .mono { font-variant-numeric: tabular-nums; }
.chg .chg-edge { font-weight: 800; }
.chg .chg-edge.up { color: var(--g-ok); }
.chg .chg-edge.down { color: var(--g-bad); }
.chg .chg-board tr.chg-line td { background: var(--g-gold-bg); color: var(--g-gold); font-size: 12.5px; font-weight: 600; text-align: center; padding: 8px 12px; }
.chg .chg-board tr.chg-line td span { font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.chg .chg-badge { color: var(--g-gold); font-size: 12px; margin-left: 4px; }
@media (max-width: 560px) { .chg .chg-board .hide-s { display: none; } }
.chg .chg-prof { display: flex; gap: 16px; align-items: center; }
.chg .chg-ava { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 26px;
    box-shadow: 0 0 0 3px #f5c451; }
.chg .chg-prof h1 { font-size: clamp(26px, 5vw, 36px); word-break: break-all; }
.chg .chg-flagc { font-size: .7em; }
.chg .chg-badges { margin: 6px 0 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chg .chg-pill { font-size: 12.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--g-blue-bg); border: 1px solid var(--g-blue-line); }
.chg .chg-pill.gold { background: var(--g-gold-bg); color: var(--g-gold); border-color: transparent; }
.chg .chg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.chg .chg-stat { background: var(--g-card); border: 1px solid var(--g-line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.chg .chg-stat-l { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--g-soft); }
.chg .chg-stat b { font-size: 28px; font-variant-numeric: tabular-nums; }
.chg .chg-stat-s { font-size: 13px; color: var(--g-soft); }
.chg .chg-h2 { margin: 8px 0 0; font-size: 20px; }
.chg .chg-recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.chg .chg-recent li { background: var(--g-card); border: 1px solid var(--g-line); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.chg .chg-recent-top { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.chg .chg-recent-top b { flex: 1 1 auto; }
.chg .chg-recent-calls { display: flex; gap: 6px; flex-wrap: wrap; }
.chg .chg-rc { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--g-card2); border: 1px solid var(--g-line); }
.chg .chg-rc.right { background: var(--g-ok-bg); border-color: var(--g-ok); color: var(--g-ok); }
.chg .chg-rc.wrong { background: var(--g-bad-bg); border-color: transparent; color: var(--g-bad); }
.chg .chg-rc.void { opacity: .6; text-decoration: line-through; }

/* game-v1d: Proven */
.chg .chg-proven { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase;
    color: #fff; background: var(--g-ok); border-radius: 6px; padding: 2px 6px; vertical-align: 2px; }
