:root {
    --bg: #f3efe5;
    --panel: #fffaf2;
    --panel-strong: #fff;
    --ink: #16211d;
    --muted: #62706c;
    --line: #dccfb7;
    --brand: #0c7a5b;
    --brand-strong: #09563f;
    --accent: #e68b2e;
    --danger: #c8463a;
    --success: #1c8d63;
    --shadow: 0 20px 60px rgba(24, 33, 29, 0.08);
    --radius: 24px;
}

html {
    width: 100%;
    overflow-x: hidden;
    background: var(--bg);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    font-size: 12px;
    line-height: 1.5;
    color: var(--ink);
    width: 100%;
    min-width: 320px;
    overflow-x: hidden;
    overflow-y: hidden;
    background:
        radial-gradient(circle at top left, rgba(230, 139, 46, 0.14), transparent 30%),
        radial-gradient(circle at top right, rgba(12, 122, 91, 0.12), transparent 34%),
        var(--bg);
}

img,
svg,
canvas,
video {
    max-width: 100%;
}

button,
input,
select,
textarea {
    max-width: 100%;
}

.public-main {
    min-height: 100vh;
    padding: 28px;
    background:
        radial-gradient(circle at top left, rgba(230, 139, 46, 0.18), transparent 26%),
        radial-gradient(circle at top right, rgba(12, 122, 91, 0.2), transparent 32%),
        linear-gradient(180deg, #10231d, #162d26 42%, #f3efe5 42%, #f3efe5);
}

.shell,
.main,
.public-main,
.hero,
.grid,
.grid-2,
.grid-3,
.grid-4,
.builder-grid,
.table-wrap,
.team-v2-table-wrap,
.scores-table-wrap {
    min-width: 0;
}

.main > *,
.public-main > *,
.hero > *,
.grid > *,
.grid-2 > *,
.grid-3 > *,
.grid-4 > * {
    min-width: 0;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

.shell {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: 100vh;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.sidebar {
    padding: 28px;
    background: #ffffff;
    color: #111111;
    display: flex;
    position: sticky;
    top: 0;
    height: 100vh;
    flex-direction: column;
    gap: 24px;
    overflow: hidden;
    align-self: start;
    border-right: 1px solid #e7edf3;
}

.sidebar-mobile-bar,
.shell-menu-toggle,
.sidebar-backdrop,
.sidebar-close {
    display: none;
}

.sidebar-backdrop[hidden] {
    display: none !important;
}

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

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), #ffd086);
    color: #222;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.brand h1,
.topbar h2,
.panel h3,
.panel h4,
.hero-card h3 {
    margin: 0;
}

.brand p,
.sidebar-note p,
.panel p,
.hero-card p,
.empty-state p,
.check-card span {
    margin: 0;
    color: var(--muted);
}

.sidebar .brand p,
.sidebar-note p {
    color: rgba(247, 243, 234, 0.72);
}

.nav {
    display: grid;
    gap: 10px;
}

.nav-link {
    padding: 13px 16px;
    border-radius: 14px;
    color: rgba(247, 243, 234, 0.82);
    background: rgba(255, 255, 255, 0.03);
    transition: 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    background: rgba(230, 139, 46, 0.16);
}

.sidebar-note {
    margin-top: auto;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.main {
    padding: 28px;
    height: 100vh;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.main-live-scoring {
    padding-top: 0;
    overflow-x: clip;
}

.topbar,
.section-heading,
.checkbox-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.stacked-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.topbar-auth {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-user {
    display: grid;
    gap: 2px;
    text-align: right;
}

.topbar-user strong {
    font-size: 14px;
}

.topbar-user span {
    font-size: 12px;
    color: var(--muted);
}

.sidebar-user-card {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 12px;
}

.sidebar-user-head {
    display: flex;
    justify-content: flex-start;
}

.sidebar-user-meta {
    display: grid;
    gap: 4px;
}

.sidebar-user-meta strong {
    color: #f7f3ea;
    font-size: 15px;
}

.sidebar-user-meta span {
    color: rgba(247, 243, 234, 0.72);
    font-size: 12px;
    word-break: break-word;
}

.sidebar-logout {
    width: 100%;
}

.sidebar-modern {
    gap: 20px;
    background: #ffffff;
    box-shadow: 18px 0 52px rgba(15, 23, 32, 0.06);
}

.sidebar-modern-brand,
.sidebar-modern-user,
.sidebar-modern-link,
.sidebar-modern-logout {
    display: flex;
    align-items: center;
}

.sidebar-modern-brand {
    gap: 14px;
    padding: 0 4px 8px;
}

.sidebar-modern-brand-logo-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 0 2px;
}

.sidebar-modern-brand-logo {
    max-width: 168px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.sidebar-modern-brand h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
}

.sidebar-modern-brand p {
    margin: 4px 0 0;
    color: #5f6b76;
    font-size: 13px;
}

.sidebar-modern-nav {
    display: grid;
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
    gap: 14px;
    overflow-y: auto;
    padding-right: 3px;
}

.sidebar-modern-group {
    display: grid;
    gap: 7px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e7edf3;
}

.sidebar-modern-group h2 {
    margin: 0 0 4px 6px;
    color: #4f5b66;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sidebar-modern-link {
    min-height: 42px;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 13px;
    color: #111111;
    background: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

.sidebar-modern-link:hover,
.sidebar-modern-link.is-active {
    color: #111111;
    background: #f3f6f8;
}

.sidebar-modern-icon,
.sidebar-modern-icon svg,
.sidebar-modern-logout svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.sidebar-modern svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-modern-link strong {
    margin-left: auto;
    padding: 3px 6px;
    border-radius: 6px;
    color: #0b6b4e;
    background: #e8f5ef;
    font-size: 10px;
}

.sidebar-modern-user {
    gap: 12px;
    margin-top: auto;
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e7edf3;
}

.sidebar-modern-avatar {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0ea66f, #5be0aa);
    color: #072118;
    font-weight: 900;
    flex: 0 0 auto;
}

.sidebar-modern-user strong {
    display: block;
    color: #111111;
    font-size: 13px;
}

.sidebar-modern-user span {
    display: block;
    margin-top: 4px;
    color: #5f6b76;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.sidebar-modern-logout {
    justify-content: center;
    gap: 9px;
    padding: 13px;
    border-radius: 14px;
    color: #111111;
    background: #f8fafc;
    border: 1px solid #e7edf3;
    font-weight: 800;
}

.eyebrow {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
    font-weight: 700;
}

.topbar-badge,
.meta-pill {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(12, 122, 91, 0.1);
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 700;
}

.hero,
.grid {
    display: grid;
    gap: 20px;
}

.builder-grid {
    align-items: start;
}

.hero {
    grid-template-columns: 1.5fr 1fr;
    margin-top: 22px;
}

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

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 20px;
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 20px;
}

.compact {
    gap: 14px;
}

.hero-card,
.panel {
    background: var(--panel-strong);
    border: 1px solid rgba(220, 207, 183, 0.75);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.hero-card {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: center;
}

.hero-card.accent {
    background: linear-gradient(180deg, #fff7ea, #fff);
}

.panel {
    margin-top: 20px;
}

.form-panel {
    margin-top: 0;
}

.muted {
    background: var(--panel);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), #14a377);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.button-secondary {
    background: #ece4d4;
    color: var(--ink);
}

.button-danger {
    background: linear-gradient(135deg, var(--danger), #df6b60);
    color: #fff;
}

.button-small {
    padding: 9px 12px;
    font-size: 13px;
}

.template-picker {
    margin-top: 14px;
}

.verification-grid {
    align-items: start;
}

label {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fffdfa;
    color: var(--ink);
    font: inherit;
}

textarea {
    resize: vertical;
}

.alert {
    margin: 18px 0;
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 600;
}

.alert-success {
    background: rgba(28, 141, 99, 0.12);
    color: var(--success);
}

.alert-error {
    background: rgba(200, 70, 58, 0.12);
    color: var(--danger);
}

.builder-summary {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 18px;
}

.summary-card {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(220, 207, 183, 0.8);
    background: #fffdf9;
    display: grid;
    gap: 6px;
}

.summary-card strong {
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.summary-card h3 {
    margin: 0;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
    gap: 20px;
    margin-top: 22px;
}

.dashboard-hero-panel {
    margin-top: 0;
}

.dashboard-hero-panel-primary {
    background:
        radial-gradient(circle at top right, rgba(230, 139, 46, 0.16), transparent 26%),
        linear-gradient(135deg, rgba(12, 122, 91, 0.09), rgba(255, 255, 255, 0.98) 52%);
}

.dashboard-hero-panel-secondary {
    background:
        radial-gradient(circle at top left, rgba(12, 122, 91, 0.12), transparent 28%),
        #fffdf9;
}

.dashboard-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.dashboard-stat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.dashboard-stat-card,
.dashboard-health-card,
.dashboard-link-card {
    border: 1px solid rgba(220, 207, 183, 0.8);
    border-radius: 20px;
    background: #fffdf9;
}

.dashboard-stat-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.dashboard-stat-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-stat-value {
    font-size: 34px;
    line-height: 1;
    color: var(--brand-strong);
}

.dashboard-stat-note,
.dashboard-health-card small,
.dashboard-link-card span,
.dashboard-detail-list span {
    color: var(--muted);
}

.dashboard-main-grid {
    align-items: start;
}

.dashboard-health-grid,
.dashboard-quick-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.dashboard-health-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    background:
        linear-gradient(135deg, rgba(12, 122, 91, 0.06), rgba(255, 253, 249, 0.98) 54%);
}

.dashboard-health-card strong,
.dashboard-detail-list strong,
.dashboard-link-card strong {
    font-size: 13px;
}

.dashboard-health-card span {
    font-size: 28px;
    font-weight: 800;
    color: var(--brand-strong);
    line-height: 1;
}

.dashboard-quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-link-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.dashboard-link-card:hover {
    transform: translateY(-2px);
    border-color: rgba(12, 122, 91, 0.3);
    box-shadow: 0 18px 36px rgba(12, 122, 91, 0.08);
}

.dashboard-detail-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.dashboard-detail-list > div {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(243, 239, 229, 0.56);
    border: 1px solid rgba(220, 207, 183, 0.7);
}

.dashboard-detail-list-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-empty-panel {
    max-width: 760px;
}

@media (max-width: 1180px) {
    .dashboard-hero {
        grid-template-columns: 1fr;
    }

    .dashboard-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .dashboard-stat-grid,
    .dashboard-health-grid,
    .dashboard-quick-links,
    .dashboard-detail-list-compact {
        grid-template-columns: 1fr;
    }

    .dashboard-stat-value {
        font-size: 30px;
    }
}

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

.judge-summary .summary-card {
    position: relative;
    overflow: hidden;
    min-height: 112px;
    padding: 18px 20px;
    border-color: rgba(12, 122, 91, 0.16);
    background:
        linear-gradient(135deg, rgba(12, 122, 91, 0.08), rgba(255, 253, 249, 0.96) 48%),
        #fffdf9;
}

.judge-summary .summary-card::after {
    content: "";
    position: absolute;
    right: -22px;
    top: -28px;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    background: rgba(12, 122, 91, 0.08);
}

.judge-summary .summary-card h3 {
    color: var(--brand-strong);
    font-size: 28px;
    line-height: 1;
}

.live-hero {
    background: linear-gradient(135deg, rgba(12, 122, 91, 0.12), rgba(230, 139, 46, 0.12));
}

.live-badge-block {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.live-form {
    display: grid;
    gap: 22px;
}

.live-section {
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(220, 207, 183, 0.82);
    background: #fffdf9;
}

.live-field {
    margin-bottom: 0;
}

.live-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(12, 122, 91, 0.08);
}

.sticky-score-summary {
    display: grid;
    gap: 6px;
    min-width: 200px;
    padding: 14px 18px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(12, 122, 91, 0.2);
}

.sticky-score-summary strong {
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sticky-score-summary span {
    font-size: 28px;
    font-weight: 800;
    color: var(--brand-strong);
}

.live-action-copy {
    display: grid;
    gap: 8px;
}

.live-actions p,
.field-help,
.field-error {
    margin: 0;
}

.live-access-panel,
.live-access-form {
    display: grid;
    gap: 18px;
}

.live-session-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(230, 139, 46, 0.12);
}

.live-session-banner p,
.public-board-copy {
    margin: 6px 0 0;
    color: var(--muted);
}

.field-help {
    font-size: 12px;
    color: var(--muted);
}

.field-error {
    font-size: 12px;
    color: var(--danger);
    font-weight: 700;
}

.queue-list {
    display: grid;
    gap: 12px;
}

.queue-item {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(220, 207, 183, 0.82);
    background: #fffdf9;
}

.queue-item.is-active {
    border-color: rgba(12, 122, 91, 0.5);
    background: rgba(12, 122, 91, 0.06);
}

.queue-item-main,
.queue-item-meta,
.rule-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.inline-note {
    color: var(--danger);
    font-size: 13px;
}

.operations-status-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.operations-status-form select {
    max-width: 220px;
}

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

.sort-stack-card h4 {
    margin: 0 0 12px;
}

.export-note {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(220, 207, 183, 0.82);
    background: #fffdf9;
}

.export-note p,
.export-note strong {
    margin: 0;
}

.review-history {
    display: grid;
    gap: 16px;
}

.history-item {
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid rgba(220, 207, 183, 0.82);
    background: #fffdf9;
    display: grid;
    gap: 10px;
}

.history-summary,
.history-notes {
    margin: 0;
}

.history-notes {
    color: var(--muted);
}

.form-actions,
.table-actions,
.inline-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.form-actions {
    margin-top: 10px;
}

.feature-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

.table th,
.table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(220, 207, 183, 0.8);
}

.score-task-table td:last-child,
.score-task-table th:last-child,
.score-task-table td:nth-child(2),
.score-task-table th:nth-child(2),
.score-task-table td:nth-child(3),
.score-task-table th:nth-child(3),
.score-task-table td:nth-child(4),
.score-task-table th:nth-child(4) {
    text-align: center;
}

.task-qty-input {
    min-width: 90px;
    text-align: center;
}

.table th {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.empty-state {
    border: 1px dashed var(--line);
    border-radius: 18px;
    padding: 28px;
    text-align: center;
    background: #fffdf9;
}

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

.checkbox-block {
    justify-content: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fffdf9;
}

.checkbox-block input {
    width: auto;
}

.auth-role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.role-permission-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 16px;
}

.role-permission-matrix {
    display: grid;
    gap: 14px;
}

.role-permission-group {
    border: 1px solid rgba(220, 207, 183, 0.85);
    border-radius: 18px;
    background: #fffdf9;
    overflow: hidden;
}

.role-permission-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(12, 122, 91, 0.07), rgba(230, 139, 46, 0.05));
}

.role-permission-group summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.role-permission-group .auth-role-grid {
    padding: 14px;
}

.role-permission-group .checkbox-block {
    align-items: flex-start;
    justify-content: flex-start;
}

.role-permission-group .checkbox-block span {
    display: grid;
    gap: 3px;
}

.role-permission-group .checkbox-block small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.check-card {
    padding: 18px;
    border-radius: 18px;
    background: #fffdf9;
    border: 1px solid rgba(220, 207, 183, 0.78);
    display: grid;
    gap: 8px;
}

.public-board-shell {
    display: grid;
    gap: 22px;
}

.public-board-topbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    color: #f7f3ea;
}

.public-board-topbar h1,
.public-board-hero h2 {
    margin: 0;
}

.public-board-picker {
    min-width: 320px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(18px);
}

.public-board-picker label span {
    color: #f7f3ea;
}

.public-board-picker select {
    background: rgba(255, 250, 242, 0.96);
}

.public-board-hero {
    padding: 28px;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(135deg, rgba(12, 122, 91, 0.92), rgba(230, 139, 46, 0.82));
    box-shadow: var(--shadow);
}

.public-board-hero p {
    color: rgba(255, 255, 255, 0.82);
}

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

.podium-card {
    padding: 24px;
    border-radius: 26px;
    color: #10231d;
    background: #fffaf2;
    border: 1px solid rgba(220, 207, 183, 0.72);
    box-shadow: var(--shadow);
    display: grid;
    gap: 10px;
}

.podium-rank {
    display: inline-flex;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(12, 122, 91, 0.1);
    color: var(--brand-strong);
    font-weight: 700;
}

.podium-rank-1 {
    background: linear-gradient(180deg, #fff2cc, #fffdf7);
}

.podium-rank-2 {
    background: linear-gradient(180deg, #eef2f4, #fffdf7);
}

.podium-rank-3 {
    background: linear-gradient(180deg, #f7e1cf, #fffdf7);
}

.public-board-table {
    margin-top: 0;
}

.public-board-empty {
    padding: 36px;
    border-radius: 26px;
    text-align: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.panel-v2 {
    background: #fff;
}

.v2-page-header,
.v2-header-actions,
.team-v2-filter-grid,
.team-v2-toolbar,
.team-v2-filter-actions,
.team-v2-pagination,
.team-v2-import-card {
    display: flex;
    gap: 16px;
}

.v2-page-header,
.team-v2-toolbar,
.team-v2-pagination,
.team-v2-import-card {
    align-items: center;
    justify-content: space-between;
}

.v2-header-actions,
.team-v2-filter-actions {
    flex-wrap: wrap;
    align-items: center;
}

.v2-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
}

.team-v2-summary {
    margin-bottom: 20px;
}

.team-v2-filter-bar {
    position: sticky;
    top: 20px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
}

.team-v2-filter-grid {
    flex-wrap: wrap;
    align-items: end;
}

.team-v2-filter-grid label {
    flex: 1 1 180px;
    margin-bottom: 0;
}

.team-v2-filter-actions {
    flex: 0 0 auto;
    padding-bottom: 2px;
}

.team-v2-import-card {
    margin-top: 20px;
    padding: 20px 22px;
    border-radius: 20px;
    border: 1px dashed rgba(12, 122, 91, 0.28);
    background: linear-gradient(180deg, rgba(12, 122, 91, 0.04), rgba(230, 139, 46, 0.03));
}

.team-v2-import-card h4,
.team-v2-dialog h3 {
    margin: 0;
}

.team-v2-import-card p {
    margin: 6px 0 0;
}

.team-v2-toolbar {
    margin: 18px 0;
    flex-wrap: wrap;
}

.team-v2-bulk-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.team-v2-toolbar-note {
    color: var(--muted);
    font-size: 13px;
}

.scores-filter-bar {
    margin-top: 18px;
    padding: 20px 22px 22px;
    border-radius: 24px;
    border: 1px solid rgba(214, 202, 178, 0.9);
    background:
        linear-gradient(135deg, rgba(255, 250, 241, 0.98) 0%, rgba(249, 252, 247, 0.98) 100%);
    box-shadow: 0 18px 40px rgba(19, 33, 24, 0.06);
}

.scores-shell {
    padding: 24px;
    border-radius: 30px;
}

.scores-page-head {
    align-items: flex-start;
}

.scores-head-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.scores-hero-export {
    min-height: 44px;
    padding-inline: 18px;
    border-radius: 14px;
    background: #fff;
}

.scores-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    position: relative;
}

.scores-main-panel {
    margin: 0;
}

.scores-filter-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.scores-filter-head h4,
.scores-toolbar-copy h4 {
    margin: 4px 0 0;
    font-size: 1.02rem;
    color: var(--text);
}

.scores-filter-bar-ref {
    border-radius: 22px;
    background: #fff;
    border-color: rgba(224, 230, 241, 0.95);
    box-shadow: 0 16px 36px rgba(39, 56, 94, 0.06);
}

.scores-filter-grid-ref {
    align-items: end;
}

.scores-input-wrap {
    position: relative;
}

.scores-input-wrap input {
    padding-right: 42px;
}

.scores-input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #637087;
    font-size: 16px;
    pointer-events: none;
}

.scores-filter-grid,
.scores-filter-actions,
.scores-toolbar,
.scores-edit-actions {
    display: flex;
    gap: 14px;
    align-items: end;
    flex-wrap: wrap;
}

.scores-filter-grid label {
    flex: 1 1 180px;
    margin-bottom: 0;
}

.scores-filter-search {
    flex: 1.35 1 260px;
}

.scores-filter-grid label span {
    display: inline-block;
    margin-bottom: 7px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5e695f;
}

.scores-filter-grid input,
.scores-filter-grid select {
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(220, 227, 238, 0.98);
    background: #fff;
    box-shadow: 0 8px 20px rgba(35, 53, 84, 0.04);
}

.scores-filter-grid input:focus,
.scores-filter-grid select:focus {
    border-color: rgba(31, 143, 104, 0.65);
    box-shadow: 0 0 0 4px rgba(31, 143, 104, 0.12);
}

.scores-filter-actions {
    flex: 0 0 auto;
    padding-bottom: 2px;
    gap: 10px;
}

.scores-primary-action,
.scores-secondary-action,
.scores-bulk-button,
.scores-export-filtered,
.scores-row-action {
    border-radius: 999px;
    min-height: 42px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.scores-primary-action {
    padding-inline: 22px;
    box-shadow: 0 10px 22px rgba(18, 125, 92, 0.18);
}

.scores-secondary-action {
    background: rgba(241, 235, 219, 0.9);
}

.scores-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    padding: 14px 18px;
    border: 1px solid rgba(220, 207, 183, 0.76);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 254, 251, 0.96) 0%, rgba(250, 247, 240, 0.96) 100%);
    flex-wrap: nowrap;
}

.scores-toolbar-ref {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.scores-toolbar-left,
.scores-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.scores-toolbar-right {
    justify-content: flex-end;
}

.scores-head-tabs {
    margin-top: 12px;
}

.scores-selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 10px 16px;
    border-radius: 18px;
    border: 1px solid rgba(220, 227, 238, 0.98);
    background: #fff;
    box-shadow: 0 8px 20px rgba(35, 53, 84, 0.04);
    color: #253047;
    font-weight: 600;
    flex-wrap: nowrap;
    flex: 0 0 auto;
}

.scores-selected-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(220, 227, 238, 0.98);
    background: #f8fafc;
    flex: 0 0 auto;
}

