@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900&display=swap");

/* =====================================================================
   VARIABLES  (matches reference palette exactly)
   ===================================================================== */
:root {
    --c-gray-900: #000000;
    --c-gray-800: #1f1f1f;
    --c-gray-700: #2e2e2e;
    --c-gray-600: #313131;
    --c-gray-500: #969593;
    --c-gray-400: #a6a6a6;
    --c-gray-300: #bdbbb7;
    --c-gray-200: #f1f1f1;
    --c-gray-100: #ffffff;
    /* Semantic / interaction colours */
    --c-accent:       #c56ed4;   /* purple — interactive focus, active states */
    --c-accent-hover: #b05dc0;   /* darker purple for hover */
    --c-pit-accent:   #E8B800;   /* bright goldenrod — pit display team/alliance highlights */
    --c-amber:        #f59e0b;   /* amber — warnings, primary actions */
    --c-green-light:  #86efac;   /* muted green — success states, positive deltas */
    --c-red-light:    #fca5a5;   /* muted red — error states, red alliance text */
    --c-olive-500: #fef08a;
    --c-green-500: #45ffbc;
    --c-frcred:    #ED1C24;
    --c-frcblue:   #0066B3;
    /* Statbotics tile backgrounds */
    --c-sb-red:          rgb(229 229 229);
    --c-sb-yellow:       #fef08a;
    --c-sb-light-green:  rgb(240 253 244);
    --c-sb-green:        rgb(220 252 231);
    --c-sb-blue:         rgb(191 219 254);
    --c-text-primary:   var(--c-gray-100);
    --c-text-secondary: var(--c-gray-200);
    --c-text-tertiary:  var(--c-gray-500);
}

/* =====================================================================
   BASE
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.frc-body {
    line-height: 1.5;
    min-height: 100vh;
    font-family: "Be Vietnam Pro", sans-serif;
    background-color: var(--c-gray-900);
    color: var(--c-text-primary);
    display: flex;
    justify-content: center;
    padding-bottom: 3vw;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; }
button, select, input, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

/* =====================================================================
   APP SHELL
   ===================================================================== */
.frc-app {
    width: 95%;
    max-width: min(1600px, 100vw);
    min-width: 0;
    background-color: var(--c-gray-800);
    padding: 2vw;
    display: flex;
    flex-direction: column;
}

/* =====================================================================
   HEADER
   ===================================================================== */
.frc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    background-color: var(--c-gray-800);
    border-bottom: 1px solid var(--c-gray-500);
}

.frc-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.frc-logo-img {
    display: block;
    height: 36px;
    width: auto;
}

.frc-nav {
    display: flex;
    margin-left: 0;
}

/* "Launch Pit Display" button — styled as a distinct action button in the nav */
.frc-nav-pit-btn {
    margin-left: 1.5rem;
    align-self: center;
    background-color: var(--c-accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.15s;
}
.frc-nav-pit-btn:hover { opacity: 0.85; }

/* Orientation picker modal */
.pit-orient-overlay {
    position: absolute;
    inset: 0;
    z-index: 1010;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
}
.pit-orient-overlay[hidden] { display: none; }
.pit-orient-dialog {
    background: var(--c-gray-800);
    border: 1px solid var(--c-gray-600);
    border-radius: 12px;
    padding: 2rem 2.5rem;
    text-align: center;
    max-width: 480px;
    width: 90vw;
}
.pit-orient-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--c-text-primary);
    margin: 0 0 1.5rem;
}
.pit-orient-choices {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.pit-orient-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    background: var(--c-gray-700);
    border: 2px solid var(--c-gray-500);
    border-radius: 10px;
    padding: 1.25rem 1.75rem;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s;
}
.pit-orient-choice:hover,
.pit-orient-choice.pit-orient-selected {
    border-color: var(--c-accent);
    background: var(--c-gray-600);
}
.pit-orient-screen {
    background: var(--c-gray-900);
    border: 2px solid var(--c-gray-400);
    border-radius: 4px;
}
.pit-orient-ls { width: 128px; height: 72px; }  /* 16:9 landscape */
.pit-orient-po { width: 72px;  height: 128px; } /* 9:16 portrait  */
.pit-orient-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--c-text-primary);
}
.pit-orient-cancel {
    background: none;
    border: none;
    color: var(--c-text-tertiary);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}
.pit-orient-cancel:hover { color: var(--c-text-primary); }

/* Fullscreen prompt overlay shown when pit display is launched */
.pit-fs-prompt {
    position: absolute;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.82);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--c-text-primary);
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    gap: 0.5rem;
}
.pit-fs-prompt small {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.6;
}

.frc-nav a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: var(--c-text-primary);
    font-weight: 500;
    transition: color 0.2s ease;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-top: 2px solid transparent;
    display: inline-flex;
    white-space: nowrap;
}

.frc-nav a:hover,
.frc-nav a.active {
    color: var(--c-accent);
    border-top-color: var(--c-text-primary);
}
/* Prevent nav link hover/active styles leaking into the settings dropdown */
.frc-nav-settings-menu a:hover,
.frc-nav-settings-menu a.active {
    color: var(--c-text-primary);
    border-top-color: transparent;
}

.frc-nav-countdown {
    margin-left: 0.75rem;
    align-self: center;
    background-color: var(--c-gray-700);
    color: var(--c-text-primary);
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: inherit;
    min-width: 2.4rem;
    padding: 0.25rem 0.6rem;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease;
}

.frc-nav-countdown:hover {
    background-color: var(--c-gray-600);
}

.frc-nav-switch {
    margin-left: auto; /* push to right, separating from main nav links */
    padding-left: 1.5rem;
    color: var(--c-text-tertiary) !important;
    font-size: 0.8rem;
}
.frc-nav-switch:hover {
    color: var(--c-text-primary) !important;
}

/* Settings gear dropdown */
.frc-nav-settings {
    position: relative;
    margin-left: 0.75rem;
    align-self: center;
}
.frc-nav-settings summary {
    list-style: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--c-text-primary);
    background-color: var(--c-gray-700);
    padding: 0.25rem 0.6rem;
    min-width: 2.4rem;
    border-radius: 6px;
    text-align: center;
    transition: background-color 0.2s ease;
    user-select: none;
    display: block;
}
.frc-nav-settings summary::-webkit-details-marker { display: none; }
.frc-nav-settings summary:hover { background: var(--c-gray-600); }
.frc-nav-settings[open] summary { background: var(--c-gray-600); }
.frc-nav-settings-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--c-gray-700);
    border: 1px solid var(--c-gray-600);
    border-radius: 8px;
    min-width: 160px;
    padding: 4px;
    z-index: 200;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
/* Reset .frc-nav a inherited styles on dropdown anchor items */
.frc-nav-settings-menu a.frc-nav-settings-item {
    margin-left: 0;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    border-top: none;
}
.frc-nav-settings-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.45rem 0.75rem;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.5;
    box-sizing: border-box;
    color: var(--c-text-secondary);
    text-decoration: none;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s, color 0.12s;
    text-align: left;
}
.frc-nav-settings-item:hover {
    background: var(--c-gray-600);
    color: var(--c-text-primary);
}

/* =====================================================================
   TEAM PICKER PAGE
   ===================================================================== */
.picker-wrap {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

.picker-card {
    background-color: var(--c-gray-700);
    border-radius: 10px;
    padding: 2.5rem 2.5rem 2rem;
    width: 480px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.picker-logo {
    display: flex;
    justify-content: center;
}
.picker-logo-img {
    height: 48px;
    width: auto;
}

.picker-heading {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--c-text-primary);
    text-align: center;
    margin: 0;
}

.picker-sub {
    font-size: 0.85rem;
    color: var(--c-text-secondary);
    text-align: center;
    margin: -0.5rem 0 0;
}

.picker-error {
    background-color: rgba(220, 60, 60, 0.15);
    border: 1px solid rgba(220, 60, 60, 0.4);
    color: #f07070;
    border-radius: 6px;
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
}

.picker-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.picker-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.picker-field[hidden] { display: none; }

.picker-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--c-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.picker-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--c-text-tertiary);
}

