/* ===========================================================================
   CJC Party — mobile-first theme
   Direction: festive "night party" — deep plum canvas, warm gold + coral accents.
   =========================================================================== */

:root {
    --bg-0: #140b26;
    --bg-1: #1f1140;
    --surface: rgba(255, 255, 255, 0.06);
    --surface-strong: rgba(255, 255, 255, 0.10);
    --border: rgba(255, 255, 255, 0.12);
    --text: #f4eefb;
    --text-dim: #b9aed0;
    --gold: #ffcb6b;
    --coral: #ff7a86;
    --accent-grad: linear-gradient(135deg, #ff9a5a 0%, #ff5f8f 55%, #b15cff 100%);
    --on: #7ee0a8;
    --late: #ffcb6b;
    --danger: #ff8b98;

    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7);
    --tap: 48px; /* min touch target */
    --maxw: 640px;
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    background-color: var(--bg-0); /* dark base so below-the-fold never falls back to white */
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
    color: var(--text);
    /* Fixed radial "glow" layer sits behind everything without the iOS background-attachment bug. */
    background:
        radial-gradient(1100px 600px at 80% -10%, rgba(177, 92, 255, 0.35), transparent 60%),
        radial-gradient(900px 500px at -10% 10%, rgba(255, 95, 143, 0.28), transparent 55%),
        linear-gradient(180deg, var(--bg-1), var(--bg-0));
    background-repeat: no-repeat;
    background-size: 100% 100%;
    line-height: 1.5;
}