.scores-selected-toggle input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.scores-selected-summary {
    display: grid;
    gap: 2px;
    min-width: 70px;
    line-height: 1.1;
}

.scores-selected-summary strong {
    font-size: 22px;
    color: #1f2940;
}

.scores-selected-summary span {
    font-size: 12px;
    color: #5f6f86;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.scores-select-all-filtered {
    min-height: 40px;
    padding-inline: 16px;
    border-radius: 999px;
    white-space: nowrap;
}

.scores-sort-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(220, 227, 238, 0.98);
    background: #fff;
    color: #50617a;
}

.scores-sort-pill strong {
    color: #1f2940;
}

.scores-columns-trigger {
    min-height: 44px;
    padding-inline: 16px;
    border-radius: 14px;
    background: #fff;
}

.scores-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    min-width: 0;
}

.scores-bulk-actions-form {
    display: flex;
    flex: 0 1 auto;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.scores-bulk-button {
    min-height: 44px;
    padding-inline: 18px;
    border-radius: 12px;
    background: #fff;
    color: #213027;
    border-color: rgba(220, 227, 238, 0.98);
}

.scores-bulk-button-success {
    background: #1b9a6d;
    border-color: #1b9a6d;
    color: #fff;
}

.scores-bulk-button-danger {
    background: #d95c4a;
    border-color: #d95c4a;
    color: #fff;
}

.scores-export-filtered {
    padding-inline: 18px;
    background: #f1ead9;
}

.scores-table-card {
    overflow: hidden;
    border: 1px solid rgba(220, 227, 238, 0.98);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 20px 48px rgba(39, 56, 94, 0.07);
}

.scores-table td {
    vertical-align: middle;
}

.scores-table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: 24px 24px 0 0;
    scrollbar-gutter: stable both-edges;
    width: 100%;
    max-width: 100%;
    padding-bottom: 6px;
}

.scores-table {
    min-width: 1680px;
    width: max-content;
}

.scores-table .table-actions {
    justify-content: flex-start;
}

.scores-table thead th {
    padding-top: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(227, 233, 242, 0.98);
    color: #5b677c;
}

.scores-table-row td {
    padding-top: 24px;
    padding-bottom: 24px;
    border-bottom-color: rgba(233, 237, 244, 0.98);
}

.scores-table-row-verified {
    background: linear-gradient(90deg, rgba(237, 248, 244, 0.9) 0%, rgba(255, 255, 255, 0) 42%);
}

.scores-table-row-pending {
    background: linear-gradient(90deg, rgba(255, 244, 229, 0.78) 0%, rgba(255, 255, 255, 0) 42%);
}

.scores-table-row-rejected {
    background: linear-gradient(90deg, rgba(252, 235, 231, 0.82) 0%, rgba(255, 255, 255, 0) 42%);
}

