:root {
  --brand-blue: #002776;
  --brand-green: #009c3b;
  --brand-yellow: #ffdf00;
  --blue: var(--brand-blue);
  --navy: #0c1f3c;
  --green: #007a30;
  --green-dark: #006b28;
  --ink: #22324a;
  --muted: #566579;
  --line: #dce2ea;
  --paper: #fff;
  --bg: #f4f6f9;
  --soft: #eaf0fa;
  --red: #b42332;
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; border: 0; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #3277d5; outline-offset: 3px;
}
a { color: var(--blue); }
.hidden { display: none !important; }
.icon { width: 19px; height: 19px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; vertical-align: middle; }
button, .primary, .outline { display: inline-flex; gap: 8px; align-items: center; justify-content: center; }
.primary, .outline, .ghost, .danger { border-radius: 5px; padding: 9px 14px; font-size: .875rem; min-height: 40px; font-weight: 600; text-decoration: none; }
.primary { background: var(--blue); border: 1px solid var(--blue); color: white; }
.primary:hover { background: #123c8e; }
.outline { background: white; color: var(--ink); border: 1px solid #bbc7d7; }
.outline:hover { background: var(--soft); }
.ghost { background: transparent; color: var(--blue); border: 1px solid var(--line); }
.danger { color: white; background: var(--red); }
.danger-text { color: var(--red); background: transparent; padding: 8px; font-size: .875rem; }
.full { width: 100%; }
.skip-link { position: fixed; top: -70px; left: 16px; z-index: 100; background: white; padding: 10px; }
.skip-link:focus { top: 8px; }
.masthead { min-height: 80px; padding: 12px 24px; background: white; display: flex; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 12px; align-items: center; flex: 1; }
.brand-logo { width: 52px; height: 52px; object-fit: contain; border-radius: 6px; }
.brand strong { font-size: 1.25rem; letter-spacing: 2px; color: var(--blue); }
.brand-subtitle { display: flex; gap: 12px; align-items: center; font-size: .75rem; color: var(--muted); letter-spacing: .6px; }
.brand-caption { border-left: 1px solid var(--line); padding-left: 12px; }
.private-label { font-size: .875rem; color: var(--muted); }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 6px; }
#app-view { position: relative; }
.topnav { width: 214px; position: absolute; top: 0; bottom: 0; left: 0; background: var(--navy); padding: 20px 12px; overflow: auto; min-height: calc(100vh - 80px); }
.topnav button { width: 100%; padding: 10px 12px; background: transparent; color: #d2dced; font-size: .875rem; justify-content: flex-start; border-left: 3px solid transparent; border-radius: 4px; margin-bottom: 3px; }
.topnav button:hover { background: #183657; }
.topnav button.active { color: white; background: #183e73; border-left-color: var(--brand-yellow); font-weight: 600; }
.nav-label { display: block; color: #9caec9; font-size: .75rem; letter-spacing: 1px; margin: 7px 12px 12px; }
.nav-label:not(:first-child) { margin-top: 24px; }
.workspace { margin-left: 214px; display: grid; grid-template-columns: 224px minmax(0,1fr); min-height: calc(100vh - 120px); }
aside { background: white; border-right: 1px solid var(--line); padding: 24px 16px; }
.section-label { display: block; color: var(--muted); font-size: .75rem; letter-spacing: .7px; font-weight: 600; margin-bottom: 10px; }
input, select { padding: 9px 10px; border: 1px solid #bbc7d7; color: var(--ink); border-radius: 4px; background: white; min-width: 0; max-width: 100%; }
#project-select { width: 100%; font-size: .875rem; }
.small, .field-help, .sidebar-note { font-size: .875rem; color: var(--muted); line-height: 1.6; }
.small { margin: 8px 0 16px; }
.sidebar-divider { height: 1px; background: var(--line); margin: 24px 0; }
.country-button, .sidebar-button { width: 100%; justify-content: flex-start; text-align: left; background: transparent; padding: 10px 8px; color: var(--ink); font-size: .875rem; border-radius: 4px; }
.country-button:hover, .sidebar-button:hover { background: var(--bg); }
.country-button.active { color: var(--blue); background: var(--soft); font-weight: 600; }
.sidebar-note { padding: 16px 8px; border-top: 1px solid var(--line); margin-top: 24px; }
main { min-width: 0; padding: 24px 28px 48px; }
.breadcrumbs { min-height: 24px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .875rem; color: var(--muted); }
.breadcrumbs button { color: var(--blue); background: transparent; padding: 0; }
.heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin: 18px 0 24px; }
h1 { font-size: 1.75rem; font-weight: 650; margin: 4px 0 8px; letter-spacing: -.4px; line-height: 1.25; }
h2 { font-size: 1.25rem; margin: 0; }
h3 { font-size: 1.05rem; margin: 0 0 12px; font-weight: 600; }
h4 { font-size: .875rem; margin: 0 0 12px; }
p { line-height: 1.65; }
.eyebrow { font-size: .75rem; color: var(--blue); letter-spacing: 1px; font-weight: 600; }
#page-subtitle { font-size: .875rem; color: var(--muted); margin: 0; max-width: 850px; }
.panel, .table-wrap { background: white; border: 1px solid var(--line); border-radius: 6px; }
.panel { padding: 22px; margin-bottom: 20px; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 24px; }
.metric { background: white; border: 1px solid var(--line); border-radius: 5px; padding: 18px; position: relative; }
.metric strong { display: block; font-size: 1.75rem; color: var(--blue); line-height: 1.25; margin-bottom: 8px; }
.metric span { font-size: .875rem; color: var(--muted); }
.metric-icon { position: absolute; right: 16px; top: 18px; color: #7185a1; }
.country-grid, .competition-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(230px,1fr)); gap: 16px; }
.country-card, .competition-card { position: relative; display: block; text-align: left; padding: 24px; border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 6px; min-height: 150px; }
.country-card:hover, .competition-card:hover { border-color: #7f9abf; background: #fafdff; }
.country-card .flag { display: block; margin-bottom: 16px; color: var(--blue); }
.flag .icon { height: 32px; width: 40px; }
.country-card strong, .competition-card strong { display: block; font-size: 1rem; }
.country-card small, .competition-card small { display: block; font-size: .875rem; color: var(--muted); margin-top: 8px; }
.card-arrow { display: none; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.search { flex: 1; min-width: 180px; max-width: 500px; }
.toolbar .result-count { margin-left: auto; font-size: .875rem; color: var(--muted); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
th { padding: 12px 16px; background: #f7f9fc; border-bottom: 1px solid var(--line); color: #46566c; font-size: .75rem; letter-spacing: .4px; white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid #e9edf3; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f4f8fe; }
td strong { font-weight: 600; }
.entity-name { display: flex; align-items: center; gap: 12px; min-width: 180px; }
.crest { width: 36px; height: 36px; object-fit: contain; }
.crest-fallback { color: #7c8a9d; width: 34px; display: inline-flex; align-items: center; justify-content: center; }
.table-action { border: 1px solid #c6d2e2; color: var(--blue); background: white; border-radius: 4px; padding: 6px 10px; font-size: .875rem; white-space: nowrap; }
.entity-name > .table-action { border: 0; padding: 0; text-align: left; white-space: normal; justify-content: flex-start; }
.badge { display: inline-flex; background: #eef2f8; color: #465c7a; border-radius: 4px; padding: 4px 8px; font-size: .75rem; }
.rating { background: #eaf7ef; color: #006b28; padding: 4px 8px; border-radius: 4px; font-weight: 600; }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 18px; font-size: .875rem; }
.empty { grid-column: 1/-1; padding: 38px 24px; text-align: center; color: var(--muted); border: 1px dashed #b8c5d7; background: white; border-radius: 6px; font-size: .875rem; line-height: 1.8; }
.tabs { display: flex; gap: 2px; overflow: auto; margin: 18px 0 24px; border-bottom: 1px solid var(--line); }
.tabs button { padding: 12px; border-bottom: 3px solid transparent; color: var(--muted); background: transparent; font-size: .875rem; white-space: nowrap; }
.tabs button.active { color: var(--blue); border-color: var(--blue); font-weight: 600; }
.detail-header { display: flex; gap: 18px; align-items: center; }
.detail-header img { width: 64px; height: 64px; object-fit: contain; }
.detail-header h3 { margin-bottom: 4px; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.two-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.facts small { display: block; color: var(--muted); margin-bottom: 4px; font-size: .75rem; }
.notice { background: #edf3fd; color: #345275; border: 1px solid #d1def3; padding: 14px 16px; border-radius: 5px; font-size: .875rem; line-height: 1.7; margin: 20px 0; }
.warning { background: #fff9e7; color: #715514; border-color: #ebdba4; }
.history-row { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: .875rem; line-height: 1.7; }
.history-row.inactive { color: var(--muted); }
.report { font: .8125rem/1.7 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); padding: 16px; max-height: 55vh; overflow: auto; }
footer { margin-left: 214px; padding: 10px 24px; background: white; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; font-size: .75rem; color: var(--muted); }
#save-state { color: var(--green-dark); }
dialog { border: 1px solid var(--line); border-radius: 8px; padding: 0; width: min(960px,calc(100vw - 32px)); max-height: 92vh; color: var(--ink); box-shadow: 0 12px 48px #0c1f3c30; }
dialog::backdrop { background: #0c1f3c99; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); background: #fafbfd; position: sticky; top: 0; z-index: 4; }
.dialog-head h2 { margin-top: 4px; }
.icon-button { background: transparent; color: #4e617b; padding: 8px; }
.form-context { font-size: .875rem; color: var(--muted); padding: 0 24px; overflow-wrap: anywhere; }
.form-grid { padding: 0 24px 24px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 24px; }
.form-section { grid-column: 1/-1; font-size: .875rem; color: var(--blue); border-bottom: 1px solid var(--line); padding: 16px 0 10px; margin: 0; }
.field label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: 6px; }
.field input, .field select { width: 100%; font-size: .875rem; }
.field-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.field-head label { margin-bottom: 0; }
.field-head select { width: auto; max-width: 120px; background: #f3f6fa; padding: 4px 8px; }
.field.inactive .value-wrap { display: none; }
.country-badge { display: inline-flex; align-items: center; gap: 9px; line-height: 1.4; }
.country-badge img { flex: 0 0 24px; width: 24px; height: 18px; object-fit: contain; }
.country-current { width: 100%; display: flex; align-items: center; justify-content: space-between; text-align: left; }
.country-choices { padding: 12px; margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; background: white; scroll-margin: 160px 0 90px; }
.country-option, .country-current, #country-search { scroll-margin: 160px 0 90px; }
.country-choices > label { display: block; margin-bottom: 6px; }
.country-results { max-height: 230px; overflow-y: auto; margin-top: 8px; }
.country-option { width: 100%; display: block; text-align: left; background: white; border: 0; padding: 10px; border-radius: 4px; }
.country-option:hover, .country-option:focus-visible, .country-option[aria-pressed="true"] { background: #eaf1fa; color: #15365f; }
.country-reference { font-size: 13px; margin-top: 8px; color: var(--muted); }
.country-reference summary { cursor: pointer; padding: 5px 0; }
.country-reference > label { display: block; margin: 8px 0 4px; }
.array-inputs { display: flex; gap: 6px; }
.array-inputs input { min-width: 0; width: 0; flex: 1; }
.array-inputs label { flex: 1; min-width: 0; font-size: .75rem; }
.array-inputs label input { width: 100%; }
.array-inputs label span { display: block; margin-bottom: 4px; }
.nested-field { padding: 14px; border: 1px solid var(--line); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; border-radius: 4px; }
.field-help { margin: 6px 0; }
.check { display: flex; align-items: center; gap: 8px; font-size: .875rem; }
.check input { flex-shrink: 0; width: 17px; height: 17px; accent-color: var(--blue); }
#skills-option { padding: 0 24px 18px; }
.dialog-actions { display: flex; gap: 12px; justify-content: flex-end; padding: 16px 24px; background: #fafbfd; border-top: 1px solid var(--line); position: sticky; bottom: 0; z-index: 3; }
#form-error { padding: 0 24px; }
.error-text, #form-error, #login-error { color: var(--red); font-size: .875rem; }
#info-body { padding: 20px 24px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #124b36; color: white; border-radius: 5px; padding: 12px 20px; max-width: 90vw; z-index: 100; font-size: .875rem; box-shadow: 0 3px 14px #0002; }
.toast.error { background: #952936; }
.login-view { max-width: 480px; margin: 8vh auto; border: 1px solid var(--line); border-top: 3px solid var(--brand-blue); border-radius: 6px; background: white; }
.login-card { padding: 36px; }
.login-card h1 { font-size: 1.75rem; margin: 12px 0; }
.login-card p { font-size: .875rem; color: var(--muted); }
.login-card label { display: block; font-size: .875rem; margin: 20px 0 8px; }
.login-card input { width: 100%; }
.login-card .primary { width: 100%; margin: 24px 0 8px; }
.login-art { display: none; }
.link-button { background: transparent; color: var(--blue); padding: 8px 0; font-size: .875rem; }
.settings-form > label { display: block; font-size: .875rem; font-weight: 500; margin: 20px 0 8px; }
.settings-form > input, .settings-form > select { width: 100%; }
.settings-facts { display: grid; gap: 8px; font-size: .875rem; }
.settings-facts span { color: var(--muted); }
.settings-facts strong { overflow-wrap: anywhere; margin-bottom: 14px; }
.loading-panel { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 260px; color: var(--muted); }
.spinner { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Palette editor */
.color-field { grid-column: 1/-1; }
.color-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.color-editor { border: 1px solid var(--line); border-radius: 5px; padding: 16px; background: #fbfcfe; }
.color-pad { height: 150px; background-color: red; background-image: linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,transparent); position: relative; border: 1px solid #b5c0d2; border-radius: 4px; touch-action: none; cursor: crosshair; }
.color-cursor { position: absolute; width: 14px; height: 14px; border: 2px solid white; box-shadow: 0 0 0 1px #000; border-radius: 50%; transform: translate(-50%,-50%); pointer-events: none; }
.color-hue { appearance: none; height: 14px; background: linear-gradient(to right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00); cursor: pointer; padding: 0 !important; margin: 0 0 12px; border-radius: 7px; }
.color-hue::-webkit-slider-thumb { appearance: none; width: 19px; height: 19px; border: 2px solid white; border-radius: 50%; background: #263449; box-shadow: 0 0 0 1px #263449; }
.color-hue::-moz-range-thumb { width: 16px; height: 16px; border: 2px solid white; border-radius: 50%; background: #263449; }
.competition-color-preview { text-align: center; padding: 16px; border: 1px solid var(--line); border-radius: 4px; font-size: 1rem; font-weight: 600; margin-top: 12px; }
.color-hue-label, .palette-label { margin-top: 12px; }
.color-values { display: flex; align-items: end; gap: 12px; }
.color-values > input[type=color] { width: 48px; height: 42px; padding: 3px; flex-shrink: 0; }
.color-values label { flex: 1; margin: 0; }
.color-values input[type=text] { font-family: ui-monospace,Consolas,monospace; text-transform: uppercase; }
.color-match { min-height: 44px; }

/* Background library */
.background-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.background-toolbar h3 { margin: 0; }
.background-toolbar .small { margin-bottom: 0; }
.selection-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; font-size: .875rem; margin: 16px 0; }
.selection-toolbar > span { color: var(--muted); }
.selection-toolbar button { margin-left: auto; }
.background-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(235px,1fr)); gap: 18px; }
.background-card { background: white; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.background-card-image { aspect-ratio: 16/9; position: relative; background: #e4e9f1; }
.background-card-image img { width: 100%; height: 100%; object-fit: contain; }
.image-unavailable { display: flex; height: 100%; align-items: center; justify-content: center; color: var(--muted); font-size: .875rem; }
.image-select { position: absolute; top: 10px; left: 10px; background: white; border-radius: 4px; padding: 4px; display: flex; box-shadow: 0 1px 5px #0003; }
.image-select input { width: 20px; height: 20px; margin: 0; accent-color: var(--blue); }
.active-image-label { position: absolute; right: 10px; bottom: 10px; padding: 4px 8px; border-radius: 4px; background: #006b28; color: white; font-size: .75rem; }
.background-card-body { padding: 16px; }
.background-card-body > strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .875rem; }
.background-card-body .button-row { margin: 8px 0 0; }
.included-backgrounds { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 24px; }
.section-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.section-top h3 { margin-bottom: 0; }
.native-background-panel { grid-column: 1/-1; display: flex; gap: 20px; align-items: center; background: white; border: 1px dashed #bbc7d7; padding: 24px; border-radius: 5px; }
.native-background-panel > .icon { width: 32px; height: 32px; color: var(--blue); }
.native-background-panel p { margin-bottom: 0; }
.removal-list { max-height: 30vh; overflow: auto; overflow-wrap: anywhere; font-size: .875rem; padding-left: 24px; }
.cell-meta { display: block; color: var(--muted); font-size: .75rem; margin-top: 4px; overflow-wrap: anywhere; }
.inherited-value { color: var(--muted); font-size: .8125rem; }
.removal-label { color: var(--red); font-weight: 600; }
.catalog-toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.catalog-toolbar input { flex: 1; min-width: 200px; }
.operation-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(230px,1fr)); gap: 12px; }
.operation-choice { display: flex; align-items: flex-start; flex-direction: column; gap: 6px; text-align: left; padding: 16px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 5px; }
.operation-choice:hover { background: var(--soft); border-color: #829cc2; }
.operation-choice strong { font-size: .875rem; }
.operation-choice code { color: var(--blue); font-size: .8125rem; }
.operation-choice small { color: var(--muted); font-size: .75rem; }
.club-detail-sections { margin-top: 18px; border-top: 1px solid var(--line); }
.club-detail-sections details { border-bottom: 1px solid var(--line); padding: 12px 0; font-size: .875rem; }
.club-detail-sections summary { cursor: pointer; font-weight: 600; color: var(--blue); }
.entity-facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 16px; margin: 16px 0 8px; }
.entity-facts dt { color: var(--muted); font-size: .8125rem; }
.entity-facts dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.review-summary { display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 16px; }
.review-summary strong { display: block; font-size: 1.5rem; }
.review-summary span { font-size: .875rem; }
.diagnostic-row { display: flex; align-items: flex-start; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: .875rem; }
.diagnostic-row p { margin: 0; overflow-wrap: anywhere; }
.diagnostic-row .table-action { margin-top: 12px; }
.warning-text { color: #80600b; }
.art-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.art-comparison > div { padding: 16px; background: #f4f6f9; border: 1px solid var(--line); border-radius: 4px; }
.art-comparison span { display: block; font-size: .875rem; margin-bottom: 12px; }
.art-preview { width: 120px; height: 120px; max-width: 100%; object-fit: contain; }

@media(min-width:1600px) { main { padding: 28px 36px 48px; } .topnav { width: 230px; } .workspace, footer { margin-left: 230px; } }
@media(max-width:1200px) { .workspace { grid-template-columns: 190px minmax(0,1fr); } .topnav { width: 190px; } .workspace, footer { margin-left: 190px; } main { padding: 22px; } .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } .two-columns { grid-template-columns: 1fr; } }
@media(max-width:1000px) { .topnav { position: static; width: 100%; min-height: 0; display: flex; padding: 0 12px; overflow: auto; gap: 4px; } .topnav button { width: auto; flex-shrink: 0; margin: 0; border-left: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 14px 12px; } .topnav button.active { border-bottom-color: var(--brand-yellow); } .nav-label { display: none; } .workspace, footer { margin-left: 0; } .brand-caption { display: none; } }
@media(max-width:700px) {
  .masthead { min-height: 72px; padding: 12px 16px; gap: 10px; }
  .brand-logo { width: 42px; height: 42px; } .brand strong { font-size: 1.125rem; } .brand-subtitle { font-size: .65rem; }
  .private-label { display: none; } .ghost { padding: 8px 10px; }
  .workspace { display: block; } aside { padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
  aside > .section-label, aside > .sidebar-divider, aside > .sidebar-note, #project-meta, #country-list { display: none; }
  .sidebar-button { width: auto; font-size: .875rem; padding: 8px 0; }
  main { padding: 20px 16px 40px; } .heading { align-items: flex-start; } h1 { font-size: 1.5rem; }
  .country-grid, .competition-grid { grid-template-columns: 1fr; } .country-card { min-height: 135px; }
  .metric { padding: 16px 12px; } .metric strong { font-size: 1.5rem; } .metric-icon { display: none; }
  .metric span { font-size: .75rem; } .form-grid, .color-pair { grid-template-columns: 1fr; }
  .form-grid { padding: 0 16px 16px; } .dialog-head { padding: 16px; } .dialog-head h2 { font-size: 1.05rem; }
  .dialog-actions { padding: 16px; } .form-context { padding: 0 16px; } .panel { padding: 18px; }
  .facts { grid-template-columns: repeat(2,minmax(0,1fr)); } footer span:last-child { display: none; }
  .toolbar select { width: 100%; } .toolbar .result-count { margin-left: 0; } .pagination { gap: 8px; justify-content: space-between; font-size: .75rem; }
  .pagination button { padding: 8px; font-size: .75rem; } .login-view { margin: 32px 16px; } .login-card { padding: 24px; }
  .background-toolbar, .section-top { flex-direction: column; align-items: flex-start; } .selection-toolbar { gap: 10px; } .selection-toolbar button { margin-left: 0; }
  .background-grid { grid-template-columns: 1fr; } .background-card-image { aspect-ratio: 16/9; } .history-row { flex-wrap: wrap; }
}
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
