/* Atlas Rate Guesser - BPH Networks Design System */

:root {
    /* Brand */
    --navy: #14304d;
    --navy-light: #1c4270;
    --navy-dark: #0e2238;
    --red: #c5372e;
    --red-hover: #a82d25;
    --red-light: #e84e44;

    /* Semantic */
    --green: #2d8a4e;
    --green-light: #e8f5ed;
    --amber: #d4a017;
    --amber-light: #fef9e7;

    /* Text */
    --text-dark: #1a2a3a;
    --text-mid: #3a4a5a;
    --text-light: #5a6a7a;
    --text-muted: #7a8a9a;

    /* Backgrounds */
    --bg: #f8fafb;
    --bg-hero: #f0f3f7;
    --bg-card: #ffffff;

    /* Borders & Shadows */
    --border: #dde3ea;
    --border-light: #e8ecf0;
    --shadow-card: 0 2px 8px rgba(20, 48, 77, 0.08);
    --shadow-card-hover: 0 8px 24px rgba(20, 48, 77, 0.12);
    --shadow-nav: 0 4px 16px rgba(20, 48, 77, 0.25);

    --radius: 12px;
    --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-dark);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.serif { font-family: 'Source Serif 4', Georgia, serif; }

/* ================================
   Top Banner
   ================================ */
.top-banner {
    background: var(--red);
    text-align: center;
    padding: 0.4rem 1rem;
}

.top-banner a {
    color: white;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.top-banner a:hover {
    text-decoration: underline;
}

/* ================================
   Navbar
   ================================ */
.navbar {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-nav);
}

.navbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    cursor: pointer;
}

.navbar-logo {
    height: 48px;
    width: auto;
}

.navbar-title {
    display: flex;
    flex-direction: column;
    color: white;
    line-height: 1.2;
}

.brand-name {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
}

.brand-sub {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.state-badges {
    display: flex;
    gap: 0.35rem;
}

.state-badge {
    background: rgba(255,255,255,0.12);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.difficulty-selector {
    display: flex;
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    overflow: hidden;
}

.diff-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.diff-btn.active {
    background: rgba(255,255,255,0.15);
    color: white;
}

.diff-btn:hover {
    color: white;
}

.navbar-accent {
    height: 3px;
    background: linear-gradient(90deg, var(--navy), var(--red), var(--navy));
}

/* ================================
   Score Strip
   ================================ */
.score-strip {
    background: var(--bg-hero);
    border-bottom: 1px solid var(--border);
}

.score-strip-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.6rem 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.score-chip {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}

.score-chip.primary .chip-value {
    color: var(--red);
    font-size: 1.5rem;
}

.chip-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.chip-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--navy);
}

/* ================================
   Container / Layout
   ================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

.game-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 1.5rem;
    align-items: start;
}

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

/* ================================
   Loading
   ================================ */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    gap: 0.75rem;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--border);
    border-top-color: var(--navy);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text { font-weight: 600; color: var(--text-mid); }
.loading-sub { font-size: 0.85rem; color: var(--text-muted); }

.hidden { display: none !important; }

/* ================================
   Map Card
   ================================ */
.map-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card-hover);
    border: 1px solid var(--border);
}

.map-view {
    width: 100%;
    height: 420px;
    background: var(--bg-hero);
}

.facility-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(20, 48, 77, 0.92));
    padding: 3.5rem 1.5rem 1.25rem;
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

.facility-state-flag {
    background: var(--red);
    color: white;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.facility-info { color: white; }

.facility-name {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.facility-specialty { font-size: 0.85rem; opacity: 0.85; }
.facility-address { font-size: 0.8rem; opacity: 0.65; }

/* ================================
   Hint Card (Easy Mode)
   ================================ */
.hint-card {
    background: var(--amber-light);
    border: 1px solid #f5e6b8;
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
}

.hint-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--amber);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.hint-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 0.25rem 0;
}

.hint-row .hint-label { color: var(--text-mid); }
.hint-row .hint-val { font-weight: 600; color: var(--text-dark); }

/* ================================
   Guess Panel
   ================================ */
.guess-panel {
    background: var(--bg-card);
    border-radius: var(--radius);
    border-top: 3px solid var(--navy);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.panel-header {
    padding: 1.25rem 1.5rem 0.75rem;
}

.panel-header h2 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
}

.panel-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.procedure-cards {
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.proc-card {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.proc-card:focus-within {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(20, 48, 77, 0.08);
}

.proc-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.proc-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--red);
}

.proc-code {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    font-family: monospace;
}

.proc-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.6rem;
}