.scores-team-name {
    display: block;
    margin-bottom: 4px;
    color: #1f2940;
}

.scores-team-subline {
    display: block;
    color: #69768b;
    font-size: 0.88rem;
}

.scores-number {
    color: #10945f;
    font-weight: 700;
}

.scores-row-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
}

.scores-row-action {
    position: relative;
    min-width: 0;
    width: 42px;
    height: 42px;
    justify-content: center;
    padding: 0;
    border-radius: 12px;
    border-color: rgba(220, 227, 238, 0.98);
    background: #fff;
    white-space: nowrap;
    flex: 0 0 auto;
}

.scores-row-action svg {
    width: 18px;
    height: 18px;
    display: block;
}

.scores-row-action::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(4px);
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(17, 24, 39, 0.96);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
    z-index: 5;
}

.scores-row-action:hover::after,
.scores-row-action:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.scores-row-action-pdf {
    background: rgba(248, 250, 253, 0.98);
}

.scores-row-action-success {
    background: rgba(226, 244, 236, 0.98);
    color: #156947;
    border-color: rgba(161, 214, 185, 0.95);
}

.scores-row-action-warning {
    background: rgba(249, 237, 210, 0.98);
    color: #8a5a14;
    border-color: rgba(229, 196, 132, 0.92);
}

.scores-row-action-danger {
    background: #d95c4a;
    border-color: #d95c4a;
    color: #fff;
    box-shadow: none;
}

.scores-row-action-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #687265;
    cursor: default;
}

.scores-table td[data-label="Submitted By"] {
    overflow-wrap: anywhere;
}

.scores-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(244, 239, 227, 0.96);
    border: 1px solid rgba(221, 209, 184, 0.95);
}

.scores-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: currentColor;
    flex: 0 0 auto;
}

.scores-status-verified {
    color: #1ea94d;
    background: rgba(229, 245, 236, 0.96);
    border-color: rgba(173, 221, 191, 0.95);
}

.scores-status-pending {
    color: #9a6b19;
    background: rgba(251, 241, 220, 0.98);
    border-color: rgba(231, 202, 146, 0.92);
}

.scores-status-rejected {
    color: var(--danger);
    background: rgba(251, 232, 229, 0.98);
    border-color: rgba(231, 175, 166, 0.92);
}

.scores-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-top: 1px solid rgba(227, 233, 242, 0.98);
    background: #fff;
}

.scores-footer-controls {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.scores-per-page-form {
    margin: 0;
}

.scores-per-page-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.scores-per-page-label span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5d697e;
}

.scores-per-page-label select {
    min-height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(220, 227, 238, 0.98);
    background: #fff;
    padding-inline: 12px;
}

.scores-pagination {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.scores-pagination .is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

.scores-footer-summary,
.scores-legend {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    color: #5d697e;
}

.scores-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.scores-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    display: inline-block;
}

.scores-legend-dot.is-verified {
    background: #1ea94d;
}

.scores-legend-dot.is-pending {
    background: #dd8a15;
}

.scores-legend-dot.is-rejected {
    background: #d95c4a;
}

.scores-columns-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    display: none;
    border-radius: 24px;
    border: 1px solid rgba(220, 227, 238, 0.98);
    background: #fff;
    box-shadow: 0 18px 42px rgba(39, 56, 94, 0.08);
    z-index: 20;
}

.scores-columns-panel.is-open {
    display: block;
}

.scores-columns-panel-head,
.scores-columns-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.scores-columns-panel-head {
    margin-bottom: 14px;
}

.scores-columns-panel-head h4 {
    margin: 0;
}

.scores-columns-search input {
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(220, 227, 238, 0.98);
    background: #fff;
}

.scores-columns-list {
    display: grid;
    gap: 8px;
    margin: 14px 0 18px;
    max-height: 560px;
    overflow: auto;
}

.scores-column-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(239, 242, 247, 0.92);
}

.scores-column-option span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.scores-column-option-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.scores-column-order-button {
    min-height: 30px;
    min-width: 30px;
    padding: 0;
    border-radius: 10px;
}

@media (max-width: 1180px) {
    .scores-content-grid {
        grid-template-columns: 1fr;
    }

    .scores-columns-panel {
        position: static;
        width: 100%;
    }

    .scores-columns-panel.is-open {
        display: block;
    }
}

@media (max-width: 920px) {
    .scores-shell {
        padding: 18px;
    }

    .scores-head-actions,
    .scores-toolbar-left,
    .scores-toolbar-right,
    .scores-toolbar-actions,
    .scores-bulk-actions-form,
    .scores-table-footer {
        width: 100%;
    }

    .scores-toolbar-left,
    .scores-toolbar-right,
    .scores-table-footer {
        justify-content: flex-start;
    }

    .scores-bulk-actions-form {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .scores-toolbar-actions {
        flex-wrap: wrap;
    }
}

.scores-pdf-dialog {
    width: calc(100vw - 24px);
    max-width: none;
    height: calc(100vh - 24px);
    max-height: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fffdf8;
    border: 1px solid rgba(210, 195, 166, 0.95);
    box-shadow: 0 32px 90px rgba(7, 12, 10, 0.34);
    padding: 8px;
    border-radius: 20px;
}

.scores-pdf-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.scores-pdf-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.scores-pdf-dialog .section-heading {
    margin-bottom: 8px;
}

.scores-pdf-frame {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    border: 1px solid rgba(220, 207, 183, 0.78);
    border-radius: 14px;
    background: #fff;
}

.team-v2-table-wrap {
    border: 1px solid rgba(220, 207, 183, 0.8);
    border-radius: 20px;
    overflow: hidden;
}

.team-v2-table-wrap.scores-table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    display: block;
    max-width: 100%;
}

.team-v2-table thead th {
    background: #faf6ed;
    white-space: nowrap;
}

.team-v2-table th a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.team-v2-table tbody tr:hover {
    background: rgba(12, 122, 91, 0.03);
}

.team-v2-check-col {
    width: 44px;
    text-align: center;
}

.team-v2-check-col input {
    width: auto;
}

.team-v2-pagination {
    margin-top: 18px;
}

.team-v2-pagination p {
    margin: 0;
    color: var(--muted);
}

.team-v2-dialog {
    width: min(760px, calc(100vw - 32px));
    border: 0;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18);
}

.score-template-dialog {
    width: min(980px, calc(100vw - 32px));
    max-height: min(92vh, 980px);
    overflow-y: auto;
}

.builder-v2-form-dialog {
    width: min(980px, calc(100vw - 32px));
    max-height: min(92vh, 980px);
    overflow-y: auto;
}

.builder-v2-task-dialog {
    width: min(1180px, calc(100vw - 32px));
}

.builder-v2-action-panel {
    margin-top: 0;
    background:
        linear-gradient(135deg, rgba(12, 122, 91, 0.08), rgba(230, 139, 46, 0.05)),
        #fffdf9;
}

.builder-v2-structure-panel {
    width: 100%;
}

.builder-v2-structure-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.builder-v2-structure-group {
    border: 1px solid rgba(220, 207, 183, 0.86);
    border-radius: 20px;
    background: #fffdf9;
    overflow: hidden;
}

.builder-v2-structure-group > summary {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px 18px 16px 58px;
    cursor: pointer;
    list-style: none;
    background: linear-gradient(180deg, rgba(12, 122, 91, 0.07), rgba(255, 253, 249, 0.96));
}

.builder-v2-structure-group > summary::-webkit-details-marker {
    display: none;
}

.builder-v2-structure-group > summary::before {
    content: "+";
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: rgba(12, 122, 91, 0.12);
    color: var(--brand-strong);
    font-weight: 900;
}

.builder-v2-structure-group[open] > summary::before {
    content: "-";
}

.builder-v2-structure-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.builder-v2-structure-summary > div:first-child {
    display: grid;
    gap: 4px;
}

.builder-v2-structure-summary span {
    color: var(--muted);
    font-size: 13px;
}

.builder-v2-task-list {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.builder-v2-task-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid rgba(220, 207, 183, 0.78);
    border-radius: 16px;
    background: #fff;
}

.builder-v2-task-row.is-dragging {
    opacity: 0.5;
    border-style: dashed;
}

.builder-v2-task-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.builder-v2-drag-handle {
    cursor: grab;
    padding-inline: 10px;
}

.builder-v2-drag-handle:active {
    cursor: grabbing;
}

.activity-tracker-reorder-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.activity-tracker-table [data-activity-row] {
    cursor: move;
}

.activity-tracker-table [data-activity-row].is-dragging {
    opacity: 0.55;
}

.activity-tracker-drag-cell {
    white-space: nowrap;
    width: 1%;
}

.activity-tracker-drag-handle {
    cursor: grab;
}

.activity-tracker-drag-handle:active {
    cursor: grabbing;
}

.schedule-age-group-select {
    min-height: 44px;
    height: 44px;
}

.operations-age-group-block {
    margin: 14px 0 18px;
}

