/* ============================================================
   Assoziationen — gemeinsames Stylesheet
   Farb- und Typo-Token, dann Abschnitte: Grossbildschirm (bs-),
   Host (h-), Spieler (p-).
   ============================================================ */

:root {
    --bg:           #17151b;
    --panel:        #201c26;
    --panel-2:      #1c1922;
    --field:        #241f2b;
    --line:         #302c38;
    --line-soft:    #241f2b;
    --row-line:     #221e29;
    --ink:          #F2EFF5;
    --ink-2:        #C9C3D2;
    --ink-3:        #9C96A6;
    --ink-4:        #6F6879;
    --ink-disabled: #5C5665;
    --yellow:       #E9E85C;
    --pink:         #FF8FB1;
    --peach:        #FBD9A8;
    --gradient:     linear-gradient(90deg, #E9E85C, #FBD9A8, #FF8FB1);
    --bar-fill:     linear-gradient(90deg, #FF8FB1, #FBD9A8);
    --font-ui:      'Archivo', system-ui, sans-serif;
    --font-mono:    'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-ui);
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.mono { font-family: var(--font-mono); }

@keyframes pulseDot { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes riseIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .live-dot, .p-wait-dot { animation: none !important; opacity: 1 !important; }
    .rise { animation: none !important; }
}

/* Gemeinsame Bausteine */
.grad-edge { height: 10px; background: var(--gradient); flex: none; }

.live-dot {
    border-radius: 50%;
    background: var(--pink);
    animation: pulseDot 1.4s ease-in-out infinite;
}

.bar-track { background: var(--field); border-radius: 999px; overflow: hidden; }
.bar-track > .fill {
    height: 100%;
    background: var(--bar-fill);
    transition: width 300ms ease-out;
}

.pill {
    display: inline-flex; align-items: center; gap: 8px;
    border-radius: 999px;
    font-family: var(--font-mono);
    text-transform: uppercase;
}
.pill.is-live { background: rgba(255, 143, 177, .14); color: var(--pink); }
.pill.is-quiet { background: var(--field); color: var(--ink-3); }

/* ============================================================
   Grossbildschirm (leaderboard.html) — 1920×1080-Bühne, per JS skaliert
   ============================================================ */

.bs-body { overflow: hidden; height: 100vh; }

.bs-stage {
    position: absolute;
    width: 1920px; height: 1080px;
    top: 0; left: 0;
    transform-origin: top left;
    background: var(--bg);
    display: flex; flex-direction: column;
    overflow: hidden;
}

.bs-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.bs-conn {
    position: absolute; top: 26px; left: 80px;
    font-family: var(--font-mono); font-size: 32px; color: var(--pink);
    letter-spacing: .1em; z-index: 40;
}

/* --- Beitritt (Lobby) --- */
.bs-lobby { flex: 1; display: grid; grid-template-columns: 1fr 640px; gap: 72px; padding: 64px 80px 72px; }
.bs-lobby-left { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.bs-lobby-top { display: flex; flex-direction: column; gap: 32px; }
.bs-eyebrow-lg {
    font-family: var(--font-mono); font-size: 40px;
    letter-spacing: .2em; text-transform: uppercase; color: var(--pink);
}
.bs-join-url {
    font-size: 120px; font-weight: 700; line-height: 1.02;
    letter-spacing: -.02em; color: var(--yellow);
    white-space: nowrap; /* nie umbrechen — JS verkleinert stattdessen */
}
.bs-lobby-sub { font-size: 52px; color: var(--ink-2); max-width: 900px; }
.bs-lobby-count { display: flex; align-items: flex-end; gap: 32px; }
.bs-lobby-count .num { font-family: var(--font-mono); font-size: 170px; font-weight: 700; line-height: .9; letter-spacing: -.02em; }
.bs-lobby-count .lbl { font-size: 56px; color: var(--ink-3); padding-bottom: 22px; }

.bs-lobby-right { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px; }
.bs-qr-card-lg {
    padding: 30px; background: #fff; border-radius: 22px;
    box-shadow: 0 0 140px rgba(255, 143, 177, .28);
    cursor: pointer; border: none;
}
.bs-qr-card-lg img { width: 470px; height: 470px; display: block; background: #fff; }
.bs-lobby-hint1 { font-size: 40px; color: var(--ink-3); text-align: center; max-width: 470px; }
.bs-lobby-hint2 { font-size: 28px; color: var(--ink-4); }

/* --- Aktive Runde --- */
.bs-round { flex: 1; display: flex; flex-direction: column; padding: 48px 80px 44px; min-height: 0; }
.bs-round-head { display: flex; justify-content: space-between; align-items: flex-start; }
.bs-round-live { display: flex; align-items: center; gap: 28px; }
.bs-round-live .live-dot { width: 26px; height: 26px; }

.bs-corner-qr {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 14px 16px 12px;
    border: 2px solid var(--line); border-radius: 16px;
    background: none; color: inherit; font-family: inherit;
    cursor: pointer;
}
.bs-corner-qr:hover, .bs-corner-qr:focus-visible { border-color: var(--yellow); outline: none; }
.bs-corner-qr .qr-white { padding: 12px; background: #fff; border-radius: 10px; }
.bs-corner-qr .qr-white img { width: 216px; height: 216px; display: block; background: #fff; }
.bs-corner-qr .url { font-size: 30px; font-weight: 600; color: var(--yellow); }
.bs-corner-qr .hint { font-size: 24px; color: var(--ink-4); }

.bs-prompt-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; margin-top: -10px; min-height: 0; }
.bs-prompt {
    font-size: 250px; font-weight: 700; line-height: .92;
    letter-spacing: -.03em; color: var(--yellow);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.bs-progress { display: flex; flex-direction: column; gap: 28px; }
.bs-progress-row { display: flex; align-items: flex-end; justify-content: space-between; }
.bs-progress-nums { display: flex; align-items: baseline; gap: 24px; }
.bs-progress-nums .big { font-family: var(--font-mono); font-size: 170px; font-weight: 600; line-height: .85; }
.bs-progress-nums .total { font-family: var(--font-mono); font-size: 76px; color: var(--ink-3); }
.bs-progress-nums .lbl { font-size: 56px; color: var(--ink-3); padding-left: 12px; }
.bs-missing { font-size: 76px; font-weight: 600; padding-bottom: 14px; }
.bs-missing .n { color: var(--pink); font-family: var(--font-mono); }
.bs-progress .bar-track { height: 40px; }

.bs-stand {
    display: flex; align-items: center; gap: 44px;
    padding-top: 8px; border-top: 2px solid var(--line-soft); margin-top: 6px;
    overflow: hidden; white-space: nowrap;
}
.bs-stand .lbl {
    font-family: var(--font-mono); font-size: 32px; letter-spacing: .16em;
    text-transform: uppercase; color: var(--ink-4); padding-top: 14px; flex: none;
}
.bs-stand .grp { display: flex; align-items: baseline; gap: 16px; padding-top: 14px; flex: none; }
.bs-stand .grp .score { font-family: var(--font-mono); font-size: 52px; font-weight: 600; color: var(--yellow); }
.bs-stand .grp .names { font-size: 46px; font-weight: 600; color: var(--ink-2); }

/* --- Rundenende --- */
.bs-reveal { position: relative; flex: 1; display: flex; flex-direction: column; padding: 36px 80px 30px; min-height: 0; }
.bs-glow {
    position: absolute; top: -200px; left: -140px; width: 900px; height: 700px;
    background: radial-gradient(closest-side, rgba(233,232,92,.20), rgba(255,143,177,.09), transparent);
    filter: blur(20px); pointer-events: none;
}
.bs-reveal-head { position: relative; display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 26px; }
.bs-reveal-title { display: flex; align-items: baseline; gap: 24px; }
.bs-reveal-title .lbl {
    font-family: var(--font-mono); font-size: 34px; letter-spacing: .2em;
    text-transform: uppercase; color: var(--ink-3);
}
.bs-reveal-title .word { font-size: 60px; font-weight: 700; color: var(--yellow); }

.bs-corner-qr.is-compact { flex-direction: row; align-items: center; gap: 20px; padding: 12px 20px 12px 12px; }
.bs-corner-qr.is-compact .qr-white { padding: 10px; border-radius: 8px; }
.bs-corner-qr.is-compact .qr-white img { width: 104px; height: 104px; }
.bs-corner-qr.is-compact .txt { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }

.bs-reveal-body { position: relative; flex: 1; display: grid; grid-template-columns: 1fr 660px; gap: 64px; min-height: 0; }
.bs-eyebrow {
    font-family: var(--font-mono); font-size: 32px; letter-spacing: .16em;
    text-transform: uppercase; color: var(--pink);
}

.bs-tiers-col { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.bs-tiers { display: flex; flex-direction: column; gap: 14px; }
.bs-tier {
    display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center;
    padding: 12px 24px; border-radius: 12px; background: var(--panel-2);
}
.bs-tier.is-lead { background: rgba(233, 232, 92, .12); }
.bs-tier .score-wrap { display: flex; align-items: baseline; gap: 12px; }
.bs-tier .score { font-family: var(--font-mono); font-size: 68px; font-weight: 600; line-height: 1; color: var(--ink); }
.bs-tier.is-lead .score { color: var(--yellow); }
.bs-tier .pkt { font-size: 26px; color: var(--ink-3); }
.bs-tier .right { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bs-tier .count { font-size: 26px; color: var(--ink-3); }
.bs-tier .names { display: flex; align-items: baseline; gap: 14px; min-width: 0; font-size: 44px; font-weight: 600; line-height: 1.1; color: var(--ink-2); }
.bs-tier.is-lead .names { color: var(--ink); }
.bs-tier .names .list { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bs-tier .names .rest { flex: none; white-space: nowrap; } /* «+N weitere» nie abschneiden */

.rise { animation: riseIn 450ms ease both; }

.bs-tally-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.bs-tally-head { display: flex; align-items: baseline; gap: 20px; }
.bs-tally-head .total { font-size: 28px; color: var(--ink-4); }
.bs-tally { display: flex; flex-direction: column; gap: 16px; }
.bs-tally-row { display: flex; align-items: center; gap: 22px; }
.bs-tally-bar { position: relative; flex: 1; height: 84px; background: var(--panel); border-radius: 8px; overflow: hidden; }
.bs-tally-bar .fill { position: absolute; inset: 0 auto 0 0; }
.bs-tally-bar .word {
    position: relative; height: 100%; display: flex; align-items: center;
    padding: 0 24px; font-size: 52px; font-weight: 700; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bs-tally-row .n { width: 120px; font-family: var(--font-mono); font-size: 52px; font-weight: 600; text-align: right; color: var(--ink-2); flex: none; }
.bs-tally-more { font-size: 34px; color: var(--ink-3); }

.bs-dist { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 2px solid var(--line-soft); }
.bs-dist-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 34px; color: var(--ink-3); }
.bs-dist-head .mono { font-family: var(--font-mono); }
.bs-dist-head .med { color: var(--pink); }
.bs-dist-head .top { color: var(--yellow); }
.bs-dist-marks { height: 80px; display: flex; align-items: flex-end; gap: 1px; }
.bs-dist-marks .mark { flex: 1; border-radius: 2px 2px 0 0; }

/* Rundenende unter 30 Spielern */
.bs-reveal.is-compact .bs-reveal-body { display: flex; flex-direction: column; gap: 16px; }
.bs-reveal.is-compact .bs-tiers-head { display: flex; align-items: baseline; justify-content: space-between; }
.bs-reveal.is-compact .bs-tiers-head .n { font-size: 32px; color: var(--ink-4); }
.bs-reveal.is-compact .bs-tiers { gap: 10px; }
.bs-reveal.is-compact .bs-tier { grid-template-columns: 240px 1fr; gap: 32px; padding: 8px 28px; }
.bs-reveal.is-compact .bs-tier .score { font-size: 88px; }
.bs-reveal.is-compact .bs-tier .pkt { font-size: 30px; }
.bs-reveal.is-compact .bs-tier .right { flex-direction: row; align-items: baseline; gap: 24px; }
.bs-reveal.is-compact .bs-tier .names { font-size: 56px; }
.bs-reveal.is-compact .bs-tier .count { font-size: 28px; color: var(--ink-4); white-space: nowrap; flex: none; }

.bs-genannt { display: flex; align-items: baseline; gap: 36px; margin-top: 16px; padding-top: 20px; border-top: 2px solid var(--line-soft); }
.bs-genannt .lbl {
    font-family: var(--font-mono); font-size: 32px; letter-spacing: .16em;
    text-transform: uppercase; color: var(--pink); white-space: nowrap;
}
.bs-genannt .words { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px 32px; overflow: hidden; max-height: 150px; }
.bs-genannt .w { display: flex; align-items: baseline; gap: 10px; }
.bs-genannt .w .word { font-size: 52px; font-weight: 700; color: var(--ink-2); }
.bs-genannt .w:first-child .word { color: var(--yellow); }
.bs-genannt .w .n { font-family: var(--font-mono); font-size: 34px; color: var(--ink-3); }

/* --- QR-Vollbild-Overlay --- */
.bs-overlay { position: absolute; inset: 10px 0 0 0; z-index: 30; }
.bs-overlay .scrim { position: absolute; inset: 0; background: rgba(10, 9, 12, .82); }
.bs-overlay .content {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px;
    cursor: pointer;
}
.bs-overlay .eyebrow {
    font-family: var(--font-mono); font-size: 36px; letter-spacing: .2em;
    text-transform: uppercase; color: var(--pink);
}
.bs-overlay .qr-white {
    padding: 28px; background: #fff; border-radius: 20px;
    box-shadow: 0 0 160px rgba(255, 143, 177, .3);
}
.bs-overlay .qr-white img { width: 520px; height: 520px; display: block; background: #fff; }
.bs-overlay .url { font-size: 88px; font-weight: 700; letter-spacing: -.02em; color: var(--yellow); }
.bs-overlay .count { display: flex; align-items: baseline; gap: 20px; }
.bs-overlay .count .num { font-family: var(--font-mono); font-size: 64px; font-weight: 700; }
.bs-overlay .count .lbl { font-size: 40px; color: var(--ink-3); }
.bs-overlay .hint { font-size: 30px; color: var(--ink-4); }
.bs-blurred { opacity: .16; filter: blur(3px); }

/* ============================================================
   Host (host.html)
   ============================================================ */

.h-body { min-height: 100vh; display: flex; flex-direction: column; font-size: 16px; }

.h-authbanner {
    margin: 16px 28px 0;
    padding: 12px 18px;
    border: 1px solid rgba(255, 143, 177, .45);
    border-radius: 10px;
    color: var(--pink); font-size: 14px;
    background: rgba(255, 143, 177, .08);
}

.h-bar {
    display: flex; align-items: center; gap: 20px;
    padding: 18px 28px;
    border-bottom: 1px solid var(--line);
    background: #1b1821;
    flex-wrap: wrap;
    position: sticky; top: 0; z-index: 10;
}
.h-title { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.h-state.pill { padding: 7px 16px; font-size: 13px; letter-spacing: .1em; }
.h-state .live-dot { width: 9px; height: 9px; }
.h-bar-right { flex: 1; display: flex; gap: 12px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }

.h-prompt-chip {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 16px;
    background: var(--field); border: 1px solid var(--line); border-radius: 10px;
}
.h-prompt-chip .lbl {
    font-size: 12px; font-family: var(--font-mono); letter-spacing: .12em;
    text-transform: uppercase; color: var(--ink-3);
}
.h-prompt-chip input {
    background: none; border: none; outline: none;
    color: var(--ink); font-family: var(--font-ui);
    font-size: 16px; font-weight: 600;
    width: 180px; padding: 6px 0;
}
.h-prompt-chip input::placeholder { color: var(--ink-4); font-weight: 400; }
.h-prompt-chip.is-locked { opacity: .75; }
.h-prompt-chip.is-locked input { color: var(--yellow); }

.h-btn-secondary {
    padding: 12px 18px;
    background: var(--field); border: 1px solid var(--line); border-radius: 10px;
    color: var(--ink-2); font-size: 14px; font-family: var(--font-ui);
    cursor: pointer; min-height: 44px;
}
.h-btn-secondary:hover:not(:disabled) { background: #2b2634; }
.h-btn-secondary:disabled {
    background: #1e1b23; border-color: #2a2632;
    color: var(--ink-disabled); cursor: not-allowed;
}
.h-btn-primary {
    padding: 13px 24px;
    background: var(--yellow); color: #17151b;
    border: none; border-radius: 10px;
    font-size: 15px; font-weight: 700; font-family: var(--font-ui);
    cursor: pointer; min-height: 44px;
}
.h-btn-primary:hover { background: #f2f18a; }

.h-main { flex: 1; display: grid; grid-template-columns: 340px 1fr; align-items: stretch; }

.h-side {
    padding: 26px 28px; border-right: 1px solid var(--line);
    display: flex; flex-direction: column; gap: 22px;
}
.h-label {
    font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--ink-3);
}
.h-count-row { display: flex; align-items: baseline; gap: 10px; }
.h-count-row .big { font-family: var(--font-mono); font-size: 64px; font-weight: 600; line-height: .9; }
.h-count-row .total { font-family: var(--font-mono); font-size: 26px; color: var(--ink-3); }
.h-progress { display: flex; flex-direction: column; gap: 10px; }
.h-progress .bar-track { height: 14px; }
.h-progress-caption { font-size: 15px; color: var(--ink-2); }
.h-progress-caption .n { color: var(--pink); font-weight: 600; font-family: var(--font-mono); }
.h-divider { height: 1px; background: var(--line); }

.h-tiers { display: flex; flex-direction: column; gap: 12px; }
.h-tier { display: flex; align-items: baseline; gap: 12px; font-size: 15px; }
.h-tier .score { width: 34px; font-family: var(--font-mono); color: var(--yellow); font-weight: 600; flex: none; }
.h-tier .names { flex: 1; color: var(--ink-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.h-tier .n { font-family: var(--font-mono); font-size: 13px; color: var(--ink-4); flex: none; }

.h-side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.h-join-note {
    padding: 11px 16px; border: 1px solid var(--line); border-radius: 10px;
    font-size: 14px; color: var(--ink-2); text-align: center;
}
.h-reset {
    padding: 11px 16px;
    border: 1px solid rgba(255, 143, 177, .35); border-radius: 10px;
    background: none; font-family: var(--font-ui);
    font-size: 14px; color: var(--pink); text-align: center;
    cursor: pointer; min-height: 44px;
}
.h-reset:hover { background: rgba(255, 143, 177, .10); }

.h-list { display: flex; flex-direction: column; min-height: 520px; min-width: 0; }
.h-filters { display: flex; align-items: center; gap: 8px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.h-chip {
    padding: 9px 16px; border-radius: 8px;
    background: var(--field); color: var(--ink-2);
    border: none; font-size: 14px; font-family: var(--font-ui);
    cursor: pointer; min-height: 44px;
}
.h-chip:hover { background: #2b2634; }
.h-chip[aria-pressed="true"] { background: var(--yellow); color: #17151b; font-weight: 600; }
.h-search {
    flex: 1; margin-left: 12px; padding: 10px 14px;
    background: var(--field); border: 1px solid var(--line); border-radius: 8px;
    font-size: 14px; color: var(--ink); font-family: var(--font-ui);
    outline: none; min-height: 44px;
}
.h-search::placeholder { color: var(--ink-4); }
.h-search:focus { border-color: #4a4453; }

.h-thead {
    display: grid; grid-template-columns: 1fr 120px;
    padding: 12px 24px;
    font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--ink-4);
    border-bottom: 1px solid var(--line);
}
.h-thead .r { text-align: right; }
.h-rows { max-height: 300px; overflow: auto; }
.h-row {
    display: grid; grid-template-columns: 1fr 120px;
    padding: 15px 24px; border-bottom: 1px solid var(--row-line);
    font-size: 16px; align-items: center;
}
.h-row:hover { background: #1d1a23; }
.h-row .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.h-row .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.h-row .dot.is-open { background: var(--pink); }
.h-row .dot.is-new { background: var(--peach); }
.h-row .dot.is-done { background: #453f52; }
.h-row .name { font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.h-row .tag { font-size: 13px; color: var(--ink-4); flex: none; }
.h-row .score { font-family: var(--font-mono); font-size: 15px; text-align: right; color: var(--ink-3); }
.h-empty { padding: 28px 24px; font-size: 14px; color: var(--ink-4); }

.h-foot { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--line); }
.h-more {
    padding: 10px 18px; background: var(--field); border: 1px solid var(--line);
    border-radius: 8px; font-size: 14px; color: var(--ink); font-weight: 600;
    font-family: var(--font-ui); cursor: pointer; min-height: 44px;
}
.h-more:hover { background: #2b2634; }
.h-all {
    padding: 10px 18px; background: none; border: 1px solid var(--line);
    border-radius: 8px; font-size: 14px; color: var(--ink-2);
    font-family: var(--font-ui); cursor: pointer; min-height: 44px;
}
.h-all:hover { border-color: #4a4453; }
.h-foot-hint { font-size: 13px; color: var(--ink-4); margin-left: auto; }

/* Nur auf dem Telefon sichtbar */
.h-phone-only { display: none; }

.h-top-btn {
    position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
    display: none; align-items: center; gap: 8px;
    padding: 12px 20px; border-radius: 999px;
    background: rgba(36, 31, 43, .92); border: 1px solid #3a3543;
    font-size: 14px; font-weight: 600; color: var(--ink); font-family: var(--font-ui);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
    cursor: pointer; z-index: 20; min-height: 44px;
}

/* Host · Telefon: eine Spalte, alles scrollt */
@media (max-width: 900px) {
    .h-bar { padding: 18px 20px 12px; border-bottom: 1px solid var(--line-soft); }
    .h-bar-right { flex-basis: 100%; justify-content: stretch; flex-direction: column; align-items: stretch; }
    .h-prompt-chip input { width: 100%; flex: 1; }
    .h-btn-primary, .h-btn-secondary { width: 100%; padding: 16px; font-size: 16px; border-radius: 12px; }

    .h-main { display: flex; flex-direction: column; padding-bottom: 90px; }
    .h-side { border-right: none; padding: 16px 20px 0; gap: 18px; }
    .h-side-bottom { margin-top: 0; }
    .h-list { min-height: 0; padding: 0 20px; }
    .h-filters { padding: 16px 0; flex-wrap: wrap; }
    .h-search { margin-left: 0; flex-basis: 100%; }
    .h-thead { padding: 12px 4px; }
    .h-rows { max-height: none; overflow: visible; }
    .h-row { padding: 13px 4px; }
    .h-foot { display: none; }
    .h-phone-only { display: block; font-size: 13px; color: var(--ink-4); text-align: center; padding: 10px 0 20px; }
}

/* ============================================================
   Spieler (index.html)
   ============================================================ */

.p-body { min-height: 100vh; }
.p-shell { max-width: 430px; margin: 0 auto; padding: 20px; min-height: 100vh; display: flex; flex-direction: column; }

.p-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.p-name-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
    font-size: 15px; font-weight: 600; color: var(--ink);
    background: none; font-family: var(--font-ui); cursor: pointer;
    max-width: 60%; min-height: 44px;
}
.p-name-pill .pen { color: var(--ink-4); }
.p-name-pill span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.p-name-edit {
    width: 220px; padding: 8px 14px;
    border-radius: 999px; background: var(--panel); border: 1px solid var(--line);
    color: var(--ink); font-size: 15px; font-weight: 600; font-family: var(--font-ui);
    outline: none; min-height: 44px;
}
.p-state.pill { padding: 7px 14px; font-size: 11px; letter-spacing: .08em; }
.p-state .live-dot { width: 7px; height: 7px; animation-duration: 1.2s; }

/* Willkommen */
.p-welcome { display: flex; flex-direction: column; gap: 18px; padding-top: 8vh; }
.p-welcome .eyebrow {
    font-family: var(--font-mono); font-size: 12px; letter-spacing: .2em;
    text-transform: uppercase; color: var(--pink);
}
.p-welcome h1 { margin: 0; font-size: 40px; font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
.p-welcome .sub { font-size: 16px; color: var(--ink-3); line-height: 1.5; margin: 0; }
.p-input {
    width: 100%; padding: 20px 18px;
    background: var(--field); border: 1px solid var(--line); border-radius: 14px;
    font-size: 19px; color: var(--ink); font-family: var(--font-ui);
    outline: none;
}
.p-input::placeholder { color: var(--ink-4); }
.p-input:focus { border-color: #4a4453; }
.p-input:disabled { opacity: .55; }
.p-btn-primary {
    width: 100%; padding: 19px;
    background: var(--yellow); color: #17151b;
    border: none; border-radius: 14px;
    font-size: 18px; font-weight: 700; font-family: var(--font-ui);
    cursor: pointer; min-height: 44px;
}
.p-btn-primary:hover:not(:disabled) { background: #f2f18a; }
.p-btn-primary:disabled { background: var(--field); color: var(--ink-disabled); cursor: not-allowed; }

/* Begriff-Karte */
.p-prompt-card {
    display: flex; flex-direction: column; gap: 10px;
    padding: 26px 22px; background: var(--panel); border-radius: 18px;
}
.p-label {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--ink-3);
}
.p-prompt-word {
    font-size: 52px; font-weight: 700; letter-spacing: -.02em;
    color: var(--yellow); line-height: 1;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

.p-form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.p-error { margin: 10px 0 0; font-size: 14px; color: var(--pink); }
.p-info { margin: 10px 0 0; font-size: 14px; color: var(--ink-3); }

.p-divider { height: 1px; background: var(--line); margin: 24px 0 0; }

/* Dein Stand */
.p-stand { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.p-stand-head { display: flex; align-items: baseline; justify-content: space-between; }
.p-stand-head .total { font-size: 13px; color: var(--ink-4); }
.p-rank-row { display: flex; align-items: flex-end; gap: 12px; }
.p-rank-row .rank { font-family: var(--font-mono); font-size: 80px; font-weight: 600; line-height: .85; }
.p-rank-row .meta { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; }
.p-rank-row .meta .lbl { font-size: 15px; color: var(--ink-3); }
.p-rank-row .meta .delta { font-size: 16px; font-weight: 700; color: var(--pink); }
.p-rank-row .pts { flex: 1; text-align: right; padding-bottom: 10px; }
.p-rank-row .pts .num { font-family: var(--font-mono); font-size: 34px; font-weight: 600; color: var(--yellow); }
.p-rank-row .pts .lbl { font-size: 13px; color: var(--ink-3); }
.p-stand-note { font-size: 14px; color: var(--ink-3); }

/* Nachbarschaft */
.p-result-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px; background: var(--panel); border-radius: 16px; margin-bottom: 18px;
}
.p-result-card .lhs { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.p-result-card .from { font-size: 13px; color: var(--ink-3); }
.p-result-card .word { font-size: 26px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.p-result-card .gain { font-family: var(--font-mono); font-size: 30px; font-weight: 600; color: var(--pink); flex: none; }

.p-hood { display: flex; flex-direction: column; gap: 8px; }
.p-hood-row {
    display: grid; grid-template-columns: 44px 1fr auto; align-items: center;
    gap: 10px; padding: 14px; border-radius: 12px;
}
.p-hood-row .rank { font-family: var(--font-mono); font-size: 16px; color: var(--ink-4); }
.p-hood-row .name { font-size: 17px; font-weight: 600; color: var(--ink-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.p-hood-row .score { font-family: var(--font-mono); font-size: 18px; font-weight: 600; color: var(--ink-3); }
.p-hood-row.is-me { background: rgba(233, 232, 92, .14); }
.p-hood-row.is-me .rank, .p-hood-row.is-me .score { color: var(--yellow); }
.p-hood-row.is-me .name { color: var(--ink); }
.p-hood-row.is-leader { background: var(--panel); }
.p-hood-row.is-leader .rank, .p-hood-row.is-leader .score { color: var(--yellow); }
.p-hood-row.is-leader .name { color: var(--ink); }

.p-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 18px; }
.p-link-btn {
    background: none; border: none; padding: 10px;
    font-size: 13px; color: var(--ink-4); text-align: center;
    font-family: var(--font-ui); cursor: pointer; min-height: 44px;
}
.p-link-btn:hover { color: var(--ink-2); }

/* Warten */
.p-wait { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; }
.p-wait-dots { display: flex; gap: 8px; }
.p-wait-dot { width: 12px; height: 12px; border-radius: 50%; animation: pulseDot 1.2s ease-in-out infinite; }
.p-wait-dot:nth-child(1) { background: var(--pink); }
.p-wait-dot:nth-child(2) { background: var(--peach); animation-delay: .2s; }
.p-wait-dot:nth-child(3) { background: var(--yellow); animation-delay: .4s; }
.p-wait-title { font-size: 26px; font-weight: 600; }
.p-wait-sub { font-size: 16px; color: var(--ink-3); max-width: 260px; }
.p-share {
    padding: 14px; border: 1px solid var(--line); border-radius: 12px;
    font-size: 14px; color: var(--ink-2); text-align: center;
}

/* Ganze Rangliste (auf Abruf) */
.p-full-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.p-full-head .title { font-size: 20px; font-weight: 700; }
.p-back {
    background: none; border: 1px solid var(--line); border-radius: 999px;
    padding: 8px 16px; font-size: 14px; color: var(--ink-2);
    font-family: var(--font-ui); cursor: pointer; min-height: 44px;
}
.p-full-list { display: flex; flex-direction: column; }
.p-full-row {
    display: grid; grid-template-columns: 44px 1fr auto; align-items: center;
    gap: 10px; padding: 12px 8px; border-bottom: 1px solid var(--row-line);
}
.p-full-row .rank { font-family: var(--font-mono); font-size: 14px; color: var(--ink-4); }
.p-full-row .name { font-size: 16px; font-weight: 600; color: var(--ink-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.p-full-row .score { font-family: var(--font-mono); font-size: 16px; font-weight: 600; color: var(--ink-3); }
.p-full-row.is-me { background: rgba(233, 232, 92, .14); border-radius: 10px; border-bottom-color: transparent; }
.p-full-row.is-me .rank, .p-full-row.is-me .score { color: var(--yellow); }
.p-full-row.is-me .name { color: var(--ink); }