.proc-benchmarks {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.benchmark {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.bm-cms {
    background: #eef2ff;
    color: #4338ca;
}

.bm-wcfs {
    background: var(--green-light);
    color: var(--green);
}

.guess-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    min-width: 80px;
}

.input-group {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    flex: 1;
    transition: border-color 0.2s;
}

.input-group:focus-within {
    border-color: var(--navy);
}

.input-prefix {
    background: var(--bg-hero);
    padding: 0.5rem 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-right: 1.5px solid var(--border);
    user-select: none;
}

.guess-input {
    border: none;
    outline: none;
    padding: 0.5rem 0.6rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    width: 100%;
    color: var(--text-dark);
    background: white;
}

.guess-input::placeholder {
    color: #cbd5e1;
    font-weight: 400;
}

/* Remove number spinners */
.guess-input::-webkit-outer-spin-button,
.guess-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.guess-input[type=number] { -moz-appearance: textfield; }

/* ================================
   Buttons
   ================================ */
.btn-primary {
    display: block;
    width: calc(100% - 3rem);
    margin: 1.25rem 1.5rem;
    padding: 0.8rem 2rem;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: white;
    box-shadow: 0 4px 12px rgba(20, 48, 77, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(20, 48, 77, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-next {
    max-width: 400px;
    margin: 1.5rem auto;
    background: linear-gradient(135deg, var(--green), #3a9e5e);
    box-shadow: 0 4px 12px rgba(45, 138, 78, 0.3);
}

.btn-next:hover {
    box-shadow: 0 6px 16px rgba(45, 138, 78, 0.4);
}

/* ================================
   Results
   ================================ */
.results-screen {
    max-width: 900px;
    margin: 0 auto;
}

.results-banner {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: white;
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.results-banner h2 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
}

.results-banner p {
    font-size: 0.85rem;
    opacity: 0.75;
    margin-top: 0.15rem;
}

.round-score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.1);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
}

.rs-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.7;
}

.rs-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
}

.results-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-card);
    border-left: 4px solid var(--border);
}

.result-card.score-high { border-left-color: var(--green); }
.result-card.score-mid { border-left-color: var(--amber); }
.result-card.score-low { border-left-color: var(--red); }

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.result-proc-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--navy);
}

.result-score-badge {
    text-align: center;
}

.result-pts {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy);
}

.result-rating {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.result-metric {
    padding: 0.5rem 0;
}

.result-metric .rm-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.result-metric .rm-value {
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 0.1rem;
}

.rm-guess { color: var(--navy); }
.rm-actual { color: var(--green); }
.rm-range { color: var(--text-light); font-weight: 500; font-size: 0.85rem; }
.rm-cms { color: #4338ca; }
.rm-wcfs { color: var(--green); }
.rm-pct { color: var(--red); }

/* ================================
   Game Over
   ================================ */
.gameover-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 55vh;
}

.gameover-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2.5rem 3rem;
    text-align: center;
    box-shadow: var(--shadow-card-hover);
    border-top: 4px solid var(--navy);
    max-width: 460px;
    width: 100%;
}

.gameover-logo {
    height: 64px;
    margin-bottom: 1rem;
}

.gameover-card h2 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.75rem;
    color: var(--navy);
    margin-bottom: 1.5rem;
}

.final-score-ring {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.final-score-num {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--navy);
}

.final-grade {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding: 0.4rem 1.25rem;
    border-radius: 999px;
    display: inline-block;
}

.final-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.stat { text-align: center; }
.stat-val { display: block; font-size: 1.25rem; font-weight: 800; color: var(--navy); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }

.gameover-card .btn-primary {
    width: 100%;
    margin: 0;
}

/* ================================
   Linked Input Divider
   ================================ */
.input-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.25rem 0;
}

.input-or {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 0.75rem;
    position: relative;
}

.input-or::before,
.input-or::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 2rem;
    height: 1px;
    background: var(--border);
}

.input-or::before { right: 100%; }
.input-or::after { left: 100%; }

/* ================================
   Payer Breakdown
   ================================ */
.result-payers {
    grid-column: 1 / -1;
}

.payer-list {
    margin-top: 0.25rem;
}

.payer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.payer-row:last-child {
    border-bottom: none;
}

.payer-name {
    color: var(--text-secondary);
    flex: 1;
    margin-right: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.payer-rate {
    font-weight: 600;
    color: var(--navy);
    white-space: nowrap;
}

/* ================================
   Name Screen
   ================================ */
.name-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.name-card {
    background: white;
    border-radius: 16px;
    padding: 3rem 2.5rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    border: 1px solid var(--border);
}

.name-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
}

.name-card h2 {
    color: var(--navy);
    margin: 0 0 0.5rem;
}

.name-desc {
    color: var(--text-mid);
    font-size: 0.95rem;
    margin: 0 0 1rem;
    line-height: 1.6;
}

