:root {
    --blue-950: #041b43;
    --blue-900: #062a67;
    --blue-800: #073c91;
    --blue-700: #0755c7;
    --blue-600: #1267d6;
    --blue-500: #2d7df0;
    --blue-300: #8bbcfb;
    --blue-100: #e7f1ff;
    --blue-50: #f2f7ff;
    --ink-950: #08172f;
    --ink-800: #1d2f4d;
    --ink-600: #526681;
    --ink-500: #71839a;
    --line: #dfe8f4;
    --line-soft: #edf2f8;
    --surface: #ffffff;
    --canvas: #f4f8fd;
    --green: #0d9f6e;
    --green-bg: #e9fbf4;
    --amber: #e48a13;
    --amber-bg: #fff5df;
    --red: #dc4054;
    --red-bg: #fff0f2;
    --cyan: #18a8c9;
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 13px;
    --radius-sm: 9px;
    --shadow-sm: 0 4px 16px rgba(18, 54, 100, .06);
    --shadow: 0 16px 42px rgba(18, 54, 100, .09);
    --shadow-blue: 0 16px 38px rgba(14, 92, 210, .24);
    --font: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink-950);
    background: var(--canvas);
    font-family: var(--font);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

body,
button,
input,
select,
textarea {
    font-family: var(--font);
}

a {
    color: var(--blue-600);
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-size: 14px;
}

button,
summary {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.muted {
    color: var(--ink-500);
}

.block {
    display: block;
}

.eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--blue-600);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .15em;
}

.eyebrow.light {
    color: #9fc9ff;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.app-header {
    position: sticky;
    z-index: 50;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    padding: 0 max(24px, calc((100vw - 1380px) / 2));
    border-bottom: 1px solid rgba(213, 226, 242, .9);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(18px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink-950);
}

.brand-mark {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(145deg, var(--blue-500), var(--blue-800));
    box-shadow: 0 8px 20px rgba(14, 92, 210, .23);
}

.brand-mark svg {
    width: 22px;
    height: 22px;
}

.brand strong {
    display: block;
    font-size: 15px;
    line-height: 1.2;
}

.brand small {
    display: block;
    margin-top: 4px;
    color: var(--ink-500);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .11em;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-badge {
    padding: 7px 11px;
    border-radius: 50px;
    color: var(--blue-800);
    background: var(--blue-50);
    font-size: 14px;
    font-weight: 700;
}

.app-main {
    width: min(1380px, calc(100% - 48px));
    min-height: calc(100vh - 132px);
    margin: 0 auto;
    padding: 38px 0 64px;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    width: min(1380px, calc(100% - 48px));
    margin: -30px auto 0;
    padding: 24px 0 28px;
    color: #91a1b6;
    font-size: 14px;
}

.btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 700;
    line-height: 1;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn svg {
    width: 17px;
    height: 17px;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    box-shadow: 0 7px 18px rgba(14, 92, 210, .2);
}

.btn-primary:hover {
    box-shadow: var(--shadow-blue);
}

.btn-secondary {
    border-color: var(--line);
    color: var(--ink-800);
    background: #fff;
}

.btn-secondary:hover {
    border-color: var(--blue-300);
    color: var(--blue-700);
}

.btn-ghost {
    color: var(--ink-600);
    background: transparent;
}

.btn-ghost:hover {
    color: var(--blue-700);
    background: var(--blue-50);
}

.btn-light {
    color: var(--blue-800);
    background: #fff;
    box-shadow: 0 8px 25px rgba(1, 25, 69, .16);
}

.btn-danger {
    border-color: #f3c1c8;
    color: var(--red);
    background: var(--red-bg);
}

.btn-sm {
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
}

.btn-lg {
    min-height: 50px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
}

.icon-button {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--ink-600);
    background: #fff;
}

.icon-button:hover {
    border-color: var(--blue-300);
    color: var(--blue-700);
}

.icon-button svg {
    width: 17px;
    height: 17px;
}

.text-button {
    padding: 3px;
    border: 0;
    color: var(--blue-600);
    background: transparent;
    font-size: 14px;
    font-weight: 700;
}

.text-button.danger {
    color: var(--red);
}

.button-row {
    display: flex;
    gap: 10px;
}

.button-row.centered {
    justify-content: center;
}

.spaced {
    margin-top: 18px;
}

.flash-stack {
    position: fixed;
    z-index: 200;
    top: 88px;
    left: 50%;
    display: grid;
    width: min(460px, calc(100vw - 28px));
    gap: 8px;
    transform: translateX(-50%);
}

.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    box-shadow: var(--shadow);
    font-size: 14px;
    font-weight: 600;
}

.flash-success {
    border-color: #b7ead8;
    color: #086c4a;
    background: var(--green-bg);
}

.flash-error {
    border-color: #f5c7ce;
    color: #9e1c2d;
    background: var(--red-bg);
}

.flash-close {
    padding: 0;
    border: 0;
    color: currentColor;
    background: transparent;
    font-size: 21px;
    line-height: 1;
    opacity: .6;
}

.page-heading,
.competition-detail-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 28px;
}

.page-heading h1,
.competition-detail-head h1 {
    margin-bottom: 8px;
    font-size: 32px;
    letter-spacing: -.04em;
}

.page-heading p,
.competition-detail-head p {
    margin-bottom: 0;
    color: var(--ink-500);
}

.compact-heading {
    align-items: flex-start;
}

.back-link {
    display: inline-block;
    margin-bottom: 13px;
    color: var(--ink-500);
    font-size: 14px;
    font-weight: 600;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 40px;
}

.metric-card {
    position: relative;
    display: grid;
    min-height: 136px;
    grid-template-columns: 46px 1fr;
    align-items: center;
    gap: 15px;
    overflow: hidden;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    color: var(--ink-950);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.metric-card.metric-primary {
    color: #fff;
    border: 0;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
    box-shadow: var(--shadow-blue);
}

.metric-card.metric-primary::after {
    position: absolute;
    right: -30px;
    bottom: -80px;
    width: 180px;
    height: 180px;
    border: 28px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    content: "";
}

.metric-icon {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    color: #fff;
    background: rgba(255, 255, 255, .15);
}

.metric-icon.blue {
    color: var(--blue-600);
    background: var(--blue-100);
}

.metric-icon.cyan {
    color: #087c98;
    background: #e1f8fc;
}

.metric-icon.indigo {
    color: #5657ca;
    background: #eeeeff;
}

.metric-card div {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.metric-card div strong {
    font-size: 31px;
    letter-spacing: -.04em;
}

.metric-card.metric-link div strong {
    font-size: 16px;
}

.metric-card div span {
    color: var(--ink-500);
    font-size: 14px;
}

.metric-primary div span {
    color: #cde2ff;
}

.metric-card > small {
    grid-column: 1 / -1;
    color: var(--ink-500);
    font-size: 14px;
}

.metric-primary > small {
    color: #b8d5fb;
}

.metric-link > small {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--blue-600);
    font-weight: 700;
}

.metric-link > small svg {
    width: 14px;
    height: 14px;
}

.section-title-row,
.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.section-title-row {
    margin-bottom: 16px;
}

.section-title-row h2,
.panel-heading h2 {
    margin-bottom: 5px;
    font-size: 18px;
    letter-spacing: -.02em;
}

.section-title-row p {
    margin-bottom: 0;
    color: var(--ink-500);
    font-size: 14px;
}

.competition-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.competition-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.competition-card:hover {
    border-color: #bfd5f0;
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.competition-card-top,
.session-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.competition-card h3 {
    margin: 18px 0 8px;
    font-size: 19px;
    letter-spacing: -.025em;
}

.competition-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-500);
    font-size: 14px;
}

.competition-meta svg {
    width: 14px;
    height: 14px;
}

.status-pill,
.venue-chip,
.trim-chip,
.count-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.status-pill i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.status-live {
    color: #067956;
    background: var(--green-bg);
}

.status-live i {
    box-shadow: 0 0 0 4px rgba(13, 159, 110, .1);
    animation: pulse 1.8s infinite;
}

.status-finished {
    color: #4e5fc5;
    background: #ededff;
}

.status-success {
    color: #087b56;
    background: var(--green-bg);
}

.status-warning {
    color: #aa6204;
    background: var(--amber-bg);
}

.status-withdrawn {
    color: #a33b48;
    background: #fff0f2;
}

.status-neutral {
    color: var(--ink-600);
    background: #f0f4f8;
}

.venue-chip,
.count-chip {
    color: var(--blue-700);
    background: var(--blue-50);
}

.competition-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 20px 0;
    padding: 13px 0;
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}

.competition-stats span {
    color: var(--ink-500);
    font-size: 14px;
    text-align: center;
}

.competition-stats span + span {
    border-left: 1px solid var(--line-soft);
}

.competition-stats b {
    margin-right: 2px;
    color: var(--ink-950);
    font-size: 15px;
}