.page {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: max(env(safe-area-inset-top), 16px) 16px calc(env(safe-area-inset-bottom) + 24px);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---------- top bar ---------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 4px 16px;
    flex-wrap: wrap;
}
.brand {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    color: var(--text);
    text-decoration: none;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.topnav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.topnav a {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 8px 12px;
    border-radius: 999px;
    min-height: var(--tap);
    display: inline-flex;
    align-items: center;
}
.topnav a:active { background: var(--surface); }
.topnav__quiet { color: var(--coral) !important; }

/* ---------- content ---------- */
.content { flex: 1; }

/* ---------- hero ---------- */
.hero {
    text-align: center;
    padding: 18px 8px 26px;
}
.hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: var(--gold);
    margin: 0 0 10px;
    font-weight: 700;
}
.hero__title {
    font-size: clamp(2.4rem, 12vw, 3.6rem);
    line-height: 1.02;
    margin: 0 0 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.hero__meta {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.chip {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.82rem;
    color: var(--text-dim);
    backdrop-filter: blur(6px);
}

/* ---------- cards ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 18px;
    margin: 0 0 18px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}
.card__title {
    margin: 0 0 4px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.card__sub { margin: 0 0 18px; color: var(--text-dim); }
.card__note {
    margin: 18px 0 0;
    color: var(--text-dim);
    font-size: 0.88rem;
}

/* ---------- forms ---------- */
.field { margin: 0 0 18px; border: 0; padding: 0; }
.field label,
.field legend {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin: 0 0 8px;
    color: var(--text);
}
.field input[type="text"],
.field input[type="tel"],
.field input[type="password"],
.field input:not([type]) {
    width: 100%;
    min-height: var(--tap);
    padding: 12px 14px;
    font-size: 1rem;
    color: var(--text);
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.field input::placeholder { color: rgba(185, 174, 208, 0.55); }
.field input:focus {
    border-color: var(--coral);
    box-shadow: 0 0 0 3px rgba(255, 122, 134, 0.25);
}
.radio {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--tap);
    padding: 6px 4px;
    font-weight: 500;
    cursor: pointer;
}
.radio input[type="radio"] {
    width: 22px;
    height: 22px;
    accent-color: var(--coral);
    flex: 0 0 auto;
}
.field__error, .validation-summary {
    color: var(--danger);
    font-size: 0.85rem;
}
.field__error { display: block; margin-top: 6px; }
.validation-summary {
    background: rgba(255, 139, 152, 0.12);
    border: 1px solid rgba(255, 139, 152, 0.35);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin: 0 0 16px;
}
.validation-summary ul { margin: 0; padding-left: 18px; }
.validation-summary:empty { display: none; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--tap);
    padding: 13px 22px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.08s ease, filter 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--primary {
    width: 100%;
    color: #23122a;
    background: var(--accent-grad);
    box-shadow: 0 10px 24px -10px rgba(255, 95, 143, 0.7);
}
.btn--primary:active { filter: brightness(1.05); }
.btn--ghost {
    color: var(--text);
    background: var(--surface-strong);
    border-color: var(--border);
}
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 0.9rem; }

/* ---------- welcome ---------- */
.welcome__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 6px 0 14px;
}
.welcome__actions .btn { flex: 1 1 auto; }
.link-quiet {
    color: var(--text-dim);
    font-size: 0.88rem;
    text-decoration: underline;
}
.welcome__info { display: grid; gap: 12px; margin: 4px 0 16px; }
.welcome__info dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); font-weight: 700; margin-bottom: 3px; }
.welcome__info dd { margin: 0; font-weight: 600; }
.team-pill { display: inline-flex; align-items: center; gap: 8px; }
.team-pill__dot { width: 14px; height: 14px; border-radius: 50%; background: var(--tc, #888); border: 1px solid rgba(255,255,255,0.5); }

/* ---------- info grid ---------- */
.info__desc { color: var(--text-dim); margin: 0 0 18px; }
.info__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 0;
}
.info__grid dt {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 3px;
}
.info__grid dd { margin: 0; font-weight: 600; }
.info__grid small { color: var(--text-dim); font-weight: 400; }

@media (min-width: 480px) {
    .info__grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- rules / games ---------- */
.rules { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.rules li {
    counter-increment: r;
    position: relative;
    padding: 0 0 18px 44px;
    margin: 0 0 18px;
    border-bottom: 1px solid var(--border);
}
.rules li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.rules li::before {
    content: counter(r);
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: #23122a;
    background: var(--accent-grad);
}
.rules h3, .game h3 { margin: 0 0 4px; font-size: 1.08rem; }
.rules p, .game p { margin: 0; color: var(--text-dim); }

.games { display: grid; gap: 12px; margin: 0 0 8px; }
.game {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.toast {
    background: rgba(126, 224, 168, 0.14);
    border: 1px solid rgba(126, 224, 168, 0.4);
    color: var(--on);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin: 0 0 16px;
    font-weight: 600;
}

/* ---------- admin ---------- */
.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.admin-head__logout { margin: 0; }
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 0 0 20px;
}
.stat {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 8px;
    text-align: center;
}
.stat__num { display: block; font-size: 1.7rem; font-weight: 800; }
.stat__label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
}
.rsvp-list { display: grid; gap: 10px; }
.rsvp-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}
.rsvp-row__main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.rsvp-row__name { font-weight: 700; font-size: 1.05rem; }
.rsvp-row__phone { color: var(--gold); text-decoration: none; font-variant-numeric: tabular-nums; }
.rsvp-row__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.rsvp-row__date { color: var(--text-dim); font-size: 0.82rem; }
.rsvp-row__right { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.rsvp-row__right .inline-form { margin: 0; }
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}
.tag--on { background: rgba(126, 224, 168, 0.16); color: var(--on); }
.tag--late { background: rgba(255, 203, 107, 0.16); color: var(--late); }

/* ---------- footer ---------- */
.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.82rem;
}
.footer__admin { color: var(--text-dim); text-decoration: none; }
.footer__admin:active { color: var(--text); }

/* ===========================================================================
   Game: countdown, board, pieces, feed, admin controls
   =========================================================================== */
.muted { color: var(--text-dim); font-size: 0.85rem; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto; }
.btn--danger { color: #23122a; background: var(--danger); }
.side-h { margin: 14px 0 8px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); }

