:root {
  --bg:#121315; --panel:#191a1b; --text:#f3eee3; --muted:#aaa79d;
  --line:rgba(220,210,187,.15); --gold:#e6c588;
  --studio-serif:"Songti SC","Noto Serif CJK SC","Source Han Serif SC","STSong","SimSun",Georgia,serif;
  --rail-width:211px;
}
body {font-family:Inter,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}
button,a,input,select,textarea { -webkit-tap-highlight-color:transparent }
:focus-visible { outline:2px solid #e7c88a; outline-offset:4px }
.shell { grid-template-columns:var(--rail-width) minmax(0,1fr); background:#121315 }
.shell .sidebar {width:var(--rail-width);padding:26px 13px 14px;background:#151618;gap:18px;overflow-y:auto}
.rail-brand {display:flex;gap:12px;align-items:center;margin:2px 10px 7px;color:var(--text);text-decoration:none}
.rail-brand>span:last-child {font:600 25px/1 var(--studio-serif);letter-spacing:.13em}
.rail-brand small {display:block;font:600 8px/1.4 "Segoe UI",sans-serif;color:#b6a98c;letter-spacing:.21em;margin-top:6px}
.sequence-symbol {display:flex;align-items:center;justify-content:center;width:37px;height:37px;gap:3px;background:#dbc398;overflow:hidden}
.sequence-symbol i {display:block;width:4px;height:21px;background:#28251e;transform:skew(-20deg)}
.sequence-symbol i:nth-child(1){height:12px;align-self:flex-end;margin-bottom:8px}
.sequence-symbol i:nth-child(3){height:12px;align-self:flex-start;margin-top:8px}
.rail-group+.rail-group {margin-top:22px}
.sidebar .nav-label {font-size:10px;font-weight:600;letter-spacing:.12em;color:#a6a298;margin:0 12px 7px}
.sidebar .nav-item {position:relative;color:#c2bfb7;font-size:13px;line-height:1.35;font-weight:500;min-height:36px;padding:8px 11px;gap:11px;margin:2px 0;border-radius:5px;text-decoration:none;transition:background .15s,color .15s}
.sidebar .nav-item svg {width:17px;height:17px;color:#9a9b96}
.sidebar .nav-item:hover {background:#222324;color:#fff}
.sidebar .nav-item.active {color:#f3dfb3;background:#343029;box-shadow:none}
.sidebar .nav-item.active svg {color:#dfc596}
.sidebar .nav-item.active:after {content:"";display:block;background:#dec395;width:4px;height:4px;border-radius:100%}
.rail-account {margin-top:auto;border:0;border-top:1px solid var(--line);background:none;color:var(--text);border-radius:0;display:flex;align-items:center;gap:11px;padding:15px 4px 1px;text-align:left;width:100%}
.rail-account span:nth-child(2) {flex:1;font-size:12px;overflow-wrap:anywhere}
.rail-account small {display:block;font-size:10px;color:var(--muted);margin-top:3px}
.rail-avatar {background:#302e29;border:1px solid #676051;border-radius:50%;width:33px;height:33px;display:grid;place-items:center;color:#e2d5bb;font:16px var(--studio-serif)}
.rail-account span:last-child {color:#c6b99b;padding-right:7px}
.shell .topbar {height:57px;background:#141517;padding:0 clamp(20px,3vw,54px);gap:12px}
.workspace-path,.workspace-tools {display:flex;align-items:center;gap:13px;font-size:12px}
.workspace-path a,.workspace-path span {color:var(--muted)}
.workspace-path strong {font-weight:500}
.workspace-tools {margin-left:auto}
.preview-label {color:#c3bbaa;font-size:11px;display:flex;align-items:center;gap:6px}
.preview-label i {width:5px;height:5px;background:#c7ad81;border-radius:50%}
.workspace-tools button {font:600 12px Georgia,serif;width:25px;height:25px;display:grid;place-items:center;padding:0;background:none;border:1px solid #56554d;color:#d9d5c8;border-radius:50%}
.shell .page {max-width:1550px;padding:clamp(20px,2.5vw,40px) clamp(20px,3vw,54px) 55px}
.page-heading h1 {font:500 clamp(32px,3.2vw,48px)/1.25 var(--studio-serif);letter-spacing:.01em;margin:0 0 10px}
.page-heading p,.help-note,.muted {color:var(--muted)}
.shell .panel,.project-list,.stat {background:#1a1b1d;border-color:var(--line);border-radius:8px}
.shell .gold,dialog .gold {background:#e4c994;color:#201d16;border:1px solid #ebd7b0;box-shadow:none;font-weight:600}
.shell .gold:hover,dialog .gold:hover {background:#f2deb5}
.shell :is(input,select,textarea) {color:var(--text);border-color:#434340;background:#141517;border-radius:5px}
.shell textarea {line-height:1.7}
.shell :is(input,textarea)::placeholder {color:#99968e}
.shell .empty-frame {border-radius:8px}
.catalog-toolbar {padding:9px 0 18px;border-bottom:1px solid var(--line);justify-content:space-between}
.catalog-toolbar .tabs {flex-wrap:wrap}
.catalog-toolbar .tabs button {color:#c3bfb5}
.catalog-toolbar .tabs button.active {background:#333029;color:#e7cea0}
.catalog-results {gap:13px}
.model-spec {--tint:#d8bf91;border:1px solid var(--line);background:#1c1d1e;border-radius:8px;padding:21px;min-width:0;display:flex;flex-direction:column}
.family-sd25,.family-sd20 {--tint:#bea893}.family-magi {--tint:#a7baad}.family-gpt,.family-gpt25 {--tint:#abbaC7}
.model-spec header,.model-spec footer {display:flex;align-items:center;justify-content:space-between;gap:10px}
.model-spec header>span:last-child {font:11px ui-monospace,Consolas,monospace;letter-spacing:.06em;color:var(--muted)}
.model-glyph {color:var(--tint);width:44px;height:44px;display:grid;place-items:center;font:italic 30px/1 Georgia,serif;border:1px solid color-mix(in srgb,var(--tint) 40%,transparent);background:color-mix(in srgb,var(--tint) 6%,transparent)}
.model-spec h2 {margin:21px 0 6px;font-size:19px;font-weight:550;letter-spacing:-.02em}
.model-spec p {margin:0 0 22px;color:#b2afa7;line-height:1.65;font-size:12px}
.model-spec footer {width:100%;max-width:none;border-top:1px solid var(--line);padding:14px 0 0;margin:auto 0 0;color:var(--text)}
.model-spec footer strong {font:500 20px Georgia,"Segoe UI",serif}.model-spec footer small {font:11px "Segoe UI",sans-serif;color:var(--muted)}
.model-spec footer button {font-size:12px;padding:7px 11px;border-radius:4px;color:var(--text)}
.model-spec footer button span {margin-left:5px;color:var(--gold)}
.catalog-empty {grid-column:1/-1;margin:20px 0;padding:25px;color:var(--muted);text-align:center}
.photo-room {display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,.85fr);gap:20px}
.photo-mount {border:1px solid var(--line);border-radius:8px;background:#0d0e0f;display:grid;place-items:center;min-height:360px;padding:22px}
.photo-mount figure {margin:0;width:100%;display:flex;align-items:center;flex-direction:column}
.photo-window {position:relative;aspect-ratio:var(--image-ratio);width:min(100%, calc(360px * var(--image-ratio)));max-width:540px;outline:1px solid #737168;outline-offset:5px}
.photo-window img {width:100%;height:100%;display:block;object-fit:cover}
.photo-window span {position:absolute;inset:0;background:linear-gradient(90deg,transparent 33.2%,#fffa 33.33%,transparent 33.52%,transparent 66.52%,#fffa 66.66%,transparent 66.85%),linear-gradient(0deg,transparent 33.2%,#fffa 33.33%,transparent 33.52%,transparent 66.52%,#fffa 66.66%,transparent 66.85%);opacity:.36}
.photo-mount figcaption {display:flex;gap:12px;margin-top:17px;color:#aba9a0;font-size:11px}
.photo-mount b {font:12px ui-monospace,Consolas,monospace;color:var(--gold)}
.photo-controls h2 {margin:0 0 18px;font-size:17px}
.photo-params {display:grid;grid-template-columns:1fr 1fr .9fr;gap:9px;margin-bottom:20px}
.photo-params label {min-width:0;font-size:12px;color:#c8c4bb}
.photo-params :is(select,input) {margin-top:6px;width:100%}
.ref-add {display:flex;align-items:center;width:100%;gap:7px;justify-content:center;border:1px dashed #5a564a;color:#d0c8b8;padding:10px;font-size:12px}
.ref-add svg {width:16px;height:16px}.ref-add small {color:#aaa79d}.photo-refs {display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.photo-refs img {width:40px;height:40px;object-fit:cover}
.rail-brand .sequence-symbol {background:transparent;gap:2px;border:1px solid #a99470;border-radius:10px 2px 10px 2px;transform:skew(-5deg)}
.rail-brand .sequence-symbol i {background:#ddc49b;width:3px;height:14px;transform:skew(-28deg)}
.rail-brand .sequence-symbol i:first-child,.rail-brand .sequence-symbol i:last-child {height:9px}
.page-studio .workspace {background:#1a1b1c;border-color:var(--line);border-radius:8px}
.page-studio .project-list {background:#191a1b}
.page-studio .project-button.active {background:#363129;color:#eddbb7}
.page-studio .params {background:#161718;border-radius:5px}
.page-studio .shot {background:#202020;border-radius:5px}
.page-studio .shot-index {font:italic 22px/1.1 Georgia,serif;color:#d6bd91}
.page-studio .shot-preview {cursor:pointer;border-radius:3px}
.page-studio .empty h3 {font:500 26px/1.4 var(--studio-serif)}
@media (min-width:801px) and (max-height:780px) {.shell .sidebar {gap:11px;padding-top:16px}.rail-group+.rail-group{margin-top:13px}.sidebar .nav-item{min-height:31px;padding-top:6px;padding-bottom:6px}}
@media (max-width:1050px) {.photo-room {grid-template-columns:1fr 1fr}.catalog-toolbar input{max-width:220px}}
@media (max-width:800px) {
  .sidebar .cc-rail-brand{display:flex;align-items:center;justify-content:space-between}
  .sidebar .drawer-close{width:34px;height:34px;flex:none;padding:0;border:0;background:transparent;color:inherit;font:24px/1 sans-serif}
  .shell .sidebar {width:min(265px,86vw);visibility:hidden;gap:16px;transition:transform .2s ease}
  .shell.nav-open .sidebar {visibility:visible}.shell.nav-open .mobile-overlay{padding:0;border:0;border-radius:0}
  .shell .topbar {padding:0 16px;height:52px}.shell .page {padding:21px 16px 40px}
  .menu-button {font-size:17px;border:0;background:none;line-height:1;color:var(--text)}
  .workspace-path,.workspace-tools {gap:8px}.rail-account {margin-top:24px}
  .photo-room {grid-template-columns:1fr}.photo-mount {min-height:215px;padding:20px}.photo-window{width:min(100%,calc(180px * var(--image-ratio)))}
  .catalog-toolbar input {max-width:none}.catalog-toolbar .tabs {gap:3px}.catalog-toolbar .tabs button {padding:8px 10px}
}
@media (prefers-reduced-motion:reduce) {*,*:before,*:after {scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