.progress-wrap {
    margin-bottom: 17px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 7px;
    color: var(--ink-500);
    font-size: 14px;
}

.progress {
    height: 6px;
    overflow: hidden;
    border-radius: 10px;
    background: #eaf0f7;
}

.progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue-500), #20a9ef);
    transition: width .5s ease;
}

.current-line {
    display: flex;
    min-height: 34px;
    align-items: center;
    gap: 8px;
    margin-bottom: 13px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--ink-600);
    background: var(--blue-50);
    font-size: 14px;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(13, 159, 110, .12);
}

.competition-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
}

.competition-actions .btn {
    margin-right: auto;
}

.empty-card,
.empty-state {
    padding: 70px 30px;
    border: 1px dashed #c9d9ec;
    border-radius: var(--radius-xl);
    text-align: center;
    background: rgba(255, 255, 255, .65);
}

.empty-icon {
    display: inline-flex;
    width: 60px;
    height: 60px;
    align-items: center;
    justify-content: center;
    margin-bottom: 17px;
    border-radius: 19px;
    color: var(--blue-600);
    background: var(--blue-100);
}

.empty-icon svg {
    width: 28px;
    height: 28px;
}

.empty-card h2,
.empty-state h2 {
    margin-bottom: 8px;
    font-size: 21px;
}

.empty-card p,
.empty-state p {
    max-width: 500px;
    margin: 0 auto 22px;
    color: var(--ink-500);
}

.account-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 24px;
    padding: 17px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
}

.account-strip > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-strip .metric-icon {
    width: 38px;
    height: 38px;
}

.account-strip strong {
    font-size: 14px;
}

.account-strip p {
    margin: 3px 0 0;
    color: var(--ink-500);
    font-size: 14px;
}

.inline-details {
    position: relative;
}

.inline-details summary {
    list-style: none;
}

.inline-details summary::-webkit-details-marker {
    display: none;
}

.password-popover {
    position: absolute;
    z-index: 30;
    top: 45px;
    right: 0;
    display: grid;
    width: 290px;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow);
}

.competition-form {
    display: grid;
    gap: 16px;
    max-width: 1060px;
    margin: 0 auto;
}

.form-section,
.panel {
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.form-section-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 23px;
}

.form-section-heading > div {
    flex: 1;
}

.form-section-heading h2 {
    margin-bottom: 5px;
    font-size: 18px;
}

.form-section-heading p {
    margin-bottom: 0;
    color: var(--ink-500);
    font-size: 14px;
}

.step-number {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 10px;
    color: var(--blue-700);
    background: var(--blue-50);
    font-size: 14px;
    font-weight: 800;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.two-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.four-cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.field {
    display: grid;
    gap: 7px;
    color: var(--ink-800);
    font-size: 14px;
    font-weight: 700;
}

.field > span b {
    color: var(--red);
}

.field input,
.field select,
.field textarea,
.archive-score-row input {
    width: 100%;
    min-height: 43px;
    padding: 10px 12px;
    border: 1px solid #d3dfed;
    border-radius: 9px;
    outline: 0;
    color: var(--ink-950);
    background: #fbfdff;
    font-weight: 500;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field textarea {
    resize: vertical;
    line-height: 1.65;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.archive-score-row input:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(45, 125, 240, .11);
}

.input-shell {
    position: relative;
    display: flex;
    align-items: center;
}

.input-shell svg {
    position: absolute;
    left: 13px;
    width: 18px;
    height: 18px;
    color: #91a6c1;
}

.input-shell input {
    padding-left: 41px;
}

.rule-choice-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.rule-choice {
    position: relative;
    cursor: pointer;
}

.rule-choice > input {
    position: absolute;
    opacity: 0;
}

.rule-choice-body {
    position: relative;
    display: flex;
    min-height: 128px;
    flex-direction: column;
    justify-content: flex-end;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfdff;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.rule-choice em {
    position: absolute;
    top: 12px;
    left: 14px;
    padding: 3px 7px;
    border-radius: 4px;
    color: var(--ink-500);
    background: #edf2f8;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
}

.rule-choice strong {
    margin-bottom: 7px;
    font-size: 14px;
}

.rule-choice small {
    color: var(--ink-500);
    font-size: 14px;
    line-height: 1.5;
}

.radio-mark {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 15px;
    height: 15px;
    border: 1.5px solid #b8c8dc;
    border-radius: 50%;
}

.rule-choice input:checked + .rule-choice-body {
    border-color: var(--blue-500);
    background: var(--blue-50);
    box-shadow: 0 0 0 2px rgba(45, 125, 240, .08);
}

.rule-choice input:checked + .rule-choice-body em {
    color: var(--blue-700);
    background: #dcebff;
}

.rule-choice input:checked + .rule-choice-body .radio-mark {
    border: 4px solid var(--blue-600);
}

.trim-settings {
    margin-bottom: 16px;
}

.read-only-field {
    min-height: 43px;
    padding: 11px 12px;
    border: 1px dashed #ccd9e9;
    border-radius: 9px;
    color: var(--ink-500);
    background: #f7faff;
    font-size: 14px;
    font-weight: 500;
}

.judge-select-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.judge-select {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    cursor: pointer;
}

.judge-select > input {
    position: absolute;
    opacity: 0;
}

.judge-select > span:nth-of-type(2) {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.judge-select strong {
    font-size: 14px;
}

.judge-select small {
    color: var(--ink-500);
    font-size: 14px;
}

.judge-avatar {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 12px;
    color: var(--blue-700);
    background: var(--blue-100);
    font-size: 14px;
    font-weight: 800;
}

.judge-avatar.small {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 14px;
}

.check-mark {
    display: none;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    border-radius: 50%;
    color: #fff;
    background: var(--blue-600);
}

.check-mark svg {
    width: 13px;
    height: 13px;
}

.judge-select > input:checked ~ .check-mark {
    display: inline-flex;
}

.judge-select:has(input:checked) {
    border-color: var(--blue-400, #67a3f8);
    background: var(--blue-50);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px 0 0;
}

.notice {
    padding: 13px 15px;
    border: 1px solid #c8dcf5;
    border-radius: 10px;
    color: var(--blue-800);
    background: var(--blue-50);
    font-size: 14px;
    line-height: 1.65;
}

.notice-warning {
    border-color: #f3ddb1;
    color: #85520c;
    background: #fff9ed;
}

.notice-info {
    margin-top: 16px;
}

.title-with-status {
    display: flex;
    align-items: center;
    gap: 14px;
}

.heading-actions {
    display: flex;
    gap: 8px;
}

.flow-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 17px;
    padding: 20px 23px;
    border-radius: var(--radius-lg);
    color: #fff;
}

.flow-banner > div {
    display: flex;
    align-items: center;
    gap: 14px;
}

.flow-banner strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.flow-banner p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
}

.flow-icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, .12);
}

.draft-banner {
    background: linear-gradient(110deg, var(--blue-700), var(--blue-600));
    box-shadow: var(--shadow-blue);
}

.live-banner {
    background: linear-gradient(110deg, #0d5fbc, #0b8eb9);
}

.banner-progress {
    width: 230px;
}

.banner-progress > span {
    display: block;
    margin-bottom: 8px;
    text-align: right;
    font-size: 14px;
}

.light-progress {
    background: rgba(255, 255, 255, .16);
}

.light-progress i {
    background: #fff;
}

.champion-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 17px;
    padding: 22px 25px;
    border-radius: var(--radius-lg);
    color: #fff;
    background: linear-gradient(120deg, #053879, #0a6ec8 55%, #159ed3);
    box-shadow: var(--shadow-blue);
}

.champion-banner > div {
    flex: 1;
}

.champion-banner h2 {
    margin-bottom: 3px;
    font-size: 14px;
    font-weight: 500;
}

.champion-banner strong {
    display: inline-block;
    margin-right: 12px;
    font-size: 23px;
}

.champion-banner > div > span:last-child {
    color: #b8ddff;
    font-size: 14px;
}

.champion-crown {
    display: inline-flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, .14);
}

.champion-crown svg {
    width: 29px;
    height: 29px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 16px;
}

.detail-main,
.detail-side {
    display: grid;
    gap: 16px;
}

.panel-heading {
    margin-bottom: 19px;
}

.panel-heading .eyebrow {
    margin-bottom: 4px;
}

.panel-heading h2 {
    margin-bottom: 0;
}

.panel-heading > .muted {
    font-size: 14px;
}

.panel-empty {
    padding: 38px 20px 28px;
    text-align: center;
}

.panel-empty.compact {
    padding: 18px;
}

.panel-empty .empty-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 12px;
    border-radius: 15px;
}

.panel-empty h3 {
    margin-bottom: 6px;
    font-size: 16px;
}

.panel-empty p {
    margin-bottom: 0;
    color: var(--ink-500);
    font-size: 14px;
}

