@import url('site-palette.css');
@import url('button-hover.css');
/* Text and structural ink are separate: dark mode keeps black edges and shadows. */
/* Crossfade the complete page so button shadows stay inside the capture. */
html[data-theme-motion] body *{view-transition-name:none!important}
html[data-theme-motion]::view-transition-group(*){animation-duration:0s}
html[data-theme-motion]::view-transition-old(*),html[data-theme-motion]::view-transition-new(*){display:block;mix-blend-mode:normal;object-fit:fill;height:auto}
html[data-theme-motion]::view-transition-old(*){animation:theme-out 320ms 200ms ease both}
html[data-theme-motion]::view-transition-new(*){animation:theme-in 320ms 200ms ease both}
@keyframes theme-out{to{opacity:0}}
@keyframes theme-in{from{opacity:0}to{opacity:1}}
@supports(view-transition-name:root){html[data-theme-motion] body *{transition:none!important}}
@supports not (view-transition-name:root){
 html[data-theme-motion],html[data-theme-motion] body,html[data-theme-motion] body *{transition:background-color 320ms 200ms,color 320ms 200ms,border-color 320ms 200ms!important}
 html[data-theme-motion] .site-header nav,html[data-theme-motion] .site-header nav *{transition-delay:0ms!important}
}
:root{--on-accent:#252628}
#station-resume{border-radius:999px}
.header-device-controls{position:relative;display:flex;align-items:center;flex:none}
.site-header #theme-toggle{position:absolute;left:calc(100% + max(8px,2vw - 17px));top:50%;translate:0 -50%;display:grid;place-items:center;flex:none;width:34px;min-width:34px;height:48px;min-height:48px;padding:0;border:0;background:transparent;box-shadow:none;transform:none;touch-action:manipulation}
.theme-switch-track{position:relative;display:block;width:26px;height:44px;border:2px solid var(--border);border-radius:999px;background:#ddd;box-shadow:2px 3px 0 #000;transition:background .18s}
.theme-switch-thumb{position:absolute;left:3px;top:3px;width:16px;height:18px;border:2px solid #252628;border-radius:999px;background:#fff;box-shadow:0 1px 0 #000;transition:translate .18s ease}
#theme-toggle[aria-checked=true] .theme-switch-track{background:#555}
#theme-toggle[aria-checked=true] .theme-switch-thumb{translate:0 16px;background:#fff}
#theme-toggle:hover .theme-switch-thumb{background:var(--yellow)}
@media(max-width:1600px){.site-header{padding-right:64px}.site-header #theme-toggle{left:calc(100% + 14px)}}
@media(max-width:700px){.header-device-controls{margin-left:auto}}
@media(prefers-reduced-motion:reduce){.theme-switch-track,.theme-switch-thumb{transition:none}}

:root[data-theme=dark]{color-scheme:dark;--soft-grey:#414147;--hover-fill:var(--soft-grey);--ink:#f2f0e8;--border:#000;--line:var(--border);--muted:#c3c1ba;--gold:#f9d84a;background:var(--bg);color:var(--ink)}
[data-theme=dark] :is(input,textarea)::placeholder{color:#c3c1ba}
[data-theme=dark] :is(button,.button):hover{background:var(--soft-grey);color:var(--ink)}
[data-theme=dark] :is(button:disabled,.button[aria-disabled=true]){background:#414147!important;color:#aaa8a2!important;border-color:var(--border)!important}
[data-theme=dark] :is(.notice,.issue.warning){background:#443d27;color:var(--ink)}
[data-theme=dark] .issue{background:#492f2c;color:var(--ink)}
[data-theme=dark] #issues .issue{background:#492f2c;color:var(--ink)}
[data-theme=dark] #issues .issue.warning{background:#443d27}
[data-theme=dark] #issues .issue-message{border-left-color:color-mix(in srgb,var(--muted) 30%,transparent)}
[data-theme=dark] :is(.form-error,.error){color:#ffb9a9}
[data-theme=dark] .category-shelf-heading::before,[data-theme=dark] .category-shelf-heading::after{background:var(--dot-color)}
[data-theme=dark] #arcade-workspace #browse-quick select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23f2f0e8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
[data-theme=dark] .explorer-location-select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23f2f0e8' stroke-width='2'/%3E%3C/svg%3E")}
[data-theme=dark] :is(.explorer-empty,.explorer-entry-type,.explorer-entry-size,.explorer-entry-sd-size,.explorer-entry-author,.explorer-path-separator){color:var(--muted)}
[data-theme=dark] :is(.explorer-tools,.explorer-places,.explorer-columns,.explorer-height-resize){border-color:var(--border)}
/* Keep dark ink on the original bright accent fills. */
[data-theme=dark] :is(.primary,.danger,.tag,.cover-placeholder,.cover-count,.community-tag,.community-toast,.review-metrics>div,.table-scroll th,.review-resolution legend,.file-type-badge,.sd-badge,.selection-count,#working,.explorer-titlebar,.explorer-folder-badge,.explorer-entry.selected,.explorer-drop-target,.explorer-tree-row[aria-selected=true],.game-row.selected,.folder-line.selected){color:var(--on-accent)}
[data-theme=dark] :is(.primary,.danger):hover{color:var(--on-accent);background:var(--mint)}
[data-theme=dark] .danger:hover{background:var(--coral)}
[data-theme=dark] :is(.builder-toolbar #build-cart,.builder-toolbar #sd-export,#new-cart,#new-folder,#cart-details,#test-cart,#station-resume,#builder-scan,#merge-device,.action-device,#device-browse,#device-deep,#device-install,.game-play,.export-game,#drop-choose,#zip-confirm,label.button:has(input[type=file]),.cart-cover-upload,.explorer-tools .explorer-cart-action,.explorer-tools .explorer-file-action,.explorer-view-buttons button[aria-pressed=true],.explorer-scratch-heading button[aria-pressed=true]){color:var(--on-accent)}
[data-theme=dark] .preview-station .station-icon-row>.station-icon:not(.social-icon){color:var(--on-accent)}
[data-theme=dark] .preview-station .station-icon-row>.social-icon{color:var(--ink)}
[data-theme=dark] .preview-station .station-icon-row>[data-action=like]:is(:hover,.is-selected){color:#ff9bb5}
[data-theme=dark] .preview-station .station-icon-row>[data-action=favorite]:is(:hover,.is-selected){color:var(--yellow)}
[data-theme=dark] :is(.game-row:hover,.folder-row:hover,.folder-line.selected .folder-row,.folder-line.selected .folder-toggle,.explorer-tree-row:hover,.explorer-entry.selected .explorer-entry-size,.explorer-entry.selected .explorer-entry-sd-size,.explorer-entry.selected .explorer-entry-author){color:var(--on-accent)}
[data-theme=dark] .builder-view-switch button[aria-pressed=true]{color:var(--on-accent)}
[data-theme=dark] .builder-view-switch button[aria-pressed=false]{color:var(--ink)}
[data-theme=dark] .site-header #connection-menu{--connection-fill:var(--soft-grey)}
[data-theme=dark] .site-header #connection-menu:is([data-display-state=connected],[data-display-state=busy],[data-display-state=error])>summary{color:var(--on-accent)}
[data-theme=dark] .site-header #connection-menu[data-display-state=connected]{--connection-fill:var(--sage)}
[data-theme=dark] .site-header #connection-menu[data-display-state=busy]{--connection-fill:var(--lavender)}
[data-theme=dark] .site-header #connection-menu[data-display-state=error]{--connection-fill:var(--coral)}
[data-theme=dark] .drop-bubble{color:var(--on-accent);border-color:var(--border)}
[data-theme=dark] .drop-bubble :is(.drop-open,.drop-icon){color:var(--on-accent)}
[data-theme=dark] :is(.arcade-drag-player,.arcade-drag-cart,.arcade-drag-ghost>.drag-caption){color:var(--on-accent)}
[data-theme=dark] .picker-format-rows code,[data-theme=dark] .picker-archive h3 code{color:var(--on-accent)}
[data-theme=dark] .picker-elf dt code{background:var(--soft-grey);color:var(--ink)}
[data-theme=dark] .selection-contents :is(.toc-folder summary,.toc-game button):hover{background:var(--soft-grey);color:var(--ink)}
[data-theme=dark] .station-navigation button:hover{background:var(--soft-grey);color:var(--ink)}
@media(forced-colors:active){.theme-switch-track,.theme-switch-thumb{forced-color-adjust:auto}[data-theme=dark] #arcade-workspace #browse-quick select{appearance:auto;background-image:none}}
.site-header .header-device-controls .connection-menu{order:0;margin-left:0}
[data-theme=dark] .brand-wordmark{content:url("assets/brand/wordmark-dark.svg")}
[data-theme=dark] #device-panel .device-install-footer{background:var(--soft-grey)}
[data-theme=dark] #drop-bubble :is(#drop-kind,#drop-add,#unload-cart){color:var(--on-accent)}
[data-theme=dark] #issues>.success{color:var(--on-accent)}
[data-theme=dark] .builder-explorer .explorer-button:not(:disabled):hover{background:var(--mint);color:var(--on-accent)}
[data-theme=dark] .explorer-tree-row:is(:hover,[aria-selected=true]) .explorer-tree-toggle{color:var(--on-accent)}
[data-theme=dark] #browse-quick .community-check input[type=checkbox]:checked{color:var(--on-accent)}

/* Solid accent surfaces keep dark pictograms as well as dark labels. */
[data-theme=dark] :is(.device-warning-icon .ui-icon,.sample-cart-ghost .ui-icon,#issues .issue-symbol){color:var(--on-accent)}