.operations-age-group-block > span {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.operations-age-group-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.operations-age-group-picker .judge-multicheck-option {
    min-height: 46px;
}

.builder-v2-task-list.is-task-drop-target,
.builder-v2-nested-empty.is-task-drop-target {
    outline: 2px dashed rgba(12, 122, 91, 0.6);
    outline-offset: 4px;
    background: rgba(12, 122, 91, 0.06);
}

.builder-v2-nested-empty {
    margin: 14px;
}

.team-v2-dialog::backdrop {
    background: rgba(17, 24, 21, 0.45);
}

.team-v2-dialog-close {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.team-v2-modal-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.judge-modal-dialog {
    width: min(1080px, calc(100vw - 32px));
    max-height: min(92vh, 960px);
    overflow-y: auto;
    background: #fffdf8;
    border: 1px solid rgba(210, 195, 166, 0.95);
    box-shadow: 0 32px 90px rgba(7, 12, 10, 0.26);
}

.judge-modal-dialog .team-v2-modal-form {
    margin-top: 0;
}

mark {
    padding: 0 3px;
    border-radius: 4px;
    background: #ffe59f;
}

.admin-score-inline-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-score-inline-form input {
    width: 120px;
    min-width: 0;
}

.live-score-edit-dialog {
    width: min(1100px, calc(100vw - 32px));
    height: min(92vh, 980px);
    max-height: min(92vh, 980px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fffdf8;
    border: 1px solid rgba(210, 195, 166, 0.95);
    box-shadow: 0 32px 90px rgba(7, 12, 10, 0.34);
    color: #111111;
}

.live-score-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(8, 13, 11, 0.78);
    backdrop-filter: blur(10px);
}

.live-score-edit-wrap {
    flex: 1 1 auto;
    max-height: min(62vh, 620px);
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    border: 1px solid rgba(220, 207, 183, 0.78);
    border-radius: 18px;
    background: #fffefb;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.live-score-edit-dialog .section-heading {
    align-items: flex-start;
    margin-bottom: 14px;
}

.live-score-edit-dialog .team-v2-modal-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    gap: 12px;
}

.live-score-edit-dialog .team-v2-dialog-close {
    margin-bottom: 10px;
    position: sticky;
    top: 0;
    z-index: 2;
    padding-bottom: 6px;
    background: linear-gradient(180deg, #fffdf8 0%, rgba(255, 253, 248, 0.94) 80%, rgba(255, 253, 248, 0) 100%);
}

.live-score-edit-dialog .judge-score-table {
    background: #fffefb;
}

.live-score-edit-dialog .judge-score-table td,
.live-score-edit-dialog .judge-score-table th,
.live-score-edit-dialog .judge-score-table .judge-task-label,
.live-score-edit-dialog .field-help,
.live-score-edit-dialog .field-error,
.live-score-edit-dialog .v2-subtitle {
    color: #16211d;
}

.live-score-edit-dialog .builder-v2-section-row td {
    background: #f7f0df;
}

.live-score-edit-dialog input,
.live-score-edit-dialog select,
.live-score-edit-dialog textarea {
    background: #ffffff;
    color: #111111;
}

.live-score-edit-dialog .form-actions {
    padding-top: 6px;
    margin-top: auto;
    background: linear-gradient(180deg, rgba(255, 253, 248, 0) 0%, #fffdf8 24%);
}

.live-score-edit-dialog .button-secondary {
    background: #f6eddc;
    border-color: rgba(204, 186, 148, 0.95);
    color: #1c1c1c;
}

.live-score-edit-dialog .button-secondary:hover,
.live-score-edit-dialog .button-secondary:focus-visible {
    background: #f2e5ce;
}

.live-score-edit-dialog .button-primary {
    box-shadow: 0 10px 24px rgba(16, 137, 95, 0.18);
}

.judge-sheet-hero {
    text-align: center;
    margin-top: 0;
    padding: 16px 22px;
    border-radius: 28px;
    border-color: #d6e4f2;
    background: linear-gradient(180deg, #f8fbff, #eef5fb);
}

.judge-sheet-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.judge-sheet-hero-meta-line {
    width: 100%;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    color: #2a5b8f;
    text-align: left;
}

.judge-sheet-hero-badges {
    margin-bottom: 0;
    justify-content: flex-start;
}

.judge-sheet-hero-copy {
    max-width: 880px;
    margin: 4px auto 0;
}

.judge-sheet-topbar-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.judge-sheet-topbar-logos-right {
    justify-content: flex-end;
    flex: 0 0 auto;
    max-width: 38%;
}

.judge-sheet-fallback-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 18px;
    background: rgba(22, 33, 29, 0.08);
    border: 1px solid rgba(12, 122, 91, 0.12);
}

.judge-sheet-fallback-logo-mark {
    display: inline-grid;
    place-items: center;
    min-width: 56px;
    height: 56px;
    padding: 0 12px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent), #ffd086);
    color: #16211d;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.judge-sheet-fallback-logo-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--brand-strong);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.judge-sheet-default-logo {
    max-height: 88px;
}

.judge-sheet-topbar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.judge-sheet-topbar-logo.align-left {
    justify-content: flex-start;
}

.judge-sheet-topbar-logo.align-center {
    justify-content: center;
}

.judge-sheet-topbar-logo.align-right {
    justify-content: flex-end;
}

.judge-sheet-topbar-logo .builder-v2-layout-image {
    max-height: 68px;
    width: auto;
}

.judge-sheet-hero-scope {
    display: block;
    margin-top: 2px;
    color: #0c7a5b;
    letter-spacing: 0.04em;
}

.judge-sheet-hero-copy h3 {
    font-size: 28px;
    line-height: 1.15;
    color: #102a43;
}

.judge-sheet-hero-copy p {
    margin-top: 4px;
    font-size: 15px;
    line-height: 1.35;
    color: #4d647c;
}

.judge-sheet-form {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.auth-shell-login {
    padding: 32px;
}

.auth-page-grid {
    width: min(520px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    justify-items: center;
}

.auth-card {
    width: min(520px, 100%);
    padding: 28px;
    border-radius: 28px;
    background: #fff;
    border: 1px solid rgba(220, 207, 183, 0.82);
    box-shadow: var(--shadow);
    display: grid;
    gap: 20px;
}

.auth-login-card {
    width: 100%;
    min-height: 100%;
    padding: 30px;
    border-color: rgba(203, 222, 236, 0.9);
    box-shadow: 0 28px 72px rgba(7, 31, 24, 0.14);
}

.auth-brand {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.auth-brand-logo {
    width: 152px;
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
}

.auth-card-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex: 0 0 auto;
}

.auth-brand-login h2 {
    margin: 0;
}

.auth-brand-login-stacked {
    display: grid;
    gap: 14px;
}

.auth-header-logo {
    width: 100%;
    max-width: 260px;
    height: auto;
    display: block;
    margin-inline: auto;
}

.auth-brand-copy {
    display: grid;
    gap: 6px;
}

.auth-brand h1 {
    margin: 0;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-form-login label {
    display: grid;
    gap: 7px;
}

.auth-form-login label span {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #445a76;
}

.auth-form-login input {
    min-height: 54px;
    border-radius: 16px;
    border: 1px solid rgba(206, 219, 234, 0.96);
    background: #fbfdff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.auth-form-login input:focus {
    border-color: rgba(12, 122, 91, 0.66);
    box-shadow: 0 0 0 4px rgba(12, 122, 91, 0.12);
}

.auth-submit {
    width: 100%;
    min-height: 52px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.auth-note {
    padding: 16px 18px;
    border-radius: 18px;
    background: #fff8ef;
    border: 1px dashed rgba(12, 122, 91, 0.24);
}

.auth-note p {
    margin: 6px 0 0;
}

.auth-role-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scores-status-tabs {
    margin: 0 0 16px;
    flex-wrap: wrap;
}

@media (max-width: 980px) {
    .auth-shell-login {
        padding: 22px;
    }

    .auth-login-card {
        max-width: 620px;
        justify-self: center;
    }
}

@media (max-width: 720px) {
    .auth-shell,
    .auth-shell-login {
        padding: 16px;
    }

    .auth-card,
    .auth-login-card,
    .auth-card {
        padding: 22px 18px;
        border-radius: 24px;
    }

    .auth-brand,
    .auth-brand-login {
        gap: 12px;
    }

    .auth-header-logo {
        max-width: 220px;
    }

    .auth-role-grid {
        grid-template-columns: 1fr;
    }
}

.judge-sheet-admin-bar,
.judge-sheet-assigned-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.judge-sheet-admin-bar h4,
.judge-sheet-assigned-bar h4 {
    margin: 0;
}

.judge-sheet-card {
    padding: 18px 20px;
    border-radius: 24px;
    border: 1px solid #d6e4f2;
    background: #fff;
    box-shadow: 0 12px 34px rgba(31, 72, 121, 0.06);
}

.judge-sheet-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.judge-sheet-card-head h4,
.judge-team-card h4 {
    margin: 0;
}

.judge-sheet-card-head p,
.judge-team-card p,
.judge-submit-block p {
    margin: 4px 0 0;
    color: #000;
    font-size: 13px;
}

.judge-duplicate-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 10px;
    font-size: 13px;
}

.judge-duplicate-entry-meta span {
    display: inline-flex;
    gap: 5px;
    align-items: baseline;
}

.judge-sheet-team-input {
    margin-bottom: 0;
}

.judge-validation-grid {
    align-items: start;
}

.judge-validation-grid label {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-bottom: 0;
}

.judge-team-card {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 18px;
    background: rgba(12, 122, 91, 0.05);
    border: 1px solid rgba(12, 122, 91, 0.12);
}

.judge-team-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}

.judge-team-grid p {
    margin: 0;
    white-space: nowrap;
}

.judge-sheet-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 20px;
}

.judge-sheet-fieldset[disabled] {
    opacity: 0.58;
}

.judge-sheet-section + .judge-sheet-section {
    margin-top: 10px;
}

.judge-sheet-section,
.judge-sheet-card,
.judge-sheet-hero,
.judge-sheet-footer,
.judge-sheet-validation-card {
    min-width: 0;
    max-width: 100%;
}

.judge-score-table {
    border: 1px solid #dbe7f3;
    border-radius: 20px;
    overflow: hidden;
    table-layout: fixed;
    background: #fff;
}

.judge-score-table thead th {
    background: #f4f8fc;
    color: #5d7289;
    font-size: 11px;
    font-weight: 800;
    padding-top: 12px;
    padding-bottom: 12px;
}

.judge-score-table th:first-child,
.judge-score-table td:first-child {
    width: 46%;
}

.judge-score-table th:nth-child(2),
.judge-score-table th:nth-child(3),
.judge-score-table td:nth-child(2),
.judge-score-table td:nth-child(3) {
    width: 9%;
}

.judge-score-table th:nth-child(4),
.judge-score-table th:nth-child(5),
.judge-score-table td:nth-child(4),
.judge-score-table td:nth-child(5) {
    width: 18%;
}

.judge-score-table td {
    vertical-align: middle;
    color: #102a43;
    font-size: 15px;
    padding-top: 1px;
    padding-bottom: 1px;
    border-bottom-color: #ebf1f7;
}

.judge-score-row strong {
    line-height: 1.25;
}

.judge-score-row .field-help,
.judge-score-row .field-error {
    margin-top: 1px;
}

.judge-section-title {
    color: #0b6b4e;
    font-weight: 800;
    font-size: 15px;
}

.judge-task-label {
    color: #000;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.2;
}

.judge-score-table .judge-task-label,
.judge-score-table td:first-child strong,
.judge-score-table td:first-child span {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
}

.judge-sheet-card-head h4 {
    color: #000;
    font-size: 18px;
    font-weight: 800;
}

.judge-sheet-card-head .field-help,
.judge-sheet-card .field-help {
    color: #000;
    font-size: 11px;
}

.judge-sheet-card .field-error {
    font-size: 11px;
}

.judge-score-row.is-invalid td,
.judge-score-row.is-section-invalid td,
.judge-score-section-header.is-section-invalid td {
    background: rgba(200, 70, 58, 0.08);
}

.judge-score-row.is-invalid input,
.judge-score-row.is-invalid select,
.judge-score-row.is-section-invalid input,
.judge-score-row.is-section-invalid select {
    border-color: rgba(200, 70, 58, 0.72);
    box-shadow: 0 0 0 3px rgba(200, 70, 58, 0.08);
}

.judge-section-inline-error {
    margin-top: 8px;
}

.judge-checkbox-choices {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    max-width: 100%;
    min-width: 0;
}

.judge-checkbox-choice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-weight: 700;
    color: #0f1720;
    transition: color 140ms ease;
    min-width: 0;
    line-height: 1;
}

.judge-score-row td[data-label="#"] .judge-checkbox-choices,
.judge-score-row td:last-child .judge-checkbox-choices {
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
}

.judge-score-row td[data-label="#"] .judge-checkbox-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(52px, 60px));
    align-items: center;
    justify-content: center;
    justify-items: start;
    gap: 8px 10px;
    width: 100%;
    max-width: none;
    margin: 0;
}

.judge-score-row td[data-label="#"] .judge-checkbox-choice {
    justify-content: flex-start;
    min-width: 52px;
    padding: 0;
    gap: 4px;
    white-space: nowrap;
    font-size: 11px;
}

.judge-score-row td[data-label="#"] .judge-checkbox-choice input[type="checkbox"] {
    width: 12px;
    height: 12px;
}

.judge-score-row td[data-label="#"] .judge-checkbox-choices ~ .field-error {
    display: none;
}

.judge-checkbox-choice input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.judge-checkbox-choice:has(input[type="checkbox"]:checked) {
    color: #0b6b4e;
}

.judge-checkbox-choice:has(input[type="checkbox"]:checked) input[type="checkbox"] {
    accent-color: #0b6b4e;
}

.yes-no-dropdown-control {
    display: grid;
    gap: 8px;
    justify-items: center;
    align-content: center;
    width: 100%;
    min-width: 0;
}

.yes-no-dropdown-select {
    min-width: 140px;
    max-width: 100%;
    margin-inline: auto;
}

.yes-no-dropdown-select.is-hidden {
    display: none;
}

.yes-no-dropdown-control:has(input[data-yes-no-dropdown-choice="yes"]:checked) .yes-no-dropdown-select {
    display: block !important;
}

.judge-score-row td[data-label="#"] .yes-no-dropdown-control {
    justify-items: center;
    margin-inline: auto;
}

.judge-score-row td[data-label="#"] .yes-no-dropdown-control .judge-checkbox-choices {
    grid-template-columns: repeat(2, minmax(52px, 60px));
    width: 100%;
}

.judge-score-row td[data-label="#"] .yes-no-dropdown-control .judge-checkbox-choice {
    justify-content: flex-start;
    min-width: 52px;
    padding: 0;
}

.task-qty-input,
.judge-score-table input[type="number"],
.judge-score-table input[type="text"],
.judge-score-table select {
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 16px;
    color: #102a43;
    border-color: #cfe0ef;
    border-radius: 14px;
    background: #fcfeff;
}