.contestant-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 17px;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(120deg, var(--blue-700), var(--blue-500));
}

.sequence-number {
    display: inline-flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 14px;
    background: rgba(255, 255, 255, .1);
    font-size: 22px;
    font-weight: 800;
}

.contestant-banner > div:nth-child(2) {
    flex: 1;
}

.contestant-banner .eyebrow {
    margin-bottom: 3px;
    color: #b8d8ff;
}

.contestant-banner h3 {
    margin-bottom: 3px;
    font-size: 21px;
}

.contestant-banner p {
    margin-bottom: 0;
    color: #bdd8f8;
    font-size: 14px;
}

.final-score {
    min-width: 100px;
    text-align: right;
}

.final-score span {
    display: block;
    margin-bottom: 2px;
    color: #bedafb;
    font-size: 14px;
}

.final-score strong {
    font-size: 30px;
    letter-spacing: -.04em;
}

.final-score b {
    font-size: 22px;
}

.judge-score-list {
    display: grid;
    margin: 16px 0;
    border: 1px solid var(--line-soft);
    border-radius: 11px;
}

.judge-score-row {
    display: flex;
    min-height: 59px;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
}

.judge-score-row + .judge-score-row {
    border-top: 1px solid var(--line-soft);
}

.judge-score-row.is-voided {
    background: #fffafb;
}

.judge-score-name {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 3px;
}

.judge-score-name strong {
    font-size: 14px;
}

.judge-score-name small {
    color: var(--ink-500);
    font-size: 14px;
}

.judge-score-value {
    min-width: 52px;
    color: var(--blue-800);
    font-size: 22px;
    font-weight: 800;
    text-align: right;
}

.is-voided .judge-score-value {
    color: #a2adba;
    text-decoration: line-through;
}

.score-waiting {
    color: #9aabbe;
    font-size: 14px;
}

.score-void-label {
    padding: 4px 7px;
    border-radius: 5px;
    color: var(--red);
    background: var(--red-bg);
    font-size: 14px;
    font-weight: 700;
}

.trim-chip {
    color: #9f660a;
    background: var(--amber-bg);
}

.calculation-preview {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    margin-bottom: 13px;
    padding: 15px;
    border-radius: 11px;
    background: var(--blue-50);
}

.calculation-preview span {
    color: var(--ink-500);
    font-size: 14px;
}

.calculation-preview strong {
    grid-row: span 2;
    color: var(--blue-700);
    font-size: 29px;
}

.calculation-preview small {
    margin-top: 3px;
    color: var(--ink-500);
    font-size: 14px;
}

.locked-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 11px 13px;
    border-radius: 9px;
    color: #087854;
    background: var(--green-bg);
    font-size: 14px;
    font-weight: 600;
}

.locked-note svg {
    width: 15px;
    height: 15px;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-500);
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.data-table td {
    padding: 13px 10px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--ink-600);
    font-size: 14px;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.data-table tr.is-current {
    background: #f5f9ff;
}

.data-table tr.is-withdrawn {
    color: var(--ink-500);
    background: #fafbfc;
}

.data-table tr.is-withdrawn td strong {
    color: var(--ink-500);
    text-decoration: line-through;
    text-decoration-color: rgba(163, 59, 72, .45);
}

.data-table td strong {
    color: var(--ink-950);
    font-size: 14px;
}

.data-table td small {
    color: var(--ink-500);
    font-size: 14px;
}

.sequence-mini {
    display: inline-flex;
    width: 27px;
    height: 27px;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    color: var(--blue-700);
    background: var(--blue-50);
    font-size: 14px;
    font-weight: 800;
}

.score-number {
    color: var(--blue-700) !important;
    font-size: 14px !important;
}

.table-actions {
    white-space: nowrap;
}

.table-actions > a,
.table-actions > form {
    display: inline-flex;
    align-items: center;
    margin: 0 8px 0 0;
    vertical-align: middle;
}

.roster-edit-card {
    margin: 0 0 18px;
    padding: 15px;
    border: 1px solid var(--blue-300);
    border-radius: 12px;
    background: var(--blue-50);
}

.roster-edit-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
}

.roster-edit-heading > div {
    display: grid;
    gap: 4px;
}

.roster-edit-heading strong {
    color: var(--ink-950);
}

.roster-edit-form {
    display: grid;
    grid-template-columns: minmax(110px, .7fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.withdraw-current-form {
    display: grid;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #efcbd0;
}

.withdraw-current-form .field > span {
    color: var(--red);
}

.score-archive {
    display: grid;
    gap: 7px;
}

.archive-item {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
}

.archive-item summary {
    display: flex;
    min-height: 53px;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    list-style: none;
    cursor: pointer;
}

.archive-item summary::-webkit-details-marker {
    display: none;
}

.archive-item summary > span:nth-child(2) {
    display: grid;
    flex: 1;
    gap: 3px;
}

.archive-item summary strong {
    font-size: 14px;
}

.archive-item summary small {
    color: var(--ink-500);
    font-size: 14px;
}

.archive-summary-score {
    color: var(--blue-700);
    font-size: 16px;
    font-weight: 800;
}

.chevron {
    color: #9eb0c4;
    transition: transform .2s ease;
}

.archive-item[open] .chevron,
.judge-directory-item[open] .chevron {
    transform: rotate(180deg);
}

.archive-body {
    padding: 0 12px 12px 49px;
    border-top: 1px solid var(--line-soft);
    background: #fbfdff;
}

.archive-score-row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) 60px minmax(180px, 1.3fr);
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line-soft);
}

.archive-score-row > span:first-child {
    display: grid;
    gap: 3px;
}

.archive-score-row strong {
    font-size: 14px;
}

.archive-score-row small {
    color: var(--ink-500);
    font-size: 14px;
}

.archive-score-row > b {
    color: var(--blue-700);
    font-size: 18px;
}

.archive-score-row.is-voided > b {
    color: #aab4c1;
    text-decoration: line-through;
}

.archive-score-row.is-voided {
    opacity: .72;
}

.void-form {
    display: flex;
    align-items: center;
    gap: 6px;
}

.archive-score-row input {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 14px;
}

.archive-rule {
    margin: 11px 0 0;
    color: var(--ink-500);
    font-size: 14px;
}

.ranking-list {
    display: grid;
    gap: 6px;
}

.ranking-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 9px;
    background: #f8fbfe;
}

.ranking-row > span:nth-child(2) {
    display: grid;
    flex: 1;
    gap: 3px;
}

.ranking-row strong {
    font-size: 14px;
}

.ranking-row small {
    color: var(--ink-500);
    font-size: 14px;
}

.ranking-row > b {
    color: var(--blue-700);
    font-size: 17px;
}

.rank-number {
    display: inline-flex;
    width: 27px;
    height: 27px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--ink-500);
    background: #eaf0f6;
    font-size: 14px;
    font-weight: 800;
}

.rank-1 {
    color: #9a5f00;
    background: #fff0bd;
}

.rank-2 {
    color: #526f93;
    background: #e5eef7;
}

.rank-3 {
    color: #8d5c39;
    background: #f7e4d4;
}

.setup-card {
    border-top: 4px solid var(--blue-600);
}

.definition-list {
    margin: 0;
}

.definition-list div {
    display: grid;
    grid-template-columns: 75px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line-soft);
}

.definition-list div:last-child {
    border-bottom: 0;
}

.definition-list dt {
    color: var(--ink-500);
    font-size: 14px;
}

.definition-list dd {
    margin: 0;
    color: var(--ink-800);
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

.compact-judge-list {
    display: grid;
    gap: 9px;
}

.compact-judge-list > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.compact-judge-list > div > span:last-child {
    display: grid;
    gap: 3px;
}

.compact-judge-list strong {
    font-size: 14px;
}

.compact-judge-list small {
    color: var(--ink-500);
    font-size: 14px;
}

.panel-note {
    margin: 15px 0 0;
    color: var(--ink-500);
    font-size: 14px;
}

.compact-form {
    gap: 11px;
}

.bulk-details {
    margin-top: 13px;
    padding-top: 13px;
    border-top: 1px solid var(--line-soft);
}

.bulk-details summary {
    color: var(--blue-600);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.bulk-details .stack-form {
    margin-top: 13px;
}

.danger-zone {
    border-color: #f0d2d6;
}

.danger-zone p {
    margin-bottom: 15px;
    color: var(--ink-500);
    font-size: 14px;
    line-height: 1.7;
}

.judges-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 16px;
}

.sticky-panel {
    position: sticky;
    top: 90px;
}

.judge-directory {
    display: grid;
    gap: 7px;
}

.judge-directory-item {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
}

.judge-directory-item summary {
    display: flex;
    min-height: 65px;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    list-style: none;
    cursor: pointer;
}

.judge-directory-item summary::-webkit-details-marker {
    display: none;
}

.judge-main {
    display: grid;
    min-width: 150px;
    flex: 1;
    gap: 3px;
}

.judge-main strong {
    font-size: 14px;
}

.judge-main small,
.judge-history {
    color: var(--ink-500);
    font-size: 14px;
}

.judge-edit-form {
    padding: 15px;
    border-top: 1px solid var(--line-soft);
    background: #f8fbfe;
}

.judge-edit-actions {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-top: 12px;
}

.judge-edit-actions .field {
    max-width: 300px;
    flex: 1;
}

.micro-note {
    margin: 11px 0 0;
    color: var(--ink-500);
    font-size: 14px;
}

.account-guide {
    margin-top: 20px;
    padding: 14px;
    border-radius: 10px;
    background: var(--blue-50);
}

.account-guide > span {
    color: var(--blue-800);
    font-size: 14px;
    font-weight: 800;
}

.account-guide ol {
    margin: 9px 0 0 17px;
    padding: 0;
    color: var(--ink-600);
    font-size: 14px;
    line-height: 1.9;
}

.login-body {
    overflow-x: hidden;
    background: #f4f8fe;
}

.login-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(430px, 1.05fr) minmax(440px, .95fr);
}

