:root {
    --font-display: sans-serif;
    --font-body: sans-serif;

    --bg-midnight: #070d19;
    --bg-deep: #0c1424;
    --bg-panel: #121f34;
    --bg-panel-soft: #1a2a45;

    --text-main: #eaf3ff;
    --text-muted: #9eb0c9;

    --plaintiff: #2f7dff;
    --defense: #ff4b2e;
    --undecided: #8f96a6;

    --accent-gold: #ffbf47;
    --accent-green: #41cf7a;
    --accent-red: #ff5a5a;
    --accent-cyan: #3db9ff;

    --border: rgba(120, 160, 210, 0.35);
    --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--text-main);
    font-family: var(--font-body);
    background: radial-gradient(circle at top, #243451 0%, var(--bg-midnight) 42%, #05080f 100%);
    min-height: 100vh;
}

.scene-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(120deg, rgba(255, 160, 60, 0.12), transparent 28%), linear-gradient(220deg, rgba(47, 125, 255, 0.15), transparent 35%);
    opacity: 0.8;
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(6px);
    background: rgba(6, 12, 24, 0.86);
}

.brand {
    font-family: var(--font-display);
    letter-spacing: 1px;
}

.top-nav nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 16px;
    font-weight: 600;
}

.top-nav nav a:hover { color: var(--text-main); }

.page-wrap {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.panel-shell {
    max-width: 1400px;
    margin: 0 auto;
}

.status-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.status-strip > div {
    background: linear-gradient(180deg, rgba(23, 40, 68, 0.95), rgba(13, 24, 41, 0.95));
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 1.1rem;
}

.control-grid {
    display: grid;
    grid-template-columns: 320px 1fr 300px;
    gap: 14px;
}

.module {
    background: linear-gradient(180deg, rgba(20, 32, 54, 0.98), rgba(10, 17, 30, 0.98));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    box-shadow: var(--shadow-lg);
}

.module h1, .module h2, .module h3, .module h4 {
    font-family: var(--font-display);
    margin-top: 0;
    letter-spacing: 0.8px;
}

.question-label {
    margin-bottom: 0;
    color: var(--text-muted);
}

#currentQuestionText { margin-top: 4px; }

.question-type span {
    color: var(--accent-cyan);
    font-weight: 600;
}

.answer-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 10px 0 14px;
}

.answer-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-red);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.35) inset;
}

.answer-dot.done { background: var(--accent-green); }

.btn {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    cursor: pointer;
}