.live-stepper {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 8px;
    align-items: center;
    justify-content: stretch;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.live-stepper-button {
    width: 40px;
    height: 40px;
    border: 1px solid #cfe0ef;
    border-radius: 14px;
    background: #fff;
    color: #12355b;
    font-size: 22px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(17, 48, 83, 0.06);
}

.live-stepper input[type="number"] {
    text-align: center;
    min-height: 46px;
    min-width: 0;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.judge-score-table .builder-v2-section-row td {
    padding-top: 9px;
    padding-bottom: 9px;
}

.judge-sheet-total-row {
    margin-top: 10px;
}

.judge-sheet-footer {
    gap: 10px;
}

.judge-submit-block {
    padding-top: 6px;
}

.judge-sheet-total-row {
    margin-top: 16px;
    justify-content: flex-end;
}

.judge-sheet-footer {
    display: grid;
    gap: 16px;
}

.judge-sheet-inline-fields {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.judge-sheet-inline-fields-top,
.judge-sheet-inline-fields-bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.judge-inline-field {
    margin-bottom: 0;
    padding: 14px 14px 12px;
    border: 1px solid #d6e4f2;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.judge-inline-field span {
    font-size: 17px;
    color: #102a43;
}

.judge-inline-field input {
    min-height: 50px;
    font-size: 17px;
    border-color: #cfe0ef;
    border-radius: 18px;
    background: #fff;
}

.participant-signature-card {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(11, 93, 59, 0.22);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 250, 247, 0.96));
}

.participant-signature-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.participant-signature-header strong {
    display: block;
    color: var(--color-primary);
    font-size: 0.95rem;
}

.participant-signature-header small {
    display: block;
    margin-top: 0.2rem;
    color: var(--color-muted);
}

.participant-signature-pad {
    display: block;
    width: 100%;
    height: 160px;
    border: 1px dashed rgba(11, 93, 59, 0.45);
    border-radius: 14px;
    background: #fff;
    touch-action: none;
    cursor: crosshair;
}

.participant-signature-card-inline {
    margin-top: 0;
    min-height: 100%;
    padding: 18px 18px 16px;
    border-color: #d6e4f2;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.participant-signature-header-inline {
    margin-bottom: 0;
    align-items: flex-start;
}

.participant-signature-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.participant-signature-alert {
    margin-top: 12px;
    padding: 13px 16px;
    border-radius: 18px;
    background: #eef7f3;
    color: #0b6b4e;
    font-size: 18px;
    font-weight: 800;
}

.participant-signature-alert.is-signed {
    background: #dcf2e7;
    color: #0c7a47;
}

.participant-signature-preview {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #d9e6f2;
    border-radius: 18px;
    background: #fff;
}

.participant-signature-preview-image {
    display: block;
    max-width: 100%;
    max-height: 86px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.participant-signature-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
}

.participant-signature-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 33, 29, 0.48);
    backdrop-filter: blur(3px);
}

.participant-signature-modal-dialog {
    position: relative;
    width: min(720px, calc(100vw - 28px));
    margin: 6vh auto 0;
    padding: 18px;
    border-radius: 24px;
    background: #fffdf9;
    box-shadow: 0 28px 80px rgba(22, 33, 29, 0.24);
}

body.has-signature-modal-open {
    overflow: hidden;
}

.main-live-scoring .panel,
.main-live-scoring .judge-sheet-form,
.main-live-scoring .judge-sheet-card,
.main-live-scoring .judge-sheet-section,
.main-live-scoring .participant-signature-card,
.main-live-scoring .button,
.main-live-scoring input,
.main-live-scoring select,
.main-live-scoring textarea,
.main-live-scoring label span,
.main-live-scoring .judge-task-label,
.main-live-scoring .judge-score-table td,
.main-live-scoring .judge-score-table th {
    font-size: 14px;
}

.main-live-scoring .field-help,
.main-live-scoring .field-error,
.main-live-scoring .judge-team-grid p,
.main-live-scoring .judge-sheet-hero-copy p,
.main-live-scoring .judge-sheet-hero-meta-line {
    font-size: 15px;
}

.main-live-scoring .judge-sheet-card-head h4,
.main-live-scoring .judge-sheet-hero-copy h3 {
    font-size: 30px;
}

.main-live-scoring .judge-score-table thead th {
    font-size: 12px;
}

.main-live-scoring .button {
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 16px;
}

.main-live-scoring .button-secondary {
    border: 1px solid #cfe0ef;
    background: #fff;
    color: #12355b;
}

.main-live-scoring .judge-sheet-section,
.main-live-scoring .live-score-edit-wrap {
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.main-live-scoring .judge-score-table {
    min-width: 760px;
}

.judge-submit-block {
    align-items: center;
}

.judge-submit-button {
    min-width: 220px;
}

.live-scoring-preview-form {
    display: grid;
    gap: 16px;
    padding: 18px 20px 118px;
    border: 0;
    border-radius: 28px;
    background:
        linear-gradient(180deg, #0a2344 0 164px, #f4f8fc 164px 100%);
    box-shadow: 0 28px 70px rgba(8, 29, 54, 0.18);
}

.live-scoring-preview-form .judge-sheet-card,
.live-scoring-preview-form .judge-sheet-section,
.live-scoring-preview-form .participant-signature-card,
.live-scoring-preview-form .live-actions {
    padding: 16px 18px;
    border-radius: 20px;
    border-color: #d7e3f2;
    background: #fff;
    box-shadow: 0 10px 28px rgba(16, 48, 86, 0.06);
}

.live-scoring-preview-form .judge-sheet-card-head {
    margin-bottom: 10px;
}

.live-scoring-preview-form .judge-sheet-card-head p,
.live-scoring-preview-form .judge-team-grid,
.live-scoring-preview-form .grid.compact {
    gap: 10px;
}

.live-preview-team-header {
    position: sticky;
    top: 10px;
    z-index: 16;
    display: grid;
    gap: 14px;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: linear-gradient(180deg, rgba(8, 33, 67, 0.96), rgba(10, 36, 72, 0.96)) !important;
    box-shadow: 0 18px 44px rgba(7, 27, 53, 0.28) !important;
    backdrop-filter: blur(18px);
}

.live-preview-team-header-copy h4,
.live-preview-scorecard h4 {
    margin: 0;
}

.live-preview-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.live-preview-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #f4f8ff;
    font-size: 13px;
    font-weight: 800;
}

.live-preview-command-bar {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) auto auto;
    gap: 18px;
    align-items: center;
    padding: 16px 18px;
    color: #f4f8ff;
}

.live-preview-brand-strip {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.live-preview-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 60px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.live-preview-brand-logo img {
    max-width: 64px;
    max-height: 38px;
    object-fit: contain;
}

.live-preview-brand-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.live-preview-brand-copy h4 {
    color: #fff;
    font-size: 27px;
    line-height: 1.1;
    font-weight: 800;
}

.live-preview-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(227, 236, 250, 0.8);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.live-preview-command-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.live-preview-chip-button,
.live-preview-link-button {
    min-height: 42px;
    padding: 11px 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 14px;
}

.live-preview-chip-button:hover,
.live-preview-link-button:hover {
    background: rgba(255, 255, 255, 0.12);
}

.live-preview-judge-panel {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: flex-end;
}

.live-preview-judge-panel strong {
    display: block;
    color: #fff;
    font-size: 18px;
}

.live-preview-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: linear-gradient(135deg, #25c26e, #14944f);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}

.live-preview-meta-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 18px 18px;
    background: rgba(255, 255, 255, 0.04);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.live-preview-meta-copy {
    display: grid;
    gap: 6px;
}

.live-preview-meta-copy .eyebrow {
    color: #8cc6ff;
}

.live-preview-meta-copy p:last-child {
    margin: 0;
    color: rgba(233, 241, 252, 0.86);
    font-size: 15px;
    line-height: 1.45;
}

.live-preview-meta-links {
    display: flex;
    gap: 10px;
}

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

.live-preview-main {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.live-preview-scorecard {
    position: sticky;
    top: 128px;
    display: grid;
    gap: 14px;
    border: 1px solid #d3e1ef !important;
    background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
}

.live-preview-scorecard-total,
.live-preview-scorecard-time {
    display: flex;
    align-items: end;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(24, 170, 89, 0.08), rgba(20, 88, 166, 0.06));
}

.live-preview-scorecard-total strong,
.live-preview-scorecard-time strong {
    font-size: 48px;
    line-height: 1;
    color: #128245;
}

.live-preview-scorecard-meta {
    display: grid;
    gap: 10px;
    font-size: 15px;
}

.live-preview-scorecard-meta span {
    color: #000;
}

.live-preview-scorecard-status {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #f3fbf5;
    border: 1px solid #d6f0db;
}

.live-preview-scorecard-status strong {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5a687b;
}

.live-preview-scorecard-status span {
    color: #138046;
    font-size: 15px;
    font-weight: 800;
}

.live-preview-scorecard-actions {
    display: grid;
    gap: 10px;
}

.live-preview-scorecard-actions .button {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    font-size: 14px;
}

.live-preview-footer-card {
    padding-bottom: 0 !important;
}

.live-preview-signature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.live-preview-signature-card {
    display: grid;
    gap: 10px;
}

.live-preview-signature-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.live-preview-signature-status {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(12, 122, 91, 0.06);
    color: var(--brand-strong);
    font-size: 14px;
    font-weight: 700;
}

.live-preview-signature-card.is-signed .live-preview-signature-status {
    background: rgba(28, 141, 99, 0.12);
    color: var(--success);
}

.live-preview-signature-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
}

.live-preview-signature-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 33, 29, 0.5);
    backdrop-filter: blur(3px);
}

.live-preview-signature-dialog {
    position: relative;
    width: min(720px, calc(100vw - 32px));
    margin: 6vh auto 0;
    padding: 20px;
    border-radius: 26px;
    background: #fffdf9;
    box-shadow: 0 28px 80px rgba(22, 33, 29, 0.24);
}

.live-preview-stepper {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 8px;
    align-items: center;
    justify-content: stretch;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.live-preview-stepper-button {
    width: 42px;
    height: 42px;
    border: 1px solid #cfdced;
    border-radius: 13px;
    background: #fff;
    color: #173962;
    font-size: 22px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(17, 48, 83, 0.06);
}

.live-preview-stepper input[type="number"] {
    text-align: center;
    min-height: 42px;
    min-width: 0;
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 17px !important;
    font-weight: 700;
}

.live-preview-footer-bar {
    position: sticky;
    bottom: 10px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 4px -12px 0;
    padding: 14px 16px;
    border-top: 1px solid rgba(14, 44, 76, 0.1);
    background: rgba(8, 33, 67, 0.97);
    backdrop-filter: blur(12px);
    color: #fff;
}

.live-preview-footer-metrics,
.live-preview-footer-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.live-preview-footer-metric {
    display: grid;
    gap: 4px;
    min-width: 128px;
}

.live-preview-footer-metric strong {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(224, 236, 250, 0.68);
}

.live-preview-footer-metric span {
    font-size: 30px;
    font-weight: 800;
    color: #fff;
}

.live-preview-footer-status {
    display: grid;
    gap: 4px;
    min-width: 150px;
}

.live-preview-footer-status strong {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(224, 236, 250, 0.68);
}

.live-preview-footer-status span {
    color: #3fe387;
    font-size: 16px;
    font-weight: 800;
}

.live-preview-submit-note {
    margin: 10px 0 0;
    font-size: 13px;
    color: #5f6f84;
}

body.has-live-preview-modal {
    overflow: hidden;
}

.live-scoring-preview-form .judge-sheet-card-head h4,
.live-scoring-preview-form .judge-team-card h4,
.live-scoring-preview-form .judge-sheet-hero-copy h3 {
    font-size: 22px;
}

.live-scoring-preview-form .judge-sheet-card-head p,
.live-scoring-preview-form .field-help,
.live-scoring-preview-form .field-error,
.live-scoring-preview-form .judge-team-grid p,
.live-scoring-preview-form .judge-sheet-hero-copy p {
    font-size: 14px;
    line-height: 1.45;
}

.live-scoring-preview-form label span,
.live-scoring-preview-form .judge-task-label,
.live-scoring-preview-form .judge-score-table td,
.live-scoring-preview-form .judge-score-table th,
.live-scoring-preview-form input,
.live-scoring-preview-form select,
.live-scoring-preview-form textarea,
.live-scoring-preview-form .button {
    font-size: 16px;
}

.live-scoring-preview-form .judge-score-table thead th {
    font-size: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
    color: #5b6a7d;
    background: #f1f6fb;
}

.live-scoring-preview-form .judge-score-table td {
    padding-top: 9px;
    padding-bottom: 9px;
    border-bottom-color: #e6eef8;
}

.live-scoring-preview-form .judge-score-table td:first-child {
    font-size: 15px;
}

.live-scoring-preview-form .judge-score-table td[data-label="Total"] strong,
.live-scoring-preview-form [data-row-total-for] {
    font-size: 18px;
    color: #128245;
}

.live-scoring-preview-form .button {
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 14px;
}

.live-scoring-preview-form .button-secondary {
    border: 1px solid #d4e0ef;
    background: #fff;
    color: #173962;
}

.live-scoring-preview-form .judge-submit-button,
.live-scoring-preview-form .button[type="submit"] {
    background: linear-gradient(135deg, #1e9e4f, #0f7f3f);
    color: #fff;
}

.live-scoring-preview-form input,
.live-scoring-preview-form select,
.live-scoring-preview-form textarea {
    min-height: 46px;
    border-color: #d4e0ef;
    background: #fcfeff;
}

.required-star {
    color: var(--danger);
}

.json-textarea {
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.45;
}

.judge-admin-page {
    display: grid;
    gap: 20px;
}

.judge-admin-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 26px 28px;
    border: 1px solid rgba(220, 207, 183, 0.62);
    border-radius: 30px;
    background:
        radial-gradient(circle at top left, rgba(12, 122, 91, 0.1), transparent 30%),
        radial-gradient(circle at top right, rgba(230, 139, 46, 0.12), transparent 28%),
        rgba(255, 255, 255, 0.82);
    box-shadow: 0 24px 70px rgba(22, 33, 29, 0.08);
}

.judge-admin-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.judge-admin-title-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(12, 122, 91, 0.14), rgba(12, 122, 91, 0.04));
    color: var(--brand-strong);
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(12, 122, 91, 0.18);
}