.login-visual {
    position: relative;
    display: flex;
    overflow: hidden;
    flex-direction: column;
    justify-content: space-between;
    padding: 46px clamp(42px, 7vw, 100px);
    color: #fff;
    background:
        linear-gradient(145deg, rgba(4, 27, 67, .07), rgba(4, 27, 67, .82)),
        linear-gradient(135deg, #052557, #0751a8 58%, #147fd1);
}

.login-visual::before {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(to bottom right, #000, transparent 73%);
    content: "";
}

.login-glow {
    position: absolute;
    border: 1px solid rgba(141, 198, 255, .2);
    border-radius: 50%;
}

.login-glow-a {
    right: -260px;
    bottom: -230px;
    width: 680px;
    height: 680px;
    box-shadow: 0 0 0 90px rgba(80, 165, 255, .025), 0 0 0 180px rgba(80, 165, 255, .018);
}

.login-glow-b {
    top: 16%;
    right: 10%;
    width: 95px;
    height: 95px;
    background: rgba(85, 171, 255, .08);
}

.login-brand {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .16em;
}

.brand-mark-large {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, .12);
    box-shadow: none;
}

.login-copy {
    position: relative;
    z-index: 2;
    max-width: 620px;
}

.login-copy h1 {
    margin-bottom: 22px;
    font-size: clamp(46px, 5.2vw, 76px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.06em;
}

.login-copy p {
    max-width: 520px;
    margin-bottom: 0;
    color: #b7d8fd;
    font-size: 15px;
    line-height: 1.85;
}

.login-features {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 25px;
    color: #c5dffa;
    font-size: 14px;
}

.login-features span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-features i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #67c4ff;
    box-shadow: 0 0 8px #67c4ff;
}

.login-panel {
    position: relative;
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 50px;
    background: #f8fbff;
}

.login-panel-inner {
    width: min(410px, 100%);
}

.login-panel h2 {
    margin-bottom: 8px;
    font-size: 28px;
    letter-spacing: -.04em;
}

.login-panel .muted {
    margin-bottom: 28px;
    font-size: 14px;
}

.mobile-login-brand {
    display: none;
}

.role-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 23px;
    padding: 4px;
    border-radius: 10px;
    background: #ebf1f8;
}

.role-switch a {
    padding: 10px;
    border-radius: 8px;
    color: var(--ink-500);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.role-switch a.active {
    color: var(--blue-700);
    background: #fff;
    box-shadow: 0 3px 10px rgba(14, 55, 108, .08);
}

.stack-form {
    display: grid;
    gap: 17px;
}

.stack-form .field input {
    min-height: 47px;
}

.stack-form .btn-block {
    margin-top: 4px;
}

.initial-account {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 22px;
    padding: 12px 14px;
    border: 1px solid #d4e3f5;
    border-radius: 10px;
    color: var(--ink-500);
    background: var(--blue-50);
    font-size: 14px;
}

.initial-account > span {
    width: 100%;
    color: var(--ink-600);
    font-weight: 700;
}

.initial-account code {
    padding: 3px 6px;
    border-radius: 4px;
    color: var(--blue-800);
    background: #fff;
    font-family: Consolas, monospace;
}

.initial-account small {
    margin-left: auto;
    font-size: 14px;
}

.login-tip {
    margin: 20px 0 0;
    color: var(--ink-500);
    font-size: 14px;
    line-height: 1.7;
    text-align: center;
}

.login-footer {
    position: absolute;
    bottom: 22px;
    color: #a4b3c4;
    font-size: 14px;
    letter-spacing: .08em;
}

.judge-body {
    background:
        radial-gradient(circle at 82% 7%, rgba(77, 150, 243, .13), transparent 24%),
        #f3f8fe;
}

.judge-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 160px;
    margin-bottom: 27px;
    padding: 30px;
    border-radius: var(--radius-xl);
    color: #fff;
    background:
        radial-gradient(circle at 78% 30%, rgba(109, 192, 255, .24), transparent 31%),
        linear-gradient(125deg, #053574, #075ac6 62%, #1d8ee2);
    box-shadow: var(--shadow-blue);
}

.judge-hero h1 {
    margin-bottom: 7px;
    font-size: 28px;
    letter-spacing: -.04em;
}

.judge-hero p {
    margin-bottom: 0;
    color: #c2dcfa;
    font-size: 14px;
}

.judge-hero-stat {
    display: grid;
    min-width: 110px;
    padding-left: 26px;
    border-left: 1px solid rgba(255, 255, 255, .2);
    text-align: center;
}

.judge-hero-stat strong {
    font-size: 41px;
    line-height: 1;
}

.judge-hero-stat span {
    margin-top: 5px;
    color: #bcd8f8;
    font-size: 14px;
}

.judge-session-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.judge-session-card {
    display: flex;
    min-height: 270px;
    flex-direction: column;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    color: var(--ink-950);
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease;
}

.judge-session-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.judge-session-card.is-live {
    border-top: 4px solid var(--blue-600);
}

.judge-session-card h3 {
    margin: 19px 0 6px;
    font-size: 18px;
}

.judge-session-card > p {
    color: var(--ink-500);
    font-size: 14px;
}

.session-current {
    display: grid;
    gap: 4px;
    margin-top: 14px;
    padding: 14px;
    border-radius: 10px;
    background: var(--blue-50);
}

.session-current span {
    color: var(--ink-500);
    font-size: 14px;
}

.session-current strong {
    font-size: 14px;
}

.session-current em {
    color: var(--green);
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
}

.session-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--line-soft);
    color: var(--ink-500);
    font-size: 14px;
}

.round-arrow {
    display: inline-flex;
    width: 29px;
    height: 29px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--blue-600);
    background: var(--blue-100);
}

.round-arrow svg {
    width: 15px;
    height: 15px;
}

.light-card {
    background: #fff;
}

.score-page {
    padding-bottom: 28px;
    background:
        radial-gradient(circle at 50% 0, rgba(38, 126, 235, .15), transparent 37%),
        #eef5fd;
}

.score-page .app-main {
    width: min(680px, calc(100% - 28px));
    padding-top: 20px;
}

.score-page .app-footer {
    display: none;
}

.mobile-page-head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 16px;
}

.mobile-back {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 10px;
    color: var(--blue-700);
    background: #fff;
    box-shadow: var(--shadow-sm);
    font-size: 20px;
}

.mobile-page-head > div {
    min-width: 0;
    flex: 1;
}

.mobile-page-head span {
    display: block;
    margin-bottom: 2px;
    color: var(--ink-500);
    font-size: 14px;
}

