:root {
    --ink: #101614;
    --panel: rgba(18, 32, 26, .78);
    --felt: #0e6b45;
    --felt-deep: #083526;
    --brass: #e2b65a;
    --brass-deep: #a9782d;
    --ivory: #f6f1e7;
    --muted: #c9c0b0;
    --line: rgba(226, 182, 90, .32);
    --danger: #ffb4a8;
    --ok: #b7ebc9;
    --serif: "Fraunces", "Palatino Linotype", Palatino, serif;
    --sans: "Outfit", "Segoe UI", sans-serif;
    --shadow: 0 30px 70px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ivory);
    font-family: var(--sans);
    font-weight: 380;
    background: var(--ink);
    line-height: 1.5;
}
.atmosphere {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(900px 520px at 8% -10%, rgba(226, 182, 90, .18), transparent 55%),
        radial-gradient(800px 560px at 100% 0%, rgba(14, 107, 69, .45), transparent 50%),
        linear-gradient(180deg, #14211b 0%, var(--ink) 42%, #0b100e 100%);
}
a { color: var(--brass); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img, iframe { max-width: 100%; }
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 6vw;
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(16px);
    background: rgba(16, 22, 20, .72);
    border-bottom: 1px solid rgba(246, 241, 231, .06);
}
.brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand strong { display: block; font-family: var(--serif); font-size: 1.15rem; letter-spacing: -.02em; }
.brand small { color: var(--muted); letter-spacing: .14em; text-transform: uppercase; font-size: .68rem; }
.eight {
    width: 42px; height: 42px; border-radius: 50%;
    display: grid; place-items: center;
    background: radial-gradient(circle at 35% 30%, #3a3a3a, #0a0a0a 62%);
    color: var(--ink); font-family: var(--serif);
    box-shadow: inset 0 0 0 7px #f3ecdf, 0 8px 18px rgba(0,0,0,.35);
}
.nav { display: flex; gap: 18px; align-items: center; }
.nav a { color: var(--ivory); text-decoration: none; font-weight: 520; }
.nav a[aria-current="page"] { color: var(--brass); }
.nav-enter { border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; }
.nav-toggle, .nav-btn { display: none; }
.inline { margin: 0; }
.linkish {
    background: none; border: 0; color: var(--ivory); font: inherit; font-weight: 520; cursor: pointer; padding: 0;
}
main { padding: 12px 6vw 72px; }
.site-foot {
    display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    padding: 28px 6vw 40px; border-top: 1px solid rgba(246,241,231,.08); color: var(--muted);
}
.site-foot strong { display: block; color: var(--ivory); font-weight: 520; }
.foot-links { display: flex; gap: 16px; }
.hero, .split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero { padding: 36px 0 20px; }
.eyebrow { letter-spacing: .18em; text-transform: uppercase; color: var(--brass); font-size: .75rem; margin: 0 0 10px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -.03em; margin: 0; }
.hero h1 { font-size: clamp(4rem, 8vw, 7.2rem); line-height: .88; max-width: 8ch; }
.page-title { font-size: clamp(2.6rem, 5vw, 4.6rem); line-height: .95; margin-bottom: 12px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 42rem; }
.hero-actions, .hero-facts, .card-meta, .player-tools, .admin-links { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-actions { margin: 26px 0; }
.hero-facts { list-style: none; padding: 0; margin: 28px 0 0; }
.hero-facts li { min-width: 140px; }
.hero-facts strong, .card-meta strong { display: block; color: var(--ivory); }
.hero-facts span, .card-meta span { color: var(--muted); font-size: .92rem; }
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px; padding: 12px 18px; border: 1px solid transparent;
    font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
}
.btn.brass { background: linear-gradient(180deg, #f0d48a, var(--brass) 45%, #c6923d); color: #24180a; }
.btn.ghost { background: transparent; color: var(--ivory); border-color: var(--line); }
.table-scene { perspective: 900px; }
.rail {
    position: relative;
    padding: 22px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,.18), transparent 18%),
        linear-gradient(145deg, #6a4324, #2a170d 55%, #4a2c16);
    box-shadow: var(--shadow), inset 0 0 0 2px rgba(226,182,90,.35);
    transform: rotateX(8deg) rotateZ(-2deg);
}
.diamond { position: absolute; width: 10px; height: 10px; background: var(--brass); transform: rotate(45deg); top: 10px; }
.d1 { left: 18%; } .d2 { left: 48%; } .d3 { left: 78%; }
.felt {
    position: relative; height: 380px; border-radius: 18px; overflow: hidden;
    background:
        radial-gradient(420px 180px at 50% 40%, rgba(255,255,255,.08), transparent 60%),
        linear-gradient(180deg, #14915c, var(--felt) 40%, var(--felt-deep));
    box-shadow: inset 0 0 0 10px rgba(0,0,0,.18);
}
.pocket { position: absolute; width: 34px; height: 34px; border-radius: 50%; background: #070807; box-shadow: inset 0 0 0 4px #1b1b1b; }
.tl { top: 8px; left: 8px; } .tr { top: 8px; right: 8px; }
.ml { top: 46%; left: -6px; } .mr { top: 46%; right: -6px; }
.bl { bottom: 8px; left: 8px; } .br { bottom: 8px; right: 8px; }
.line { position: absolute; left: 27%; top: 0; bottom: 0; width: 2px; background: rgba(246,241,231,.55); }
.ball, .cueball {
    position: absolute; width: 42px; height: 42px; border-radius: 50%;
    box-shadow: inset -8px -8px 12px rgba(0,0,0,.25), 4px 8px 10px rgba(0,0,0,.25);
}
.ball-eight { left: 58%; top: 28%; background: #111; display: grid; place-items: center; }
.ball-eight b {
    width: 18px; height: 18px; border-radius: 50%; background: #f6f1e7; color: #111;
    display: grid; place-items: center; font-size: 11px; font-family: var(--serif); font-weight: 620;
}
.solid.a { background: #d24b3a; left: 46%; top: 46%; }
.solid.b { background: #e0b03a; left: 38%; top: 62%; }
.stripe.a, .stripe.b { background: repeating-linear-gradient(180deg, #f6f1e7 0 8px, #1d4e89 8px 16px); }
.stripe.a { left: 68%; top: 52%; }
.stripe.b { left: 74%; top: 34%; }
.cueball { background: radial-gradient(circle at 35% 30%, #fff, #d9d3c7); left: 22%; top: 58%; width: 40px; height: 40px; }
.cue {
    position: absolute; width: 210px; height: 8px; border-radius: 99px; left: -20px; bottom: 48px;
    background: linear-gradient(90deg, #f3e2b0, #8a5a32 18%, #c98443 70%, #efe2cf);
    transform: rotate(-18deg);
}
.band, .cards, .stats { display: grid; gap: 16px; }
.band { grid-template-columns: repeat(3, 1fr); margin: 28px 0 10px; }
.band article, .event-card, .panel, .dossier, .stats article {
    background: var(--panel);
    border: 1px solid rgba(246,241,231,.08);
    border-radius: 22px;
    box-shadow: var(--shadow);
}
.band article { padding: 22px; }
.band span { color: var(--brass); font-family: var(--serif); font-size: 1.4rem; }
.band p, .event-card p, .note { color: var(--muted); }
.section { padding: 28px 0; }
.narrow-top { padding-top: 18px; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 18px; }
.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.event-card { display: block; padding: 22px; color: inherit; text-decoration: none; }
.event-card h3 { font-size: 2rem; margin: 6px 0 10px; }
.city { margin: 0; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); font-size: .75rem; }
.card-state { margin: 8px 0 0; font-size: .82rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.card-state.open { color: var(--ok); }
.card-state.full { color: var(--brass); }
.card-facts { display: grid; gap: 8px; margin: 14px 0 0; }
.card-facts div { display: grid; gap: 2px; padding-top: 8px; border-top: 1px solid rgba(246,241,231,.1); }
.card-facts dt { margin: 0; color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.card-facts dd { margin: 0; color: var(--ivory); font-weight: 650; }
.card-live { margin: 12px 0 0; color: var(--brass); font-weight: 650; }
.rule-strip {
    margin-top: 28px; padding: 36px; border-radius: 28px;
    background: linear-gradient(120deg, rgba(14,107,69,.9), rgba(8,30,22,.92));
    border: 1px solid var(--line);
}
.rule-strip h2 { font-size: clamp(2.4rem, 4vw, 4rem); max-width: 10ch; }
.rules { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.rules li, .dossier { display: grid; gap: 16px; }
.rules li { grid-template-columns: auto 1fr; padding: 18px 0; border-top: 1px solid rgba(246,241,231,.1); }
.rules span { font-family: var(--serif); color: var(--brass); font-size: 1.4rem; }
.panel { padding: 22px; }
.panel.quiet { align-self: start; }
.panel.inset { margin-top: 18px; }
.stack, .stack-lg { display: grid; gap: 14px; }
.stack-lg { gap: 22px; }
label { display: grid; gap: 6px; font-size: .92rem; color: var(--muted); }
input, select, textarea {
    width: 100%; border-radius: 14px; border: 1px solid rgba(246,241,231,.16);
    background: rgba(0,0,0,.25); color: var(--ivory); font: inherit; padding: 12px 14px;
}
.choice { grid-template-columns: auto 1fr; align-items: center; color: var(--ivory); }
.choice input { width: auto; }
.facts { display: grid; gap: 12px; margin: 22px 0; }
.facts div { display: grid; grid-template-columns: 120px 1fr; gap: 10px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.facts.compact { grid-template-columns: repeat(5, minmax(0,1fr)); }
.facts.compact div { grid-template-columns: 1fr; }
.flash { margin: 12px 6vw 0; padding: 12px 16px; border-radius: 14px; }
.flash.ok { background: rgba(125, 206, 160, .15); color: var(--ok); }
.flash.err { background: rgba(225, 91, 76, .16); color: var(--danger); }
.auth { max-width: 520px; }
.stats { grid-template-columns: repeat(4, 1fr); margin: 8px 0 22px; }
.stats article { padding: 16px 18px; }
.stats span { color: var(--muted); display: block; }
.stats strong { font-family: var(--serif); font-size: 1.8rem; }
.table-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid rgba(246,241,231,.08); }
table { width: 100%; border-collapse: collapse; background: rgba(12, 20, 16, .65); }
th, td { text-align: left; padding: 12px 14px; vertical-align: top; border-bottom: 1px solid rgba(246,241,231,.08); }
th { color: var(--muted); font-weight: 520; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; }
td small, .log span { display: block; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; min-width: 180px; }
.actions form { margin: 0; }
.actions button, .actions a {
    background: transparent; color: var(--ivory); border: 1px solid var(--line);
    border-radius: 999px; padding: 6px 10px; font: inherit; cursor: pointer; text-decoration: none;
}
.actions button.danger { color: var(--danger); border-color: rgba(225, 91, 76, .45); }
.actions .copy-btn { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.actions .copy-btn svg { width: 16px; height: 16px; }
.actions .copy-btn.is-copied { color: var(--ok); border-color: var(--ok); }
.rule-edit { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 16px; display: grid; gap: 10px; }
.rule-edit legend { padding: 0 6px; color: var(--brass); }
.rule-edit .check { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.champ-danger { margin-top: 16px; align-items: center; }
.pill { display: inline-flex; border-radius: 999px; padding: 4px 10px; border: 1px solid var(--line); color: var(--brass); font-size: .82rem; }
.pill.paid, .pill.open { color: var(--ok); }
.pill.disqualified, .pill.closed, .pill.inactive { color: var(--danger); }
.dossier { padding: 22px; }
.dossier header { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.place { display: grid; grid-template-columns: .8fr 1.2fr; gap: 16px; align-items: stretch; }
.place iframe { min-height: 220px; border: 0; border-radius: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.span-2 { grid-column: span 2; }
.log { list-style: none; padding: 0; display: grid; gap: 12px; }
.log li { padding-bottom: 12px; border-bottom: 1px solid rgba(246,241,231,.08); }
.plain { margin: 0; padding-left: 18px; color: var(--muted); }
.empty { color: var(--muted); }
.topbar { position: sticky; }
input, select, textarea { font-size: 16px; }
body { overflow-x: hidden; }
@media (max-width: 980px) {
    .hero, .split, .band, .cards, .stats, .place, .form-grid, .facts.compact { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .hero h1 { max-width: none; font-size: clamp(2.7rem, 14vw, 4.4rem); }
    .page-title { font-size: clamp(2rem, 9vw, 3rem); }
    .topbar { position: sticky; padding: 14px 16px; gap: 12px; }
    main { padding: 8px 16px 56px; }
    .flash { margin: 12px 16px 0; }
    .site-foot { padding: 24px 16px 36px; }
    .nav-btn {
        display: inline-flex; align-items: center; justify-content: center;
        min-height: 44px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
    }
    .nav-toggle:checked ~ .nav { display: flex; }
    .nav {
        display: none; position: absolute; top: 72px; right: 16px; left: 16px;
        flex-direction: column; align-items: stretch; padding: 8px 16px 14px;
        background: #17211c; border-radius: 16px; border: 1px solid var(--line);
        box-shadow: var(--shadow);
    }
    .nav a, .nav .linkish { min-height: 44px; display: flex; align-items: center; }
    .btn { min-height: 46px; width: auto; }
    .hero-actions .btn, .stack .btn, .player-tools .btn, .player-tools .note { width: 100%; }
    .player-tools { display: grid; }
    .facts div { grid-template-columns: 1fr; gap: 2px; }
    .section-head, .dossier header { flex-direction: column; align-items: stretch; }
    .table-wrap { -webkit-overflow-scrolling: touch; }
    th, td { padding: 10px 8px; }
    .rail { transform: none; }
    .felt { height: 220px; }
    .rules li { grid-template-columns: auto 1fr; }
    .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .band { grid-template-columns: 1fr; }
    .foot-links { flex-direction: column; gap: 10px; }
    .hero { padding-top: 12px; }
    .board-grid { grid-auto-flow: row; }
}
body.page-ecra { height: 100vh; overflow: hidden; }
body.page-ecra main {
    height: 100vh; box-sizing: border-box; overflow: hidden;
    display: flex; flex-direction: column; padding: 10px 14px 8px;
}
body.page-ecra .ecra-bar { flex: none; margin-bottom: 8px; }
body.page-ecra #board { flex: 1; min-height: 0; display: flex; flex-direction: column; }
body.page-ecra #board > .board,
body.page-ecra #board > .draw-show { flex: 1; min-height: 0; }
body.page-ecra #board > .board { display: flex; flex-direction: column; overflow: hidden; }
body.page-ecra .board-top { flex: none; margin-bottom: 6px; }
body.page-ecra .board-top h1 { font-size: clamp(1.35rem, 2.2vw, 2.1rem); }
body.page-ecra .legend { font-size: .85rem; }
.board-spread { flex: 1; min-height: 0; display: grid; gap: 10px; align-items: stretch; }
.board-spread.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.board-spread.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.board-spread.cols-2 { grid-template-columns: 1fr 1fr; }
.board-spread.bracket-path { grid-template-columns: 1.15fr .92fr .78fr 1.08fr .78fr .92fr 1.15fr; }
body.page-ecra .bracket-path .final-col .ticket {
    border-width: 5px; padding: 11px 12px;
    background: rgba(16, 28, 22, .96);
    box-shadow: 0 0 0 1px rgba(226, 182, 90, .55), 0 0 26px rgba(226, 182, 90, .32);
}
body.page-ecra .bracket-path .final-col .ticket p {
    font-size: clamp(.95rem, 1.25vw, 1.2rem);
}
body.page-ecra .bracket-path .final-col .ticket .ticket-no { font-size: .9rem; color: var(--brass); }
body.page-ecra .board-spread .board-col { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 4px; }
body.page-ecra .board-spread .board-col h2 { flex: none; margin: 0; text-align: center; font-size: .95rem; }
body.page-ecra .bracket-path .final-col h2 {
    color: var(--brass); font-size: 1.25rem; letter-spacing: .06em;
}
.col-stack.rows-4, .col-stack.rows-3 { flex: 1; min-height: 0; display: grid; align-items: stretch; }
.col-stack.rows-4 { grid-template-rows: repeat(4, minmax(0, 1fr)); }
.col-stack.rows-3 { grid-template-rows: repeat(3, minmax(0, 1fr)); }
.col-stack .slot { min-height: 0; display: flex; align-items: center; }
.col-stack .slot.span-2 { grid-row: span 2; }
.col-stack .slot.span-4 { grid-row: span 4; }
body.page-ecra .board-spread .ticket { width: 100%; padding: 6px 8px; }
body.page-ecra .board-spread .ticket p {
    margin: 2px 0; font-size: clamp(.78rem, 1.05vw, 1rem); line-height: 1.25;
}
body.page-ecra .board-spread .board-col > .rank-box { flex: 1; overflow: auto; min-height: 0; font-size: .92rem; }
@media (max-width: 1100px) {
    body.page-ecra { height: auto; overflow: auto; }
    body.page-ecra main, body.page-ecra #board, body.page-ecra #board > .board { height: auto; overflow: visible; }
    .board-spread.cols-2, .board-spread.cols-3, .board-spread.cols-4, .board-spread.bracket-path { grid-template-columns: 1fr; }
}
.phase-title { margin: 28px 0 12px; font-size: 1.8rem; }
.match-admin { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.match-forms, .winner-form { display: grid; gap: 8px; }
.match-forms button, .admin-links button {
    font: inherit; cursor: pointer; border-radius: 999px; border: 1px solid var(--line);
    background: transparent; color: var(--ivory); padding: 8px 12px;
}
.board-top { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 18px; }
.board-top h1 { font-size: clamp(2rem, 4vw, 3.4rem); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; color: var(--muted); }
.legend li { display: flex; gap: 8px; align-items: center; }
.swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.board-grid { display: flex; gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 12px; }
.board-col { min-width: 210px; display: grid; gap: 10px; }
.board-col h2, .rank-box h3 { font-size: 1.15rem; color: var(--brass); }
.ticket { border: 3px solid #9aa39e; border-radius: 16px; padding: 10px 12px; background: rgba(12,20,16,.72); }
.ticket p { margin: 4px 0; }
.ticket .won { color: var(--ok); font-weight: 650; }
.ticket .named { color: var(--ivory); }
.ticket-no, .ticket small { color: var(--muted); font-size: .78rem; }
.ticket.ready { border-color: #7eb6ff; box-shadow: 0 0 0 1px #7eb6ff; }
.ticket.live { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass), 0 0 22px rgba(226,182,90,.45); }
.ticket.done { border-color: #3dce7a; box-shadow: 0 0 0 1px #3dce7a; }
.ticket.waiting { border-color: #9aa39e; box-shadow: 0 0 0 1px #9aa39e; }
body.page-ecra .ticket.live {
    position: relative; z-index: 2; border-width: 6px;
    animation: live-border .85s ease-in-out infinite;
}
body.page-ecra .board-spread .ticket.live p { font-size: clamp(1.05rem, 1.45vw, 1.35rem); }
body.page-ecra .board-spread .ticket.live .ticket-no,
body.page-ecra .board-spread .ticket.live small { font-size: .95rem; }
@keyframes live-border {
    0%, 100% { border-color: #b8893a; box-shadow: inset 0 0 0 0 transparent; }
    50% { border-color: #ffe7ad; box-shadow: inset 0 0 0 4px rgba(255, 231, 173, .9); }
}
body.page-ecra .board[data-deal-from] [data-deal-slot] { visibility: hidden; }
.ticket-flyer {
    position: fixed; margin: 0; z-index: 60; pointer-events: none; visibility: visible;
    background: #0f6a42; box-shadow: 0 28px 60px rgba(0, 0, 0, .55);
}
.ticket.qual-win { border-color: #3dce7a; box-shadow: 0 0 0 1px #3dce7a; }
.ticket.qual-wait { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass); }
.ticket.qual-direct { border-color: #d7c7a2; box-shadow: 0 0 0 1px #d7c7a2; }
.corte-side { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 4px; }
.corte-side h2 { margin: 0; text-align: center; color: #3dce7a; font-size: .95rem; }
.corte-side h2.rep-wait { color: var(--brass); }
.corte-grid {
    flex: 1; min-height: 0; display: grid; gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
}
.corte-grid .slot { min-height: 0; display: flex; align-items: center; }
.present-board .ticket { opacity: 0; transform: translateY(16px) scale(.9); }
.present-board.present-on .ticket {
    opacity: 1; transform: none;
    transition: opacity .45s ease, transform .5s ease;
    transition-delay: calc(var(--n, 0) * 50ms);
}
.cut-admin { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 12px; }
.ticket.qual-rep { border-color: #ff7ab6; box-shadow: 0 0 0 1px #ff7ab6; background: rgba(90, 24, 52, .55); }
body.page-ecra .board-col h2.rep-title { color: #ff7ab6; }
.admin-links > .note { flex: 1 0 100%; }
.swatch.m-direct { background: #d7c7a2; }
.swatch.m-rep { background: #ff7ab6; }
.swatch.m-ready { background: #7eb6ff; }
.swatch.m-live { background: var(--brass); }
.swatch.m-done { background: #3dce7a; }
.swatch.m-waiting { background: #9aa39e; }
.rank-box, .rank-list { color: var(--ivory); }
.rank-box ol { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.rank-box li { display: flex; gap: 8px; align-items: center; }
.rank-box li.in { color: var(--ok); }
.rank-box li.shoot { color: var(--brass); }
.rank-box li.out { opacity: 0.55; }
.rank-box li em { font-style: normal; font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; }
.rank-box strong { margin-left: auto; }
.champion-note { font-size: 1.3rem; color: var(--brass); }
.celebration {
    position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; align-content: center;
    text-align: center; padding: 24px;
    background: radial-gradient(circle at 50% 40%, rgba(226,182,90,.28), rgba(8,20,14,.94) 55%);
}
.celebration p { letter-spacing: .2em; text-transform: uppercase; color: var(--brass); margin: 0; }
.celebration > p, .celebration h2 { position: relative; z-index: 2; text-shadow: 0 2px 18px rgba(0, 0, 0, .55); }
.celebration h2 { font-size: clamp(2.8rem, 6vw, 5.4rem); margin: 10px 0 0; }
.celebration .prize-hero {
    font-family: var(--serif); font-weight: 620; text-transform: none; letter-spacing: -.03em;
    font-size: clamp(4.2rem, 12vw, 9.5rem); line-height: .92; max-width: 94vw;
    margin: 12px 0 8px; color: var(--brass);
}
.celebration .celebration-sub { margin-top: 8px; font-size: .95rem; }
.runner-up {
    position: absolute; right: 22px; bottom: 16px; z-index: 2; text-align: right;
    color: var(--muted); font-size: .72rem; line-height: 1.3; letter-spacing: .02em;
}
.runner-up span { display: block; text-transform: uppercase; letter-spacing: .14em; font-size: .62rem; }
.runner-up strong { display: block; font-weight: 520; color: var(--ivory); font-size: .78rem; }
.runner-up em { display: block; font-style: normal; color: var(--brass); font-size: .72rem; }
.celebration canvas.fireworks {
    position: absolute; inset: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 0;
}

.ecra-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; position: relative; z-index: 40; }
.ecra-bar select {
    font: inherit; color: var(--ivory); background: rgba(12, 20, 16, .72);
    border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; margin-left: 8px;
}
.board-empty { font-size: 1.4rem; color: var(--muted); }
.draw-show {
    min-height: calc(100vh - 90px); display: grid; place-items: center; align-content: center;
    text-align: center; gap: 8px;
}
.draw-show h2 { font-family: var(--serif); font-size: clamp(2rem, 5vw, 4rem); margin: 0; }
.wheel {
    width: 180px; height: 180px; border-radius: 50%; position: relative; margin: 8px 0;
    border: 8px solid var(--brass); animation: spin 1.1s linear infinite;
    background: conic-gradient(var(--brass), #1c2a24, #7eb6ff, #0e6b45, var(--brass));
}
.wheel i { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--ivory); }
.wheel i:nth-child(1) { top: 8px; left: 50%; }
.wheel i:nth-child(2) { bottom: 8px; left: 50%; }
.wheel i:nth-child(3) { left: 8px; top: 50%; }
.wheel i:nth-child(4) { right: 8px; top: 50%; }
.wheel i:nth-child(5) { top: 28px; right: 28px; }
.wheel i:nth-child(6) { bottom: 28px; left: 28px; }
.reel { font-size: clamp(1.4rem, 3vw, 2.2rem); min-height: 1.4em; margin: 0; }
.count { font-family: var(--serif); font-size: clamp(4rem, 12vw, 8rem); line-height: .9; margin: 0; color: var(--brass); }
.draw-note { margin: 0; color: var(--muted); }
.lobby-mark {
    font-family: var(--serif); font-size: clamp(3rem, 8vw, 6rem);
    line-height: .9; margin: 8px 0; color: var(--brass);
    transition: font-size .6s ease, margin .6s ease;
}
.lobby h2, .lobby .draw-note { transition: font-size .6s ease, opacity .6s ease; }
.lobby.roster-on h2 { font-size: clamp(1.15rem, 2vw, 1.7rem); }
.lobby.roster-on .lobby-mark { font-size: clamp(1.45rem, 2.8vw, 2.15rem); margin: 2px 0; }
.lobby.roster-on .draw-note { font-size: .82rem; }
.roster-actions { display: flex; flex-wrap: wrap; gap: 16px 22px; align-items: center; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--ivory); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i {
    width: 48px; height: 28px; border-radius: 999px; border: 1px solid var(--line);
    background: #1b2420; position: relative; display: inline-block; flex: none;
}
.switch i::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--muted); transition: transform .2s ease, background .2s ease;
}
.switch input:checked + i { background: #245c40; border-color: var(--brass); }
.switch input:checked + i::after { transform: translateX(20px); background: var(--brass); }
.switch input:focus-visible + i { outline: 2px solid var(--brass); outline-offset: 2px; }
.roster-wrap, .roster-board { width: min(1280px, 100%); margin: 0 auto; }
.roster-label {
    margin: 0; color: var(--brass); letter-spacing: .14em; text-transform: uppercase; font-size: .78rem;
    max-height: 0; opacity: 0; overflow: hidden;
    transition: max-height .5s ease, opacity .4s ease, margin .5s ease;
}
.roster-on .roster-label { max-height: 2rem; opacity: 1; margin-bottom: 8px; }
.roster-names {
    list-style: none; padding: 0; margin: 0;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px;
    max-height: 0; opacity: 0; overflow: hidden; transform: translateY(10px);
    transition: max-height .7s ease, opacity .45s ease, transform .7s ease;
}
.roster-on .roster-names { max-height: 72vh; opacity: 1; transform: none; }
.roster-names li, .roster-empty {
    opacity: 0; transform: translateY(8px);
    transition: opacity .35s ease, transform .35s ease;
    transition-delay: calc((var(--last, 0) - var(--n, 0)) * 28ms);
}
.roster-on .roster-names li, .roster-on .roster-empty {
    opacity: 1; transform: none;
    transition-delay: calc(var(--n, 0) * 28ms);
}
.roster-names li {
    border: 1px solid rgba(246,241,231,.16); border-radius: 12px; padding: 7px 10px;
    background: rgba(12,20,16,.62); color: var(--ivory); text-align: left;
}
body.page-ecra .lobby.roster-on {
    align-content: center; justify-items: center; gap: 4px; padding: 0 8px;
}
@media (max-width: 800px) {
    .roster-names { grid-template-columns: 1fr 1fr; }
}
@keyframes spin { to { transform: rotate(1turn); } }
.phase-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.phase-nav a { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; text-decoration: none; color: var(--ivory); }
.phase-nav a.on { background: var(--brass); color: #1b1408; }

