:root {
  color-scheme: dark;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e7e9ee;
  background: #0b0d12;
  font-synthesis: none;
  --panel: #11141b;
  --line: #242833;
  --muted: #8b91a0;
  --accent: #f59e0b;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(ellipse at 55% 0%, #151923 0, #0b0d12 52%); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.topbar { height: 72px; padding: 0 30px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #20232c; background: rgba(11,13,18,.88); }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #8f5d13; border-radius: 10px; color: #ffc65c; font-family: Georgia, serif; font-size: 22px; font-weight: 700; box-shadow: inset 0 0 12px #f59e0b18; }
.brand strong, .brand small { display: block; letter-spacing: .16em; }
.brand strong { font-size: 13px; }
.brand small { margin-top: 3px; color: #7e8492; font: 9px "DM Mono", monospace; }
.top-actions { display: flex; align-items: center; gap: 17px; }
.save-status { color: #8f9c91; font-size: 11px; }
.save-status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #65bd83; vertical-align: 1px; }
.button { min-height: 38px; padding: 0 14px; border: 1px solid transparent; border-radius: 7px; font-size: 12px; font-weight: 600; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #17120a; background: #f6b844; box-shadow: 0 4px 16px #f6b8441b; }
.button-primary:hover { background: #ffca62; }
.button-quiet { color: #d6d8df; background: #191d26; border-color: #2a2e38; }
.button-quiet:hover { background: #222733; border-color: #3a404e; }
.workspace { width: min(1600px, 100%); min-height: calc(100vh - 116px); margin: 0 auto; padding: 22px; display: grid; grid-template-columns: minmax(220px, 260px) minmax(340px, 1fr) minmax(310px, 370px); gap: 18px; align-items: stretch; }
.panel { border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(145deg, #141720, #101219); }
.library, .editor { min-height: 650px; padding: 19px; }
.panel-heading, .editor-heading, .preview-heading { display: flex; align-items: center; justify-content: space-between; }
.eyebrow { margin: 0 0 7px; color: #828998; font: 9px "DM Mono", monospace; letter-spacing: .14em; }
h1, h2 { margin: 0; color: #f0f1f4; font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.count-badge { min-width: 25px; padding: 4px 7px; border: 1px solid #343a46; border-radius: 20px; color: #acb2bf; font: 10px "DM Mono", monospace; text-align: center; }
.search-wrap { display: flex; align-items: center; gap: 8px; margin-top: 21px; padding: 0 10px; border: 1px solid #292e39; border-radius: 7px; background: #0e1016; color: #858b98; }
.search-wrap input { width: 100%; height: 37px; border: 0; outline: 0; color: #e7e9ee; background: transparent; font-size: 11px; }
.theme-list { display: flex; flex-direction: column; gap: 7px; margin: 17px 0; padding: 0; list-style: none; }
.theme-list button { width: 100%; padding: 11px; display: flex; gap: 10px; align-items: center; border: 1px solid transparent; border-radius: 7px; color: inherit; background: transparent; text-align: left; }
.theme-list button:hover { background: #191d26; }
.theme-list button[aria-current="true"] { border-color: #805b22; background: linear-gradient(100deg, #342817, #211b14); }
.theme-thumb { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #ffffff22; border-radius: 7px; font-size: 13px; }
.theme-list strong, .theme-list small { display: block; overflow: hidden; max-width: 150px; text-overflow: ellipsis; white-space: nowrap; }
.theme-list strong { font-size: 11px; font-weight: 600; }
.theme-list small { margin-top: 4px; color: #8d93a0; font: 9px "DM Mono", monospace; }
.empty-list { padding: 20px 8px; color: #858b98; font-size: 11px; line-height: 1.6; }
.library-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid #252a34; }
.full-width { width: 100%; }
.library-footer p { margin: 10px 2px 0; color: #777e8c; font-size: 10px; line-height: 1.5; }
.library { display: flex; flex-direction: column; }
.preview-column { min-width: 0; padding: 8px 4px 0; display: flex; flex-direction: column; }
.preview-heading { padding: 4px 2px 19px; }
.preview-heading h2 { font-size: 20px; }
.preview-heading .button { font-size: 11px; }
.receiver { --chassis: #0f172a; --surface: #1e293b; --accent: #f59e0b; --secondary: #fbbf24; --needle: #ef4444; --backlight: #fbbf24; width: 100%; max-width: 740px; margin: auto; padding: clamp(16px, 3.4vw, 34px); overflow: hidden; border: 1px solid #ffffff2a; border-radius: 13px; background: linear-gradient(150deg, color-mix(in srgb, var(--surface), #fff 6%), var(--chassis) 60%, #06080b); box-shadow: 0 25px 70px #0008, inset 0 1px #ffffff27, inset 0 -3px 8px #0009; color: #f3eee2; }
.receiver-top, .receiver-bottom, .receiver-caption { display: flex; align-items: center; justify-content: space-between; }
.receiver-brand { color: var(--accent); font: 800 17px "DM Mono", monospace; letter-spacing: .1em; text-shadow: 0 0 14px color-mix(in srgb, var(--accent), transparent 42%); }
.receiver-brand span { display: block; margin-top: 4px; color: #c2c3c5; font-size: 7px; letter-spacing: .2em; }
.power-indicator { color: #9da3a4; font: 8px "DM Mono", monospace; letter-spacing: .1em; }
.power-indicator i, .dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--backlight); box-shadow: 0 0 8px var(--backlight); }
.tuner { position: relative; margin: 22px 0 18px; padding: 13px 17px 20px; border: 1px solid #ffffff26; border-radius: 5px; background: linear-gradient(100deg, #050608b8, color-mix(in srgb, var(--surface), #000 20%)); box-shadow: inset 0 1px 8px #000b; }
.tuner-label { color: var(--backlight); font: 7px "DM Mono", monospace; letter-spacing: .18em; }
.station-name { position: absolute; top: 13px; right: 17px; color: #d2d4d4; font: 700 9px "DM Mono", monospace; }
.station-name span { color: var(--accent); }
.frequency { padding: 12px 0 8px; color: var(--backlight); font: clamp(26px, 5vw, 46px) "DM Mono", monospace; letter-spacing: .07em; text-shadow: 0 0 19px color-mix(in srgb, var(--backlight), transparent 55%); }
.frequency > span, .frequency small { font-size: 10px; letter-spacing: 0; }
.frequency-scale { position: relative; display: flex; justify-content: space-between; padding-top: 8px; border-top: 1px solid #c2c1a34d; color: #bdbbb1; font: 7px "DM Mono", monospace; }
.frequency-scale::before { position: absolute; top: -1px; right: 0; left: 0; height: 5px; background: repeating-linear-gradient(90deg, #d2c6a5 0 1px, transparent 1px 8.333%); content: ""; }
.frequency-scale i { position: absolute; top: -5px; left: 47%; width: 1px; height: 18px; background: var(--needle); box-shadow: 0 0 5px var(--needle); }
.meter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.meter { min-width: 0; padding: 10px 10px 7px; border: 1px solid #ffffff27; border-radius: 5px; background: linear-gradient(145deg, color-mix(in srgb, var(--surface), #fff 4%), #090b0e); text-align: center; }
.meter > span { color: #bbc0c0; font: 6px "DM Mono", monospace; letter-spacing: .1em; }
.meter-face { position: relative; width: min(100%, 230px); height: clamp(54px, 11vw, 95px); margin: 9px auto 2px; overflow: hidden; border: 1px solid #9a8a6340; border-radius: 120px 120px 5px 5px; background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--backlight), #14120a 82%), #111214 73%); box-shadow: inset 0 0 12px #000; }
.meter-face::before { position: absolute; right: 9%; bottom: 10px; left: 9%; height: 60%; border-top: 1px solid #d5cdb155; border-radius: 100% 100% 0 0; content: ""; }
.meter-face i { position: absolute; z-index: 2; bottom: 5px; left: 50%; width: 1px; height: 69%; transform: rotate(-13deg); transform-origin: bottom; background: var(--needle); box-shadow: 0 0 4px var(--needle); animation: needle 1.7s ease-in-out infinite alternate; }
.meter:nth-child(2) .meter-face i { animation-delay: -.8s; }
.meter-face b { position: absolute; right: 0; bottom: 8px; left: 0; color: #c6bd9e; font: 9px Georgia, serif; }
.meter-scale { color: #a8a394; font: 6px "DM Mono", monospace; }
.receiver-bottom { margin-top: 17px; padding: 12px 8px 0; border-top: 1px solid #ffffff20; }
.equalizer { height: 30px; display: flex; align-items: end; gap: 3px; }
.equalizer i { width: 4px; height: calc(7px + (var(--n, 1) * 2px)); background: var(--accent); opacity: .75; box-shadow: 0 0 5px color-mix(in srgb, var(--accent), transparent 50%); }
.equalizer i:nth-child(3n) { --n: 8; }.equalizer i:nth-child(3n + 1) { --n: 5; }.equalizer i:nth-child(3n + 2) { --n: 10; }
.controls { display: flex; gap: 13px; }
.controls span { width: 25px; height: 25px; border: 2px solid #b8b8ae; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #777, #1e2022 65%); box-shadow: 0 2px 3px #000; }
.controls span:nth-child(2) { width: 34px; height: 34px; border-color: var(--accent); }
.receiver-caption { margin-top: 17px; color: #91959c; font: 7px "DM Mono", monospace; letter-spacing: .1em; }
.preview-meta { display: flex; justify-content: space-between; max-width: 740px; width: 100%; margin: 16px auto 0; color: #a6abb6; font-size: 10px; }
.preview-meta > span:first-child { display: flex; align-items: center; }
.preview-meta .dot { width: 5px; height: 5px; }
.preview-meta > span:last-child { font: 9px "DM Mono", monospace; color: #777e8c; }
.preview-note { max-width: 740px; width: 100%; margin: 22px auto 0; padding: 12px 13px; border: 1px solid #242834; border-radius: 7px; color: #9399a6; background: #11141b; font-size: 10px; }
.preview-note > span { margin-right: 7px; color: #f6b844; }
.studio-tools { width: 100%; max-width: 740px; margin: 22px auto 0; }
.tool-launchers { display: flex; flex-wrap: wrap; gap: 7px; }
.tool-launcher { padding: 8px 10px; border: 1px solid #2a2f3a; border-radius: 6px; color: #c7cbd4; background: #151821; font-size: 10px; }
.tool-launcher:hover { border-color: #8f6b36; color: #ffce79; background: #211d17; }
.studio-dialog { width: min(780px, calc(100% - 28px)); max-height: min(820px, calc(100% - 28px)); padding: 0; overflow: auto; border: 1px solid #373c48; border-radius: 12px; color: #e7e9ee; background: #11141b; box-shadow: 0 30px 100px #000c; }
.studio-dialog::backdrop { background: #05060bd9; backdrop-filter: blur(5px); }
.studio-dialog-header { position: sticky; z-index: 2; top: 0; padding: 17px 20px 13px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #282d37; background: #11141b; }
.studio-dialog-header h2 { font-size: 17px; }
.studio-tabs { position: sticky; z-index: 2; top: 66px; padding: 9px 15px; display: flex; gap: 5px; overflow-x: auto; border-bottom: 1px solid #282d37; background: #11141b; }
.studio-tabs button { flex: 0 0 auto; padding: 7px 9px; border: 1px solid transparent; border-radius: 5px; color: #a6abb6; background: transparent; font-size: 10px; }
.studio-tabs button:hover, .studio-tabs button[aria-selected="true"] { border-color: #654d2b; color: #ffca62; background: #282117; }
.studio-tool-panel { padding: 19px 20px 10px; }
.studio-tool-panel[hidden] { display: none; }
.studio-tool-panel h3 { margin: 0 0 6px; color: #f1f2f5; font-size: 15px; }
.studio-tool-panel > p { margin: 0 0 17px; color: #9399a6; font-size: 11px; line-height: 1.55; }
.range-field { margin: 13px 0; display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; color: #c2c7d1; font-size: 11px; }
.range-field output { color: #f6b844; font: 10px "DM Mono", monospace; }
.range-field input { grid-column: 1 / -1; width: 100%; accent-color: #e8a738; }
.harmony-swatches { min-height: 74px; margin: 16px 0 8px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.harmony-swatch { min-width: 0; padding: 5px; display: flex; flex-direction: column; gap: 5px; border: 1px solid #303540; border-radius: 6px; background: #0d0f15; }
.harmony-swatch i { height: 36px; border-radius: 3px; }
.harmony-swatch span { overflow: hidden; color: #9298a4; font: 8px "DM Mono", monospace; text-overflow: ellipsis; white-space: nowrap; }
.dialog-actions { margin: 14px 0 8px; display: flex; justify-content: flex-end; gap: 8px; }
.upload-zone { min-height: 135px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px dashed #494f5b; border-radius: 9px; color: #d6d8df; background: #0d0f15; cursor: pointer; }
.upload-zone:hover { border-color: #ba873c; background: #17150f; }
.upload-zone > span { color: #f6b844; font-size: 26px; }
.upload-zone strong { font-size: 11px; }
.upload-zone small { color: #858b98; font-size: 9px; }
.photo-preview { max-width: 100%; max-height: 230px; margin: 14px auto; display: block; border: 1px solid #303540; border-radius: 7px; }
.audit-score { margin: 16px 0; padding: 14px; display: flex; align-items: center; gap: 13px; border: 1px solid #2e333e; border-radius: 8px; background: #0c0f15; }
.audit-score strong { color: #73d69a; font: 700 27px "DM Mono", monospace; }
.audit-score span { color: #c4c8d1; font-size: 11px; }
.audit-results, .snapshot-list { margin: 0; padding: 0; display: grid; gap: 7px; list-style: none; }
.audit-results li, .snapshot-list li { padding: 10px; border: 1px solid #2b303a; border-radius: 6px; background: #171a22; }
.audit-results strong, .audit-results span { display: block; }
.audit-results strong { margin-bottom: 4px; color: #e1e4e9; font-size: 10px; }
.audit-results span { color: #979daa; font-size: 9px; line-height: 1.5; }
.audit-results li[data-status="success"] strong { color: #83d49a; }
.audit-results li[data-status="warning"] strong { color: #f4c66d; }
.audit-results li[data-status="error"] strong { color: #ff9696; }
.snapshot-create { margin-bottom: 13px; display: flex; gap: 8px; }
.snapshot-create input, .studio-tool-panel .field input, .studio-tool-panel .field select { min-width: 0; padding: 9px 10px; border: 1px solid #2c313c; border-radius: 6px; outline: none; color: #e7e9ee; background: #0c0e14; font-size: 11px; }
.snapshot-create input { flex: 1; }
.snapshot-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.snapshot-info strong, .snapshot-info small { display: block; }
.snapshot-info strong { color: #e1e4e9; font-size: 10px; }
.snapshot-info small { margin-top: 4px; color: #888f9d; font-size: 9px; }
.snapshot-list button { padding: 6px 8px; border: 1px solid #3d434e; border-radius: 5px; color: #d3d7df; background: #21252e; font-size: 9px; }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compare-grid > div > span { display: block; margin-bottom: 6px; color: #8c93a1; font: 9px "DM Mono", monospace; }
.compare-receiver { width: 100%; min-height: 180px; margin: 0; padding: 13px; border-radius: 8px; }
.compare-receiver .tuner { margin: 11px 0; padding: 8px 10px 12px; }
.compare-receiver .frequency { padding: 8px 0 6px; font-size: 24px; }
.compare-receiver .meter-row { gap: 5px; }
.compare-receiver .meter { padding: 6px 4px; }
.compare-receiver .meter-face { height: 38px; }
.compare-receiver .receiver-brand { font-size: 11px; }
.compare-receiver .receiver-brand span, .compare-receiver .meter > span, .compare-receiver .meter-scale, .compare-receiver .receiver-caption { font-size: 6px; }
.code-output { width: 100%; padding: 12px; border: 1px solid #2b303a; border-radius: 7px; color: #c5e6cc; background: #090c11; font: 10px/1.5 "DM Mono", monospace; resize: vertical; }
.showcase-preview { min-height: 175px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid #343945; border-radius: 8px; background: radial-gradient(ellipse at 80% 20%, #27313d, #0b0d12 74%); }
.showcase-preview strong { font-size: 18px; }
.showcase-preview small { color: #c1c5ce; font-size: 10px; }
.showcase-swatches { display: flex; gap: 7px; }
.showcase-swatches i { width: 24px; height: 24px; border: 1px solid #ffffff40; border-radius: 50%; }
.tool-message { margin: 4px 20px 15px; color: #8ed3a4; }
.editor { padding: 19px 17px; }
.editor-heading { margin-bottom: 16px; }
.icon-button { width: 32px; height: 32px; border: 1px solid #35303a; border-radius: 7px; color: #a2a7b1; background: #1b171d; font-size: 17px; }
.icon-button:hover { border-color: #8a3943; color: #ff8d91; background: #30191f; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset + fieldset { margin-top: 19px; padding-top: 17px; border-top: 1px solid #292d37; }
legend { margin-bottom: 12px; color: #d6d8df; font-size: 11px; font-weight: 600; }
.field { display: block; margin-bottom: 10px; color: #9fa5b1; font-size: 10px; }
.field input, .field textarea, .field select { width: 100%; margin-top: 5px; padding: 9px 10px; border: 1px solid #2c313c; border-radius: 6px; outline: none; color: #e7e9ee; background: #0c0e14; font-size: 11px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #a57934; box-shadow: 0 0 0 2px #f6b84419; }
.field textarea { resize: vertical; }
.field small { display: block; margin-top: 4px; color: #777e8c; font-size: 9px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.color-field { min-width: 0; padding: 8px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 7px; border: 1px solid #282d37; border-radius: 6px; background: #0c0e14; color: #a8adba; font-size: 9px; }
.color-field input { width: 25px; height: 22px; padding: 1px; border: 1px solid #4a4e58; border-radius: 4px; background: transparent; }
.color-field code { grid-column: 1 / -1; color: #777e8c; font: 9px "DM Mono", monospace; }
.preset-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 9px; }
.preset { min-width: 0; padding: 7px 4px; border: 1px solid #2b303a; border-radius: 5px; color: #b8bdc7; background: #171a22; font-size: 8px; }
.preset:hover { border-color: #76603d; background: #201d17; }
.swatches { display: block; width: 100%; height: 9px; margin-bottom: 5px; border-radius: 2px; }
.swatches.amber { background: linear-gradient(90deg, #0f172a 25%, #1e293b 25% 50%, #f59e0b 50% 75%, #ef4444 75%); }
.swatches.sapphire { background: linear-gradient(90deg, #0a0f1d 25%, #162235 25% 50%, #38bdf8 50% 75%, #f97316 75%); }
.swatches.emerald { background: linear-gradient(90deg, #050b08 25%, #0e1f16 25% 50%, #10b981 50% 75%, #06b6d4 75%); }
.editor-actions { display: flex; gap: 8px; margin-top: 17px; }
.editor-actions .button { flex: 1; padding: 0 8px; font-size: 10px; }
.message { min-height: 14px; margin: 9px 1px 0; color: #8ed3a4; font-size: 10px; }
.message.error { color: #ff9595; }
.footer { min-height: 44px; padding: 10px 28px; display: flex; justify-content: space-between; border-top: 1px solid #20232c; color: #626976; font: 9px "DM Mono", monospace; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes needle { from { transform: rotate(-17deg); } to { transform: rotate(14deg); } }
@media (max-width: 1080px) { .workspace { grid-template-columns: 220px minmax(320px, 1fr); }.editor { grid-column: 1 / -1; min-height: auto; }.editor form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }.editor fieldset + fieldset { margin-top: 0; padding-top: 0; border-top: 0; }.editor-actions, .message { grid-column: 1 / -1; }.editor-heading { grid-column: 1 / -1; margin-bottom: -4px; } }
@media (max-width: 680px) { .topbar { height: 62px; padding: 0 14px; }.top-actions { gap: 8px; }.save-status { display: none; }.workspace { min-height: auto; padding: 12px; grid-template-columns: 1fr; gap: 12px; }.library { min-height: auto; }.theme-list { max-height: 190px; overflow: auto; }.preview-column { min-height: 400px; padding: 14px 2px; }.preview-heading { padding-bottom: 14px; }.preview-heading h2 { font-size: 16px; }.preview-heading .button { padding: 0 9px; font-size: 9px; }.editor form { display: block; }.editor fieldset + fieldset { margin-top: 19px; padding-top: 17px; border-top: 1px solid #292d37; }.editor-actions, .message { grid-column: auto; }.editor-heading { margin-bottom: 16px; }.footer { padding: 10px 14px; font-size: 8px; }.receiver { padding: 18px; }.meter-row { gap: 8px; }.controls { gap: 7px; }.controls span { width: 20px; height: 20px; }.controls span:nth-child(2) { width: 28px; height: 28px; }.studio-tools { margin-top: 16px; }.studio-dialog-header { padding: 14px; }.studio-tabs { top: 60px; padding: 8px; }.studio-tool-panel { padding: 16px 14px 8px; }.harmony-swatches { grid-template-columns: repeat(3, 1fr); }.snapshot-create { flex-direction: column; }.compare-grid { grid-template-columns: 1fr; }.compare-receiver { max-width: 300px; }.tool-launcher { font-size: 9px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