.mobile-page-head h1 {
    overflow: hidden;
    margin-bottom: 0;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-judge-no {
    padding: 6px 8px;
    border-radius: 6px;
    color: var(--blue-700) !important;
    background: #fff;
    font-size: 14px !important;
    font-weight: 800;
}

.mobile-player-card {
    position: relative;
    overflow: hidden;
    margin-bottom: 13px;
    padding: 19px 20px 22px;
    border-radius: 20px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 18%, rgba(111, 200, 255, .28), transparent 31%),
        linear-gradient(135deg, #073b88, #0868da);
    box-shadow: var(--shadow-blue);
}

.mobile-player-card::after {
    position: absolute;
    right: -35px;
    bottom: -75px;
    width: 180px;
    height: 180px;
    border: 24px solid rgba(255, 255, 255, .07);
    border-radius: 50%;
    content: "";
}

.mobile-player-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.player-index {
    color: #a9d2ff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .13em;
}

.mobile-player-card .status-live {
    color: #fff;
    background: rgba(49, 232, 170, .17);
}

.player-bib {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 20px;
    color: #9fcaf7;
    font-size: 14px;
    font-weight: 700;
}

.mobile-player-card h2 {
    position: relative;
    z-index: 1;
    margin: 4px 0 4px;
    font-size: 31px;
    letter-spacing: -.04em;
}

.mobile-player-card p {
    position: relative;
    z-index: 1;
    margin-bottom: 0;
    color: #bddbf9;
    font-size: 14px;
}

.score-entry-card,
.mobile-state-card,
.mobile-progress-card {
    margin-bottom: 13px;
    padding: 19px;
    border: 1px solid rgba(214, 226, 241, .9);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.score-entry-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 700;
}

.score-entry-heading small {
    color: var(--ink-500);
    font-size: 14px;
    font-weight: 500;
}

.score-input-wrap {
    position: relative;
    display: flex;
    align-items: baseline;
    justify-content: center;
    padding: 13px 10px 18px;
    border: 2px solid #d7e4f4;
    border-radius: 15px;
    background: #f8fbff;
}

.score-input-wrap:focus-within {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 4px rgba(45, 125, 240, .1);
}

.score-input-wrap input {
    width: 200px;
    border: 0;
    outline: 0;
    color: var(--blue-800);
    background: transparent;
    font-size: 58px;
    font-weight: 800;
    letter-spacing: -.05em;
    line-height: 1;
    text-align: right;
    -moz-appearance: textfield;
}

.score-input-wrap input::-webkit-outer-spin-button,
.score-input-wrap input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.score-input-wrap input::placeholder {
    color: #c1cfdf;
}

.score-input-wrap span {
    margin-left: 5px;
    color: var(--ink-500);
    font-size: 14px;
    font-weight: 700;
}

.quick-scores {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin: 12px 0;
}

.quick-scores button {
    min-height: 38px;
    padding: 6px 2px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink-600);
    background: #fff;
    font-size: 14px;
    font-weight: 700;
}

.quick-scores button:hover,
.quick-scores button.active {
    border-color: var(--blue-400, #6aa5f6);
    color: var(--blue-700);
    background: var(--blue-50);
}

.score-rule-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px;
    border-radius: 8px;
    color: var(--ink-500);
    background: #f4f7fb;
    font-size: 14px;
    line-height: 1.6;
}

.score-rule-note svg {
    width: 13px;
    height: 13px;
    margin-top: 1px;
}

.mobile-state-card {
    text-align: center;
}

.mobile-state-card h2 {
    margin-bottom: 7px;
    font-size: 20px;
}

.mobile-state-card p {
    max-width: 440px;
    margin: 0 auto 17px;
    color: var(--ink-500);
    font-size: 14px;
    line-height: 1.7;
}

.ready-card,
.finished-card {
    position: relative;
    overflow: hidden;
    padding: 34px 22px;
    border: 0;
    color: #fff;
    background:
        radial-gradient(circle at 50% 0, rgba(118, 198, 255, .25), transparent 35%),
        linear-gradient(145deg, #063b86, #0867cf);
    box-shadow: var(--shadow-blue);
}

.ready-card::after {
    position: absolute;
    top: -80px;
    right: -80px;
    width: 190px;
    height: 190px;
    border: 28px solid rgba(255, 255, 255, .05);
    border-radius: 50%;
    content: "";
}

.ready-card p,
.finished-card p {
    position: relative;
    z-index: 1;
    color: #c1dcf9;
}

.ready-card form {
    position: relative;
    z-index: 2;
}

.state-number {
    display: inline-flex;
    width: 66px;
    height: 66px;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    font-size: 25px;
    font-weight: 800;
}

.waiting-card .state-orbit {
    display: inline-flex;
    width: 62px;
    height: 62px;
    align-items: center;
    justify-content: center;
    margin-bottom: 17px;
    border-radius: 50%;
    color: var(--blue-600);
    background: var(--blue-100);
}

.waiting-card .state-orbit svg {
    width: 26px;
    height: 26px;
}

.finished-card > svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
}

.confirmed-card {
    background: linear-gradient(145deg, #effcf7, #ffffff);
    border-color: #c5ecdf;
}

.success-ring {
    display: inline-flex;
    width: 47px;
    height: 47px;
    align-items: center;
    justify-content: center;
    margin-bottom: 11px;
    border-radius: 50%;
    color: #fff;
    background: var(--green);
    box-shadow: 0 7px 18px rgba(13, 159, 110, .21);
}

.success-ring svg {
    width: 24px;
    height: 24px;
}

.confirmed-final {
    margin: 12px 0;
    color: var(--blue-700);
    font-size: 45px;
    font-weight: 800;
    line-height: 1;
}

.confirmed-final small {
    display: block;
    margin-top: 5px;
    color: var(--ink-500);
    font-size: 14px;
    font-weight: 500;
}

.my-score-display {
    margin: 11px 0 13px;
    color: var(--blue-700);
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
}

.my-score-display small {
    margin-left: 4px;
    color: var(--ink-500);
    font-size: 14px;
}

.submitted-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 20px;
}

.submitted-progress i {
    width: 38px;
    height: 4px;
    border-radius: 9px;
    background: #dce6f1;
}

.submitted-progress i:first-child {
    background: var(--green);
}

.submitted-progress i.done {
    background: var(--green);
}

.mobile-progress-card > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
    color: var(--ink-500);
    font-size: 14px;
}

.mobile-progress-card strong {
    color: var(--ink-800);
    font-size: 14px;
}

.error-state {
    max-width: 620px;
    margin: 9vh auto;
    text-align: center;
}

.error-code {
    display: block;
    color: var(--blue-200, #a9cdfb);
    font-size: 110px;
    font-weight: 800;
    line-height: 1;
}

.error-state h1 {
    margin-bottom: 9px;
}

.error-state p {
    margin-bottom: 22px;
    color: var(--ink-500);
}

/* Full-screen live result */
.screen-body {
    overflow: hidden;
    color: #fff;
    background: #031c46;
}

.screen-app {
    position: relative;
    display: flex;
    width: 100vw;
    height: 100vh;
    min-height: 640px;
    flex-direction: column;
    overflow: hidden;
    background:
        radial-gradient(circle at 17% 38%, rgba(24, 116, 238, .32), transparent 34%),
        radial-gradient(circle at 90% 73%, rgba(13, 172, 211, .18), transparent 31%),
        linear-gradient(135deg, #031b43, #052c67 52%, #052554);
}

.screen-background {
    position: absolute;
    z-index: 0;
    inset: 0;
    opacity: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    transition: opacity .45s ease;
}

.screen-background.has-image {
    opacity: 1;
}

.screen-background::after {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(1, 15, 38, .38), rgba(2, 20, 49, .66)),
        radial-gradient(circle at 50% 42%, transparent, rgba(1, 12, 31, .48) 75%);
    content: "";
}

.screen-grid-bg {
    position: absolute;
    z-index: 1;
    inset: 0;
    background-image:
        linear-gradient(rgba(119, 181, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(119, 181, 255, .045) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, #000, transparent 87%);
    pointer-events: none;
}

.screen-header {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    padding: 28px 42px;
    border-bottom: 1px solid rgba(133, 189, 255, .14);
}

.screen-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.screen-brand .brand-mark {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, .1);
    box-shadow: none;
}

.screen-brand b {
    display: block;
    font-size: 14px;
    letter-spacing: .16em;
}

.screen-brand small {
    display: block;
    margin-top: 3px;
    color: #81afe7;
    font-size: 14px;
    letter-spacing: .11em;
}

.screen-event {
    text-align: center;
}

.screen-event span {
    display: inline-block;
    margin-bottom: 6px;
    padding: 4px 9px;
    border: 1px solid rgba(119, 187, 255, .3);
    border-radius: 30px;
    color: #a6cfff;
    background: rgba(83, 160, 255, .08);
    font-size: 14px;
}

.screen-event h1 {
    margin-bottom: 0;
    font-size: clamp(20px, 2.1vw, 35px);
    letter-spacing: -.02em;
}

.screen-clock {
    position: relative;
    display: grid;
    padding-right: 19px;
    text-align: right;
}

.screen-clock strong {
    font-size: clamp(22px, 2vw, 33px);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.03em;
}

.screen-clock span {
    color: #8fb3df;
    font-size: 14px;
    letter-spacing: .13em;
}

.live-indicator {
    position: absolute;
    top: 50%;
    right: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #35e3a4;
    box-shadow: 0 0 0 5px rgba(53, 227, 164, .11), 0 0 14px rgba(53, 227, 164, .7);
    animation: pulse 1.8s infinite;
}

.screen-stage {
    position: relative;
    z-index: 2;
    display: grid;
    min-height: 0;
    flex: 1;
    grid-template-columns: minmax(230px, .58fr) minmax(680px, 2.42fr);
    gap: clamp(20px, 2.2vw, 40px);
    padding: clamp(24px, 3vh, 42px) 42px;
}

.screen-player {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.screen-eyebrow {
    color: #62b7ff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .22em;
}

.screen-sequence {
    display: block;
    margin: 12px 0 0;
    color: rgba(154, 204, 255, .16);
    font-size: clamp(90px, 10vw, 170px);
    font-weight: 800;
    line-height: .72;
    letter-spacing: -.08em;
}

.screen-player-name {
    position: relative;
    z-index: 1;
    margin-top: -10px;
}

.screen-player-name > span {
    color: #8ebeea;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .1em;
}

.screen-player-name h2 {
    margin: 7px 0 10px;
    font-size: clamp(36px, 4.5vw, 76px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.06em;
}

.screen-player-name p {
    color: #91b9e3;
    font-size: clamp(14px, 1.1vw, 18px);
}

.screen-progress-line {
    max-width: 340px;
    margin-top: 30px;
}

.screen-progress-line > span {
    display: block;
    margin-bottom: 8px;
    color: #83a9d3;
    font-size: 14px;
}

.screen-progress {
    height: 4px;
    overflow: hidden;
    border-radius: 9px;
    background: rgba(147, 193, 244, .14);
}

.screen-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3d8fff, #4dd5e9);
    transition: width .6s ease;
}

.screen-scores-panel,
.screen-ranking {
    min-height: 0;
    padding: clamp(20px, 2vw, 32px);
    border: 1px solid rgba(146, 196, 255, .15);
    border-radius: 23px;
    background: rgba(4, 33, 76, .47);
    box-shadow: 0 22px 55px rgba(0, 8, 30, .24);
    backdrop-filter: blur(14px);
}

.screen-scores-panel {
    display: flex;
    flex-direction: column;
}

.screen-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(140, 193, 255, .12);
}

.screen-panel-head > span {
    font-size: 14px;
    font-weight: 800;
}

.screen-panel-head small {
    color: #78a5d6;
    font-size: 14px;
    letter-spacing: .1em;
}

.screen-score-grid {
    display: grid;
    min-height: 0;
    flex: 1;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    grid-auto-rows: 128px;
    align-content: center;
    gap: 10px;
    padding: 18px 0;
}

.screen-score-card {
    position: relative;
    display: flex;
    width: 100%;
    height: 128px;
    min-height: 128px;
    max-height: 128px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 22px;
    overflow: hidden;
    border: 1px solid rgba(145, 197, 255, .14);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(31, 99, 182, .19), rgba(10, 44, 94, .2));
    text-align: center;
    box-sizing: border-box;
}

.screen-score-card.is-trimmed {
    border-color: rgba(255, 193, 92, .26);
    background: rgba(121, 78, 18, .12);
}

.screen-score-card.is-voided {
    opacity: .55;
}

.screen-score-card.is-waiting {
    border-style: dashed;
    background: rgba(13, 51, 101, .18);
}

.screen-score-card.is-waiting > small {
    color: #6f95be;
}

.screen-score-card .waiting-score {
    color: #6385a9;
    font-size: clamp(26px, 2.5vw, 42px);
    text-shadow: none;
}

.screen-score-card .screen-judge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
    color: #a5c5e7;
    font-size: 14px;
}