.picker-field input[type="text"],
.picker-field input[type="number"],
.picker-field select {
    background-color: var(--c-gray-600);
    border: 1px solid var(--c-gray-500, #555);
    border-radius: 6px;
    color: var(--c-text-primary);
    font-size: 1rem;
    font-family: inherit;
    padding: 0.55rem 0.75rem;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s;
}
.picker-field select {
    cursor: pointer;
    appearance: auto;
}
.picker-field input:focus,
.picker-field select:focus {
    border-color: var(--c-accent);
}

/* Team number row: [input] | Team Name    [button] */
.picker-team-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
/* !important needed to beat .picker-field input[type="text"] { width: 100% } */
.picker-team-row input[type="text"] {
    width: 7.5rem !important;
    flex: none;
}
.picker-team-suffix {
    flex: 1;
    min-width: 0;
    color: var(--c-text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.picker-find-btn { flex-basis: 100%; margin-top: 0.25rem; }
.picker-find-btn {
    background-color: var(--c-gray-600);
    border: 1px solid var(--c-gray-500, #555);
    border-radius: 6px;
    color: var(--c-text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    padding: 0 1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s, border-color 0.15s;
}
.picker-find-btn:hover:not(:disabled) {
    border-color: var(--c-accent);
    color: var(--c-accent);
}
.picker-find-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Step 2 gets a subtle top separator when visible */
#picker-step-event:not([hidden]) {
    border-top: 1px solid var(--c-gray-500, #444);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.picker-team-name {
    font-size: 0.8rem;
    color: var(--c-accent);
    min-height: 1em;
    font-style: italic;
}

.picker-field-check {
    flex-direction: row;
    align-items: center;
}
.picker-check-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--c-text-secondary);
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}
.picker-check-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    accent-color: var(--c-accent);
}

.picker-submit {
    background-color: var(--c-accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.15s;
    margin-top: 0.25rem;
}
.picker-submit:hover {
    background-color: var(--c-accent-hover);
}

.picker-cancel {
    text-align: center;
    font-size: 0.8rem;
}
.picker-cancel a {
    color: var(--c-text-tertiary);
    text-decoration: none;
}
.picker-cancel a:hover {
    color: var(--c-text-secondary);
}

.picker-credit-logo {
    height: 60px;
    width: auto;
    opacity: 0.85;
}
.picker-credit-divider {
    width: 80px;
    border: none;
    border-top: 1px solid #444;
    margin: 0.1rem 0;
}

.picker-loading {
    display: none; /* hidden by default; JS removes [hidden] to show */
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.75);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    font-size: 1.1rem;
    color: var(--c-text-secondary);
}
.picker-loading.is-visible {
    display: flex;
}
.picker-loading-gif {
    height: 80px;
    width: auto;
}
.picker-loading-activity {
    font-size: 1rem;
    font-weight: 600;
    color: var(--c-text-primary);
    font-style: italic;
    min-height: 1.4em;
    letter-spacing: 0.02em;
    transition: opacity 0.35s ease;
}
.picker-loading-activity-fade {
    opacity: 0;
}

/* =====================================================================
   DEMO MODE TAB  — small centred tab at top edge, floats over content
   ===================================================================== */
.frc-test-banner {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: #f5c400;
    color: #1a1a00;
    padding: 0.15rem 0.9rem 0.2rem;
    border-radius: 0 0 6px 6px;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
    pointer-events: none;
}

/* =====================================================================
   DEMO JUMP BAR
   ===================================================================== */
.demo-jump-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    background: #1a1a2e;
    border-bottom: 1px solid #2a2a4a;
    font-size: 0.8rem;
    color: var(--c-text-secondary);
    flex-shrink: 0;
}
.demo-jump-label { color: var(--c-text-secondary); white-space: nowrap; }
.demo-jump-label strong { color: #a0cfff; }
.demo-jump-input {
    width: 3.5rem;
    padding: 0.15rem 0.3rem;
    background: #11111f;
    border: 1px solid #3a3a5a;
    color: #fff;
    border-radius: 3px;
    font-size: 0.8rem;
    text-align: center;
}
.demo-jump-btn {
    padding: 0.15rem 0.5rem;
    background: #2a2a4a;
    border: 1px solid #3a3a5a;
    color: #ccc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    line-height: 1.4;
}
.demo-jump-btn:hover { background: #3a3a6a; color: #fff; }
.demo-jump-reset { color: #a0cfff; }

/* Pit display hamburger menu demo jump section */
.pit-hmenu-demo-jump {
    padding: 0.5rem 1rem 0.25rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 0.25rem;
}
.pit-hmenu-demo-label {
    display: block;
    font-size: 0.85rem;
    color: var(--c-text-secondary);
    margin-bottom: 0.4rem;
}
.pit-hmenu-demo-label strong { color: #a0cfff; }
.pit-hmenu-demo-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* =====================================================================
   CONTENT  — two-column: main + sidebar
   ===================================================================== */
.frc-content {
    height: 100%;
    padding-top: 0.5rem;
}

/* Full-width page header row: event name (left) + team identity (right) */
.frc-page-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--c-gray-700);
    padding: 0.65rem 1rem;
    border-radius: 6px;
    gap: 1rem;
}

.frc-page-header-event {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.frc-page-header-team {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.frc-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.5rem;
    row-gap: 0.75rem;
}

.frc-main {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
    padding: 1rem;
}

/* =====================================================================
   SECTIONS
   ===================================================================== */
.frc-section {
    margin-top: 0.25rem;
}

.frc-section-title {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

/* ── Card prompt banner ──────────────────────────────────────────────── */
.frc-card-prompt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(232,184,0,0.12), rgba(232,184,0,0.04));
    border: 1px solid rgba(232,184,0,0.25);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.frc-card-prompt-text { font-size: 0.9rem; color: var(--c-text-secondary); flex: 1; }
.frc-card-prompt-text strong { color: var(--c-pit-accent); }
.frc-card-prompt-actions { display: flex; gap: 0.5rem; align-items: center; }
.frc-card-prompt-dismiss {
    background: none; border: none; color: var(--c-text-tertiary);
    font-size: 0.8rem; cursor: pointer;
}
.frc-card-prompt-dismiss:hover { color: var(--c-text-primary); }

/* ── Team page grid (main + card sidebar) ────────────────────────────── */
.team-page-grid { display: block; }
.team-main-content { }
.team-card-sidebar { margin-top: 2rem; }
@media (min-width: 1100px) {
    .team-page-grid { display: grid; grid-template-columns: 1fr 380px; gap: 2rem; align-items: start; }
    .team-card-sidebar { margin-top: 0; position: sticky; top: 80px; }
}

/* ── Share Event Card generator ───────────────────────────────────────── */
.card-gen-controls { margin-bottom: 1rem; }
.card-gen-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.card-gen-label { font-size: 0.8rem; font-weight: 600; color: var(--c-text-tertiary); min-width: 90px; }
.card-gen-toggle { display: flex; gap: 0.3rem; }
.card-gen-btn {
    background: var(--c-gray-600); border: 1px solid var(--c-gray-500); border-radius: 4px;
    color: var(--c-text-secondary); font-size: 0.8rem; padding: 0.3rem 0.8rem; cursor: pointer;
}
.card-gen-btn.active { background: var(--c-gray-400); color: #fff; border-color: var(--c-gray-300); font-weight: 700; }
.card-gen-bgs { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.card-gen-bg {
    width: 40px; height: 40px; border-radius: 6px; border: 2px solid transparent;
    cursor: pointer; padding: 0; background: none; overflow: hidden; transition: transform 0.1s;
}
.card-gen-bg:hover { transform: scale(1.1); }
.card-gen-bg span { display: block; width: 100%; height: 100%; border-radius: 4px; }
.card-gen-bg.active { border-color: var(--c-pit-accent); box-shadow: 0 0 0 2px var(--c-pit-accent); transform: scale(1.08); }
.card-gen-file {
    font-size: 0.8rem; color: var(--c-text-secondary);
    max-width: 220px;
}
.card-gen-clear {
    background: none; border: none; color: var(--c-text-secondary);
    font-size: 0.8rem; cursor: pointer; text-decoration: underline;
}
.frc-btn-primary {
    background-color: var(--c-pit-accent);
    color: var(--c-gray-900);
    font-weight: 700;
}
.frc-btn-primary:hover { filter: brightness(0.9); }
.card-gen-preview {
    background: var(--c-gray-700); border-radius: 8px; padding: 1rem;
    margin-bottom: 1rem; text-align: center; max-width: 540px;
}
.card-gen-preview img {
    max-width: 100%; height: auto; border-radius: 4px;
    transition: opacity 0.2s;
}
.card-gen-actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }

.card-gen-color {
    width: 40px; height: 32px; border: 1px solid var(--c-gray-500); border-radius: 4px;
    background: var(--c-gray-600); cursor: pointer; padding: 2px;
}
.card-gen-select {
    background: var(--c-gray-600); border: 1px solid var(--c-gray-500); border-radius: 4px;
    color: #fff; font-size: 0.85rem; padding: 0.35rem 0.5rem; font-family: inherit; flex: 1; max-width: 200px;
}
.card-gen-input {
    background: var(--c-gray-600); border: 1px solid var(--c-gray-500); border-radius: 4px;
    color: #fff; font-size: 0.8rem; padding: 0.35rem 0.5rem; font-family: inherit; flex: 1; max-width: 200px;
}
.card-gen-input::placeholder { color: var(--c-text-tertiary); }
.card-gen-share {
    display: flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap;
}
.card-share-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--c-gray-600); color: #fff; text-decoration: none;
    font-weight: 700; font-size: 0.85rem; transition: background 0.15s;
}
.card-share-btn:hover { background: var(--c-gray-400); }
.card-gen-share-hint { font-size: 0.75rem; color: var(--c-text-tertiary); font-style: italic; }
.card-gen-actions-sep { width: 1px; height: 24px; background: var(--c-gray-600); flex-shrink: 0; }

@media (max-width: 640px) {
    .card-gen-row { flex-direction: column; align-items: flex-start; }
    .card-gen-label { min-width: unset; }
    .card-gen-preview { max-width: 100%; }
    .card-gen-select, .card-gen-input { max-width: 100%; }
}

/* ── Card Generator standalone page ───────────────────────────────────── */
.cardgen-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 480px;
    gap: 1.5rem;
    align-items: start;
}
.cardgen-col-a, .cardgen-col-b { display: flex; flex-direction: column; gap: 0.5rem; }

/* Mobile tab bar (hidden on desktop) */
.cardgen-tab-bar { display: none; }
.cardgen-panel-hidden { display: none !important; }

/* Mobile card generator — body class override (works inside layout_mobile) */
.frc-body-mobile .cardgen-tab-bar { display: flex; gap: 0; border-bottom: 2px solid var(--c-gray-600); margin-bottom: 1rem; }
.frc-body-mobile .cardgen-layout { display: flex; flex-direction: column; width: 100%; overflow: hidden; }
.frc-body-mobile .cardgen-col-a,
.frc-body-mobile .cardgen-col-b { min-width: 0; overflow: hidden; }
.frc-body-mobile .cardgen-section { overflow: hidden; }
.frc-body-mobile .cardgen-accordion { max-width: 100%; overflow: hidden; }
.frc-body-mobile .cardgen-preview-col { position: static; }
.frc-body-mobile .card-gen-select,
.frc-body-mobile .card-gen-input { display: block; width: 0 !important; min-width: 100%; max-width: 100%; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; }
.frc-body-mobile .card-gen-file { max-width: 100%; width: 100%; }
.frc-body-mobile .card-gen-row { flex-direction: column; align-items: flex-start; }
.frc-body-mobile .card-gen-label { min-width: unset; }
.frc-body-mobile .card-gen-toggle { width: 100%; }
.frc-body-mobile .card-gen-btn { flex: 1; min-height: 44px; }
.frc-body-mobile .card-gen-bg { width: 44px; height: 44px; }
.frc-body-mobile .card-gen-preview { max-width: 100%; }
.frc-body-mobile .card-gen-actions { flex-direction: column; }
.frc-body-mobile #cg-generate { width: 100%; min-height: 48px; font-size: 1rem; }
.frc-body-mobile .cardgen-share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.frc-body-mobile .cardgen-share-row > .card-gen-label { grid-column: 1 / -1; }
.frc-body-mobile .cardgen-share-btn { min-height: 44px; width: 100%; justify-content: center; }
.cardgen-tab {
    flex: 1; background: var(--c-gray-700); border: none; border-bottom: 2px solid transparent;
    color: var(--c-text-tertiary); font-size: 0.85rem; font-weight: 600;
    padding: 0.6rem 0.5rem; min-height: 44px; cursor: pointer; white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}
.cardgen-tab:hover { color: var(--c-text-primary); }
.cardgen-tab.active { color: var(--c-text-primary); border-bottom-color: var(--c-pit-accent); }
.cardgen-section { background: var(--c-gray-700); border-radius: 8px; padding: 1rem; overflow: hidden; }

/* Accordions — always open on desktop, collapsible on mobile */
.cardgen-accordion { margin-bottom: 0.75rem; }
.cardgen-accordion-title {
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--c-text-secondary);
    padding: 0.75rem 1rem; background: var(--c-gray-700); border-radius: 8px;
    list-style: none; cursor: default;
}
.cardgen-accordion-title::-webkit-details-marker { display: none; }
.cardgen-accordion-title::marker { display: none; }
.cardgen-accordion > .cardgen-section { border-radius: 0 0 8px 8px; margin-bottom: 0; }
.cardgen-accordion[open] > .cardgen-accordion-title { border-radius: 8px 8px 0 0; }
/* Desktop: non-interactive summaries (all start open via HTML open attr) */
@media (min-width: 701px) {
    .cardgen-accordion > .cardgen-accordion-title { pointer-events: none; cursor: default; }
}
.cardgen-preview-col { position: sticky; top: 80px; }
.cardgen-preview-placeholder {
    color: var(--c-text-tertiary); font-size: 0.9rem; text-align: center;
    padding: 4rem 2rem; line-height: 1.6;
    border: 2px dashed var(--c-gray-600); border-radius: 8px;
}
.cardgen-checkbox-label {
    font-size: 0.8rem; color: var(--c-text-secondary); display: flex; align-items: center; gap: 0.4rem; cursor: pointer;
}
.cardgen-checkbox-label input[type="checkbox"] { accent-color: var(--c-pit-accent); }

@media (max-width: 1200px) {
    .cardgen-layout { grid-template-columns: 1fr 1fr; }
    .cardgen-preview-col { grid-column: 1 / -1; position: static; margin-top: 1rem; }
}
@media (max-width: 700px) {
    .cardgen-layout { display: flex; flex-direction: column; width: 100%; overflow: hidden; }
    .cardgen-tab-bar { display: flex; gap: 0; border-bottom: 2px solid var(--c-gray-600); margin-bottom: 1rem; }
    .cardgen-panel-hidden { display: none !important; }
    .cardgen-preview-col { position: static; margin-bottom: 1rem; }
    .cardgen-accordion { max-width: 100%; overflow: hidden; }

    /* Accordion: interactive on mobile */
    .cardgen-accordion > .cardgen-accordion-title {
        cursor: pointer; user-select: none; min-height: 44px;
        display: flex; align-items: center; justify-content: space-between;
    }
    .cardgen-accordion > .cardgen-accordion-title::after {
        content: '+'; font-size: 1.1rem; font-weight: 400; color: var(--c-text-tertiary); flex-shrink: 0;
    }
    .cardgen-accordion[open] > .cardgen-accordion-title::after { content: '−'; }
    .cardgen-accordion > .cardgen-section { border-top: 1px solid var(--c-gray-600); }

    /* Close non-essential sections by default on mobile via JS */
    /* (HTML has open attr; JS removes it on mobile for non-essential sections) */

    /* Controls: full width */
    .card-gen-row { flex-direction: column; align-items: flex-start; }
    .card-gen-label { min-width: unset; }
    .card-gen-select, .card-gen-input { display: block; width: 100% !important; max-width: 100%; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; }
    .cardgen-col-a, .cardgen-col-b { min-width: 0; overflow: hidden; }
    .card-gen-file { max-width: 100%; width: 100%; }
    .card-gen-toggle { width: 100%; }
    .card-gen-btn { flex: 1; min-height: 44px; }
    .card-gen-bg { width: 44px; height: 44px; }
    .card-gen-color { width: 48px; height: 40px; }
    .card-gen-preview { max-width: 100%; }

    /* Generate button: full width */
    .card-gen-actions { flex-direction: column; }
    #cg-generate { width: 100%; min-height: 48px; font-size: 1rem; }

    /* Share: 2×2 grid */
    .cardgen-share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .cardgen-share-row > .card-gen-label { grid-column: 1 / -1; }
    .cardgen-share-btn { min-height: 44px; width: 100%; justify-content: center; }
}
.cardgen-share-row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-top: 0.5rem; }
.cardgen-share-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.35rem 0.75rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600;
    text-decoration: none; cursor: pointer; border: none; transition: filter 0.15s;
}
.cardgen-share-btn:hover { filter: brightness(1.15); }
.cardgen-share-fb { background: #1877f2; color: #fff; }
.cardgen-share-li { background: #0a66c2; color: #fff; }
.cardgen-share-bs { background: #0085ff; color: #fff; }
.cardgen-share-ig { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color: #fff; }

/* Event name as main-column page heading */
.frc-event-name-heading {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--c-text-primary);
    margin: 0;
}

.frc-muted {
    color: var(--c-text-tertiary);
    font-style: italic;
}

/* =====================================================================
   TILES  (matches reference .tile system exactly)
   ===================================================================== */
.frc-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    column-gap: 1rem;
    row-gap: 1rem;
    margin-top: 0.25rem;
}

/* Statbotics freshness indicator — right-aligned in the heading row */
.sb-updated-label {
    font-size: 0.62rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--c-text-secondary, #999);
    opacity: 0.75;
}

/* Explicit 2-col tile grid (rank + rp avg) */
.frc-tiles-2col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

/* Explicit 3-col tile grid (auto/teleop/endgame) */
.frc-tiles-3col {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

/* Paired tiles in 2-col or 3-col grids are square (1:1).
   Solo full-width tiles above them are naturally ~2:1 proportional. */
.frc-tiles-2col .frc-tile,
.frc-tiles-3col .frc-tile {
    aspect-ratio: 1;
    min-height: unset;
}

/* Record tile value — W-L-T is wider than a single number, slightly smaller to fit */
.tile-value-record {
    font-size: 2rem;
}

/* Narrow-screen fallback */
@media (max-width: 1100px) {
    .frc-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.tile-span-2 { grid-column: span 2; }

.frc-tile {
    padding: 10px;
    border-radius: 8px;
    background-color: var(--c-gray-400);
    color: var(--c-gray-900);
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: 0.25s ease;
}

.frc-tile:hover {
    transform: none;
}

.tile-label {
    font-weight: 600;
    font-size: 0.75rem;
}

.tile-value {
    font-size: 30pt;
    font-weight: bold;
}

/* Tile colour classes — reference names */
.tile-default        { background-color: var(--c-gray-300); color: var(--c-gray-900); }
.tile-sb-red         { background-color: var(--c-sb-red);         color: #555; }
.tile-sb-yellow      { background-color: var(--c-sb-yellow);      color: #333; }
.tile-sb-light-green { background-color: var(--c-sb-light-green); color: #333; }
.tile-sb-green       { background-color: var(--c-sb-green);       color: rgb(22 101 52); }
.tile-sb-blue        { background-color: var(--c-sb-blue);        color: rgb(30 64 175); }
.tile-darkgray       { background-color: var(--c-gray-600);       color: #fff; padding: 0 1em 1em 1em; }
.tile-queue-far { background-color: #a0a0a0; color: #222; }  /* >3 away  */
.tile-queue-3   { background-color: #b5a978; color: #111; }  /* 3 away   */
.tile-queue-2   { background-color: #cab250; color: #000; }  /* 2 away   */
.tile-queue-1   { background-color: #dfbb28; color: #000; }  /* 1 away   */
.tile-queue-0   { background-color: #f5c400; color: #000; }  /* queuing! */

/* Alliance colour tiles */
.frc-red  { background-color: var(--c-frcred);  color: #fff; }
.frc-blue { background-color: var(--c-frcblue); color: #fff; }

/* =====================================================================
   UPCOMING MATCH CARDS  — horizontal strip of vertical match columns
   ===================================================================== */
.frc-match-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.frc-match-card-num {
    font-size: 1rem;
    font-weight: 800;
    text-align: center;
    padding: 0.45rem 0.25rem;
    border-radius: 6px 6px 0 0;
    color: #fff;
}

.frc-match-card-num.frc-red  { background-color: var(--c-frcred); }
.frc-match-card-num.frc-blue { background-color: var(--c-frcblue); }

.frc-match-card-vs {
    font-size: 0.65rem;
    font-weight: 600;
    text-align: center;
    color: var(--c-text-tertiary);
    padding: 0.15rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.frc-match-card-team {
    font-size: clamp(0.9rem, 2vw, 1.6rem);
    font-weight: 800;
    text-align: center;
    padding: 0.2rem;
    border-radius: 4px;
    aspect-ratio: 2 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ghost card — empty slot placeholder with same structure, dark grey tiles */
.frc-match-card-ghost .frc-match-card-num {
    background-color: var(--c-gray-700);
}

/* Invisible content forces ghost cells to the same intrinsic height as real cells */
.frc-match-card-ghost .frc-match-card-num::before,
.frc-match-card-ghost .frc-match-card-team::before,
.frc-match-card-ghost .frc-match-card-vs::before {
    content: '\00a0';
    visibility: hidden;
}

.frc-match-card-ghost .frc-match-card-team {
    background-color: var(--c-gray-700);
}

.frc-match-card-ghost .frc-match-card-vs {
    visibility: hidden;
}

/* Team cells — used in dashboard.js match table */
.cell-own-red  { background: #fff; color: #aa2e2e; font-weight: 800; }
.cell-own-blue { background: #fff; color: #2e68aa; font-weight: 800; }

.team-link { color: inherit; font-weight: 700; }
.team-link:hover { text-decoration: underline; }

/* =====================================================================
   SIDEBAR
   ===================================================================== */

.frc-sidebar-team-avatar {
    width: 40px;
    height: 40px;
    max-width: 40px;
    flex-shrink: 0;
    image-rendering: pixelated;
    border-radius: 4px;
}

.frc-sidebar-team-info {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    flex-wrap: wrap;
    min-width: 0;
}

.frc-sidebar-team-number {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--c-text-primary);
    line-height: 1.1;
    white-space: nowrap;
}

.frc-sidebar-team-divider {
    color: var(--c-text-tertiary);
    font-weight: 300;
}

.frc-sidebar-team-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--c-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =====================================================================
   RANKINGS TABLE  (matches reference .ranking-table)
   ===================================================================== */
.frc-rank-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* respect container width; don't size from content */
}

/* # column narrow; Rec column wide enough for W-L-T without wrapping */
.frc-rank-table th:nth-child(1) { width: 14%; }
.frc-rank-table th:nth-child(4) { width: 32%; }
.frc-rank-table td:nth-child(4) { white-space: nowrap; }

.frc-rank-table thead th {
    background-color: var(--c-gray-900);
    color: var(--c-gray-100);
    padding: 0.5em;
    text-align: left;
}

/* Shared alternating-row stripes for all data tables */
.frc-rank-table tbody tr:nth-child(odd) td,
.frc-schedule-table tbody tr:nth-child(odd) td,
.frc-scouting-table tbody tr:nth-child(odd) td,
.match-phase-table tbody tr:nth-child(odd) td,
.match-breakdown-table tbody tr:nth-child(odd) td { background-color: var(--c-gray-800); }

.frc-rank-table tbody tr:nth-child(even) td,
.frc-schedule-table tbody tr:nth-child(even) td,
.frc-scouting-table tbody tr:nth-child(even) td,
.match-phase-table tbody tr:nth-child(even) td,
.match-breakdown-table tbody tr:nth-child(even) td { background-color: var(--c-gray-700); }

.frc-rank-table tbody tr.row-own-team td {
    background-color: var(--c-gray-300);
    color: var(--c-gray-900);
    font-weight: 700;
}

.frc-rank-table td {
    padding: 0.5em;
    border-top: 1px solid var(--c-gray-600);
    color: var(--c-text-primary);
}

.frc-rank-table .row-own-team a { color: var(--c-gray-900); }

.frc-rank-table tbody tr.row-own-team-extra td {
    border-top: 2px solid var(--c-gray-500);
}

/* "YOUR RANK" separator row when our team is outside the displayed top 8 */
.frc-rank-table tbody tr.row-own-gap td {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--c-text-tertiary);
    letter-spacing: 0.08em;
    padding: 0.3rem;
    background-color: var(--c-gray-800);
    border-top: none;
}

/* Last-updated indicator in sidebar */
.frc-last-updated {
    font-size: 0.7rem;
    color: var(--c-text-tertiary);
    text-align: center;
    min-height: 1em;
}
.frc-last-updated.frc-stale {
    color: #e3a020;
    font-weight: 600;
}

/* =====================================================================
   NEXUS ANIMATION
   ===================================================================== */
@keyframes frc-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
.nexus-on-field { animation: frc-pulse 1.5s ease-in-out infinite; }

/* Next-match queue pulse — alternates between full and faded alliance colour */
@keyframes pulse-red   { 0%,100% { background-color: var(--c-frcred);  } 50% { background-color: rgba(237,28,36,0.35); } }
@keyframes pulse-blue  { 0%,100% { background-color: var(--c-frcblue); } 50% { background-color: rgba(0,102,179,0.35); } }
@keyframes pulse-queue { 0%,100% { background-color: #f5c400; color: #000; } 50% { background-color: rgba(245,196,0,0.3); color: #000; } }
.tile-pulse-red   { animation: pulse-red   1.5s ease-in-out infinite; }
.tile-pulse-blue  { animation: pulse-blue  1.5s ease-in-out infinite; }
.tile-pulse-queue { animation: pulse-queue 1.5s ease-in-out infinite; }

/* =====================================================================
   ALLIANCE SLOT SAVE FLASH
   ===================================================================== */
@keyframes slot-flash { 0% { background-color: var(--c-green-light); color: #000; } 100% { background-color: transparent; color: var(--c-text-primary); } }
.slot-saved { animation: slot-flash 1.2s ease-out forwards; }

/* =====================================================================
   OTHER PAGE CONTENT WRAPPER
   ===================================================================== */
.frc-page-content {
    background-color: var(--c-gray-700);
    border-radius: 8px;
    padding: 1.25rem;
    overflow: hidden;
    min-width: 0;
}

.frc-page-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

/* =====================================================================
   HELP PAGE
   ===================================================================== */
.help-page { max-width: 860px; }
.help-intro {
    color: var(--c-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.help-section {
    border-top: 1px solid var(--c-gray-600);
    padding-top: 1.25rem;
    margin-bottom: 1.25rem;
}
.help-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--c-text-primary);
    margin: 0 0 0.75rem;
}
.help-section-body {
    color: var(--c-text-secondary);
    line-height: 1.6;
}
.help-section-body p { margin: 0 0 0.6rem; }
.help-list, .help-steps {
    margin: 0.4rem 0 0.6rem 1.25rem;
    padding: 0;
}
.help-list li, .help-steps li { margin-bottom: 0.35rem; }
.help-steps { list-style: decimal; }
.help-note {
    font-size: 0.85rem;
    color: var(--c-text-tertiary);
    margin-top: 0.5rem;
}
.help-cols {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.help-col-text { flex: 1; }
.help-col-aside {
    flex-shrink: 0;
    width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.help-tip {
    background: var(--c-gray-800);
    border: 1px solid var(--c-gray-600);
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--c-text-secondary);
}
.help-tip strong { color: var(--c-text-primary); display: block; margin-bottom: 0.2rem; }
.help-tip-sub { color: var(--c-text-tertiary); font-size: 0.75rem; }
@media (max-width: 640px) {
    .help-cols { flex-direction: column; }
    .help-col-aside { width: 100%; }
}

/* =====================================================================
   TABS  (matches reference .tabs style)
   ===================================================================== */
.frc-tabs {
    display: flex;
    gap: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--c-gray-600);
    margin-bottom: 1rem;
}

.frc-tab {
    background: none;
    border: none;
    color: var(--c-text-tertiary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-top: 2px solid transparent;
    cursor: pointer;
    display: inline-flex;
    transition: 0.25s ease;
}

.frc-tab:hover,
.frc-tab.active {
    color: var(--c-text-primary);
    border-top-color: var(--c-text-primary);
}

.hidden { display: none !important; }

/* =====================================================================
   SCHEDULE TABLE
   ===================================================================== */
.frc-schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.frc-schedule-table th,
.frc-schedule-table td {
    padding: 0.4em 0.5em;
    border: 1px solid var(--c-gray-600);
    text-align: center;
    vertical-align: middle;
}

.frc-schedule-table thead th,
.frc-scouting-table thead th {
    background-color: var(--c-gray-900);
    color: var(--c-gray-400);
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* stripe rules consolidated above with shared table stripe block */

.frc-schedule-table .row-own-team td { background-color: #2a2e1a; }
.frc-schedule-table .row-nexus-current td { background-color: rgba(34, 120, 60, 0.5) !important; }
.frc-schedule-table .row-nexus-queue   td { background-color: rgba(180, 140, 0, 0.4) !important; }

.cell-sched-red  { background-color: rgba(170, 46, 46, 0.35) !important; }
.cell-sched-blue { background-color: rgba(46, 104, 170, 0.35) !important; }
.cell-sched-own  { font-weight: 800; outline: 2px solid var(--c-olive-500); outline-offset: -2px; }
.cell-score      { font-weight: 700; }
.cell-score.cell-winner.cell-sched-red  { background-color: rgba(210, 60, 60, 0.75) !important; color: #fff; }
.cell-score.cell-winner.cell-sched-blue { background-color: rgba(60, 120, 210, 0.75) !important; color: #fff; }
.match-label     { font-weight: 700; white-space: nowrap; }
.match-label.match-result-win       { border-left: 4px solid #4ade80; }
.match-label.match-result-loss      { border-left: 4px solid #f87171; }
.match-label.match-result-tie       { border-left: 4px solid #9ca3af; }
.match-label.match-result-win-pred  { border-left: 4px solid rgba(74,222,128,0.35); }
.match-label.match-result-loss-pred { border-left: 4px solid rgba(248,113,113,0.35); }
.match-label.match-result-tie-pred  { border-left: 4px solid rgba(156,163,175,0.35); }
.score-pred { color: var(--c-text-tertiary); font-style: italic; font-weight: 400; }
.schedule-divider td { text-align: center; font-size: 0.72rem; color: var(--c-text-tertiary); padding: 0.25rem; border-top: 1px solid rgba(255,255,255,0.25); border-bottom: 1px solid rgba(255,255,255,0.25); background: var(--c-gray-900) !important; letter-spacing: 0.05em; }
.match-time      { color: var(--c-text-tertiary); white-space: nowrap; font-size: 0.78rem; }
.frc-tab-toggle  { display: flex; align-items: center; gap: 0.4rem; margin-left: auto; font-size: 0.8rem; color: var(--c-text-tertiary); cursor: pointer; user-select: none; }
.frc-tab-toggle input { cursor: pointer; }

/* =====================================================================
   TEAM DETAIL
   ===================================================================== */
.team-header        { margin-bottom: 1rem; }
.team-header h1     { font-size: 4rem; font-weight: 800; line-height: 1; }
.team-nickname      { font-size: 1.3rem; font-weight: 600; color: var(--c-text-tertiary); margin-top: 0.25rem; }
.team-meta          { font-size: 0.85rem; color: var(--c-text-tertiary); margin-top: 0.4rem; }
.team-badge {
    display: inline-block;
    background: var(--c-olive-500);
    color: #1a1a00;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-top: 0.5rem;
}

/* =====================================================================
   ALLIANCE SELECTION
   ===================================================================== */
.frc-alliance-actions { display: flex; gap: 0.75rem; margin-bottom: 1rem; }

.frc-alliances-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 900px) {
    .frc-alliances-grid { grid-template-columns: repeat(2, 1fr); }
}

.frc-alliance-card {
    background: var(--c-gray-700);
    border: 1px solid var(--c-gray-600);
    border-radius: 8px;
    overflow: hidden;
}

.frc-alliance-card.is-own-team { border: 2px solid var(--c-olive-500); }

.alliance-card-header {
    background: var(--c-gray-600);
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c-text-tertiary);
}

.alliance-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.75rem;
    border-top: 1px solid var(--c-gray-600);
}

.slot-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--c-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.slot-input {
    background: var(--c-gray-900);
    color: var(--c-text-primary);
    border: none;
    border-bottom: 1px solid var(--c-gray-500);
    padding: 0.2rem 0.4rem;
    font-family: inherit;
    font-size: 0.85rem;
    width: 90px;
    text-align: right;
}
.slot-input:focus { outline: none; border-bottom-color: var(--c-gray-300); }

.team-num     { font-size: 1.5rem; font-weight: 800; color: var(--c-text-primary); }
.team-num-own { color: var(--c-olive-500); }

/* =====================================================================
   BUTTONS  (matches reference .flat-button)
   ===================================================================== */
.frc-btn {
    border-radius: 6px;
    background-color: var(--c-gray-700);
    padding: 0.5em 1.5em;
    border: 0;
    color: var(--c-text-secondary);
    transition: 0.25s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}
.frc-btn:hover { background-color: var(--c-gray-600); }
.frc-btn-sm    { padding: 0.2rem 0.5rem; font-size: 0.75rem; }

/* =====================================================================
   SCOUTING
   ===================================================================== */
.scout-toolbar { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.75rem; }
.scout-filter  { width: 160px; }

.frc-scouting-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.frc-scouting-table th,
.frc-scouting-table td { padding: 0.4em 0.5em; border: 1px solid var(--c-gray-600); text-align: left; vertical-align: middle; }
/* thead th rule for frc-scouting-table consolidated above with frc-schedule-table */
/* stripe rules consolidated above with shared table stripe block */
.notes-cell { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.scout-form   { display: flex; flex-direction: column; gap: 0.75rem; max-width: 700px; margin-top: 0.5rem; }
.form-row     { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row-full { flex-direction: column; }
.form-row label {
    display: flex; flex-direction: column; gap: 0.25rem;
    font-size: 0.8rem; font-weight: 600; color: var(--c-text-tertiary);
    flex: 1; min-width: 140px;
}
.form-row input,
.form-row textarea {
    background: var(--c-gray-900);
    color: var(--c-text-primary);
    border: 0;
    border-bottom: 1px solid var(--c-gray-600);
    padding: 0.3rem 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
}
.form-row textarea { resize: vertical; }
.form-actions { display: flex; align-items: center; gap: 1rem; }

.scout-save-msg         { font-size: 0.85rem; font-weight: 600; }
.scout-save-msg.success { color: var(--c-green-light); }
.scout-save-msg.error   { color: var(--c-red-light); }

.scout-import-row { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.75rem; }
.scout-import-result         { font-size: 0.85rem; font-weight: 600; padding: 0.4rem 0; }
.scout-import-result.success { color: var(--c-green-light); }
.scout-import-result.error   { color: var(--c-red-light); }

/* =====================================================================
   FOCUS RING  (matches reference)
   ===================================================================== */
input:focus, select:focus, a:focus, textarea:focus, button:focus {
    outline: 0;
    box-shadow: 0 0 0 2px var(--c-gray-800), 0 0 0 4px var(--c-gray-300);
}

/* =====================================================================
   ADMIN PAGE
   ===================================================================== */
.admin-login {
    max-width: 360px; margin: 6rem auto; background: var(--c-gray-700);
    padding: 2rem; border-radius: 8px;
}
.admin-login h1   { font-size: 1.1rem; margin-bottom: 1.5rem; }
.admin-login label { display: block; font-size: 0.8rem; color: var(--c-text-tertiary); margin-bottom: 0.25rem; }
.admin-login input[type=password] {
    width: 100%; background: var(--c-gray-900); color: #fff;
    border: 0; border-bottom: 1px solid var(--c-gray-500);
    padding: 0.4rem; font-size: 1rem; margin-bottom: 1rem;
}
.admin-error { color: var(--c-red-light); font-size: 0.85rem; margin-bottom: 0.75rem; }

.admin-wrap    { max-width: 960px; margin: 0 auto; padding: 2rem; }
.admin-head    { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; border-bottom: 1px solid var(--c-gray-600); padding-bottom: 0.75rem; }
.admin-head h1 { font-size: 1.2rem; font-weight: 800; }

.admin-section    { background: var(--c-gray-700); border-radius: 8px; padding: 1.25rem; margin-bottom: 1.25rem; }
.admin-section h2 { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--c-text-tertiary); margin-bottom: 1rem; }

.admin-field       { margin-bottom: 0.85rem; }
.admin-field label { display: block; font-size: 0.8rem; color: var(--c-text-tertiary); margin-bottom: 0.25rem; }
.admin-field input[type=text],
.admin-field input[type=number],
.admin-field input[type=password],
.admin-field select {
    width: 100%; background: var(--c-gray-900); color: #fff;
    border: 0; border-bottom: 1px solid var(--c-gray-500);
    padding: 0.4rem 0; font-size: 0.95rem; font-family: inherit; cursor: pointer;
}
.admin-field input:focus, .admin-field select:focus { outline: none; border-bottom-color: #fff; box-shadow: none; }
.admin-field .field-hint    { font-size: 0.72rem; color: var(--c-text-tertiary); margin-top: 0.2rem; }

.admin-flash       { padding: 0.5rem 0.75rem; border-radius: 4px; margin-bottom: 1rem; font-size: 0.85rem; font-weight: 600; background: var(--c-gray-700); color: var(--c-green-light); }
.admin-flash.error { color: var(--c-red-light); }

.admin-cache-row { display: flex; gap: 0.75rem; align-items: center; }
.admin-save-row  { margin-top: 1rem; }

.team-autocomplete  { position: relative; }
.team-suggestions   { position: absolute; top: 100%; left: 0; right: 0; background: var(--c-gray-600); border: 1px solid var(--c-gray-500); border-radius: 4px; z-index: 100; display: none; }
.team-suggestions li { list-style: none; padding: 0.5rem 0.75rem; cursor: pointer; font-size: 0.9rem; }
.team-suggestions li:hover { background: var(--c-gray-500); }
.team-name-hint     { font-size: 0.8rem; color: var(--c-green-500); margin-top: 0.25rem; min-height: 1.2em; }

/* =====================================================================
   ADMIN ANALYTICS SECTION
   ===================================================================== */
.an-stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
.an-stat-tile  { background: var(--c-gray-800); border-radius: 8px; padding: 0.75rem; text-align: center; }
.an-stat-val   { font-size: 1.8rem; font-weight: 800; color: var(--c-text-primary); }
.an-stat-label { font-size: 0.72rem; color: var(--c-text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; }

.an-subhdr { font-size: 0.85rem; font-weight: 700; color: var(--c-text-secondary); margin-bottom: 0.4rem; }
.an-stat-sub { font-weight: 400; }

.an-table              { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.an-table thead tr     { color: var(--c-text-tertiary); text-align: left; border-bottom: 1px solid #333; }
.an-table thead th     { padding: 0.3rem 0.5rem; }
.an-table tbody tr     { border-bottom: 1px solid #222; }
.an-table tbody td     { padding: 0.25rem 0.5rem; }
.an-td-bold   { font-weight: 700; }
.an-td-right  { text-align: right; }
.an-td-nowrap { white-space: nowrap; }
.an-empty     { color: var(--c-text-tertiary); font-style: italic; text-align: center; padding: 1rem 0.5rem; }

/* ── Admin tab bar ────────────────────────────────────────────────────── */
.admin-tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--c-gray-600);
    margin-bottom: 1.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.admin-tab {
    background: none;
    border: none;
    color: var(--c-text-tertiary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    min-height: 44px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}
.admin-tab:hover { color: var(--c-text-primary); }
.admin-tab.active {
    color: var(--c-text-primary);
    border-bottom-color: var(--c-pit-accent);
}
.admin-tab-panel { display: none; }
.admin-tab-panel.active { display: block; }

/* ── Admin shared helpers ─────────────────────────────────────────────── */
.admin-meta { font-size: 0.85rem; color: var(--c-text-tertiary); margin-bottom: 0.75rem; }
.admin-meta strong { color: #fff; }
.admin-save-row { margin-top: 1rem; display: flex; align-items: center; gap: 1rem; }
.admin-logout-link { font-size: 0.85rem; color: var(--c-text-tertiary); }
.admin-link-subtle { font-size: 0.82rem; color: var(--c-text-tertiary); display: inline-block; margin-top: 0.5rem; }
.admin-link-subtle:hover { color: var(--c-text-primary); }
.admin-table-scroll { overflow-x: auto; margin-bottom: 0.5rem; }
.admin-bug-counts { display: flex; gap: 1.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.admin-bug-new   { color: #f59e0b; margin-left: 0.3rem; }
.admin-bug-open  { color: #60a5fa; margin-left: 0.3rem; }
.admin-bug-closed { color: #6b7280; margin-left: 0.3rem; }
.frc-btn-sm { font-size: 0.85rem; padding: 0.3rem 0.85rem; }

/* ── Log level badges ─────────────────────────────────────────────────── */
.log-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}
.log-badge-error { background: rgba(239,68,68,0.25); color: #f87171; }
.log-badge-warn  { background: rgba(234,179,8,0.2);  color: #facc15; }
.log-badge-info  { background: rgba(107,114,128,0.2); color: #9ca3af; }
.log-row-error td { background: rgba(239,68,68,0.08); }
.log-row-warn td  { background: rgba(234,179,8,0.06); }

/* ── Log controls ─────────────────────────────────────────────────────── */
.an-log-controls { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.an-log-filters  { display: flex; gap: 0.4rem; }

/* ── Chart ─────────────────────────────────────────────────────────────── */
.an-chart-wrap {
    width: 100%;
    height: 260px;
    background: var(--c-gray-800);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}
.an-chart-wrap canvas { width: 100%; height: 100%; display: block; }
.an-chart-legend {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.an-legend-item { display: flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; color: var(--c-text-secondary); }
.an-legend-item strong { color: var(--c-text-primary); margin-left: 0.2rem; }
.an-legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.an-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    margin-right: 0.35rem;
    animation: an-pulse 2s ease-in-out infinite;
}
@keyframes an-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ── Adoption grid ────────────────────────────────────────────────────── */
.an-adopt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.an-bar-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.an-bar-label { font-size: 0.8rem; color: var(--c-text-secondary); width: 80px; flex-shrink: 0; }
.an-bar-track { flex: 1; height: 18px; background: var(--c-gray-800); border-radius: 3px; overflow: hidden; }
.an-bar-fill  { height: 100%; border-radius: 3px; min-width: 2px; transition: width 0.3s ease; }
.an-bar-val   { font-size: 0.8rem; font-weight: 700; color: var(--c-text-primary); width: 40px; text-align: right; }

/* ── Admin mobile responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
    .admin-wrap { padding: 1rem; }
    .admin-tab { padding: 0.5rem 0.9rem; font-size: 0.8rem; }
    .an-stat-tiles { grid-template-columns: 1fr; }
    .an-adopt-grid { grid-template-columns: 1fr; }
    .an-chart-wrap { height: 180px; }
    .admin-cache-row { flex-wrap: wrap; }
    .admin-save-row { flex-direction: column; align-items: flex-start; }
}

/* =====================================================================
   MATCH DETAIL — two-column grid layout
   ===================================================================== */
.match-detail-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    column-gap: 3rem;
    align-items: start;
}
@media (max-width: 900px) {
    .match-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================================
   MATCH DETAIL LINK  (match number cells on dashboard + schedule)
   ===================================================================== */
.match-detail-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255,255,255,0.4);
}
.match-detail-link:hover { border-bottom-color: #fff; }

/* =====================================================================
   MATCH DETAIL PAGE
   ===================================================================== */
.match-back-link { margin-bottom: 1rem; }

/* Heading row inside the alliance section: title left, badge right */
.match-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.match-section-header .frc-section-title { margin-bottom: 0; }

.match-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.match-badge-red      { background: var(--c-frcred);               color: #fff; }
.match-badge-blue     { background: var(--c-frcblue);              color: #fff; }
.match-badge-done     { background: var(--c-gray-600);             color: var(--c-text-secondary); }
.match-badge-upcoming { background: rgba(74,222,128,0.15);         color: #4ade80; }

/* Result banner */
.match-result-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.match-result-banner-win  { background: rgba(74,222,128,0.12);  border-left: 4px solid #4ade80; }
.match-result-banner-loss { background: rgba(248,113,113,0.12); border-left: 4px solid #f87171; }
.match-result-banner-tie  { background: rgba(156,163,175,0.12); border-left: 4px solid #9ca3af; }
.match-result-label  { font-size: 1.25rem; font-weight: 800; }
.match-result-detail { font-size: 0.85rem; color: var(--c-text-tertiary); }

/* Alliance comparison grid */
.match-alliances {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.match-alliance-block  { background: var(--c-gray-600); border-radius: 8px; overflow: hidden; }
.match-alliance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.match-alliance-header-red  { background: rgba(170,46,46,0.7);  color: #fff; }
.match-alliance-header-blue { background: rgba(46,104,170,0.7); color: #fff; }
.match-alliance-winner-badge {
    font-size: 0.65rem;
    background: rgba(255,255,255,0.2);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
}

/* Team rows inside alliance block */
.match-team-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--c-gray-700);
}
.match-team-row-us { background: var(--c-gray-700); }

.match-team-num {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 1.4rem;
    font-weight: 800;
    white-space: nowrap;
    width: 5.8rem;   /* fixed: fits ★ + 5-digit number; keeps rank/record left-aligned */
    flex-shrink: 0;
}
.match-team-num-red  a { color: #f87171; text-decoration: none; }
.match-team-num-blue a { color: #60a5fa; text-decoration: none; }
.match-team-num a:hover { text-decoration: underline; }
/* Fixed-width star slot — always rendered, empty when not our team */
.match-us-star {
    display: inline-block;
    width: 0.9rem;
    font-size: 0.7rem;
    color: var(--c-olive-500);
    line-height: 1;
    flex-shrink: 0;
}

.match-team-info   { flex: 1; min-width: 0; text-align: left; }
.match-team-rank   { display: block; font-size: 0.75rem; font-weight: 600; color: var(--c-text-secondary); }
.match-team-record { display: block; font-size: 0.72rem; color: var(--c-text-tertiary); margin-top: 0.1rem; }

/* Compact EPA tiles inside alliance rows */
.match-epa-tiles { display: flex; gap: 0.3rem; flex-shrink: 0; }
.match-epa-tile {
    width: 69px;
    height: 63px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}
.match-epa-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; opacity: 0.75; }
.match-epa-val   { font-size: 1.08rem; font-weight: 800; }

/* Predictions row */
.match-pred-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
}
.match-prob-card,
.match-scores-card,
.match-phase-card {
    background: var(--c-gray-600);
    border-radius: 8px;
    padding: 0.75rem;
    flex: 1;
    min-width: 160px;
}
.match-card-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-text-tertiary);
    margin-bottom: 0.5rem;
}

.match-prob-bar {
    height: 22px;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    margin-bottom: 0.3rem;
}
.match-prob-bar-red  { background: var(--c-frcred);  transition: width 0.4s ease; }
.match-prob-bar-blue { background: var(--c-frcblue); flex: 1; }
.match-prob-pct { display: flex; justify-content: space-between; font-size: 0.82rem; font-weight: 700; }
.match-prob-pct-red  { color: #f87171; }
.match-prob-pct-blue { color: #60a5fa; }

.match-score-tiles { display: flex; gap: 0.5rem; }
.match-score-tile {
    flex: 1;
    border-radius: 6px;
    padding: 0.5rem 0.4rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.match-score-tile-red  { background: rgba(170,46,46,0.45); }
.match-score-tile-blue { background: rgba(46,104,170,0.45); }
.match-score-winner.match-score-tile-red  { background: var(--c-frcred);  }
.match-score-winner.match-score-tile-blue { background: var(--c-frcblue); }
.match-score-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; opacity: 0.85; }
.match-score-val   { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.match-score-sub   { font-size: 0.62rem; opacity: 0.65; font-style: italic; }

/* Phase breakdown table (preview) */
.match-phase-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.match-phase-table th,
.match-phase-table td { padding: 0.3em 0.5em; border: 1px solid var(--c-gray-700); text-align: center; }
.match-phase-table thead th,
.match-breakdown-table thead th { background: var(--c-gray-900); font-size: 0.7em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--c-gray-400); }
/* stripe rules consolidated above with shared table stripe block */
.match-phase-table td:first-child { text-align: left; color: var(--c-text-tertiary); }

/* Score breakdown table (review) */
.match-breakdown-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; margin-top: 0.5rem; }
.match-breakdown-table th,
.match-breakdown-table td { padding: 0.35em 0.5em; border: 1px solid var(--c-gray-600); text-align: center; vertical-align: middle; }
/* thead th consolidated above with match-phase-table */
/* stripe rules consolidated above with shared table stripe block */
.match-breakdown-table .bd-label  { text-align: left; color: var(--c-text-tertiary); font-weight: 500; }
.match-breakdown-table .bd-red    { color: #f87171; font-weight: 600; }
.match-breakdown-table .bd-blue   { color: #60a5fa; font-weight: 600; }
.match-breakdown-table .bd-total-row td { background: var(--c-gray-600) !important; font-weight: 700; }

/* Videos section */
.match-videos { display: flex; flex-direction: column; gap: 0.75rem; }
.match-video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}
.match-video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 6px;
}
.match-video-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    background: var(--c-gray-600);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--c-text-primary);
    text-decoration: none;
    width: fit-content;
}
.match-video-link:hover { background: var(--c-gray-500); }
.match-video-save-wrap { margin-top: 0.25rem; }
.match-video-save-row  { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.match-video-input {
    background: var(--c-gray-900);
    color: var(--c-text-primary);
    border: 0;
    border-bottom: 1px solid var(--c-gray-500);
    padding: 0.3rem 0.5rem;
    font-family: inherit;
    font-size: 0.85rem;
    flex: 1;
    min-width: 200px;
}
.match-video-input:focus { outline: none; border-bottom-color: var(--c-gray-300); }
.match-video-save-msg         { font-size: 0.8rem; font-weight: 600; }
.match-video-save-msg.success { color: var(--c-green-light); }
.match-video-save-msg.error   { color: var(--c-red-light); }

/* =====================================================================
   SCENARIO PAGE
   ===================================================================== */

/* Page header */
.sc-page-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.sc-page-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--c-text-primary);
}

/* Three-column layout */
.sc-page-grid {
    display: grid;
    grid-template-columns: 210px 1fr 230px;
    gap: 2rem;
    align-items: start;
}
@media (max-width: 900px) {
    .sc-page-grid {
        grid-template-columns: 1fr;
    }
    .sc-sidebar-left  { order: 2; }
    .sc-matches-col   { order: 1; }
    .sc-sidebar-right { order: 3; }
}

/* Column headings */
.sc-col-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--c-text-tertiary);
    margin-bottom: 0.6rem;
}

/* ── Rankings tables (shared left / right) ── */
.sc-rank-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.sc-rank-table th {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-text-tertiary);
    padding: 0.25rem 0.3rem;
    border-bottom: 1px solid var(--c-gray-700);
    text-align: right;
    white-space: nowrap;
}
.sc-th-team { text-align: left !important; }
.sc-th-rank { text-align: center !important; }

.sc-rank-table td { padding: 0.22rem 0.3rem; vertical-align: middle; }

.sc-rank-row { border-bottom: 1px solid var(--c-gray-800); }
.sc-rank-row:last-child { border-bottom: none; }

.sc-rank-row-us { background: rgba(227,255,168,.07); }
.sc-rank-row-us .sc-td-team a { color: var(--c-olive-500); font-weight: 700; }

.sc-td-rank  { text-align: center; font-weight: 700; color: var(--c-text-tertiary); white-space: nowrap; }
.sc-td-team  { text-align: left;   font-weight: 600; }
.sc-td-team a { color: var(--c-text-primary); }
.sc-td-team a:hover { text-decoration: underline; }
.sc-td-rp    { text-align: right; font-variant-numeric: tabular-nums; color: var(--c-text-secondary); }
.sc-td-delta { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.sc-delta-up   { color: var(--c-green-light); }
.sc-delta-down { color: var(--c-red-light); }
.sc-delta-same { color: var(--c-text-tertiary); }

.sc-us-star { color: var(--c-olive-500); margin-right: 0.15rem; font-size: 0.7rem; }
.sc-lock-badge { font-size: 0.65rem; margin-left: 0.2rem; opacity: 0.7; cursor: default; }

/* ── Match cards ── */
.sc-match-list { display: flex; flex-direction: column; gap: 0.6rem; }

.sc-match-card {
    background: var(--c-gray-800);
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--c-gray-700);
}
.sc-match-card-edited {
    border-color: var(--c-olive-500);
}
.sc-match-card-best-path {
    border-left: 3px solid #22c55e;
}
.sc-match-card-best-path-ours {
    border-left: 3px solid var(--c-pit-accent);
}

/* ── Best Path button ────────────────────────────────────────────────── */
.sc-btn-best-path {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    border: none;
}
.sc-btn-best-path:hover { filter: brightness(1.1); }

/* ── Best Path results panel ─────────────────────────────────────────── */
.sc-best-path-panel {
    background: var(--c-gray-700);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-left: 3px solid #22c55e;
}
.sc-bp-summary {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}
.sc-bp-rank { font-size: 1rem; }
.sc-bp-rank strong { font-size: 1.3rem; color: var(--c-pit-accent); }
.sc-bp-context { color: var(--c-text-tertiary); font-size: 0.85rem; }
.sc-bp-gain { color: #22c55e; font-weight: 700; }
.sc-bp-nochange { color: var(--c-text-tertiary); font-style: italic; }
.sc-bp-count {
    background: var(--c-gray-600);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    color: var(--c-text-secondary);
}
.sc-bp-toggle {
    background: none;
    border: none;
    color: var(--c-text-tertiary);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.25rem 0;
    margin-top: 0.5rem;
}
.sc-bp-toggle:hover { color: var(--c-text-primary); }

/* Detail rows */
.sc-bp-details { margin-top: 0.75rem; }
.sc-bp-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.82rem;
}
.sc-bp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.sc-bp-tier-likely .sc-bp-dot   { background: #22c55e; }
.sc-bp-tier-possible .sc-bp-dot { background: #f59e0b; }
.sc-bp-tier-stretch .sc-bp-dot  { background: #ef4444; }
.sc-bp-match { font-weight: 700; min-width: 36px; }
.sc-bp-desc  { flex: 1; color: var(--c-text-secondary); }
.sc-bp-rp    { font-weight: 700; color: #22c55e; min-width: 40px; }
.sc-bp-prob  { color: var(--c-text-tertiary); min-width: 70px; text-align: right; }

/* Mobile responsive */
@media (max-width: 640px) {
    .sc-bp-row { flex-wrap: wrap; gap: 0.3rem; }
    .sc-bp-desc { width: 100%; order: 10; font-size: 0.75rem; }
}

.sc-match-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}
.sc-match-label {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--c-text-tertiary);
    white-space: nowrap;
    min-width: 2.4rem;
}
.sc-match-teams {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    flex: 1;
}
.sc-match-vs {
    font-size: 0.72rem;
    color: var(--c-text-tertiary);
    font-weight: 600;
}
.sc-pred-score {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    color: var(--c-text-secondary);
}
.sc-pred-red  { color: var(--c-red-light); }
.sc-pred-blue { color: #93c5fd; }
.sc-pred-prob { color: var(--c-text-tertiary); font-weight: 400; }
.sc-match-alliance {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    transition: opacity 0.15s;
}
.sc-alliance-losing  { opacity: 0.4; }
.sc-alliance-winning { opacity: 1;   }

.sc-team-chip {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    white-space: nowrap;
}
.sc-match-alliance-red  .sc-team-chip { background: rgba(237,28,36,.18); color: var(--c-red-light); }
.sc-match-alliance-blue .sc-team-chip { background: rgba(0,102,179,.22); color: #93c5fd; }
.sc-team-chip-us { outline: 1px solid var(--c-olive-500); color: var(--c-olive-500) !important; }

/* Controls area */
.sc-match-controls {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

/* Win/Tie/Loss toggle row */
.sc-outcome-row {
    display: flex;
    gap: 0.3rem;
}
.sc-outcome-btn {
    flex: 1;
    padding: 0.28rem 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--c-gray-600);
    background: var(--c-gray-700);
    color: var(--c-text-tertiary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.1s, color 0.1s, border-color 0.1s;
    white-space: nowrap;
}
.sc-outcome-btn:hover { background: var(--c-gray-600); color: var(--c-text-primary); }
.sc-outcome-btn.active { color: var(--c-gray-900); border-color: transparent; }
.sc-outcome-red.active  { background: var(--c-frcred); }
.sc-outcome-blue.active { background: var(--c-frcblue); }
.sc-outcome-tie.active  { background: var(--c-gray-400); }

/* Bonus RP stepper row */
.sc-bonus-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.sc-bonus-label {
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.sc-bonus-label-red  { color: var(--c-red-light); }
.sc-bonus-label-blue { color: #93c5fd; }
.sc-bonus-sep { flex: 1; min-width: 0.5rem; }

.sc-stepper {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}
.sc-step-btn {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 3px;
    border: 1px solid var(--c-gray-600);
    background: var(--c-gray-700);
    color: var(--c-text-primary);
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s;
}
.sc-step-btn:hover { background: var(--c-gray-600); }
.sc-step-val {
    min-width: 1.2rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--c-text-primary);
    font-variant-numeric: tabular-nums;
}

/* No-matches placeholder */
.sc-no-matches {
    padding: 1.5rem 0;
}

/* =====================================================================
   PIT DISPLAY — fixed 1920×1080, no header/nav
   ===================================================================== */
.frc-body-pit {
    overflow: hidden;
    min-height: unset;
    background: #000; /* letterbox colour when screen ≠ 16:9 */
}

.frc-body-picker {
    align-items: center;
}

/* Fixed 1920×1080 canvas — scaled to fit any screen via JS scaler */
.frc-app-pit {
    --pit-pad: 29px; /* 1.5% of 1920px */
    width: 1920px;
    height: 1080px;
    max-width: unset;
    padding: var(--pit-pad);
    margin: 0;
    position: fixed;
    top: 0;
    left: 0;
    transform-origin: top left;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Portrait canvas — 1080×1920 */
.frc-app-pit.pit-portrait {
    --pit-pad: 20px;
    --pit-inner-w: calc(1080px - 2 * var(--pit-pad));   /* 1040px — reused by video wraps */
    width: 1080px;
    height: 1920px;
    box-sizing: border-box;
}

/* ---- Landscape/portrait content switching ---- */
.pit-po-only       { display: none; }
.pit-landscape-custom { display: none; }
/* pit-ls-only always visible in non-pit context */

/* Pit landscape: hide original grid and all portrait-only sections, show landscape custom */
.frc-app-pit:not(.pit-portrait) .pit-ls-only  { display: none !important; }
.frc-app-pit:not(.pit-portrait) .pit-po-only  { display: none !important; }
.frc-app-pit:not(.pit-portrait) .pit-landscape-custom {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Pit portrait: hide original grid, show portrait layout */
.frc-app-pit.pit-portrait .pit-ls-only { display: none !important; }
.frc-app-pit.pit-portrait .pit-po-only {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ======================================================================
   Playoff Bracket Pit Display (portrait, 1080×1920 canvas)

   Pixel budget (no video stream present):
     Canvas:        1920px tall, 20px pad top+bottom  → inner 1880px
     .pp-status:    ~120px min-height (matches .pit-status-po)
     .pp-bracket-hdr: 30px + 14px margin-top
     container gaps: 2 × 10px = 20px
     .pp-bracket:   ~1880 - 120 - 30 - 14(margin) - 20 ≈ 1696px
     .pp-rounds:    1744px (full bracket height, minus 8px gap for sidebar)
     3 sections gap: 2 × 6px = 12px → sections share 1732px
     Upper/Lower use grid-template-rows: 2fr 2fr 1fr (5 row-shares)
       each 2fr section = 2/5 × 1732 ≈ 693px
       each 1fr section = 1/5 × 1732 ≈ 346px
     Inside a 2fr section: label(20px) + gap(4px) + section-rows(669px)
       section-rows gap 5px → each card row = (669-5)/2 = 332px
     Inside a 1fr section: label(20px) + gap(4px) + section-rows(322px)
       1 card row = 322px
   ====================================================================== */

.pp-container {
    display: flex;
    flex-direction: column;
    width:  1080px;
    /* height resolved to 100% by higher-specificity .pit-po-only rule */
    padding: var(--pit-pad);
    gap: 10px;
    box-sizing: border-box;
    overflow: hidden;
}

/* ① Video — shared sizing for all portrait pit video containers */
.pp-video-wrap,
.pa-video-wrap,
.pit-po-live-video-wrap {
    flex-shrink: 0;
    width:  var(--pit-inner-w);
    height: calc(var(--pit-inner-w) * 9 / 16);
    border-radius: 8px;
    overflow: hidden;
}
.pp-video-wrap iframe,
.pa-video-wrap iframe,
.pit-po-live-video-wrap iframe { width: 100%; height: 100%; display: block; border: none; }

/* ② Status row — inherits from .pit-status-row */
.pp-status-tile { min-width: 0; overflow: hidden; }   /* tile extras beyond base */
.pp-status-next { flex: 1.6; }                         /* next match gets a bit more width */

/* ── Shared pit status tile-row base (portrait, landscape, playoff) ── */
.pit-status-row {
    display: flex;
    flex-shrink: 0;
    gap: 8px;
}
.pit-status-row .frc-tile {
    flex: 1;
    min-height: 120px;
    padding: 12px 14px;
}
.pit-status-row .tile-label {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pit-status-row .tile-value {
    font-size: 52px;
    font-weight: 800;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pit-status-row .tile-sub {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    opacity: 0.85;
    min-height: 1em;
}

/* ── Playoff Bracket Scenarios (desktop, scenarios page) ──────────────────── */
.sc-po-layout {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 2rem;
    align-items: start;
}
@media (max-width: 900px) {
    .sc-po-layout { grid-template-columns: 1fr; }
}
.sc-po-bracket {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.sc-po-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sc-po-section-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--c-text-tertiary);
}
.sc-po-rounds {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    flex-wrap: wrap;
}
.sc-po-round {
    display: flex;
    flex-direction: row;
    gap: 0.6rem;
    flex-wrap: wrap;
}
/* Compact bracket card */
.sc-po-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 130px;
    min-height: 90px;   /* consistent height: label + 2 rows at 32px each */
    background: var(--c-tile-bg);
    border: 1px solid var(--c-border);
    border-left: 3px solid var(--c-border);
    border-radius: 5px;
    overflow: hidden;
    font-size: 0.82rem;
}
.sc-po-card.sc-po-red  { border-left-color: #c0392b; }
.sc-po-card.sc-po-blue { border-left-color: #2471a3; }
.sc-po-card.sc-po-played { opacity: 0.85; }
.sc-po-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-text-tertiary);
    padding: 3px 7px 1px;
}
.sc-po-row {
    display: flex;
    align-items: center;
    min-height: 32px;         /* consistent height regardless of font size */
    padding: 4px 7px;
    cursor: pointer;
    transition: background 0.12s;
    touch-action: manipulation;       /* eliminates 300ms tap delay on iOS */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}
.sc-po-card.sc-po-played .sc-po-row { cursor: default; }
.sc-po-row-red  { background: rgba(192,57,43,0.20); }
.sc-po-row-blue { background: rgba(36,113,163,0.20); }
.sc-po-row-red[data-pick]:hover  { background: rgba(192,57,43,0.40); }
.sc-po-row-blue[data-pick]:hover { background: rgba(36,113,163,0.40); }
/* User scenario pick — bright red/blue */
.sc-po-row-red.sc-po-row-win  { background: #c0392b !important; }
.sc-po-row-blue.sc-po-row-win { background: #2471a3 !important; }
.sc-po-row-win .sc-po-al { color: #fff; }
/* Confirmed actual result — green */
.sc-po-row-confirmed              { background: rgba(46,160,67,0.30) !important; }
.sc-po-row-confirmed .sc-po-al    { color: #5dba6a; font-weight: 700; }
.sc-po-row-loss { opacity: 0.35; }
.sc-po-row-us   { outline: 2px solid rgba(232,184,0,0.6); outline-offset: -2px; border-radius: 2px; }
.sc-po-al {
    font-size: 1rem;
    font-weight: 700;
    color: var(--c-text-primary);
    line-height: 1.3;
}
.sc-po-epa, .sc-po-epa-wrap .sc-po-epa {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--c-text-tertiary);
    margin-left: 0.4rem;
}
.sc-po-pda {
    font-size: 0.65rem;
    font-weight: 700;
}
.sc-po-pda-up   { color: #22c55e; }
.sc-po-pda-down { color: #ef4444; }
.sc-po-epa-wrap { display: inline; }

.sc-po-al-feed {
    font-size: 0.72rem;
    font-weight: 600;
    font-style: italic;
    color: #bbb;
}
/* Alliance reference sidebar */
.sc-po-alliance-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sc-po-al-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(255,255,255,0.03);
    border: 1px solid transparent;
}
.sc-po-al-row.sc-po-al-us {
    border-color: var(--c-pit-accent);
    background: rgba(232,184,0,0.07);
}
.sc-po-al-num {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--c-text-secondary);
    min-width: 2ch;
}
.sc-po-al-teams {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.sc-po-al-team {
    font-size: 0.8rem;
    color: var(--c-text-secondary);
}
.sc-po-al-team-us {
    color: var(--c-pit-accent);
    font-weight: 700;
}

/* ③ Bracket heading — fixed height, direct child of pp-container */
.pp-bracket-hdr {
    flex-shrink: 0;
    height: 30px;
    margin-top: 14px;         /* gap(10) + margin(14) = 24px above — uniform with other section headings */
    font-size: 22px;
    font-weight: 700;
    color: var(--c-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}
.pp-our-alliance-badge {
    font-size: 16px;
    font-weight: 600;
    background: rgba(232,184,0,0.15);
    color: var(--c-pit-accent);
    border: 1px solid rgba(232,184,0,0.4);
    border-radius: 4px;
    padding: 2px 8px;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

/* ④ Bracket wrapper — takes all remaining vertical space */
.pp-bracket {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Bracket body: rounds (left) + alliance sidebar (right) — fills .pp-bracket */
.pp-bracket-body {
    display: flex;
    flex-direction: row;
    gap: 8px;
    height: 100%;
    overflow: hidden;
}
.pp-bracket-body > .pp-rounds,
.pp-bracket-body > .pp-flat-list {
    flex: 1;
    min-width: 0;
    min-height: 0;
}

/* ── Rounds container (type 10 & 11) ──
   Uses CSS Grid with explicit row definitions so section heights are
   determined by the grid, not by content. The flex:1 chain is gone. */
.pp-rounds {
    display: grid;
    /* type-10 default: Upper(2 rows) : Lower(2 rows) : Finals(1 row) = 2:2:1 */
    grid-template-rows: 2fr 2fr 1fr;
    gap: 6px;
    height: 100%;
    overflow: hidden;
}

/* type-11 override: equal rows for each round (PHP sets data-rounds count) */
.pp-rounds[data-rounds="3"] { grid-template-rows: repeat(3, 1fr); }
.pp-rounds[data-rounds="4"] { grid-template-rows: repeat(4, 1fr); }

/* type-11: individual round container (used instead of pp-bracket-section) */
.pp-round {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}
.pp-round-label {
    flex-shrink: 0;
    height: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text-muted, #888);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 20px;
    overflow: hidden;
}

/* ── Type-10 bracket sections ──
   Each section is one grid row. The grid row height drives everything inside. */
.pp-bracket-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
    border-left: 3px solid rgba(255,255,255,0.12);
    padding-left: 8px;
    /* no flex:1 / min-height:0 — height comes from the grid row */
}
.pp-bracket-finals {
    border-left-color: rgba(232,184,0,0.4);
}
.pp-section-label {
    flex-shrink: 0;
    height: 20px;
    font-size: 15px;
    font-weight: 700;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 20px;
    overflow: hidden;
}
.pp-bracket-finals .pp-section-label { color: var(--c-pit-accent); }

/* Section rows: a flex column of card-row strips */
.pp-section-rows {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow: hidden;
    /* min-height:0 not needed — parent section height is grid-determined */
}

/* A horizontal strip of cards — fills its share of section-rows height */
.pp-round-matches {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 6px;
    overflow: hidden;
    /* align-items: stretch is the default — cards fill the row height */
}

/* Match card — fixed structure, no flex:1 vertical growth on the card itself */
.pp-card {
    flex: 1;          /* horizontal: share row width equally */
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px 8px;
    background: rgba(255,255,255,0.05);
    border-left: 6px solid rgba(255,255,255,0.10);
    border-radius: 6px;
    min-width: 0;
    overflow: hidden;
}
.pp-card-tbd   { opacity: 0.40; }
.pp-card-red   { border-left-color: #c0392b; }
.pp-card-blue  { border-left-color: #2471a3; }
.pp-card-on-field {
    border-left-color: #fff;
    box-shadow: 0 0 10px rgba(255,255,255,0.3);
    animation: pp-pulse-border 1.2s ease-in-out infinite;
}
@keyframes pp-pulse-border {
    0%,100% { box-shadow: 0 0 6px rgba(255,255,255,0.2); }
    50%      { box-shadow: 0 0 16px rgba(255,255,255,0.6); }
}

/* Card label row — fixed height at top of card */
.pp-card-label {
    flex-shrink: 0;
    height: 18px;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    line-height: 18px;
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Alliance rows — share remaining card height equally */
.pp-card-row {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    border-radius: 3px;
    gap: 4px;
    overflow: hidden;
    min-height: 0;
}
.pp-row-red  { background: rgba(192,57,43,0.30); }
.pp-row-blue { background: rgba(36,113,163,0.30); }
.pp-row-win  { background: rgba(50,200,80,0.22) !important; }
.pp-row-loss { opacity: 0.50; }
.pp-row-us   { outline: 2px solid rgba(232,184,0,0.7); outline-offset: -2px; border-radius: 3px; }

/* Team name and score — scaled up for pit-display readability (3-5m viewing) */
.pp-row-al {
    font-size: 36px;
    font-weight: 800;
    color: #e8e8e8;
    line-height: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Placeholder label when alliance not yet assigned — shows "W PO5" / "L PO7" etc. */
.pp-row-al-feed {
    font-size: 18px;
    font-weight: 600;
    font-style: italic;
    color: #bbb;
}
.pp-row-sc {
    font-size: 36px;
    font-weight: 700;
    color: #ddd;
    line-height: 1;
    text-align: right;
    flex-shrink: 0;
}

/* Alliance sidebar — fills bracket body height via flex */
.pp-sidebar {
    flex: 0 0 175px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow: hidden;
}
/* Each sidebar alliance card: distribute height equally across 8 slots */
.pp-sa-card {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 4px 7px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 5px;
    overflow: hidden;
    min-height: 0;
}
.pp-sa-card.pp-sa-us {
    border-color: var(--c-pit-accent);
    background: rgba(232,184,0,0.08);
}
.pp-sa-hdr {
    flex: 0 0 auto;
    font-size: 34px;
    font-weight: 700;
    color: #aaa;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    min-width: 2.2ch;
    text-align: center;
}
.pp-sa-card.pp-sa-us .pp-sa-hdr { color: var(--c-pit-accent); }
.pp-sa-card.pp-sa-eliminated { background: rgba(239,68,68,0.18); opacity: 0.6; }
.pp-sa-card.pp-sa-eliminated .pp-sa-hdr { color: var(--c-text-tertiary); }
/* Total EPA label beneath alliance number in sidebar cards */
.pp-sa-epa {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text-muted, #888);
    line-height: 1.2;
    letter-spacing: 0.02em;
}
.pp-sa-teams {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
    justify-content: center;
}
.pp-sa-team {
    font-size: 16px;
    font-weight: 700;
    color: #e8e8e8;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pp-sa-team.pp-sa-team-us {
    color: var(--c-pit-accent);
}

/* Flat list fallback (unknown playoff_type) */
.pp-flat-list {
    flex: 1;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    align-content: flex-start;
    overflow: hidden;
}
.pp-flat-list .pp-card { flex: 0 0 calc(50% - 3px); height: 110px; }

/* ======================================================================
   Landscape Playoff Layout (1920×1080)
   3-column body: bracket (2fr) | alliance sidebar (0.7fr) | video (1fr)

   Pixel budget:
     Canvas inner:   1920 - 58px(pad) = 1862px wide, 1080 - 58px = 1022px tall
     frc-page-header: ~50px
     ppl-status-row:  ~80px
     gaps (2×10px):   20px
     ppl-body:        1022 - 50 - 80 - 20 ≈ 872px tall

     Columns (1862px - 2×12px gaps = 1838px):
       bracket (2fr):    2/3.7 × 1838 ≈ 994px wide
       sidebar (0.7fr):  0.7/3.7 × 1838 ≈ 348px wide
       video (1fr):      1/3.7 × 1838 ≈ 497px wide
   ====================================================================== */

/* Container inherits display:flex flex-direction:column height:100% from .pit-landscape-custom */
.ppl-container { gap: 10px; }

/* Status row: compressed tiles for landscape (portrait: min-height 120px) */
.ppl-status-row.pit-status-row { flex-shrink: 0; }
.ppl-status-row .frc-tile      { min-height: 80px; }
.ppl-status-row .tile-value    { font-size: 40px; }

/* 3-column body grid */
.ppl-body {
    flex: 1;
    display: grid;
    grid-template-columns: 2fr 0.7fr 1fr;
    gap: 12px;
    min-height: 0;
    overflow: hidden;
}

/* Col 1: bracket */
.ppl-col-bracket {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    overflow: hidden;
}
.ppl-col-bracket .pp-bracket-hdr {
    flex-shrink: 0;
    font-size: 18px;
    margin-top: 0;
    padding: 3px 0;
}
.ppl-bracket-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Compact match card text for landscape (portrait uses 36px) */
.ppl-col-bracket .pp-row-al      { font-size: 22px; }
.ppl-col-bracket .pp-row-al-feed { font-size: 13px; }
.ppl-col-bracket .pp-row-sc      { font-size: 22px; }
.ppl-col-bracket .pp-card-label  { font-size: 11px; height: 13px; line-height: 13px; }
.ppl-col-bracket .pp-card        { gap: 2px; padding: 4px 6px; }

/* Col 2: alliance sidebar */
.ppl-col-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.ppl-col-sidebar > .pp-sidebar {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
/* Compact sidebar text for landscape */
.ppl-col-sidebar .pp-sa-hdr  { font-size: 20px; }
.ppl-col-sidebar .pp-sa-team { font-size: 17px; }

/* Col 3: video — reuses .pit-ls-zone-video for all show/hide toggle rules */
.ppl-col-video {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
/* Override grid-column:1/-1 (only applicable in grid, not here in flex) */
.ppl-video-zone { grid-column: unset; width: 100%; flex-shrink: 0; }
.ppl-no-stream {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    color: var(--c-text-muted, #888);
    font-size: 18px;
    font-style: italic;
}

/* =====================================================================
   LANDSCAPE PLAYOFF LAYOUT (ppl-ls-*)
   Left (A+B): video + 4×2 alliance grid | Right (C+D): status + bracket
   ===================================================================== */

/* Left col spans A+B, right col spans C+D */
.ppl-ls-left {
    grid-column: 1 / 3;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    overflow: hidden;
}
.ppl-ls-right {
    grid-column: 3 / -1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    overflow: hidden;
}

/* Alliance section: heading + 4-col × 2-row card grid */
.ppl-ls-al-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    overflow: hidden;
}
.ppl-ls-al-hdr {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c-text-secondary);
}
.ppl-ls-al-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 1fr;
    gap: 6px;
    min-height: 0;
    overflow: hidden;
}
/* Alliance cards in landscape grid: override flex:1 (flex doesn't apply in grid) */
.ppl-ls-al-grid .pp-sa-card { min-height: 0; }
.ppl-ls-al-grid .pp-sa-hdr  { font-size: 22px; }
.ppl-ls-al-grid .pp-sa-team { font-size: 16px; }

/* Status row */
.ppl-ls-status-row {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}
.ppl-ls-status-row .frc-tile { flex: 1; }

/* Bracket area */
.ppl-ls-bracket {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    overflow: hidden;
}
.ppl-ls-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
}
.ppl-ls-section-hdr {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c-text-secondary);
    border-left: 3px solid rgba(255,255,255,0.12);
    padding-left: 6px;
}
.ppl-ls-section-finals .ppl-ls-section-hdr {
    border-left-color: rgba(232,184,0,0.4);
    color: var(--c-pit-accent);
}
/* Bracket row: 4-col grid */
.ppl-ls-row {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    min-height: 0;
}
/* Finals: 3 equal cards */
.ppl-ls-row-finals {
    grid-template-columns: repeat(3, 1fr);
}
/* Type-10 column spans: UB final and LB semi/final each span 2 cols */
.ppl-ls-row [data-match-key="sf_11"] { grid-column: span 2; }
.ppl-ls-row [data-match-key="sf_12"] { grid-column: span 2; }
.ppl-ls-row [data-match-key="sf_13"] { grid-column: span 2; }
/* Compact card text for landscape */
.ppl-ls-row .pp-card-label { font-size: 14px; }
.ppl-ls-row .pp-row-al     { font-size: 20px; }
.ppl-ls-row .pp-row-sc     { font-size: 20px; }

/* pit-video-mine: always show video in playoff landscape (no live-active toggling here) */
.frc-app-pit:not(.pit-portrait).pit-video-mine .ppl-ls-container .pit-ls-zone-video .pit-ls-video-wrap    { display: block; }
.frc-app-pit:not(.pit-portrait).pit-video-mine .ppl-ls-container .pit-ls-zone-video .pit-ls-video-fallback { display: none; }

/* ---- Portrait pit live video (shown when our match is on field) ---- */
.pit-po-live-video {
    display: none;  /* hidden by default; JS adds pit-live-active to show */
    flex-shrink: 0;
    align-self: stretch;
    margin-top: 12px;
}
.pit-po-live-video.pit-live-active {
    display: block;
}
/* .pit-po-live-video-wrap sizing → see shared rule with .pp-video-wrap above */

/* ======================================================================
   Alliance Selection Pit Display (portrait, 1080×1920 canvas)

   Pixel budget (no video stream present):
     Canvas:        1920px tall, 20px pad top+bottom  → inner 1880px
     .pa-grid-hdr:  40px  (28px font + line-height, flex-shrink:0)
     .pa-body:      1880 - 40 - 12(gap) = 1828px  (flex:1)
     .pa-grid:      1828 - 36(pa-grid-hdr+gap) = fills pa-left height
     4 card rows:   gap 10px × 3 = 30px → each row = (1828 - 36 - 30) / 4 = 440px
     Each pa-card:  440px → pa-card-hdr(30px) + gap(6px) + pa-card-teams(404px)
     Team cells:    404px tall, 3 cells wide → font-size ~90px for team numbers
   ====================================================================== */

.pit-alliance-po {
    display: flex;
    flex-direction: column;
    width:  1080px;
    /* height resolved to 100% by higher-specificity .pit-po-only rule */
    padding: var(--pit-pad);
    gap: 12px;
    box-sizing: border-box;
    overflow: hidden;
}

/* ① Video (full-width 16:9) — sizing via shared rule with .pp-video-wrap */

/* ② Section heading — fixed height, never shrinks */
.pa-grid-hdr {
    flex-shrink: 0;
    height: 40px;
    font-size: 28px;
    font-weight: 700;
    color: var(--c-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 40px;
    overflow: hidden;
}
.pa-waiting {
    font-style: italic;
    color: var(--c-text-muted, #888);
}

/* ── Alliance body: left column + sidebar — fills all remaining height ── */
.pa-body {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow: hidden;
    /* no min-height:0 needed — pit-alliance-po has explicit height from .pit-po-only */
}

/* Left column: heading + 2×4 grid */
.pa-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
    min-width: 0;
}

/* ③ Alliance grid — CSS Grid with explicit 4-row distribution */
.pa-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    overflow: hidden;
}

/* Alliance card — height fully determined by grid row, no flex:1 chain needed */
.pa-card {
    background: var(--c-tile-bg, #1a1a2e);
    border-radius: 8px;
    border: 2px solid var(--c-border, #2a2a4a);
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
    gap: 6px;
    overflow: hidden;
}
/* Highlight the alliance our team is in */
.pa-card-us {
    border-color: var(--c-pit-accent);
    background: rgba(232, 184, 0,0.10);
    box-shadow: 0 0 12px rgba(232, 184, 0,0.25);
}

/* Card heading — fixed height; flex row so EPA floats right */
.pa-card-hdr {
    flex-shrink: 0;
    height: 30px;
    font-size: 20px;
    font-weight: 700;
    color: var(--c-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 30px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
/* Total EPA badge in alliance card header */
.pa-card-epa {
    font-size: 14px;
    font-weight: 600;
    color: var(--c-text-muted, #888);
    letter-spacing: 0.02em;
    text-transform: none;
}
.pa-card-us .pa-card-hdr {
    color: var(--c-pit-accent);
}

/* Team cells — 2×2 grid filling remaining card height.
   Without pick3: captain spans both columns on top row.
   With pick3 (.pa-has-pick3): all four cells equal (2×2). */
.pa-card-teams {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
    overflow: hidden;
    min-height: 0;
}
.pa-card-teams:not(.pa-has-pick3) .pa-role-captain {
    grid-column: 1 / 3;   /* captain spans full width when no alternate pick */
}

/* Individual team cell — fills card-teams height, no content-driven sizing */
.pa-team {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    padding: 4px 2px;
    min-width: 0;
    overflow: hidden;
}
.pa-team-empty {
    color: var(--c-text-muted, #555);
    font-size: 40px;
}
.pa-role-label {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--c-text-muted, #888);
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Team number — large for pit-display readability (3-5m viewing) */
.pa-team-num {
    font-size: 54px;
    font-weight: 800;
    color: var(--c-text-primary, #fff);
    line-height: 1.05;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Our team's cell */
.pa-team-us {
    background: rgba(232, 184, 0,0.18);
}
.pa-team-us .pa-team-num {
    color: var(--c-pit-accent);
}
.pa-team-us .pa-role-label {
    color: var(--c-pit-accent);
}

/* Captain cell slightly distinguished */
.pa-role-captain {
    background: rgba(255,255,255,0.07);
}

/* Available teams sidebar — fixed width, fills body height */
.pa-sidebar {
    flex: 0 0 175px;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 7px;
    overflow: hidden;
}
.pa-sb-hdr {
    flex-shrink: 0;
    padding: 8px 10px 6px;
    font-size: 13px;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-bottom: 1px solid rgba(255,255,255,0.09);
}
.pa-sb-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.pa-sb-team {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}
.pa-sb-team.pa-sb-us {
    background: rgba(232,184,0,0.12);
}
.pa-sb-rank {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    min-width: 26px;
    flex-shrink: 0;
}
.pa-sb-num {
    font-size: 22px;
    font-weight: 800;
    color: #e0e0e0;
    line-height: 1;
}
.pa-sb-us .pa-sb-num  { color: var(--c-pit-accent); }
.pa-sb-us .pa-sb-rank { color: var(--c-pit-accent); }
.pa-sb-empty {
    padding: 14px 10px;
    font-size: 13px;
    color: #555;
    font-style: italic;
}

/* ④ Season strip gets a little less padding than usual */
.pa-season {
    flex-shrink: 0;
}

/* ---- Portrait layout ---- */
.pit-po-top-row {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
    padding-top: 12px;
}
.pit-po-top-col {
    flex: 1;
}

/* Shared 2-column portrait body — used by dashboard, alliance, and playoff portrait sections */
.pit-po-body {
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.pit-po-mid {
    display: flex;
    flex: 1;
    min-height: 0;
    gap: 20px;
    padding-top: 16px;
}
.pit-po-col {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
/* Portrait event ranking tiles */
.pit-po-event-tiles {
    flex-shrink: 0;
}
.pit-po-event-tiles .frc-tiles-2col {
    margin-top: 10px;
}
/* Override square aspect-ratio for RANK/RP AVG in portrait — keep them compact like the RECORD tile */
.pit-po-event-tiles .frc-tiles-2col .frc-tile {
    aspect-ratio: unset;
}
.pit-po-rank-table-wrap {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    margin-top: 12px;
}

/* Portrait match cards */
.pit-po-mc-list {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pit-po-mc {
    background: rgba(255,255,255,0.05);
    border-left: 8px solid transparent;
    border-radius: 8px;
    padding: 12px 16px;
    flex: 1;
}
.pit-po-mc-red  { border-left-color: #c0392b; }
.pit-po-mc-blue { border-left-color: #2471a3; }
.pit-po-mc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.pit-po-mc-label { font-size: 34px; font-weight: 700; color: #fff; }
.pit-po-mc-time  { font-size: 20px; color: var(--c-text-secondary); }
.pit-po-mc-alliances { display: flex; flex-direction: column; gap: 5px; }
.pit-po-mc-al {
    display: flex;
    gap: 5px;
}
.pit-po-mc-al-red  .pit-po-mc-team { background: rgba(192,57,43,0.25); border: 1px solid rgba(192,57,43,0.4); }
.pit-po-mc-al-blue .pit-po-mc-team { background: rgba(36,113,163,0.25); border: 1px solid rgba(36,113,163,0.4); }
.pit-po-mc-team {
    flex: 1;
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    padding: 4px 2px;
    border-radius: 4px;
    color: var(--c-text-secondary);
}
.pit-po-mc-team-empty { background: transparent !important; border-color: transparent !important; }
.pit-po-mc-us { color: #fff; font-weight: 800; }

/* Mini match tiles (matches 6-8) */
.pit-po-mc-mini-row {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.pit-po-mc-mini {
    flex: 1;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border-left: 8px solid transparent;
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    background: rgba(255,255,255,0.05);
}
.pit-po-mc-mini.pit-po-mc-red  { border-left-color: #c0392b; }
.pit-po-mc-mini.pit-po-mc-blue { border-left-color: #2471a3; }
.pit-po-mc.pit-po-mc-ghost,
.pit-po-mc-mini.pit-po-mc-ghost {
    background: rgba(255,255,255,0.03);
    border-left-color: transparent;
    pointer-events: none;
}
.frc-rank-table tr.row-empty td { opacity: 0; }

/* Portrait season strip */
.pit-po-season {
    flex-shrink: 0;
    padding-top: 14px;
}
.pit-po-season-tiles {
    display: grid;
    /* col 1-2: big 2×2 tiles; col 3-5: three 1×1 stacked pairs */
    grid-template-columns: 2fr 2fr 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
}
/* Explicit placement */
.pit-po-s-record    { grid-column: 1; grid-row: 1 / span 2; }
.pit-po-s-world     { grid-column: 2; grid-row: 1 / span 2; }
.pit-po-s-country   { grid-column: 3; grid-row: 1; }
.pit-po-s-district  { grid-column: 4; grid-row: 1; }
.pit-po-s-epa-total { grid-column: 5; grid-row: 1; }
.pit-po-s-auto      { grid-column: 3; grid-row: 2; }
.pit-po-s-teleop    { grid-column: 4; grid-row: 2; }
.pit-po-s-endgame   { grid-column: 5; grid-row: 2; }

/* Season tile font sizes */
.pit-po-season-tiles .tile-label       { font-size: 14px; }
.pit-po-season-tiles .tile-value       { font-size: 40px; }
.pit-po-season-tiles .tile-value-record { font-size: 30px; }
/* Bigger values for the 2×2 tiles */
.pit-po-s-record .tile-value,
.pit-po-s-world  .tile-value  { font-size: 56px; }
.pit-po-s-record .tile-label,
.pit-po-s-world  .tile-label  { font-size: 18px; }

/* =====================================================================
   LANDSCAPE ALLIANCE SELECTION — pa-ls-* classes
   ===================================================================== */

/* Alliance landscape: col-a spans A+B; cards container spans C+D */
.pit-alliance-ls .pit-ls-col.pit-ls-col-a {
    grid-column: 1 / 3;   /* spans cols A+B */
}
/* Cards container spans cols C+D; internal pa-grid 1fr 1fr gives equal C and D */
.pa-ls-col-cards {
    grid-column: 3 / -1;  /* spans cols C+D */
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    overflow: hidden;
}
.pa-ls-col-cards .pa-ls-picks-hdr {
    flex-shrink: 0;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--c-text-secondary);
}
.pa-ls-col-cards .pa-grid {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.pa-ls-col-cards .pa-card-hdr { font-size: 18px; height: 24px; line-height: 24px; }
.pa-ls-col-cards .pa-team-num { font-size: 44px; }

/* video-mine in alliance view = show always (no on-field concept during selection).
   Overrides the existing "hide when not pit-ls-live-active" rule with higher specificity. */
.frc-app-pit:not(.pit-portrait).pit-video-mine .pit-alliance-ls .pit-ls-zone-video .pit-ls-video-wrap { display: block; }
.frc-app-pit:not(.pit-portrait).pit-video-mine .pit-alliance-ls .pit-ls-zone-video .pit-ls-video-fallback { display: none; }


/* Event Summary table — fills available height, rows distribute equally */
.pa-ls-event-summary-wrap {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.pa-ls-summary-table {
    width: 100%;
    height: 100%;
    border-collapse: collapse;
    font-size: 18px;
    table-layout: fixed;
}
.pa-ls-summary-table thead th {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-text-secondary);
    padding: 4px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    text-align: left;
    background: var(--c-gray-900, #111);
}
.pa-ls-summary-table tbody td {
    padding: 2px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
.pa-ls-match-label {
    font-weight: 700;
    padding-left: 12px !important;
    border-left: 4px solid transparent;
}
.pa-ls-match-label.match-result-win  { border-left-color: #4ade80; }
.pa-ls-match-label.match-result-loss { border-left-color: #f87171; }
.pa-ls-match-label.match-result-tie  { border-left-color: #9ca3af; }
.pa-ls-team     { padding: 0 5px; font-size: 16px; }
.pa-ls-team-us  { color: var(--c-pit-accent); font-weight: 800; }
.pa-ls-scores   { text-align: center; font-size: 17px; white-space: nowrap; }
.pa-ls-score-red    { color: #ef9a9a; }
.pa-ls-score-blue   { color: #90caf9; }
.pa-ls-score-winner { font-weight: 800; color: #fff; }
.pa-ls-score-sep    { color: var(--c-text-muted, #888); padding: 0 3px; }
.pa-ls-result-win   { color: #4ade80; font-weight: 700; }
.pa-ls-result-loss  { color: #f87171; font-weight: 700; }
.pa-ls-result-tie   { color: #9ca3af; font-weight: 700; }
.pa-ls-summary-empty {
    padding: 20px;
    color: var(--c-text-muted, #888);
    font-size: 18px;
    font-style: italic;
    text-align: center;
}

/* ---- Pit landscape: 4 equal columns (A | B | C | D) ---- */
.pit-ls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-areas: "col-a col-b col-c col-d";
    gap: 20px;
    flex: 1;
    min-height: 0;
    padding-top: 12px;
}
/* Dashboard: col-a spans A+B (video + rankings subgrid); col-b=C (leaderboard); col-c=D (upcoming) */
.pit-dashboard-ls .pit-ls-grid {
    grid-template-areas: "col-a col-a col-b col-c";
}
.pit-ls-col-a { grid-area: col-a; }
.pit-ls-col-b { grid-area: col-b; }
.pit-ls-col-c { grid-area: col-c; }
/* Regular dashboard 3-column grid */
.frc-db-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 0.7fr;
    grid-template-areas: "rankings leaderboard matches";
    gap: 20px;
    padding-top: 12px;
}
.frc-db-grid.has-video {
    grid-template-areas:
        "video    video       matches"
        "rankings leaderboard matches";
}
.frc-db-video    { grid-area: video; }
.frc-db-rankings { grid-area: rankings; }
.frc-db-leader   { grid-area: leaderboard; }
.frc-db-matches  { grid-area: matches; }
.frc-db-grid .pit-ls-col {
    overflow: visible;
    min-height: unset;
}
/* Prevent match cards from stretching in unconstrained regular dashboard */
.frc-db-grid .pit-po-mc { flex: none; }

/* Video embed — responsive 16:9 */
.frc-db-video-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}
.frc-db-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Compact match list rows for regular dashboard */
.frc-db-match-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.frc-db-match-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.05);
    border-left: 5px solid transparent;
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 0.9rem;
}
.frc-db-match-row.frc-db-match-red  { border-left-color: #c0392b; }
.frc-db-match-row.frc-db-match-blue { border-left-color: #2471a3; }
.frc-db-match-label {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    min-width: 3.5rem;
}
.frc-db-match-teams {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    flex-wrap: wrap;
}
.frc-db-match-team {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--c-text-secondary);
}
.frc-db-mt-red  { background: rgba(192,57,43,0.25); }
.frc-db-mt-blue { background: rgba(36,113,163,0.25); }
.frc-db-mt-us   { color: #fff; font-weight: 800; }
.frc-db-match-vs {
    font-size: 0.75rem;
    color: var(--c-text-tertiary);
    padding: 0 2px;
}
.frc-db-match-time {
    font-size: 0.8rem;
    color: var(--c-text-tertiary);
    white-space: nowrap;
    margin-left: auto;
}

@media (max-width: 900px) {
    .frc-db-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "rankings leaderboard" "matches matches";
    }
    .frc-db-grid.has-video {
        grid-template-areas:
            "video    video"
            "rankings leaderboard"
            "matches  matches";
    }
}
@media (max-width: 600px) {
    .frc-db-grid,
    .frc-db-grid.has-video {
        grid-template-columns: 1fr;
        grid-template-areas: "rankings" "leaderboard" "matches";
    }
    .frc-db-grid.has-video {
        grid-template-areas: "video" "rankings" "leaderboard" "matches";
    }
}
.pit-ls-col {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}
/* ── Shared pit section heading — portrait cols, landscape cols, season strip ── */
.pit-po-col-hdr,
.pit-po-season-hdr,
.pit-ls-section-hdr {
    flex-shrink: 0;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--c-gray-300);
}
.pit-po-col-hdr,
.pit-po-season-hdr   { letter-spacing: 0.08em; margin-bottom: 10px; }
.pit-ls-section-hdr  { letter-spacing: 0.07em; margin-top: 14px; margin-bottom: 8px; }
/* First section-hdr in a col has no top margin */
.pit-ls-col .pit-ls-section-hdr:first-child { margin-top: 0; }
/* Floor for standalone tile labels (RECORD etc.) */
.pit-ls-col .tile-label {
    font-size: 28px;
}
/* Boost RECORD tile values to match 2col tiles */
.pit-ls-col [data-frc="record"] .tile-value,
.pit-ls-col [data-frc="season-record"] .tile-value {
    font-size: 50px;
}
/* Match RECORD tiles height to the NOW QUEUING tile height */
.pit-ls-col [data-frc="record"],
.pit-ls-col [data-frc="season-record"] {
    min-height: 160px;
}
.pit-ls-rank-wrap {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
/* Leaderboard table font sizing for landscape — more rows, tighter */
.pit-ls-rank-wrap .frc-rank-table {
    font-size: 18px;
}
.pit-ls-rank-wrap .frc-rank-table th,
.pit-ls-rank-wrap .frc-rank-table td {
    padding: 4px 6px;
}
/* Match cards col needs to flex-fill */
.pit-ls-col .pit-po-mc-list {
    flex: 1;
    gap: 6px;
}
/* Landscape-scoped match card size reductions (portrait sizes unchanged) */
.pit-ls-col .pit-po-mc {
    padding: 7px 12px;
}
.pit-ls-col .pit-po-mc-header {
    margin-bottom: 4px;
}
.pit-ls-col .pit-po-mc-al {
    gap: 3px;
}
.pit-ls-col .pit-po-mc-alliances {
    gap: 3px;
}
.pit-ls-col .pit-po-mc-team {
    font-size: 24px;
    padding: 3px 8px;
}
.pit-ls-col .pit-po-mc-label {
    font-size: 26px;
}
.pit-ls-col .pit-po-mc-time {
    font-size: 16px;
}
/* Spacing between stacked tile grids in landscape cols — matches portrait's 10px gap */
.pit-ls-col .frc-tiles-2col,
.pit-ls-col .frc-tiles-3col {
    margin-top: 10px;
    gap: 10px;
}
/* Override square aspect-ratio for RANK/RP AVG in landscape — keep them compact like the RECORD tile */
.pit-ls-col .frc-tiles-2col .frc-tile {
    aspect-ratio: unset;
}
/* Season col tiles: same sizing as existing pit sidebar tiles */
.pit-ls-col .frc-tiles-2col .tile-label { font-size: 28px; }
.pit-ls-col .frc-tiles-2col .tile-value { font-size: 50px; }
.pit-ls-col .frc-tiles-3col .tile-label { font-size: 24px; }
.pit-ls-col .frc-tiles-3col .tile-value { font-size: 40px; }

/* =====================================================================
   LANDSCAPE PIT VIDEO — zone-video (always in col A)
   ===================================================================== */

/* Video zone: spans both sub-columns of col-a */
.pit-ls-zone-video {
    grid-column: 1 / -1;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
}

/* 16:9 responsive video embed */
.pit-ls-video-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}
.pit-ls-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Fallback: hidden by default; shown when no stream or video suppressed */
.pit-ls-video-fallback {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #555;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.05em;
}
/* No stream URL — wrap not in DOM, so fallback is always visible */
.pit-ls-zone-video:not(.has-stream) .pit-ls-video-fallback { display: flex; }
/* pit-video-off: collapse wrap, show fallback */
.frc-app-pit.pit-video-off .pit-ls-zone-video .pit-ls-video-wrap { display: none; }
.frc-app-pit.pit-video-off .pit-ls-zone-video .pit-ls-video-fallback { display: flex; }
/* pit-video-mine: hide wrap when not on field (JS adds pit-ls-live-active when on field) */
.frc-app-pit:not(.pit-portrait).pit-video-mine .pit-ls-zone-video:not(.pit-ls-live-active) .pit-ls-video-wrap { display: none; }
.frc-app-pit:not(.pit-portrait).pit-video-mine .pit-ls-zone-video:not(.pit-ls-live-active) .pit-ls-video-fallback { display: flex; }

/* =====================================================================
   LANDSCAPE PIT RANKING TILES — event rankings (left) + season rankings (right) in col A
   ===================================================================== */

/* Col A: 2-column internal grid — video spans both, ranking zones sit side by side below.
   Uses double-class specificity (0,2,0) to override .pit-ls-col display:flex (0,1,0). */
.pit-ls-col.pit-ls-col-a {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    gap: 12px 20px;
}

/* Both ranking zones: flex column, fill their grid cell */
.pit-ls-zone-ev-rank,
.pit-ls-zone-season-rank {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    overflow: hidden;
}
/* 2-tile row within each ranking zone */
.pit-ls-rankings-row {
    display: flex;
    gap: 10px;
    flex: 1;
}
.pit-ls-rankings-row .frc-tile {
    flex: 1;
    aspect-ratio: unset;
    min-height: 0;
}
/* Large single tile (Season Rank / Season Record) fills remaining space above the row */
.pit-ls-zone-ev-rank .frc-tile:not(.pit-ls-rankings-row .frc-tile),
.pit-ls-zone-season-rank .frc-tile:not(.pit-ls-rankings-row .frc-tile) {
    flex: 1;
    min-height: 0;
}
/* Override standalone RECORD tile min-height — constrained by grid cell here */
.pit-ls-zone-ev-rank [data-frc="rank-world"],
.pit-ls-zone-season-rank [data-frc="season-record"] { min-height: 0; }
/* Rankings-zone tile text sizing */
.pit-ls-zone-ev-rank .tile-label,
.pit-ls-zone-season-rank .tile-label { font-size: 18px; }
.pit-ls-zone-ev-rank .tile-value,
.pit-ls-zone-season-rank .tile-value { font-size: 42px; font-weight: 800; }
.pit-ls-zone-season-rank [data-frc="season-record"] .tile-value { font-size: 36px; }

/* =====================================================================
   LANDSCAPE PIT COL C — Next Match, Status Row, Upcoming Matches
   ===================================================================== */

/* zone-next-match: boosted value size for 5m readability */
.pit-ls-col-c [data-frc-tile="next-match"] {
    flex-shrink: 0;
    min-height: 185px;
}
.pit-ls-col-c [data-frc-tile="next-match"] .tile-value { font-size: 72px; }
.pit-ls-col-c [data-frc-tile="next-match"] .tile-label { font-size: 22px; }
.pit-ls-col-c [data-frc-tile="next-match"] .tile-sub   { font-size: 20px; }

/* zone-status-row: On Field + Queuing side by side */
.pit-status-c-row {
    display: flex;
    flex-shrink: 0;
    gap: 10px;
    margin-top: 10px;
}
.pit-status-c-row .frc-tile {
    flex: 1;
    min-height: 120px;
    padding: 12px 14px;
}
.pit-status-c-row .tile-label { font-size: 18px; }
.pit-status-c-row .tile-value { font-size: 44px; font-weight: 800; }

/* zone-upcoming: tighter match cards for 20%-wide column */
.pit-ls-col-c .pit-ls-section-hdr  { margin-top: 10px; }
.pit-ls-col-c .pit-po-mc           { padding: 6px 10px; }
.pit-ls-col-c .pit-po-mc-team      { font-size: 20px; padding: 2px 6px; }
.pit-ls-col-c .pit-po-mc-label     { font-size: 22px; }
.pit-ls-col-c .pit-po-mc-time      { font-size: 14px; }
.pit-ls-col-c .pit-po-mc-al        { gap: 3px; }
.pit-ls-col-c .pit-po-mc-alliances { gap: 3px; }
.pit-ls-col-c .pit-po-mc-list      { flex: 1; min-height: 0; gap: 6px; }

/* ── Portrait pit status — inherits from .pit-status-row ── */
.pit-status-po { gap: 20px; padding-top: 12px; }  /* wider gap + top offset */

/* ── Regular dashboard overrides: smaller tile sizes for desktop screen ── */
.frc-db-matches .pit-status-ls { gap: 8px; margin-bottom: 8px; }
.frc-db-matches .pit-status-ls > .frc-tile      { min-height: 100px; padding: 10px 12px; }
.frc-db-matches .pit-status-ls-bottom .frc-tile { min-height: 70px;  padding: 10px 12px; }
.frc-db-matches .pit-status-ls .tile-label { font-size: 0.65rem; }
.frc-db-matches .pit-status-ls .tile-value { font-size: 2.4rem; }
.frc-db-matches .pit-status-ls .tile-sub   { font-size: 0.72rem; }
.frc-db-matches .pit-status-ls-bottom { gap: 8px; }

/* ── Landscape pit status — inherits from .pit-status-row; stacked layout ── */
.pit-status-ls {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}
.pit-status-ls > .frc-tile { min-height: 140px; }   /* top tile taller than base 120px */
.pit-status-ls-bottom { display: flex; gap: 10px; }
.pit-status-ls-bottom .frc-tile { min-height: 110px; } /* bottom tiles shorter than base */

/* Content fills remaining height above the footer */
.frc-app-pit .frc-content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding-top: 0;   /* override the 0.5rem default — pit display needs all vertical space */
}

/* Dashboard grid fills the full content area; header row auto, content row fills rest */
.frc-app-pit .frc-dashboard-grid {
    height: 100%;
    grid-template-rows: auto 1fr;
}

/* Sponsor ticker tape */
.pit-ticker-wrap {
    display: flex;
    align-items: center;
    background: #1e1e1e;
    margin-left: calc(var(--pit-pad) * -1);
    margin-right: calc(var(--pit-pad) * -1);
    border-top: 1px solid #333;
    border-bottom: 2px solid #666;
    white-space: nowrap;
}
.pit-ticker-label {
    flex-shrink: 0;
    padding: 0.4rem 1.2rem;
    font-size: 1.65rem;
    font-weight: 700;
    color: #fff;
    border-right: 1px solid #333;
}
.pit-ticker-scroll {
    flex: 1;
    overflow: hidden;
    padding: 0.4rem 0;
}
.pit-ticker-track {
    display: inline-flex;
    animation: pit-ticker-scroll 120s linear infinite; /* JS overrides with exact duration */
}
.pit-ticker-item {
    display: inline-block;
    padding-right: 6rem;
    font-size: 1.65rem;
    color: #ccc;
    letter-spacing: 0.03em;
}
@keyframes pit-ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Footer bar — full bleed black strip at bottom of pit display */
.pit-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background-color: #000;
    padding: 0.45rem var(--pit-pad);
    /* Bleed past the app's --pit-pad padding on left, right, and bottom */
    margin-left: calc(var(--pit-pad) * -1);
    margin-right: calc(var(--pit-pad) * -1);
    margin-bottom: calc(var(--pit-pad) * -1);
}

/* Left col — watermark only */
.pit-footer-left {
    display: flex;
    align-items: center;
}
/* Watermark — POWERED BY + logo */
.pit-watermark {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
}
.pit-watermark-label {
    font-size: 0.45rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-text-tertiary);
    line-height: 1;
}
.pit-watermark-logo {
    height: 44px;
    width: auto;
}
/* QR group: equal-width labels flank the centred QR code */
.pit-qr-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.pit-qr {
    height: 68px;
    width: auto;
    flex-shrink: 0;
}
.pit-qr-label {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1;
    min-width: 7ch;
}
.pit-qr-label-left  { text-align: right; }
.pit-qr-label-right { text-align: left; }

/* Right col — buttons, pushed to the right edge */
.pit-footer-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}
.pit-exit-link {
    opacity: 0.45;
    color: var(--c-text-tertiary);
    font-size: 1rem;
    text-decoration: none;
    line-height: 1;
}
.pit-exit-link:hover { opacity: 0.75; }

/* Countdown — right side of pit footer */
.pit-countdown {
    opacity: 0.45;
    background: none;
    border: none;
    color: var(--c-text-tertiary);
    font-size: 1.4rem;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    padding: 0;
    min-width: 3.5ch;
    text-align: center;
    line-height: 1;
}
.pit-countdown:hover { opacity: 0.75; }

/* Icon buttons (settings gear, hamburger) in pit footer */
.pit-icon-btn {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--c-text-tertiary);
    font-size: 1.1rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0.3rem 0.7rem;
    opacity: 0.55;
    line-height: 1;
    transition: opacity 0.15s, color 0.15s, border-color 0.15s, background 0.15s;
}
.pit-icon-btn:hover {
    opacity: 1;
    color: #fff;
    border-color: var(--c-accent);
    background: var(--c-accent);
}
.pit-icon-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Hamburger menu overlay ──────────────────────────────────────────────── */
.pit-hmenu-overlay {
    position: absolute;
    inset: 0;
    z-index: 1020;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}
.pit-hmenu-overlay[hidden] { display: none; }

.pit-hmenu-panel {
    background: var(--c-gray-800);
    border-left: 1px solid var(--c-gray-600);
    border-top: 1px solid var(--c-gray-600);
    border-radius: 8px 0 0 0;
    min-width: 280px;
    max-height: 80vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1rem 1.5rem;
    gap: 0.25rem;
}

.pit-hmenu-close {
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--c-text-tertiary);
    font-size: 1.1rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}
.pit-hmenu-close:hover { opacity: 1; }

.pit-hmenu-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pit-hmenu-item {
    display: block;
    padding: 0.9rem 1rem;
    border-radius: 6px;
    color: var(--c-text-primary);
    text-decoration: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    width: 100%;
    transition: background 0.12s;
}
.pit-hmenu-item:hover { background: var(--c-gray-700); }

/* ── Settings panel overlay ──────────────────────────────────────────────── */
.pit-settings-overlay {
    position: absolute;
    inset: 0;
    z-index: 1020;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}
.pit-settings-overlay[hidden] { display: none; }

.pit-settings-panel {
    background: var(--c-gray-800);
    border-left: 1px solid var(--c-gray-600);
    border-top: 1px solid var(--c-gray-600);
    border-radius: 8px 0 0 0;
    min-width: 280px;
    max-height: 80vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.25rem 1.5rem;
}

.pit-settings-close {
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--c-text-tertiary);
    font-size: 1.1rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    margin-bottom: 0.25rem;
    opacity: 0.6;
}
.pit-settings-close:hover { opacity: 1; }

.pit-settings-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--c-text-primary);
    margin: 0 0 1.25rem;
}

.pit-settings-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.pit-settings-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--c-text-tertiary);
}

.pit-settings-toggle {
    display: flex;
    gap: 0.3rem;
}

.pit-stoggle-btn {
    flex: 1;
    padding: 0.55rem 0.4rem;
    border-radius: 5px;
    border: 2px solid var(--c-gray-600);
    background: var(--c-gray-700);
    color: var(--c-text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.pit-stoggle-btn:hover { border-color: var(--c-gray-400); }
.pit-stoggle-btn.pit-stoggle-active {
    border-color: var(--c-accent);
    background: var(--c-gray-600);
    color: var(--c-text-primary);
}

/* ── Stream picker ───────────────────────────────────────────────────────── */
.frc-stream-picker {
    width: 100%;
    background: var(--c-gray-900);
    color: #fff;
    border: 1px solid var(--c-gray-500);
    border-radius: 4px;
    padding: 0.4rem;
    font-size: 0.85rem;
    font-family: inherit;
    margin-bottom: 0.5rem;
}
.frc-stream-custom-row {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}
.frc-stream-custom-input {
    flex: 1;
    background: var(--c-gray-900);
    color: #fff;
    border: 1px solid var(--c-gray-500);
    border-radius: 4px;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    font-family: inherit;
}
.frc-stream-custom-input::placeholder { color: var(--c-text-tertiary); }
.frc-stream-custom-save {
    background: var(--c-gray-600);
    border: 1px solid var(--c-gray-500);
    border-radius: 4px;
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    white-space: nowrap;
}
.frc-stream-custom-save:hover { background: var(--c-gray-500); }
.frc-stream-saved { background: #22c55e !important; border-color: #22c55e !important; }
.frc-stream-error { background: #ef4444 !important; border-color: #ef4444 !important; }
.frc-stream-custom-save-nav { font-size: 0.7rem; padding: 0.2rem 0.5rem; }
.frc-stream-custom-clear {
    background: none;
    border: none;
    color: var(--c-text-tertiary);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
}
.frc-stream-custom-clear:hover { color: var(--c-text-primary); }
/* Nav dropdown variant */
.frc-stream-picker-nav { font-size: 0.75rem; padding: 0.25rem; margin-top: 0.3rem; }
.frc-stream-custom-nav { font-size: 0.75rem; padding: 0.25rem; margin-top: 0.3rem; width: 100%; }
.frc-stream-settings { flex-direction: column; align-items: flex-start; padding: 0.4rem 0.75rem; }
.frc-stream-settings-label { font-size: 0.85rem; margin-bottom: 0.2rem; }
.frc-nav-settings-divider { height: 1px; background: var(--c-gray-600); margin: 0.25rem 0; }

/* ── Video mode: CSS class on .frc-app-pit controls visibility ───────────── */
/* pit-video-off: hide everything.
   Main pit: target outer .pit-po-live-video so inner wrap + JS class are both bypassed.
   Alliance/Playoff: target their video wrap divs directly. */
.frc-app-pit.pit-video-off .pit-po-live-video,
.frc-app-pit.pit-video-off .pp-video-wrap,
.frc-app-pit.pit-video-off .pa-video-wrap { display: none !important; }

/* pit-video-always: force the main pit video container visible regardless of pit-live-active.
   Alliance/Playoff video wraps are already visible by default when a stream URL exists. */
.frc-app-pit.pit-video-always .pit-po-live-video { display: block !important; }

/* pit-video-mine: hide alliance/playoff video (main pit is mine-only by default JS logic) */
.frc-app-pit.pit-video-mine .pp-video-wrap,
.frc-app-pit.pit-video-mine .pa-video-wrap { display: none !important; }

/* =====================================================================
   MOBILE VIEW  (?page=mobile)  — vertical, phone-first
   ===================================================================== */
body.frc-body-mobile {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 100vh;
}

.frc-app-mobile {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 1rem 1rem 5rem; /* bottom pad clears fixed footer */
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ── Header ── */
.mob-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem 0 0;
}
.mob-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mob-logo {
    height: 28px;
    width: auto;
}
.mob-header-identity {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.mob-team-number { font-size: 1.6rem; font-weight: 800; color: var(--c-text-primary); line-height: 1; }
.mob-team-divider { color: var(--c-text-tertiary); font-weight: 300; font-size: 1.6rem; }
.mob-team-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--c-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mob-event-name {
    font-size: 0.78rem;
    text-align: center;
    font-weight: 600;
    color: var(--c-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mob-header-rule {
    height: 1px;
    background: var(--c-gray-700);
    margin: 0.4rem 0;
}

/* ── Hamburger button ── */
.mob-hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-radius: 6px;
}
.mob-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--c-text-secondary);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}
.mob-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mob-hamburger.open span:nth-child(2) { opacity: 0; }
.mob-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hamburger menu ── */
.mob-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 500;
    display: none;
}
.mob-menu-backdrop:not([hidden]) { display: block; }
.mob-menu {
    position: absolute;
    top: 0;
    right: 0;
    width: 220px;
    background: var(--c-gray-800);
    border-left: 1px solid var(--c-gray-700);
    border-bottom: 1px solid var(--c-gray-700);
    border-radius: 0 0 0 12px;
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
    box-shadow: -4px 4px 16px rgba(0,0,0,0.4);
}
.mob-menu-item {
    display: block;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--c-text-secondary);
    text-decoration: none;
    background: none;
    border: none;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    width: 100%;
}
.mob-menu-item:hover { background: var(--c-gray-700); color: var(--c-text-primary); }
.mob-menu-item.active { color: var(--c-amber); }
.mob-menu-divider {
    height: 1px;
    background: var(--c-gray-700);
    margin: 0.4rem 0;
}
.mob-menu-bug { color: var(--c-text-tertiary); }

/* ── Webcast button ── */
.mob-webcast-btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: var(--c-frcblue);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
}
.mob-webcast-btn:hover { opacity: 0.88; }

/* ── Section headings ── */
.mob-section-heading {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--c-text-tertiary);
    margin-top: 0.25rem;
}

/* ── 2-col field-status / stat tiles ── */
/* Override desktop aspect-ratio; use a fixed min-height instead */
.frc-app-mobile .frc-tiles-2col { gap: 0.6rem; }
.frc-app-mobile .frc-tiles-2col .frc-tile,
.mob-field-tile {
    aspect-ratio: unset;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.15rem;
    border-radius: 8px;
    padding: 0.5rem;
}
.frc-app-mobile .frc-tiles-2col .tile-label,
.mob-field-tile .tile-label { font-size: 0.62rem; }
.frc-app-mobile .frc-tiles-2col .tile-value,
.mob-field-tile .tile-value { font-size: 1.9rem; }

/* ── Full-width stat tiles (RECORD, SEASON RECORD) ── */
.mob-stat-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 70px;
    gap: 0.1rem;
    border-radius: 8px;
    padding: 0.5rem 1rem;
}
.mob-stat-tile .tile-label  { font-size: 0.65rem; }
.mob-stat-tile .tile-value  { font-size: 1.9rem; }

/* ── Next match tile ── */
.mob-next-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    gap: 0.2rem;
    border-radius: 8px;
    padding: 1rem;
}
.mob-next-tile .tile-label { font-size: 0.65rem; font-weight: 600; }
.mob-next-num {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1;
}
.mob-next-meta {
    font-size: 0.82rem;
    opacity: 0.85;
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: center;
}
.mob-next-sep { opacity: 0.5; }

/* ── Footer ── */
.mob-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: var(--c-gray-900);
    border-top: 1px solid var(--c-gray-700);
    font-size: 0.72rem;
    color: var(--c-text-tertiary);
}
.mob-footer-updated { color: var(--c-text-tertiary); }
.mob-footer-sep     { opacity: 0.4; }
.mob-countdown-btn {
    background: none;
    border: none;
    color: inherit;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
}
.mob-footer-link { color: var(--c-text-tertiary); text-decoration: none; }
.mob-footer-link:hover { color: var(--c-text-secondary); }

/* ═══════════════════════════════════════════════════════════════════════════
   Mobile Schedule
   ═══════════════════════════════════════════════════════════════════════════ */

.mob-sched-filters {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem 0 0.5rem;
}
.mob-sched-filter-toggle {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 0.5rem;
    background: var(--c-gray-800);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--c-text-secondary);
    cursor: pointer;
}
.mob-sched-filter-toggle input[type="checkbox"] {
    accent-color: var(--c-accent);
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
}

.mob-sched-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--c-text-tertiary);
    font-size: 0.9rem;
}
.mob-sched-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 0.75rem 5rem;
}
.mob-sched-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--c-gray-800);
    border: 1px solid var(--c-gray-700);
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    border-left: 3px solid var(--c-gray-600);
}
.mob-sched-win  { border-left-color: #4ade80; }
.mob-sched-loss { border-left-color: #f87171; }
.mob-sched-tie  { border-left-color: #facc15; }

.mob-sched-card-left {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 52px;
}
.mob-sched-label {
    font-size: 1rem;
    font-weight: 800;
    color: var(--c-text-primary);
}
.mob-sched-time {
    font-size: 0.68rem;
    color: var(--c-text-tertiary);
    white-space: nowrap;
}
.mob-sched-card-alliances {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}
.mob-sched-alliance {
    display: flex;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    gap: 0;
}
.mob-sched-team {
    flex: 1;
    text-align: center;
    min-width: 0;
}
.mob-sched-team-us { font-weight: 800; color: #fff; }
.mob-sched-team-empty { pointer-events: none; }
.mob-sched-red  { background: rgba(239, 68, 68, 0.18); color: var(--c-red-light); }
.mob-sched-blue { background: rgba(59, 130, 246, 0.18); color: #93c5fd; }
.mob-sched-card-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    width: 5rem;
    flex-shrink: 0;
}
.mob-sched-score-red  { color: var(--c-red-light); }
.mob-sched-score-blue { color: #93c5fd; }
.mob-sched-score-win  { color: #fff; }
.mob-sched-score-sep  { color: var(--c-text-tertiary); font-weight: 400; }
.mob-sched-score-pred { color: var(--c-text-tertiary); font-size: 0.8rem; }
.mob-sched-score-tbd  { color: var(--c-text-tertiary); font-weight: 400; }

/* ═══════════════════════════════════════════════════════════════════════════
   Mobile Scenarios
   ═══════════════════════════════════════════════════════════════════════════ */

/* 3-column grid */
.mob-sc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.35rem;
    align-items: start;
}
.mob-sc-col { min-width: 0; }
.mob-sc-col-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--c-text-tertiary);
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--c-gray-700);
    margin-bottom: 0.25rem;
}
.mob-sc-action-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.mob-sc-action-btn {
    flex: 1;
    background: var(--c-gray-700);
    border: none;
    border-radius: 6px;
    color: var(--c-text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.55rem 0;
    cursor: pointer;
    transition: background 0.15s;
}
.mob-sc-action-btn:hover { background: var(--c-gray-600); }
.mob-sc-action-btn-reset { color: var(--c-text-secondary); }

/* Match list in center column */
.mob-sc-match-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.mob-sc-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
}
.mob-sc-card-edited .mob-sc-tiles { outline: 1px solid var(--c-amber); border-radius: 4px; }
.mob-sc-card-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--c-text-tertiary);
    text-align: center;
}
.mob-sc-tiles {
    display: flex;
    gap: 0.15rem;
}
/* RP tiles */
.mob-sc-tile {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.1rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s, filter 0.2s;
}
.mob-sc-tile-red  { background: rgba(239, 68, 68, 0.25); }
.mob-sc-tile-blue { background: rgba(59, 130, 246, 0.25); }

/* Winner brightness tiers */
.mob-sc-tile-win.mob-sc-prob-strong { opacity: 1;    filter: brightness(1.25); }
.mob-sc-tile-win.mob-sc-prob-med    { opacity: 0.9;  filter: brightness(1.1); }
.mob-sc-tile-win.mob-sc-prob-low    { opacity: 0.75; filter: brightness(1); }
.mob-sc-tile-win.mob-sc-prob-even   { opacity: 0.65; filter: brightness(0.95); }

/* Tie: both tiles same muted brightness */
.mob-sc-tile-tie { opacity: 0.7; }

/* Loser: very dim */
.mob-sc-tile-dim { opacity: 0.3; filter: brightness(0.7); }

.mob-sc-tile-rp {
    font-size: 0.78rem;
    font-weight: 800;
    color: #fff;
}

/* Rank tables in left/right columns */
.mob-sc-rank-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.65rem;
}
.mob-sc-rank-table th {
    padding: 0.15rem 0.2rem;
    text-align: left;
    color: var(--c-text-tertiary);
    font-size: 0.58rem;
    border-bottom: 1px solid var(--c-gray-700);
}
.mob-sc-rank-table td { padding: 0.2rem 0.2rem; }
.mob-sc-rank-table .sc-rank-row-us { background: rgba(250,204,21,0.07); }
.mob-sc-rank-table .sc-us-star { font-size: 0.55rem; margin-right: 0.1rem; color: #facc15; }

/* Editor modal */
.mob-sc-editor-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: flex-end;
    z-index: 1000;
}
.mob-sc-editor-backdrop:not([hidden]) { display: flex; }
.mob-sc-editor {
    width: 100%;
    background: var(--c-gray-800);
    border-top: 1px solid var(--c-gray-600);
    border-radius: 16px 16px 0 0;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.mob-sc-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mob-sc-editor-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--c-text-primary);
}
.mob-sc-editor-close {
    background: none;
    border: none;
    color: var(--c-text-tertiary);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.mob-sc-editor-teams {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}
.mob-sc-editor-red  { color: var(--c-red-light); font-weight: 600; }
.mob-sc-editor-blue { color: #93c5fd; font-weight: 600; }
.mob-sc-editor-vs   { color: var(--c-text-tertiary); font-size: 0.75rem; }
.mob-sc-editor-outcome {
    display: flex;
    gap: 0.5rem;
}
.mob-sc-outcome-btn {
    flex: 1;
    padding: 0.6rem 0.25rem;
    border-radius: 6px;
    border: 1px solid var(--c-gray-600);
    background: var(--c-gray-700);
    color: var(--c-text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}
.mob-sc-outcome-red.active  { background: rgba(239,68,68,0.4);   color: var(--c-red-light); border-color: #ef4444; }
.mob-sc-outcome-tie.active  { background: rgba(250,204,21,0.3);  color: #fde68a; border-color: #facc15; }
.mob-sc-outcome-blue.active { background: rgba(59,130,246,0.4);  color: #93c5fd; border-color: #3b82f6; }
.mob-sc-editor-bonus { display: flex; flex-direction: column; gap: 0.5rem; }
.mob-sc-bonus-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.mob-sc-bonus-label { flex: 1; font-size: 0.82rem; font-weight: 600; }
.mob-sc-bonus-red   { color: var(--c-red-light); }
.mob-sc-bonus-blue  { color: #93c5fd; }
.mob-sc-step-btn {
    width: 36px;
    height: 36px;
    background: var(--c-gray-700);
    border: 1px solid var(--c-gray-600);
    border-radius: 6px;
    color: var(--c-text-primary);
    font-size: 1.1rem;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mob-sc-step-val {
    min-width: 24px;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--c-text-primary);
}
.mob-sc-editor-save {
    width: 100%;
    padding: 0.75rem;
    background: var(--c-amber);
    border: none;
    border-radius: 8px;
    color: #000;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}
.mob-sc-editor-save:active { opacity: 0.85; }

/* ── Finals winner banner (shared: desktop scenarios + mobile scenario) ── */
.sc-finals-winner {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    width: 100%;
    box-sizing: border-box;
}
.sc-finals-winner-red  { background: rgba(220,50,50,0.22); border: 2px solid #e05050; color: #ff8080; }
.sc-finals-winner-blue { background: rgba(50,90,220,0.22); border: 2px solid #5080e0; color: #80a8ff; }

/* ── Mobile scenario — playoff bracket layout ──────────────────────────── */
.mob-sc-po-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 0;
}
.mob-sc-po-section {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.mob-sc-po-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.mob-sc-po-alliances {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Picker — About PitRadar panel
   ═══════════════════════════════════════════════════════════════════════════ */

.picker-columns {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    justify-content: center;
    width: 82%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 0;
}
.picker-columns .picker-card {
    flex: 0 0 auto;
    width: 380px;
    max-width: 100%;
    margin: 0;
}
/* Right column: about panel + credit panel stacked */
.picker-right-col {
    flex: 1 1 0;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
/* Tabbed about panel */
.picker-about {
    background: var(--c-gray-800);
    border: 1px solid var(--c-gray-700);
    border-radius: 12px;
    overflow: hidden;
    color: var(--c-text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
}
.picker-tab-nav {
    display: flex;
    border-bottom: 1px solid var(--c-gray-700);
}
.picker-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.7rem 1rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--c-text-tertiary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, background 0.15s;
}
.picker-tab-btn:hover  { color: var(--c-text-secondary); background: var(--c-gray-700); }
.picker-tab-btn.active { color: var(--c-text-primary); border-bottom-color: var(--c-amber); }
.picker-tab-panel { padding: 1.25rem 1.5rem; width: 100%; box-sizing: border-box; }
.picker-about p { margin: 0 0 0.85rem; }
.picker-about-list { margin: 0; padding-left: 1.35rem; }
.picker-about-list li { margin-bottom: 0.5rem; }
.picker-about-footer { margin-top: 0.25rem; font-size: 0.82rem; color: var(--c-text-tertiary); }
/* Credit panel */
.picker-credit-panel {
    background: var(--c-gray-800);
    border: 1px solid var(--c-gray-700);
    border-radius: 12px;
    padding: 1.1rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    text-align: center;
}
.picker-credit-text {
    font-size: 0.8rem;
    color: var(--c-text-tertiary);
}
.picker-credit-text a { color: var(--c-text-secondary); }
.picker-credit-text a:hover { color: var(--c-text-primary); }
@media (max-width: 800px) {
    .picker-columns { flex-direction: column; width: 95%; padding: 1.5rem 0 1rem; }
    .picker-columns .picker-card { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Bug report — trigger buttons
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Shared ghost style for all bug-report trigger buttons ── */
.frc-nav-bug,
.pit-bug-btn,
.picker-bug-btn {
    background: none;
    border: none;
    color: var(--c-text-tertiary);
    font-family: inherit;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.15s;
}
.frc-nav-bug:hover,
.pit-bug-btn:hover,
.picker-bug-btn:hover { opacity: 1; }

/* Per-context sizing and positioning */
.frc-nav-bug    { font-size: 0.78rem; padding: 0.2rem 0.5rem; border-radius: 4px; }
.frc-nav-bug:hover { color: var(--c-text-secondary); }
.pit-bug-btn    { font-size: 0.9rem; padding: 0.1rem 0.4rem; opacity: 0.45; }
.pit-bug-btn:hover { opacity: 0.9; }
.picker-credit-actions { display: flex; gap: 1rem; margin-top: 0.5rem; align-items: center; }
.picker-bug-btn { font-size: 0.78rem; padding: 0.15rem 0; text-decoration: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   Bug report modal (submission)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Shared overlay backdrop for bug modals ── */
.bug-modal-backdrop,
.bug-detail-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}
/* Inside pit display canvas, overlays must be absolute (iOS viewport fix) */
.frc-app-pit .bug-modal-backdrop,
.frc-app-pit .bug-detail-backdrop {
    position: absolute;
}
.bug-modal-backdrop:not([hidden]),
.bug-detail-backdrop:not([hidden]) { display: flex; }
.bug-modal {
    background: var(--c-gray-800);
    border: 1px solid var(--c-gray-700);
    border-radius: 12px;
    width: 90%;
    max-width: 520px;
    padding: 1.5rem;
}
.bug-modal-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}
.bug-modal-icon  { font-size: 1.3rem; }
.bug-modal-title { font-size: 1.15rem; font-weight: 700; margin: 0; flex: 1; }
.bug-modal-close {
    background: none;
    border: none;
    color: var(--c-text-tertiary);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}
.bug-modal-close:hover { color: var(--c-text-primary); }
.bug-modal-field { margin-bottom: 1rem; }
.bug-modal-field label {
    display: block;
    font-size: 0.85rem;
    color: var(--c-text-secondary);
    margin-bottom: 0.35rem;
}
.bug-required { color: #ef4444; }
.bug-optional { color: var(--c-text-tertiary); font-size: 0.8em; }
.bug-modal-field textarea,
.bug-modal-field input[type="email"] {
    width: 100%;
    box-sizing: border-box;
    background: var(--c-gray-900);
    border: 1px solid var(--c-gray-600);
    border-radius: 6px;
    color: var(--c-text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.5rem 0.65rem;
    resize: vertical;
}
.bug-modal-field textarea:focus,
.bug-modal-field input[type="email"]:focus { outline: none; border-color: var(--c-amber); }
.bug-modal-meta { font-size: 0.78rem; color: var(--c-text-tertiary); margin-bottom: 1rem; }
.bug-modal-actions { display: flex; gap: 0.75rem; }
.bug-submit-btn {
    background: var(--c-amber);
    border: none;
    color: #000;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: inherit;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
}
.bug-submit-btn:disabled { opacity: 0.55; cursor: default; }
.bug-submit-btn:hover:not(:disabled) { filter: brightness(1.1); }
.bug-cancel-btn {
    background: none;
    border: 1px solid var(--c-gray-600);
    color: var(--c-text-secondary);
    font-size: 0.9rem;
    font-family: inherit;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
}
.bug-cancel-btn:hover { border-color: var(--c-gray-400); color: var(--c-text-primary); }
.bug-modal-status {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    padding: 0.4rem 0.65rem;
    border-radius: 5px;
}
.bug-status-ok  { background: rgba(34,197,94,0.12); color: #4ade80; }
.bug-status-err { background: rgba(239,68,68,0.12);  color: #f87171; }

/* ═══════════════════════════════════════════════════════════════════════════
   Admin bug detail modal + bugs table
   ═══════════════════════════════════════════════════════════════════════════ */

/* backdrop rule consolidated above with .bug-modal-backdrop */
.bug-detail-modal {
    background: var(--c-gray-800);
    border: 1px solid var(--c-gray-700);
    border-radius: 12px;
    width: 90%;
    max-width: 640px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 1.5rem;
}
.bug-detail-body { margin: 1rem 0; }
.bug-detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 1.5rem;
    font-size: 0.83rem;
    color: var(--c-text-secondary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--c-gray-700);
}
.bug-detail-description {
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--c-text-primary);
    background: var(--c-gray-900);
    border: 1px solid var(--c-gray-700);
    border-radius: 6px;
    padding: 0.75rem;
}
.bug-detail-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--c-gray-700);
    flex-wrap: wrap;
}
.bug-status-btn {
    background: none;
    border: 1px solid var(--c-gray-600);
    font-size: 0.82rem;
    font-family: inherit;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 5px;
    cursor: pointer;
}
.bug-status-btn:hover { border-color: var(--c-gray-400); background: var(--c-gray-700); }
.admin-bugs-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-bugs-table th {
    color: var(--c-text-tertiary);
    text-align: left;
    padding: 0.3rem 0.5rem;
    border-bottom: 1px solid var(--c-gray-700);
    font-weight: 500;
}
.admin-bugs-table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid #222; }
.admin-bug-row:hover td { background: var(--c-gray-700); }

/* =====================================================================
   SETTINGS — AUTO-ADVANCE CHECKBOX
   ===================================================================== */
.pit-settings-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--c-text-secondary);
    cursor: pointer;
}
.pit-settings-checkbox-label input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--c-accent);
    cursor: pointer;
}

/* =====================================================================
   PRE-COMPETITION PIT DISPLAY
   ===================================================================== */

/* ── Landscape (1920×1080) ───────────────────────────────────────────── */
.precomp-ls-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.precomp-ls-grid {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 20px;
    flex: 1;
    min-height: 0;
    padding: 0 10px;
}
.precomp-ls-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.precomp-ls-stats .frc-tile {
    min-height: 68px;
}
.precomp-ls-teams {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* ── Portrait (1080×1920) ────────────────────────────────────────────── */
.precomp-po-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0 10px;
}
/* ── Stats grid: World Rank spans 2 rows in col 1 ────────────────────── */
.precomp-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 8px;
    margin-bottom: 12px;
}
.precomp-stats-grid .frc-tile {
    min-height: 72px;
}
.precomp-tile-world {
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.precomp-tile-world .tile-value {
    font-size: 64px;
    font-weight: 900;
    line-height: 1;
}

/* ── Team list (shared landscape + portrait) ─────────────────────────── */
.precomp-team-hdr {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--c-text-tertiary);
    padding: 8px 4px 6px;
}
.precomp-team-count {
    color: var(--c-text-secondary);
}
.precomp-team-scroll {
    flex: 1;
    overflow: hidden;
    min-height: 0;
}
.precomp-team-table {
    width: 100%;
    border-collapse: collapse;
}
.precomp-row td {
    padding: 10px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.precomp-row-us {
    background: rgba(232, 184, 0, 0.12);
    border-left: 3px solid var(--c-pit-accent);
}
.precomp-row-us .precomp-td-num {
    color: var(--c-pit-accent);
}
.precomp-td-rank {
    width: 36px;
    font-size: 18px;
    font-weight: 600;
    color: var(--c-text-tertiary);
    text-align: center;
}
.precomp-td-avatar {
    width: 36px;
}
.precomp-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: var(--c-gray-700);
    background-size: cover;
    background-position: center;
}
.precomp-td-num {
    font-size: 32px;
    font-weight: 700;
    color: var(--c-text-primary);
    width: 100px;
}
.precomp-td-name {
    font-size: 20px;
    font-weight: 500;
    color: var(--c-text-secondary);
    max-width: 400px;
}
.precomp-td-epa {
    font-size: 24px;
    font-weight: 700;
    color: var(--c-green-500);
    text-align: right;
    width: 100px;
}
.precomp-td-record {
    font-size: 18px;
    font-weight: 400;
    color: var(--c-text-tertiary);
    text-align: right;
    width: 100px;
}

/* ── Waiting indicator ───────────────────────────────────────────────── */
.precomp-waiting {
    font-size: 20px;
    font-weight: 600;
    color: var(--c-text-tertiary);
    padding: 16px 4px;
    text-align: center;
    animation: precomp-pulse 2s ease-in-out infinite;
}
@keyframes precomp-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* =====================================================================
   EVENT SUMMARY PIT DISPLAY
   ===================================================================== */

/* ── Landscape (1920×1080) ───────────────────────────────────────────── */
.summary-ls-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.summary-ls-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.4fr 1.4fr;
    gap: 20px;
    flex: 1;
    min-height: 0;
    padding: 0 10px;
}
.summary-ls-col-a,
.summary-ls-col-b,
.summary-ls-col-c {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}
.summary-ls-col-a .summary-hero-stack {
    flex: 1;
    min-height: 0;
}

/* ── Portrait (1080×1920) ────────────────────────────────────────────── */
.summary-po-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0 10px;
    gap: 16px;
}
.summary-po-container > .frc-page-header,
.summary-ls-container > .frc-page-header {
    flex-shrink: 0;
}
.summary-po-winner {
    flex-shrink: 0;
    text-align: center;
}
.summary-po-mid-row {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.summary-po-col-a {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.summary-po-col-b {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.summary-po-col-b .summary-hero-partners {
    flex: 1;
}
.summary-po-standings { flex: 0 0 auto; }
.summary-po-notable {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-content: start;
}
.summary-po-notable .summary-notable-group { min-width: 0; }

/* ── Blue Banner ─────────────────────────────────────────────────────── */
.summary-banner {
    width: 100%;
    background: linear-gradient(135deg, #0077cc 0%, #0055a0 50%, #003d7a 100%);
    border-radius: 8px;
    padding: 14px 24px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0,102,179,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}
.summary-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.04) 0px,
        rgba(255,255,255,0.04) 20px,
        transparent 20px,
        transparent 40px
    );
    pointer-events: none;
}
.summary-banner-text {
    font-size: 26px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.summary-banner-event {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    margin-top: 3px;
}

/* ── Winner + Partners stacked hero ──────────────────────────────────── */
.summary-hero-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}
.summary-hero-winner {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, rgba(232,184,0,0.06) 0%, rgba(232,184,0,0.02) 100%);
    border: 1px solid rgba(232,184,0,0.15);
    border-radius: 10px;
    padding: 16px;
}
.summary-hero-partners {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(0,102,179,0.08) 0%, rgba(0,102,179,0.02) 100%);
    border: 1px solid rgba(0,102,179,0.18);
    border-radius: 10px;
    padding: 20px;
}

/* ── Congratulations ─────────────────────────────────────────────────── */
.summary-congrats {
    font-size: 32px;
    font-weight: 800;
    color: var(--c-pit-accent);
    text-align: center;
    margin-bottom: 8px;
}

/* ── Winner section ──────────────────────────────────────────────────── */
.summary-win-section {
    text-align: center;
    margin-bottom: 12px;
}
.summary-win-label {
    font-size: 28px;
    font-weight: 800;
    color: var(--c-text-primary);
    margin-bottom: 12px;
}
.summary-win-teams {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.summary-win-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.summary-win-team-num {
    font-size: 42px;
    font-weight: 800;
    color: var(--c-text-primary);
}
.summary-win-team-us .summary-win-team-num {
    color: var(--c-pit-accent);
}
.summary-win-team-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text-tertiary);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Partners section ────────────────────────────────────────────────── */
.summary-partners-label {
    font-size: 22px;
    font-weight: 700;
    color: var(--c-text-secondary);
    margin-bottom: 14px;
    text-align: center;
}
.summary-partners-list {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}
.summary-partner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.summary-partner-num {
    font-size: 36px;
    font-weight: 700;
    color: var(--c-text-primary);
}
.summary-partner-name {
    font-size: 15px;
    color: var(--c-text-tertiary);
}

/* ── Final Standings table ───────────────────────────────────────────── */
.summary-standings-table {
    width: 100%;
    border-collapse: collapse;
}
.summary-standings-row td {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.summary-standings-row:nth-child(odd) td {
    background: rgba(255,255,255,0.02);
}
.summary-standings-row-us td {
    background: rgba(232, 184, 0, 0.08) !important;
}
.summary-standings-pos {
    font-size: 28px;
    font-weight: 800;
    width: 60px;
    text-align: center;
    color: var(--c-text-secondary);
}
.summary-pos-gold   { color: var(--c-pit-accent); }
.summary-pos-silver { color: #c0c0c0; }
.summary-pos-bronze { color: #cd7f32; }
.summary-standings-al {
    font-size: 22px;
    font-weight: 600;
    color: var(--c-text-tertiary);
    width: 50px;
}
.summary-standings-teams {
    font-size: 0;
}
.summary-standings-team {
    display: inline-block;
    font-size: 22px;
    font-weight: 700;
    color: var(--c-text-primary);
    margin-right: 10px;
}
.summary-standings-team-us {
    color: var(--c-pit-accent);
    background: rgba(232, 184, 0, 0.12);
    border-radius: 4px;
    padding: 0 5px;
}
.summary-standings-epa {
    font-size: 20px;
    font-weight: 600;
    color: var(--c-green-500);
    text-align: right;
    width: 80px;
}

/* ── Notable Matches ─────────────────────────────────────────────────── */
.summary-notable-group {
    margin-bottom: 12px;
}
.summary-notable-sublabel {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--c-text-tertiary);
    margin-bottom: 6px;
}
.summary-match-card {
    background: var(--c-gray-700);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 6px;
}
.summary-mc-empty {
    padding: 12px;
    text-align: center;
    color: var(--c-text-tertiary);
    font-size: 14px;
}
.summary-mc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--c-gray-600);
}
.summary-mc-label {
    font-size: 18px;
    font-weight: 700;
    color: var(--c-text-primary);
}
.summary-mc-category {
    font-size: 12px;
    font-weight: 500;
    color: var(--c-text-tertiary);
}
.summary-mc-event {
    margin-left: auto;
    font-size: 11px;
    font-weight: 400;
    color: var(--c-text-tertiary);
    font-style: italic;
}
.summary-mc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
}
.summary-mc-row-red {
    background: rgba(192, 57, 43, 0.12);
}
.summary-mc-row-blue {
    background: rgba(0, 102, 179, 0.12);
}
.summary-mc-row-win .summary-mc-score {
    font-weight: 800;
}
.summary-mc-teams {
    font-size: 18px;
    font-weight: 600;
    color: var(--c-text-primary);
}
.summary-mc-score {
    font-size: 22px;
    font-weight: 600;
    color: var(--c-text-primary);
}
.summary-na-note {
    font-size: 14px;
    color: var(--c-text-tertiary);
    font-style: italic;
    padding: 8px 0;
}

/* ── Team Event Summary Tiles ───────────────────────────────────────── */
.summary-team-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    flex: 1;
    min-height: 0;
    align-content: start;
}
.summary-team-tiles .frc-tile {
    min-height: 0;
    padding: 8px 10px;
    aspect-ratio: unset;
}
.summary-team-tiles .tile-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.summary-team-tiles .tile-value {
    font-size: 32px;
    font-weight: 800;
}
.summary-team-tiles .tile-value-record {
    font-size: 36px;
}
.summary-tile-full {
    grid-column: 1 / -1;
    text-align: center;
}
.summary-tile-full .tile-label {
    font-size: 14px;
}
/* EPA change directional colouring */
.summary-tile-up .tile-value  { color: var(--c-green-500); }
.summary-tile-down .tile-value { color: #ef4444; }

/* Landscape: compact tiles to share col with standings */
.summary-ls-col-b .summary-team-tiles .tile-value { font-size: 28px; }
.summary-ls-col-b .summary-team-tiles .tile-value-record { font-size: 24px; }
.summary-ls-col-b .summary-team-tiles .frc-tile { padding: 6px 8px; }
