:root {
    --red: #e11d2e;
    --red-hi: #ff3b4a;
    --red-dark: #a30f1c;
    --bg: #0a0a0b;
    --card: #141416;
    --card-2: #1b1b1e;
    --line: #26262a;
    --text: #f4f4f5;
    --muted: #9a9aa3;
    --amber: #f59e0b;
    --radius: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font: 16px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh; display: flex; flex-direction: column;
    background-image: radial-gradient(900px 380px at 50% -140px, rgba(225, 29, 46, .22), transparent 70%);
    background-repeat: no-repeat;
}
a { color: inherit; }

.topbar {
    position: sticky; top: 0; z-index: 10;
    padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top, 0px));
    background: rgba(10, 10, 11, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.topbar::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: linear-gradient(90deg, var(--red), transparent 70%);
}
.brand { text-decoration: none; font-weight: 900; font-size: 18px; letter-spacing: .6px; text-transform: uppercase; }
.brand span { color: var(--red-hi); font-weight: 800; }
.wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 16px 14px 8px; flex: 1; }
.foot { text-align: center; color: #5b5b63; font-size: 12px; padding: 18px; letter-spacing: .5px; text-transform: uppercase; }

.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px; margin-bottom: 14px;
}
.card h1 { margin: 0 0 4px; font-size: 28px; line-height: 1.12; font-weight: 900; letter-spacing: -.3px; }
.card h2 {
    margin: 0 0 12px; font-size: 12px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--muted); font-weight: 800;
    display: flex; align-items: center; gap: 8px;
}
.card h2::before { content: ""; width: 4px; height: 14px; border-radius: 2px; background: var(--red); }
.center { text-align: center; }
.link { color: var(--red-hi); font-weight: 700; text-underline-offset: 3px; }
.small { font-size: 13px; font-weight: 500; margin-left: 6px; color: var(--muted); }

/* Partido */
.game { position: relative; overflow: hidden; border-color: #3a1a1e; background: linear-gradient(160deg, #1d0f12 0%, var(--card) 55%); }
.game::before {
    content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(var(--red-hi), var(--red-dark));
}
.game .kicker {
    display: inline-block; margin: 0 0 10px; padding: 4px 10px; border-radius: 999px;
    background: rgba(225, 29, 46, .16); color: var(--red-hi); font-weight: 800; font-size: 11px;
    text-transform: uppercase; letter-spacing: 1.2px;
}
.game h1 { font-size: 32px; }
.game .when { margin: 10px 0 2px; font-size: 20px; font-weight: 800; text-transform: capitalize; }
.game .where { margin: 0; }
.game .where a { color: var(--muted); text-decoration-color: #4a4a52; text-underline-offset: 3px; }
.game .notes { margin: 14px 0 0; padding: 12px 14px; background: rgba(255, 255, 255, .05); border-radius: 12px; font-size: 15px; border: 1px solid var(--line); }

.banner { background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; margin-bottom: 14px; font-weight: 700; text-align: center; }
.banner-danger { background: rgba(225, 29, 46, .15); border-color: #5a1b21; color: #ff8a93; }
.banner-warn { background: rgba(245, 158, 11, .12); border-color: #5a4310; color: #fbbf5a; }
.flash { border-radius: 14px; padding: 13px 14px; margin-bottom: 14px; font-weight: 700; text-align: center; }
.flash[hidden] { display: none; }
.flash-ok { background: rgba(34, 197, 94, .14); border: 1px solid #1d5a35; color: #6ee79a; }
.flash-warn { background: rgba(245, 158, 11, .12); border: 1px solid #5a4310; color: #fbbf5a; }

/* Selector de nombre */
.search, .comment {
    width: 100%; font: inherit; padding: 14px 16px; border: 1.5px solid var(--line);
    border-radius: 14px; background: var(--card-2); color: var(--text);
}
.search::placeholder, .comment::placeholder { color: #6b6b74; }
.search:focus, .comment:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(225, 29, 46, .22); }
.names { list-style: none; margin: 12px 0 0; padding: 0; max-height: 52vh; overflow-y: auto; display: grid; gap: 8px; overscroll-behavior: contain; }
.names li[hidden] { display: none; }
.name {
    width: 100%; min-height: 50px; text-align: left; font: inherit; font-weight: 700; padding: 10px 16px;
    background: var(--card-2); border: 1.5px solid var(--line); border-radius: 14px; color: var(--text); cursor: pointer;
}
.name:active:not(:disabled) { background: rgba(225, 29, 46, .2); border-color: var(--red); }
.name:disabled { color: #5f5f68; background: transparent; border-style: dashed; font-weight: 500; cursor: default; }

/* Respuesta */
.me-line { margin: 0; font-size: 18px; }
.me-line strong { color: #fff; }
.me-status { margin: 4px 0 14px; color: var(--muted); }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.btn {
    min-height: 56px; font: inherit; font-weight: 900; font-size: 15px; letter-spacing: .8px;
    color: var(--text); background: var(--card-2); border: 1.5px solid var(--line); border-radius: 16px; cursor: pointer;
    transition: transform .08s, background .15s, border-color .15s;
}
.btn:active { transform: scale(.98); }
.btn-going {
    grid-column: 1 / -1; min-height: 68px; font-size: 22px; border: 0; color: #fff;
    background: linear-gradient(135deg, var(--red-hi), var(--red-dark));
    box-shadow: 0 8px 24px rgba(225, 29, 46, .35);
}
.btn-no:hover, .btn-no:active { border-color: #6b6b74; }
.btn-injured { color: #fbbf5a; border-color: #4a3a12; }
.btn-maybe { grid-column: 1 / -1; color: #c9c9d1; }
.btn.on { outline: 3px solid #fff; outline-offset: 2px; }
.btn-going.on { outline-color: #fff; }

/* Listas */
.roster { margin: 0; padding-left: 0; list-style: none; counter-reset: n; }
ol.roster li { counter-increment: n; }
.roster li {
    position: relative; padding: 11px 0; border-bottom: 1px solid var(--line);
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px;
}
ol.roster li::before {
    content: counter(n); min-width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center;
    background: var(--card-2); color: var(--muted); font-size: 12px; font-weight: 800; align-self: center;
}
.roster li:last-child { border-bottom: 0; }
.pname { font-weight: 600; }
.pcomment { flex-basis: 100%; font-size: 13px; color: var(--muted); font-style: italic; padding-left: 36px; margin-top: -4px; }
ul.roster .pcomment { padding-left: 0; }
.roster li.mine { background: rgba(225, 29, 46, .13); margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 10px; border-color: transparent; }
.roster li.mine .pname { color: var(--red-hi); font-weight: 800; }
.roster li.mine::before { background: var(--red); color: #fff; }
.empty { margin: 0; color: var(--muted); }

@media (min-width: 640px) {
    .wrap { padding-top: 28px; }
    .btns { grid-template-columns: 1fr 1fr; }
}