.screen-score-card .screen-judge b {
    max-width: 100%;
    overflow: hidden;
    color: #e3f3ff;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.screen-score-card strong {
    display: flex;
    width: 100%;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    color: #fff;
    font-size: clamp(26px, 2.2vw, 40px);
    line-height: 1;
    letter-spacing: -.04em;
    padding: 0 10px;
    box-sizing: border-box;
    white-space: nowrap;
}

.screen-score-card strong > b {
    font-size: inherit;
}

.screen-score-card strong > small {
    color: #b9d9f8;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0;
}

.screen-score-card.is-voided strong {
    color: #9caec3;
    text-decoration: line-through;
}

.screen-score-card small {
    color: #d79942;
    font-size: 14px;
}

.screen-score-card .void-stamp {
    color: #ff9da8;
}

.screen-result-hero {
    display: grid;
    justify-items: center;
    padding: 2px 0 20px;
    border-bottom: 1px solid rgba(140, 193, 255, .12);
    text-align: center;
}

.screen-result-hero > span {
    margin-bottom: 4px;
    color: #9fc8ee;
    font-size: 14px;
    font-weight: 750;
    letter-spacing: .16em;
}

.screen-result-hero > strong {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 7px;
    color: #fff;
    font-size: clamp(56px, 7vw, 108px);
    line-height: .95;
    letter-spacing: -.07em;
    text-shadow: 0 0 38px rgba(68, 164, 255, .48);
}

.screen-result-hero > strong b {
    font-size: inherit;
}

.screen-result-hero > strong small {
    color: #a9d7ff;
    font-size: clamp(16px, 1.2vw, 22px);
    font-weight: 650;
    letter-spacing: 0;
}

.screen-result-hero > p {
    margin: 10px 0 0;
    color: #7fa8d2;
    font-size: 14px;
}

.screen-result-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(140, 193, 255, .13);
}

.screen-result-bar > div {
    display: grid;
    gap: 5px;
}

.screen-result-bar span {
    color: #a7c6e7;
    font-size: 14px;
}

.screen-result-bar small {
    color: #7199c5;
    font-size: 14px;
}

.screen-result-bar > strong {
    color: #fff;
    font-size: clamp(42px, 6vw, 92px);
    line-height: .95;
    letter-spacing: -.07em;
    text-shadow: 0 0 32px rgba(60, 152, 255, .45);
}

.screen-placeholder {
    grid-column: 1 / -1;
    align-self: center;
    color: #759bc2;
    font-size: 14px;
    text-align: center;
}

.screen-ranking {
    display: flex;
    flex-direction: column;
}

.screen-ranking-list {
    display: grid;
    min-height: 0;
    flex: 1;
    align-content: start;
    gap: 7px;
    overflow: hidden;
    padding-top: 14px;
}

.screen-rank-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    background: rgba(88, 149, 222, .065);
}

.screen-rank-row .rank {
    width: 22px;
    color: #6d97c5;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.screen-rank-row:nth-child(1) .rank {
    color: #ffd36d;
}

.screen-rank-row:nth-child(2) .rank,
.screen-rank-row:nth-child(3) .rank {
    color: #aad4ff;
}

.screen-rank-row .person {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 2px;
}

.screen-rank-row .person strong {
    overflow: hidden;
    color: #edf7ff;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.screen-rank-row .person small {
    overflow: hidden;
    color: #759bc2;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.screen-rank-row > b {
    color: #fff;
    font-size: 14px;
}

.screen-footer {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    padding: 14px 42px;
    border-top: 1px solid rgba(133, 189, 255, .1);
    color: #7198c0;
    font-size: 14px;
    letter-spacing: .08em;
}

.final-ranking-overlay {
    position: absolute;
    z-index: 30;
    inset: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: clamp(18px, 2vh, 28px);
    padding: clamp(28px, 4vh, 54px) clamp(38px, 6vw, 110px);
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 20%, rgba(44, 145, 255, .22), transparent 44%),
        linear-gradient(140deg, #031a41, #064a9b 54%, #063f84);
}

.screen-body.has-screen-background .final-ranking-overlay {
    background:
        linear-gradient(180deg, rgba(2, 20, 49, .48), rgba(2, 18, 43, .74)),
        radial-gradient(circle at 50% 20%, rgba(44, 145, 255, .18), transparent 44%);
    backdrop-filter: blur(3px);
}

.final-ranking-overlay[hidden] {
    display: none;
}

.screen-app[data-status="finished"] > .screen-header,
.screen-app[data-status="finished"] > .screen-stage,
.screen-app[data-status="finished"] > .screen-footer {
    visibility: hidden;
}

.final-ranking-rays {
    position: absolute;
    top: -34%;
    left: 50%;
    width: min(92vw, 1120px);
    height: min(92vw, 1120px);
    border: 1px solid rgba(131, 202, 255, .12);
    border-radius: 50%;
    box-shadow: 0 0 0 120px rgba(113, 184, 255, .025), 0 0 0 240px rgba(113, 184, 255, .015);
    pointer-events: none;
    transform: translateX(-50%);
}

.final-ranking-head {
    position: relative;
    z-index: 1;
    text-align: center;
}

.final-ranking-head > span {
    color: #7ac8ff;
    font-size: 14px;
    font-weight: 850;
    letter-spacing: .38em;
}

.final-ranking-head h2 {
    margin: 8px 0 6px;
    font-size: clamp(38px, 5vw, 78px);
    line-height: 1.05;
    letter-spacing: -.05em;
}

.final-ranking-head p {
    margin: 0;
    color: #a7caeb;
    font-size: clamp(14px, 1.15vw, 18px);
}

.final-ranking-list {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 9px;
    overflow-y: auto;
    padding: 2px 8px 10px;
    scrollbar-color: rgba(133, 190, 255, .35) transparent;
}

