:root { --surface: #f5fafb; }
.primary-frame, .concept-selector[aria-pressed="true"] { background: var(--surface); }
.header { position: relative; }
#palette-trigger { cursor: pointer; }
#palette-trigger[aria-expanded="true"] { background: var(--surface); border-radius: 50%; }
.palette-control { position: absolute; top: calc(100% - 4px); right: 0; width: min(324px, calc(100vw - 48px)); max-height: calc(100svh - 100px); overflow-y: auto; padding: 16px; z-index: 5; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px #0b2e5318; }
.palette-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.palette-heading strong { font-weight: 400; font-size: 1.125rem; }
.palette-heading button { font-size: 1.5rem; cursor: pointer; color: var(--navy); }
.palette-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
button.palette-option { display: flex; width: 100%; height: auto; min-height: 48px; gap: 9px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .875rem; color: var(--navy); cursor: pointer; }
.palette-option[aria-pressed="true"] { border: 2px solid var(--teal); padding: 8px; background: var(--surface); }
.palette-swatch { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; }
.palette-control button:focus-visible, #palette-trigger:focus-visible, #custom-hue:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
#custom-control { margin-top: 18px; }
#custom-control label { font-size: .875rem; }
#custom-hue { display: block; width: 100%; height: 44px; margin: 4px 0; appearance: none; background: transparent; cursor: pointer; }
#custom-hue::-webkit-slider-runnable-track { height: 12px; border-radius: 8px; background: linear-gradient(90deg,red,yellow,lime,cyan,blue,magenta,red); }
#custom-hue::-webkit-slider-thumb { appearance: none; width: 24px; height: 24px; border: 3px solid white; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 1px var(--navy); margin-top: -6px; }
#custom-hue::-moz-range-track { height: 12px; border-radius: 8px; background: linear-gradient(90deg,red,yellow,lime,cyan,blue,magenta,red); }
#custom-hue::-moz-range-thumb { width: 20px; height: 20px; border: 3px solid white; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 1px var(--navy); }
.palette-status { font-size: .75rem; line-height: 1.4; color: var(--muted); margin: 12px 0 0; }
.palette-status:empty { display: none; }
#theme-signal { position: fixed; top: 0; left: 0; width: 3px; height: 24vh; background: linear-gradient(transparent,var(--teal),transparent); opacity: 0; pointer-events: none; z-index: 6; }
@media (max-width: 700px) { button.concept-selector { background: var(--surface); } }