.btn.blue { background: linear-gradient(180deg, #2e85ff, #1c4f96); }
.btn.amber { background: linear-gradient(180deg, #e2a13f, #8d5a11); }
.btn.steel { background: linear-gradient(180deg, #65748f, #3d4659); }
.btn.success { background: linear-gradient(180deg, #39bf75, #1f7d4a); }
.btn.subtle { background: linear-gradient(180deg, #2a3449, #1b2437); }

.inline-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.timeline-box { margin-top: 10px; }
.phase-row {
    border: 1px solid rgba(129, 154, 196, 0.25);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}
.phase-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    cursor: pointer;
    background: rgba(15, 26, 45, 0.8);
}
.phase-questions {
    padding: 8px;
    display: none;
}
.phase-row.open .phase-questions { display: block; }
.question-item {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 6px;
    margin-bottom: 6px;
    cursor: pointer;
}
.question-item.live { border-color: var(--accent-gold); }

.jury-seats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.seat {
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.2);
    background: #23324b;
}

.seat.plaintiff { background: linear-gradient(180deg, #3b86ff, #1f4f93); }
.seat.defense { background: linear-gradient(180deg, #ff694b, #9f2e1c); }
.seat.undecided { background: linear-gradient(180deg, #8e94a3, #596172); }
.seat.flash { animation: flashSeat 0.6s ease-in-out; }

@keyframes flashSeat {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.9); }
    100% { filter: brightness(1); }
}

.lean-totals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    text-align: center;
    margin-bottom: 12px;
}

.lean-totals span {
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    padding: 8px;
}

#leanHeatDots {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.heat-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    margin: 0 auto;
    opacity: 0.35;
}
.heat-dot.active { opacity: 1; box-shadow: 0 0 12px currentColor; }

.captured-box, .results-box, .movement-box {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 12px;
    padding-top: 10px;
}

.stack-list {
    max-height: 300px;
    overflow: auto;
}

.stack-item {
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 8px;
    background: rgba(16, 26, 44, 0.9);
}

.table-shell {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid rgba(96, 118, 154, 0.35);
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
}

.data-table th {
    color: #d4e2f7;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-size: 12px;
    background: rgba(12, 21, 36, 0.6);
}

.data-table tbody tr:hover {
    background: rgba(36, 52, 80, 0.35);
}

.table-actions {
    white-space: nowrap;
}

.table-actions .btn,
.table-actions a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 92px;
    margin: 0 6px 0 0;
}

.table-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 18px 12px;
}

.table-pager {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.pager-btn {
    border: 1px solid rgba(128, 153, 191, 0.42);
    background: linear-gradient(180deg, #223047, #162133);
    color: #d8e6fb;
    border-radius: 6px;
    min-width: 40px;
    height: 36px;
    padding: 0 12px;
    cursor: pointer;
}

.pager-btn.active {
    border-color: #6eb0ff;
    box-shadow: inset 0 0 0 1px rgba(110, 176, 255, 0.35);
    color: #ffffff;
}

.setup-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

label { display: block; margin-bottom: 6px; color: var(--text-muted); }
input, select, textarea {
    width: 100%;
    margin-bottom: 8px;
    border: 1px solid rgba(157, 180, 220, 0.35);
    border-radius: 8px;
    padding: 9px;
    color: var(--text-main);
    background: rgba(7, 14, 26, 0.9);
    font-family: var(--font-body);
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal.hidden { display: none; }
.modal-body {
    width: min(520px, 92vw);
    background: linear-gradient(180deg, #1d2d4a, #101a2d);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
}

.juror-shell, .juror-device {
    width: min(460px, 96vw);
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(32, 45, 68, 0.97), rgba(12, 20, 35, 0.97));
    padding: 16px;
    box-shadow: var(--shadow-lg);
}

.field-row {
    margin-bottom: 12px;
}

.field-label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-weight: 600;
}

.radio-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 4px 0 8px;
}

.radio-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--text-main);
    font-weight: 500;
}

.radio-option input[type='radio'] {
    width: auto;
    margin: 0;
}

.device-status {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--text-muted);
}

.choice-stack {
    display: grid;
    gap: 10px;
    margin: 14px 0;
}

.choice-btn {
    width: 100%;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 14px;
    font-size: 1.8rem;
    font-family: var(--font-display);
    color: #fff;
    cursor: pointer;
    background: linear-gradient(180deg, #31435f, #1a2538);
}

.choice-btn[data-choice-key='plaintiff'] { background: linear-gradient(180deg, #3c89ff, #1f4f95); }
.choice-btn[data-choice-key='defense'] { background: linear-gradient(180deg, #f65a36, #a82e17); }
.choice-btn[data-choice-key='undecided'] { background: linear-gradient(180deg, #7d8492, #555d6e); }

.choice-btn.selected { box-shadow: 0 0 0 3px var(--accent-green) inset; }

.confidence-wrap {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 12px;
    padding-top: 12px;
}

.submit-confirmation {
    margin-top: 12px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    text-align: center;
}

@media (max-width: 1024px) {
    .control-grid { grid-template-columns: 1fr; }
    .setup-grid { grid-template-columns: 1fr; }
    .status-strip { grid-template-columns: 1fr; }
}

/* Control panel redesign */
body.control-room-page {
    background:
        radial-gradient(1100px 420px at 50% 0%, rgba(151, 72, 37, 0.24), transparent 64%),
        linear-gradient(180deg, #1d0f0b 0%, #0b0d15 34%, #05070d 100%);
    color: #d8e2f2;
}

.control-room-page .top-nav {
    display: none;
}

.control-room-page .page-wrap {
    padding: 24px;
}

.control-room-shell {
    max-width: 1160px;
    margin: 0 auto;
    position: relative;
    padding-bottom: 76px;
}

.control-room-shell::before {
    /* content: ''; */
    position: absolute;
    left: 50%;
    bottom: 16px;
    width: 220px;
    height: 50px;
    transform: translateX(-50%);
    border-radius: 0 0 8px 8px;
    background: linear-gradient(180deg, rgba(14, 22, 39, 0.92), rgba(4, 7, 14, 0.97));
    border: 1px solid rgba(86, 109, 144, 0.45);
    box-shadow: 0 18px 28px rgba(0, 0, 0, 0.55);
}

.monitor-frame {
    border: 1px solid rgba(138, 163, 198, 0.4);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(7, 12, 24, 0.95), rgba(4, 7, 15, 0.96)),
        linear-gradient(130deg, rgba(22, 38, 70, 0.4), transparent 42%);
    box-shadow:
        inset 0 1px 0 rgba(195, 219, 255, 0.18),
        inset 0 -1px 0 rgba(24, 36, 61, 0.85),
        0 20px 48px rgba(0, 0, 0, 0.6);
    padding: 8px 8px 14px;
}

.display-title {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(74, 98, 134, 0.55);
    border-radius: 6px;
    background: linear-gradient(180deg, #1c2234, #11182a);
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: 2px;
    color: #b9bfcc;
    text-transform: uppercase;
    text-shadow: 0 1px 0 #0b0f1c;
    margin: 0;
}

.courtroom-ribbon {
    position: relative;
    height: 86px;
    margin-top: 8px;
    border: 1px solid rgba(82, 108, 150, 0.5);
    border-radius: 6px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    align-items: start;
    padding: 10px 14px;
    background:
        radial-gradient(circle at 50% 16%, rgba(132, 75, 44, 0.65), transparent 44%),
        linear-gradient(180deg, rgba(30, 14, 9, 0.74), rgba(13, 8, 9, 0.84));
}

.courtroom-ribbon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 175, 90, 0.1), rgba(110, 160, 255, 0.1));
    pointer-events: none;
}

.ribbon-left,
.ribbon-right {
    position: relative;
    z-index: 1;
    font-family: var(--font-body);
    font-size: 16px;
    white-space: nowrap;
    color: #c6cfe1;
}

.ribbon-right {
    justify-self: end;
}

.ribbon-left strong,
.ribbon-right strong {
    color: #ffcf66;
    font-weight: 700;
}

.status-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #7e8ca8;
    box-shadow: 0 0 0 1px #40557f;
    margin-right: 6px;
}

.ribbon-gap {
    color: #667ca5;
    margin: 0 6px;
}

.ribbon-center {
    height: 100%;
}

.display-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 258px 1fr 274px;
    gap: 10px;
}

.display-panel {
    border: 1px solid rgba(80, 107, 149, 0.5);
    border-radius: 4px;
    background: linear-gradient(180deg, rgba(12, 21, 39, 0.98), rgba(8, 13, 25, 0.98));
    box-shadow: inset 0 1px 0 rgba(142, 175, 229, 0.16);
    padding: 10px;
}

.display-panel h2,
.display-panel h4 {
    margin: 0 0 10px;
    font-family: var(--font-body);
    font-size: 14px;
    letter-spacing: 0.7px;
    color: #b9c9e4;
    text-transform: uppercase;
}

.display-panel h3 {
    margin: 0 0 8px;
    font-family: var(--font-body);
    font-size: 26px;
    color: #dde8ff;
    line-height: 1.1;
}

.question-label,
.question-type {
    margin: 0;
    font-size: 13px;
    line-height: 1.2;
    color: #8698ba;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

#currentQuestionText {
    margin: 3px 0 0;
    font-size: 22px;
    color: #d8e1ef;
    min-height: 36px;
    line-height: 1.15;
}

.question-type span {
    color: #2d9ceb;
    font-weight: 600;
}

.answer-dots {
    min-height: 16px;
    margin: 2px 0 8px;
    gap: 4px;
}

.answer-dot {
    width: 10px;
    height: 10px;
    background: #6f7e9b;
    border: 1px solid #4a5873;
    box-shadow: none;
}

.answer-dot.done {
    background: #ffbc3c;
    border-color: #f8d087;
}

.compact-nav-buttons {
    margin-bottom: 6px;
}

.btn {
    height: 34px;
    margin-bottom: 6px;
    border-radius: 3px;
    font-size: 14px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.inline-buttons .btn {
    width: 100%;
}

.btn.blue {
    background: linear-gradient(180deg, #1e6bc0, #10406f);
    border-color: #5a91d1;
}

.btn.steel {
    background: linear-gradient(180deg, #2f3f59, #1f293b);
    border-color: #57657e;
}

.btn.dark,
.btn.subtle,
.ghost-reset {
    background: linear-gradient(180deg, #27344b, #1b2538);
    border-color: #4f607b;
}

.btn.amber {
    background: linear-gradient(180deg, #936137, #55341c);
    border-color: #b58a5e;
}

.timeline-box {
    border-top: 1px solid rgba(71, 93, 132, 0.55);
    margin-top: 2px;
    padding-top: 8px;
}

.phase-row {
    border: 0;
    margin-bottom: 4px;
}

.phase-head {
    background: linear-gradient(180deg, rgba(17, 29, 51, 0.9), rgba(10, 19, 36, 0.9));
    border: 1px solid rgba(63, 87, 127, 0.56);
    border-radius: 2px;
    padding: 4px 6px;
    min-height: 24px;
}

.phase-head span {
    font-size: 13px;
    line-height: 1;
    color: #b7c8e5;
    white-space: nowrap;
}

.phase-row.active .phase-head {
    border-color: #2f66ad;
    box-shadow: inset 0 0 0 1px rgba(24, 94, 169, 0.5);
}

.phase-questions {
    padding: 4px;
}

.question-item {
    border: 1px solid rgba(78, 97, 128, 0.55);
    border-radius: 2px;
    background: rgba(11, 18, 32, 0.9);
    min-height: 26px;
    padding: 5px 6px;
    margin-bottom: 4px;
    color: #9dafcf;
    font-size: 12px;
    width: 100%;
}

.question-item.live {
    border-color: #4da6ff;
    color: #d9edff;
}

.jury-seats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 4px 8px;
    border: 1px solid rgba(72, 98, 136, 0.55);
    border-radius: 4px;
    background:
        radial-gradient(circle at 50% 18%, rgba(117, 60, 34, 0.35), transparent 45%),
        linear-gradient(180deg, rgba(54, 26, 19, 0.32), rgba(12, 13, 25, 0.3));
}

.seat-row {
    display: grid;
    gap: 8px;
}

.seat-row.row-1 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.seat-row.row-2 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 84%;
    margin: 0 auto;
}

.seat-row.row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 68%;
    margin: 0 auto;
}

.seat {
    position: relative;
    border-radius: 10px 10px 12px 12px;
    border: 1px solid rgba(106, 129, 165, 0.48);
    height: 60px;
    padding: 8px 4px 4px;
    font-size: 10px;
    text-transform: uppercase;
    color: #deebff;
    overflow: hidden;
    box-shadow: inset 0 -8px 12px rgba(0, 0, 0, 0.35);
}

.seat::before {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: block;
    margin: 0 auto 4px;
    background: rgba(207, 226, 255, 0.75);
    box-shadow: 0 0 10px rgba(194, 221, 255, 0.45);
}

.seat span {
    display: block;
    font-size: 9px;
    opacity: 0.85;
}

.seat.disconnected {
    filter: saturate(0.55) brightness(0.74);
}

.seat.plaintiff { background: linear-gradient(180deg, #1772c7, #0d355f); }
.seat.defense { background: linear-gradient(180deg, #b53e27, #5d1b13); }
.seat.undecided { background: linear-gradient(180deg, #50596e, #282f3f); }

.monitor-counter-strip {
    margin: 8px 0;
    border: 1px solid rgba(71, 96, 135, 0.6);
    border-radius: 3px;
    overflow: hidden;
    gap: 0;
}

.monitor-counter-strip span {
    border-radius: 0;
    border: 0;
    border-right: 1px solid rgba(73, 98, 138, 0.58);
    padding: 8px 5px;
    background: linear-gradient(180deg, rgba(16, 25, 42, 0.9), rgba(8, 14, 27, 0.95));
    font-size: 13px;
    font-weight: 700;
}

.monitor-counter-strip span:last-child {
    border-right: 0;
}

.monitor-counter-strip b {
    font-size: 34px;
    margin-left: 4px;
    font-family: var(--font-display);
    line-height: 1;
}

.monitor-counter-strip .plaintiff { color: #47a8ff; }
.monitor-counter-strip .defense { color: #ff7b52; }
.monitor-counter-strip .undecided { color: #a0acbe; }

.results-box,
.movement-box,
.captured-box,
.live-bars-box {
    border-top: 1px solid rgba(72, 96, 135, 0.52);
    margin-top: 8px;
    padding-top: 7px;
}

.phase-result-row {
    display: grid;
    grid-template-columns: 1.1fr 2fr;
    gap: 8px;
    align-items: center;
    margin-bottom: 5px;
}

.phase-result-name {
    font-size: 11px;
    color: #b7c8e3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.phase-result-bar {
    height: 9px;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid rgba(82, 104, 139, 0.64);
    display: flex;
    background: #111b30;
}

.phase-result-seg.plaintiff { background: linear-gradient(180deg, #0d8be7, #05508a); }
.phase-result-seg.defense { background: linear-gradient(180deg, #db5e36, #852b19); }
.phase-result-seg.undecided { background: linear-gradient(180deg, #848ea4, #596177); }

#movementTracker .movement-line,
.captured-mini-log .capture-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
    color: #a8bddf;
    margin-bottom: 3px;
}

#movementTracker .movement-line b {
    color: #e6edf9;
    font-weight: 600;
}

.heat-legend {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    color: #d0d8e8;
    font-size: 11px;
    font-weight: 700;
}

.lean-heat-dots {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 7px;
    margin-bottom: 8px;
}

.heat-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.32);
    opacity: 0.3;
    box-shadow: inset 0 -3px 8px rgba(0, 0, 0, 0.35);
}

.heat-dot.active {
    opacity: 0.98;
    box-shadow: 0 0 10px currentColor;
}

#leanBars .lean-bar-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.lean-bar-track {
    height: 20px;
    border-radius: 2px;
    border: 1px solid rgba(82, 106, 140, 0.62);
    position: relative;
    overflow: hidden;
    background: #10192c;
}

.lean-bar-fill {
    height: 100%;
    min-width: 2%;
}

.lean-bar-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding-left: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #f2f6ff;
    letter-spacing: 0.6px;
}

.lean-bar-row .value {
    width: 20px;
    text-align: right;
    font-size: 12px;
    color: #dde8fb;
    font-weight: 700;
}

.gauge-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 6px;
}

.gauge-card {
    border: 1px solid rgba(72, 97, 135, 0.6);
    border-radius: 3px;
    min-height: 82px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(180deg, #141e34, #0b1221);
    text-align: center;
}

.plaintiff-gauge {
    background:
        radial-gradient(circle at 50% 110%, transparent 47%, rgba(66, 231, 185, 0.95) 48%, transparent 53%),
        linear-gradient(180deg, #142c30, #09141f);
}

.defense-gauge {
    background:
        radial-gradient(circle at 50% 110%, transparent 47%, rgba(247, 84, 50, 0.95) 48%, transparent 53%),
        linear-gradient(180deg, #2e1716, #1c0f13);
}

.gauge-label {
    font-size: 8px;
    letter-spacing: 0.7px;
    color: #b8c8df;
}

.gauge-value {
    font-family: var(--font-display);
    font-size: 28px;
    line-height: 1;
}

.projected-verdict {
    border-top: 1px solid rgba(76, 102, 143, 0.6);
    border-bottom: 1px solid rgba(76, 102, 143, 0.6);
    padding: 4px;
    margin-bottom: 5px;
    text-align: center;
    font-size: 12px;
    color: #f3c64d;
    font-weight: 700;
}

.captured-mini-log {
    min-height: 18px;
}

.command-dock {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(72, 97, 136, 0.56);
    background: linear-gradient(180deg, rgba(9, 15, 27, 0.9), rgba(5, 9, 17, 0.94));
}

.dock-btn {
    height: 36px;
    border-radius: 5px;
    border: 1px solid rgba(122, 145, 183, 0.52);
    font-size: 14px;
    width: 100%;
    color: #dce9fa;
    font-family: var(--font-body);
    text-transform: none;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.dock-btn.blue { background: linear-gradient(180deg, #1a4f8f, #0c2f57); }
.dock-btn.steel { background: linear-gradient(180deg, #213f73, #132948); }
.dock-btn.bronze { background: linear-gradient(180deg, #6a492b, #3d2918); }
.dock-btn.amber { background: linear-gradient(180deg, #65452a, #3f2818); }
.dock-btn.next {
    background: linear-gradient(180deg, #465929, #253f21);
    border-color: #8caf59;
    color: #d8f0a4;
    font-weight: 700;
}

.auth-shell {
    max-width: 700px;
}

.auth-card {
    max-width: 520px;
    margin: 0 auto;
}

.setup-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.top-nav nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.top-nav nav a {
    margin-left: 0;
}

@media (max-width: 1200px) {
    .display-grid {
        grid-template-columns: 1fr;
    }

    .command-dock {
        grid-template-columns: 1fr 1fr;
    }

    .dock-btn,
    .inline-buttons .btn,
    .btn {
        width: 100%;
        font-size: 14px;
        height: auto;
    }

    .display-title,
    .ribbon-left,
    .ribbon-right,
    .display-panel h3,
    .question-label,
    .question-type,
    #currentQuestionText,
    .phase-head span,
    .question-item {
        width: auto;
        font-size: inherit;
        line-height: inherit;
    }

    .setup-grid.two-col {
        grid-template-columns: 1fr;
    }
}

/* Juror live device redesign */
body.juror-live-page {
    background: radial-gradient(circle at 50% 12%, #f0f0f0, #d2d2d2 62%, #bdbdbd);
    color: #f5f0e7;
}

.juror-live-page .scene-bg,
.juror-live-page .top-nav {
    display: none;
}

.juror-live-page .page-wrap {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.juror-live-shell {
    width: min(430px, 96vw);
    border-radius: 28px;
    border: 1px solid rgba(177, 192, 219, 0.48);
    padding: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 48% 2%, rgba(121, 149, 198, 0.35), transparent 20%),
        linear-gradient(180deg, #071021 0%, #17161b 9%, #2e130a 22%, #31140a 64%, #101421 100%);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(229, 236, 255, 0.35);
}

.juror-device-topbar {
    height: 52px;
    border-bottom: 1px solid rgba(137, 161, 203, 0.35);
    background: linear-gradient(180deg, #1f2a41, #151d30);
    display: grid;
    grid-template-columns: 36px 1fr 56px;
    align-items: center;
    padding: 0 14px;
    color: #d7e2f6;
    letter-spacing: 0.8px;
}

.topbar-time {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
}

.topbar-left,
.topbar-right {
    opacity: 0.75;
}

.juror-headline {
    border-top: 1px solid rgba(214, 165, 106, 0.3);
    border-bottom: 1px solid rgba(214, 165, 106, 0.3);
    background: linear-gradient(180deg, rgba(29, 22, 23, 0.5), rgba(43, 19, 11, 0.52));
    text-align: center;
    padding: 16px 16px 12px;
}

.juror-headline h1,
.juror-headline h2 {
    margin: 0;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #f4e8d7;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.juror-headline h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.juror-headline h2 {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.15;
}

.juror-phase {
    margin: 10px 16px 2px;
    color: rgba(234, 220, 198, 0.74);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-align: center;
    font-size: 1.5rem;
}

.juror-live-shell .choice-stack {
    padding: 12px 16px 6px;
    gap: 12px;
}

.juror-live-shell .choice-btn {
    min-height: 74px;
    border-radius: 10px;
    border: 2px solid rgba(211, 223, 246, 0.35);
    font-size: 4.1rem;
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    color: #ecf2ff;
    background: linear-gradient(180deg, #6c7688, #2d3645);
    box-shadow:
        inset 0 0 0 2px rgba(18, 24, 39, 0.58),
        inset 0 6px 14px rgba(255, 255, 255, 0.15),
        0 6px 12px rgba(0, 0, 0, 0.45);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.75);
    position: relative;
    padding: 10px 18px;
}

.juror-live-shell .choice-btn[data-choice-key='plaintiff'] {
    background: linear-gradient(180deg, #2573db, #0f3a7f);
}

.juror-live-shell .choice-btn[data-choice-key='defense'] {
    background: linear-gradient(180deg, #d43e1d, #76180f);
}

.juror-live-shell .choice-btn[data-choice-key='undecided'] {
    background: linear-gradient(180deg, #798091, #3e4655);
}

.juror-live-shell .choice-btn[data-choice-slot='0'] {
    background: linear-gradient(180deg, #2573db, #0f3a7f);
}

.juror-live-shell .choice-btn[data-choice-slot='1'] {
    background: linear-gradient(180deg, #d43e1d, #76180f);
}

.juror-live-shell .choice-btn[data-choice-slot='2'] {
    background: linear-gradient(180deg, #798091, #3e4655);
}

.juror-live-shell .choice-btn.selected {
    border-color: #8cff7a;
    box-shadow:
        inset 0 0 0 2px rgba(26, 33, 35, 0.65),
        inset 0 0 18px rgba(159, 255, 141, 0.25),
        0 0 20px rgba(114, 255, 83, 0.4);
}

.juror-live-shell .choice-btn.selected::after {
    content: 'SELECTED  \2713';
    position: absolute;
    right: 14px;
    bottom: 8px;
    font-size: 1.6rem;
    letter-spacing: 0.6px;
    color: #a4ff77;
    text-shadow: 0 0 6px rgba(91, 255, 77, 0.45);
}

.juror-live-shell .confidence-wrap {
    margin: 10px 16px 0;
    padding: 12px 10px;
    border-top: 1px solid rgba(204, 150, 95, 0.45);
    border-bottom: 1px solid rgba(204, 150, 95, 0.35);
    text-align: center;
    background: linear-gradient(180deg, rgba(39, 20, 15, 0.45), rgba(29, 16, 14, 0.25));
}

.juror-live-shell .confidence-wrap label {
    margin: 0 0 8px;
    color: #f2debf;
    text-transform: uppercase;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.8px;
}

.juror-live-shell #confidenceRange {
    margin: 0;
    accent-color: #f35b34;
}

.confidence-meta {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-top: 8px;
    color: rgba(244, 229, 205, 0.9);
    font-size: 1.4rem;
    gap: 10px;
}

.confidence-meta strong {
    font-family: var(--font-display);
    font-size: 2.4rem;
    color: #ffb389;
}

.juror-live-shell .submit-confirmation {
    margin: 10px 16px 14px;
    border: 1px solid rgba(130, 149, 181, 0.5);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(23, 31, 48, 0.82), rgba(12, 18, 30, 0.82));
    color: #d8e4f8;
    font-size: 1.5rem;
}

.juror-live-shell .status-footer {
    margin: 0;
    padding: 12px 18px;
    justify-content: center;
    gap: 10px;
    border-top: 1px solid rgba(120, 143, 182, 0.45);
    background: linear-gradient(180deg, #1f2b43, #111a2c);
    font-size: 1.8rem;
    color: #d6e0f5;
}

.status-footer .status-sep {
    color: rgba(196, 210, 238, 0.45);
}

.status-footer b {
    color: #9dff84;
}

@media (max-width: 560px) {
    .juror-live-page .page-wrap {
        padding: 0;
        align-items: stretch;
    }

    .juror-live-shell {
        width: 100vw;
        min-height: 100vh;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .juror-headline h1 {
        font-size: 1.7rem;
    }

    .juror-headline h2 {
        font-size: 2.1rem;
    }

    .juror-live-shell .choice-btn {
        font-size: 3rem;
    }
}