.howto { background: rgba(0,0,0,0.18); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
.howto h3 { margin: 0 0 6px; }
.howto p { margin: 0; color: var(--text-dim); }

.game__when { text-align: center; font-size: 1.05rem; margin: 0 0 14px; }
.game__hint { text-align: center; color: var(--text-dim); font-size: 0.9rem; }

/* countdown */
.countdown { display: flex; justify-content: center; gap: 10px; margin: 8px 0 16px; flex-wrap: wrap; }
.cd-unit {
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px; min-width: 66px; text-align: center;
}
.cd-num { display: block; font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.cd-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); }
.cd-live { font-size: 1.4rem; font-weight: 800; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.team-badge { text-align: center; margin-top: 10px; color: var(--text-dim); font-weight: 600; }
.team-badge--set { color: var(--gold); }

/* board */
.turn-banner { text-align: center; font-weight: 800; margin: 4px 0 12px; color: var(--gold); min-height: 1.2em; }
.board { display: grid; gap: 11px; margin: 0 0 16px; }
.cell {
    position: relative;
    aspect-ratio: 1 / 1;
    background: rgba(255,255,255,0.05);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    overflow: visible;
    padding: 2px;
}
.cell-ico { display: flex; align-items: center; justify-content: center; line-height: 0; }
.cell-ico svg { width: clamp(16px, 7.5vw, 32px); height: auto; color: #fff; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.55)); }
.cell-name { max-width: 100%; font-size: clamp(0.4rem, 1.9vw, 0.66rem); font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,0.5); line-height: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-arrow { position: absolute; color: var(--gold); font-size: 0.6rem; line-height: 1; text-shadow: 0 1px 2px rgba(0,0,0,0.85); z-index: 3; pointer-events: none; }
.cell-arrow--up { top: -11px; left: 50%; transform: translateX(-50%); }
.cell-arrow--down { bottom: -11px; left: 50%; transform: translateX(-50%); }
.cell-arrow--left { left: -10px; top: 50%; transform: translateY(-50%); }
.cell-arrow--right { right: -10px; top: 50%; transform: translateY(-50%); }
.board--big .cell-ico svg { width: clamp(22px, 5vw, 42px); }
.board--big .cell-name { font-size: clamp(0.56rem, 1.3vw, 0.9rem); }
.board--big .cell-arrow { font-size: 0.9rem; }
.cell-num { position: absolute; top: 2px; left: 4px; font-size: 0.5rem; color: var(--text-dim); font-weight: 700; }
.cell-badge { position: absolute; top: 1px; right: 3px; font-size: 0.55rem; font-weight: 800; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,0.6); }
.cell-pieces { position: absolute; bottom: 2px; left: 0; right: 0; display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; }
.piece {
    width: 18px; height: 18px; border-radius: 50%;
    display: grid; place-items: center;
    font-size: 0.58rem; font-weight: 800;
    border: 1.5px solid rgba(255,255,255,0.6);
}
.piece--mine { box-shadow: 0 0 0 2px var(--gold); border-color: var(--gold); }

/* space-type colours */
.cell--start   { background: #22c55e; border-color: #15803d; }
.cell--chance  { background: #7c3aed; border-color: #5b21b6; }
.cell--versus  { background: #e5484d; border-color: #b02b30; }
.cell--advance { background: #30a46c; border-color: #1c7d50; }
.cell--goback  { background: #3b82f6; border-color: #2563c7; }
.cell--swap    { background: #f59e0b; border-color: #c2790a; }
.cell--rule    { background: #eab308; border-color: #b8880a; }
.cell--shitcup { background: #8b5e34; border-color: #664224; }
.cell--end     { background: linear-gradient(135deg,#ff5b5b,#ffcb6b,#30a46c,#3b82f6,#b15cff); border-color: #fff; }
.cell-num { color: rgba(255,255,255,0.9); text-shadow: 0 1px 1px rgba(0,0,0,0.5); }
.turn-banner--win { font-size: 1.3rem; }

/* Compact the 6-wide board on phones so all columns fit without overflow.
   At ~38px cells the text labels only truncate to noise, so drop them and let the
   filled icon + colour + number carry each space (full legend lives on the Rules page). */
@media (max-width: 560px) {
    .board { gap: 6px; }
    .cell { padding: 1px; border-radius: 8px; }
    .cell-name { display: none; }
    .cell-ico svg { width: clamp(20px, 8.5vw, 34px); }
    .cell-num { font-size: 0.5rem; top: 1px; left: 3px; }
    .cell-badge { font-size: 0.5rem; }
    .piece { width: 14px; height: 14px; font-size: 0.5rem; }
    .cell-arrow { font-size: 0.5rem; }
    .cell-arrow--up { top: -8px; }
    .cell-arrow--down { bottom: -8px; }
    .cell-arrow--left { left: -7px; }
    .cell-arrow--right { right: -7px; }
    .board--big .cell-ico svg { width: clamp(22px, 9.5vw, 38px); }
    .board--big .cell-arrow { font-size: 0.6rem; }
    .board-view__frame { padding: 8px; }
}

/* teams list + feed */
.game__side { display: grid; gap: 16px; }
@media (min-width: 560px) { .game__side { grid-template-columns: 1fr 1fr; } }
.teams { display: grid; gap: 8px; }
.team-chip { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.18); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; }
.team-chip__name { font-weight: 700; }
.team-chip__pos { margin-left: auto; color: var(--text-dim); font-size: 0.8rem; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 320px; overflow-y: auto; }
.feed-item { background: rgba(0,0,0,0.18); border: 1px solid var(--border); border-left-width: 3px; border-radius: 8px; padding: 8px 12px; font-size: 0.9rem; }
.feed--dice { border-left-color: var(--gold); }
.feed--event { border-left-color: var(--coral); }
.feed--system { border-left-color: var(--on); }
.feed--move { border-left-color: var(--text-dim); }
.feed-empty { color: var(--text-dim); font-size: 0.88rem; }

/* admin game controls */
.adm-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.adm-status__phase { font-size: 1rem; }
.adm-status__btns { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.adm-status form, .adm-team__actions form, .adm-newteam, .adm-assign, .adm-event { margin: 0; }
.adm-newteam { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.adm-newteam input[name="name"] { flex: 1 1 160px; min-height: 40px; padding: 8px 12px; background: rgba(0,0,0,0.22); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); }
.adm-newteam input[type="color"] { width: 44px; height: 40px; padding: 2px; background: none; border: 1px solid var(--border); border-radius: 10px; }
.adm-teams { display: grid; gap: 10px; }
.adm-team { background: rgba(0,0,0,0.18); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.adm-team__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.adm-team__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.adm-move { display: flex; gap: 6px; align-items: center; }
.mini-num { width: 60px; min-height: 40px; padding: 6px 8px; background: rgba(0,0,0,0.22); border: 1px solid var(--border); border-radius: 10px; color: var(--text); }
.adm-assigns { display: grid; gap: 8px; }
.adm-assign { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,0.18); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; }
.adm-assign__name { font-weight: 600; flex: 1 1 auto; }
.adm-assign select, .adm-event input {
    min-height: 40px; padding: 6px 10px; background: rgba(0,0,0,0.22);
    border: 1px solid var(--border); border-radius: 10px; color: var(--text);
}
.adm-event { display: flex; gap: 8px; }
.adm-event input { flex: 1 1 auto; }

/* release toggles + rosters + locked state */
.release-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.release-row:last-child { border-bottom: 0; }
.release-row form { margin: 0; }
.release-row p { margin: 2px 0 0; }
.roster { display: grid; gap: 8px; margin-top: 10px; }
/* Admin roster grid — two columns on wide screens so all four teams stay visible. */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.roster-row { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,0.14); border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; margin: 0; }
.roster-row__name { font-weight: 600; flex: 1 1 auto; }
.roster-row .tag { flex: 0 0 auto; }
.roster-row select { min-height: 38px; padding: 4px 8px; background: rgba(0,0,0,0.22); border: 1px solid var(--border); border-radius: 8px; color: var(--text); }
.locked { display: flex; gap: 14px; align-items: flex-start; background: rgba(0,0,0,0.18); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 14px; }
.locked__icon { font-size: 1.6rem; line-height: 1; }
.locked p { margin: 4px 0 0; color: var(--text-dim); }

/* guest-facing "who's on my team" roster card on the welcome panel */
.roster-card { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); border-left: 4px solid var(--tc, var(--gold));
    background: color-mix(in srgb, var(--tc, var(--gold)) 10%, rgba(0,0,0,0.16)); }
.roster-card__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.roster-card__head .team-pill__dot { background: var(--tc, var(--gold)); }
.roster-card__cap { color: var(--gold); font-size: 0.78rem; font-weight: 700; margin-left: auto; white-space: nowrap; }
.roster-card__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.roster-card__list li { padding: 7px 12px; background: rgba(0,0,0,0.18); border: 1px solid var(--border); border-radius: 9px; font-weight: 600; }
.roster-card__list li.me { border-color: var(--tc, var(--gold)); display: flex; align-items: center; justify-content: space-between; }
.roster-card__list .you { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--tc, var(--gold)); }

/* captains + captain roll button */
.cap { color: var(--gold); font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.inline-form { margin: 0; }
.roll-wrap { text-align: center; margin: 0 0 16px; }
.roll-wrap .btn { width: auto; min-width: 220px; }
.roll-wrap .game__hint { margin-top: 8px; }
.roll-wrap .btn:disabled { opacity: 0.5; }

/* rulebook */
.rulebook { margin: 0; padding-left: 20px; }
.rulebook li { margin: 0 0 8px; }
.legend { display: grid; gap: 10px; }
.legend__item { display: flex; align-items: flex-start; gap: 10px; background: rgba(0,0,0,0.18); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 0.92rem; }
.legend__dot { width: 16px; height: 16px; border-radius: 5px; flex: 0 0 auto; margin-top: 3px; }

/* highlighted rules callout (e.g. the losing team finishes the Shit Cup) */
.callout { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 20px; padding: 16px 18px; border-radius: 14px; }
.callout--shitcup { background: linear-gradient(180deg, rgba(139,94,52,0.28), rgba(139,94,52,0.12)); border: 1px solid #8b5e34; box-shadow: 0 0 0 1px rgba(139,94,52,0.25), 0 8px 24px -12px rgba(0,0,0,0.6); }
.callout__icon { font-size: 2rem; line-height: 1; flex: 0 0 auto; }
.callout__body { display: grid; gap: 4px; }
.callout__title { display: block; font-size: 1.15rem; font-weight: 800; color: #f0c28a; letter-spacing: 0.01em; }
.callout__body p { margin: 0; }

/* sandbox mode — loud, unmistakable so the host never confuses it with the live site */
.sandbox-banner { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; padding: 8px 16px; font-weight: 800; font-size: 0.82rem; letter-spacing: 0.02em; color: #241a45;
    background: repeating-linear-gradient(45deg, #f59e0b 0 16px, #e8920a 16px 32px); border-bottom: 2px solid #241a45; }
.sandbox-banner a { color: #241a45; text-decoration: underline; white-space: nowrap; font-weight: 800; }
.page--sandbox { box-shadow: inset 0 0 0 3px #f59e0b; }
.topnav__sandbox { color: #f59e0b !important; font-weight: 700; }
.topnav__sandbox.is-on { background: #f59e0b; color: #241a45 !important; border-radius: 999px; padding: 3px 12px; }

/* board view (big screen) */
.board-view__frame { border: 4px solid transparent; border-radius: 18px; padding: 14px; background: rgba(0,0,0,0.15); transition: border-color .3s ease, box-shadow .3s ease; }
.board-view__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.bv-turn { font-size: 1.35rem; font-weight: 800; color: var(--gold); }
.bv-timers { display: flex; gap: 10px; }
.bv-timer { text-align: center; background: rgba(0,0,0,0.25); border: 1px solid var(--border); border-radius: 12px; padding: 8px 14px; min-width: 92px; }
.bv-timer__label { display: block; font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); }
.bv-timer__val { display: block; font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.bv-timer__sub { display: block; font-size: 0.62rem; color: var(--text-dim); }
.board--big { max-width: 560px; margin: 0 auto; }
.bv-rules { margin-top: 14px; }
.bv-rules__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bv-rules__list li { background: rgba(234,179,8,0.12); border: 1px solid rgba(234,179,8,0.35); border-radius: 8px; padding: 6px 12px; font-weight: 600; }
.bv-rules__empty { background: none !important; border: none !important; color: var(--text-dim); font-weight: 400 !important; }

/* admin hourly form + inactive rule */
.adm-hourly { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.adm-hourly label { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; color: var(--text-dim); }
.adm-hourly select { min-height: 40px; padding: 6px 10px; background: rgba(0,0,0,0.22); border: 1px solid var(--border); border-radius: 10px; color: var(--text); }
.roster-row--off { opacity: 0.5; }

/* host "current turn" progress panel */
.turn-card__now { display: flex; align-items: center; gap: 10px; border: 2px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: 1.1rem; }
.turn-card__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.turn-card__actions form { margin: 0; flex: 1 1 200px; }
.turn-card__actions .btn { width: 100%; }
.btn--big { min-height: 56px; font-size: 1.1rem; }
.admin-head__links { display: flex; gap: 8px; flex-wrap: wrap; }

/* turn-order list */
.order-list { display: grid; gap: 8px; }
.order-row { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,0.18); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.order-row__num { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-strong); display: grid; place-items: center; font-weight: 800; font-size: 0.8rem; flex: 0 0 auto; }
.order-row__btns { margin-left: auto; display: flex; gap: 6px; }
.order-row__btns form { margin: 0; }

/* dice roll + piece move animations */
@keyframes dieIn { 0% { transform: rotate(-220deg) scale(.3); opacity: 0; } 55% { transform: rotate(8deg) scale(1.15); opacity: 1; } 75% { transform: rotate(-4deg) scale(.98); } 100% { transform: rotate(0) scale(1); } }
.die-overlay { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(10,6,24,.5); backdrop-filter: blur(2px); transition: opacity .4s; }
.die-overlay--out { opacity: 0; }
.die-box { width: 110px; height: 110px; border-radius: 22px; background: #fff; color: #1a1030; display: grid; place-items: center;
    border: 5px solid var(--dc, #e8b04b); box-shadow: 0 12px 30px -8px rgba(0,0,0,.6), inset 0 3px 6px rgba(255,255,255,.6); animation: dieIn .6s cubic-bezier(.2,1.2,.3,1) both; }
.die-num { font-size: 3.6rem; font-weight: 900; }
.die-cap { color: #f3eefc; font-weight: 700; font-size: 1rem; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
@keyframes pieceDrop { 0% { transform: translateY(-16px) scale(1.35); opacity: .5; } 60% { transform: translateY(2px) scale(1); } 100% { transform: none; } }
.piece--moved { animation: pieceDrop .5s ease-out; }
@media (prefers-reduced-motion: reduce) { .die-box { animation: none; } .piece--moved { animation: none; } }

/* swap wheel */
.swap { display: grid; gap: 12px; justify-items: center; }
.swap > label { justify-self: stretch; }
.wheel-stage { position: relative; width: 170px; height: 170px; }
.wheel { width: 170px; height: 170px; border-radius: 50%; border: 5px solid rgba(255,255,255,.35); background: #444;
    box-shadow: 0 8px 20px -8px rgba(0,0,0,.7), inset 0 0 0 6px rgba(0,0,0,.25); }
.wheel-ptr { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); width: 0; height: 0;
    border-left: 11px solid transparent; border-right: 11px solid transparent; border-top: 18px solid var(--gold); z-index: 2;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.wheel-result { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: 1.15rem; color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,.8); pointer-events: none; }

/* mobile-friendly host controls */
.roster-row { flex-wrap: wrap; }
@media (max-width: 540px) {
    .admin-head { flex-wrap: wrap; }
    .adm-team__actions, .adm-status__btns { width: 100%; }
    .turn-card__actions form { flex: 1 1 100%; }
    .adm-hourly label { flex: 1 1 45%; }
    .roster-row__name { flex: 1 1 100%; }
}
