/* viktoriin/style.css */

/* ==========================================
   INDEX PAGE — TOP BAR
   ========================================== */
.kv-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.kv-top-left { flex-shrink: 0; }
.kv-top-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
@media screen and (max-width: 480px) {
    .kv-top-bar { flex-direction: column; align-items: stretch; }
    .kv-top-left { text-align: center; }
    .kv-top-right { justify-content: center; }
}

/* ==========================================
   INDEX PAGE — TABS
   ========================================== */
.kv-tabs {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color, #eee);
    padding: 0 0.5rem;
    gap: 0;
}
.kv-tab {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary, #888);
    border-bottom: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.15s, border-color 0.15s;
}
.kv-tab:hover { color: var(--text-primary, #333); }
.kv-tab.is-active {
    color: var(--accent-color, #3273dc);
    border-bottom-color: var(--accent-color, #3273dc);
}
.kv-tabs-right {
    margin-left: auto;
    padding: 0.5rem 0;
}
@media screen and (max-width: 480px) {
    .kv-tab { padding: 0.6rem 0.6rem; font-size: 0.82rem; }
    .kv-tabs-right .button span:not(.icon) { display: none; }
}

/* ==========================================
   CREATE PAGE — TOP BAR
   ========================================== */
.kv-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card, #fff);
    border-bottom: 1px solid var(--border-color, #eee);
    position: sticky;
    top: 0;
    z-index: 25;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.kv-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}
.kv-topbar-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: var(--text-secondary, #888);
    flex-shrink: 0;
}
.kv-topbar-back:hover { background: var(--bg-hover, #f0f0f0); color: var(--text-primary, #333); }
.kv-topbar-title {
    border: none;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #333);
    outline: none;
    width: 300px;
    max-width: 100%;
    min-width: 0;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
}
.kv-topbar-title:focus {
    background: var(--bg-hover, #f5f5f5);
}
.kv-topbar-title::placeholder { color: var(--text-muted, #bbb); font-weight: 400; }
.kv-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

/* ==========================================
   CREATE PAGE — TWO-COLUMN LAYOUT
   ========================================== */
.kv-creator-layout {
    display: flex;
    height: calc(100vh - 3.25rem - 52px);
    overflow: hidden;
}
.kv-sidebar {
    width: 240px;
    min-width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-card, #fff);
    border-right: 1px solid var(--border-color, #eee);
    overflow: hidden;
}
.kv-sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.4rem;
}
.kv-sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    line-height: 1.3;
    transition: background 0.15s;
    border: 2px solid transparent;
    margin-bottom: 2px;
}
.kv-sidebar-item:hover {
    background: var(--bg-hover, #f0f0f0);
}
.kv-sidebar-item.is-active {
    border-color: var(--accent-color, #3273dc);
    background: var(--bg-hover, #f0f0f0);
}
.kv-sidebar-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.kv-sidebar-type {
    color: var(--text-muted, #aaa);
    font-size: 0.7rem;
    flex-shrink: 0;
}
.kv-sidebar-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary, #333);
}
.kv-sidebar-drag {
    color: var(--text-muted, #bbb);
    cursor: grab;
    font-size: 0.75rem;
    flex-shrink: 0;
    padding: 0.5rem 0.3rem 0.5rem 0;
    margin: -0.5rem 0 -0.5rem -0.2rem;
}
.kv-sidebar-drag:active { cursor: grabbing; }
.kv-sidebar-action {
    display: none;
    border: none;
    background: none;
    color: var(--text-muted, #bbb);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px 5px;
    border-radius: 4px;
    flex-shrink: 0;
}
.kv-sidebar-dup:hover { color: var(--accent-color, #3273dc); background: rgba(50,115,220,0.1); }
.kv-sidebar-del:hover { color: #e53935; background: rgba(229,57,53,0.1); }
.kv-sidebar-item:hover .kv-sidebar-action { display: block; }
.kv-sidebar-text { margin-right: auto; }
.kv-sidebar-item.is-dragging {
    opacity: 0.3;
}
.kv-sidebar-dropzone {
    height: 4px;
    margin: 0 6px;
    border-radius: 3px;
    transition: background 0.15s;
}
.kv-sidebar-dropzone.is-active {
    background: var(--accent-color, #3273dc);
}
.kv-sidebar-add-item {
    border-style: dashed !important;
    border-color: var(--border-color, #ddd) !important;
}
.kv-sidebar-add-item:hover {
    border-color: var(--accent-color, #3273dc) !important;
}
.kv-sidebar-add-item .kv-sidebar-drag,
.kv-sidebar-add-item .kv-sidebar-del { display: none !important; }

/* Undo toast */
.kv-undo-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #363636;
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 200;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
}
.kv-undo-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.kv-undo-toast button {
    border: none;
    background: rgba(255,255,255,0.15);
    color: #48c78e;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}
.kv-undo-toast button:hover { background: rgba(255,255,255,0.25); }

/* Question editor */
.kv-question-editor {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #eee);
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.kv-q-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.kv-text-media-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.kv-text-media-row .kv-question-textarea {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}
.kv-text-media-row .kv-media-preview {
    flex-shrink: 0;
    margin-bottom: 0;
    width: 180px;
}
.kv-text-media-row .kv-media-img {
    max-height: 150px;
    max-width: 180px;
}
.kv-text-media-row .kv-media-dropzone-wrap,
.kv-text-media-row .kv-media-dropzone {
    width: 180px;
    flex-shrink: 0;
    margin-bottom: 0;
}
.kv-text-media-row .kv-media-dropzone {
    padding: 1rem 0.5rem;
    justify-content: center;
}
.kv-text-media-row .kv-media-dropzone span {
    font-size: 0.8rem;
}
.kv-text-media-row .kv-media-dropzone small {
    font-size: 0.7rem;
}
@media screen and (max-width: 768px) {
    .kv-text-media-row {
        flex-direction: column;
    }
}
.kv-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: fadeIn 0.15s ease;
}
.kv-lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.kv-question-textarea.is-over-limit,
.kv-option-input.is-over-limit {
    color: #e53935;
}
.kv-question-textarea {
    width: 100%;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    color: var(--text-primary, #333);
    background: var(--bg-primary, #fff);
    margin-bottom: 0.75rem;
}
.kv-question-textarea:focus {
    outline: none;
    border-color: var(--accent-color, #3273dc);
    box-shadow: 0 0 0 2px rgba(50,115,220,0.15);
}
.kv-question-textarea::placeholder { color: var(--text-muted, #bbb); }
.kv-editor-main {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
}
@media screen and (max-width: 768px) {
    .kv-creator-layout { flex-direction: column; height: auto; overflow: visible; }
    .kv-sidebar {
        width: 100%;
        min-width: 0;
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid var(--border-color, #eee);
    }
    .kv-sidebar-list {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 0.3rem;
        padding: 0.4rem;
    }
    .kv-sidebar-item { white-space: nowrap; flex-shrink: 0; margin-bottom: 0; }
    .kv-editor-main { padding: 0.75rem; }
    .kv-question-editor { padding: 0.85rem; }
}

/* ==========================================
   CREATE PAGE — EMPTY STATE
   ========================================== */
.kv-empty-questions {
    border: 3px dashed var(--border-color, #ddd);
    border-radius: 16px;
    padding: 3rem 1.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}
.kv-empty-icon {
    font-size: 3rem;
    color: var(--text-muted, #bbb);
    margin-bottom: 1rem;
}
.kv-empty-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary, #333);
    margin-bottom: 0.3rem;
}
.kv-empty-text {
    color: var(--text-secondary, #888);
    font-size: 0.95rem;
}

/* ==========================================
   CREATE PAGE — ADD QUESTION GRID
   ========================================== */
.kv-addq-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.kv-addq-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 0.9rem;
    height: 3.8rem;
    border: none;
    border-radius: 10px;
    background: var(--addq-color, #3273dc);
    color: #fff;
    cursor: pointer;
    text-align: left;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.kv-addq-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.kv-addq-btn:active { transform: translateY(0); }
.kv-addq-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding-top: 4px;
    background: transparent;
    z-index: 10;
}
.kv-addq-dropdown-menu-inner {
    background: var(--bg-card, #fff);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    overflow: hidden;
}
.kv-addq-dropdown:hover .kv-addq-dropdown-menu,
.kv-addq-dropdown:focus-within .kv-addq-dropdown-menu {
    display: block;
}
.kv-addq-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: none;
    background: none;
    color: var(--text-primary, #333);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}
.kv-addq-dropdown-item:hover {
    background: var(--bg-hover, #f5f5f5);
}
[data-theme="dark"] .kv-addq-dropdown-menu-inner {
    background: var(--bg-card, #1e2a4a);
}
[data-theme="dark"] .kv-addq-dropdown-item:hover {
    background: var(--bg-hover, #2a3a5a);
}
.kv-addq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.kv-addq-label {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}
@media screen and (max-width: 768px) {
    .kv-addq-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .kv-addq-btn { min-height: 3.8rem; height: 3.8rem; padding: 0.6rem 0.75rem; gap: 0.55rem; }
    .kv-addq-icon { width: 1.5rem; font-size: 1.25rem; }
    .kv-addq-label { font-size: 0.8rem; line-height: 1.15; }
}

/* ==========================================
   MATCH (ÜHENDAMINE) — PLAYER
   ========================================== */
.play-match-board {
    display: flex;
    gap: 0.75rem;
}
.play-match-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.play-match-item {
    padding: 0.6rem 0.75rem;
    border: 3px solid var(--border-color, #ddd);
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, opacity 0.15s;
    background: var(--bg-card, #fff);
    color: var(--text-primary, #333);
}
.play-match-left:hover, .play-match-right:hover {
    background: var(--bg-hover, #f0f0f0);
}
.play-match-item.is-selected {
    border-color: var(--accent-color, #3273dc) !important;
    background: rgba(50, 115, 220, 0.08);
    opacity: 1 !important;
}

/* ==========================================
   INDEX PAGE — QUIZ LIST
   ========================================== */
.quiz-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color, #eee);
    border-radius: 8px;
    background: var(--bg-card, #f9f9f9);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.quiz-list-item:last-child { margin-bottom: 0; }
.quiz-list-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.quiz-list-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}
.quiz-list-info strong {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.quiz-list-info small {
    color: var(--text-muted, #888);
    font-size: 0.85rem;
}
.quiz-list-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}
@media screen and (max-width: 768px) {
    .quiz-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
}

[data-theme="dark"] .quiz-list-item {
    border-color: var(--border-color);
}
[data-theme="dark"] .quiz-list-info small {
    color: #999;
}

/* ==========================================
   CREATE PAGE
   ========================================== */
.question-box {
    position: relative;
}
/* Media drop zone */
.kv-media-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1.5rem;
    border: 2px dashed var(--border-color, #ccc);
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-muted, #aaa);
    transition: border-color 0.15s, background 0.15s;
    margin-bottom: 1rem;
}
.kv-media-dropzone i { font-size: 1.5rem; }
.kv-media-dropzone span { font-weight: 600; font-size: 0.95rem; color: var(--text-secondary, #666); }
.kv-media-dropzone small { font-size: 0.8rem; }
.kv-media-dropzone:hover { border-color: var(--accent-color, #3273dc); background: rgba(50,115,220,0.03); }
.kv-media-preview {
    position: relative;
    margin-bottom: 1rem;
    text-align: center;
}
.kv-media-img { max-height: 180px; border-radius: 10px; }
/* Redaktori pildi-meedia ümbris — võimaldab mosaiigi-overlay'l katta täpselt pildi alal */
.kv-media-img-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
    border-radius: 10px;
    overflow: hidden;
    max-width: 100%;
}
.kv-media-img-wrap .kv-media-img {
    display: block;
}
/* Reveal-toggle ja ruudustiku-valija pildi all */
.kv-reveal-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary, rgba(0,0,0,0.04));
    border-radius: 8px;
}
.kv-reveal-grid-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.kv-reveal-grid-select .label { margin-bottom: 0; }
/* Redaktoris kuvatav mosaiigi-indikaator pildi peal — annab kasutajale visuaalselt
   teada, et reveal-efekt on sisse lülitatud. Ei animeeri, kasutaja näeb tile-võret
   poolläbipaistvalt pildi peal. */
.kv-reveal-grid-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    pointer-events: none;
    z-index: 2;
}
.kv-reveal-grid-overlay > div {
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(20, 20, 30, 0.18);
}
[data-theme="dark"] .kv-reveal-grid-overlay > div {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.25);
}
/* Pildi kärpimise modaal */
.kv-crop-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.kv-crop-modal-content {
    background: var(--bg-card, #1a1a2e);
    border-radius: 12px;
    max-width: 95vw;
    max-height: 90vh;
    width: 1000px;
    display: flex;
    flex-direction: column;
    color: var(--text-primary, #fff);
}
.kv-crop-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.kv-crop-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}
.kv-crop-modal-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}
.kv-crop-modal-body {
    flex: 1;
    overflow: hidden;
    padding: 1rem;
    min-height: 400px;
    max-height: 70vh;
    background: #000;
}
.kv-crop-modal-body img {
    display: block;
    max-width: 100%;
}
.kv-crop-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.kv-media-actions {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.kv-media-btn {
    border: 1px solid var(--border-color, #ddd);
    background: var(--bg-secondary, #f5f5f5);
    color: var(--text-secondary, #666);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
}
.kv-media-btn:hover { border-color: #888; }
.kv-media-btn-del:hover { color: #e53935; border-color: #e53935; }

/* Colorful option cards */
.kv-type-answers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}
@media screen and (max-width: 768px) {
    .kv-type-answers-grid { grid-template-columns: 1fr; }
}
.kv-type-answer-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.kv-type-answer-item .input {
    flex: 1;
    min-width: 0;
}
.kv-type-answer-item .delete {
    flex-shrink: 0;
}
.hotspot-image-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
}
.hotspot-img {
    max-height: 300px;
    border-radius: 8px;
    cursor: crosshair;
    display: block;
}
.hotspot-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    border: 3px solid #e53935;
    border-radius: 50%;
    background: rgba(229, 57, 53, 0.15);
    pointer-events: auto;
    cursor: move;
    box-sizing: border-box;
    /* Vaikimisi ring — aspect-ratio: 1 hoiab kõrguse võrdseks laiusega */
    aspect-ratio: 1;
}
/* Per-sihtala kuju klassid (inline JS-ist) — ristkülikul kõrgus inline style'ist */
.hotspot-marker.is-shape-rectangle {
    border-radius: 6px;
    aspect-ratio: auto;
}
/* Tagasiühilduvus vana CSS-class'iga (kogu küsimuse ühtne kuju) */
.hotspot-shape-rectangle .hotspot-marker:not(.is-shape-circle) {
    border-radius: 6px;
    aspect-ratio: auto;
}
.hotspot-marker-delete {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e53935;
    color: #fff;
    border: 2px solid #fff;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 3;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    pointer-events: auto;
}
.hotspot-marker-delete i {
    line-height: 1;
    display: block;
}
.hotspot-marker-delete:hover {
    background: #c62828;
}
/* Vertikaalne resize-handle (ainult ristkülikul) */
.hotspot-resize-y {
    cursor: ns-resize !important;
}
.hotspot-resize-handle {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: #fff;
    border: 2px solid #e53935;
    border-radius: 50%;
    cursor: ew-resize;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.hotspot-resize-handle:hover {
    background: #e53935;
}
.kv-type-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}
@media screen and (max-width: 600px) {
    .kv-type-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }
    .kv-type-footer > .button { align-self: flex-start; }
    .kv-type-footer .kv-toggle-label { white-space: normal; }
}
.kv-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}
.kv-toggle input {
    display: none;
}
.kv-toggle-switch {
    position: relative;
    width: 36px;
    height: 20px;
    background: var(--border-color, #ccc);
    border-radius: 10px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.kv-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.kv-toggle input:checked + .kv-toggle-switch {
    background: var(--accent-color, #3273dc);
}
.kv-toggle input:checked + .kv-toggle-switch::after {
    transform: translateX(16px);
}
.kv-toggle-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary, #666);
}
.kv-settings-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-light, #f0f0f0);
}
.kv-settings-option-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.kv-settings-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-hover, #f5f5f5);
    color: var(--text-secondary, #666);
    font-size: 0.9rem;
    flex-shrink: 0;
}
.kv-settings-option-info strong {
    font-size: 0.9rem;
    color: var(--text-primary, #333);
}
.kv-settings-option-info p {
    margin: 0;
}

/* Kompaktne "Alusta mängu" modaal — mahub paremini fullhd ekraanile */
.kv-settings-modal .bank-modal-header {
    padding: 0.6rem 1.25rem;
}
.kv-settings-modal .bank-modal-body {
    padding: 0.4rem 1.25rem;
}
.kv-settings-modal .bank-modal-footer {
    padding: 0.6rem 1.25rem;
}
.kv-settings-modal .kv-settings-option {
    padding: 0.35rem 0;
    gap: 0.75rem;
}
.kv-settings-modal .kv-settings-option-icon {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
    border-radius: 6px;
}
.kv-settings-modal .kv-settings-option-info {
    gap: 0.6rem;
}
.kv-settings-modal .kv-settings-option-info strong {
    font-size: 0.875rem;
    line-height: 1.2;
}
.kv-settings-modal .kv-settings-option-info p {
    font-size: 0.75rem;
    line-height: 1.25;
    margin-top: 0.1rem;
}
.kv-settings-modal #teamNamesDiv {
    margin-top: 0.25rem !important;
    margin-bottom: 0.5rem !important;
}
.kv-settings-modal #teamNamesDiv .field {
    margin-bottom: 0.25rem !important;
}
[data-theme="dark"] .kv-settings-option {
    border-bottom-color: #333;
}
[data-theme="dark"] .kv-settings-option-icon {
    background: var(--bg-secondary, #2a2a3e);
}
.kv-settings-info-btn {
    color: var(--text-muted, #aaa);
    cursor: pointer;
    margin-left: 0.25rem;
    font-size: 0.85em;
}
.kv-settings-info-btn:hover {
    color: var(--accent-color, #3273dc);
}
.kv-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
@media screen and (max-width: 600px) {
    .kv-options-grid { grid-template-columns: 1fr; }
}
.kv-option-card {
    background: var(--bg-secondary, #f5f5f5);
    border: 2px solid var(--border-color, #e0e0e0);
    border-left: 5px solid var(--opt-color, #888);
    border-radius: 10px;
    padding: 0.5rem 0.65rem;
    color: var(--text-primary, #333);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: border-color 0.15s;
}
.kv-option-card.is-correct-card {
    border-color: #4caf50;
    border-left-color: #4caf50;
    background: #f1f8f1;
}
[data-theme="dark"] .kv-option-card {
    background: var(--bg-secondary, #2a2a3e);
}
[data-theme="dark"] .kv-option-card.is-correct-card {
    background: #1b3a1b;
}
.kv-option-top {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.kv-option-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    font-size: 0.85rem;
    font-weight: 800;
    flex-shrink: 0;
}
.kv-option-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary, #333);
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    min-width: 0;
}
.kv-option-input::placeholder { color: var(--text-muted, #aaa); }
.kv-option-input:focus { background: rgba(0,0,0,0.04); }
.kv-option-correct {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}
.kv-option-correct input { display: none; }
.kv-option-correct-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 2px solid var(--border-color, #ccc);
    border-radius: 6px;
    color: transparent;
    font-size: 0.6rem;
    transition: all 0.15s;
}
.kv-option-correct input:checked + .kv-option-correct-box {
    background: #4caf50;
    border-color: #4caf50;
    color: #fff;
}
.kv-option-correct-box:hover {
    border-color: #4caf50;
}
.kv-option-act-btn {
    border: none;
    background: rgba(0,0,0,0.06);
    color: var(--text-muted, #999);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: background 0.15s, color 0.15s;
}
.kv-option-act-btn:hover { background: rgba(0,0,0,0.1); color: var(--text-primary, #333); }
.kv-option-thumb {
    height: 26px;
    border-radius: 4px;
    cursor: pointer;
}
@media screen and (max-width: 600px) {
    .kv-option-card { padding: 0.4rem 0.45rem; }
    .kv-option-top { gap: 0.25rem; }
    .kv-option-badge { width: 24px; height: 24px; font-size: 0.75rem; }
    .kv-option-correct-box { width: 22px; height: 22px; }
    .kv-option-act-btn { width: 22px; height: 22px; font-size: 0.65rem; }
    .kv-option-input { padding: 0.2rem 0.3rem; font-size: 0.85rem; }
    .kv-option-thumb { height: 22px; }
}

/* Custom TF toggle buttons */
.kv-tf-group {
    display: flex;
    gap: 0.5rem;
}
.kv-tf-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem;
    border: 3px solid var(--border-color, #ddd);
    border-radius: 12px;
    background: var(--bg-secondary, #f5f5f5);
    color: var(--text-primary, #333);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.kv-tf-btn:hover { border-color: #888; }
.kv-tf-btn.is-selected {
    border-color: #4caf50;
    background: #e8f5e9;
    color: #2e7d32;
}
[data-theme="dark"] .kv-tf-btn { background: var(--bg-secondary, #2a2a3e); }
[data-theme="dark"] .kv-tf-btn.is-selected { background: #1b3a1b; color: #66bb6a; }

/* Time & Points inline */
.kv-settings-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light, #f0f0f0);
    flex-wrap: wrap;
}
.kv-setting-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
}
.kv-setting-item i { font-size: 0.85rem; }
.kv-setting-item select {
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    padding: 0.4rem 1.8rem 0.4rem 0.6rem;
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--bg-secondary, #f5f5f5);
    color: var(--text-primary, #333);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}
.kv-setting-item select:hover { border-color: #888; }
.kv-setting-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    font-size: 0.9rem;
    background: var(--bg-secondary, #f5f5f5);
    color: var(--text-secondary, #666);
    cursor: pointer;
    transition: all 0.15s;
}
.kv-setting-btn:hover { border-color: var(--accent-color, #3273dc); color: var(--accent-color, #3273dc); }

/* ==========================================
   HOST PAGE — PROJECTOR VIEW
   ========================================== */
.host-screen {
    min-height: calc(100vh - 52px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
    position: relative;
}

/* Lobby */
.host-lobby-new {
    width: 100%;
    height: calc(100vh - 3.25rem);
    display: flex;
    flex-direction: column;
}
.host-lobby-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2rem;
    background: var(--bg-card, #fff);
    border-bottom: 1px solid var(--border-color, #eee);
}
.host-lobby-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary, #333);
    margin: 0;
}
.host-lobby-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.host-lobby-player-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
}
.host-lobby-toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--bg-hover, #f0f0f0);
    color: var(--text-secondary, #666);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s;
}
.host-lobby-toolbar-btn:hover {
    background: var(--border-color, #ddd);
}
[data-theme="dark"] .host-lobby-toolbar-btn {
    background: rgba(255,255,255,0.1);
    color: #ccc;
}
[data-theme="dark"] .host-lobby-toolbar-btn:hover {
    background: rgba(255,255,255,0.2);
}
.host-lobby-body {
    flex: 1;
    display: flex;
    min-height: 0;
}
.host-lobby-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 2rem;
    background: #2c3e6b;
    color: #fff;
    overflow: hidden;
}
.host-lobby-code-card {
    text-align: center;
}
.host-lobby-domain {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary, #333);
    line-height: 1;
    margin-bottom: 0.2rem;
}
.host-lobby-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted, #999);
    margin-bottom: 0.5rem;
}
.host-lobby-left .player-tags {
    scrollbar-width: none;
}
.host-lobby-left .player-tags::-webkit-scrollbar {
    display: none;
}
.host-lobby-start-btn {
    font-size: 1.3rem !important;
    padding: 0.75rem 2.5rem !important;
    border-radius: 2rem !important;
}
.host-lobby-right {
    width: 30%;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-primary, #f5f5f5);
}
.host-lobby-qr {
    background: #fff;
    padding: 1rem;
    border-radius: 12px;
}
.host-lobby-qr svg {
    width: 260px;
    height: 260px;
    display: block;
}
[data-theme="dark"] .host-lobby-right {
    background: var(--bg-secondary, #1a1a2e);
}
[data-theme="dark"] .host-lobby-topbar {
    border-bottom-color: #333;
}
.host-code {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: var(--text-primary, #333);
    font-family: 'Inter', monospace;
    -webkit-text-stroke: 1px currentColor;
    line-height: 1;
    margin: 0.3rem 0;
}
.player-tags {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 40px;
    overflow-y: auto;
    overflow-x: hidden;
}
.player-bubble {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.9rem;
    border-radius: 2rem;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: bubbleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.player-bubble.is-new {
    animation: bubblePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.player-bubble:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    z-index: 10;
}
.player-bubble-name {
    white-space: nowrap;
}
.player-bubble-kick {
    display: none;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    color: #fff;
    font-size: 0.65rem;
    cursor: pointer;
    margin-left: 0.1rem;
    transition: background 0.15s;
}
.player-bubble:hover .player-bubble-kick {
    display: flex;
}
.player-bubble-kick:hover {
    background: rgba(255,255,255,0.5);
}
@keyframes bubbleIn {
    0% { opacity: 0; transform: scale(0.3) translateY(0); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes bubblePop {
    0% { opacity: 0; transform: scale(0) translateY(0); }
    60% { opacity: 1; transform: scale(1.2); }
    100% { transform: scale(1); }
}
.player-tag {
    animation: fadeInUp 0.3s ease;
}
.player-tags-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.player-tags-empty i {
    font-size: 2.5rem;
}
.player-tags-empty p {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 500;
}

/* Küsimus — uus paigutus */
.host-q-screen {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0 !important;
}
.host-q-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.5rem 0.4rem;
    flex-shrink: 0;
    position: relative;
}
.host-q-num, .host-q-answered {
    font-size: clamp(1rem, 1.1vw, 2.4rem);
    color: rgba(255,255,255,0.5);
    min-width: 120px;
}
.host-q-num { text-align: left; }
.host-q-answered { text-align: right; }
.host-q-num strong, .host-q-answered strong {
    font-size: clamp(1.2rem, 1.3vw, 2.8rem);
    color: #fff;
}
.host-q-topbar-left {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    min-width: 120px;
}
.host-q-join-code {
    font-size: clamp(0.8rem, 0.9vw, 2rem);
    color: rgba(255,255,255,0.35);
    cursor: pointer;
}
.host-q-join-code:hover {
    color: rgba(255,255,255,0.7);
}
.host-q-time {
    font-size: clamp(1.5rem, 1.8vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.05em;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.host-q-timerbar {
    height: 6px;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
    direction: rtl;
}
.host-q-timerbar-fill {
    height: 100%;
    background: #00d1b2;
    transition: width 0.2s linear;
    width: 100%;
    margin-left: auto;
}
.host-q-timerbar-fill.is-warning { background: #e21b3c; }
.host-q-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.host-q-controls {
    display: flex;
    gap: 0.3rem;
    opacity: 0.6;
    transition: opacity 0.2s;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.host-q-controls:hover { opacity: 1; }
/* Kitsamas aknas (<1200px) — peida tsentreeritud "X õiget" loendur, et nuppude ja loenduri vahel poleks kollisiooni */
@media (max-width: 1200px) {
    .host-q-controls {
        gap: 0.15rem;
    }
    #correctCount {
        position: static !important;
        transform: none !important;
        display: block;
        order: 99;
        flex-basis: 100%;
        text-align: right !important;
        font-size: 0.85rem;
        margin-top: 0.25rem;
    }
}
.host-q-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 2rem 1rem;
    animation: questionFadeIn 0.4s ease;
    overflow-y: auto;
    /* clamp: FullHD ~92vw (1766px), 4K viewport täidab kuni 3500px.
       Suurem vw + cap tagab, et ka pikkade vastusevariantidega ei jää horisontaalset ruumi kasutamata. */
    max-width: clamp(1200px, 92vw, 3500px);
    width: 100%;
    margin: 0 auto;
}
.host-q-text {
    /* clamp skaleerub sujuvalt FullHD-st 4K-ni, sõltumata DPR/skaleerimisest.
       Tõstetud min ja vw — FullHD-l ~67px (varem 61px), 4K-l 9rem cap. */
    font-size: clamp(2.8rem, 3.5vw, 9rem);
    font-weight: 800;
    text-align: center;
    color: #fff;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}
.host-q-media {
    text-align: center;
    margin-bottom: 1.5rem;
    max-width: 100%;
}
/* Tekstisisestusega küsimusel on ekraanil ainult pilt + väike vihje — pilt võib olla suurem */
.host-q-content.is-type-input .host-q-media .host-media-img {
    max-height: 70vh;
    max-width: 90vw;
}
.host-q-media .host-media-img {
    max-height: 35vh;
    width: auto;
    max-width: 70%;
    min-height: 150px;
    border-radius: 12px;
    object-fit: contain;
    cursor: pointer;
}
.host-q-media .host-media-audio {
    display: none;
}
.host-audio-player {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 1vw, 2rem);
    background: rgba(255,255,255,0.08);
    border-radius: 2rem;
    padding: clamp(0.6rem, 0.8vw, 1.6rem) clamp(1.2rem, 1.5vw, 3rem);
    max-width: clamp(450px, 40vw, 1000px);
    margin: 0 auto;
}
.host-audio-btn {
    width: clamp(40px, 4vw, 90px);
    height: clamp(40px, 4vw, 90px);
    border-radius: 50%;
    border: none;
    background: #00d1b2;
    color: #fff;
    font-size: clamp(1rem, 1.2vw, 2.2rem);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}
.host-audio-btn:hover { background: #00b89c; }
.host-audio-progress {
    flex: 1;
    height: clamp(6px, 0.5vw, 12px);
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}
.host-audio-fill {
    height: 100%;
    background: #00d1b2;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}
.host-audio-time {
    font-size: clamp(0.85rem, 1vw, 2rem);
    color: rgba(255,255,255,0.5);
    min-width: clamp(35px, 3vw, 70px);
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.host-delay-open-btn {
    font-size: clamp(0.85rem, 1.1vw, 2rem) !important;
    padding: clamp(0.4rem, 0.6vw, 1.2rem) clamp(0.8rem, 1.2vw, 2.4rem) !important;
    height: auto !important;
}
.host-q-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    width: 100%;
    /* Skaleerub sujuvalt FullHD-st 4K-ni ilma fikseerituks jäämata.
       FullHD (1920px): 70vw = 1344px. 4K (3840px): cap 3000px (~78%). */
    max-width: clamp(700px, 70vw, 3000px);
    margin-left: auto;
    margin-right: auto;
}
/* Infoslaid — tekst keskel */
.host-q-content.is-slide {
    justify-content: center;
}
.host-q-content.is-slide .host-q-text {
    font-size: clamp(3rem, 3.2vw, 8.5rem);
    margin-bottom: 2rem;
}
/* Ilma meediat — suuremad valikud */
.no-media .host-q-text {
    font-size: clamp(2.8rem, 3vw, 9rem);
}
/* Ilma meediata küsimustel — küsimus on ülemise poole keskel,
   valikud (sh tulemuste vaates tulbad+kaardid) alumise poole keskel.
   space-around jaotab vaba ala võrdselt: 1/4 ülevalt, 1/2 keskel, 1/4 all.
   Slide on eraldi (is-slide), seda ei mõjuta. */
.host-q-content.no-media:not(.is-slide) {
    justify-content: space-around;
}
.host-q-content.no-media:not(.is-slide) .host-q-text {
    margin-bottom: 0;
}
.host-q-options.host-q-options-single {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    width: 100%;
}
/* Hotspot sisaldab pilti — vajab laiemat konteinerit, et pilt ei jääks ebaproportsionaalselt kitsaks 4K-l */
.host-q-options.host-q-options-single:has(.host-hotspot-container) {
    max-width: clamp(900px, 70vw, 2400px);
}
/* Order küsimuse vaates parent piiraks 700px-le, aga pikkade tekstidega on vaja laiemat
   konteinerit (eriti 4K-l). Sama loogika nagu hotspot exception. */
.host-q-options.host-q-options-single:has(.host-order-items) {
    max-width: clamp(700px, 65vw, 2400px);
}
/* Match küsimuse vaates parent piiraks samuti 700px-le — pikkade kirjeldustega
   (8 paari, kus parem pool võib olla 4-5 sõna) on vaja laiemat konteinerit.
   Sama loogika nagu hotspot/order exception. */
.host-q-options.host-q-options-single:has(.host-match-display) {
    max-width: clamp(700px, 70vw, 2800px);
}
/* Küsimuse vaates (parent host-q-options-single) order-konteineri laius järgib sisu —
   lühikesed valikud → kitsamad kastid, pikemad → laiemad. Reveal-vaates (parent host-content-area)
   jääb täis-laiusele, et statistika oleks võrdne. */
.host-q-options-single .host-order-items {
    width: fit-content;
    margin: 0 auto;
}
.host-q-options-single .host-order-item {
    width: auto;
    min-width: clamp(280px, 24vw, 600px);
}
.host-q-options.host-q-options-single .host-options-grid {
    width: 100%;
}
.no-media .host-q-options {
    gap: 1rem;
}
.no-media .host-q-options .host-option {
    min-height: clamp(100px, 7vw, 180px);
    font-size: clamp(1.6rem, 1.8vw, 3.2rem);
    padding: clamp(1.5rem, 1.8vw, 3rem) clamp(1.5rem, 1.8vw, 3rem);
}
.no-media .host-q-options .host-option-letter {
    width: clamp(48px, 3.5vw, 96px);
    height: clamp(48px, 3.5vw, 96px);
    font-size: clamp(1.2rem, 1.4vw, 2.4rem);
}
/* Pikkade vastusevariantide korral — vähenda fonti ja paddingut, et tekst mahuks ekraanile.
   Klass lisatakse JS-ist, kui mõni valik on pikem kui 50 (long) või 120 (very-long) tähemärki.
   Värskendatud: leebem vähendus, et tekst jääks loetavaks. */
.has-long-options.no-media .host-q-options .host-option,
.has-long-options:not(.no-media) .host-q-options .host-option {
    min-height: auto;
    font-size: clamp(1.3rem, 1.5vw, 2.6rem);
    padding: clamp(1rem, 1.2vw, 2.2rem) clamp(1.2rem, 1.4vw, 2.6rem);
}
.has-long-options .host-q-options .host-option-letter {
    width: clamp(40px, 2.8vw, 70px);
    height: clamp(40px, 2.8vw, 70px);
    font-size: clamp(1rem, 1.2vw, 2rem);
}
.has-very-long-options.no-media .host-q-options .host-option,
.has-very-long-options:not(.no-media) .host-q-options .host-option {
    min-height: auto;
    font-size: clamp(1.1rem, 1.25vw, 2.2rem);
    padding: clamp(0.7rem, 0.9vw, 1.8rem) clamp(1rem, 1.2vw, 2.2rem);
    line-height: 1.35;
}
.has-very-long-options .host-q-options .host-option-letter {
    width: clamp(34px, 2.4vw, 60px);
    height: clamp(34px, 2.4vw, 60px);
    font-size: clamp(0.9rem, 1.05vw, 1.7rem);
}
/* Meediaga — kompaktsemad valikud ja väiksem tekst */
.host-q-content:not(.no-media) .host-q-text {
    font-size: clamp(1.8rem, 2vw, 4rem);
    margin-bottom: 0.75rem;
}
.host-q-content:not(.no-media) .host-q-options .host-option {
    min-height: auto;
    padding: 0.8rem 1rem;
    font-size: clamp(1.1rem, 1.3vw, 2.4rem);
}
.host-q-content:not(.no-media) .host-q-options .host-option-letter {
    width: clamp(36px, 2.5vw, 64px);
    height: clamp(36px, 2.5vw, 64px);
    font-size: clamp(0.9rem, 1vw, 1.8rem);
}
.host-q-content:not(.no-media) .host-q-media {
    margin-bottom: 1rem;
}
.host-results-bottom-bar {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    flex-shrink: 0;
}

/* Tulemuste vaade */
#resultsScreen .host-q-content {
    justify-content: center;
    overflow-y: auto;
}
#resultsScreen .host-q-media {
    display: none !important;
}
#resultsScreen .host-q-text {
    font-size: clamp(2.5rem, 3.2vw, 8rem);
    margin-bottom: clamp(1.5rem, 2vw, 4rem);
}
#resultsScreen .host-q-options .host-option {
    min-height: clamp(60px, 5vw, 120px);
    font-size: clamp(1.2rem, 1.5vw, 2.8rem);
    padding: clamp(0.8rem, 1vw, 1.8rem) clamp(1rem, 1.2vw, 2rem);
}
:fullscreen #resultsScreen .host-q-content,
:-webkit-full-screen #resultsScreen .host-q-content {
    overflow-y: auto !important;
}

.finished-fullscreen-btn {
    position: absolute;
    top: 0.75rem;
    right: 1.5rem;
    z-index: 5;
}
/* 4K — täisekraani nupp suurem, et oleks proportsionaalne mängu ajal kuvatud nupuga */
@media screen and (min-width: 2400px) {
    .finished-fullscreen-btn .button {
        width: 3.4rem;
        height: 3.4rem;
        padding: 0;
        font-size: 1.2rem;
    }
    .finished-fullscreen-btn .button .icon {
        font-size: 1.5rem;
        width: 1.5rem;
        height: 1.5rem;
    }
}
@media screen and (min-width: 3200px) {
    .finished-fullscreen-btn .button {
        width: 4rem;
        height: 4rem;
    }
    .finished-fullscreen-btn .button .icon {
        font-size: 1.9rem;
        width: 1.9rem;
        height: 1.9rem;
    }
}
@media screen and (min-resolution: 1.5dppx) and (min-width: 1600px) and (max-width: 2399.99px) {
    .finished-fullscreen-btn .button {
        width: 3.4rem;
        height: 3.4rem;
        font-size: 1.2rem;
    }
    .finished-fullscreen-btn .button .icon {
        font-size: 1.5rem;
        width: 1.5rem;
        height: 1.5rem;
    }
}
/* ==========================================
   Mängijate paneel — mängu ajal kick-nupud
   ========================================== */
.host-players-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}
.host-players-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}
.host-players-modal-content {
    position: relative;
    background: #1e2340;
    color: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.host-players-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.host-players-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}
.host-players-modal-close {
    background: transparent;
    color: #fff;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0.7;
    padding: 0.25rem 0.5rem;
}
.host-players-modal-close:hover {
    opacity: 1;
}
.host-players-modal-list {
    overflow-y: auto;
    flex: 1;
}
.host-players-modal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.4rem;
    background: rgba(255,255,255,0.05);
}
.host-players-modal-item-name {
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}
.host-players-modal-item-name:hover {
    color: #00d1b2;
    text-decoration: underline;
}
.host-players-modal-item-score {
    color: #00d1b2;
    margin: 0 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.host-players-modal-rename {
    background: rgba(0, 209, 178, 0.15);
    color: #00d1b2;
    border: 1px solid rgba(0, 209, 178, 0.4);
    border-radius: 6px;
    padding: 0.35rem 0.55rem;
    margin-right: 0.4rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s;
}
.host-players-modal-rename:hover {
    background: rgba(0, 209, 178, 0.4);
    color: #fff;
}
.host-players-modal-kick {
    background: rgba(226, 27, 60, 0.2);
    color: #ff8099;
    border: 1px solid rgba(226, 27, 60, 0.4);
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s;
}
.host-players-modal-kick:hover {
    background: rgba(226, 27, 60, 0.6);
    color: #fff;
}
.host-players-modal-empty {
    text-align: center;
    opacity: 0.6;
    padding: 2rem 1rem;
}
/* Nime muutmise dialoog */
.kv-rename-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}
.kv-rename-box {
    background: var(--bg-card, #1a2544);
    border-radius: 12px;
    padding: 2rem;
    min-width: 320px;
    max-width: 90vw;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    color: var(--text-primary, #fff);
}
.kv-rename-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
}
.kv-rename-input {
    width: 100%;
    padding: 0.6rem 0.9rem;
    font-size: 1.1rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: var(--text-primary, #fff);
    margin-bottom: 0.5rem;
    outline: none;
}
.kv-rename-input:focus {
    border-color: #00d1b2;
    background: rgba(255,255,255,0.12);
}
.kv-rename-error {
    color: #ff8099;
    font-size: 0.9rem;
    min-height: 1.2rem;
    margin-bottom: 0.75rem;
}
.kv-rename-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: center;
}
.kv-rename-actions-right {
    display: flex;
    gap: 0.5rem;
}
.kv-rename-actions .button {
    height: 2.5em;
    min-height: 2.5em;
    max-height: 2.5em;
    font-size: 1rem;
    padding: 0 1em;
    line-height: 1;
}
.kv-rename-actions .button .icon {
    height: 1em;
    width: 1em;
    margin-right: 0.3em !important;
}
.kv-rename-actions .button .icon:first-child:not(:last-child) {
    margin-left: -0.2em;
}
#finishedScreen {
    overflow-y: auto !important;
    align-items: flex-start !important;
}
.host-finished-container {
    width: 100%;
    /* clamp: FullHD ~800px, 4K kuni 1400px — 4K-l rohkem ruumi nimekirjale */
    max-width: clamp(800px, 70vw, 1400px);
    margin: 0 auto;
    /* Padding-top — õhku pealkirja kohal, et see ei oleks topbar'i taga kinni */
    padding: clamp(3rem, 6vh, 6rem) 1.5rem clamp(0.5rem, 1vh, 1.5rem);
}
.host-finished-container > h2 {
    margin-bottom: clamp(0.5rem, 1.5vh, 2rem) !important;
}
.host-finished-podium-area {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    /* min-height vähendatud — varem oli liiga palju tühja ruumi reveal-nupu kohal */
    min-height: clamp(140px, 16vh, 240px);
    margin-bottom: clamp(0.3rem, 0.6vh, 1rem);
}
.host-finished-reveal-row {
    display: flex;
    justify-content: center;
    margin-bottom: clamp(0.5rem, 1vh, 1.5rem);
    min-height: 0;
}
.host-finished-list {
    max-height: clamp(180px, 32vh, 600px);
    overflow-y: auto;
    /* Kitsam nimekiri — nimi ja punktid jäävad visuaalselt lähemale, lihtsam kokku viia */
    max-width: clamp(420px, 38vw, 800px);
    margin: 0 auto;
    /* Vahed kohtade vahel — mitte enam kokku surutud */
    display: flex;
    flex-direction: column;
    gap: clamp(0.3rem, 0.4vh, 0.8rem);
    padding: 0.25rem;
}
/* Lõpptulemuste nimekirjas — kompaktsemad read, et 100 mängijat scrollikalt mahuks
   (max-height piirab listi enda, aga rea kõrgust vähendame, et rohkem oleks korraga näha). */
.host-finished-list .lb-entry {
    padding: clamp(0.5rem, 0.7vw, 1.2rem) clamp(1rem, 1.2vw, 2rem);
}
.host-finished-list .lb-rank {
    font-size: clamp(1.2rem, 1.4vw, 2.5rem);
}
.host-finished-list .lb-name {
    font-size: clamp(1rem, 1.2vw, 2.2rem);
    /* Pikad nimed kärbitakse kolme punktiga, et need ei surutaks punktisummat */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.host-finished-list .lb-score {
    font-size: clamp(1.1rem, 1.3vw, 2.3rem);
    flex-shrink: 0;
}
/* Tume scrollbar */
.host-finished-list::-webkit-scrollbar {
    width: 8px;
}
.host-finished-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}
.host-finished-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}
.host-finished-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}
.host-finished-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) rgba(255,255,255,0.05);
}

/* Timer ring (peidetud, JS ühilduvuse jaoks) */
.host-timer {
    position: relative;
    width: 80px;
    height: 80px;
    display: none;
}
.host-timer svg {
    width: 80px;
    height: 80px;
    transform: rotate(-90deg);
}
.timer-bg {
    fill: none;
    stroke: #ddd;
    stroke-width: 4;
}
.timer-progress {
    fill: none;
    stroke: #00d1b2;
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}
.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #333);
}

/* Valikuplokid */
.host-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 0 1rem;
}
.host-option {
    display: flex;
    align-items: center;
    padding: 1.1rem 1.3rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    color: #fff;
    border: 2px solid var(--option-color);
    font-size: 1.3rem;
    font-weight: 600;
    min-height: 70px;
    position: relative;
    gap: 0.8rem;
    transition: opacity 0.3s, transform 0.3s;
}
.host-option-letter {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--option-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.host-option-text {
    flex: 1;
}
.host-option-count {
    font-size: clamp(1.2rem, 1.4vw, 2.6rem);
    margin-left: 1rem;
    opacity: 0.8;
    color: inherit;
}
/* Anna count'ile ruumi õige vastuse puhul, et absolute check ei kataks.
   Lisaks padding-right kogu valikuteres, et flex-tekst ei venitatuks check'i alla.
   !important on vajalik, sest mitu kahoot/has-very-long-options reeglit kasutavad
   padding shorthand'i, mis varem üle kirjutas selle. */
.host-option-result.is-correct-answer {
    padding-right: clamp(2.5rem, 2.5vw, 4.5rem) !important;
}
.host-option-result.is-correct-answer .host-option-count {
    margin-right: 0.5rem;
}
.host-option-check {
    font-size: 1.2rem;
    color: #48c78e;
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Tulemuste valikud — vana stiil mitte-choice tüüpidele */
.host-option-result.is-wrong-answer {
    opacity: 0.35;
}
.host-option-result.is-correct-answer {
    border-color: #48c78e;
    background: rgba(72, 199, 142, 0.12);
}

/* Kahoot-stiilis tulemused (choice/tf) */
.host-results-kahoot {
    width: 100%;
    /* Ühtlustatud küsimuse vaate (.host-q-options) laiusega, et tulemuste ja
       küsimuse vaade oleks sama proportsiooniga FullHD-st 4K-ni. */
    max-width: clamp(1000px, 70vw, 3000px);
}
/* Multi-select jaotus kategooriatesse */
.host-multi-breakdown {
    display: flex;
    gap: clamp(0.75rem, 1vw, 2rem);
    margin-top: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: clamp(600px, 70vw, 3000px);
    margin-left: auto;
    margin-right: auto;
}
.host-multi-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    padding: clamp(0.75rem, 1vw, 2rem) clamp(1.25rem, 1.5vw, 3rem);
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    min-width: 150px;
    border-left: 4px solid transparent;
}
.host-multi-cat-label {
    font-size: clamp(0.85rem, 1vw, 2rem);
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}
.host-multi-cat-val {
    font-size: clamp(2rem, 2.5vw, 5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-top: 0.25rem;
}
.host-multi-cat.is-full { border-left-color: #26890c; }
.host-multi-cat.is-full .host-multi-cat-label i { color: #48c78e; }
.host-multi-cat.is-partial { border-left-color: #d89e00; }
.host-multi-cat.is-partial .host-multi-cat-label i { color: #ffd166; }
.host-multi-cat.is-wrong { border-left-color: #e21b3c; }
.host-multi-cat.is-wrong .host-multi-cat-label i { color: #ff6b7a; }
.host-multi-cat.is-none { border-left-color: rgba(255,255,255,0.25); }
.host-multi-cat.is-none .host-multi-cat-label i { color: rgba(255,255,255,0.5); }
.host-results-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(0.75rem, 1vw, 2rem);
    height: clamp(150px, 22vh, 480px);
    margin-bottom: 1rem;
    /* Ülemine padding hoiab ruumi tulba kohal olevale numbrile (bottom: 100% fill-ist) */
    padding: clamp(1.6rem, 2vw, 3.2rem) 1rem 0;
}
.host-results-bar-col {
    flex: 1;
    max-width: clamp(100px, 9vw, 200px);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}
.host-results-bar-col.is-wrong-bar {
    opacity: 0.35;
}
.host-results-bar-value {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: clamp(0.2rem, 0.3vw, 0.6rem);
    font-size: clamp(0.95rem, 1.1vw, 2.2rem);
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}
.host-results-bar-track {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
}
.host-results-bar-fill {
    width: 100%;
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.5s ease;
    position: relative;
}
.host-results-bar-fill .bar-letter {
    position: absolute;
    bottom: clamp(4px, 0.4vw, 10px);
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(0.75rem, 0.9vw, 1.6rem);
    font-weight: 800;
    color: rgba(255,255,255,0.5);
}
.host-results-bar-col:not(.is-wrong-bar) .bar-letter {
    color: #fff;
}
.host-results-kahoot .host-q-options {
    margin-top: 0.5rem;
    gap: clamp(0.4rem, 0.6vw, 1.2rem);
    max-width: 100%;
    width: 100%;
}
.host-results-kahoot .host-q-options .host-option {
    min-height: auto;
    padding: clamp(0.5rem, 0.7vw, 1.4rem) clamp(0.75rem, 1vw, 2rem);
    font-size: clamp(1rem, 1.3vw, 2.4rem);
}
/* Õige valiku puhul jäta paremale ruumi absolute-positsionil olevale check-ikoonile.
   Spetsiifilisem kui üldine `host-option-result.is-correct-answer` reegel — vaja, et
   kahoot-stiilis tulemustes see baasi padding'ut üle kirjutaks. */
.host-results-kahoot .host-q-options .host-option-result.is-correct-answer {
    padding-right: clamp(2.5rem, 2.5vw, 4.5rem);
}
.host-results-kahoot .host-q-options .host-option-letter {
    width: clamp(32px, 2.5vw, 60px);
    height: clamp(32px, 2.5vw, 60px);
    font-size: clamp(0.85rem, 1vw, 1.8rem);
}

/* Content area (non-grid layout for special question types) */
.host-content-area {
    padding: 0 1rem;
    width: 100%;
}

/* ==========================================
   HOST — MEEDIA
   ========================================== */
.host-question-media {
    text-align: center;
    margin-bottom: 1rem;
}
.host-media-img {
    max-height: 200px;
    max-width: 300px;
    border-radius: 12px;
    object-fit: contain;
}
.host-media-audio {
    width: 100%;
    max-width: 500px;
    min-height: 40px;
}
.host-question-body:has(.host-media-audio) {
    flex-direction: column;
}
.host-result-media {
    text-align: center;
}

/* ==========================================
   HOST — SPETSIAALVIIP (type, order, slider)
   ========================================== */
.host-special-prompt {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--text-secondary, #888);
    text-align: left;
}
.host-special-prompt i {
    opacity: 0.5;
    flex-shrink: 0;
}
.host-special-prompt p {
    font-size: 1.3rem;
    margin: 0;
}

/* ==========================================
   HOST — ORDER (Järjestamine)
   ========================================== */
.host-order-items {
    display: flex;
    flex-direction: column;
    gap: clamp(0.6rem, 0.7vw, 1.4rem);
    width: 100%;
    max-width: clamp(600px, 50vw, 1200px);
    margin: 0 auto;
    padding: 0 1rem;
}
.host-order-item {
    display: flex;
    align-items: center;
    padding: clamp(1rem, 1.1vw, 2.2rem) clamp(1.5rem, 1.6vw, 3rem);
    width: 100%;
    box-sizing: border-box;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 10px;
    font-size: clamp(1.2rem, 1.4vw, 2.8rem);
    font-weight: 600;
    animation: fadeInUp 0.3s ease;
}
.host-order-item.is-correct-order {
    background: #e8f5e9;
    border-left: 4px solid #26890c;
}
/* Palju elemente (opts-6 ehk 6+, sh 8): kompaktsem paigutus,
   et 8-elemendine järjestus + juhend mahuks FullHD-l ekraanile.
   5 elemendi puhul kasutame baasstiili — ruum on piisav. */
.opts-6 .host-order-item {
    padding: clamp(0.4rem, 0.5vw, 1rem) clamp(0.8rem, 1vw, 2rem);
    font-size: clamp(0.95rem, 1.1vw, 2rem);
}
.opts-6 .host-order-items {
    gap: clamp(0.3rem, 0.4vw, 0.8rem);
}
.opts-6 .host-order-num {
    width: clamp(28px, 2.2vw, 50px);
    height: clamp(28px, 2.2vw, 50px);
    font-size: clamp(0.9rem, 1vw, 1.6rem);
    margin-right: clamp(0.6rem, 0.8vw, 1.4rem);
}
/* 9+ items (max 10): veelgi kompaktsem, et FullHD-l ja 4K-l mahuksid kõik items
   + pealkiri + statistika-kastid + nupud ekraanile. */
.opts-many .host-order-items {
    gap: clamp(0.2rem, 0.3vw, 0.6rem);
    max-width: clamp(600px, 50vw, 1200px);
}
.opts-many .host-order-item {
    padding: clamp(0.3rem, 0.4vw, 0.8rem) clamp(0.7rem, 0.9vw, 1.6rem);
    font-size: clamp(0.85rem, 1vw, 1.7rem);
}
.opts-many .host-order-num {
    width: clamp(24px, 1.8vw, 40px);
    height: clamp(24px, 1.8vw, 40px);
    font-size: clamp(0.8rem, 0.9vw, 1.4rem);
    margin-right: clamp(0.5rem, 0.7vw, 1.2rem);
}
.opts-many .host-match-pair-stat {
    font-size: clamp(0.75rem, 0.85vw, 1.4rem);
    padding: clamp(0.2rem, 0.3vw, 0.5rem) clamp(0.4rem, 0.6vw, 1rem);
}
[data-theme="dark"] .host-order-item {
    background: var(--bg-secondary, #1e2a4a);
}
[data-theme="dark"] .host-order-item.is-correct-order {
    background: #1b3a1b;
}
.host-order-num {
    width: clamp(40px, 3vw, 70px);
    height: clamp(40px, 3vw, 70px);
    background: #00d1b2;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: clamp(1.1rem, 1.3vw, 2.2rem);
    margin-right: clamp(1rem, 1.2vw, 2rem);
    flex-shrink: 0;
}
.host-order-text {
    flex: 1;
    color: var(--text-primary, #333);
}

/* ==========================================
   HOST — SLIDER (Liugur)
   ========================================== */
.host-slider-display,
/* Küsimuse vaates — lihtne skaala koos "vali oma seadmest" tekstiga */
.host-slider-display {
    width: 100%;
    /* Laiem cap 4K-l — skaala ei jääks ebaproportsionaalselt kitsaks. */
    max-width: clamp(700px, 60vw, 2200px);
    margin: 0 auto;
    padding: 1.5rem;
}
.host-slider-range {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}
.host-special-prompt {
    color: rgba(255,255,255,0.7);
}
.host-special-prompt p {
    margin: 0;
}

/* Tulemuste vaates — histogramm + statistika. clamp laseb sujuvalt skaleeruda FullHD→4K */
.host-slider-result {
    /* Renderdatakse .host-options-grid (1fr 1fr) sees — ületame kõiki veerge */
    grid-column: 1 / -1;
    width: 100%;
    max-width: clamp(900px, 75vw, 1800px);
    margin: 0 auto;
    padding: 2.5rem 2rem 1.5rem;
}
.host-slider-scale {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}
.host-slider-label {
    font-size: clamp(1.8rem, 2vw, 3.4rem);
    font-weight: 700;
    color: var(--text-primary, #333);
    min-width: 60px;
    text-align: center;
    flex-shrink: 0;
    /* Joonduda raja keskpunktiga (track margin-top: 110, height: 10 → keskpunkt 115; container center on 75) */
    transform: translateY(40px);
}
.host-slider-track {
    flex: 1;
    min-width: 0;
    height: clamp(10px, 0.7vw, 18px);
    background: rgba(255,255,255,0.08);
    border-radius: 9px;
    position: relative;
    overflow: visible;
    margin-top: 110px;
    margin-bottom: 30px;
}
[data-theme="dark"] .host-slider-track {
    background: rgba(255,255,255,0.08);
}
.host-slider-tolerance {
    position: absolute;
    top: -4px;
    height: 18px;
    background: rgba(38, 137, 12, 0.15);
    border-radius: 9px;
    border: 2px dashed rgba(38, 137, 12, 0.8);
    z-index: 1;
}
/* Dot plot konteiner — punktide jaoks track-i kohal */
.host-slider-density {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    margin-bottom: 4px;
    width: 100%;
    height: 80px;
    z-index: 1;
}
.host-slider-tol-bg {
    position: absolute;
    top: 0;
    bottom: 0;
    background: rgba(38, 137, 12, 0.18);
    border-radius: 4px;
    z-index: 0;
}
.host-slider-dot {
    position: absolute;
    border-radius: 50%;
    background: #e21b3c;
    transform: translateX(-50%);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
    z-index: 2;
}
.host-q-cancelled-banner {
    display: inline-block;
    background: rgba(226, 27, 60, 0.2);
    color: #ff6080;
    border: 2px solid rgba(226, 27, 60, 0.6);
    border-radius: 8px;
    padding: 0.3rem 0.9rem;
    font-size: clamp(1rem, 1.2vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
}
.host-q-cancelled-banner .fas {
    margin-right: 0.4rem;
}
.host-slider-dot.is-correct {
    background: #26890c;
    z-index: 3;
}
.host-slider-dot.is-wrong {
    background: #e21b3c;
}
.host-slider-dot.is-scale {
    /* Skaala-küsimusel pole õiget vastust — kõik punktid rohelised */
    background: #26890c;
}
.host-slider-correct-line {
    position: absolute;
    bottom: -16px;
    width: 2px;
    background: #26890c;
    transform: translateX(-50%);
    z-index: 4;
    box-shadow: 0 0 6px rgba(38, 137, 12, 0.6);
    opacity: 0.6;
    /* top määratakse JS-is dünaamiliselt vastavalt dot pina kõrgusele */
}
.host-slider-correct-badge {
    position: absolute;
    transform: translateX(-50%);
    background: #26890c;
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    /* top määratakse JS-is dünaamiliselt */
}
.host-slider-correct-badge::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: #26890c;
}
/* Kui badge on skaala all (pina pikem kui konteiner), arrow ülevalpoolt */
.host-slider-correct-badge.is-below::after {
    bottom: auto;
    top: -5px;
}
/* Kui badge all, statistika nihkub allapoole, et mitte kattuda */
.host-slider-result.has-bottom-badge .host-slider-stats {
    margin-top: 3rem;
}
.host-slider-stats {
    /* Flex koos justify-content: center — 3 või 4 statistika-kasti tsentreeruvad horisontaalselt
       (skaala-küsimusel pole "Õigeid" kasti, ja siis 3 kasti peavad ka keskele jääma). */
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(1rem, 1.5vw, 2.5rem);
    margin-top: 2rem;
    width: 100%;
}
.host-slider-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(0.8rem, 1.2vw, 2rem) clamp(0.8rem, 1.5vw, 2.5rem);
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    min-width: clamp(120px, 12vw, 250px);
}
.host-slider-stat-label {
    font-size: clamp(0.85rem, 0.9vw, 1.6rem);
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.host-slider-stat-val {
    font-size: clamp(1.6rem, 2.2vw, 3.6rem);
    font-weight: 800;
    color: var(--text-primary, #fff);
    margin-top: 0.5rem;
    white-space: nowrap;
}

/* Hotspot küsimustel on pilt suhteliselt väike (max-height: 400px), seega
   küsimuse tekst võib olla suurem — mängija näeb pilti niikuinii oma seadmes. */
.no-media:has(.host-hotspot-container) .host-q-text {
    font-size: clamp(2rem, 2.6vw, 4.5rem);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

/* ==========================================
   HOST — REVEAL (pildi paljastusefekt, sõltumatu küsimusetüübist)
   ========================================== */
/* Pildi-meedia ümbris, mis lubab reveal-võrel asetuda täpselt pildi peale.
   Kuvatakse standardses .host-q-media konteineris. */
.host-media-image-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
    border-radius: 12px;
    overflow: hidden;
    max-width: 100%;
}
.host-media-image-wrap .host-media-img {
    display: block;
}
.host-reveal-grid {
    position: absolute;
    inset: 0;
    display: grid;
    z-index: 2;
}
.host-reveal-tile {
    background: #333;
    border: 1px solid #222;
    transition: opacity 0.4s ease;
}
[data-theme="dark"] .host-reveal-tile {
    background: #1a1a2e;
    border-color: #111;
}
.host-reveal-tile.revealed {
    opacity: 0;
    pointer-events: none;
}

/* ==========================================
   HOST — HOTSPOT (Märgi pildil)
   ========================================== */
.host-hotspot-container {
    max-width: clamp(700px, 60vw, 2000px);
    margin: 0 auto;
    text-align: center;
}
.host-hotspot-image-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
    /* Kärbi sihtalade ja markerite osad, mis ulatuvad väljaspoole pilti.
       Border-radius järgib pildi enda ümaraid nurki (12px). */
    overflow: hidden;
    border-radius: 12px;
}
.host-hotspot-img {
    max-height: 400px;
    max-width: 100%;
    border-radius: 12px;
    display: block;
}
.host-hotspot-correct {
    position: absolute;
    border: 3px solid #26890c;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: rgba(38, 137, 12, 0.15);
    box-shadow: 0 0 0 2px white;
    z-index: 2;
    pointer-events: none;
    aspect-ratio: 1;
}
/* Ristkülik (sh ruudu-kujuline ristkülik kui radius_y = radius) — höõguvad nurgad,
   width ja height seatakse JS-ist eraldi (radius vs radius_y), ilma aspect-ratio piiranguta. */
.host-hotspot-correct.is-shape-rectangle {
    border-radius: 6px;
    aspect-ratio: auto;
}
.host-hotspot-dot {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    border: 2px solid white;
    pointer-events: none;
}
.host-hotspot-dot.is-correct {
    background: #26890c;
}
.host-hotspot-dot.is-wrong {
    background: #e21b3c;
}
/* Hotspot lightbox — kloonitud wrap suurendatuna */
.host-lightbox-hotspot {
    max-width: 95vw;
    max-height: 95vh;
    display: block !important;
}
.host-lightbox-hotspot .host-hotspot-img {
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
}

/* Sihtala-küsimuse per-sihtala statistika (reveal vaates).
   Auto-fit + minmax → kahel ekraanitüübil mahub mitu veergu kõrvuti, kompaktsetel üksinda. */
.host-hotspot-stats {
    max-width: clamp(700px, 70vw, 1800px);
    margin: 0.6rem auto 0.4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 0.35rem 0.6rem;
}
.host-hotspot-stat {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 0.55rem;
    background: var(--bg-secondary, rgba(255,255,255,0.06));
    border-left: 4px solid var(--stat-color, #c0392b);
    border-radius: 6px;
    padding: 0.3rem 0.65rem;
    color: var(--text-primary, #fff);
}
.host-hotspot-stat-num {
    font-weight: 700;
    color: var(--stat-color, #c0392b);
    min-width: 1.8rem;
}
.host-hotspot-stat-icon {
    color: var(--stat-color, #c0392b);
    opacity: 0.85;
    font-size: 0.95rem;
}
.host-hotspot-stat-bar {
    position: relative;
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    overflow: hidden;
}
.host-hotspot-stat-bar-fill {
    display: block;
    height: 100%;
    background: var(--stat-color, #c0392b);
    border-radius: 4px;
    transition: width 0.3s ease;
}
.host-hotspot-stat-val {
    font-variant-numeric: tabular-nums;
    font-size: 0.9rem;
    opacity: 0.9;
    white-space: nowrap;
}
/* Reveal-vaates, kui per-sihtala statistika on olemas, kompaktsem pilt
   ja tihedam kategooria-jaotus, et kõik mahuks FullHD-le. */
.host-hotspot-result:has(.host-hotspot-stats) .host-hotspot-img {
    max-height: 320px;
}
.host-hotspot-container > .host-multi-breakdown {
    margin-top: 0.6rem;
}
.host-hotspot-container .host-multi-cat {
    padding: clamp(0.5rem, 0.7vw, 1.2rem) clamp(1rem, 1.3vw, 2.4rem);
}
.host-hotspot-container .host-multi-cat-val {
    font-size: clamp(1.5rem, 2vw, 3.6rem);
}

/* ==========================================
   HOST — MATCH (Ühendamine)
   ========================================== */
.host-match-display {
    max-width: clamp(700px, 70vw, 2800px);
    margin: 0 auto;
    width: 100%;
}
/* Grid asemel flex'i — vasak ja parem rida joonduvad samale kõrgusele
   (oluline kui mõni element murdub kahele reale).
   --match-rows on paaride arv, mille JS paneb inline style'iga.
   `auto auto` lubab veergudel laieneda sisu järgi — pikkadel kirjeldustel
   pole 50/50 jaotusest tingitud sundkitsenemist; lühikestel paaride puhul on
   veerud kompaktsemad. */
.host-match-columns {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, auto);
    grid-template-rows: repeat(var(--match-rows, 4), auto);
    grid-auto-flow: column;
    gap: clamp(0.5rem, 0.7vw, 1.4rem) clamp(1rem, 2vw, 4rem);
    justify-content: center;
    max-width: clamp(560px, 70vw, 2600px);
    margin: 0 auto;
}
.host-match-col {
    display: contents; /* lapsed (host-match-item) muutuvad grid-lasteks */
}
.host-match-item {
    padding: clamp(0.9rem, 1.2vw, 2.4rem) clamp(1.2rem, 1.5vw, 3rem);
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 10px;
    font-weight: 600;
    font-size: clamp(1.3rem, 1.7vw, 3.2rem);
    color: var(--text-primary, #333);
    border-left: 5px solid var(--match-color, #888);
    display: flex;
    align-items: center;
    gap: clamp(0.6rem, 0.8vw, 1.6rem);
}
.host-match-item.host-match-right {
    border-left: none;
    border-right: 4px solid var(--match-color, #888);
    text-align: right;
    justify-content: flex-end;
}
/* Palju paare (opts-6 ehk 6+, sh 8): kompaktsem paigutus,
   et 8 paari + küsimuse tekst + juhend mahuks FullHD-l ekraanile. */
.opts-6 .host-match-item {
    padding: clamp(0.5rem, 0.7vw, 1.4rem) clamp(0.8rem, 1vw, 2rem);
    font-size: clamp(1rem, 1.2vw, 2.2rem);
    border-radius: 8px;
}
.opts-6 .host-match-num {
    width: clamp(26px, 2vw, 44px);
    height: clamp(26px, 2vw, 44px);
    font-size: clamp(0.85rem, 1vw, 1.6rem);
}
.opts-6 .host-match-columns {
    gap: clamp(0.3rem, 0.4vw, 0.8rem) clamp(0.8rem, 1.5vw, 3rem);
}
[data-theme="dark"] .host-match-item {
    background: var(--bg-secondary, #1e2a4a);
}
.host-match-num {
    width: clamp(32px, 2.6vw, 64px);
    height: clamp(32px, 2.6vw, 64px);
    background: var(--match-color, #888);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1rem, 1.2vw, 2rem);
    flex-shrink: 0;
    font-weight: 700;
}
.host-match-results {
    display: flex;
    flex-direction: column;
    gap: clamp(0.4rem, 0.5vw, 1rem);
    max-width: clamp(700px, 85vw, 2800px);
    margin: 0 auto;
    width: 100%;
}
.host-match-pair {
    display: flex;
    align-items: center;
    gap: clamp(0.6rem, 0.8vw, 1.6rem);
    padding: clamp(0.5rem, 0.7vw, 1.4rem) clamp(0.8rem, 1vw, 2rem);
    background: rgba(72, 199, 142, 0.1);
    border: 2px solid #48c78e;
    border-radius: 8px;
}
[data-theme="dark"] .host-match-pair {
    background: rgba(72, 199, 142, 0.08);
}
.host-match-pair-left {
    flex: 1;
    font-weight: 700;
    color: var(--text-primary, #333);
    text-align: right;
    font-size: clamp(1rem, 1.2vw, 2.2rem);
}
.host-match-pair-arrow {
    color: #48c78e;
    font-size: clamp(1.1rem, 1.3vw, 2.4rem);
    flex-shrink: 0;
}
.host-match-pair-right {
    flex: 1;
    font-weight: 700;
    color: var(--text-primary, #333);
    font-size: clamp(1rem, 1.2vw, 2.2rem);
}
.host-match-pair-stat {
    flex-shrink: 0;
    margin-left: clamp(1rem, 1.2vw, 2rem);
    padding: clamp(0.25rem, 0.3vw, 0.6rem) clamp(0.6rem, 0.7vw, 1.4rem);
    border-radius: 6px;
    background: rgba(0,0,0,0.25);
    color: rgba(255,255,255,0.85);
    font-size: clamp(0.95rem, 1.1vw, 2rem);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.host-match-pair-stat small {
    opacity: 0.7;
    font-weight: 500;
    margin-left: 0.2rem;
}
/* Palju paare (opts-6 ehk 6+, sh 8): kompaktsem tulemuste vaade,
   et 8 paari + multi-breakdown + nupud mahuks FullHD-l ekraanile. */
.opts-6 .host-match-results {
    gap: clamp(0.25rem, 0.3vw, 0.6rem);
}
.opts-6 .host-match-pair {
    padding: clamp(0.4rem, 0.5vw, 1rem) clamp(0.6rem, 0.8vw, 1.6rem);
    gap: clamp(0.4rem, 0.6vw, 1.2rem);
    border-radius: 6px;
}
.opts-6 .host-match-pair-left,
.opts-6 .host-match-pair-right {
    font-size: clamp(0.85rem, 1vw, 1.8rem);
}
.opts-6 .host-match-pair-arrow {
    font-size: clamp(0.9rem, 1.05vw, 2rem);
}
.opts-6 .host-match-pair-stat {
    margin-left: clamp(0.5rem, 0.7vw, 1.4rem);
    padding: clamp(0.15rem, 0.2vw, 0.4rem) clamp(0.4rem, 0.5vw, 1rem);
    font-size: clamp(0.8rem, 0.95vw, 1.7rem);
}

/* ==========================================
   HOST — TYPE tulemused
   ========================================== */
.host-result-correct-box {
    padding: 1.5rem;
    background: var(--bg-secondary, #f9f9f9);
    border-radius: 12px;
    text-align: center;
}
[data-theme="dark"] .host-result-correct-box {
    background: var(--bg-secondary, #1e2a4a);
}
.host-type-cloud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(0.75rem, 1vw, 2rem) clamp(1.25rem, 1.5vw, 3rem);
    padding: clamp(2rem, 2.5vw, 4rem) 1rem;
    min-height: 120px;
}
.host-type-cloud-word {
    font-size: clamp(1.5rem, 2.8vw, 6rem);
    font-weight: 700;
    line-height: 1.2;
    padding: 0.2em 0.5em;
    border-radius: 8px;
    position: relative;
    transition: transform 0.3s ease;
}
.host-type-cloud-word.is-correct {
    color: #48c78e;
    background: rgba(72, 199, 142, 0.12);
}
.host-type-cloud-word.is-wrong {
    color: var(--text-secondary, #888);
    opacity: 0.7;
}
[data-theme="dark"] .host-type-cloud-word.is-correct {
    background: rgba(72, 199, 142, 0.15);
}
.host-type-cloud-count {
    font-size: 0.5em;
    vertical-align: super;
    margin-left: 0.15em;
    opacity: 0.6;
}
.host-type-cloud-correct {
    text-align: center;
    font-size: clamp(1.1rem, 1.3vw, 2.8rem);
    color: var(--text-secondary, #666);
}
.host-type-cloud-correct-label {
    color: #48c78e;
}

/* ==========================================
   HOST — Results container
   ========================================== */
.host-results-container {
    width: 100%;
    max-width: clamp(1000px, 80vw, 2400px);
}

/* Edetabel */
.host-leaderboard-container {
    width: 90%;
    max-width: clamp(700px, 55vw, 1400px);
    margin: 0 auto;
}
.host-leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: clamp(0.75rem, 1vw, 1.5rem);
    min-width: 350px;
    max-width: clamp(600px, 50vw, 1300px);
    width: 100%;
}
.lb-entry {
    display: flex;
    align-items: center;
    padding: clamp(1rem, 1.2vw, 2rem) clamp(1.5rem, 1.8vw, 3rem);
    background: var(--bg-secondary, white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    animation: slideInLeft 0.4s ease forwards;
    opacity: 0;
}
.lb-entry-animate {
    opacity: 0;
}
.lb-rank {
    font-size: clamp(1.8rem, 2vw, 4rem);
    font-weight: 800;
    width: clamp(60px, 4vw, 120px);
    text-align: center;
}
.lb-name {
    flex: 1;
    font-size: clamp(1.3rem, 1.5vw, 3rem);
    font-weight: 600;
    color: var(--text-primary, #333);
}
.lb-score {
    font-size: clamp(1.3rem, 1.5vw, 3rem);
    font-weight: 700;
    color: #00d1b2;
}
.lb-top1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}
.lb-top2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
}
.lb-top3 {
    background: linear-gradient(135deg, #cd7f32 0%, #e6a35e 100%);
}
.lb-top1 .lb-name,
.lb-top2 .lb-name,
.lb-top3 .lb-name {
    color: #333;
}
.lb-top1 .lb-score,
.lb-top2 .lb-score,
.lb-top3 .lb-score {
    color: #333;
}

[data-theme="dark"] .lb-entry {
    background: var(--bg-secondary, #16213e);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ==========================================
   PLAY PAGE — MOBILE VIEW
   ========================================== */
.play-body {
    overflow-x: hidden;
    overscroll-behavior-x: contain;
}
/* Ühenduse-katkemise indikaator — kuvatakse kui poll ebaõnnestub >15s */
.play-disconnect-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f14668;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    animation: disconnectPulse 2s ease-in-out infinite;
}
@keyframes disconnectPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}
.play-screen {
    min-height: calc(100vh - 52px);
    min-height: calc(100dvh - 52px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    /* Blokeeri horisontaalsed swipe'id kogu ekraanil — nt skaala liigutamisel ei jätka brauser body'd külgedele lohistama */
    touch-action: pan-y;
    overflow-y: auto;
}
/* Keela teksti selekteerimine ainult küsimuse-vastamise ekraanil — väldib küsimuse-teksti
   kopeerimist AI-le. Lõppraporti, tulemuste ja ootevaate ajal lubame kasutajal kopeerida
   oma andmeid (skoor, vastused). Input/textarea elementidele lubatakse selekteerida. */
.play-answer-screen {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
/* Mängu ajal (question/paused/results/leaderboard) peida saidi peamenüü ja taastame
   selle alles lobby's või kui mäng on lõppenud. Vähem segadust mängijale, rohkem
   ekraaniruumi küsimuse jaoks ja jätk TI-spikkimise kaitsele. */
body.kv-playing > nav.navbar {
    display: none;
}
body.kv-playing .play-screen {
    /* Topbar pole — kõrgust ei pea maha arvama */
    min-height: 100vh;
    min-height: 100dvh;
}
.play-screen input,
.play-screen textarea {
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}
.play-center-box {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
    margin-top: auto;
    margin-bottom: auto;
}

/* Küsimus */
.play-question-container {
    width: 100%;
    max-width: 500px;
    margin-top: 0;
    margin-bottom: auto;
}
/* Desktop'is on rohkem ruumi — laiem konteiner annab valikutele rohkem
   tekstiruumi (eriti 4 valiku 2x2 grid'is, kus iga veerg saab 1/2 laiusest). */
@media (min-width: 768px) {
    .play-question-container {
        max-width: 760px;
    }
}
@media (min-width: 1200px) {
    .play-question-container {
        max-width: 920px;
    }
}
.play-answer-screen {
    justify-content: flex-start !important;
}
.play-q-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.play-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.play-timer {
    font-size: 2.5rem;
    font-weight: 800;
    color: #00d1b2;
    min-width: 60px;
    text-align: center;
    transition: color 0.3s;
}
.play-timer.timer-warning {
    color: #e21b3c;
    animation: pulse 0.5s ease infinite;
}
.play-timer.play-timer-intro {
    color: #ffe08a;
    font-size: 3rem;
    animation: introTimerPulse 1s ease infinite;
}
@keyframes introTimerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
.play-timer.play-timer-delay {
    color: #ff9800;
    font-size: 2.5rem;
    animation: introTimerPulse 1s ease infinite;
}
.play-delay-active .play-option-btn,
.play-delay-active .play-option-grid-btn,
.play-delay-active button,
.play-delay-active input,
.play-delay-active .play-slider {
    pointer-events: none;
    opacity: 0.5;
}
.play-delay-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    color: var(--text-secondary, #888);
    font-size: 1rem;
}
.play-delay-notice i {
    font-size: 1.5rem;
    opacity: 0.6;
}
.play-question-text {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-primary, #333);
    line-height: 1.4;
}

/* Meedia mobiilis */
.play-question-media {
    text-align: center;
    margin-bottom: 1rem;
}
/* Reserveeri ruum kui meedia container pole tühi — väldib layout shift'i pildi laadimise ajal */
.play-question-media:not(:empty) {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.play-media-img {
    max-height: 200px;
    max-width: 100%;
    border-radius: 10px;
    object-fit: contain;
}
.play-audio-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--text-secondary, #888);
    font-size: 0.9rem;
    font-weight: 500;
}
.play-media-audio {
    width: 100%;
    max-width: 400px;
}

/* Vastuse nupud */
.play-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.play-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.play-option-grid-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--option-color);
    border-radius: 12px;
    background: var(--bg-secondary, white);
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 1;
    transition: transform 0.1s, border-width 0.15s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.play-option-grid-btn:active {
    transform: scale(0.95);
}
.play-option-grid-btn.selected {
    border-width: 5px;
    transform: scale(0.95);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--option-color) 40%, transparent);
}
.play-option-grid-btn:disabled:not(.selected) {
    opacity: 0.4;
}
.play-option-grid-btn .play-option-letter {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--option-color);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 1;
}
.play-option-grid-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.play-option-tf {
    min-height: 120px;
    font-size: 1.4rem;
    justify-content: center;
}
.play-option-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 1.25rem 1rem;
    border: 2px solid var(--border-color, #e8e8e8);
    border-left: 5px solid var(--option-color);
    border-radius: 12px;
    background: var(--bg-secondary, white);
    color: var(--text-primary, #363636);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    min-height: 70px;
    gap: 0.75rem;
    transition: transform 0.1s, opacity 0.2s, background 0.2s, border-color 0.2s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    text-align: left;
}
/* Tekst-span (mitte letter) venib täislaiuseni, et tekst tuleks vasakult letterist paremal,
   sama mustriga nagu host-vaates. Ilma `flex: 1` venimine puudub ja tekst paigutub keskele,
   mis on ebaloomulik letter-tekst paari jaoks. */
.play-option-btn > span:not(.play-option-letter) {
    flex: 1;
    min-width: 0;
}
.play-option-btn:active {
    transform: scale(0.97);
}
.play-option-btn.selected {
    background: color-mix(in srgb, var(--option-color) 15%, var(--bg-secondary, white));
    border-color: var(--option-color);
    transform: scale(0.97);
}
.play-option-btn:disabled {
    cursor: default;
}
.play-option-btn:disabled:not(.selected) {
    opacity: 0.4;
}
.play-option-letter {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--option-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

/* ==========================================
   PLAY — TYPE (Sisestamine)
   ========================================== */
.play-type-container {
    width: 100%;
}
.play-type-input {
    text-align: center;
}

/* ==========================================
   PLAY — ORDER (Järjestamine)
   ========================================== */
.play-order-container {
    width: 100%;
}
.play-order-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.play-order-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 10px;
    gap: 0.6rem;
    touch-action: none;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    transition: box-shadow 0.2s ease;
}
.play-order-item.is-dragging {
    position: fixed;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    cursor: grabbing;
    opacity: 0.95;
}
.play-order-placeholder {
    border: 2px dashed #00d1b2;
    border-radius: 10px;
    opacity: 0.4;
}
[data-theme="dark"] .play-order-item {
    background: var(--bg-secondary, #1e2a4a);
}
.play-order-pos {
    width: 28px;
    height: 28px;
    background: #00d1b2;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.play-order-text {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary, #333);
    font-size: 0.95rem;
}
.play-order-handle {
    color: #aaa;
    font-size: 1rem;
    padding: 0 0.25rem;
    flex-shrink: 0;
}
[data-theme="dark"] .play-order-handle {
    color: #666;
}

/* ==========================================
   PLAY — SLIDER (Liugur)
   ========================================== */
.play-slider-container {
    width: 100%;
    text-align: center;
}
.play-slider-labels {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: var(--text-secondary, #888);
    margin-bottom: 0.25rem;
}
.play-slider-input {
    width: 100%;
    height: 40px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    /* Kasutaja ei saa kogemata teksti lohistades valida */
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: pan-x;
}
.play-slider-input::-webkit-slider-runnable-track {
    height: 12px;
    /* Tickid on maalitud raja ENDA taustaks (gradient JS-ist custom property kaudu).
       Nii on thumb (pseudo-element raja peal) loomulikult tickide peal, mitte taga. */
    background-color: #ddd;
    background-image: var(--slider-tick-bg, none);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    border-radius: 6px;
}
.play-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 36px;
    height: 36px;
    background: #00d1b2;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    margin-top: -12px;
    transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.play-slider-input:active::-webkit-slider-thumb {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(0, 209, 178, 0.6);
}
.play-slider-input::-moz-range-track {
    height: 12px;
    background-color: #ddd;
    background-image: var(--slider-tick-bg, none);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    border-radius: 6px;
    border: none;
}
.play-slider-input::-moz-range-thumb {
    width: 36px;
    height: 36px;
    background: #00d1b2;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.play-slider-input:active::-moz-range-thumb {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(0, 209, 178, 0.6);
}
.play-slider-wrap {
    position: relative;
    margin: 0.75rem 0;
    /* Lohistamisel ei selekteerita lehe teksti */
    -webkit-user-select: none;
    user-select: none;
}
/* Väärtuse number — suurem ja kohane muutus */
.play-slider-value {
    transition: transform 0.15s ease, color 0.15s ease;
}
.play-slider-value.is-pulsing {
    transform: scale(1.12);
    color: #00d1b2;
}
[data-theme="dark"] .play-slider-input::-webkit-slider-runnable-track {
    background: #444;
}
[data-theme="dark"] .play-slider-input::-moz-range-track {
    background: #444;
}
.play-slider-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #00d1b2;
    margin: 0.5rem 0;
}

/* ==========================================
   PLAY — HOTSPOT (Märgi pildil)
   ========================================== */
.play-hotspot-container {
    width: 100%;
}
.play-hotspot-image-wrap {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: crosshair;
    -webkit-tap-highlight-color: transparent;
}
.play-hotspot-img {
    width: 100%;
    display: block;
    border-radius: 10px;
    /* Tagab et hotspot wrap reserveerib ruumi enne pildi laadimist (väldib layout shift'i) */
    min-height: 200px;
    background: rgba(0,0,0,0.05);
}
.play-hotspot-marker {
    position: absolute;
    width: 28px;
    height: 28px;
    background: rgba(226, 27, 60, 0.7);
    border: 3px solid rgba(255,255,255,0.85);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    z-index: 3;
    pointer-events: auto;
    cursor: pointer;
    animation: hotspotPopIn 0.3s ease;
}
.play-hotspot-marker:hover {
    background: rgba(226, 27, 60, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}
.play-hotspot-marker::after {
    content: '\00d7';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.15s;
}
.play-hotspot-marker:hover::after {
    opacity: 1;
}

/* Tulemus */
.play-result-icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}
.play-result-icon.correct {
    color: #26890c;
}
.play-result-icon.wrong {
    color: #e21b3c;
}

/* Mini edetabel */
.play-mini-leaderboard {
    text-align: left;
    border-radius: 8px;
    overflow: hidden;
}
.play-lb-row {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #eee;
}
.play-lb-row:last-child {
    border-bottom: none;
}
.play-lb-row.is-me {
    background: rgba(0, 209, 178, 0.1);
    font-weight: 700;
}
.play-lb-rank {
    width: 30px;
    font-weight: 700;
    text-align: center;
}
.play-lb-name {
    flex: 1;
    margin: 0 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.play-lb-score {
    font-weight: 600;
    color: #00d1b2;
}

[data-theme="dark"] .play-lb-row {
    border-bottom-color: #333;
}
[data-theme="dark"] .play-lb-row.is-me {
    background: rgba(0, 209, 178, 0.15);
}

/* ==========================================
   PLAY — Lõppraport
   ========================================== */
.play-report {
    text-align: left;
    width: 100%;
}
.play-report-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-light, #eee);
    font-size: 0.85rem;
}
.play-report-num {
    width: 24px;
    text-align: center;
    color: var(--text-muted, #999);
    font-size: 0.8rem;
    flex-shrink: 0;
}
.play-report-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary, #333);
}
.play-report-icon {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}
.play-report-pts {
    flex-shrink: 0;
    width: 50px;
    text-align: right;
    font-weight: 600;
    color: var(--text-secondary, #666);
    font-size: 0.8rem;
}
.play-report-summary {
    text-align: center;
    padding: 0.5rem 0;
    color: var(--text-secondary, #666);
}

/* ==========================================
   HOST TOOLBAR (mute, fullscreen)
   ========================================== */
.host-toolbar {
    position: fixed;
    top: 60px;
    right: 5rem;
    z-index: 50;
    display: flex;
    gap: 0.5rem;
}
:fullscreen .host-toolbar {
    top: 0.5rem;
}

/* ==========================================
   PLAY TOOLBAR (mute)
   ========================================== */
.play-toolbar {
    position: fixed;
    top: 60px;
    right: 0.5rem;
    z-index: 50;
}

/* ==========================================
   FULLSCREEN
   ========================================== */
:fullscreen,
:fullscreen html,
:fullscreen body,
:-webkit-full-screen,
:-webkit-full-screen html,
:-webkit-full-screen body {
    overflow: hidden !important;
}
:fullscreen .navbar,
:-webkit-full-screen .navbar {
    display: none !important;
}
:fullscreen .host-screen,
:-webkit-full-screen .host-screen {
    min-height: 100vh;
    padding-top: 0;
    overflow: hidden !important;
}

/* ==========================================
   PAUSE OVERLAY
   ========================================== */
.pause-overlay {
    position: fixed;
    inset: 0;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.3s ease;
}
.pause-overlay-content {
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.pause-overlay-content .title {
    color: white;
}
.pause-question-progress {
    color: rgba(255,255,255,0.7);
    font-size: clamp(1.2rem, 1.5vw, 2.6rem);
    margin-top: 0.5rem;
}
.pause-question-progress strong {
    color: rgba(255,255,255,0.95);
}
.pause-bottom-area {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.pause-join-info {
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 1.2rem;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes questionFadeIn {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes countPulse {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* ==========================================
   HOST — Question controls (pause, skip)
   ========================================== */
.host-question-controls {
    display: flex;
    gap: 0.35rem;
}

/* ==========================================
   STREAK FIRE EFFECT
   ========================================== */
.streak-fire {
    animation: fireGlow 0.5s ease-in-out infinite alternate;
}
@keyframes fireGlow {
    from { text-shadow: 0 0 10px #ff6600, 0 0 20px #ff3300; }
    to { text-shadow: 0 0 20px #ff6600, 0 0 40px #ff3300, 0 0 60px #ff0000; }
}
.streak-badge {
    background: linear-gradient(135deg, #ff6600, #ff0000);
    color: white;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 0.85em;
    font-weight: 700;
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.3rem;
    animation: fireGlow 0.5s ease-in-out infinite alternate;
}

/* ==========================================
   RESULTS PAGE
   ========================================== */
.results-container {
    max-width: 900px;
    margin: 0 auto;
}
.results-question-card {
    background: var(--bg-secondary, white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
[data-theme="dark"] .results-question-card {
    background: var(--bg-secondary, #16213e);
}
.results-player-table {
    width: 100%;
    border-collapse: collapse;
}
.results-player-table th,
.results-player-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.results-player-table th {
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}
.results-player-table th:hover {
    background: rgba(0, 209, 178, 0.1);
}
[data-theme="dark"] .results-player-table th,
[data-theme="dark"] .results-player-table td {
    border-bottom-color: #333;
}

/* Teegi kaartide stiil tuleb globaalsest .library-grid + .library-card klassist (css/style.css) */

/* ==========================================
   QUESTION BANK MODAL
   ========================================== */
.bank-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.bank-modal {
    background: var(--bg-primary, white);
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
[data-theme="dark"] .bank-modal {
    background: var(--bg-primary, #1a1a2e);
}
.bank-modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
[data-theme="dark"] .bank-modal-header {
    border-bottom-color: #333;
}
.bank-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}
.bank-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}
[data-theme="dark"] .bank-modal-footer {
    border-top-color: #333;
}
.bank-modal-body .field.has-addons .button {
    height: 100%;
}
#bankSelectedCount {
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
}
.bank-question-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}
[data-theme="dark"] .bank-question-item {
    border-bottom-color: #2a2a3e;
}
.bank-question-item:last-child {
    border-bottom: none;
}
/* Sinu küsimused — pehme roheline taust vasakus servas, et eristada avalikust teegist */
.bank-question-item.is-mine {
    border-left: 3px solid #26890c;
    padding-left: 0.75rem;
    background: rgba(38, 137, 12, 0.04);
}
[data-theme="dark"] .bank-question-item.is-mine {
    background: rgba(38, 137, 12, 0.08);
}
.bank-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid var(--border-color, #eee);
    color: var(--text-secondary, #666);
}
.bank-section-title:first-child {
    margin-top: 0;
}
.bank-section-title i {
    margin-right: 0.4rem;
}
.bank-section-count {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--text-muted, #999);
}
.bank-section {
    margin-bottom: 0.5rem;
}

/* ==========================================
   AI PROMPTI MODAAL (Koosta tehisintellektiga)
   ========================================== */
.kv-ai-modal {
    position: fixed;
    inset: 0;
    z-index: 220;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.kv-ai-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}
.kv-ai-modal-box {
    position: relative;
    background: var(--bg-primary, white);
    border-radius: 12px;
    width: 92%;
    max-width: 720px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
    overflow: hidden;
}
[data-theme="dark"] .kv-ai-modal-box {
    background: var(--bg-primary, #1a1a2e);
}
.kv-ai-modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #864cbf 0%, #6a3a9c 100%);
    color: #fff;
}
[data-theme="dark"] .kv-ai-modal-header {
    border-bottom-color: #333;
}
.kv-ai-modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.kv-ai-modal-close {
    background: rgba(255,255,255,0.2);
    border: 0;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.kv-ai-modal-close:hover {
    background: rgba(255,255,255,0.35);
}
.kv-ai-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
}
.kv-ai-step {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px dashed var(--border-light, #e5e5e5);
}
.kv-ai-step:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}
[data-theme="dark"] .kv-ai-step {
    border-bottom-color: #333;
}
.kv-ai-step-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    color: var(--text-primary, #333);
}
[data-theme="dark"] .kv-ai-step-title {
    color: var(--text-primary, #eee);
}
.kv-ai-step-help {
    font-size: 0.85rem;
    color: var(--text-secondary, #777);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}
[data-theme="dark"] .kv-ai-step-help {
    color: var(--text-secondary, #aaa);
}
.kv-ai-step-help code {
    background: rgba(0,0,0,0.06);
    padding: 0 0.3rem;
    border-radius: 3px;
    font-size: 0.9em;
}
[data-theme="dark"] .kv-ai-step-help code {
    background: rgba(255,255,255,0.1);
}
.kv-ai-types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.kv-ai-type-chip {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.kv-ai-type-chip input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.kv-ai-type-chip > span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--border-color, #ddd);
    background: var(--bg-secondary, #f5f5f5);
    font-size: 0.85rem;
    color: var(--text-secondary, #666);
    transition: all 0.15s;
}
[data-theme="dark"] .kv-ai-type-chip > span {
    background: rgba(255,255,255,0.05);
    border-color: #444;
    color: var(--text-secondary, #aaa);
}
.kv-ai-type-chip:hover > span {
    border-color: #864cbf;
    color: #864cbf;
}
.kv-ai-type-chip input[type="checkbox"]:checked + span {
    background: #864cbf;
    border-color: #864cbf;
    color: #fff;
}
.kv-ai-prompt-area,
.kv-ai-response-area {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.45;
}

/* Mobiilis täisekraan */
@media (max-width: 600px) {
    .kv-ai-modal-box {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}

/* ==========================================
   KINNITUSMODAAL ("Mine küsimusega edasi?") — Enter-vajutus küsimuse ajal
   ========================================== */
.confirm-next-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.15s ease;
}
.confirm-next-modal {
    background: var(--bg-card, #fff);
    color: var(--text-primary, #222);
    border-radius: 12px;
    padding: 2rem 2.5rem;
    min-width: 320px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
[data-theme="dark"] .confirm-next-modal {
    background: #1c1c2a;
    color: #eee;
}
@media screen and (min-width: 2400px) {
    .confirm-next-modal {
        padding: 3rem 3.5rem;
        min-width: 480px;
        max-width: 700px;
    }
    .confirm-next-modal .title {
        font-size: 2.4rem;
    }
    .confirm-next-modal .button.is-medium {
        font-size: 1.4rem;
        padding: 1rem 1.8rem;
    }
}

/* ==========================================
   TAGASISIDE MODAAL (host finished ekraan)
   ========================================== */
.feedback-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.feedback-modal {
    background: var(--bg-card, #fff);
    color: var(--text-primary, #222);
    border-radius: 12px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
[data-theme="dark"] .feedback-modal {
    background: #1c1c2a;
    color: #eee;
}
.feedback-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color, #eee);
}
[data-theme="dark"] .feedback-modal-header {
    border-bottom-color: #2a2a3e;
}
.feedback-modal-body {
    padding: 1.25rem;
}
.feedback-modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color, #eee);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
[data-theme="dark"] .feedback-modal-footer {
    border-top-color: #2a2a3e;
}
.feedback-rating {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
}
.feedback-star {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    font-size: 2rem;
    color: #d89e00;
    transition: transform 0.1s ease;
}
.feedback-star:hover,
.feedback-star:focus {
    transform: scale(1.15);
    outline: none;
}
.feedback-star.is-active {
    color: #ffbf00;
}

/* ==========================================
   HISTORY TABLE
   ========================================== */
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.history-table th,
.history-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.history-table th {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #888;
}
[data-theme="dark"] .history-table th,
[data-theme="dark"] .history-table td {
    border-bottom-color: #333;
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes popIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
/* Hotspot-marker pop-in animatsioon — säilitab translate(-50%, -50%) keskenduse,
   muidu animatsiooni ajal marker hüppab koordinaadi vasak-üla nurka ja siis
   pärast animatsiooni (transform-baas taastub) hüppab keskpunkti. */
@keyframes hotspotPopIn {
    0% { transform: translate(-50%, -50%) scale(0); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media screen and (max-width: 768px) {
    .host-code {
        font-size: 3rem;
        letter-spacing: 0.3em;
    }
    .host-lobby-body {
        flex-direction: column;
    }
    .host-lobby-right {
        width: 100%;
        max-width: none;
        padding: 1.5rem;
    }
    .host-lobby-qr svg {
        width: 150px;
        height: 150px;
    }
    .host-lobby-domain {
        font-size: 2rem;
    }
    .host-lobby-right {
        width: 100%;
        max-width: none;
        padding: 1.5rem;
        flex-direction: row;
        gap: 1.5rem;
    }
    .host-question-text {
        font-size: 1.4rem;
    }
    .host-options-grid {
        grid-template-columns: 1fr;
    }
    .host-option {
        padding: 1rem 1.2rem;
        font-size: 1.1rem;
        min-height: 60px;
        gap: 0.75rem;
    }
    .host-option-letter {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
    .lb-entry {
        padding: 0.75rem 1rem;
    }
    .lb-rank {
        font-size: 1.3rem;
        width: 40px;
    }
    .lb-name, .lb-score {
        font-size: 1rem;
    }

    .play-options {
        grid-template-columns: 1fr;
    }
    .play-option-btn {
        min-height: 60px;
        padding: 0.75rem;
    }
    .play-option-letter {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
    .host-media-img {
        max-height: 200px;
    }
    .host-hotspot-img {
        max-height: 250px;
    }
    .host-toolbar {
        top: auto;
        bottom: 0.5rem;
        right: 0.5rem;
    }
    .host-question-controls {
        gap: 0.25rem;
    }
    .host-question-controls .button {
        padding: 0.25em 0.5em;
    }

    /* Play — tüübipõhised mobiiliparandused */
    .play-question-text {
        font-size: 1.05rem;
        margin-bottom: 1rem;
    }
    .play-timer {
        font-size: 2rem;
        min-width: 50px;
    }
    .play-header {
        margin-bottom: 0.5rem;
    }
    .play-hotspot-img {
        max-height: 35vh;
        max-height: 35dvh;
        object-fit: contain;
    }
    .play-order-list {
        max-height: 50vh;
        max-height: 50dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .play-slider-value {
        font-size: 2rem;
        margin: 0.25rem 0;
    }
}

/* 1-column options for 2 choices (true/false) */
.play-options:has(.play-option-btn:nth-child(2):last-child) {
    grid-template-columns: 1fr;
}
.host-options-grid:has(.host-option:nth-child(2):last-child) {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================
   #8 PLAYER TIMER PROGRESS BAR
   ========================================== */
.play-timer-bar-container {
    width: 100%;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    direction: rtl;
}
[data-theme="dark"] .play-timer-bar-container {
    background: #333;
}
.play-timer-bar {
    height: 100%;
    background: #00d1b2;
    border-radius: 3px;
    transition: width 0.2s linear, background 0.3s;
    width: 100%;
    margin-left: auto;
}
.play-timer-bar.timer-bar-warning {
    background: #e21b3c;
}

/* ==========================================
   #9 LIGHTBOX (Image zoom)
   ========================================== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
    cursor: zoom-out;
}
.lightbox-img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.play-media-img {
    cursor: zoom-in;
}

/* ==========================================
   #11 MOBILE LOBBY UX
   ========================================== */
.play-join-screen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    min-height: 100dvh;
}
.play-join-screen .play-center-box {
    background: white;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
[data-theme="dark"] .play-join-screen .play-center-box {
    background: #1a1a2e;
}
.play-join-header {
    text-align: center;
    margin-bottom: 1.5rem;
}
.play-join-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #00d1b2, #23d160);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 0.75rem;
}
.play-join-btn {
    border-radius: 12px !important;
    height: 56px !important;
    font-size: 1.2rem !important;
    margin-top: 0.5rem;
}

/* Team select grid */
.team-select-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.team-select-btn {
    padding: 0.6rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.team-select-btn.selected {
    border-color: #00d1b2;
    background: rgba(0, 209, 178, 0.1);
    transform: scale(1.03);
}
[data-theme="dark"] .team-select-btn {
    background: #2a2a3e;
    border-color: #444;
}

/* ==========================================
   #12 PODIUM
   ========================================== */
.podium-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.3rem;
    min-height: 200px;
}
.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    width: 150px;
    flex: 0 0 150px;
    position: relative;
}
.podium-place.podium-reveal {
    animation: podiumReveal 0.6s ease forwards;
}
@keyframes podiumReveal {
    0% { opacity: 0; transform: translateY(40px) scale(0.8); }
    60% { opacity: 1; transform: translateY(-8px) scale(1.05); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
/* Spotlight 1. koha taga — kuldne kuma. Asetatud taustale, et ei seisaks muu kohal. */
.podium-place[data-rank="1"]::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255,215,0,0.22) 0%, rgba(255,215,0,0.08) 35%, transparent 65%);
    pointer-events: none;
    z-index: 0;
    animation: spotlightPulse 3s ease-in-out infinite;
}
@keyframes spotlightPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.podium-place > * { position: relative; z-index: 1; }
/* Top 3 medalid — 1. kuld, 2. hõbe, 3. pronks. Kerge õõtsuv liikumine (nagu medal pael).
   Ilmub viivitusega pärast tulpa+skoori. Klass nimi säilitatud (.podium-crown)
   tagasiühilduvuse pärast — ikoon vahetus krooni→medali peale 1.0.96-s. */
.podium-crown {
    color: #ffd700; /* vaikimisi kuld (1. koht) */
    font-size: 2.6rem;
    margin-bottom: 0.3rem;
    filter: drop-shadow(0 0 12px rgba(255,215,0,0.75)) drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    animation: medalSwing 2.4s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.5s ease;
    transform-origin: top center;
}
/* Hõbemedal — 2. koht */
.podium-crown.podium-medal-2 {
    color: #c0c0c0;
    font-size: 2.3rem; /* veidi väiksem kui kuld */
    filter: drop-shadow(0 0 10px rgba(220,220,220,0.65)) drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
/* Pronksmedal — 3. koht */
.podium-crown.podium-medal-3 {
    color: #cd7f32;
    font-size: 2.1rem; /* veelgi veidi väiksem */
    filter: drop-shadow(0 0 10px rgba(205,127,50,0.6)) drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.podium-place.podium-reveal .podium-crown {
    opacity: 1;
    transition-delay: 1.1s;
}
@keyframes medalSwing {
    0%, 100% { transform: rotate(-6deg); }
    50% { transform: rotate(6deg); }
}
.podium-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
}
.podium-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary, #333);
    width: 100%;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
    min-height: 2.4em;
    word-break: break-word;
    /* Nimi ilmub viivitusega pärast tulpa+skoori */
    opacity: 0;
    transition: opacity 0.5s ease;
}
.podium-place.podium-reveal .podium-name {
    opacity: 1;
    transition-delay: 1.1s;
}
.podium-score {
    font-weight: 700;
    color: #00d1b2;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-variant-numeric: tabular-nums;
}
/* Tulp — metalliline gradient + shine highlight + kasvab põhjast üles */
.podium-bar {
    width: 130px;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.6rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4), 0 0 8px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    box-shadow: 0 -3px 12px rgba(0,0,0,0.15), inset 0 2px 0 rgba(255,255,255,0.4);
    /* Kasvu-animatsioon: scaleY(0) → scaleY(1), origin põhjas. Käivitub kui parent saab .podium-reveal klassi. */
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s;
}
.podium-place.podium-reveal .podium-bar {
    transform: scaleY(1);
}
/* Shine highlight — vasakul üleval läikiv triip */
.podium-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(255,255,255,0.45) 0%,
        rgba(255,255,255,0.18) 25%,
        transparent 45%,
        rgba(0,0,0,0.12) 100%
    );
    pointer-events: none;
}
/* Kuld — rikkalikum gradient + kerge hõõg */
.podium-bar-1 {
    background: linear-gradient(180deg, #fff8c4 0%, #ffd700 25%, #e0a800 65%, #b8860b 100%);
    height: 160px;
    box-shadow: 0 0 30px rgba(255,215,0,0.45), 0 -3px 12px rgba(0,0,0,0.15), inset 0 2px 0 rgba(255,255,255,0.7);
}
/* Hõbe */
.podium-bar-2 {
    background: linear-gradient(180deg, #f5f5f5 0%, #c8c8c8 25%, #909090 65%, #707070 100%);
    height: 115px;
}
/* Pronks */
.podium-bar-3 {
    background: linear-gradient(180deg, #e8a673 0%, #cd7f32 25%, #8b5a1f 65%, #5d3d10 100%);
    height: 80px;
}

/* Team scores */
.team-scores-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.team-score-card {
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 120px;
}
.team-score-card .team-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}
.team-score-card .team-total {
    font-size: 1.5rem;
    font-weight: 800;
    color: #00d1b2;
}

/* ==========================================
   #14 HOST DARK THEME
   ========================================== */
[data-theme="dark"] .timer-bg {
    stroke: #444;
}
[data-theme="dark"] .timer-text {
    color: #fff;
}
[data-theme="dark"] .host-question-text {
    color: #fff;
}
[data-theme="dark"] .host-order-num {
    background: #00d1b2;
}

/* ==========================================
   #16 EMPTY STATES
   ========================================== */
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
}
.empty-state-sm {
    padding: 1.5rem 1rem;
}
.empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 1rem;
    opacity: 0.8;
}
.empty-state-sm .empty-state-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
}
.empty-state-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary, #333);
    margin-bottom: 0.5rem;
}
.empty-state-text {
    color: var(--text-secondary, #888);
    max-width: 350px;
    margin: 0 auto;
}

/* ==========================================
   #17 VISUAL BAR CHART (Results)
   ========================================== */
.host-results-bar-chart {
    margin-top: 1rem;
    padding: 0 1rem;
}
.bar-chart-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.bar-chart-label {
    width: 30%;
    min-width: 80px;
    max-width: 200px;
    flex-shrink: 0;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
    color: var(--text-primary, #333);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bar-chart-bar-wrap {
    flex: 1;
    height: 28px;
    background: #eee;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
[data-theme="dark"] .bar-chart-bar-wrap {
    background: #333;
}
.bar-chart-bar {
    height: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding-left: 0.75rem;
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 30px;
    transition: width 0.5s ease;
}
.bar-chart-bar.is-correct-bar {
    box-shadow: 0 0 12px rgba(72, 199, 142, 0.5);
}
.bar-chart-row:has(.is-correct-bar) {
    background: rgba(72, 199, 142, 0.1);
    border-radius: 6px;
    padding: 2px 4px;
    margin-left: -4px;
    margin-right: -4px;
}
.bar-chart-row:has(.is-correct-bar) .bar-chart-label {
    color: #48c78e;
}
.bar-chart-row:has(.is-correct-bar) .bar-chart-count {
    color: #48c78e;
    font-weight: 700;
}
.bar-chart-count {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 40px;
    color: var(--text-secondary, #888);
}

/* ==========================================
   #13 PREVIEW MODAL
   ========================================== */
.kv-type-dropdown {
    position: fixed;
    background: var(--bg-card, #fff);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 300;
    overflow: hidden;
    min-width: 160px;
}
[data-theme="dark"] .kv-type-dropdown {
    background: var(--bg-card, #1e2a4a);
}
.kv-type-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    background: none;
    color: var(--text-primary, #333);
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
}
.kv-type-dropdown-item:hover {
    background: var(--bg-hover, #f5f5f5);
}
[data-theme="dark"] .kv-type-dropdown-item:hover {
    background: var(--bg-hover, #2a3a5a);
}
.kv-type-dropdown-item.is-active {
    font-weight: 700;
    color: var(--accent-color, #3273dc);
}

.kv-bulk-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.kv-bulk-modal {
    background: var(--bg-card, #fff);
    color: var(--text-primary, #333);
    border-radius: 12px;
    width: 450px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
[data-theme="dark"] .kv-bulk-modal {
    background: var(--bg-card, #1e2a4a);
    color: var(--text-primary, #eee);
}

.preview-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.preview-modal {
    background: #f0f0f0;
    border-radius: 30px;
    width: 375px;
    max-width: 95vw;
    height: 700px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 8px solid #222;
}
[data-theme="dark"] .preview-modal {
    background: #1a1a2e;
}
.preview-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: #222;
    color: white;
    font-size: 0.8rem;
}
.preview-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}
.preview-question-text {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary, #333);
}
.preview-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}
.preview-option {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.preview-option.is-correct-preview {
    box-shadow: inset 0 0 0 3px rgba(255,255,255,0.5);
}

/* ==========================================
   #15 ANIMATED SCORE COUNT-UP
   ========================================== */
.lb-score-animate {
    display: inline-block;
}

/* ==========================================
   #5 LOBBY — PLAYER AVATARS & KICK
   ========================================== */
.player-tag-enhanced {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    background: var(--bg-secondary, #f5f5f5);
    font-weight: 600;
    font-size: 0.95rem;
    animation: fadeInUp 0.3s ease;
}
.player-tag-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 0.75rem;
}
.player-tag-kick {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #ccc;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}
.player-tag-kick:hover {
    color: #e21b3c;
    background: rgba(226, 27, 60, 0.1);
}
[data-theme="dark"] .player-tag-enhanced {
    background: #2a2a3e;
}

/* ==========================================
   #4 OPTION IMAGES
   ========================================== */
.host-option-img {
    height: 60px;
    max-width: 100px;
    object-fit: cover;
    border-radius: 6px;
    margin: 0 0.5rem;
}
.host-option.has-image {
    flex-direction: row;
    align-items: center;
}
.play-option-img {
    height: 48px;
    max-width: 80px;
    object-fit: cover;
    border-radius: 6px;
    margin: 0 0.25rem;
}
.play-option-btn.has-image {
    padding: 0.5rem 0.75rem;
}

/* Multi-select selected state */
.play-multi-btn.selected {
    border-color: var(--option-color);
    background: color-mix(in srgb, var(--option-color) 15%, var(--bg-secondary, white));
    box-shadow: 0 0 0 2px var(--option-color);
}

/* YouTube embed — host view */
.host-youtube-embed {
    width: 60vw;
    max-width: 800px;
    height: auto;
    aspect-ratio: 16/9;
    border: none;
    border-radius: 12px;
}
/* Video suurus vastavalt valikute arvule — cap lubab vw-l 4K-l täies mahus kehtida. */
.opts-2 .host-youtube-embed { width: 70vw; max-width: clamp(900px, 70vw, 2700px); }
.opts-3 .host-youtube-embed { width: 60vw; max-width: clamp(800px, 60vw, 2400px); }
.opts-4 .host-youtube-embed { width: 55vw; max-width: clamp(750px, 55vw, 2200px); }
.opts-5 .host-youtube-embed,
.opts-6 .host-youtube-embed { width: 45vw; max-width: clamp(650px, 45vw, 1800px); }
/* Sama piltide jaoks. 4K-spetsiifilised overrides allpool media query-des.
   FullHD baasväärtused: pilt täidab võimalikult palju vertikaalset ruumi.
   Suurendatud, et tühi ruum vasakul/all oleks minimaalne. */
.opts-2 .host-q-media .host-media-img { max-height: 82vh; }
.opts-3 .host-q-media .host-media-img { max-height: 76vh; }
.opts-4 .host-q-media .host-media-img { max-height: 72vh; }
.opts-5 .host-q-media .host-media-img,
.opts-6 .host-q-media .host-media-img { max-height: 60vh; }
@media screen and (max-width: 768px) {
    .host-youtube-embed {
        width: 95vw;
    }
}

/* YouTube — create view */
.kv-yt-time-inputs {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.kv-yt-time-inputs span {
    font-size: 0.8rem;
    color: var(--text-muted, #999);
}

/* ==========================================
   4K / suurte ekraanide tugi
   ========================================== */
@media screen and (min-width: 1800px) {
    .host-lobby-domain {
        font-size: 3.5rem;
    }
    .host-lobby-subtitle {
        font-size: 1.1rem;
    }
    .host-code {
        font-size: 5rem;
    }
    .host-lobby-qr {
        padding: 1.5rem;
    }
    .host-lobby-qr svg {
        width: 350px;
        height: 350px;
    }
    .host-lobby-right {
        gap: 2rem;
        padding: 3rem;
    }
}

/* ==========================================
   4K EKRAAN — suurem kirjastiil, laiem meedia, vähem tühja ruumi
   ========================================== */
@media screen and (min-width: 2400px) {
    /* Küsimuse teksti suurus on base-reeglis clamp()-iga — ära override'i siin */
    .host-q-media .host-media-img {
        max-height: 45vh;
        max-width: 60%;
        min-height: 300px;
    }
    /* opts-X spetsiifilised overrides — baasreeglis on need väiksemad
       (FullHD-l peavad valikud mahtuma), 4K-l on rohkem ruumi.
       Force `width` (mitte auto), et väiksemad pildi-originaalid (nt 800x600) ka skaleerituksid
       4K vaate täie laiusega kasutamiseks. */
    .host-q-media .host-media-img {
        width: clamp(900px, 55vw, 1800px);
        height: auto;
        max-width: 75%;
        min-height: 400px;
        object-fit: contain;
    }
    .opts-2 .host-q-media .host-media-img { max-height: 65vh; }
    .opts-3 .host-q-media .host-media-img { max-height: 60vh; }
    .opts-4 .host-q-media .host-media-img { max-height: 55vh; }
    .opts-5 .host-q-media .host-media-img,
    .opts-6 .host-q-media .host-media-img { max-height: 50vh; }
    .host-options-grid {
        gap: 1.5rem;
        padding: 0 2rem;
        max-width: 2800px;
        margin: 0 auto;
    }
    .host-q-options {
        gap: 1.5rem;
    }
    .host-option {
        padding: 2.6rem 2.8rem;
        font-size: 3.4rem;
        min-height: 170px;
        gap: 1.8rem;
    }
    .host-option-letter {
        width: 96px;
        height: 96px;
        font-size: 2.8rem;
    }
    .host-option-count {
        font-size: 2.2rem;
    }
    .host-option-check {
        font-size: 2.4rem;
        right: 1.5rem;
    }
    .host-option-result.is-correct-answer .host-option-count {
        margin-right: 3rem;
    }

    /* Hotspot — suurem pilt */
    .host-hotspot-container {
        max-width: 1100px;
    }
    .host-hotspot-img {
        max-height: 650px;
    }
    /* Hotspot küsimuse vaade 4K native: baasreeglis on `justify-content: space-around`,
       mis 4K vertikaalruumiga jätab pealkirja ja pildi vahele suure tühja vahe. Sunni keskosa-koondumine. */
    .host-q-content.no-media:has(.host-hotspot-container):not(.is-slide) {
        justify-content: center;
        gap: 1.5rem;
    }
    /* Pildi-tulemuse vaade (resultsScreen): pilt on `.host-result-media .host-media-img`.
       Baasreegel `max-height: 200px` on liiga väike — laiendame, aga jätame ruumi 4 valikule. */
    .host-content-area > .host-result-media {
        display: block;
        margin: 0 auto 0.6rem;
        max-width: 1100px;
        width: 100%;
    }
    .host-content-area > .host-result-media .host-media-img {
        max-width: 100%;
        max-height: 45vh;
        width: 100%;
        height: auto;
        object-fit: contain;
    }
    /* Pildi-tulemuse vaates pealkiri kompaktsem ja vähem margin-bottom — jätab pildile ruumi */
    .host-q-content:has(> .host-content-area > .host-result-media) > .host-q-text {
        margin-bottom: 0.6rem;
        font-size: 3.4rem;
    }
    /* Pildi-tulemuse vaates (pildi-küsimused) valikud kompaktsemad,
       et pilt + valikud mahuksid ekraanile. */
    .host-content-area:has(> .host-result-media) .host-option {
        font-size: 2rem;
        min-height: 90px;
        padding: 0.9rem 1.4rem;
    }
    .host-content-area:has(> .host-result-media) .host-option-letter {
        width: 56px;
        height: 56px;
        font-size: 1.6rem;
    }
    /* Sihtala statistika 4K native (≥2400px): pildi vähendus statistika korral
       on baasreeglis 320px — siin tagasi suuremaks, ja statistika fontid skaleeritud */
    .host-hotspot-result:has(.host-hotspot-stats) .host-hotspot-img {
        max-height: 540px;
    }
    .host-hotspot-stats {
        max-width: 1500px;
        gap: 0.6rem 1rem;
    }
    .host-hotspot-stat {
        padding: 0.6rem 1.1rem;
        gap: 0.9rem;
    }
    .host-hotspot-stat-num {
        font-size: 1.6rem;
        min-width: 2.6rem;
    }
    .host-hotspot-stat-icon {
        font-size: 1.6rem;
    }
    .host-hotspot-stat-bar {
        height: 16px;
    }
    .host-hotspot-stat-val {
        font-size: 1.5rem;
    }

    /* Topbar (küsimuse number, taimer, liitumiskood, nupud) — fondid base-reeglis clamp()-iga */
    .host-q-topbar {
        padding: 1rem 2rem 0.6rem;
    }
    .host-q-num,
    .host-q-answered {
        min-width: 220px;
    }
    .host-q-timerbar {
        height: 10px;
    }
    .host-q-controls {
        gap: 0.6rem;
    }
    .host-q-controls .button {
        /* Ikoon-ainult nupud — hoiame ruutukujulised */
        width: 3.4rem;
        height: 3.4rem;
        padding: 0;
        font-size: 1.2rem;
    }
    .host-q-controls .button .icon {
        font-size: 1.5rem;
        width: 1.5rem;
        height: 1.5rem;
    }

    /* Leaderboard, host-option-text ja host-option-count — base clamp()-iga */

    /* Tulemuste ekraani küsimuse tekst ja skaala on base clamp()-iga — ära override'i siin. */

    /* Slide (infoslaid) tekst base clamp()-iga; siin ainult pilt */
    .host-q-content.is-slide .host-q-media .host-media-img {
        max-height: 70vh;
        max-width: 85%;
        min-height: 500px;
    }

    /* Lobi */
    .host-lobby-title { font-size: 2.2rem; }
    .host-lobby-player-count { font-size: 2.2rem; }
    .host-lobby-toolbar-btn {
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
    }
    .host-lobby-domain { font-size: 4rem; }
    .host-lobby-subtitle { font-size: 1.3rem; }
    .player-tags-empty i { font-size: 4rem; }
    .player-tags-empty p { font-size: 1.8rem; }

    /* Tulemuste alumine nupuriba — "Järgmine küsimus" / "Edetabel" */
    .host-results-bottom-bar {
        padding: 1.2rem 2.4rem;
        gap: 1.2rem;
    }
    .host-results-bottom-bar .button {
        font-size: 1.6rem;
        padding: 1.2rem 2rem;
        height: auto;
    }
    .host-results-bottom-bar .button .icon {
        font-size: 1.6rem;
    }

    /* Mängijate modaal */
    .host-players-modal-content {
        padding: 2.4rem;
        max-width: 720px;
    }
    .host-players-modal-header h3 { font-size: 2rem; }
    .host-players-modal-close { font-size: 2rem; }
    .host-players-modal-item { padding: 1rem 1.2rem; }
    .host-players-modal-item-name { font-size: 1.5rem; }
    .host-players-modal-item-score { font-size: 1.5rem; }
    .host-players-modal-rename,
    .host-players-modal-kick {
        font-size: 1.2rem;
        padding: 0.6rem 1rem;
    }
    .host-players-modal-empty { font-size: 1.6rem; }

    /* Hotspot — markerid pildi peal */
    .host-hotspot-dot {
        width: 22px;
        height: 22px;
        border-width: 3px;
    }
    .host-hotspot-correct { border-width: 5px; }


    /* Match (paaride sobitamine) — laiemad kaardid pikemate tekstide jaoks 4K native (≥2400px) */
    .host-match-display { max-width: 2600px; }
    .host-match-columns { gap: 3rem; }
    .host-match-col { max-width: 1200px; gap: 1rem; }
    .host-match-item {
        font-size: 2.4rem;
        padding: 1.6rem 2rem;
        gap: 1rem;
    }
    .host-match-num {
        width: 56px;
        height: 56px;
        font-size: 1.8rem;
    }
    .host-match-results { max-width: 1600px; }
    .host-match-pair {
        padding: 1.4rem 2rem;
        gap: 1.5rem;
    }
    .host-match-pair-left,
    .host-match-pair-right { font-size: 2.2rem; }
    .host-match-pair-arrow { font-size: 2.2rem; }

    /* Podium (lõpuvaade) */
    .podium-place {
        width: 220px;
        flex: 0 0 220px;
    }
    .podium-avatar {
        width: 80px;
        height: 80px;
        font-size: 2.2rem;
    }
    .podium-name {
        font-size: 1.6rem;
        max-width: 220px;
    }
    .podium-score { font-size: 1.6rem; }
    .podium-bar {
        width: 190px;
        font-size: 3.6rem;
    }
    .podium-bar-1 { height: 240px; }
    .podium-bar-2 { height: 170px; }
    .podium-bar-3 { height: 120px; }

    /* Tiimide skoorikaardid */
    .team-score-card {
        padding: 1.4rem 2rem;
        min-width: 180px;
    }
    .team-score-card .team-name { font-size: 1.5rem; }
    .team-score-card .team-total { font-size: 2.2rem; }

    /* Slider — õige vastuse silt + tihedusgraafik */
    .host-slider-density { height: 110px; }
    .host-slider-correct-badge {
        font-size: 1.4rem;
        padding: 0.5rem 1rem;
    }

    /* Pausi teade */
    .pause-join-info { font-size: 1.8rem; }
}

/* Väga suur ekraan (5K+) */
@media screen and (min-width: 3200px) {
    /* Küsimuse tekst base clamp()-iga — ära override'i */
    .host-q-options {
        max-width: 2900px;
        gap: 1.8rem;
    }
    .host-option {
        font-size: 4rem;
        min-height: 200px;
    }
    .host-option-letter {
        width: 116px;
        height: 116px;
        font-size: 3.2rem;
    }
    .host-option-check {
        font-size: 3rem;
        right: 1.8rem;
    }
    .host-option-result.is-correct-answer .host-option-count {
        margin-right: 3.6rem;
    }
    .host-hotspot-img {
        max-height: 800px;
    }
    /* Topbar fondid, leaderboard, host-option-text/count — base clamp()-iga */
    .host-q-controls .button {
        width: 4rem;
        height: 4rem;
    }
    .host-q-controls .button .icon {
        font-size: 1.9rem;
        width: 1.9rem;
        height: 1.9rem;
    }
    .host-q-content.is-slide .host-q-media .host-media-img {
        max-height: 75vh;
        max-width: 90%;
        min-height: 700px;
    }
    /* opts-X spetsiifilised overrides 5K+ jaoks */
    /* Force `width` (mitte auto), et väiksemad pildid (nt 800x600) skaleerituksid 4K@200%-l täie laiusega */
    .host-q-media .host-media-img {
        width: clamp(700px, 50vw, 1200px);
        height: auto;
        max-width: 80%;
        min-height: 500px;
        object-fit: contain;
    }
    .opts-2 .host-q-media .host-media-img { max-height: 70vh; }
    .opts-3 .host-q-media .host-media-img { max-height: 65vh; }
    .opts-4 .host-q-media .host-media-img { max-height: 60vh; }
    .opts-5 .host-q-media .host-media-img,
    .opts-6 .host-q-media .host-media-img { max-height: 55vh; }

    /* Lobi */
    .host-lobby-title { font-size: 2.8rem; }
    .host-lobby-player-count { font-size: 2.8rem; }
    .host-lobby-toolbar-btn { width: 64px; height: 64px; font-size: 1.7rem; }
    .host-lobby-domain { font-size: 5rem; }
    .host-lobby-subtitle { font-size: 1.6rem; }
    .player-tags-empty i { font-size: 5rem; }
    .player-tags-empty p { font-size: 2.2rem; }

    /* Tulemuste alumine nupuriba */
    .host-results-bottom-bar .button {
        font-size: 2rem;
        padding: 1.5rem 2.6rem;
    }
    .host-results-bottom-bar .button .icon { font-size: 2rem; }

    /* Mängijate modaal */
    .host-players-modal-content { padding: 3rem; max-width: 880px; }
    .host-players-modal-header h3 { font-size: 2.4rem; }
    .host-players-modal-item-name { font-size: 1.8rem; }
    .host-players-modal-item-score { font-size: 1.8rem; }
    .host-players-modal-rename, .host-players-modal-kick {
        font-size: 1.5rem;
        padding: 0.75rem 1.2rem;
    }

    /* Hotspot */
    .host-hotspot-dot { width: 28px; height: 28px; border-width: 4px; }
    .host-hotspot-correct { border-width: 6px; }

    /* Match */
    .host-match-display { max-width: 2200px; }
    .host-match-col { max-width: 1000px; gap: 1.2rem; }
    .host-match-item { font-size: 2.8rem; padding: 2rem 2.4rem; }
    .host-match-num { width: 64px; height: 64px; font-size: 2rem; }
    .host-match-results { max-width: 1900px; }
    .host-match-pair-left, .host-match-pair-right { font-size: 2.6rem; }
    .host-match-pair-arrow { font-size: 2.6rem; }

    /* Podium */
    .podium-place { width: 280px; flex: 0 0 280px; }
    .podium-avatar { width: 100px; height: 100px; font-size: 2.8rem; }
    .podium-name { font-size: 2rem; max-width: 280px; }
    .podium-score { font-size: 2rem; }
    .podium-bar { width: 240px; font-size: 4.4rem; }
    .podium-bar-1 { height: 300px; }
    .podium-bar-2 { height: 215px; }
    .podium-bar-3 { height: 150px; }

    /* Tiimide skoorikaardid */
    .team-score-card .team-name { font-size: 1.8rem; }
    .team-score-card .team-total { font-size: 2.8rem; }

    /* Slider */
    .host-slider-density { height: 140px; }
    .host-slider-correct-badge { font-size: 1.7rem; }

    /* Pausi teade */
    .pause-join-info { font-size: 2.2rem; }
}

/* Kõrge DPR keskmise viewport-iga (nt 4K ekraan 200% skaleeringuga: DPR=2, viewport ~1920;
   või 4K ekraan 150% skaleeringuga: DPR=1.5, viewport ~2560 — viimane jääb max-width alla).
   vw-põhised clamp'id ei skaleeru siin piisavalt — forceme suuremad väärtused.
   max-width 2399.99px tagab, et suurematel viewportidel kehtivad min-width: 2400px+ blokid (mis tulevad enne).
   NB: high-DPR + viewport >= 2400 (nt 4K@150%) lähevad otse min-width: 2400px+ blokile. */
@media screen and (min-resolution: 1.5dppx) and (min-width: 1600px) and (max-width: 2399.99px) {
    .host-q-text {
        font-size: 4.5rem;
    }
    #resultsScreen .host-q-text {
        font-size: 5rem;
    }
    .host-q-content:not(.no-media) .host-q-text {
        font-size: 3rem;
    }
    .host-type-cloud-word {
        font-size: 4rem;
    }
    .host-type-cloud-correct {
        font-size: 2.2rem;
    }
    .host-multi-cat-label {
        font-size: 1.6rem;
    }
    .host-multi-cat-val {
        font-size: 3.6rem;
    }
    .host-multi-cat {
        padding: 1.5rem 2rem;
    }
    .host-slider-label {
        font-size: 3rem;
    }
    .host-slider-stat-val {
        font-size: 3rem;
    }
    .host-slider-stat-label {
        font-size: 1.3rem;
    }
    .host-q-options {
        max-width: 1500px;
        gap: 1.2rem;
    }
    .host-option {
        font-size: 2.6rem;
        min-height: 130px;
        padding: 1.4rem 1.8rem;
    }
    .host-option-letter {
        width: 76px;
        height: 76px;
        font-size: 2.2rem;
    }
    .host-option-check {
        font-size: 1.9rem;
        right: 1.2rem;
    }
    .host-option-result.is-correct-answer .host-option-count {
        margin-right: 2.5rem;
    }
    .host-q-num,
    .host-q-answered {
        font-size: 1.6rem;
        min-width: 220px;
    }
    .host-q-num strong,
    .host-q-answered strong {
        font-size: 1.9rem;
    }
    .host-q-time {
        font-size: 2.4rem;
    }
    .host-q-controls .button {
        width: 3.4rem;
        height: 3.4rem;
        font-size: 1.2rem;
    }
    .host-q-controls .button .icon {
        font-size: 1.5rem;
        width: 1.5rem;
        height: 1.5rem;
    }
    .lb-name,
    .host-option-text {
        font-size: 1.9rem;
    }
    .lb-score {
        font-size: 1.7rem;
    }
    .host-audio-player {
        max-width: 800px;
        padding: 1.2rem 2.4rem;
        gap: 1.5rem;
    }
    .host-audio-btn {
        width: 72px;
        height: 72px;
        font-size: 1.8rem;
    }
    .host-audio-progress {
        height: 10px;
    }
    .host-audio-time {
        font-size: 1.6rem;
        min-width: 60px;
    }
    .host-delay-open-btn {
        font-size: 1.6rem !important;
        padding: 0.9rem 1.8rem !important;
    }
    .host-order-items {
        gap: 1.1rem;
    }
    .host-order-item {
        font-size: 2.2rem;
        padding: 1.6rem 2.4rem;
    }
    .host-order-num {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
        margin-right: 1.6rem;
    }
    .host-match-pair-stat {
        font-size: 1.8rem;
        padding: 0.5rem 1.2rem;
        margin-left: 1.8rem;
    }
    /* Pildi-tulemuse vaade (resultsScreen) 4K@200% — pilt on
       `.host-result-media .host-media-img` (max-height:200px baasis, mis on liiga väike).
       Jätame piisavalt ruumi pealkirja + 4 valiku jaoks. */
    .host-content-area > .host-result-media {
        display: block;
        margin: 0 auto 0.6rem;
        max-width: 950px;
        width: 100%;
    }
    .host-content-area > .host-result-media .host-media-img {
        max-width: 100%;
        max-height: 45vh;
        width: 100%;
        height: auto;
        object-fit: contain;
    }
    /* Pealkiri kompaktsem pildi-tulemuste vaates */
    .host-q-content:has(> .host-content-area > .host-result-media) > .host-q-text {
        margin-bottom: 0.6rem;
        font-size: 3rem;
    }
    /* Valikud kompaktsemad */
    .host-content-area:has(> .host-result-media) .host-option {
        font-size: 1.9rem;
        min-height: 80px;
        padding: 0.85rem 1.2rem;
    }
    .host-content-area:has(> .host-result-media) .host-option-letter {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
    /* Sihtala (hotspot) — 4K@200% (DPR≥1.5, viewport 1600-2399px). Pilt ja statistika
       on baas-reegliga FullHD jaoks; siin suurendame, sest 4K ekraanil jääks 400px liiga väikseks. */
    .host-hotspot-container {
        max-width: 1600px;
    }
    .host-hotspot-img {
        max-height: 720px;
    }
    .host-hotspot-result:has(.host-hotspot-stats) .host-hotspot-img {
        max-height: 600px;
    }
    .host-hotspot-stats {
        max-width: 1500px;
        gap: 0.5rem 0.8rem;
    }
    .host-hotspot-stat {
        padding: 0.5rem 1rem;
        gap: 0.85rem;
    }
    .host-hotspot-stat-num {
        font-size: 1.5rem;
        min-width: 2.4rem;
    }
    .host-hotspot-stat-icon {
        font-size: 1.5rem;
    }
    .host-hotspot-stat-bar {
        height: 14px;
    }
    .host-hotspot-stat-val {
        font-size: 1.4rem;
    }
    /* Tulemuste histogramm — vw-clamp on 1920 viewport-il liiga väike */
    .host-results-bars {
        height: 360px;
        gap: 1.5rem;
        padding-top: 2.6rem;
    }
    .host-results-bar-col {
        max-width: 160px;
    }
    .host-results-bar-value {
        font-size: 1.8rem;
    }
    .host-results-bar-fill .bar-letter {
        font-size: 1.4rem;
        bottom: 8px;
    }
    .host-results-kahoot .host-q-options {
        gap: 1rem;
    }
    .host-results-kahoot .host-q-options .host-option {
        padding: 1rem 1.5rem;
        font-size: 2rem;
    }
    .host-results-kahoot .host-q-options .host-option-letter {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
    }

    /* Lobi */
    .host-lobby-title { font-size: 1.8rem; }
    .host-lobby-player-count { font-size: 1.8rem; }
    .host-lobby-toolbar-btn { width: 44px; height: 44px; font-size: 1.1rem; }
    .host-lobby-domain { font-size: 3rem; }
    .host-lobby-subtitle { font-size: 1.1rem; }
    .player-tags-empty i { font-size: 3.2rem; }
    .player-tags-empty p { font-size: 1.4rem; }

    /* Tulemuste alumine nupuriba */
    .host-results-bottom-bar {
        padding: 0.9rem 1.8rem;
    }
    .host-results-bottom-bar .button {
        font-size: 1.3rem;
        padding: 0.9rem 1.5rem;
        height: auto;
    }
    .host-results-bottom-bar .button .icon { font-size: 1.3rem; }

    /* Mängijate modaal */
    .host-players-modal-content { padding: 1.8rem; max-width: 600px; }
    .host-players-modal-header h3 { font-size: 1.6rem; }
    .host-players-modal-close { font-size: 1.6rem; }
    .host-players-modal-item { padding: 0.8rem 1rem; }
    .host-players-modal-item-name { font-size: 1.2rem; }
    .host-players-modal-item-score { font-size: 1.2rem; }
    .host-players-modal-rename, .host-players-modal-kick {
        font-size: 1rem;
        padding: 0.45rem 0.7rem;
    }

    /* Hotspot */
    .host-hotspot-dot { width: 18px; height: 18px; }
    .host-hotspot-correct { border-width: 4px; }

    /* Match — laiemad kaardid pikemate tekstide jaoks 4K@200% (DPR≥1.5, 1600-2399px) */
    .host-match-display { max-width: 2000px; }
    .host-match-col { max-width: 950px; gap: 0.8rem; }
    .host-match-item {
        font-size: 1.9rem;
        padding: 1.3rem 1.6rem;
    }
    .host-match-num { width: 44px; height: 44px; font-size: 1.4rem; }
    .host-match-results { max-width: 1800px; }
    .host-match-pair-left, .host-match-pair-right { font-size: 1.7rem; }
    .host-match-pair-arrow { font-size: 1.7rem; }

    /* Podium */
    .podium-place { width: 180px; flex: 0 0 180px; }
    .podium-avatar { width: 68px; height: 68px; font-size: 1.8rem; }
    .podium-name { font-size: 1.3rem; max-width: 180px; }
    .podium-score { font-size: 1.3rem; }
    .podium-bar { width: 160px; font-size: 3rem; }
    .podium-bar-1 { height: 200px; }
    .podium-bar-2 { height: 145px; }
    .podium-bar-3 { height: 100px; }

    /* Tiimide skoorikaardid */
    .team-score-card { padding: 1.2rem 1.8rem; min-width: 150px; }
    .team-score-card .team-name { font-size: 1.2rem; }
    .team-score-card .team-total { font-size: 1.8rem; }

    /* Slider */
    .host-slider-density { height: 95px; }
    .host-slider-correct-badge { font-size: 1.2rem; padding: 0.4rem 0.85rem; }

    /* Pausi teade */
    .pause-join-info { font-size: 1.5rem; }

    /* opts-X spetsiifilised overrides — viewport on ~1920, aga DPR=2,
       seega vh-d on füüsilises mõttes piisavalt suured. */
    .host-q-media .host-media-img {
        max-width: 75%;
        min-height: 320px;
    }
    .opts-2 .host-q-media .host-media-img { max-height: 50vh; }
    .opts-3 .host-q-media .host-media-img { max-height: 45vh; }
    .opts-4 .host-q-media .host-media-img { max-height: 40vh; }
    .opts-5 .host-q-media .host-media-img,
    .opts-6 .host-q-media .host-media-img { max-height: 38vh; }
}
.kv-media-dropzone-wrap {
    display: flex;
    flex-direction: column;
    border: 2px dashed var(--border-color, #ccc);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.kv-media-dropzone-wrap .kv-media-dropzone {
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    flex: 1;
}
.kv-media-dropzone-yt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem;
    background: rgba(204, 0, 0, 0.05);
    border-top: 1px dashed var(--border-color, #ccc);
    color: #cc0000;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.kv-media-dropzone-yt:hover {
    background: rgba(204, 0, 0, 0.1);
}
[data-theme="dark"] .kv-media-dropzone-yt {
    background: rgba(204, 0, 0, 0.1);
}
[data-theme="dark"] .kv-media-dropzone-yt:hover {
    background: rgba(204, 0, 0, 0.18);
}
.kv-yt-preview {
    position: relative;
    display: inline-block;
}
.kv-yt-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: #e53935;
    opacity: 0.85;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    pointer-events: none;
}
.kv-yt-time-info {
    display: block;
    text-align: center;
    color: var(--text-muted, #999);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}
.kv-yt-form {
    background: var(--bg-card, #fff);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 480px;
    width: 90vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.kv-yt-lightbox-iframe {
    width: 90vw;
    max-width: 800px;
    height: 50vh;
    max-height: 450px;
    border: none;
    border-radius: 12px;
}

/* Avalikustamise modaali jalus — nupud ühel real ka mobiilis */
.pub-modal-foot { gap: 0.5rem; flex-wrap: nowrap; }
@media screen and (max-width: 480px) {
    .pub-modal-foot { padding: 0.75rem 1rem; gap: 0.4rem; }
    .pub-modal-foot .button {
        padding-left: 0.6rem;
        padding-right: 0.6rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
}

/* A11y: respekteeri OS-i "vähenda animatsioone" seadet (vestibulaarprobleemid, ADHD jms).
   Animatsioonid ei kao täielikult, kuid kestus lühike ja muutused kohe. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
