.designer { padding-block: 3rem 5rem; }
.designer-heading { margin-bottom: 2.5rem; }
.designer-heading > a { color: var(--muted); }
.designer-heading h1 { font-family: var(--display); font-size: clamp(2.4rem, 5vw, 4.5rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.1; margin-block: 1rem; }
.designer-heading h1 span { color: var(--blue); }
.designer-heading > p, .control-help { color: var(--muted); }
.designer-workspace { display: grid; grid-template-columns: 19rem minmax(0, 1fr); gap: 3rem; align-items: start; }
.designer-controls { padding: 1.5rem; background: var(--topic-bg); border: 1px solid var(--line); border-radius: .5rem; }
.color-wheel { width: 100%; aspect-ratio: 1; border-radius: 50%; position: relative; background: conic-gradient(#f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); cursor: crosshair; touch-action: none; margin-bottom: 1.5rem; }
.wheel-center { position: absolute; inset: 20%; border-radius: 50%; background: var(--paper); display: flex; flex-direction: column; justify-content: center; align-items: center; pointer-events: none; }
.wheel-center span { font-size: .875rem; color: var(--muted); }
.wheel-center strong { font-size: 1.15rem; }
.wheel-marker { position: absolute; width: 1.25rem; height: 1.25rem; border: 3px solid white; box-shadow: 0 0 0 2px #15191f; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.wheel-marker:first-child { width: 1.6rem; height: 1.6rem; }
.designer input, .designer select { font: inherit; min-width: 0; }
.designer input:not([type=range]), .designer select { width: 100%; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: .25rem; padding: .6rem; min-height: 2.75rem; }
.designer input[type=color] { padding: .2rem; cursor: pointer; }
.base-inputs { display: grid; grid-template-columns: 1fr 1.6fr; gap: .75rem; }
.base-inputs label, .control-label, .palette-actions > label { display: block; font-size: .875rem; }
.base-inputs input { margin-top: .35rem; }
.control-label { margin-top: 1.25rem; margin-bottom: .35rem; }
.designer select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23a4aeb9' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; padding-right: 2rem; }
.control-help { font-size: .875rem; margin-top: .6rem; }
.slider-label { display: flex; justify-content: space-between; gap: .5rem; font-size: .875rem; margin-top: 1.2rem; }
.slider-label output { color: var(--blue); white-space: nowrap; }
.designer input[type=range] { width: 100%; accent-color: var(--blue); min-height: 1.8rem; cursor: pointer; margin: .2rem 0 0; }
.designer-button { min-height: 2.75rem; padding: .55rem .9rem; background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: .25rem; cursor: pointer; font-size: .875rem; }
.designer-button:hover { border-color: var(--blue); color: var(--blue); }
.designer-button.primary { background: var(--blue); color: var(--paper); border-color: var(--blue); }
#randomize { margin-top: 1rem; width: 100%; }
.designer-results { min-width: 0; }
.designer h2 { font-size: 1.35rem; font-weight: 550; letter-spacing: -.025em; }
.section-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: 1rem; }
.section-heading > span { font-size: .875rem; color: var(--muted); }
.harmony-colors { display: flex; min-height: 10rem; border-radius: .35rem; overflow: hidden; }
.color-swatch { border: 0; cursor: pointer; text-align: left; font: inherit; display: flex; flex-direction: column; justify-content: end; padding: 1rem; min-width: 0; }
.harmony-colors .color-swatch { flex: 1; }
.color-swatch span { font-size: .875rem; }
.color-swatch strong { font-size: 1rem; font-weight: 600; }
.color-swatch:focus-visible { outline-offset: -5px; outline: 3px solid currentColor; }
.color-swatch:hover { box-shadow: inset 0 0 0 2px currentColor; }
.palette-section, .palette-actions, .saved-section { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.palette-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 1rem; }
.palette-scroll { overflow-x: auto; padding-bottom: .5rem; }
.palette-row { display: grid; grid-template-columns: repeat(var(--columns), minmax(4.5rem, 1fr)); margin-top: .5rem; }
.palette-row .color-swatch { padding: .8rem .35rem; min-height: 5.5rem; align-items: center; }
.palette-row .color-swatch strong { font-size: .75rem; }
.palette-row .color-swatch span { font-size: .75rem; }
.palette-row .is-base { box-shadow: inset 0 -4px 0 currentColor; }
.save-palette { display: flex; gap: .75rem; margin-top: .4rem; }
.save-palette input { flex: 1; }
.save-palette button { flex-shrink: 0; }
.export-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .8rem; }
.saved-palette { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-block: 1rem; }
.saved-palette > strong { flex: 1; overflow-wrap: anywhere; min-width: 8rem; }
.saved-preview { display: flex; }
.saved-preview span { width: 1.3rem; height: 1.8rem; }
#designer-status { position: sticky; bottom: 1rem; width: fit-content; margin: 1rem 0 0 auto; border-radius: .25rem; background: var(--ink); color: var(--paper); padding: 0; max-width: 100%; }
#designer-status:not(:empty) { padding: .6rem 1rem; }
.input-error { color: #ffb6ad; font-size: .875rem; margin-top: .5rem; }
@media (max-width: 1000px) { .designer-workspace { grid-template-columns: 16rem minmax(0, 1fr); gap: 1.5rem; } .designer-controls { padding: 1rem; } .harmony-colors { flex-wrap: wrap; } .harmony-colors .color-swatch { flex-basis: 40%; min-height: 6rem; } }
@media (max-width: 700px) { .designer-workspace { grid-template-columns: 1fr; } .color-wheel { max-width: 16rem; margin-inline: auto; } .designer { padding-top: 2rem; } .palette-settings { gap: 1rem; } .save-palette { flex-wrap: wrap; } .save-palette input { flex-basis: 100%; } .save-palette button { width: 100%; } }