.judge-admin-title h2 {
    margin: 0;
    font-size: 30px;
    letter-spacing: -0.04em;
}

.judge-admin-title p {
    margin: 6px 0 0;
    color: var(--muted);
}

.judge-admin-actions,
.judge-tool-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.judge-header-import {
    margin: 0;
}

.judge-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
    gap: 20px;
    align-items: start;
    margin-top: 20px;
}

.judge-combined-form {
    padding: 24px;
    border-radius: 28px;
    border-color: rgba(220, 207, 183, 0.62);
    background:
        radial-gradient(circle at top right, rgba(12, 122, 91, 0.06), transparent 28%),
        rgba(255, 255, 255, 0.88);
    box-shadow: 0 24px 70px rgba(22, 33, 29, 0.08);
}

.judge-form-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 0 0 16px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(220, 207, 183, 0.72);
}

.judge-form-header h4 {
    margin-top: 2px;
    font-size: 22px;
    letter-spacing: -0.03em;
}

.judge-form-header p:not(.eyebrow) {
    margin-top: 6px;
    max-width: 720px;
    color: var(--muted);
    line-height: 1.45;
}

.judge-stepper {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.judge-stepper span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 999px;
    background: #f1f4f1;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.judge-stepper span.is-active {
    background: linear-gradient(135deg, var(--brand), #15a676);
    color: #fff;
    box-shadow: 0 10px 22px rgba(12, 122, 91, 0.22);
}

.judge-form-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0 12px;
    padding-top: 4px;
    border-top: 1px solid rgba(220, 207, 183, 0.72);
}

.judge-form-section:first-of-type {
    margin-top: 16px;
}

.judge-form-section h5 {
    margin: 1px 0 0;
    font-size: 15px;
    color: var(--ink);
}

.judge-detail-grid,
.judge-station-template-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.judge-scope-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.judge-combined-form label {
    align-content: start;
    margin-bottom: 0;
}

.judge-combined-form > label > span,
.judge-detail-grid > label > span,
.judge-field-card > span,
.judge-section-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.judge-section-header {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--ink);
}

.judge-section-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    color: var(--brand-strong);
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.judge-combined-form input,
.judge-combined-form select {
    min-height: 44px;
    border-radius: 13px;
    background: rgba(255, 253, 249, 0.96);
}

.judge-combined-form input:focus,
.judge-combined-form select:focus {
    outline: none;
    border-color: rgba(12, 122, 91, 0.5);
    box-shadow: 0 0 0 4px rgba(12, 122, 91, 0.1);
}

.judge-field-card {
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(220, 207, 183, 0.66);
    background: rgba(255, 255, 255, 0.76);
}

.judge-status-card {
    min-height: 0;
}

.judge-status-card select {
    align-self: start;
}

.judge-combined-form .judge-multicheck-grid-2,
.judge-combined-form .judge-multicheck-grid-3 {
    grid-template-columns: 1fr;
}

.judge-side-stack {
    display: grid;
    gap: 16px;
}

.judge-preview-card {
    margin-top: 0;
    padding: 22px;
    border-radius: 26px;
    border: 1px solid rgba(220, 207, 183, 0.62);
    background:
        radial-gradient(circle at top right, rgba(12, 122, 91, 0.06), transparent 30%),
        rgba(255, 255, 255, 0.86);
    box-shadow: 0 24px 70px rgba(22, 33, 29, 0.07);
}

.judge-preview-list {
    display: grid;
    gap: 16px;
    margin: 18px 0 0;
}

.judge-preview-list div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(220, 207, 183, 0.6);
}

.judge-preview-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.judge-preview-list dt {
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}

.judge-preview-list dd {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.judge-mini-chip,
.judge-status-pill,
.judge-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    border-radius: 999px;
    font-weight: 800;
}

.judge-mini-chip {
    margin: 2px 4px 2px 0;
    padding: 5px 9px;
    background: rgba(12, 122, 91, 0.1);
    color: var(--brand-strong);
    font-size: 11px;
}

.judge-status-pill {
    padding: 6px 12px;
    background: rgba(28, 141, 99, 0.13);
    color: var(--success);
    font-size: 12px;
    text-transform: capitalize;
}

.judge-count-pill {
    min-width: 34px;
    height: 28px;
    padding: 0 10px;
    background: #f1f4f1;
    color: var(--brand-strong);
    font-size: 12px;
}

.judge-bulk-toolbar {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
    margin: 18px 0;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(12, 122, 91, 0.14);
    background: linear-gradient(135deg, rgba(12, 122, 91, 0.06), rgba(230, 139, 46, 0.04));
}

.judge-bulk-toolbar label {
    flex: 0 1 260px;
    margin-bottom: 0;
}

.judge-record-table th,
.judge-record-table td {
    vertical-align: middle;
}

.judge-record-table {
    border-collapse: separate;
    border-spacing: 0;
}

.judge-record-table thead th {
    background: #f8faf8;
    color: #53625d;
    white-space: nowrap;
}

.judge-record-table tbody tr {
    transition: 160ms ease;
}

.judge-record-table tbody tr:hover {
    background: rgba(12, 122, 91, 0.035);
}

.judge-record-table .team-v2-check-col {
    width: 46px;
    text-align: center;
}

.judge-record-table .team-v2-check-col input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

.judge-table-person {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.judge-table-person strong,
.judge-table-person small {
    display: block;
}

.judge-table-person strong {
    color: var(--ink);
}

.judge-table-person small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.judge-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), #14a377);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.judge-multicheck-grid {
    display: grid;
    gap: 8px;
    margin-top: 2px;
}

.judge-multicheck-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 8px;
}

.judge-multicheck-actions .button {
    padding: 6px 10px;
    min-height: 0;
    font-size: 11px;
}

.judge-multicheck-grid-1 {
    grid-template-columns: 1fr;
}

.judge-multicheck-grid-2 {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.judge-multicheck-grid-3 {
    grid-template-columns: repeat(3, minmax(118px, 1fr));
}

.judge-multicheck-scroll {
    max-height: 198px;
    overflow: auto;
    padding-right: 4px;
}

.judge-multicheck-option {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(220, 207, 183, 0.95);
    background: linear-gradient(180deg, #fffefb, #fff9f0);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ink);
    min-height: 44px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.judge-multicheck-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    flex: 0 0 auto;
    accent-color: var(--brand);
}

.judge-multicheck-option:has(input[type="checkbox"]:checked) {
    border-color: rgba(12, 122, 91, 0.45);
    background: linear-gradient(180deg, rgba(12, 122, 91, 0.13), rgba(255, 253, 249, 0.94));
    box-shadow: 0 8px 20px rgba(12, 122, 91, 0.08);
}

.judge-multicheck-option span {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
}

.builder-v2-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(220, 207, 183, 0.8);
    padding-bottom: 14px;
}

.builder-v2-tab {
    border: 1px solid rgba(220, 207, 183, 0.85);
    background: #fff8ef;
    color: var(--ink);
    border-radius: 999px;
    padding: 11px 16px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.builder-v2-tab.is-active {
    background: linear-gradient(135deg, var(--brand), #14a377);
    color: #fff;
    border-color: transparent;
}

.builder-v2-tab-panel {
    display: none;
}

.builder-v2-tab-panel.is-active {
    display: block;
}

.builder-v2-setup-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 20px;
}

.builder-v2-setup-stack,
.builder-v2-setup-side {
    display: grid;
    gap: 20px;
}

.builder-v2-step-card {
    margin-top: 0;
}

.builder-v2-step-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.builder-v2-step-no {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand), #14a377);
    color: #fff;
    font-weight: 800;
    flex: 0 0 auto;
}

.builder-v2-step-head h4,
.builder-v2-step-head p {
    margin: 0;
}

.builder-v2-step-form {
    display: grid;
    gap: 14px;
}

.builder-v2-inline-check {
    margin-bottom: 0;
}

.builder-v2-check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.builder-v2-subgroup-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.builder-v2-subgroup-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid rgba(220, 207, 183, 0.74);
    border-radius: 18px;
    background: #fff;
}

.builder-v2-canvas-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
}

.builder-v2-library,
.builder-v2-canvas-panel {
    margin-top: 0;
}

.builder-v2-draggable {
    cursor: grab;
    transition: transform 160ms ease, border-color 160ms ease;
}

.builder-v2-draggable:hover {
    transform: translateY(-1px);
    border-color: rgba(12, 122, 91, 0.36);
}

.builder-v2-draggable-child {
    margin-left: 18px;
    background: #fff;
}

.builder-v2-canvas-library-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.builder-v2-canvas-library-group > summary {
    padding-top: 12px;
    padding-bottom: 12px;
}

.builder-v2-canvas-library-items {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.builder-v2-library .section-heading {
    align-items: flex-start;
}

.builder-v2-canvas-dropzone {
    min-height: 360px;
    padding: 20px;
    border-radius: 22px;
    border: 2px dashed rgba(12, 122, 91, 0.24);
    background: linear-gradient(180deg, rgba(12, 122, 91, 0.03), rgba(230, 139, 46, 0.03));
}

.builder-v2-canvas-dropzone.is-over {
    border-color: rgba(12, 122, 91, 0.65);
    background: rgba(12, 122, 91, 0.06);
}

.builder-v2-canvas-empty {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--muted);
    text-align: center;
}

.builder-v2-canvas-items {
    display: grid;
    gap: 16px;
}

.builder-v2-score-sheet {
    display: grid;
    gap: 18px;
}

.builder-v2-canvas-stack {
    display: grid;
    gap: 18px;
}

.builder-v2-canvas-item {
    position: relative;
    cursor: move;
}

.builder-v2-canvas-item:hover .builder-v2-resize-handle {
    opacity: 1;
}

.builder-v2-canvas-item.is-dragging {
    opacity: 0.55;
}

.builder-v2-canvas-item.is-drop-target {
    outline: 2px dashed rgba(12, 122, 91, 0.55);
    outline-offset: 6px;
}

.builder-v2-score-section {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(220, 207, 183, 0.85);
    background: #fff;
}

.builder-v2-score-section-continued {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: -8px;
}

.builder-v2-live-table {
    margin: 0;
}

.builder-v2-section-row td {
    background: #f4efe2;
    font-weight: 700;
    text-align: left !important;
}

.builder-v2-total-row td {
    background: #faf6ed;
}

.builder-v2-block-row td {
    padding: 0;
}

.builder-v2-layout-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.builder-v2-layout-block {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(220, 207, 183, 0.7);
    background: #fff;
    max-width: 100%;
}

.builder-v2-layout-block.is-full {
    width: 100%;
    justify-self: stretch;
}

.builder-v2-layout-block.is-half {
    width: calc(50% - 7px);
}

.builder-v2-layout-block.is-third {
    width: calc(33.333% - 10px);
}

.builder-v2-layout-block.is-quarter {
    width: calc(25% - 11px);
}

.builder-v2-layout-block.align-left {
    text-align: left;
}

.builder-v2-layout-block.align-left:not(.is-full) {
    justify-self: start;
}

.builder-v2-layout-block.align-center {
    text-align: center;
}

.builder-v2-layout-block.align-center:not(.is-full) {
    justify-self: center;
}

.builder-v2-layout-block.align-right {
    text-align: right;
}

.builder-v2-layout-block.align-right:not(.is-full) {
    justify-self: end;
}

.builder-v2-layout-image {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
}

.builder-v2-layout-divider {
    width: 100%;
    border-top: 2px solid rgba(22, 33, 29, 0.22);
    min-height: 2px;
}

.builder-v2-layout-text {
    white-space: pre-wrap;
    line-height: 1.5;
}