.final-rank-row {
    position: relative;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) minmax(120px, auto);
    align-items: center;
    gap: 20px;
    min-height: 58px;
    padding: 8px 22px;
    overflow: hidden;
    border: 1px solid rgba(146, 196, 255, .15);
    border-radius: 15px;
    background: rgba(4, 33, 76, .55);
    box-shadow: 0 8px 28px rgba(0, 9, 30, .12);
    backdrop-filter: blur(14px);
}

.final-rank-row > * {
    position: relative;
    z-index: 1;
}

.final-rank-row.rank-1,
.final-rank-row.rank-2,
.final-rank-row.rank-3 {
    min-height: 70px;
}

.final-rank-row.rank-1 {
    border-color: rgba(255, 214, 100, .72);
    background:
        linear-gradient(90deg, rgba(255, 205, 70, .28), rgba(8, 53, 108, .7) 58%),
        rgba(4, 33, 76, .6);
    box-shadow: 0 0 44px rgba(255, 202, 63, .18), inset 0 1px rgba(255, 239, 166, .18);
}

.final-rank-row.rank-2 {
    border-color: rgba(205, 226, 247, .58);
    background:
        linear-gradient(90deg, rgba(190, 218, 245, .2), rgba(8, 53, 108, .68) 58%),
        rgba(4, 33, 76, .6);
    box-shadow: 0 0 34px rgba(186, 220, 250, .1), inset 0 1px rgba(238, 247, 255, .14);
}

.final-rank-row.rank-3 {
    border-color: rgba(226, 157, 101, .58);
    background:
        linear-gradient(90deg, rgba(221, 142, 80, .22), rgba(8, 53, 108, .68) 58%),
        rgba(4, 33, 76, .6);
    box-shadow: 0 0 34px rgba(226, 148, 86, .1), inset 0 1px rgba(255, 216, 184, .12);
}

.final-rank-no {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #7da5cf;
    font-size: clamp(26px, 2.8vw, 42px);
    font-weight: 850;
    line-height: 1;
    text-align: center;
}

.final-rank-no b {
    font: inherit;
}

