body {
    font-family: var(--font-b);
    background: linear-gradient(160deg, var(--bg-warm) 0%, #e9ddff 100%);
    background-attachment: fixed;
    color: var(--ink);
    min-height: 100vh;
    padding: 0 16px 40px;
}

.container { max-width: 560px; margin: 0 auto; }
.screen { display: none; }
.screen.active { display: block; }
.turn-state { display: none; }
.turn-state.active { display: block; animation: floatIn 0.3s ease; }
.text-center { text-align: center; }

/* Kop gecentreerd zodat de zwevende home/regel-knoppen niets afdekken */
.mand-header {
    min-height: 110px;
    padding-top: 14px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center;
}
.logo {
    font-family: var(--font-h);
    font-size: 3.4rem; line-height: 1;
    background: linear-gradient(45deg, var(--c1), var(--c2));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo-small { font-size: 2.2rem; }
.round-indicator { font-family: var(--font-h); font-weight: 700; color: var(--muted); margin-top: 2px; }

.card {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.9);
    border-radius: 24px;
    padding: 1.6rem;
    box-shadow: 0 10px 40px rgba(120,60,200,0.14);
}
.card h2 { font-family: var(--font-h); font-weight: 800; margin-bottom: 1rem; }
.subtitle { color: var(--muted); font-weight: 600; }
.hint { font-weight: 400; font-size: 0.8rem; color: var(--muted); }

.form-group { margin-bottom: 1.3rem; }
.form-group > label { display: block; font-weight: 700; margin-bottom: 0.5rem; }

/* Buttons */
.btn-primary {
    width: 100%; padding: 0.9rem 1rem;
    font-family: var(--font-h); font-weight: 800; font-size: 1.15rem;
    color: #fff; border: none; border-radius: 16px; cursor: pointer;
    background: linear-gradient(45deg, var(--c1), var(--c2));
    box-shadow: 0 6px 18px rgba(192,84,252,0.35);
    transition: transform 0.15s;
}
.btn-primary:hover { transform: scale(1.02); }
.btn-large { font-size: 1.4rem; padding: 1.1rem 1rem; margin-top: 1rem; }
.btn-link {
    background: none; border: none; cursor: pointer;
    color: #7c3aed; font-family: var(--font-b); font-weight: 700; font-size: 0.95rem;
    padding: 0.4rem 0;
}
.btn-link:hover { text-decoration: underline; }
.btn-abort {
    display: block; margin: 2rem auto 0;
    background: none; border: 1.5px solid rgba(157,126,192,0.5); color: var(--muted);
    padding: 0.5rem 1.1rem; border-radius: 999px; cursor: pointer;
    font-family: var(--font-b); font-weight: 700;
}
.btn-abort:hover { border-color: var(--c2); color: var(--c2); }

/* Teams */
.teams-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.team-row {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.7); border-radius: 14px; padding: 6px 8px;
    border: 1.5px solid rgba(192,84,252,0.2);
}
.team-row.dragging { opacity: 0.5; }
.drag-handle { cursor: grab; color: var(--muted); padding: 0 6px; font-size: 1.2rem; user-select: none; }
.team-name {
    flex: 1; min-width: 0; padding: 8px 10px;
    border: 1.5px solid transparent; border-radius: 10px; background: transparent;
    font-family: var(--font-b); font-size: 1rem; font-weight: 600; color: var(--ink);
}
.team-name:focus { outline: none; border-color: var(--c1); background: #fff; }
.btn-small {
    width: 32px; height: 32px; border: none; border-radius: 10px; cursor: pointer;
    background: rgba(192,84,252,0.12); color: #7c3aed; font-size: 0.8rem; font-weight: 800;
}
.btn-small:hover:not(:disabled) { background: rgba(192,84,252,0.28); }
.btn-small:disabled { opacity: 0.3; cursor: default; }
.btn-small.remove { font-size: 1.2rem; background: rgba(251,113,133,0.15); color: var(--c2); }

/* Opties */
.option-row { display: flex; gap: 8px; flex-wrap: wrap; }
.opt {
    flex: 1; min-width: 52px; padding: 0.7rem 0;
    font-family: var(--font-h); font-weight: 800; font-size: 1.15rem;
    border: 2px solid rgba(192,84,252,0.25); border-radius: 14px; cursor: pointer;
    background: rgba(255,255,255,0.7); color: var(--ink);
}
.opt.active, .mode.active { border-color: var(--c1); background: rgba(192,132,252,0.22); }
.mode-options { display: flex; flex-direction: column; gap: 8px; }
.mode {
    text-align: left; padding: 0.8rem 1rem; cursor: pointer;
    border: 2px solid rgba(192,84,252,0.25); border-radius: 14px;
    background: rgba(255,255,255,0.7); color: var(--ink);
    font-family: var(--font-b);
}
.mode strong { display: block; font-family: var(--font-h); font-size: 1.1rem; }
.mode span { font-size: 0.88rem; color: var(--muted); }

/* Scorebord */
.scoreboard { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 1rem; }
.team-score {
    flex: 1 1 100px; max-width: 170px; text-align: center; padding: 0.5rem 0.6rem;
    background: rgba(255,255,255,0.65); border-radius: 14px; border: 2px solid transparent;
}
.team-score.active { border-color: var(--c3); background: rgba(251,191,36,0.18); }
.ts-name { display: flex; justify-content: center; align-items: center; gap: 4px; font-weight: 700; font-size: 0.85rem; }
.ts-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-kroon { flex: none; }
.ts-name .ico-emoji { width: 1.1em; height: 1.1em; vertical-align: middle; }
.ts-val { font-family: var(--font-h); font-weight: 800; font-size: 1.15rem; }

/* Voor de beurt */
.team-big { font-size: 2.4rem; word-break: break-word; margin: 0.2rem 0 0.6rem !important; }
.mode-info { font-weight: 700; color: #7c3aed; }
.rules-reminder { margin-top: 0.8rem; font-size: 0.9rem; color: var(--muted); }

/* Tijdens de beurt */
.timer-wrap { text-align: center; margin-bottom: 1rem; }
.timer {
    font-family: var(--font-h); font-weight: 800; font-size: 4.5rem; line-height: 1;
    color: var(--ink); transition: color 0.2s;
}
.timer.urgent { color: var(--c2); animation: pulse 1s infinite; }
.timer-label { color: var(--muted); font-weight: 700; }
@keyframes pulse { 50% { transform: scale(1.08); } }

.word-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.word {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    padding: 1.1rem 1.3rem; cursor: pointer;
    font-family: var(--font-h); font-weight: 800; font-size: 1.7rem;
    background: rgba(255,255,255,0.85); color: var(--ink);
    border: 2px solid rgba(192,84,252,0.25); border-radius: 18px;
    box-shadow: 0 4px 14px rgba(120,60,200,0.1);
    transition: background 0.2s, color 0.2s, transform 0.15s;
}
.word-text { text-transform: capitalize; }
.word-check { opacity: 0; font-size: 1.6rem; }
.word.done { background: var(--c4); border-color: #10b981; color: #fff; transform: scale(0.98); }
.word.done .word-text { text-decoration: line-through; }
.word.done .word-check { opacity: 1; }
.tap-hint { text-align: center; color: var(--muted); font-size: 0.85rem; margin: 0.8rem 0 0.2rem; }
#during-turn .btn-link { display: block; margin: 0 auto; }

/* Na de beurt */
.score-display { font-family: var(--font-h); font-weight: 800; font-size: 1.8rem; color: #7c3aed; margin-bottom: 0.8rem; }
.post-words { list-style: none; margin-bottom: 1.2rem; font-weight: 700; font-size: 1.1rem; }
.post-words li { padding: 4px 0; text-transform: capitalize; }
.post-words .ok { color: #059669; }
.post-words .miss { color: var(--c2); }

/* Uitslag */
.winner-line { font-family: var(--font-h); font-weight: 800; font-size: 1.6rem; color: #7c3aed; margin-bottom: 1rem; }
.final-scores { list-style: none; margin-bottom: 1.4rem; }
.final-scores li {
    display: flex; align-items: center; gap: 10px; text-align: left;
    padding: 0.6rem 0.8rem; margin-bottom: 6px; border-radius: 12px; background: rgba(255,255,255,0.7);
}
.fs-medal { width: 28px; text-align: center; }
.fs-name { flex: 1; font-weight: 800; font-family: var(--font-h); font-size: 1.1rem; }
.fs-val { font-weight: 700; color: var(--muted); font-size: 0.9rem; }

/* Modal */
.rules-content { max-height: 85vh; overflow-y: auto; }
.rules-content h4 { margin: 1rem 0 0.3rem; font-family: var(--font-h); }
.rules-content ul { padding-left: 1.2rem; }
.rules-content li, .rules-content p { margin-bottom: 0.3rem; line-height: 1.4; }

@media (max-width: 480px) {
    .logo { font-size: 2.8rem; }
    .team-big { font-size: 1.9rem; }
    .word { font-size: 1.4rem; padding: 0.95rem 1rem; }
    .card { padding: 1.2rem; }
}

/* ── Zelfvoorzienende tokens (fallback als common.css niet laadt) ── */
:root {
    --c1: #c084fc; --c2: #fb7185; --c3: #fbbf24; --c4: #34d399; --c5: #60a5fa;
    --bg-warm: #fdf4ff; --ink: #1e0a3c; --muted: #7c5aa6;
    --font-h: 'Baloo 2', 'Trebuchet MS', cursive; --font-b: 'Nunito', 'Segoe UI', sans-serif;
}

/* ── Levendiger kleurenschema ── */
body { background: linear-gradient(160deg, #7c3aed 0%, #c026d3 55%, #fb7185 100%); background-attachment: fixed; }
.logo { background: none; -webkit-text-fill-color: #fff; color: #fff; text-shadow: 0 4px 0 rgba(30,10,60,0.25); }
.round-indicator { color: #fff; opacity: 0.95; }
.card { background: rgba(255,255,255,0.95); border: none; box-shadow: 0 12px 40px rgba(30,10,60,0.3); }
.card h2 { color: #5b21b6; }
.opt { border-color: #d8b4fe; color: #5b21b6; }
.opt.active { background: linear-gradient(45deg, #a855f7, #e879f9); border-color: #a855f7; color: #fff; }
.mode { border-color: #d8b4fe; }
.mode strong { color: #5b21b6; }
.mode.active { background: linear-gradient(45deg, #a855f7, #e879f9); border-color: #a855f7; }
.mode.active strong, .mode.active span { color: #fff; }
.btn-primary { background: linear-gradient(45deg, #f59e0b, #f43f5e); box-shadow: 0 6px 0 #be123c, 0 10px 20px rgba(0,0,0,0.25); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 3px 0 #be123c; }
.team-row { background: #faf5ff; border-color: #d8b4fe; }
.team-score { background: rgba(255,255,255,0.92); }
.team-score.active { background: var(--c3); border-color: #fff; }
.timer { color: #fff; text-shadow: 0 3px 0 rgba(30,10,60,0.25); }
.timer.urgent { color: #fde047; }
.timer-label, .tap-hint { color: rgba(255,255,255,0.85); }
.btn-link { color: #7c3aed; }
#during-turn .btn-link, .btn-abort { color: #fff; }
.btn-abort { border-color: rgba(255,255,255,0.6); }
.btn-abort:hover { background: rgba(255,255,255,0.15); color: #fff; border-color: #fff; }
.word { background: #3b82f6; border: none; color: #fff; box-shadow: 0 5px 0 rgba(30,10,60,0.25); }
.word.done { background: #10b981; box-shadow: 0 2px 0 rgba(30,10,60,0.25); transform: translateY(3px); }
.winner-line, .score-display { color: #c026d3; }
.mode-info { color: #7c3aed; }

/* Geluid aan/uit-icoon (rechtsboven) */
.sound-icon { position: fixed; top: 14px; right: 14px; z-index: 900; width: 34px; height: 34px; cursor: pointer; color: #fff; filter: drop-shadow(0 2px 3px rgba(30,10,60,0.45)); transition: transform 0.15s; }
.sound-icon:hover { transform: scale(1.12); }
.sound-icon:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 6px; }
.sound-icon svg { width: 100%; height: 100%; fill: currentColor; }
.sound-icon .snd-off { display: none; }
.sound-icon.uit .snd-on { display: none; }
.sound-icon.uit .snd-off { display: inline; opacity: 0.8; }

/* Deel-icoon (links van het geluid-icoon) */
.share-icon { position: fixed; top: 17px; right: 58px; z-index: 900; width: 28px; height: 28px; cursor: pointer; color: #fff; filter: drop-shadow(0 2px 3px rgba(30,10,60,0.45)); transition: transform 0.15s; }
.share-icon:hover { transform: scale(1.12); }
.share-icon:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 6px; }
.share-icon svg { width: 100%; height: 100%; fill: currentColor; }