.builder-v2-resize-handle {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 4px;
    background:
        linear-gradient(135deg, transparent 0 42%, rgba(255, 255, 255, 0.95) 42% 100%),
        linear-gradient(135deg, transparent 0 58%, rgba(12, 122, 91, 0.88) 58% 100%);
    cursor: nwse-resize;
    opacity: 0.45;
    box-shadow: 0 6px 14px rgba(12, 122, 91, 0.18);
}

.builder-v2-remove-handle {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: rgba(22, 33, 29, 0.82);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
    box-shadow: 0 10px 22px rgba(22, 33, 29, 0.16);
    z-index: 3;
}

.builder-v2-canvas-item:hover .builder-v2-remove-handle,
.builder-v2-canvas-item:focus-within .builder-v2-remove-handle {
    opacity: 1;
    transform: translateY(0);
}

.builder-v2-remove-handle:hover {
    background: var(--danger);
}

.builder-v2-json-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    list-style: none;
}

.builder-v2-json-toggle::-webkit-details-marker {
    display: none;
}

.builder-v2-json-toggle h4,
.builder-v2-json-toggle p {
    margin: 0;
}

.builder-v2-json-form {
    margin-top: 18px;
}

    .builder-v2-canvas-card,
    .builder-v2-canvas-task {
        background: #fff;
    }

.builder-v2-canvas-save {
    margin-top: 18px;
}

