:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #ede7dd; background: #121110; font-synthesis: none; color-scheme: dark;
  --line: #35312c; --panel: #1d1b18; --muted: #a49b8e; --accent: #e8b28c;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; border: 0; }
button:disabled { cursor: wait; opacity: .55; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input:focus, textarea:focus, select:focus { outline: 1px solid var(--accent); }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
.topbar { height: 72px; display: flex; align-items: center; gap: 24px; padding: 0 24px; border-bottom: 1px solid var(--line); background: #1b1917; }
.brand { min-width: 156px; display: flex; align-items: center; gap: 12px; color: #f0e7d8; text-decoration: none; font-size: 10px; font-weight: 650; letter-spacing: 2px; line-height: 1.6; }
.brand-second { display: block; font-size: 8px; letter-spacing: 4px; color: var(--muted); }
.brand-mark { font: 40px/1 Georgia, serif; letter-spacing: -7px; }
.brand-mark span { color: var(--accent); padding-left: 6px; }
.modes { display: flex; gap: 5px; margin: auto; }
.modes button { display: flex; gap: 8px; align-items: center; background: transparent; color: #b8b0a4; border-radius: 7px; padding: 11px 14px; font-size: 13px; white-space: nowrap; }
.modes button svg { width: 16px; height: 16px; }
.modes button.active { color: #f1bb95; background: #33281f; }
.modes button:hover { color: #f4e7d3; background: #2c2720; }
.top-actions { display: flex; align-items: center; gap: 16px; }
.connection { display: flex; gap: 6px; align-items: center; color: #b0a28b; font-size: 10px; white-space: nowrap; }
.connection i { width: 5px; height: 5px; background: #b79e72; border-radius: 50%; }
.balance-button { display: flex; align-items: center; gap: 9px; border-left: 1px solid var(--line); background: transparent; padding: 5px 0 5px 16px; font-size: 11px; }
.balance-button span { color: var(--muted); }
.balance-button strong { font-weight: 500; }
.header-settings { background: transparent; color: #cbbca3; padding: 5px; display: grid; place-items: center; }
.app-layout { display: grid; grid-template-columns: 174px minmax(0, 1fr) 326px; height: calc(100dvh - 72px); min-height: 560px; }
.app-layout.reading-view { grid-template-columns: 174px minmax(0, 1fr); }
.rail { border-right: 1px solid #2e2a24; padding: 25px 14px 20px; display: flex; flex-direction: column; gap: 7px; background: #161411; }
.nav-caption { font-size: 8px; letter-spacing: 1.4px; color: #827768; padding: 0 10px; margin: 0 0 13px; }
.rail-button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 10px 12px; border-radius: 7px; background: transparent; color: #a99e8d; text-align: left; font-size: 12px; }
.rail-button svg { width: 17px; height: 17px; }
.rail-button:hover, .rail-button.selected { background: #30281e; color: #e4cfaa; }
.rail-spacer { flex: 1; }
.workspace { padding: 22px 28px 20px; min-width: 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.workspace-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; min-height: 37px; margin-bottom: 16px; }
.breadcrumb { color: #968b7b; font-size: 11px; white-space: nowrap; }
.breadcrumb strong { font-weight: 500; color: #d2c5b0; }
.slash { margin: 0 8px; color: #5c4f3c; }
.project-toolbar { display: flex; align-items: center; gap: 8px; min-width: 0; }
.project-toolbar label { font-size: 10px; color: #8e806b; }
.project-toolbar select { width: min(185px, 15vw); padding: 8px 10px; font-size: 10px; }
.project-toolbar button { padding: 8px 10px; font-size: 10px; white-space: nowrap; }
.studio-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.submodes { display: flex; gap: 6px; margin-bottom: 12px; }
.submodes button { background: transparent; color: #ad9f8a; border-radius: 5px; padding: 7px 11px; font-size: 11px; }
.submodes button.active { color: #e6d1ae; background: #30271c; }
.stage { flex: 1; min-height: 240px; display: flex; flex-direction: column; justify-content: center; }
.empty-stage { text-align: center; max-width: 520px; margin: 18px auto 28px; }
.hero-icon { width: 54px; height: 54px; margin: 0 auto 20px; border: 1px solid #3b3226; border-radius: 15px; display: grid; place-items: center; color: #dfc7a0; background: #211c15; }
.hero-icon svg { width: 25px; height: 25px; }
.eyebrow { color: #9b896c; font-size: 8px; letter-spacing: 2px; margin: 0 0 12px; font-weight: 600; }
h1 { margin: 0 0 13px; font-weight: 500; font-size: 27px; line-height: 1.3; letter-spacing: -.7px; }
.empty-stage > p:not(.eyebrow) { max-width: 440px; margin: 0 auto; font-size: 12px; line-height: 1.8; color: var(--muted); }
.quick-starts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 24px; }
.quick-starts button { border: 1px solid #413324; background: #201a13; color: #baa88a; border-radius: 6px; padding: 10px 12px; font-size: 10px; }
.quick-starts span { margin-left: 14px; color: #dcc29b; }
.composer-area { width: 100%; max-width: 900px; margin: 0 auto; }
.mode-notice { color: #a89a83; font-size: 10px; line-height: 1.7; margin: 0 3px 10px; }
.composer { border: 1px solid #63503b; background: #1b1712; border-radius: 10px; overflow: hidden; }
.composer:focus-within { border-color: #b58b59; }
.composer > label { display: block; font-size: 10px; color: #bb9f76; padding: 13px 16px 0; }
.composer textarea { width: 100%; min-height: 87px; max-height: 200px; resize: vertical; background: transparent; border: 0; padding: 10px 16px 14px; color: #ead6b7; font-size: 12px; line-height: 1.7; }
.composer textarea:focus { outline: 0; }
.composer textarea::placeholder { color: #8b7a63; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #382c1f; background: #272016; padding: 10px; }
.composer-meta { display: flex; align-items: center; gap: 8px; color: #9e8a6d; font-size: 9px; min-width: 0; }
.composer-meta > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta-chip { padding: 5px 7px; border-radius: 4px; background: #3a2c1b; color: #d0b58d; }
.generate-button { display: flex; align-items: center; gap: 12px; border-radius: 6px; padding: 11px 12px; background: #e2c291; color: #352717; font-size: 11px; font-weight: 600; white-space: nowrap; }
.generate-button svg { width: 16px; height: 16px; }
.generate-button:hover { background: #f2d3a3; }
.under-composer { display: flex; align-items: center; gap: 5px; margin-top: 10px; color: #8c795e; font-size: 9px; }
.under-composer svg { width: 12px; height: 12px; }
.keyboard-hint { margin-left: auto; }
.parameters { border-left: 1px solid #33291d; background: #19150f; min-height: 0; overflow-y: auto; }
.parameters summary { list-style: none; position: sticky; z-index: 1; top: 0; background: #19150f; border-bottom: 1px solid #3a2d1e; padding: 22px 20px; font-size: 12px; color: #d4bc97; cursor: pointer; }
.parameters summary::-webkit-details-marker { display: none; }
.parameters summary > span:first-child { display: flex; align-items: center; gap: 9px; }
.parameters summary svg { width: 16px; height: 16px; }
.parameters summary small { display: none; }
.details-chevron { display: none; }
.parameters-body { padding: 20px; }
.parameter-section { padding-bottom: 19px; margin-bottom: 19px; border-bottom: 1px solid #372a1a; }
.parameter-section > label { display: block; margin-bottom: 9px; font-size: 11px; color: #c9ad85; }
select, input { width: 100%; border: 1px solid #52402b; color: #e1c9a5; border-radius: 5px; background: #282014; padding: 10px 11px; font-size: 11px; }
.field-hint { color: #9c8563; font-size: 10px; line-height: 1.7; margin: 10px 0 0; }
.saved-presets-row { display: flex; gap: 7px; }
.saved-presets-row button { padding: 0 12px; font-size: 17px; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 10px; color: #b99b70; }
.text-button { background: transparent; color: #b49a71; padding: 0; font-size: 10px; }
.filter-field { margin-top: 17px; }
.filter-field label { display: block; font-size: 10px; color: #b9a07b; margin-bottom: 8px; }
.filter-field textarea { width: 100%; min-height: 65px; max-height: 160px; resize: vertical; border: 1px solid #52402b; border-radius: 5px; background: #282014; color: #e1c9a5; padding: 10px; font-size: 11px; line-height: 1.6; }
.checkbox-field { display: flex; align-items: center; justify-content: space-between; }
.checkbox-field label { margin: 0; }
.checkbox-field input { width: 16px; height: 16px; accent-color: #d4b07c; }
.filter-field input[type=range] { border: 0; padding: 0; accent-color: #d4b07c; }
.filter-field input[type=number] { width: 100%; border: 1px solid #52402b; border-radius: 5px; background: #282014; color: #e1c9a5; padding: 10px; font-size: 12px; }
.range-value { float: right; color: #e7c799; }
.filter-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.preset-label { width: 100%; color: #b59a71; font-size: 10px; margin-bottom: 3px; }
.filter-presets button { padding: 7px 8px; border: 1px solid #594024; border-radius: 4px; background: #332515; color: #d2ae79; font-size: 9px; }
.filter-feedback { min-height: 17px; font-size: 9px; color: #a8ad83; }
.filter-feedback.error { color: #e6a486; }
.server-storage { margin-top: 24px; padding-bottom: 4px; }
.server-storage .label-row { color: #97805e; font-size: 9px; }
.server-storage strong { font-size: 10px; font-weight: 500; }
.disk-track { position: relative; height: 4px; background: #3a2e1b; margin-top: 10px; border-radius: 3px; }
.disk-track div { height: 100%; background: #a48e60; border-radius: 3px; }
.disk-track i { position: absolute; width: 1px; height: 8px; left: 70%; top: -2px; background: #c38451; }
.server-storage p { font-size: 9px; line-height: 1.7; color: #8b7451; }
.content-view { max-width: 1050px; width: 100%; padding: 25px 0 40px; }
.content-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 25px; }
.content-header h1 { margin: 0; }
.secondary { border: 1px solid #5b4328; background: #302417; color: #ddba88; padding: 9px 12px; border-radius: 5px; font-size: 11px; }
.item-list { display: grid; gap: 10px; margin-top: 18px; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid #45301b; background: #21180f; border-radius: 8px; }
.list-item > svg { color: #bd9860; }
.item-title { font-size: 13px; color: #e5cba3; overflow-wrap: anywhere; }
.item-detail { font-size: 10px; color: #9a7e57; margin-top: 7px; line-height: 1.6; }
.item-status { margin-left: auto; font-size: 10px; color: #adad7e; white-space: nowrap; }
.list-item .secondary { margin-left: auto; }
.empty-list { border: 1px dashed #593a1b; border-radius: 8px; padding: 45px 25px; text-align: center; color: #b49465; font-size: 12px; line-height: 1.8; margin-top: 18px; }
.results { width: 100%; max-width: 900px; margin: 25px auto; }
.result-card { padding: 22px; border: 1px solid #594025; border-radius: 10px; background: #261b10; }
.result-top { display: flex; align-items: center; gap: 12px; color: #dfba86; }
.result-top h2 { font-size: 17px; font-weight: 500; margin: 0; }
.result-top span { display: block; margin-top: 7px; font-size: 10px; color: #ad8c5b; }
.result-card audio { width: 100%; height: 36px; margin-top: 20px; }
.result-footnote { font-size: 10px; color: #ad8b59; line-height: 1.7; margin: 14px 0; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.metric { padding: 24px; border: 1px solid #563a1b; border-radius: 8px; background: #25190d; }
.metric span { font-size: 11px; color: #bb945c; }
.metric strong { display: block; font-size: 28px; margin-top: 20px; font-weight: 400; color: #e9c28d; }
.panel-note { font-size: 12px; line-height: 1.8; color: #ae8753; }
.settings-box { border: 1px solid #50351a; border-radius: 8px; background: #20160c; padding: 23px; margin-bottom: 15px; }
.settings-box h2 { font-size: 17px; font-weight: 500; color: #e2ba83; margin: 0 0 14px; }
.settings-box p { font-size: 12px; line-height: 1.8; color: #ac8757; overflow-wrap: anywhere; }
dialog { width: min(440px, calc(100vw - 32px)); border: 1px solid #74512c; border-radius: 12px; background: #251a0e; color: #e9c899; padding: 27px; box-shadow: 0 25px 100px #0008; }
dialog::backdrop { background: #080603c7; backdrop-filter: blur(4px); }
.dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 20px; }
.dialog-top h2 { font-size: 20px; margin: 0; font-weight: 500; }
.close-dialog { background: none; color: #b88e56; font-size: 25px; padding: 0; }
.dialog-description { font-size: 12px; line-height: 1.8; color: #b38a56; }
dialog label { display: block; font-size: 11px; margin: 17px 0 9px; color: #cf9f60; }
dialog input { font-size: 13px; padding: 12px; }
#request-dialog { width: min(650px, calc(100vw - 32px)); }
#request-preview { max-height: 50vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; line-height: 1.6; color: #e1c9a5; }
.primary { width: 100%; margin-top: 23px; background: #d8ad71; color: #33210d; padding: 12px; font-weight: 600; font-size: 12px; border-radius: 5px; }
.toast { position: fixed; z-index: 10; bottom: 23px; left: 50%; transform: translateX(-50%); max-width: min(600px, 90vw); padding: 12px 20px; border: 1px solid #946737; border-radius: 8px; background: #3c2914; color: #f0cb94; font-size: 12px; line-height: 1.7; }
.launch-help { max-width: 580px; margin: 9vh auto; padding: 34px; border: 1px solid #5d4326; background: #21180f; border-radius: 13px; }
.launch-help h1 { margin-bottom: 18px; }
.launch-help p, .launch-help li { color: #b9a184; font-size: 14px; line-height: 1.8; }
.launch-help ol { padding-left: 22px; margin: 22px 0 27px; }
.primary-link { display: inline-block; padding: 12px 18px; border-radius: 6px; background: #dfbd8b; color: #302310; text-decoration: none; font-size: 13px; font-weight: 600; }
@media (min-width: 1600px) { .app-layout { grid-template-columns: 190px minmax(0, 1fr) 360px; } .app-layout.reading-view { grid-template-columns: 190px minmax(0, 1fr); } .workspace { padding-left: 45px; padding-right: 45px; } }
@media (max-width: 1160px) { .connection { display: none; } .modes button { padding: 11px 10px; } .app-layout { grid-template-columns: 64px minmax(0, 1fr) 300px; } .app-layout.reading-view { grid-template-columns: 64px minmax(0, 1fr); } .rail { padding: 20px 10px; } .rail-button { justify-content: center; padding: 10px; } .rail-button span, .nav-caption { display: none; } .workspace { padding: 18px 22px; } .project-toolbar label { display: none; } .project-toolbar select { width: 140px; } .brand { min-width: 130px; } .balance-button > span { display: none; } }
.disk-alert { border: 1px solid #826537; background: #302719; color: #f0ce95; border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; font-size: 12px; line-height: 1.5; }
.disk-alert.urgent { border-color: #9a4842; background: #351e1c; color: #ffc6be; }

@media (max-width: 800px) {
  .topbar { height: auto; min-height: 110px; padding: 14px 16px 0; flex-wrap: wrap; gap: 10px; }
  .brand { min-width: auto; margin-right: auto; }.brand-mark { font-size: 32px; }.top-actions { gap: 12px; }
  .modes { width: 100%; order: 3; justify-content: space-between; margin: 0; padding: 0 0 7px; overflow-x: auto; }
  .modes button { font-size: 11px; padding: 9px 10px; }.modes button svg { width: 14px; height: 14px; }
  .app-layout, .app-layout.reading-view { height: auto; min-height: calc(100dvh - 110px); grid-template-columns: 49px minmax(0, 1fr); }
  .rail { grid-column: 1; grid-row: 1 / 3; padding: 15px 6px; gap: 7px; }.rail-button { min-height: 37px; padding: 8px; }
  .parameters { grid-column: 2; grid-row: 1; border-left: 0; border-bottom: 1px solid #4a341e; overflow: visible; }
  .parameters summary { position: static; display: flex; justify-content: space-between; padding: 14px 17px; font-size: 11px; border-bottom: 0; }
  .parameters summary small { display: inline; color: #967648; font-size: 9px; margin-left: 5px; }.details-chevron { display: inline; }
  .parameters-body { padding: 15px 20px; }.workspace { grid-column: 2; grid-row: 2; min-height: 540px; overflow: visible; padding: 18px 16px; }
  .workspace-heading { flex-wrap: wrap; gap: 12px; margin-bottom: 19px; }.project-toolbar { width: 100%; }.project-toolbar select { flex: 1; width: auto; }.project-toolbar label { display: block; }
  .breadcrumb { font-size: 10px; }.stage { min-height: 240px; }.empty-stage { margin-top: 20px; }.hero-icon { width: 48px; height: 48px; }
  h1 { font-size: 23px; }.empty-stage > p:not(.eyebrow) { font-size: 11px; }.quick-starts button { font-size: 9px; }
  .composer-footer { gap: 8px; }.composer-meta { font-size: 8px; }.composer-meta > span:last-child { display: none; }.generate-button { font-size: 10px; padding: 10px; gap: 8px; }
  .keyboard-hint { display: none; }.under-composer { font-size: 8px; }.mode-notice { font-size: 9px; }.composer textarea { font-size: 11px; }
  .metric-grid { grid-template-columns: 1fr; }.list-item { padding: 13px; gap: 9px; flex-wrap: wrap; }.item-title { font-size: 11px; }.item-status { font-size: 9px; }
  .content-header h1 { font-size: 23px; }.settings-box { padding: 18px; }.settings-box p { font-size: 11px; }
  .launch-help { margin: 25px 16px; padding: 25px; }
}
