/* Token palettes are supplied by vendor/theme-bridge.css. */
/* Five lab palettes, keeping the existing hardware edges and cast-cap art. */
:root[data-theme="industrial"]{--cap-filter:sepia(.12) saturate(.8) hue-rotate(125deg)}
:root[data-theme="cobalt"]{--cap-filter:sepia(.5) saturate(1.7) hue-rotate(175deg) brightness(.9)}
:root[data-theme="ember"]{--cap-filter:sepia(.55) saturate(1.7) hue-rotate(325deg) brightness(.88)}
:root[data-theme="pine"]{--cap-filter:sepia(.45) saturate(1.4) hue-rotate(85deg) brightness(.86)}
:root[data-theme="plum"]{--cap-filter:sepia(.35) saturate(1.5) hue-rotate(235deg) brightness(.88)}
html[data-theme] .device{--texture-hue:0deg!important}
html[data-theme] .unit-carousel{background:var(--window-surface);border-color:var(--seam)}
html[data-theme] #rack.home-view,html[data-theme] #rack.picker-view{background:var(--rack-surface);border-color:var(--seam)}
html[data-theme] :is(.home-card,.picker-card,#parts button,.module-primary button,.unit-switcher,#menu-button,#unit-menu button,.toggle)::before{filter:var(--cap-filter)}
html[data-theme] .unit-heading #unit-name{color:var(--ink)}
html[data-theme] .parts-heading span{color:var(--muted)}
html[data-theme] .module-primary #go-tone[aria-current=true]::before{filter:var(--cap-filter) brightness(.75)}
html[data-theme] #rack .cell label,html[data-theme] #rack .cell output{background:none;box-shadow:none;color:var(--ink)}
/* Theme choices are deliberately small previews, not destructive changes. */
#identity-dialog::backdrop{background:#0a171d88}
#identity-form .theme-picker{margin:0;padding:0;border:0;min-width:0}
#identity-form .theme-picker legend{padding:0 0 5px;font-size:13px}
#identity-form .theme-picker legend small{font-size:10px;color:var(--muted)}
#identity-form .theme-options{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
#identity-form .theme-choice{position:relative;display:flex;flex-direction:column;gap:3px;padding:4px;color:var(--ink);background:var(--recess);border:2px solid transparent;font-size:11px;text-align:center;cursor:pointer}
#identity-form .theme-choice:has(input:checked){border-color:var(--accent-light)}
#identity-form .theme-choice:has(input:focus-visible){outline:2px solid #f7a52d;outline-offset:1px}
#identity-form .theme-choice input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.theme-swatch{display:flex;height:17px;gap:2px}.theme-swatch i{display:block;flex:1}
.industrial .theme-swatch i:nth-child(1){background:#e7e5dc}.industrial .theme-swatch i:nth-child(2){background:#455159}.industrial .theme-swatch i:nth-child(3){background:#ef6a25}
.cobalt .theme-swatch i:nth-child(1){background:#253d72}.cobalt .theme-swatch i:nth-child(2){background:#cbeafa}.cobalt .theme-swatch i:nth-child(3){background:#ffb039}
.ember .theme-swatch i:nth-child(1){background:#252c32}.ember .theme-swatch i:nth-child(2){background:#f15b32}.ember .theme-swatch i:nth-child(3){background:#ffe0aa}
.pine .theme-swatch i:nth-child(1){background:#1d4c46}.pine .theme-swatch i:nth-child(2){background:#d7efd0}.pine .theme-swatch i:nth-child(3){background:#e3b64e}
.plum .theme-swatch i:nth-child(1){background:#59346f}.plum .theme-swatch i:nth-child(2){background:#f1dafa}.plum .theme-swatch i:nth-child(3){background:#f2b55d}
#identity-form .theme-legacy{display:flex;align-items:center;gap:6px;margin-top:5px;font-size:11px;color:var(--ink)}
#identity-form .theme-legacy input{appearance:auto;width:15px;height:15px;margin:0;box-shadow:none;accent-color:var(--accent)}
/* The title is the display's focal point; context remains available but quiet. */
.screen{display:flex;flex-direction:column;justify-content:center}
.screen h1{font-size:44px;line-height:1;margin:2px 0 4px;min-width:0;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.screen .screen-top{font-size:10px;line-height:12px;height:12px;flex:none}
.screen[data-view="home"] .screen-top{display:none}
.screen #reference{font-size:9px;line-height:11px;margin:0;color:var(--glass-muted)}
html[data-theme] #unit-count{color:var(--accent-light)}
html[data-theme] .module-primary #go-tone[aria-current=true]::after{content:'';position:absolute;left:7px;top:12px;bottom:12px;width:3px;background:var(--accent);pointer-events:none}
html[data-theme] .module-primary #go-tone{padding-left:15px}
html[data-theme="industrial"] .right footer{color:#304443}
#identity-form .theme-choice{min-height:48px;font-size:13px}
.screen h1.multiline{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;overflow-wrap:anywhere;line-height:.95;max-height:1.9em}
/* Long unbroken names must never widen the hardware grid. */
.right{grid-template-columns:minmax(0,1fr)}
.screen,#rack{min-width:0;max-width:100%}
#identity-form .theme-legacy{min-height:44px}
@media(min-width:581px){#unit-name{overflow-wrap:anywhere}}