@media (max-width: 1080px) {
    body.has-mobile-nav-open {
        overflow: hidden;
    }

    .shell,
    .hero,
    .grid-3,
    .grid-2,
    .rule-stack-grid,
    .check-grid,
    .builder-summary,
    .public-board-grid,
    .builder-v2-canvas-layout,
    .builder-v2-setup-grid,
    .builder-v2-check-grid,
    .builder-v2-subgroup-row {
        grid-template-columns: 1fr;
    }

    .judge-page-grid,
    .judge-detail-grid,
    .judge-scope-grid,
    .judge-station-template-grid {
        grid-template-columns: 1fr;
    }

    .judge-admin-hero,
    .judge-form-header {
        flex-direction: column;
    }

    .judge-admin-hero {
        align-items: flex-start;
    }

    .judge-admin-actions {
        width: 100%;
    }

    .judge-stepper {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .shell {
        display: block;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    body {
        overflow-y: auto;
    }

    .shell-menu-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        position: fixed;
        top: 18px;
        left: 18px;
        z-index: 60;
        width: 48px;
        height: 48px;
        border: 0;
        border-radius: 14px;
        background: rgba(22, 33, 29, 0.94);
        box-shadow: var(--shadow);
    }

    .shell-menu-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        margin: 0 auto;
        border-radius: 999px;
        background: #f7f3ea;
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 49;
        border: 0;
        background: rgba(13, 18, 16, 0.66);
        backdrop-filter: blur(3px);
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(340px, calc(100vw - 48px));
        max-width: 88vw;
        z-index: 50;
        overflow-y: auto;
        transform: translateX(-110%);
        transition: transform 180ms ease;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .main {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar > .brand,
    .sidebar-modern-brand {
        display: none;
    }

    .sidebar-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 0;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
        font-size: 26px;
        line-height: 1;
    }

    .main {
        padding-top: 78px;
    }

    .main-live-scoring {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        padding: 78px 18px 18px;
    }

    .public-main {
        padding: 20px;
    }

    .main-live-scoring > .panel:not(.judge-sheet-hero),
    .main-live-scoring > .judge-sheet-form {
        width: min(100%, 980px);
        margin-left: auto;
        margin-right: auto;
    }

    .main-live-scoring .judge-sheet-hero {
        width: 100%;
        max-width: 100%;
        margin: 0 auto 18px;
    }

    .judge-validation-grid,
    .judge-team-grid {
        grid-template-columns: 1fr;
    }

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

    .judge-sheet-inline-fields-top,
    .judge-sheet-inline-fields-bottom {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .judge-multicheck-grid-2,
    .judge-multicheck-grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .live-preview-layout {
        grid-template-columns: 1fr;
    }

    .live-preview-scorecard {
        display: none;
    }

    .live-preview-command-bar {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .live-preview-command-actions,
    .live-preview-judge-panel,
    .live-preview-meta-strip,
    .live-preview-meta-links {
        justify-content: flex-start;
    }

    .live-stepper,
    .live-preview-stepper {
        grid-template-columns: 36px minmax(0, 1fr) 36px;
        gap: 4px;
        justify-content: stretch;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin-inline: auto;
    }

    .live-stepper-button,
    .live-preview-stepper-button {
        width: 36px;
        height: 36px;
        border-radius: 12px;
        font-size: 20px;
        line-height: 1;
    }

    .live-stepper input[type="number"],
    .live-preview-stepper input[type="number"] {
        min-width: 0;
        min-height: 38px;
        width: 100%;
        padding-left: 0;
        padding-right: 0;
        font-size: 15px !important;
    }

    .judge-checkbox-choices {
        display: inline-flex;
        grid-template-columns: none;
        gap: 8px;
        width: auto;
        justify-items: normal;
        justify-content: center;
        flex-wrap: nowrap;
    }

    .judge-checkbox-choice {
        width: auto;
        min-width: 0;
        justify-content: center;
        padding: 0;
        gap: 6px;
        font-size: 12px;
    }

}

@media (min-width: 761px) and (max-width: 920px) {
    .main-live-scoring .judge-sheet-section {
        overflow-x: visible;
    }

    .main-live-scoring .judge-score-table {
        width: 100%;
        min-width: 0;
    }

    .scores-filter-head {
        align-items: center;
    }

    .scores-filter-grid label {
        flex: 1 1 calc(50% - 14px);
    }

    .scores-filter-actions {
        width: 100%;
        padding-bottom: 0;
    }

    .scores-filter-actions .button {
        flex: 1 1 220px;
        justify-content: center;
    }

    .scores-toolbar {
        display: grid;
        gap: 10px;
    }

    .scores-toolbar-actions,
    .scores-bulk-actions-form,
    .scores-export-filtered {
        width: 100%;
    }

    .scores-bulk-actions-form {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .scores-bulk-actions-form .button,
    .scores-export-filtered {
        width: 100%;
        justify-content: center;
    }

    .scores-table-wrap {
        overflow-x: auto;
        overflow-y: hidden;
        border-radius: 20px;
    }

    .scores-table {
        min-width: 1120px;
    }

    .judge-score-table {
        table-layout: fixed;
    }

    .judge-score-table th:first-child,
    .judge-score-table td:first-child {
        width: 51%;
    }

    .judge-score-table th:nth-child(2),
    .judge-score-table th:nth-child(3),
    .judge-score-table td:nth-child(2),
    .judge-score-table td:nth-child(3) {
        width: 8%;
    }

    .judge-score-table th:nth-child(4),
    .judge-score-table td:nth-child(4) {
        width: 17%;
    }

    .judge-score-table th:nth-child(5),
    .judge-score-table td:nth-child(5) {
        width: 16%;
    }

    .judge-score-table td:first-child,
    .judge-score-section-header .judge-section-title {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .judge-score-table td,
    .judge-score-table th {
        font-size: 14px;
    }

    .judge-task-label {
        font-size: 12px;
        line-height: 1.18;
    }

    .judge-score-table thead th {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .judge-score-table td {
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .live-stepper,
    .live-preview-stepper {
        grid-template-columns: 30px minmax(0, 1fr) 30px;
        gap: 2px;
        width: 100%;
        min-width: 94px;
        max-width: 100%;
    }

    .live-stepper-button,
    .live-preview-stepper-button {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .live-stepper input[type="number"],
    .live-preview-stepper input[type="number"] {
        min-height: 30px;
        width: 100%;
        min-width: 30px;
        padding-left: 0;
        padding-right: 0;
        font-size: 13px !important;
    }

    .judge-checkbox-choices {
        display: inline-flex;
        grid-template-columns: none;
        gap: 8px;
        justify-items: normal;
        justify-content: center;
        flex-wrap: nowrap;
    }

    .judge-checkbox-choice {
        width: auto;
        min-width: 0;
        justify-content: center;
        padding: 0;
        gap: 5px;
        font-size: 11px;
    }

    .judge-score-row .field-error {
        text-align: center;
        font-size: 10px;
        line-height: 1.15;
    }
}

@media (max-width: 760px) {
    body.has-mobile-nav-open {
        overflow: hidden;
    }

    .judge-combined-form {
        padding: 16px;
    }

    .judge-admin-hero {
        padding: 18px;
        border-radius: 22px;
    }

    .judge-admin-title {
        align-items: flex-start;
    }

    .judge-admin-title h2 {
        font-size: 24px;
    }

    .judge-admin-actions .button,
    .judge-admin-actions .meta-pill,
    .judge-header-import,
    .judge-header-import label {
        width: 100%;
    }

    .judge-form-header,
    .judge-field-card {
        padding: 14px;
        border-radius: 16px;
    }

    .judge-multicheck-grid-2,
    .judge-multicheck-grid-3 {
        grid-template-columns: 1fr;
    }

    .live-scoring-preview-form {
        padding: 10px 10px 104px;
    }

    .live-preview-team-header {
        top: 8px;
    }

    .live-preview-brand-strip {
        align-items: flex-start;
    }

    .live-preview-brand-copy h4 {
        font-size: 22px;
    }

    .live-preview-chip-button,
    .live-preview-link-button {
        min-height: 40px;
        padding: 10px 14px;
        font-size: 13px;
    }

    .live-preview-signature-grid {
        grid-template-columns: 1fr;
    }

    .live-preview-signature-dialog {
        width: calc(100vw - 18px);
        margin-top: 2vh;
        padding: 12px;
        border-radius: 18px;
    }

    .live-preview-footer-bar {
        flex-direction: column;
        align-items: stretch;
        margin-left: -14px;
        margin-right: -14px;
        bottom: 0;
    }

    .live-preview-footer-actions .button {
        width: 100%;
    }

    .live-preview-footer-metric span {
        font-size: 20px;
    }

    .live-preview-footer-status span {
        font-size: 14px;
    }

    .shell {
        display: block;
    }

    .shell-menu-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        position: fixed;
        top: 14px;
        left: 14px;
        z-index: 60;
        width: 48px;
        height: 48px;
        padding: 0;
        border: 0;
        border-radius: 14px;
        background: rgba(22, 33, 29, 0.94);
        box-shadow: var(--shadow);
    }

    .shell-menu-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        margin: 0 auto;
        border-radius: 999px;
        background: #f7f3ea;
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 49;
        border: 0;
        background: rgba(16, 25, 22, 0.48);
    }

    .sidebar,
    .main,
    .public-main {
        padding: 18px;
    }

    .public-main {
        padding-top: calc(18px + env(safe-area-inset-top));
        padding-right: calc(18px + env(safe-area-inset-right));
        padding-bottom: calc(18px + env(safe-area-inset-bottom));
        padding-left: calc(18px + env(safe-area-inset-left));
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(320px, calc(100vw - 48px));
        max-width: 88vw;
        z-index: 50;
        overflow-y: auto;
        transform: translateX(-110%);
        transition: transform 180ms ease;
        padding-top: 18px;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar > .brand,
    .sidebar-modern-brand {
        display: none;
    }

    .sidebar-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 0;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.08);
        color: #f7f3ea;
        font-size: 26px;
        line-height: 1;
    }

    .main-live-scoring {
        padding: 70px 0 18px;
    }

    .main-live-scoring > .panel:not(.judge-sheet-hero),
    .main-live-scoring > .judge-sheet-form {
        width: calc(100% - 28px);
        margin-left: auto;
        margin-right: auto;
    }

    .main {
        padding-top: 70px;
    }

    .topbar,
    .section-heading,
    .live-actions,
    .scores-toolbar,
    .public-board-topbar,
    .live-session-banner,
    .v2-page-header,
    .team-v2-toolbar,
    .team-v2-pagination,
    .team-v2-import-card,
    .builder-v2-tabs {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-board-picker {
        min-width: 100%;
    }

    .team-v2-filter-bar {
        position: static;
    }

    .scores-filter-grid {
        align-items: stretch;
    }

    .scores-filter-grid label,
    .scores-filter-actions,
    .scores-toolbar,
    .scores-toolbar-actions,
    .scores-bulk-actions-form,
    .scores-export-filtered {
        width: 100%;
    }

    .scores-filter-actions {
        padding-bottom: 0;
    }

    .scores-toolbar {
        display: grid;
        gap: 10px;
        margin-bottom: 14px;
    }

    .scores-toolbar-actions,
    .scores-bulk-actions-form {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .scores-filter-actions .button,
    .scores-bulk-actions-form .button,
    .scores-export-filtered {
        width: 100%;
        justify-content: center;
    }

    .scores-table-wrap {
        overflow-x: auto;
        overflow-y: hidden;
        border-radius: 20px;
    }

    .scores-table {
        min-width: 980px;
    }

    .judge-sheet-hero {
        width: 100%;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
        margin: 0 0 18px;
        padding: 18px 14px;
    }

    .live-score-modal-overlay {
        padding: 14px;
        align-items: stretch;
    }

    .live-score-edit-dialog {
        width: min(100%, 980px);
        height: 100%;
        max-height: 100%;
        border-radius: 20px;
        padding: 18px;
    }

    .scores-pdf-dialog {
        width: calc(100vw - 16px);
        max-width: none;
        height: calc(100vh - 16px);
        max-height: none;
        border-radius: 20px;
        padding: 8px;
    }

    .live-score-edit-wrap {
        max-height: calc(100vh - 270px);
    }

    .judge-sheet-card {
        padding: 14px;
    }

    .judge-sheet-hero-top {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .judge-sheet-hero-meta-line {
        text-align: center;
    }

    .judge-sheet-hero-badges {
        width: 100%;
        justify-content: center;
    }

    .judge-sheet-topbar-logos-right {
        max-width: 100%;
        width: 100%;
        justify-content: center;
    }

    .judge-sheet-topbar-logo .builder-v2-layout-image {
        max-width: min(240px, 82vw);
        height: auto;
    }

    .judge-sheet-hero-copy {
        margin-top: 6px;
    }

    .judge-sheet-hero-copy h3 {
        font-size: 16px;
        line-height: 1.2;
    }

    .judge-sheet-hero-copy p {
        font-size: 12px;
    }

    .judge-validation-grid,
    .judge-team-grid {
        display: grid;
        gap: 10px;
    }

    .judge-sheet-inline-fields {
        grid-template-columns: 1fr;
    }

    .judge-sheet-inline-fields-top,
    .judge-sheet-inline-fields-bottom {
        grid-template-columns: 1fr;
    }

    .participant-signature-modal-dialog {
        width: calc(100vw - 18px);
        margin-top: 2vh;
        padding: 14px;
        border-radius: 18px;
    }

    .judge-sheet-section,
    .live-score-edit-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .judge-score-table {
        table-layout: auto;
        min-width: 640px;
    }

    .judge-score-table thead {
        display: table-header-group;
    }

    .judge-score-table tbody,
    .judge-score-table tr {
        display: table-row-group;
    }

    .judge-score-table tr {
        display: table-row;
    }

    .judge-score-table td,
    .judge-score-table th {
        display: table-cell;
        width: auto;
        text-align: center !important;
        vertical-align: middle;
        white-space: nowrap;
    }

    .judge-score-table td:first-child,
    .judge-score-table th:first-child {
        text-align: left !important;
        min-width: 260px;
        white-space: normal;
    }

    .judge-score-table td:first-child .judge-task-label,
    .judge-score-table td:first-child strong,
    .judge-score-table td:first-child span {
        white-space: normal;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .judge-score-table td[data-label]::before {
        content: none;
    }

    .builder-v2-section-row td {
        padding: 10px;
        white-space: nowrap;
    }

    .judge-score-row-wide td:last-child {
        padding-top: 6px;
    }

    .task-qty-input,
    .judge-score-table input[type="number"],
    .judge-score-table input[type="text"],
    .judge-score-table select {
        font-size: 14px;
    }

    .live-stepper,
    .live-preview-stepper {
        grid-template-columns: 34px minmax(0, 1fr) 34px;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .live-stepper-button,
    .live-preview-stepper-button {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .live-stepper input[type="number"],
    .live-preview-stepper input[type="number"] {
        min-height: 36px;
        padding-left: 4px;
        padding-right: 4px;
        font-size: 14px !important;
    }

    .judge-checkbox-choices {
        display: inline-flex;
        grid-template-columns: none;
        justify-items: normal;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 8px;
    }

}

@media (max-width: 520px) {
    body {
        font-size: 15px;
    }

    .main-live-scoring > .panel:not(.judge-sheet-hero),
    .main-live-scoring > .judge-sheet-form {
        width: calc(100% - 20px);
    }

    .main-live-scoring .judge-sheet-hero {
        padding: 16px 10px;
    }

    .scores-filter-bar {
        padding: 14px;
    }

    .scores-filter-head {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 14px;
    }

    .scores-toolbar {
        padding: 16px 14px;
    }

    .scores-toolbar-actions,
    .scores-bulk-actions-form {
        width: 100%;
    }

    .scores-table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
    }

    .scores-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    .scores-table thead {
        display: none;
    }

    .scores-table tbody {
        display: grid;
        gap: 14px;
    }

    .scores-table tbody tr {
        display: grid;
        gap: 10px;
        padding: 14px;
        border: 1px solid rgba(220, 207, 183, 0.8);
        border-radius: 18px;
        background: #fffdf9;
        box-shadow: var(--shadow);
    }

    .scores-table tbody td {
        display: grid;
        grid-template-columns: minmax(96px, 112px) minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        padding: 0;
        border-bottom: 0;
        text-align: left;
        white-space: normal;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .scores-table tbody td::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--muted);
    }

    .scores-table tbody td.team-v2-check-col {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .scores-table tbody td.team-v2-check-col::before {
        content: "Select";
    }

    .scores-table tbody td.team-v2-check-col input {
        width: 20px;
        height: 20px;
    }

    .scores-table .table-actions,
    .scores-table td[data-label="Actions"] .table-actions {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        width: 100%;
        overflow-x: auto;
    }

    .scores-table .table-actions .inline-form {
        display: contents;
    }

    .scores-table .table-actions .button,
    .scores-table .table-actions .team-v2-toolbar-note {
        width: 100%;
        justify-content: center;
        text-align: center;
        min-width: 0;
    }

    .scores-table tbody td[data-label="Actions"] {
        grid-template-columns: 1fr;
    }

    .scores-table tbody td[data-label="Actions"]::before {
        content: "";
        display: none;
    }

    .scores-table .scores-status {
        justify-content: flex-start;
    }

    .live-badge-block {
        justify-content: center;
    }

    .judge-sheet-topbar-logo .builder-v2-layout-image {
        max-height: 52px;
    }

    .live-score-modal-overlay {
        padding: 10px;
    }

    .live-score-edit-dialog {
        width: 100%;
        height: 100%;
        max-height: 100%;
        min-height: 0;
        padding: 12px;
        border-radius: 18px;
    }

    .scores-pdf-dialog {
        width: 100%;
        height: 100%;
        max-height: none;
        min-height: 0;
        padding: 6px;
        border-radius: 12px;
    }

    .scores-pdf-topbar,
    .scores-pdf-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .scores-pdf-actions .button,
    .scores-pdf-topbar .team-v2-dialog-close .button {
        width: 100%;
        justify-content: center;
    }

    .live-score-edit-wrap {
        max-height: calc(100vh - 250px);
        border-radius: 14px;
    }

    .live-score-edit-dialog .team-v2-dialog-close {
        margin-bottom: 6px;
    }

    .live-score-edit-dialog .section-heading {
        margin-bottom: 10px;
        gap: 6px;
    }

    .live-score-edit-dialog .form-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .live-score-edit-dialog .form-actions .button {
        width: 100%;
        justify-content: center;
    }

    .judge-sheet-fallback-logo {
        width: 100%;
        justify-content: center;
    }

    .live-preview-stepper {
        grid-template-columns: 34px minmax(0, 1fr) 34px;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .live-preview-stepper-button {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 18px;
    }

    .judge-sheet-default-logo {
        max-height: 64px;
    }

    .judge-sheet-hero-copy h3 {
        font-size: 15px;
    }

    .judge-sheet-hero-copy p {
        font-size: 11px;
        line-height: 1.35;
    }

    .sidebar-user-card,
    .sidebar-note {
        padding: 16px;
    }

    .judge-checkbox-choices {
        gap: 8px;
        width: auto;
    }

    .judge-checkbox-choice {
        width: auto;
        justify-content: flex-start;
    }

    .live-preview-badge-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .live-preview-footer-metrics,
    .live-preview-footer-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .live-preview-command-actions,
    .live-preview-meta-links {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .live-preview-command-actions .button,
    .live-preview-meta-links .button {
        width: 100%;
    }
}

@media (max-width: 1120px) {
    .scores-shell {
        padding: 20px;
        border-radius: 24px;
    }

    .scores-page-head,
    .scores-filter-head {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .scores-head-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .scores-filter-grid label {
        flex: 1 1 calc(50% - 14px);
        min-width: 220px;
    }

    .scores-filter-search {
        flex: 1 1 100%;
    }

    .scores-filter-actions {
        width: 100%;
        padding-bottom: 0;
    }

    .scores-toolbar {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .scores-selected-chip,
    .scores-toolbar-actions {
        width: 100%;
    }

    .scores-toolbar-actions {
        justify-content: space-between;
    }

    .scores-bulk-actions-form {
        flex: 1 1 auto;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .scores-bulk-button,
    .scores-columns-trigger {
        min-width: 136px;
        justify-content: center;
    }

    .scores-table-footer {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .scores-footer-controls {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 820px) {
    .scores-shell,
    .scores-main-panel {
        border-radius: 20px;
    }

    .scores-filter-bar,
    .scores-toolbar {
        padding: 16px;
        border-radius: 18px;
    }

    .scores-filter-grid label,
    .scores-filter-actions,
    .scores-selected-chip,
    .scores-toolbar-actions,
    .scores-bulk-actions-form,
    .scores-columns-trigger,
    .scores-head-actions .button,
    .scores-head-actions .meta-pill {
        width: 100%;
    }

    .scores-filter-actions,
    .scores-toolbar-actions,
    .scores-bulk-actions-form,
    .scores-footer-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .scores-filter-actions .button,
    .scores-bulk-actions-form .button,
    .scores-columns-trigger {
        width: 100%;
        min-width: 0;
        justify-content: center;
    }

    .scores-selected-chip {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
    }

    .scores-select-all-filtered {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: center;
    }

    .scores-columns-panel {
        width: 100%;
        max-width: none;
    }

    .scores-table {
        min-width: 1220px;
    }

    .scores-row-actions {
        justify-content: flex-start;
    }

    .scores-table-footer {
        padding: 16px;
    }

    .scores-footer-summary,
    .scores-footer-controls {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .scores-shell {
        padding: 16px;
    }

    .scores-page-head h3 {
        font-size: 1.8rem;
    }

    .scores-filter-bar,
    .scores-toolbar,
    .scores-table-footer {
        padding: 14px;
    }

    .scores-filter-grid,
    .scores-filter-actions,
    .scores-toolbar-actions,
    .scores-bulk-actions-form,
    .scores-footer-controls {
        grid-template-columns: 1fr;
    }

    .scores-filter-grid label {
        flex: 1 1 100%;
        min-width: 0;
    }

    .scores-selected-chip {
        grid-template-columns: 28px minmax(0, 1fr);
        gap: 8px 10px;
        padding: 10px 12px;
    }

    .scores-table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
        padding-bottom: 0;
    }

    .scores-table {
        min-width: 0;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
    }

    .scores-table thead {
        display: none;
    }

    .scores-table tbody {
        display: grid;
        gap: 14px;
    }

    .scores-table tbody tr {
        display: grid;
        gap: 10px;
        padding: 14px;
        border: 1px solid rgba(220, 207, 183, 0.8);
        border-radius: 18px;
        background: #fffdf9;
        box-shadow: var(--shadow);
    }

    .scores-table tbody td {
        display: grid;
        grid-template-columns: minmax(92px, 108px) minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        padding: 0;
        border: 0;
        text-align: left;
    }

    .scores-table tbody td::before {
        content: attr(data-label);
        font-size: 0.76rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #5d697e;
    }

    .scores-table tbody td.team-v2-check-col {
        grid-template-columns: 1fr;
    }

    .scores-table tbody td.team-v2-check-col::before {
        display: none;
    }

    .scores-table tbody td[data-label="Actions"] {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .scores-row-actions {
        flex-wrap: wrap;
    }

    .scores-row-action {
        width: 40px;
        height: 40px;
    }

    .scores-status {
        justify-self: start;
    }

    .scores-table-footer {
        border-top: 0;
        background: transparent;
    }

    .scores-footer-summary {
        gap: 10px;
    }
}
