:root {
  --background: #101927; --surface: #172337; --raised: #203049;
  --text: #edf3fc; --muted: #a5b4ca; --line: #34465f;
  --primary: #9ccbe5; --on-primary: #142335; --danger: #ffb4ab;
  --warning: #e6c78d; --focus: #c2e8ff; --scrollbar: #677e9d;
  --font-body: "Segoe UI", system-ui, sans-serif;
  --font-display: "Trebuchet MS", "Segoe UI", sans-serif;
  --font-mono: "Cascadia Code", ui-monospace, monospace;
  --radius: 10px; --radius-sm: 6px; --space: 16px;
  --control-height: 44px;
}
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--scrollbar) var(--background); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--background); }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: var(--radius-sm); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
::-webkit-scrollbar-thumb:active { background: var(--primary); }
html { scrollbar-gutter: stable; scroll-padding-top: 24px; }
::selection { background: var(--primary); color: var(--on-primary); }
input { caret-color: var(--primary); }
body { margin: 0; background: var(--background); color: var(--text); font: 14px/1.5 var(--font-body); }
button, input, select { font: inherit; }
button, a, select, summary, input[type="radio"], input[type="checkbox"] { cursor: pointer; }
button { color: inherit; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:not(:disabled):active { transform: translateY(1px); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
a { color: var(--primary); }
a:hover { color: var(--text); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); }
h1 { font-size: clamp(29px, 3vw, 40px); line-height: 1.2; letter-spacing: -.9px; margin: 6px 0 10px; }
h2 { font-size: 21px; line-height: 1.3; }
h3 { font-size: 15px; }
.muted, .storage-note { color: var(--muted); }
.eyebrow { font: 11px/1.4 var(--font-mono); letter-spacing: 1.6px; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 5; background: var(--surface); padding: 12px; }
.skip-link:focus { top: 12px; }
.topbar { border-bottom: 1px solid var(--line); height: 84px; padding: 0 max(24px, calc((100vw - 1500px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: bold; letter-spacing: 2px; }
.brand small { display: block; font: 11px var(--font-mono); letter-spacing: 1px; margin-top: 3px; color: var(--muted); }
.brand-mark { font: italic bold 38px var(--font-display); color: var(--primary); border: 1px solid var(--line); width: 45px; height: 45px; line-height: 41px; text-align: center; border-radius: var(--radius-sm); }
.top-actions { display: flex; gap: 24px; align-items: center; }
.local-badge { color: var(--muted); font-size: 12px; }
.local-badge span { color: var(--primary); margin-right: 5px; }
main { max-width: 1548px; padding: 32px 24px 0; margin: auto; }
.page-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 25px; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.nation-selection { width: min(100%, 1040px); margin-inline: auto; padding: clamp(24px, 5vw, 56px) 0 42px; }
.nation-selection-heading { max-width: 580px; margin-bottom: 28px; }
.nation-selection-heading .eyebrow { margin-bottom: 6px; }
.nation-selection-heading .muted { max-width: 510px; }
.nation-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; min-height: 150px; }
.nation-choice { --nation: var(--primary); --nation-back: var(--raised); display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; column-gap: 13px; text-align: left; min-height: 108px; padding: 18px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: background 120ms, border-color 120ms; }
.nation-choice:hover:not(:disabled), .nation-choice:focus-visible { background: var(--raised); border-color: var(--nation); }
.nation-choice-mark { grid-row: 1 / span 2; display: grid; place-items: center; width: 40px; height: 40px; color: var(--nation); background: color-mix(in srgb, var(--nation) 12%, var(--surface)); border-radius: var(--radius); font: 600 13px var(--font-display); letter-spacing: .04em; }
.nation-choice-mark svg { width: 25px; height: 25px; }
.nation-choice.nation-lm { --nation: #e5a6c5; }
.nation-choice strong { overflow-wrap: anywhere; font-size: 16px; }
.nation-choice small { color: var(--muted); font: 11px var(--font-mono); }
.button { min-height: var(--control-height); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border-radius: var(--radius-sm); border: 1px solid var(--line); padding: 9px 16px; font-weight: 600; transition: background 120ms, border-color 120ms; }
.secondary { background: transparent; }
.secondary:hover:not(:disabled) { background: var(--raised); border-color: var(--muted); }
.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.primary:hover:not(:disabled) { background: var(--focus); }
.danger { color: var(--danger); background: transparent; border-color: var(--danger); }
.danger:hover:not(:disabled) { background: var(--raised); }
.sample-banner { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 28px; font-size: 12px; }
.sample-tag { color: var(--warning); border: 1px solid var(--line); padding: 1px 5px; font: 11px/1.6 var(--font-mono); }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 28px; align-items: start; }
.section-heading, .deck-header { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.section-heading { margin-bottom: 20px; flex-wrap: wrap; }
.catalogue, .deck-panel { min-width: 0; }
.workspace-nav { display: none; }
.section-heading .eyebrow { margin-bottom: 6px; }
.set-code { font: 12px var(--font-mono); color: var(--primary); border: 1px solid var(--line); padding: 6px 9px; white-space: nowrap; border-radius: var(--radius-sm); }
input, select { color: var(--text); background: var(--background); border: 1px solid var(--line); border-radius: var(--radius-sm); }
input:focus, select:focus { border-color: var(--primary); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); }
.search-control { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 0 10px 0 14px; }
.search-control > svg { color: var(--muted); width: 20px; height: 20px; flex-shrink: 0; }
.search-control:focus-within { border-color: var(--primary); }
.search-control input { min-width: 0; width: 100%; border: 0; background: transparent; padding: 13px 0; outline-offset: 0; }
input[type="search"]::-webkit-search-cancel-button { display: none; }
input::placeholder { color: var(--muted); opacity: .85; }
.filter-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.filter-row label { color: var(--muted); font-size: 12px; font-weight: 600; }
.chip-filter { min-width: 0; margin: 14px 0 0; padding: 0; border: 0; }
.chip-filter legend { margin-bottom: 7px; padding: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip { position: relative; cursor: pointer; }
.filter-chip span { display: flex; align-items: center; justify-content: center; min-width: var(--control-height); min-height: var(--control-height); padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--background); color: var(--muted); font-size: 13px; font-weight: 600; }
.filter-chip:hover input:not(:disabled) + span { border-color: var(--primary); color: var(--text); }
.filter-chip input:checked + span { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.filter-chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.filter-chip:has(input:disabled) { cursor: default; }
@media (forced-colors: active) { .filter-chip input:checked + span { outline: 2px solid Highlight; outline-offset: -3px; } }
select { display: block; width: 100%; padding: 9px; margin-top: 5px; min-height: var(--control-height); font-size: 13px; }
.results-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 20px 0 16px; min-height: 20px; }
.destination-hint { color: var(--warning); font: 11px var(--font-mono); letter-spacing: .4px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; min-height: var(--control-height); cursor: pointer; }
.checkbox-label input { width: 16px; height: 16px; }
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 15px; min-height: 150px; }
.card-tile { min-width: 0; display: flex; flex-direction: column; }
.card-preview { display: block; border: 0; border-radius: var(--radius); padding: 0; background: transparent; width: 100%; text-align: left; }
.card-preview:hover, .card-preview:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.card-art { position: relative; aspect-ratio: 2 / 2.8; width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: transform 140ms, border-color 140ms; display: flex; flex-direction: column; padding: 10px; }
.nation-de { --nation: #e29e83; --nation-back: #422f31; }
.nation-ds { --nation: #b9a5de; --nation-back: #322d49; }
.nation-bg { --nation: #96badd; --nation-back: #243c50; }
.nation-ks { --nation: #e3c982; --nation-back: #423d2f; }
.nation-st { --nation: #91cbbb; --nation-back: #25433e; }
.art-body { flex: 1; min-height: 0; display: grid; place-items: center; background: var(--nation-back); border-radius: 5px; position: relative; }
.art-body::after { content: "ARTWORK PENDING"; position: absolute; bottom: 9px; color: var(--nation); font: 11px var(--font-mono); letter-spacing: 1px; }
.art-body svg { width: 70%; height: 70%; color: var(--nation); opacity: .8; }
.art-grade { position: absolute; top: 8px; left: 8px; color: var(--nation); font: 11px var(--font-mono); }
.art-nation { color: var(--nation); font: 11px var(--font-mono); text-transform: uppercase; letter-spacing: .8px; margin: 8px 0 4px; }
.art-name { font-family: var(--font-display); font-size: clamp(11px, 1.05vw, 14px); line-height: 1.3; min-height: 37px; overflow-wrap: anywhere; }
.art-code { color: var(--muted); font: 11px var(--font-mono); margin-top: 6px; }
.card-info { display: flex; justify-content: space-between; gap: 6px; margin: 9px 0 5px; color: var(--muted); font: 11px var(--font-mono); }
.card-title { display: block; font-size: 13px; line-height: 1.5; min-height: 39px; overflow-wrap: anywhere; margin-bottom: 10px; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.card-bottom .in-deck { font-size: 11px; color: var(--muted); }
.add-button { background: var(--raised); border: 1px solid var(--line); border-radius: 5px; min-height: var(--control-height); min-width: 64px; padding: 7px 10px; font-size: 12px; }
.add-button:hover:not(:disabled) { background: var(--primary); color: var(--on-primary); }
.load-more { display: block; margin: 25px auto; min-width: 180px; }
.deck-panel { scroll-margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: sticky; top: 20px; max-height: calc(100dvh - 40px); overflow-y: auto; scrollbar-gutter: stable; }
.draft-badge { font-size: 11px; color: var(--primary); background: var(--raised); padding: 3px 7px; border-radius: 4px; }
.deck-name { min-height: var(--control-height); font: bold 23px var(--font-display); background: transparent; border: 1px solid transparent; width: 100%; margin: 12px 0 3px; padding: 5px 0; }
.deck-name:hover { border-bottom-color: var(--line); }
.deck-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px; color: var(--muted); font-size: 11px; }
.counts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 22px 0; padding: 14px 0; border-block: 1px solid var(--line); }
.counts > div { display: flex; flex-direction: column; padding-left: 14px; border-left: 1px solid var(--line); }
.counts > div:first-child { padding: 0; border: 0; }
.counts strong { font: 26px var(--font-display); font-variant-numeric: tabular-nums; }
.counts strong span { color: var(--muted); font-size: 13px; margin-left: 3px; }
.counts small { color: var(--muted); font-size: 11px; }
.destination { min-width: 0; border: 0; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.destination legend { color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.destination label { font-size: 12px; display: flex; align-items: center; gap: 8px; min-height: var(--control-height); padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.destination label:hover { background: var(--raised); }
.destination label:has(:checked) { background: var(--raised); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.destination label:has(:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.deck-section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin: 18px 0 10px; }
.deck-section-heading > span { font: 11px var(--font-mono); color: var(--muted); }
.deck-grade-counts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 12px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.deck-grade-counts > span { white-space: nowrap; }
.deck-grade-counts strong { color: var(--text); font-weight: 600; }
.ride-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.ride-slot { min-height: 105px; background: var(--background); border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 7px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ride-slot .grade { color: var(--muted); font: 11px var(--font-mono); }
.ride-slot .slot-empty { color: var(--muted); margin: auto; font-size: 24px; }
.ride-slot .slot-name { font-size: 11px; line-height: 1.4; word-break: normal; overflow-wrap: anywhere; flex: 1; }
.ride-slot button { margin-top: auto; padding: 3px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 3px; font-size: 11px; min-height: var(--control-height); }
.ride-slot button:hover { color: var(--text); background: var(--raised); }
.deck-list { max-height: 330px; overflow-y: auto; scrollbar-gutter: stable; padding-right: 5px; }
.gzone-panel { margin-top: 20px; padding: 14px; background: color-mix(in srgb, var(--raised) 65%, var(--surface)); border: 1px solid var(--line);  border-radius: var(--radius-sm); }
.gzone-panel .deck-section-heading { margin-top: 0; }
.gzone-panel .deck-list { max-height: 220px; }
.deck-row { display: flex; gap: 9px; padding: 9px 0; align-items: center; border-bottom: 1px solid var(--line); }
.grade-chip { color: var(--nation); background: var(--nation-back); border: 0; border-radius: 4px; width: 36px; height: var(--control-height); flex-shrink: 0; font: 14px var(--font-mono); }
.grade-chip:hover { outline: 1px solid var(--nation); }
.row-description { min-width: 0; flex: 1; }
.row-description strong { display: block; font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.row-description small { color: var(--muted); font: 11px var(--font-mono); }
.quantity { display: flex; align-items: center; gap: 6px; }
.quantity button { width: 32px; height: var(--control-height); border: 1px solid var(--line); background: var(--background); border-radius: 4px; }
.quantity button:hover { background: var(--raised); }
.quantity span { font-variant-numeric: tabular-nums; font-size: 12px; min-width: 10px; text-align: center; }
.empty-deck { text-align: center; border: 1px dashed var(--line); padding: 26px 12px; border-radius: var(--radius-sm); color: var(--muted); font-size: 12px; }
.empty-deck strong { display: block; color: var(--text); margin-bottom: 5px; font-weight: 500; }
.validation { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.validation summary { color: var(--warning); display: flex; justify-content: space-between; min-height: var(--control-height); align-items: center; }
.validation summary:hover { color: var(--text); }
.validation ul { padding-left: 17px; }
.validation li { margin-bottom: 5px; }
.validation > p { margin: 10px 0; font-size: 14px; }
.deck-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px; }
.deck-actions .button { font-size: 12px; }
.image-export { margin-top: 12px; }
.image-export-status { min-height: 2.8em; margin: 6px 0 0; font-size: 13px; }
.storage-note { text-align: center; font-size: 14px; margin-top: 12px; }
.inline-error, .field-error { color: var(--danger); font-size: 12px; }
.inline-error { padding: 12px; border: 1px solid var(--danger); border-radius: var(--radius-sm); margin: 12px 0; }
.inline-error .button { margin-top: 10px; }
.loading, .empty-state { grid-column: 1/-1; padding: 40px 15px; text-align: center; color: var(--muted); }
.empty-state .button { margin-top: 15px; }
footer { display: flex; justify-content: space-between; gap: 15px; padding: 30px 0; margin-top: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
dialog { color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; width: min(780px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 24px;  overflow-y: auto; }
dialog::backdrop { background: #080e19cc; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.icon-button { font-size: 23px; width: var(--control-height); height: var(--control-height); background: transparent; border: 0; border-radius: var(--radius-sm); flex-shrink: 0; }
.icon-button:hover { background: var(--raised); }
.detail-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 25px; }
.detail-layout .art-name { font-size: 18px; }
.detail-layout .art-code, .detail-layout .art-nation { font-size: 11px; }
.detail-copy { min-width: 0; }
.detail-copy .eyebrow { color: var(--primary); }
.detail-copy h3 { font-size: 24px; margin: 8px 0 18px; }
.detail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.detail-stats div { padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.detail-stats dt { display: block; color: var(--muted); font-size: 12px; }
.detail-stats dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 14px; }
.detail-art { align-self: start; }
.area-art { aspect-ratio: 0.71; width: 100%; background: var(--raised); border-radius: var(--radius-sm); overflow: hidden; }
.area-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.detail-art .area-art { max-width: 240px; margin: auto; }
.detail-art > p { font-size: 12px; }
.detail-section { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 18px; }
.detail-section h4 { font-size: 16px; margin: 0; }
.card-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.flavor-text { font-style: italic; color: var(--muted); }
.detail-source { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.detail-source summary { cursor: pointer; font-size: 13px; }
.detail-copy p { margin: 12px 0; font-size: 13px; }
.detail-copy .button { margin-top: 18px; width: 100%; }
.detail-copy a { font-size: 12px; }
.library-row { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 15px 0; }
.library-row > div { flex: 1; min-width: 0; }
.library-row strong { overflow-wrap: anywhere; }
.library-row small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.library-row .button { padding: 7px 10px; }
#confirm-dialog { max-width: 440px; }
#confirm-dialog p { color: var(--muted); margin: 15px 0 25px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.notification { position: fixed; bottom: max(22px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--raised); color: var(--text); box-shadow: 0 6px 30px #0006; border-radius: var(--radius-sm); max-width: min(90vw, 500px); font-size: 13px; z-index: 10; }
.notification:not(:empty) { border: 1px solid var(--line); padding: 12px 20px; }
@media (min-width: 1400px) { .card-grid { grid-template-columns: repeat(5,minmax(0,1fr)); } }
@media (max-width: 1150px) { .workspace { grid-template-columns: minmax(0,1fr) 350px; gap: 20px; } .card-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } .deck-panel { padding: 16px; } }
@media (max-width: 900px) { .workspace { grid-template-columns: 1fr; } .deck-panel { position: static; max-height: none; overflow: visible; } .workspace-nav { display: flex; gap: 8px; width: 100%; } .workspace-nav a { flex: 1; } .card-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } .art-name { font-size: 13px; } .deck-list { max-height: 420px; } }
@media (max-width: 560px) { .topbar { height: 72px; padding: 0 16px; } .brand { font-size: 11px; letter-spacing: 0; gap: 8px; } .brand small { font-size: 11px; letter-spacing: 0; } .brand-mark { display: none; width: 34px; height: 36px; line-height: 32px; font-size: 30px; } .local-badge { display: none; } main { padding: 24px 16px 0; } .top-actions .button { font-size: 12px; padding: 8px 10px; } .page-heading { align-items: flex-start; flex-direction: column; } .page-actions { justify-content: flex-start; } .page-heading .button { font-size: 11px; padding: 8px 10px; flex-shrink: 0; } h1 { font-size: 27px; } .eyebrow { font-size: 11px; } h2 { font-size: 18px; } .sample-banner { padding: 10px; } .nation-selection { padding-top: 20px; } .nation-grid { grid-template-columns: 1fr; } .filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .filter-row select { font-size: 16px; padding: 8px; } .search-control input, .deck-name { font-size: 16px; } .results-toolbar { flex-wrap: wrap; } .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .art-name { font-size: 14px; } footer { flex-direction: column; } .detail-layout { grid-template-columns: 1fr; } .detail-layout .card-art, .detail-layout .area-art { max-width: 220px; margin: auto; } dialog { padding: 18px; } .library-row { flex-wrap: wrap; } .library-row > div { flex-basis: 100%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { * { scrollbar-color: auto; } .card-art, .button, .ride-slot { border: 1px solid CanvasText; } }

/* Private account/library surfaces inherit the studio's canonical tokens. */
.top-actions { flex-wrap: wrap; justify-content: flex-end; }
.account-form, .share-entry { display: grid; gap: 12px; }
.account-form input, .share-entry input, #share-link { width: 100%; min-height: var(--control-height); padding: 10px 12px; color: var(--text); background: var(--background); border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; font-size: 16px; }
#auth-dialog { max-width: 540px; }
#auth-dialog p, .shared-section li, .library-row strong { overflow-wrap: anywhere; }
#auth-error, #share-copy-status { min-height: 24px; }
.share-entry { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.shared-section { padding-block: 10px; border-top: 1px solid var(--line); }
.shared-section h4 { margin: 0 0 8px; }
.shared-section ul { margin: 0; padding-left: 20px; }
.library-row { flex-wrap: wrap; gap: 10px; }
.library-row > div { flex: 1 1 240px; min-width: 0; }
.library-row .button { flex-shrink: 0; }
@media (max-width: 600px) {
  .topbar { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
  .top-actions { width: 100%; justify-content: flex-start; }
  .top-actions .local-badge { display: none; }
  .top-actions #account-name { width: 100%; }
  .library-row .button { flex: 1 1 42%; }
}
.topbar { height: auto; min-height: 84px; padding-block: 16px; }
@media (max-width: 900px) { .top-actions .local-badge { display: none; } }