.name-desc-secondary {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.name-input-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.name-input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.name-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.name-input:focus {
    outline: none;
    border-color: var(--navy);
}

/* ================================
   Leaderboard
   ================================ */
.leaderboard-section {
    margin-top: 2rem;
    text-align: left;
}

.leaderboard-section h3 {
    color: var(--navy);
    margin: 0 0 1rem;
    text-align: center;
}

.leaderboard-list {
    max-height: 320px;
    overflow-y: auto;
}

.lb-row {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.lb-row:last-child {
    border-bottom: none;
}

.lb-you {
    background: rgba(45, 138, 78, 0.08);
    border-radius: 6px;
    font-weight: 600;
}

.lb-rank {
    width: 40px;
    font-weight: 700;
    color: var(--navy);
}

.lb-name {
    flex: 1;
    color: var(--text-primary);
}

.lb-score {
    font-weight: 700;
    color: var(--navy);
    font-size: 1rem;
}

/* ================================
   Navbar Home Button
   ================================ */
.nav-home-btn {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.nav-home-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* ================================
   Score Strip Leaderboard Button
   ================================ */
.strip-leaderboard-btn {
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.strip-leaderboard-btn:hover {
    border-color: var(--navy);
    color: var(--navy);
}

/* ================================
   Secondary Button
   ================================ */
.btn-secondary {
    display: block;
    width: calc(100% - 3rem);
    margin: 0 1.5rem 0.5rem;
    padding: 0.65rem 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    background: transparent;
    color: var(--text-mid);
}

.btn-secondary:hover {
    border-color: var(--navy);
    color: var(--navy);
}

.name-card .btn-secondary {
    width: 100%;
    margin: 0.5rem 0 0;
}

.gameover-actions {
    display: flex;
    gap: 0.75rem;
}

.gameover-actions .btn-primary,
.gameover-actions .btn-secondary {
    flex: 1;
    width: auto;
    margin: 0;
}

/* ================================
   Atlas Promo
   ================================ */
.name-atlas-promo,
.gameover-promo {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.name-atlas-promo p,
.gameover-promo p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.name-atlas-promo a,
.gameover-promo a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
}

.name-atlas-promo a:hover,
.gameover-promo a:hover {
    text-decoration: underline;
}

/* ================================
   Leaderboard Tabs
   ================================ */
.leaderboard-tabs {
    display: flex;
    gap: 0;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.lb-tab, .lb-tab-page {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.45rem 0.75rem;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
    border-right: 1px solid var(--border);
}

.lb-tab:last-child, .lb-tab-page:last-child {
    border-right: none;
}

.lb-tab.active, .lb-tab-page.active {
    background: var(--navy);
    color: white;
}

.lb-tab:hover:not(.active), .lb-tab-page:hover:not(.active) {
    background: var(--bg-hero);
    color: var(--text-mid);
}

/* ================================
   Standalone Leaderboard Page
   ================================ */
.leaderboard-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 60vh;
    padding-top: 1rem;
}

.leaderboard-page-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem 2.5rem;
    box-shadow: var(--shadow-card-hover);
    border-top: 4px solid var(--navy);
    max-width: 600px;
    width: 100%;
}

.leaderboard-page-card h2 {
    color: var(--navy);
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.leaderboard-table-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid var(--border);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lth-rank { width: 36px; }
.lth-name { flex: 1; }
.lth-stat { width: 65px; text-align: right; }

.leaderboard-list-full {
    max-height: 500px;
}

.leaderboard-list-full .lb-row {
    display: flex;
    align-items: center;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
}

.leaderboard-list-full .lb-rank { width: 36px; }
.leaderboard-list-full .lb-name { flex: 1; }
.leaderboard-list-full .lb-stat {
    width: 65px;
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-light);
}

.leaderboard-list-full .lb-score {
    width: 65px;
    text-align: right;
}

.leaderboard-page-actions {
    margin-top: 1.25rem;
}

.leaderboard-page-actions .btn-primary {
    width: 100%;
    margin: 0;
}

/* ================================
   Contact Section
   ================================ */
.contact-section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    text-align: left;
}

.contact-heading {
    color: var(--navy);
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.contact-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.contact-desc a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
}

.contact-desc a:hover { text-decoration: underline; }

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-textarea {
    resize: vertical;
    min-height: 48px;
    font-family: inherit;
}

.contact-section .btn-secondary {
    width: 100%;
    margin: 0.25rem 0 0;
}

.contact-success {
    color: var(--green);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 0;
    text-align: center;
}

/* ================================
   MapLibre overrides
   ================================ */
.maplibregl-popup-content {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
}

.maplibregl-ctrl-attrib {
    font-size: 0.65rem !important;
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 900px) {
    .game-layout {
        grid-template-columns: 1fr;
    }
    .map-view { height: 300px; }
    .navbar-inner { padding: 0 1rem; }
    .state-badges { display: none; }
}

@media (max-width: 600px) {
    .container { padding: 1rem; }
    .map-view { height: 240px; }
    .results-banner { flex-direction: column; gap: 1rem; text-align: center; }
    .score-strip-inner { justify-content: center; }
    .difficulty-selector { display: none; }
}
