﻿:root{--navy:#071d3b;--navy2:#0b2d58;--blue:#1766d2;--accent:#e8b34a;--bg:#f3f6fa;--card:#fff;--text:#17243a;--muted:#6e7b90;--line:#dfe6ef;--danger:#c93545;--success:#18865b;--shadow:0 16px 40px rgba(14,38,73,.11);font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;color:var(--text)}*{box-sizing:border-box}body{margin:0;background:var(--bg)}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}.muted{color:var(--muted)}.small{font-size:13px}.hidden{display:none!important}.btn{border:0;border-radius:9px;padding:10px 18px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px;font-weight:600;transition:.18s}.btn:hover{transform:translateY(-1px)}.btn-primary{background:var(--blue);color:#fff}.btn-secondary{background:#e7edf5;color:#233a59}.btn-danger{background:#ffebed;color:var(--danger)}.btn-success{background:var(--success);color:#fff}.btn-large{min-height:50px;font-size:16px}.btn-sm{padding:7px 11px;font-size:13px}.alert{padding:12px 14px;border-radius:8px;margin:14px 0}.alert-error{background:#fff0f1;color:#a82734;border:1px solid #ffd5d9}.alert-success{background:#ebfaf3;color:#15734e;border:1px solid #ccefe0}.auth-page{min-height:100vh;background:radial-gradient(circle at 10% 10%,#194a83 0,transparent 38%),linear-gradient(145deg,#041428,#0b2b52);display:grid;place-items:center;padding:24px}.auth-card{width:min(430px,100%);background:#fff;border-radius:20px;padding:36px;box-shadow:0 30px 80px rgba(0,0,0,.3)}.install-card{width:min(680px,100%)}.brand-mark{width:52px;height:52px;border-radius:14px;background:linear-gradient(135deg,var(--blue),var(--navy));color:#fff;display:grid;place-items:center;font-weight:800;letter-spacing:1px}.auth-card h1{font-size:25px;margin:18px 0 8px}.form-stack{display:grid;gap:16px;margin-top:22px}.form-grid{display:grid;gap:16px}.form-grid.two{grid-template-columns:1fr 1fr}label{display:grid;gap:7px;font-size:14px;font-weight:600}input,select,textarea{width:100%;border:1px solid #ccd6e3;border-radius:9px;padding:11px 12px;background:#fff;color:var(--text);outline:none}input:focus,select:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(23,102,210,.12)}hr{border:0;border-top:1px solid var(--line);width:100%;margin:3px 0}.admin-shell{min-height:100vh;display:grid;grid-template-columns:240px 1fr}.sidebar{background:var(--navy);color:#d9e5f4;padding:26px 16px;position:fixed;inset:0 auto 0 0;width:240px}.sidebar-brand{padding:0 12px 22px;border-bottom:1px solid rgba(255,255,255,.1)}.sidebar-brand strong{display:block;color:#fff;font-size:17px}.sidebar-brand span{font-size:12px;color:#91a8c3}.nav{display:grid;gap:5px;margin-top:20px}.nav a{padding:11px 13px;border-radius:8px;color:#b9cbe0;font-size:14px}.nav a:hover,.nav a.active{background:rgba(255,255,255,.1);color:#fff}.admin-main{grid-column:2;padding:28px 34px;min-width:0}.page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}.page-head h1{margin:0;font-size:24px}.page-head p{margin:5px 0 0}.card{background:var(--card);border-radius:13px;box-shadow:0 3px 14px rgba(20,48,82,.06);border:1px solid #e8edf3;padding:22px}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px}.stat strong{display:block;font-size:30px;color:var(--navy);margin-top:10px}.stat span{color:var(--muted);font-size:13px}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse;font-size:14px}.data-table th,.data-table td{padding:13px 11px;border-bottom:1px solid #e9eef4;text-align:left;white-space:nowrap}.data-table th{color:#66758a;font-size:12px;text-transform:uppercase;background:#f8fafc}.data-table tr:last-child td{border-bottom:0}.badge{display:inline-flex;padding:4px 9px;border-radius:99px;font-size:12px;font-weight:700}.badge-pending{background:#edf1f6;color:#66758a}.badge-scoring{background:#e5f0ff;color:#1262cb}.badge-finished{background:#e7f8ef;color:#147b50}.actions{display:flex;gap:7px;align-items:center}.inline-form{display:inline}.toolbar{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin-bottom:18px}.toolbar label{min-width:140px}.modal{position:fixed;inset:0;background:rgba(2,14,29,.6);display:none;place-items:center;padding:20px;z-index:50}.modal.open{display:grid}.modal-card{background:#fff;border-radius:15px;width:min(540px,100%);padding:24px;box-shadow:0 30px 90px rgba(0,0,0,.3)}.modal-head{display:flex;justify-content:space-between;align-items:center}.modal-head h2{margin:0}.icon-btn{border:0;background:#edf1f5;border-radius:8px;width:36px;height:36px;cursor:pointer}.judge-page{min-height:100vh;background:linear-gradient(180deg,#071c39 0,#0d3e73 34%,#f2f5f9 34%);padding:0 16px 30px}.mobile-top{max-width:620px;margin:auto;padding:28px 5px 22px;color:#fff}.mobile-top .eyebrow{font-size:12px;opacity:.7}.mobile-top h1{font-size:19px;line-height:1.45;margin:7px 0}.mobile-top-row{display:flex;justify-content:space-between;gap:15px;align-items:center}.judge-card{max-width:620px;margin:auto;background:#fff;border-radius:18px;padding:22px;box-shadow:var(--shadow)}.contestant-number{color:var(--blue);font-size:13px;font-weight:700}.contestant-name{font-size:31px;margin:8px 0 4px}.org{color:var(--muted);min-height:22px}.score-display{/* legacy placeholder reset below */}.score-range{width:100%;accent-color:var(--blue);padding:0;border:0;box-shadow:none}.quick-scores{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;margin:14px 0}.quick-scores button{padding:9px 2px;border:1px solid var(--line);background:#f7f9fb;border-radius:8px;color:#344a67}.submit-score{width:100%;margin-top:10px}.mobile-tabs{max-width:620px;margin:16px auto 0;display:flex;justify-content:center;gap:8px}.mobile-tabs a{background:rgba(255,255,255,.16);color:#fff;padding:8px 12px;border-radius:99px;font-size:13px}.empty-state{text-align:center;padding:38px 14px}.empty-state .big{font-size:44px}.history-list{display:grid;gap:10px}.history-item{display:grid;grid-template-columns:1fr auto;gap:10px;padding:14px;border:1px solid var(--line);border-radius:11px}.history-score{font-size:23px;font-weight:800;color:var(--blue)}
.judge-entry-card{margin-bottom:16px}.judge-entry-grid{display:grid;grid-template-columns:180px 1fr;gap:22px;align-items:center}.judge-entry-qr{width:180px;height:180px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:8px}.judge-entry-cell{display:flex;gap:14px;align-items:flex-start;min-width:280px}.judge-entry-qr-sm{width:96px;height:96px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:4px;flex:none}.judge-entry-meta{display:grid;gap:8px;min-width:0}.judge-entry-link{display:block;font-size:11px;word-break:break-all;white-space:normal;line-height:1.45;color:#5c3d12;background:#fffaf3;padding:6px 8px;border-radius:6px;border:1px solid #f0e4d0}.judge-table td{vertical-align:top;white-space:normal}
@media(max-width:900px){.admin-shell{display:block}.sidebar{position:static;width:auto;padding:14px}.sidebar-brand{display:none}.nav{display:flex;overflow:auto;margin:0}.nav a{white-space:nowrap}.admin-main{padding:20px 14px}.stats-grid{grid-template-columns:1fr 1fr}.page-head{align-items:flex-start}.form-grid.two{grid-template-columns:1fr}.judge-entry-grid{grid-template-columns:1fr}}
@media(max-width:520px){.auth-card{padding:26px 20px}.stats-grid{grid-template-columns:1fr}.quick-scores{grid-template-columns:repeat(5,1fr)}.contestant-name{font-size:27px}}

/* Judge mobile / iPad UI v2 */
.judge-v2{min-height:100vh;background:radial-gradient(circle at 90% 0,rgba(206,48,46,.16),transparent 34%),linear-gradient(180deg,#83141b 0,#4d070d 310px,#f5f1ed 310px);padding:0;color:#2f2020}.judge-shell{width:min(920px,100%);margin:0 auto;padding:0 22px 36px}.judge-header{height:76px;display:flex;align-items:center;justify-content:space-between;color:#fff;border-bottom:1px solid rgba(255,226,175,.2)}.judge-brand{display:flex;align-items:center;gap:10px}.judge-brand-mark{width:39px;height:39px;border:1px solid rgba(255,226,175,.7);border-radius:10px;display:grid;place-items:center;color:#f4d18d;font-weight:900}.judge-brand small,.judge-brand strong{display:block}.judge-brand small{font-size:9px;letter-spacing:.16em;color:#d5a96a}.judge-brand strong{font-size:15px;margin-top:2px}.judge-user{display:flex;align-items:center;gap:12px;font-size:13px}.judge-user a{padding:6px 10px;border:1px solid rgba(255,255,255,.25);border-radius:99px;color:#ead5c7}.judge-event{height:136px;color:#fff;display:flex;flex-direction:column;justify-content:center;text-align:center}.judge-event span{font-size:11px;color:#d8a96c;letter-spacing:.25em}.judge-event h1{margin:9px auto 0;font-size:24px;line-height:1.4;max-width:780px}.judge-tabs{width:min(520px,80%);margin:0 auto 18px;display:grid;grid-template-columns:1fr 1fr;background:#6a0b12;padding:5px;border-radius:14px;box-shadow:0 10px 26px rgba(48,0,4,.18)}.judge-tabs a{height:46px;display:flex;align-items:center;justify-content:center;gap:8px;color:#d3a891;border-radius:10px;font-size:14px}.judge-tabs a.active{background:linear-gradient(180deg,#fffdf9,#f4e7d5);color:#771019;box-shadow:0 5px 15px rgba(32,0,0,.2);font-weight:700}.judge-tabs i{font-style:normal;font-size:10px;opacity:.6}.judge-score-card{background:#fff;border-radius:20px;box-shadow:0 18px 50px rgba(58,12,12,.13);border:1px solid #eee2d8;overflow:hidden}.judge-contestant{padding:22px 28px;background:linear-gradient(120deg,#fffaf3,#f6ead9);border-bottom:1px solid #ead8c6;display:flex;justify-content:space-between;align-items:center;gap:16px}.judge-current{font-size:10px;letter-spacing:.15em;color:#9d755d}.judge-contestant h2{font-size:25px;margin:6px 0 3px;color:#5d0a11}.judge-contestant p{font-size:13px;color:#8c756d;margin:0}.judge-live{white-space:nowrap;padding:7px 11px;border-radius:99px;background:#fff;color:#9a2328;font-size:12px;border:1px solid #ecd3c6}.judge-live i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#d0373c;margin-right:5px;box-shadow:0 0 0 4px rgba(208,55,60,.1)}.judge-input-area{padding:28px 28px 18px}.judge-input-area>label{display:block;text-align:center;font-weight:400;color:#8c7069;font-size:13px}.score-editor{display:grid;grid-template-columns:58px 1fr 58px;align-items:center;gap:14px;max-width:520px;margin:18px auto 10px}.score-editor>button{height:58px;border:1px solid #e4d5c8;background:#fbf7f2;border-radius:14px;font-size:21px;color:#7f171d;cursor:pointer}.score-input-wrap{position:relative}.score-input-wrap input{height:82px;border:2px solid #8d171d;border-radius:16px;text-align:center;font-size:45px;font-weight:900;color:#711017;padding:8px 48px 8px 18px;font-variant-numeric:tabular-nums;box-shadow:0 0 0 5px rgba(132,19,27,.05)}.score-input-wrap > .score-unit, .score-input-wrap > span:not(.score-display){position:absolute;right:14px;top:50%;transform:translateY(-50%);font-size:13px;color:#b89a8e;pointer-events:none;margin:0;line-height:1}.score-fine{max-width:520px;margin:auto;display:grid;grid-template-columns:80px 1fr 80px;align-items:center;text-align:center;gap:10px}.score-fine button,.score-presets button{border:1px solid #e4d6c9;background:#fff;border-radius:9px;color:#7c4b43;height:36px;cursor:pointer}.score-fine span{font-size:11px;color:#a28a82}.score-presets{max-width:520px;margin:15px auto 0;display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.score-presets button:hover,.score-fine button:hover,.score-editor>button:hover{border-color:#9d3034;background:#fff5ed}.judge-notice{margin:0 28px 18px;padding:11px 13px;background:#fbf5ec;border-radius:10px;color:#8e7165;font-size:12px;display:flex;gap:9px;align-items:flex-start}.judge-notice i{font-style:normal;display:grid;place-items:center;width:17px;height:17px;border-radius:50%;background:#c18b43;color:#fff;font-size:10px;flex:none}.judge-submit{display:block;width:calc(100% - 56px);height:56px;margin:0 28px 26px;border:0;border-radius:13px;background:linear-gradient(180deg,#9b2026,#741017);box-shadow:0 10px 22px rgba(117,16,23,.22);color:#fff8ec;font-weight:700;font-size:17px;cursor:pointer}.judge-submit:disabled{opacity:.6}.judge-submit+.alert,#scoreMessage .alert{margin:0 28px 24px}.judge-waiting{min-height:390px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:35px}.judge-waiting h2{color:#681017;margin:18px 0 7px}.judge-waiting p{margin:0;color:#a0867b;font-size:13px}.waiting-icon,.waiting-static{width:56px;height:56px;display:grid;place-items:center;border:2px solid #e8d7c7;border-radius:16px;background:#fff8f2;color:#8d171d;font-size:22px;animation:none}.judge-copyright{text-align:center;color:#ad9184;font-size:11px;margin:18px 0 0}.history-card{padding:0 28px 22px}.history-head{height:90px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #eee1d8}.history-head span{color:#b18a72;font-size:9px;letter-spacing:.2em}.history-head h2{margin:4px 0 0;color:#641016;font-size:20px}.history-head>strong{font-size:28px;color:#86181e}.history-head>strong small{font-size:11px;color:#a58b80}.history-list-v2{display:grid}.history-row{min-height:78px;display:grid;grid-template-columns:56px 1fr 86px 54px;gap:10px;align-items:center;border-bottom:1px solid #f0e6df}.history-number{color:#9a661e;background:#fff4df;border:1px solid #efdbb3;text-align:center;padding:6px 3px;border-radius:99px;font-size:12px}.history-person strong,.history-person small{display:block}.history-person strong{color:#4e2927}.history-person small{color:#a0867e;font-size:11px;margin-top:4px}.history-value{text-align:right}.history-value strong{font-size:24px;color:#80151b}.history-value span{font-size:10px;color:#a18479}.history-edit,.history-locked{font-size:11px;text-align:center;padding:6px 4px;border-radius:8px}.history-edit{background:#81151b;color:#fff}.history-locked{color:#aa9288;background:#f5f0ec}.history-tip{text-align:center;color:#a3897e;font-size:11px;padding-top:17px}.empty-score{font-size:38px;color:#cab6aa}@keyframes judgeSpin{to{transform:rotate(360deg)}}
@media(min-width:700px){.judge-v2{background:radial-gradient(circle at 80% 0,rgba(223,76,57,.18),transparent 36%),linear-gradient(180deg,#7a1017 0,#4a060c 330px,#f5f1ed 330px)}.judge-shell{padding-left:34px;padding-right:34px}.judge-score-card{border-radius:24px}.judge-input-area{padding:34px 46px 22px}.judge-contestant{padding:25px 40px}.judge-event h1{font-size:28px}.judge-submit{width:calc(100% - 92px);margin-left:46px;margin-right:46px}.judge-notice{margin-left:46px;margin-right:46px}}
@media(max-width:520px){.judge-shell{padding:0 14px 28px}.judge-header{height:66px}.judge-brand small{display:none}.judge-brand strong{font-size:13px}.judge-user span{font-size:12px}.judge-event{height:126px}.judge-event h1{font-size:18px}.judge-tabs{width:92%;margin-bottom:13px}.judge-contestant{padding:18px}.judge-contestant h2{font-size:21px}.judge-input-area{padding:23px 18px 16px}.score-editor{grid-template-columns:46px 1fr 46px;gap:8px}.score-editor>button{height:52px}.score-input-wrap input{height:73px;font-size:39px}.score-fine{grid-template-columns:72px 1fr 72px}.score-presets{gap:5px}.score-presets button{font-size:12px}.judge-notice{margin:0 18px 15px}.judge-submit{width:calc(100% - 36px);margin:0 18px 20px}.history-card{padding:0 15px 18px}.history-row{grid-template-columns:48px 1fr 66px 45px;gap:7px}.history-number{font-size:11px}.history-value strong{font-size:21px}}
.judge-login-v2{min-height:100vh;display:grid;place-items:center;padding:22px;background:radial-gradient(circle at 15% 10%,rgba(255,191,91,.17),transparent 32%),linear-gradient(145deg,#8b151c,#4b060c 62%,#250005);font-family:"Microsoft YaHei","PingFang SC",sans-serif}.judge-login-card{width:min(460px,100%);padding:38px 36px 32px;border:1px solid rgba(248,218,159,.3);border-radius:24px;background:linear-gradient(150deg,rgba(255,253,248,.97),rgba(250,239,226,.95));box-shadow:0 30px 80px rgba(29,0,2,.38);text-align:center}.login-emblem{width:58px;height:58px;margin:auto;display:grid;place-items:center;border-radius:15px;background:linear-gradient(145deg,#9b2128,#671016);color:#f9db9b;font-size:19px;font-weight:900;box-shadow:0 10px 20px rgba(117,16,23,.22)}.login-kicker{display:block;margin-top:18px;color:#b28159;font-size:9px;letter-spacing:.22em}.judge-login-card h1{margin:7px 0 10px;color:#5e0b11;font-size:25px}.login-event{min-height:45px;margin:0;color:#8b7168;font-size:13px;line-height:1.6}.judge-login-card form{text-align:left}.judge-login-card label{color:#68413b}.judge-login-card input{height:50px;border-color:#ddc9b8}.judge-login-submit{height:52px;border:0;border-radius:12px;background:linear-gradient(180deg,#9c2228,#711016);color:#fff7eb;font-weight:700;font-size:16px;cursor:pointer;box-shadow:0 10px 22px rgba(117,16,23,.2)}.login-tip{margin:20px 0 0;color:#ad9287;font-size:11px}

/* Admin golden warm theme */
body.admin-page,body.auth-page{--navy:#4d070d;--navy2:#83141b;--blue:#a31822;--accent:#e8b34a;--bg:#f7f1ed;--text:#3a1c1c;--muted:#9a7a72;--line:#ead9d2;--shadow:0 16px 40px rgba(77,7,13,.12)}
.auth-page{background:radial-gradient(circle at 12% 8%,rgba(206,48,46,.22) 0,transparent 38%),linear-gradient(145deg,#2a0508,#83141b 55%,#4d070d)}
.auth-page .brand-mark{background:linear-gradient(135deg,#c43a3a,#7a1017);color:#f4d18d}
.auth-page .auth-card{border:1px solid #f0ddd6}
.admin-page .sidebar{background:linear-gradient(180deg,#83141b 0,#4d070d 100%);color:#f5e6e0}
.admin-page .sidebar-brand{border-bottom-color:rgba(244,209,141,.18)}
.admin-page .sidebar-brand span{color:#d5a96a}
.admin-page .nav a{color:#ecd5cb}
.admin-page .nav a:hover,body.admin-page .nav a.active{background:rgba(244,209,141,.16);color:#fff8ec}
.admin-page .btn-primary{background:linear-gradient(180deg,#b82a32,#8d171d);color:#fff8ec;box-shadow:0 4px 14px rgba(141,23,29,.28)}
.admin-page .btn-secondary,body.auth-page .btn-secondary{background:#f3e7e2;color:#681017}
.admin-page input:focus,body.admin-page select:focus,body.admin-page textarea:focus,body.auth-page input:focus{border-color:#a31822;box-shadow:0 0 0 3px rgba(163,24,34,.15)}
.admin-page .card{border-color:#f0ddd6;box-shadow:0 3px 14px rgba(77,7,13,.06)}
.admin-page .stat strong{color:#8d171d}
.admin-page .data-table th{background:#fff8f5;color:#9a7a72}
.admin-page .data-table th,body.admin-page .data-table td{border-bottom-color:#f0ddd6}
.admin-page .badge-scoring{background:#fff4df;color:#8a5a12}
.admin-page .badge-finished{background:#edf6ef;color:#15734e}
.admin-page .badge-pending{background:#f3e7e2;color:#9a7a72}
.admin-page .modal{background:rgba(42,5,8,.55)}
.admin-page .icon-btn{background:#f3e7e2;color:#681017}
.auth-page .btn-primary{background:linear-gradient(180deg,#b82a32,#8d171d);color:#fff8ec}

/* history inline edit — perpetual score edit/补打 */
.history-item-block{border-bottom:1px solid #f0e6df}
.history-item-block .history-row{border-bottom:0}
.history-edit-btn{border:0;cursor:pointer;font:inherit;font-size:11px;text-align:center;padding:6px 4px;border-radius:8px;background:#81151b;color:#fff}
.history-edit-panel{padding:0 0 16px;animation:historyPanelIn .18s ease}
@keyframes historyPanelIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.history-edit-controls{display:grid;grid-template-columns:52px 1fr 52px;gap:10px;align-items:center;margin-bottom:10px}
.history-step{height:44px;border:1px solid #e6d5c8;background:#fff;border-radius:10px;color:#7a3a2f;font-weight:700;cursor:pointer}
.history-score-wrap{position:relative;display:flex;align-items:center}
.history-score-wrap input{width:100%;height:52px;border:1px solid #e0c9b8;border-radius:12px;text-align:center;font-size:28px;font-weight:800;color:#80151b;padding:0 28px 0 12px;background:#fffaf6}
.history-score-wrap span{position:absolute;right:14px;color:#a18479;font-size:13px}
.history-edit-fine{display:grid;grid-template-columns:72px 1fr 72px;gap:8px;align-items:center;margin-bottom:12px;color:#a18479;font-size:11px;text-align:center}
.history-edit-fine .history-step{height:34px;font-size:12px}
.history-edit-actions{display:grid;grid-template-columns:1fr 1.4fr;gap:10px}
.history-cancel,.history-save{height:44px;border:0;border-radius:10px;font-weight:700;cursor:pointer}
.history-cancel{background:#f3ebe6;color:#7a5a50}
.history-save{background:#81151b;color:#fff}
.history-edit-msg{min-height:0;margin-top:8px}
.history-edit-msg .alert{margin:0;padding:10px 12px;border-radius:10px;font-size:13px}
@media(max-width:520px){.history-edit-controls{grid-template-columns:46px 1fr 46px;gap:8px}.history-score-wrap input{height:48px;font-size:24px}.history-edit-fine{grid-template-columns:64px 1fr 64px}}

/* overview judge chips + final score + keypad + fit-screen layout */
.judge-chips{display:flex;flex-wrap:wrap;gap:6px;max-width:520px}
.judge-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;font-size:12px;border:1px solid #ead9d2;background:#fff}
.judge-chip em{font-style:normal;color:#9a7a72}
.judge-chip strong{font-weight:700}
.judge-chip.is-done{background:#fff5f5;border-color:#f0c4c4;color:#8d171d}
.judge-chip.is-wait{background:#f7f1ed;color:#9a7a72}
.judge-chips-cell{min-width:220px}
.live-pill{display:inline-flex;align-items:center;gap:6px;margin-left:10px;padding:3px 9px;border-radius:99px;background:#edf6ef;color:#15734e;font-size:12px;font-weight:600;vertical-align:middle}
.live-pill i{width:7px;height:7px;border-radius:50%;background:#22a45a;box-shadow:0 0 0 4px rgba(34,164,90,.16);animation:livePulse 1.6s ease-in-out infinite}
.live-pill.is-offline{background:#fff0f1;color:#a82734}
.live-pill.is-offline i{background:#e95058;box-shadow:none;animation:none}
@keyframes livePulse{0%,100%{opacity:1}50%{opacity:.35}}
.final-score-box{display:flex;flex-wrap:wrap;gap:18px 28px;align-items:flex-end;padding:8px 4px 4px;border-top:1px solid var(--line);margin-top:12px}
.final-score-box>div strong{display:block;font-size:28px;color:#8d171d;margin-top:4px}
.final-tag{display:inline-block;margin-left:8px;padding:2px 8px;border-radius:99px;background:#fff4df;color:#8a5a12;font-size:11px;font-style:normal}
.final-score-form{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}
.score-display-wrap{display:flex;align-items:center;justify-content:center;position:relative;height:76px;min-height:76px;border:2px solid #e8d5c8;border-radius:16px;background:#fffaf6;overflow:hidden}
.score-display-wrap .score-unit{position:absolute;right:14px;top:50%;transform:translateY(-50%);font-size:13px;color:#b89a8e;pointer-events:none;margin:0;line-height:1;z-index:2}
.score-display-wrap .score-display{position:static!important;inset:auto!important;transform:none!important;right:auto!important;top:auto!important;display:flex;align-items:center;justify-content:center;width:100%;height:100%;margin:0!important;padding:0 36px;text-align:center;line-height:1!important;font-variant-numeric:tabular-nums;user-select:none;-webkit-user-select:none;letter-spacing:.02em;box-sizing:border-box}
.score-display-wrap.score-is-default{border-color:#e5d6cc;background:#f3ebe6}
.score-display-wrap.score-is-default .score-display{color:#d0b8ab!important;font-size:40px!important;font-weight:500!important}
.score-display-wrap.score-is-entered{border-color:#8d171d;background:#fff;box-shadow:0 0 0 4px rgba(141,23,29,.1)}
.score-display-wrap.score-is-entered .score-display{color:#8d171d!important;font-size:56px!important;font-weight:900!important}
.keypad-tip{margin:0 0 8px;text-align:center;color:#a18479;font-size:12px}
.score-keypad{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(4,1fr);gap:8px;flex:1;min-height:0}
.keypad-key{min-height:0;height:100%;border:1px solid #e6d5c8;background:#fff;border-radius:12px;font-size:clamp(18px,2.6vh,26px);font-weight:700;color:#7a3a2f;cursor:pointer;touch-action:manipulation;-webkit-user-select:none;user-select:none}
.keypad-key:active{background:#f8ebe4}
.judge-keypad-panel{display:flex;flex-direction:column;min-height:0;padding:0 18px 10px}
.judge-score-body{display:flex;flex-direction:column;min-height:0;flex:1}
.judge-action-bar{flex-shrink:0;padding:0 0 10px}
.judge-action-bar .judge-notice{margin-bottom:8px}
.judge-action-bar .judge-submit{margin-bottom:8px}
.judge-fixed{overscroll-behavior:none;touch-action:manipulation;height:100dvh;max-height:100dvh;overflow:hidden}
.judge-fixed.judge-v2{min-height:100dvh;max-height:100dvh;overflow:hidden;background:radial-gradient(circle at 90% 0,rgba(206,48,46,.16),transparent 34%),linear-gradient(180deg,#83141b 0,#4d070d 160px,#f5f1ed 160px)}
.judge-fixed .judge-shell{height:100dvh;max-height:100dvh;overflow:hidden;display:flex;flex-direction:column;padding:0 16px 8px;width:min(1100px,100%)}
.judge-fixed .judge-header{height:52px;flex-shrink:0}
.judge-fixed .judge-event{height:auto;flex-shrink:0;padding:4px 0 6px}
.judge-fixed .judge-event h1{margin:4px auto 0;font-size:clamp(14px,2.2vh,20px);line-height:1.25}
.judge-fixed .judge-tabs{width:min(420px,86%);margin:0 auto 8px;flex-shrink:0;padding:4px}
.judge-fixed .judge-tabs a{height:38px;font-size:13px}
.judge-fixed .judge-score-card{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;border-radius:16px}
.judge-fixed .judge-contestant{padding:10px 16px;flex-shrink:0}
.judge-fixed .judge-contestant h2{font-size:clamp(16px,2.4vh,22px);margin:2px 0}
.judge-fixed .judge-contestant p{font-size:12px}
.judge-fixed .judge-input-area{padding:10px 16px 8px;flex-shrink:0}
.judge-fixed .judge-input-area>label{font-size:12px;margin-bottom:4px}
.judge-fixed .score-editor{grid-template-columns:52px 1fr 52px;gap:8px}
.judge-fixed .score-editor>button{height:56px}
.judge-fixed .score-fine{margin-top:6px}
.judge-fixed .score-presets{margin-top:6px;gap:6px}
.judge-fixed .score-presets button{padding:8px 0;font-size:13px}
.judge-fixed .judge-notice{margin:0 16px 8px}
.judge-fixed .judge-submit{width:calc(100% - 32px);margin:0 16px;min-height:46px}
.judge-fixed .judge-copyright,.judge-fixed .judge-waiting{flex:1}
.judge-fixed button,.judge-fixed .keypad-key,.judge-fixed .score-presets button,.judge-fixed .score-editor>button,.judge-fixed .score-fine button{touch-action:manipulation}
@media(max-width:520px){.score-display{min-height:64px}.score-display-wrap.score-is-default .score-display{font-size:36px}.score-display-wrap.score-is-entered .score-display{font-size:52px}.judge-chips{max-width:100%}.judge-fixed .judge-shell{padding:0 10px 6px}}
/* iPad / phone landscape: side-by-side so keypad never clips */
@media(orientation:landscape) and (max-height:900px){
 .judge-fixed.judge-v2{background:radial-gradient(circle at 90% 0,rgba(206,48,46,.16),transparent 34%),linear-gradient(180deg,#83141b 0,#4d070d 96px,#f5f1ed 96px)}
 .judge-fixed .judge-header{height:42px}
 .judge-fixed .judge-brand small{display:none}
 .judge-fixed .judge-brand strong{font-size:13px}
 .judge-fixed .judge-event{padding:2px 0 4px}
 .judge-fixed .judge-event span{font-size:9px;letter-spacing:.12em}
 .judge-fixed .judge-event h1{font-size:clamp(13px,2.8vh,18px);margin-top:2px}
 .judge-fixed .judge-tabs{margin-bottom:6px}
 .judge-fixed .judge-tabs a{height:34px;font-size:12px}
 .judge-fixed .judge-contestant{padding:8px 14px}
 .judge-fixed .judge-contestant h2{font-size:clamp(15px,3.2vh,20px)}
 .judge-fixed .judge-live{padding:5px 8px;font-size:11px}
 .judge-fixed .judge-score-body{display:grid;grid-template-columns:1.05fr .95fr;gap:8px;flex:1;min-height:0;padding:0 8px;align-items:stretch}
 .judge-fixed .judge-input-area{padding:8px 10px;display:flex;flex-direction:column;justify-content:center;min-height:0}
 .judge-fixed .judge-keypad-panel{padding:8px 10px 4px;height:100%}
 .judge-fixed .score-display{min-height:clamp(48px,12vh,72px);height:auto;line-height:1;font-size:inherit}.judge-fixed .score-display-wrap.score-is-default .score-display{font-size:clamp(28px,7vh,40px)}.judge-fixed .score-display-wrap.score-is-entered .score-display{font-size:clamp(40px,9vh,56px)}
 .judge-fixed .score-editor{grid-template-columns:48px 1fr 48px}
 .judge-fixed .score-editor>button{height:clamp(44px,11vh,56px)}
 .judge-fixed .keypad-tip{font-size:11px;margin-bottom:6px}
 .judge-fixed .score-keypad{gap:6px;height:100%}
 .judge-fixed .keypad-key{border-radius:10px;font-size:clamp(16px,3.6vh,24px)}
 .judge-fixed .judge-action-bar{display:grid;grid-template-columns:1.2fr 1fr;gap:8px;align-items:center;padding:4px 14px 8px}
 .judge-fixed .judge-action-bar .judge-notice{margin:0}
 .judge-fixed .judge-action-bar .judge-submit{width:100%;margin:0;min-height:42px}
 .judge-fixed .judge-action-bar #scoreMessage{grid-column:1/-1}
 .judge-fixed .score-presets button{padding:6px 0;font-size:12px}
}
@media(orientation:portrait) and (max-height:860px){
 .judge-fixed .judge-score-body{flex:1;min-height:0}
 .judge-fixed .judge-keypad-panel{flex:1;min-height:140px}
 .judge-fixed .score-display{min-height:58px}.judge-fixed .score-display-wrap.score-is-default .score-display{font-size:36px}.judge-fixed .score-display-wrap.score-is-entered .score-display{font-size:50px}
 .judge-fixed .score-editor>button{height:48px}
 .judge-fixed .judge-input-area{padding:8px 14px 4px}
}