.final-rank-trophy {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.final-rank-trophy svg {
    width: 22px;
    height: 22px;
}

.final-rank-row.rank-1 .final-rank-no {
    color: #ffd565;
}

.final-rank-row.rank-1 .final-rank-trophy {
    box-shadow: 0 0 20px rgba(255, 210, 90, .32);
}

.final-rank-row.rank-2 .final-rank-no {
    color: #d8e8f8;
}

.final-rank-row.rank-2 .final-rank-trophy {
    box-shadow: 0 0 18px rgba(210, 232, 252, .22);
}

.final-rank-row.rank-3 .final-rank-no {
    color: #e9a36d;
}

.final-rank-row.rank-3 .final-rank-trophy {
    box-shadow: 0 0 18px rgba(231, 157, 98, .24);
}

.final-rank-person {
    display: flex;
    min-width: 0;
    align-items: center;
}

.final-rank-person strong {
    overflow: hidden;
    color: #f2f8ff;
    font-size: clamp(20px, 1.8vw, 30px);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.final-rank-row.rank-1 .final-rank-person strong {
    color: #fff6d7;
    font-size: clamp(24px, 2.2vw, 36px);
}

.final-rank-row.rank-2 .final-rank-person strong,
.final-rank-row.rank-3 .final-rank-person strong {
    font-size: clamp(22px, 2vw, 32px);
}

.final-rank-score {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 4px;
    color: #fff;
    font-size: clamp(22px, 2.25vw, 36px);
    font-weight: 750;
    line-height: 1;
    letter-spacing: -.025em;
}

.final-rank-row.rank-1 .final-rank-score {
    color: #ffdd78;
}

.final-rank-row.rank-2 .final-rank-score {
    color: #e2f0ff;
}

.final-rank-row.rank-3 .final-rank-score {
    color: #ffc38e;
}

.final-rank-score small {
    color: #a9d7ff;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0;
}

.champion-overlay {
    position: absolute;
    z-index: 30;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
    text-align: center;
    background:
        radial-gradient(circle at 50% 45%, rgba(31, 157, 255, .42), transparent 32%),
        linear-gradient(140deg, #031a41, #064a9b 54%, #063f84);
}

.champion-overlay[hidden] {
    display: none;
}

.champion-rays {
    position: absolute;
    width: 760px;
    height: 760px;
    border: 1px solid rgba(131, 202, 255, .18);
    border-radius: 50%;
    box-shadow: 0 0 0 90px rgba(113, 184, 255, .025), 0 0 0 180px rgba(113, 184, 255, .018);
    animation: slowSpin 22s linear infinite;
}

.champion-rays::before,
.champion-rays::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 100%;
    background: rgba(134, 201, 255, .13);
    content: "";
    transform: translate(-50%, -50%);
}

.champion-rays::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.champion-label {
    position: relative;
    z-index: 1;
    margin-bottom: 15px;
    color: #79c8ff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .38em;
}

.champion-trophy {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: 72px;
    height: 72px;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, .23);
    border-radius: 50%;
    color: #ffdc77;
    background: rgba(255, 255, 255, .08);
}

.champion-trophy svg {
    width: 37px;
    height: 37px;
}

.champion-overlay h2 {
    position: relative;
    z-index: 1;
    margin-bottom: 7px;
    color: #b8dcff;
    font-size: 15px;
    font-weight: 500;
}

.champion-overlay > strong {
    position: relative;
    z-index: 1;
    font-size: clamp(55px, 8vw, 125px);
    line-height: 1.08;
    letter-spacing: -.07em;
}

.champion-overlay > p {
    position: relative;
    z-index: 1;
    margin: 8px 0 15px;
    color: #a7cbea;
    font-size: 15px;
}

.champion-score {
    position: relative;
    z-index: 1;
    color: #6ce0ff;
    font-size: clamp(48px, 6vw, 92px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.05em;
    text-shadow: 0 0 32px rgba(82, 208, 255, .4);
}

.champion-foot {
    position: relative;
    z-index: 1;
    margin-top: 30px;
    color: #83abd3;
    font-size: 14px;
    letter-spacing: .13em;
}

.empty-screen {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #fff;
    background: linear-gradient(135deg, #041c46, #075bb7);
    text-align: center;
}

.empty-screen h1 {
    font-size: 34px;
}

.empty-screen p {
    color: #b8d8f9;
}

.empty-orbit {
    width: 90px;
    height: 90px;
    margin-bottom: 24px;
    border: 18px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
    box-shadow: 0 0 0 20px rgba(255, 255, 255, .03);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .55; }
}

@keyframes slowSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1120px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .competition-grid,
    .judge-session-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-grid,
    .judges-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .rule-choice-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .judge-select-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .screen-stage {
        grid-template-columns: minmax(210px, .58fr) minmax(500px, 1.92fr);
    }

    .screen-ranking {
        display: none;
    }
}

@media (max-width: 860px) {
    .app-header {
        padding: 0 17px;
    }

    .app-main,
    .app-footer {
        width: calc(100% - 28px);
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-visual {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        padding: 35px 22px 65px;
    }

    .mobile-login-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 44px;
    }

    .detail-grid,
    .judges-layout {
        grid-template-columns: 1fr;
    }

    .sticky-panel {
        position: static;
    }

    .detail-side {
        grid-row: 2;
    }

    .competition-detail-head,
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .heading-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .heading-actions .btn {
        flex: 1;
    }

    .flow-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    .banner-progress {
        width: 100%;
    }

    .banner-progress > span {
        text-align: left;
    }

    .champion-banner {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .champion-banner .btn {
        width: 100%;
    }

    .screen-header {
        grid-template-columns: 1fr auto;
        padding: 18px 20px;
    }

    .screen-brand {
        display: none;
    }

    .screen-event {
        text-align: left;
    }

    .screen-stage {
        grid-template-columns: 1fr;
        overflow-y: auto;
        padding: 18px 20px;
    }

    .screen-player {
        min-height: 200px;
    }

    .screen-sequence {
        position: absolute;
        top: 10px;
        right: 10px;
    }

    .screen-scores-panel {
        min-height: 330px;
    }

    .screen-footer {
        padding: 10px 20px;
    }
}

@media (max-width: 640px) {
    .app-header {
        height: 62px;
    }

    .app-header .brand-mark {
        width: 34px;
        height: 34px;
    }

    .app-header .brand-mark svg {
        width: 18px;
        height: 18px;
    }

    .brand strong {
        font-size: 14px;
    }

    .brand small,
    .user-badge {
        display: none;
    }

    .app-main {
        width: calc(100% - 24px);
        padding-top: 22px;
    }

    .app-footer {
        width: calc(100% - 24px);
    }

    .page-heading h1,
    .competition-detail-head h1 {
        font-size: 25px;
    }

    .metric-grid,
    .competition-grid,
    .judge-session-grid,
    .two-cols,
    .four-cols {
        grid-template-columns: 1fr;
    }

    .metric-card {
        min-height: 112px;
    }

    .section-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .judge-select-grid,
    .rule-choice-grid {
        grid-template-columns: 1fr;
    }

    .rule-choice-body {
        min-height: 110px;
    }

    .roster-edit-form {
        grid-template-columns: 1fr;
    }

    .roster-edit-form .btn {
        width: 100%;
    }

    .form-section,
    .panel {
        padding: 18px;
    }

    .form-section-heading {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .form-section-heading .btn {
        width: 100%;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }

    .account-strip {
        align-items: flex-start;
        flex-direction: column;
    }

    .password-popover {
        right: auto;
        left: 0;
    }

    .contestant-banner {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .contestant-banner > div:nth-child(2) {
        min-width: 150px;
    }

    .final-score {
        width: 100%;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, .14);
        text-align: left;
    }

    .archive-body {
        padding-left: 12px;
    }

    .archive-score-row {
        grid-template-columns: 1fr auto;
    }

    .archive-score-row .void-form,
    .archive-score-row .score-void-label {
        grid-column: 1 / -1;
    }

    .judge-directory-item summary {
        flex-wrap: wrap;
    }

    .judge-history {
        width: 100%;
        padding-left: 51px;
    }

    .judge-edit-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .judge-edit-actions .field {
        max-width: none;
    }

    .judge-hero {
        min-height: 145px;
        padding: 23px;
    }

    .judge-hero h1 {
        font-size: 23px;
    }

    .judge-hero-stat {
        min-width: 70px;
        padding-left: 16px;
    }

    .judge-hero-stat strong {
        font-size: 32px;
    }

    .score-page .app-main {
        padding-top: 13px;
    }

    .score-page .app-header {
        height: 55px;
    }

    .quick-scores {
        grid-template-columns: repeat(4, 1fr);
    }

    .score-input-wrap input {
        width: 170px;
        font-size: 52px;
    }

    .screen-score-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .champion-overlay > strong {
        font-size: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

/* Independent judge entry */
.judge-login-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 16% 18%, rgba(71, 161, 255, .34), transparent 31%),
        radial-gradient(circle at 86% 82%, rgba(22, 197, 226, .2), transparent 30%),
        linear-gradient(145deg, #031a40 0%, #073b83 48%, #0a64bf 100%);
}

.judge-login-body .app-main {
    width: 100%;
    min-height: 100vh;
    padding: 0;
}

.judge-login-body .app-footer {
    display: none;
}

.judge-login-shell {
    position: relative;
    display: grid;
    min-height: 100vh;
    padding: 34px 20px 48px;
    place-items: center;
    overflow: hidden;
}

.judge-login-orbit {
    position: absolute;
    width: 440px;
    height: 440px;
    border: 1px solid rgba(155, 205, 255, .18);
    border-radius: 50%;
    pointer-events: none;
}

.judge-login-orbit::after {
    position: absolute;
    inset: 58px;
    border: 1px dashed rgba(155, 205, 255, .18);
    border-radius: inherit;
    content: "";
}

.judge-login-orbit-a {
    top: -310px;
    left: -170px;
}

.judge-login-orbit-b {
    right: -190px;
    bottom: -330px;
}

.judge-login-card {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    padding: 42px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 30px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 34px 90px rgba(1, 20, 53, .38);
    backdrop-filter: blur(18px);
}

.judge-login-brand {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 34px;
    color: var(--blue-900);
}

.judge-login-brand > span:last-child {
    display: grid;
    gap: 2px;
}

.judge-login-brand b {
    font-size: 20px;
    letter-spacing: .12em;
}

.judge-login-brand small {
    color: var(--blue-600);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .16em;
}

.judge-login-copy {
    margin-bottom: 28px;
}

.judge-login-copy h1 {
    margin: 10px 0 10px;
    color: var(--ink);
    font-size: clamp(34px, 6vw, 46px);
    line-height: 1.05;
    letter-spacing: -.045em;
}

.judge-login-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

.judge-login-form {
    display: grid;
    gap: 18px;
}

.judge-login-form .field {
    gap: 8px;
}

.judge-login-form .field > span:first-child {
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 750;
}

.judge-login-form .input-shell input {
    height: 54px;
    font-size: 16px;
}

.judge-login-form .btn {
    margin-top: 4px;
}

.judge-login-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 24px;
    padding: 14px 16px;
    border: 1px solid #d8e7fb;
    border-radius: 14px;
    color: #4c6588;
    background: #f3f8ff;
    font-size: 14px;
    line-height: 1.55;
}

.judge-login-note svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    color: var(--blue-600);
}

.judge-admin-link {
    display: block;
    margin-top: 20px;
    color: var(--blue-700);
    font-size: 14px;
    font-weight: 750;
    text-align: center;
    text-decoration: none;
}

/* Judge login QR entry */
.judge-qr-entry {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    margin-bottom: 24px;
    padding: 26px 30px;
    border: 1px solid #dbe8f8;
    border-radius: 24px;
    background:
        linear-gradient(110deg, rgba(231, 241, 255, .9), rgba(255, 255, 255, .98) 48%),
        #fff;
    box-shadow: 0 16px 42px rgba(12, 65, 138, .09);
}

.judge-qr-frame {
    position: relative;
    display: grid;
    width: 208px;
    height: 208px;
    border: 1px solid #d7e5f7;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(10, 68, 148, .12);
    place-items: center;
}

.judge-qr-frame::before {
    position: absolute;
    color: var(--muted);
    content: "二维码加载中";
    font-size: 14px;
}

.judge-qr-frame.is-ready::before {
    display: none;
}

.judge-qr-frame canvas {
    display: block;
    border-radius: 13px;
}

.qr-noscript-link {
    padding: 16px;
    color: var(--blue-700);
    font-size: 14px;
    font-weight: 750;
    text-align: center;
}

.judge-qr-content h2 {
    margin: 8px 0 8px;
    color: var(--ink);
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -.03em;
}

.judge-qr-content p {
    max-width: 720px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

.judge-qr-url {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin-bottom: 16px;
    padding: 8px 11px;
    overflow-wrap: anywhere;
    border: 1px solid #dce9f8;
    border-radius: 10px;
    color: var(--blue-800);
    background: #fff;
    font-size: 14px;
}

.judge-qr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.screen-background-panel .panel-note {
    margin-bottom: 16px;
}

.background-upload-item {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #dce8f7;
    border-radius: 15px;
    background: #f8fbff;
}

.background-preview {
    display: grid;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px dashed #bfd4ed;
    border-radius: 11px;
    color: #6c86a6;
    background:
        radial-gradient(circle at 20% 30%, rgba(66, 143, 238, .25), transparent 35%),
        linear-gradient(135deg, #082d64, #064e9d);
    font-size: 14px;
    font-weight: 750;
    place-items: center;
}

.background-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.background-preview.has-image {
    border-style: solid;
}

.background-remove {
    display: flex;
    gap: 9px;
    align-items: center;
    color: #b43d4d;
    font-size: 14px;
}

.background-remove input {
    width: 17px;
    height: 17px;
    accent-color: #cf3548;
}

/* Keep every piece of text in the administrator backend at 14px or larger. */
.admin-body {
    font-size: 14px;
}

@media (max-width: 760px) {
    .judge-login-shell {
        min-height: 100vh;
        padding: 18px 14px 34px;
    }

    .judge-login-card {
        padding: 28px 22px;
        border-radius: 24px;
    }

    .judge-login-brand {
        margin-bottom: 26px;
    }

    .judge-login-copy h1 {
        font-size: 34px;
    }

    .judge-qr-entry {
        grid-template-columns: 1fr;
        padding: 22px;
        text-align: center;
    }

    .judge-qr-frame {
        margin: 0 auto;
    }

    .judge-qr-url {
        margin-right: auto;
        margin-left: auto;
    }

    .judge-qr-actions {
        justify-content: center;
    }

    .final-ranking-overlay {
        padding: 24px 18px;
    }

    .final-rank-row {
        grid-template-columns: 62px minmax(0, 1fr) auto;
        gap: 10px;
        padding: 9px 12px;
    }

    .final-rank-person strong {
        font-size: 18px;
    }

    .final-rank-row.rank-1 .final-rank-person strong,
    .final-rank-row.rank-2 .final-rank-person strong,
    .final-rank-row.rank-3 .final-rank-person strong {
        font-size: 20px;
    }

    .final-rank-no {
        gap: 5px;
        font-size: 25px;
    }

    .final-rank-trophy {
        width: 27px;
        height: 27px;
    }

    .final-rank-trophy svg {
        width: 16px;
        height: 16px;
    }

    .final-rank-score {
        font-size: 22px;
    }

    .final-rank-score small {
        font-size: 10px;
    }
}
