:root {
    --jury-bg: #030267;
    --jury-bar: #2C19FF;
    --jury-btn: #D1B67B;
    --jury-text: #fff;
    --jury-selected: #fff;
}

html.flash-red,
html.flash-red body,
html.flash-red #app {
    background: #cc0000 !important;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: var(--jury-bg);
    color: var(--jury-text);
    font-family: Arial, Helvetica, sans-serif;
    touch-action: manipulation;
}

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.jury-login {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 20px 40px;
}
.jury-login-form {
    width: 100%;
    max-width: 330px;
    text-align: center;
}
.jury-login-form h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--jury-text);
}
.jury-login-form input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    text-align: center;
    border: 0;
    border-radius: 4px;
}
.jury-login-form button,
.sendScore {
    width: 100%;
    margin-top: 18px;
    padding: 14px 10px;
    border: 0;
    background: var(--jury-btn);
    color: var(--jury-text);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
}
.jury-error { color: #ffb4b4; margin: 12px 0; text-align: center; }

#app { background: var(--jury-bg); min-height: 100vh; padding-bottom: 24px; }

.appHeader .title {
    background: #fff;
    color: var(--jury-bg);
    text-transform: uppercase;
    text-align: center;
    padding: 10px 44px;
    font-weight: 700;
    position: relative;
}
.menu { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); }
.menu-toggle {
    background: transparent;
    border: 0;
    font-size: 1.3rem;
    color: var(--jury-bg);
    padding: 4px 8px;
}
.menu-panel {
    position: absolute;
    left: 0;
    top: 100%;
    background: #fff;
    min-width: 140px;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    z-index: 20;
    text-align: left;
}
.menu-panel a,
.menu-panel button {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: #fff;
    border: 0;
    color: #111;
    text-align: left;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
}

.round {
    text-align: center;
    text-transform: uppercase;
    padding: 12px 8px;
    color: var(--jury-text);
}
.jury-meta {
    display: flex;
    text-transform: uppercase;
    color: var(--jury-text);
}
.jury-meta > div {
    width: 50%;
    text-align: center;
    padding: 10px 6px;
}

.nav-row {
    display: flex;
    align-items: center;
    color: var(--jury-text);
}
.nav-btn {
    width: 48px;
    height: 48px;
    background: transparent;
    border: 0;
    color: var(--jury-text);
    font-size: 1.4rem;
}
.contestant-name {
    flex: 1;
    text-align: center;
    text-transform: uppercase;
    font-weight: 700;
    padding: 10px 4px;
    color: var(--jury-text);
}

.category-title {
    background: var(--jury-bar);
    color: var(--jury-text);
    padding: 8px 12px;
    text-align: left;
}
.set {
    display: flex;
    align-items: center;
    padding: 8px 6px 8px 4px;
}
.numberPoints {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(10, 34px);
    justify-content: start;
    align-items: center;
    gap: 6px;
}
@media (max-width: 480px) {
    .numberPoints {
        grid-template-columns: repeat(5, 34px);
    }
}
.score-btn {
    width: 34px;
    height: 34px;
    border: 0;
    background: var(--jury-btn);
    color: var(--jury-text);
    font-size: 16px;
    font-weight: 700;
}
.score-btn.selected-score {
    background: var(--jury-selected);
    color: var(--jury-bg);
}
.points {
    width: 48px;
    text-align: center;
    font-size: 22px;
    color: var(--jury-text);
    flex-shrink: 0;
}
.total_score {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    padding: 12px 0;
    color: var(--jury-text);
}
.appTotal { padding: 0 12px 20px; }
.sendScore { margin: 0 auto; max-width: 100%; }

.empty { text-align: center; padding: 40px 16px; }

#jury-popup {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    padding: 20px;
}
#jury-popup.hidden { display: none !important; }
.jury-popup-card {
    width: 100%;
    max-width: 320px;
    background: #fff;
    color: #111;
    border-radius: 8px;
    padding: 22px 18px;
    text-align: center;
}
.jury-popup-card--error {
    background: #dc2626;
    color: #fff;
}
.jury-popup-card p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.4;
}
.jury-popup-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}
.jury-popup-actions.hidden { display: none !important; }
.jury-popup-actions button {
    flex: 1;
    padding: 12px 10px;
    border: 0;
    font-size: 1rem;
    font-weight: 700;
}
#jury-popup-no {
    background: #e5e5e5;
    color: #111;
}
#jury-popup-yes {
    background: var(--jury-btn);
    color: var(--jury-text);
}
