:root {
  color-scheme: dark;
  --bg: #090b12;
  --panel: #0e111b;
  --panel-2: #121621;
  --line: rgba(220, 225, 245, .09);
  --line-strong: rgba(220, 225, 245, .16);
  --text: #f0eff6;
  --muted: #8a8e9c;
  --dim: #5f6574;
  --mint: #a5e1cf;
  --violet: #b7a6ec;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --sans: Inter, 'Segoe UI', system-ui, sans-serif;
  --serif: Georgia, 'Times New Roman', serif;
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--text); background: radial-gradient(ellipse at 56% 0%, rgba(56, 51, 85, .13), transparent 38%), var(--bg); }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
::selection { color: #09100e; background: var(--mint); }

.app-shell { width: min(100%, 1920px); margin: 0 auto; min-height: 100vh; }
.topbar { height: 66px; padding: 0 28px; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; border-bottom: 1px solid var(--line); background: rgba(9, 11, 18, .92); position: relative; z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; color: var(--text); text-decoration: none; }
.brand-mark { width: 28px; height: 28px; border: 1px solid rgba(165, 225, 207, .36); border-radius: 50%; position: relative; display: inline-block; transform: rotate(-33deg); }
.brand-mark i { position: absolute; inset: 5px 3px; border: 1px solid var(--mint); border-radius: 50%; opacity: .82; }
.brand-mark i:nth-child(2) { inset: 3px 7px; transform: rotate(55deg); }
.brand-mark i:nth-child(3) { inset: 7px 4px; transform: rotate(-51deg); opacity: .46; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 10px; letter-spacing: .18em; font-weight: 600; }
.brand-copy small { color: var(--dim); font: 8px var(--mono); letter-spacing: .08em; }
.topbar-center { justify-self: center; display: flex; gap: 9px; align-items: center; color: #848895; font: 9px var(--mono); letter-spacing: .14em; white-space: nowrap; }
.topbar-center b { margin-left: 3px; color: #bfc2d0; font-weight: 400; }
.live-dot, .status-pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); display: inline-block; box-shadow: 0 0 9px rgba(165, 225, 207, .72); }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 20px; }
.device-status { color: #969ba8; font: 8px var(--mono); letter-spacing: .11em; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.status-pulse { width: 5px; height: 5px; }
.icon-button { min-height: 34px; display: inline-flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 5px; color: #d8d9e2; background: transparent; cursor: pointer; font-size: 10px; transition: border-color .2s, color .2s, background .2s; }
.icon-button:hover { border-color: rgba(165, 225, 207, .42); color: var(--mint); background: rgba(165, 225, 207, .05); }
.icon-button svg, .subtle-control svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

.layout { min-height: calc(100vh - 66px); display: grid; grid-template-columns: 216px minmax(400px, 1fr) 292px; }
.left-rail { min-height: 100%; border-right: 1px solid var(--line); padding: 31px 15px 18px; display: flex; flex-direction: column; background: rgba(12, 14, 22, .64); }
.rail-section { width: 100%; }
.section-kicker { color: #737987; font: 8px var(--mono); letter-spacing: .13em; }
.rail-section > .section-kicker { display: flex; justify-content: space-between; padding: 0 10px; }
.rail-section > .section-kicker span:last-child { color: #505562; }
.fractal-nav { display: grid; gap: 5px; margin-top: 16px; }
.fractal-link { border: 1px solid transparent; min-height: 54px; width: 100%; padding: 6px 8px; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; background: transparent; border-radius: 5px; transition: background .2s, border-color .2s; }
.fractal-link:hover { background: rgba(255,255,255,.028); }
.fractal-link.is-active { border-color: rgba(165, 225, 207, .14); background: linear-gradient(100deg, rgba(165, 225, 207, .085), rgba(165, 225, 207, .015)); }
.nav-symbol { display: grid; place-items: center; flex: 0 0 31px; height: 31px; border-radius: 50%; border: 1px solid rgba(181, 165, 233, .28); color: #b9a9e9; font: italic 16px var(--serif); background: radial-gradient(circle at 40% 38%, rgba(181, 165, 233, .18), rgba(181, 165, 233, .015) 72%); }
.julia-symbol { color: #a8dacc; border-color: rgba(168,218,204,.27); background: radial-gradient(circle at 40% 38%, rgba(168,218,204,.16), transparent 75%); }
.ship-symbol { color: #e4a975; border-color: rgba(228,169,117,.25); background: radial-gradient(circle at 40% 38%, rgba(228,169,117,.16), transparent 75%); }
.tri-symbol { color: #d993bd; border-color: rgba(217,147,189,.25); background: radial-gradient(circle at 40% 38%, rgba(217,147,189,.16), transparent 75%); }
.newton-symbol { color: #91aee8; border-color: rgba(145,174,232,.25); background: radial-gradient(circle at 40% 38%, rgba(145,174,232,.16), transparent 75%); }
.nav-label { display: grid; flex: 1; gap: 3px; min-width: 0; }
.nav-label strong { font-size: 11px; font-weight: 500; color: #c5c7d0; }
.fractal-link.is-active .nav-label strong { color: #ecf3f0; }
.nav-label small { color: #666b78; font: 7px var(--mono); letter-spacing: .1em; }
.nav-arrow { color: #9298a5; font-size: 11px; opacity: 0; transition: opacity .2s; }
.fractal-link.is-active .nav-arrow, .fractal-link:hover .nav-arrow { opacity: .8; }
.rail-note { margin-top: auto; padding: 13px 10px; min-height: 99px; display: flex; gap: 10px; align-items: flex-start; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.note-orbit { width: 25px; height: 25px; margin-top: 3px; flex: 0 0 25px; border: 1px solid rgba(165,225,207,.42); border-radius: 50%; transform: rotate(-32deg); position: relative; }
.note-orbit i { position: absolute; width: 9px; height: 9px; border: 1px solid var(--mint); border-radius: 50%; top: -4px; left: 7px; }
.note-orbit b { position: absolute; width: 3px; height: 3px; background: var(--mint); border-radius: 50%; top: 10px; left: 15px; box-shadow: 0 0 6px var(--mint); }
.note-label { color: #9da3ae; font: 7px var(--mono); letter-spacing: .1em; }
.rail-note p { color: #777d8b; margin: 5px 0 0; font-size: 9px; line-height: 1.6; }
.rail-footer { display: flex; justify-content: space-between; padding: 13px 10px 0; color: #555b68; font: 7px var(--mono); letter-spacing: .08em; }

.workspace { min-width: 0; padding: 26px clamp(22px, 3vw, 43px) 14px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 17px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: #888d9b; font: 8px var(--mono); letter-spacing: .14em; }
.eyebrow-line { width: 18px; height: 1px; background: var(--mint); opacity: .8; }
h1 { margin: 8px 0 3px; font: 500 clamp(25px, 2.6vw, 36px)/1.15 var(--serif); letter-spacing: -.025em; }
h1 em, .discover h2 em { color: var(--mint); font-weight: 500; }
.page-intro { margin: 0; color: #858a98; font-size: 10px; }
.text-button { flex: 0 0 auto; border: 0; padding: 8px 0 7px 12px; background: transparent; color: #bfc3cf; cursor: pointer; font-size: 10px; transition: color .2s; }
.text-button:hover { color: var(--mint); }
.sparkle { color: #d4b0e8; padding-right: 5px; font-size: 13px; vertical-align: -1px; }
.stage-wrap { min-width: 0; }
.stage-topline { height: 28px; display: flex; align-items: flex-start; justify-content: space-between; color: #737988; font: 8px var(--mono); letter-spacing: .12em; }
.stage-topline > span:first-child { display: flex; align-items: center; gap: 7px; }
.tiny-star { color: var(--mint); font-size: 10px; }
.stage-topline i { color: #4e5360; font-style: normal; padding: 0 3px; }
.stage { width: 100%; aspect-ratio: 1.62; min-height: 290px; max-height: 570px; position: relative; overflow: hidden; border: 1px solid rgba(200, 206, 232, .14); border-radius: 4px; background: radial-gradient(ellipse at center, #121527, #080a11 72%); box-shadow: 0 14px 45px rgba(0,0,0,.2), inset 0 0 70px rgba(7,9,15,.24); touch-action: none; cursor: grab; }
.stage.is-dragging { cursor: grabbing; }
.fractal-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: auto; }
#canvasA { z-index: 1; opacity: 1; transition: opacity .56s cubic-bezier(.2,.7,.2,1); }
#canvasB { z-index: 2; opacity: 0; transition: opacity .56s cubic-bezier(.2,.7,.2,1); }
.stage-vignette { z-index: 3; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(7,8,14,.39), transparent 17%, transparent 79%, rgba(7,8,14,.38)), linear-gradient(90deg, rgba(7,8,14,.14), transparent 12%, transparent 88%, rgba(7,8,14,.14)); }
.canvas-label { z-index: 4; position: absolute; color: rgba(219, 223, 235, .75); font: 8px var(--mono); letter-spacing: .08em; display: flex; align-items: center; gap: 6px; pointer-events: none; text-shadow: 0 1px 4px #080a12; }
.canvas-label-top { top: 15px; left: 16px; }
.crosshair { color: var(--mint); font-size: 13px; }
.canvas-label-bottom { left: 16px; bottom: 15px; color: rgba(192, 199, 213, .62); }
.render-led { width: 5px; height: 5px; background: var(--mint); border-radius: 50%; display: inline-block; box-shadow: 0 0 8px rgba(165,225,207,.6); }
.zoom-indicator { position: absolute; z-index: 4; right: 15px; top: 14px; padding: 6px 8px; background: rgba(8,10,17,.48); border: 1px solid rgba(210,220,230,.1); border-radius: 3px; color: #e3e4ec; font: 9px var(--mono); pointer-events: none; }
.canvas-hint { position: absolute; z-index: 4; right: 15px; bottom: 15px; display: flex; gap: 7px; align-items: center; color: rgba(181, 186, 199, .65); font: 7px var(--mono); letter-spacing: .06em; pointer-events: none; }
.canvas-hint b { color: var(--mint); font-weight: 400; }
.loading-indicator { z-index: 5; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 9px; padding: 10px 13px; border-radius: 99px; color: #d4d8e1; background: rgba(11, 14, 23, .84); border: 1px solid rgba(220,225,245,.13); font: 9px var(--mono); opacity: 0; transition: opacity .2s; pointer-events: none; }
.loading-indicator.is-visible { opacity: 1; }
.loading-indicator span { width: 11px; height: 11px; border: 1px solid rgba(165,225,207,.32); border-top-color: var(--mint); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stage-toolbar { height: 47px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.toolbar-left, .toolbar-right { display: flex; align-items: center; }
.toolbar-left { gap: 9px; }
.round-control { width: 24px; height: 24px; border: 1px solid rgba(211,216,231,.16); border-radius: 50%; display: grid; place-items: center; background: transparent; color: #cdd0db; cursor: pointer; font: 14px var(--sans); line-height: 1; transition: all .2s; }
.round-control:hover { color: var(--mint); border-color: var(--mint); }
.zoom-range { width: clamp(54px, 8vw, 110px); }
.toolbar-divider { height: 17px; width: 1px; margin: 0 4px; background: var(--line-strong); }
.subtle-control { display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 5px; color: #9297a4; background: transparent; cursor: pointer; font-size: 9px; }
.subtle-control:hover { color: #e4e8ee; }
.toolbar-right { gap: 9px; }
.view-caption { color: #69707e; font: 7px var(--mono); letter-spacing: .1em; }
.toolbar-right strong { min-width: 38px; color: #c5c8d3; font: 10px var(--mono); text-align: right; }
input[type="range"] { --range-fill: 0%; appearance: none; width: 100%; height: 14px; margin: 2px 0; background: transparent; cursor: pointer; touch-action: pan-y; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; border-radius: 3px; background: linear-gradient(to right, var(--mint) var(--range-fill), rgba(181,187,204,.18) var(--range-fill)); }
input[type="range"]::-moz-range-track { height: 2px; border-radius: 3px; background: rgba(181,187,204,.18); }
input[type="range"]::-moz-range-progress { height: 2px; background: var(--mint); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 9px; height: 9px; margin-top: -3.5px; border: 2px solid #0d1516; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 1px rgba(165,225,207,.58), 0 0 9px rgba(165,225,207,.2); }
input[type="range"]::-moz-range-thumb { width: 7px; height: 7px; border: 2px solid #0d1516; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 1px rgba(165,225,207,.58); }

.discover { margin-top: 23px; }
.discover-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; }
.discover-heading .section-kicker { font-size: 7px; }
.discover h2 { margin: 5px 0 0; font: 500 17px var(--serif); color: #e0e1e8; }
.discover h2 em { color: #c7b9e7; }
.discover-count { padding-bottom: 2px; color: #5e6470; font: 7px var(--mono); letter-spacing: .1em; }
.preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.preset-card { min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.016); text-align: left; cursor: pointer; transition: border-color .2s, transform .25s, background .2s; }
.preset-card:hover { border-color: rgba(165,225,207,.34); background: rgba(165,225,207,.035); transform: translateY(-2px); }
.preset-art { height: clamp(66px, 8.1vw, 99px); width: 100%; display: block; position: relative; overflow: hidden; background-color: #111725; }
.preset-art::before, .preset-art::after { content: ''; position: absolute; inset: 0; }
.art-seahorse { background: radial-gradient(ellipse at 54% 50%, rgba(242,181,154,.78), transparent 5%), radial-gradient(ellipse at 56% 50%, #76589e 0, #253d70 21%, #11162b 54%, #0b0e18 100%); }
.art-seahorse::before { background: repeating-radial-gradient(ellipse at 52% 48%, transparent 0 5px, rgba(211,189,247,.24) 6px, transparent 7px 11px); transform: rotate(-24deg) scale(1.45); }
.art-seahorse::after { background: linear-gradient(90deg, rgba(10,12,20,.35), transparent 38%, transparent 75%, rgba(8,10,15,.2)); }
.art-ring { position: absolute; z-index: 1; border: 1px solid rgba(240,215,251,.55); border-radius: 50%; transform: rotate(-37deg) scaleY(.45); }
.ring-a { width: 65px; height: 40px; left: 43%; top: 26%; }
.ring-b { width: 93px; height: 62px; left: 39%; top: 14%; opacity: .48; }
.art-core { position: absolute; z-index: 2; width: 4px; height: 4px; left: 55%; top: 52%; border-radius: 50%; background: #fff0c7; box-shadow: 0 0 10px 3px #edb8ba; }
.art-bloom { background: radial-gradient(circle at 50% 53%, #f1d4ab 0, #9b7bc5 4%, #406984 18%, #17263a 42%, #0b1019 75%); }
.bloom-shape { z-index: 1; position: absolute; inset: 14% 39%; border: 1px solid rgba(238,202,238,.55); border-radius: 50%; transform: scaleX(1.8) rotate(25deg); box-shadow: 0 0 0 5px rgba(204,176,233,.15), 0 0 0 11px rgba(204,176,233,.1); }
.art-orbit { position: absolute; left: 25%; top: 13%; width: 50%; height: 70%; border: 1px solid rgba(173,223,220,.42); border-radius: 50%; transform: rotate(52deg); }
.orbit-b { transform: rotate(-52deg); opacity: .5; }
.art-ember { background: radial-gradient(ellipse at 55% 81%, rgba(248,146,68,.38), transparent 35%), linear-gradient(180deg, #111221, #21192c 68%, #462534); }
.art-ember::before { clip-path: polygon(0 82%, 12% 61%, 19% 69%, 27% 32%, 36% 67%, 45% 18%, 56% 74%, 65% 43%, 74% 76%, 81% 25%, 92% 65%, 100% 47%, 100% 100%, 0 100%); background: linear-gradient(180deg, #c9a4d3, #62476f 48%, #171526); opacity: .7; }
.art-ember::after { inset: 54% 0 0; background: linear-gradient(180deg, transparent, rgba(12,11,19,.8)); }
.ember-spire { position: absolute; z-index: 1; bottom: 18%; width: 1px; background: rgba(255,188,126,.6); transform-origin: bottom; }
.spire-a { left: 46%; height: 43%; transform: rotate(9deg); }.spire-b { left: 79%; height: 33%; transform: rotate(-8deg); opacity: .5; }
.ember-glow { position: absolute; z-index: 1; left: 51%; bottom: 18%; width: 5px; height: 5px; border-radius: 50%; background: #ffd096; box-shadow: 0 0 15px 6px rgba(242,132,74,.7); }
.art-caption { position: absolute; z-index: 3; right: 8px; bottom: 7px; color: rgba(232,232,244,.64); font: 7px var(--mono); text-shadow: 0 1px 4px #070912; }
.preset-copy { padding: 8px 9px 10px; display: grid; gap: 3px; }
.preset-overline { color: #7c8290; font: 6px var(--mono); letter-spacing: .1em; }
.preset-copy strong { overflow: hidden; color: #dbdce4; font-size: 9px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.preset-copy > span:last-child { overflow: hidden; color: #7c818e; font-size: 7px; white-space: nowrap; text-overflow: ellipsis; }
.preset-copy i { color: var(--mint); font-style: normal; }
.workspace-footer { display: flex; justify-content: space-between; margin-top: 20px; padding: 0 1px; color: #4f5561; font: 7px var(--mono); letter-spacing: .1em; }
.workspace-footer i { color: #a5d8ca; font-style: normal; padding-left: 4px; }

.inspector { min-width: 0; padding: 28px 19px 16px; border-left: 1px solid var(--line); background: rgba(12,14,22,.5); display: flex; flex-direction: column; }
.inspector-heading { display: flex; justify-content: space-between; align-items: center; }
.inspector-heading .section-kicker { font-size: 7px; }
.inspector-heading h2 { margin: 5px 0 0; font: 500 19px var(--serif); color: #e7e6ed; }
.more-button { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: #a5a9b5; letter-spacing: .12em; cursor: pointer; font-size: 10px; padding: 0 0 4px 4px; transition: all .2s; }
.more-button:hover { color: var(--mint); border-color: rgba(165,225,207,.5); }
.inspector-description { color: #858a98; margin: 8px 0 15px; min-height: 43px; font-size: 9px; line-height: 1.65; }
.formula-card { padding: 10px 11px 9px; border: 1px solid var(--line); border-radius: 4px; background: linear-gradient(115deg, rgba(151,138,203,.07), rgba(165,225,207,.025)); }
.formula-top, .formula-bottom { display: flex; align-items: center; justify-content: space-between; }
.formula-top { padding-bottom: 8px; border-bottom: 1px solid rgba(220,225,245,.07); }
.formula-top > span:first-child, .formula-bottom { color: #737987; font: 7px var(--mono); letter-spacing: .08em; }
.formula-badge { color: var(--mint); font: 10px var(--serif); font-style: italic; letter-spacing: 0; }
.formula-bottom { padding-top: 8px; justify-content: flex-start; gap: 8px; font-size: 6px; }
.formula-bottom #formulaStart { color: #c0c2ce; font-size: 8px; letter-spacing: 0; }
.formula-arrow { color: #9689bd; margin-left: auto; font-size: 9px; }
.control-section { padding: 15px 0 13px; border-bottom: 1px solid var(--line); }
.control-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; color: #c1c4ce; font-size: 9px; }
.control-heading output { color: var(--mint); font: 10px var(--mono); }
.range-wrap { display: grid; gap: 3px; }
.range-wrap input { display: block; }
.range-ticks { display: flex; justify-content: space-between; color: #626875; font: 6px var(--mono); letter-spacing: .08em; }
.power-control { padding-top: 12px; }
.constant-control { display: none; }
.constant-control.is-visible { display: block; }
.constant-title { margin-bottom: 10px; color: #89909d; font: 7px var(--mono); letter-spacing: .11em; }
.constant-title button { border: 0; padding: 0; color: #7a8492; background: transparent; cursor: pointer; font: 7px var(--mono); }
.constant-title button:hover { color: var(--mint); }
.compact-heading { margin: 6px 0 1px; color: #969ba8; font-size: 8px; }
.compact-heading output { color: #bcc2ce; font-size: 8px; }
.constant-control > input { margin: 0 0 2px; }
.palette-section { padding-bottom: 15px; }
.palette-current, .quality-note { color: #717987; font: 7px var(--mono); letter-spacing: .08em; }
.palette-list { display: flex; gap: 9px; padding: 3px 1px 0; }
.palette-button { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 50%; padding: 2px; background: transparent; cursor: pointer; transition: border-color .2s, transform .2s; }
.palette-button:hover { transform: translateY(-2px); }
.palette-button.is-selected { border-color: rgba(165,225,207,.8); }
.swatch { width: 21px; height: 21px; display: block; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; }
.swatch-nebula { background: conic-gradient(#f1ca95, #dc82b1, #795bcc, #3b6dbb, #75bbd4, #f1ca95); }
.swatch-tide { background: conic-gradient(#d8f4d5, #63d0b0, #207ba0, #2a426e, #a9d4ca, #d8f4d5); }
.swatch-cinder { background: conic-gradient(#ffe7a0, #fa914e, #b73c4d, #5d263e, #bf718a, #ffe7a0); }
.swatch-orchid { background: conic-gradient(#ffd3e8, #ed83bb, #9875d1, #5357a2, #c293e1, #ffd3e8); }
.swatch-glacier { background: conic-gradient(#e6fffc, #9ce9e6, #4faec8, #5168a4, #a3bae9, #e6fffc); }
.quality-section { padding-top: 14px; border-bottom: 0; }
.quality-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 8px; padding: 3px; border: 1px solid var(--line); border-radius: 4px; background: rgba(0,0,0,.12); }
.quality-button { min-height: 26px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #7c8290; cursor: pointer; font-size: 8px; transition: all .2s; }
.quality-button:hover { color: #d4d7df; }
.quality-button.is-selected { color: #cde9df; border-color: rgba(165,225,207,.2); background: rgba(165,225,207,.08); }
.quality-description { min-height: 25px; margin: 7px 0 0; color: #696f7d; font-size: 8px; line-height: 1.55; }
.inspector-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; margin-top: auto; border-top: 1px solid var(--line); color: #686e7b; font: 7px var(--mono); letter-spacing: .08em; }
.inspector-bottom > span { display: flex; align-items: center; gap: 7px; }
.inspector-bottom strong { color: #aeb4c0; font: 9px var(--mono); }

@media (min-width: 1600px) {
  .layout { grid-template-columns: 236px minmax(500px, 1fr) 316px; }
  .left-rail { padding-right: 19px; padding-left: 19px; }
  .workspace { padding-left: 48px; padding-right: 48px; }
  .inspector { padding-left: 23px; padding-right: 23px; }
  .stage { max-height: 650px; }
}
@media (max-width: 1120px) {
  .layout { grid-template-columns: 188px minmax(360px, 1fr); }
  .inspector { grid-column: 2; border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; padding: 18px 24px 15px; }
  .inspector-heading, .inspector-description, .formula-card { grid-column: 1 / -1; }
  .inspector-description { min-height: unset; margin-bottom: 12px; }
  .inspector-bottom { grid-column: 1 / -1; margin-top: 12px; }
  .quality-section { padding-top: 14px; }
  .left-rail { grid-row: 1 / span 2; }
}
@media (max-width: 720px) {
  .topbar { height: 58px; padding: 0 15px; grid-template-columns: 1fr auto; }
  .topbar-center { display: none; }
  .topbar-actions { gap: 10px; }
  .device-status { font-size: 0; gap: 0; }
  .status-pulse { width: 6px; height: 6px; }
  .icon-button { min-height: 31px; width: 33px; justify-content: center; padding: 0; }
  .icon-button span { display: none; }
  .layout { min-height: calc(100vh - 58px); display: flex; flex-direction: column; }
  .left-rail { min-height: unset; order: 0; padding: 12px 14px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail-section > .section-kicker, .rail-note, .rail-footer { display: none; }
  .fractal-nav { display: flex; gap: 6px; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .fractal-nav::-webkit-scrollbar { display: none; }
  .fractal-link { flex: 0 0 auto; width: auto; min-height: 38px; gap: 7px; padding: 4px 9px 4px 5px; }
  .nav-symbol { flex-basis: 27px; height: 27px; font-size: 14px; }
  .nav-label { gap: 0; }
  .nav-label strong { font-size: 9px; white-space: nowrap; }
  .nav-label small, .nav-arrow { display: none; }
  .workspace { order: 1; padding: 20px 15px 12px; }
  .page-heading { margin-bottom: 14px; align-items: flex-end; }
  h1 { font-size: clamp(25px, 7vw, 32px); }
  .page-intro { max-width: 275px; font-size: 9px; line-height: 1.5; }
  .text-button { font-size: 0; padding-bottom: 8px; white-space: nowrap; }
  .sparkle { font-size: 17px; padding: 0; }
  .stage-topline { height: 24px; }
  .stage { aspect-ratio: 1.2; min-height: 260px; max-height: 58vh; }
  .stage-toolbar { height: 43px; }
  .view-caption { display: none; }
  .toolbar-right { gap: 4px; }
  .toolbar-left { gap: 7px; }
  .zoom-range { width: 54px; }
  .discover { margin-top: 19px; }
  .discover h2 { font-size: 16px; }
  .discover-count { font-size: 6px; }
  .preset-grid { gap: 7px; }
  .preset-art { height: 59px; }
  .preset-copy { padding: 7px 6px 8px; }
  .preset-overline { font-size: 5px; letter-spacing: .04em; }
  .preset-copy strong { font-size: 8px; }
  .preset-copy > span:last-child { font-size: 6px; }
  .workspace-footer { font-size: 6px; margin-top: 17px; }
  .inspector { order: 2; display: flex; border-top: 1px solid var(--line); padding: 19px 18px 15px; }
  .inspector-heading, .inspector-description, .formula-card { width: 100%; }
  .inspector-description { margin-bottom: 13px; }
  .inspector-bottom { margin-top: 4px; }
  .canvas-hint { gap: 4px; right: 9px; bottom: 11px; font-size: 6px; }
  .canvas-label-top { top: 11px; left: 11px; }
  .zoom-indicator { top: 10px; right: 10px; }
  .canvas-label-bottom { bottom: 11px; left: 11px; }
}
@media (max-width: 390px) {
  .preset-copy > span:last-child { display: none; }
  .preset-art { height: 54px; }
  .discover-count { display: none; }
  .brand-copy small { font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
