:root { --canvas:#f6f7fb; --surface:#ffffff; --surface-alt:#edf1f8; --ink:#17202f; --muted:#677084; --line:#dfe4ed; --blue:#2259e8; --coral:#f05d51; --yellow:#edbe25; --green:#0e9e78; --shadow:0 18px 55px rgba(27,39,65,.10); color-scheme:light; font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
:root[data-theme="dark"] { --canvas:#11151d; --surface:#1b212d; --surface-alt:#252d3b; --ink:#f2f5fa; --muted:#aeb8ca; --line:#364154; --blue:#7d9cff; --coral:#ff887c; --yellow:#f3cc52; --green:#48c8a4; --shadow:0 18px 55px rgba(0,0,0,.24); color-scheme:dark; }
* { box-sizing:border-box; }
body { margin:0; min-width:320px; background:var(--canvas); color:var(--ink); }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
.hidden { display:none !important; }
.sr-only { clip:rect(0 0 0 0); clip-path:inset(50%); height:1px; overflow:hidden; position:absolute; white-space:nowrap; width:1px; }
.eyebrow { margin:0 0 6px; color:var(--muted); font-size:11px; font-weight:750; letter-spacing:0; line-height:1; }
.auth-screen { min-height:100vh; display:grid; grid-template-columns:minmax(380px,48vw) 1fr; background:var(--surface); }
.auth-art { min-height:100vh; position:relative; overflow:hidden; background:#9fc2fb; }
.auth-art::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,rgba(24,48,100,.15),transparent 60%),linear-gradient(0deg,rgba(12,21,43,.17),transparent 52%); }
.auth-art img { width:100%; height:100%; object-fit:cover; display:block; }
.auth-brand { position:absolute; left:42px; top:34px; z-index:1; display:flex; align-items:center; gap:11px; color:white; font-size:15px; }
.mark,.rail-logo .rail-mark { display:block; width:32px; height:32px; border-radius:5px; object-fit:cover; }
.auth-panel { display:grid; min-width:0; place-items:center; padding:40px 32px; }
.auth-panel-inner { width:100%; max-width:390px; min-width:0; }
.auth-topline { display:flex; align-items:center; justify-content:space-between; margin-bottom:52px; }
.auth-panel h1 { margin:0; font-size:30px; line-height:1.18; letter-spacing:0; }
.auth-panel p:not(.form-message) { margin:10px 0 28px; color:var(--muted); font-size:14px; line-height:1.6; }
.plain-button,.text-button { padding:0; border:0; background:none; color:var(--blue); font-weight:700; }
.field { display:grid; gap:8px; margin-top:16px; color:var(--muted); font-size:12px; font-weight:700; }
.field input,.setting-row select,.setting-row input:not([type="checkbox"]) { width:100%; min-height:46px; border:1px solid var(--line); background:var(--surface); color:var(--ink); border-radius:5px; padding:0 12px; outline:0; }
.field input:focus,.prompt-field:focus-within,.setting-row select:focus { border-color:var(--blue); box-shadow:0 0 0 3px color-mix(in srgb,var(--blue) 16%,transparent); }
.form-message { min-height:20px; margin:12px 0 0; color:var(--coral); font-size:12px; line-height:1.45; }
.primary-button { min-height:44px; padding:0 17px; border:0; border-radius:5px; background:var(--blue); color:#fff; font-weight:800; transition:transform .16s ease,filter .16s ease; }
.primary-button:hover { filter:brightness(1.06); transform:translateY(-1px); }
.primary-button:disabled { cursor:wait; filter:grayscale(.2); opacity:.72; transform:none; }
.auth-submit { width:100%; margin-top:8px; }
.text-button { margin-top:18px; font-size:13px; }
.workspace { min-height:100vh; display:grid; grid-template-columns:68px minmax(0,1fr); }
.rail { position:fixed; z-index:5; width:68px; height:100vh; display:flex; flex-direction:column; align-items:center; padding:14px 10px; overflow:hidden; border-right:1px solid var(--line); background:var(--surface); transition:width .2s ease; }
.rail.expanded { width:214px; align-items:stretch; }
.icon-button { display:grid; place-items:center; width:38px; height:38px; padding:0; border:0; border-radius:5px; color:var(--ink); background:transparent; font-size:18px; }
.icon-button:hover,.nav-item:hover,.chip-button:hover,.user-button:hover,.mini-icon:hover { background:var(--surface-alt); }
.outlined { border:1px solid var(--line); }
.rail-toggle { align-self:center; margin-bottom:24px; }
.rail-logo { height:34px; display:flex; align-items:center; gap:11px; color:var(--ink); text-decoration:none; overflow:hidden; white-space:nowrap; }
.rail-logo .rail-mark { flex:0 0 32px; }
.rail-logo b { font-size:14px; }
.rail:not(.expanded) .rail-logo { justify-content:center; }
.rail:not(.expanded) .rail-logo b,.rail:not(.expanded) .nav-item b { display:none; }
.rail:not(.expanded) .nav-item { justify-content:center; padding:0; }
.rail-nav,.rail-bottom { width:100%; display:grid; gap:7px; }
.rail-nav { margin-top:40px; }
.rail-bottom { margin-top:auto; }
.nav-item { width:100%; height:42px; display:flex; align-items:center; gap:15px; padding:0 12px; border:0; border-radius:5px; background:transparent; color:var(--muted); text-align:left; white-space:nowrap; }
.nav-item > span:first-child { display:grid; width:20px; place-items:center; color:currentColor; font-size:17px; }
.nav-item b { font-size:13px; }
.nav-item.active { background:color-mix(in srgb,var(--blue) 11%,transparent); color:var(--blue); }
.connection-dot { width:9px !important; height:9px; margin-left:5px; border-radius:50%; background:var(--coral); }
.connection-dot.ready { background:var(--green); }
.canvas { grid-column:2; min-width:0; padding:0 clamp(22px,4vw,66px) 56px; }
.topbar { min-height:104px; display:flex; align-items:center; justify-content:space-between; gap:20px; border-bottom:1px solid var(--line); }
.topbar h1,.section-heading h2,.composer h2,.drawer-header h2,.empty-view h2 { margin:0; font-size:21px; letter-spacing:0; line-height:1.25; }
.topbar-actions { display:flex; align-items:center; gap:8px; }
.chip-button,.user-button { min-height:34px; display:inline-flex; align-items:center; gap:7px; padding:0 10px; border:1px solid var(--line); border-radius:5px; background:var(--surface); color:var(--ink); font-size:12px; font-weight:700; }
.user-button { padding:0 5px 0 6px; }
.avatar { display:grid; place-items:center; width:24px; height:24px; border-radius:50%; background:var(--yellow); color:#3d3210; font-size:11px; font-weight:850; }
.workbench { display:grid; grid-template-columns:minmax(0,1fr) minmax(236px,27%); gap:clamp(24px,4vw,62px); align-items:start; padding-top:42px; }
.composer,.gallery-section { min-width:0; grid-column:1; }
.composer-header,.section-heading,.composer-footer,.generation-meta,.drawer-header { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.composer-header { margin-bottom:18px; }
.prompt-field { position:relative; display:block; border:1px solid var(--line); border-radius:6px; background:var(--surface); transition:border-color .15s ease,box-shadow .15s ease; }
.prompt-field textarea { width:100%; min-height:150px; resize:vertical; padding:17px 18px 34px; border:0; outline:0; background:transparent; color:var(--ink); font-size:16px; line-height:1.55; }
.prompt-field > span { position:absolute; right:13px; bottom:11px; color:var(--muted); font-size:11px; }
.composer-footer { margin-top:12px; }
.model-select { display:flex; align-items:center; gap:8px; color:var(--muted); }
.model-select select { border:0; appearance:none; outline:0; background:transparent; color:var(--ink); font-size:12px; font-weight:750; }
.status-spark { width:9px; height:9px; border-radius:50%; background:var(--yellow); box-shadow:0 0 0 3px color-mix(in srgb,var(--yellow) 25%,transparent); }
.generate-button { display:flex; align-items:center; gap:9px; }
.workbench-message { margin-top:10px; }
.reference-section { grid-column:2; grid-row:1 / span 2; padding-top:1px; }
.section-heading { min-height:41px; margin-bottom:14px; }
.section-heading > span { color:var(--muted); font-size:11px; font-weight:700; }
.reference-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.upload-tile,.reference-tile { position:relative; aspect-ratio:1 / 1; display:grid; place-items:center; overflow:hidden; border:1px dashed var(--line); border-radius:5px; background:var(--surface); color:var(--muted); font-size:11px; font-weight:750; text-align:center; }
.upload-tile { align-content:center; gap:7px; padding:10px; }
.upload-tile input { position:absolute; opacity:0; inset:0; cursor:pointer; }
.upload-plus { display:grid; place-items:center; width:29px; height:29px; border-radius:50%; background:var(--surface-alt); color:var(--ink); font-size:19px; font-weight:400; }
.reference-tile { border-style:solid; }
.reference-tile img { width:100%; height:100%; object-fit:cover; }
.remove-reference { position:absolute; top:5px; right:5px; width:25px; height:25px; border:0; border-radius:50%; background:rgba(17,24,39,.74); color:#fff; font-size:17px; line-height:1; }
.gallery-section { margin-top:52px; }
.gallery-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; }
.generation-card { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:6px; background:var(--surface); }
.generation-card img { display:block; width:100%; aspect-ratio:1 / 1; object-fit:cover; background:var(--surface-alt); }
.generation-meta { min-height:43px; padding:7px 9px 7px 10px; color:var(--muted); font-size:11px; }
.generation-meta > div { display:flex; gap:4px; }
.mini-icon { display:grid; place-items:center; width:27px; height:27px; border:0; border-radius:4px; background:transparent; color:var(--ink); text-decoration:none; font-size:16px; }
.empty-view { min-height:68vh; display:grid; place-content:center; justify-items:center; text-align:center; }
.empty-symbol { display:grid; place-items:center; width:58px; height:58px; margin-bottom:15px; border-radius:50%; background:color-mix(in srgb,var(--blue) 12%,transparent); color:var(--blue); font-size:24px; }
.empty-view p { color:var(--muted); font-size:14px; }
.side-dialog { position:fixed; inset:0; width:100%; height:100%; max-width:none; max-height:none; padding:0; border:0; background:transparent; }
.side-dialog::backdrop { background:rgba(12,20,35,.42); }
.side-dialog[open] { display:grid; grid-template-columns:1fr minmax(320px,440px); }
.drawer-backdrop { grid-column:1; }
.drawer-backdrop button { width:100%; height:100%; border:0; background:transparent; }
.drawer-panel { grid-column:2; height:100%; overflow-y:auto; padding:32px; background:var(--surface); box-shadow:-20px 0 55px rgba(10,18,31,.16); }
.drawer-header { margin-bottom:22px; }
.drawer-copy { margin:0 0 27px; color:var(--muted); font-size:13px; line-height:1.55; }
.full-width { width:100%; margin-top:25px; }
.advanced-panel { display:block; }
.setting-row { display:grid; grid-template-columns:1fr 148px; align-items:center; gap:18px; min-height:68px; border-bottom:1px solid var(--line); color:var(--ink); font-size:13px; font-weight:750; }
.setting-row select { min-height:38px; }
.toggle-row input { justify-self:end; appearance:none; width:42px; height:24px; margin:0; border:0; border-radius:99px; background:var(--line); cursor:pointer; transition:background .15s ease; }
.toggle-row input::after { content:""; display:block; width:18px; height:18px; margin:3px; border-radius:50%; background:#fff; transition:transform .15s ease; }
.toggle-row input:checked { background:var(--blue); }
.toggle-row input:checked::after { transform:translateX(18px); }
@media (max-width:800px) { .auth-screen { grid-template-columns:1fr; } .auth-art { display:none; } .auth-panel { align-items:start; padding:11vh 32px 40px; } .workspace { grid-template-columns:1fr; padding-bottom:61px; } .rail { top:auto; bottom:0; flex-direction:row; justify-content:space-between; width:100%; height:61px; padding:7px 13px; border-top:1px solid var(--line); border-right:0; } .rail.expanded { width:100%; align-items:center; } .rail-toggle,.rail-logo,.rail-bottom .nav-item b,.rail-nav .nav-item b,.rail-bottom .nav-item:last-child { display:none; } .rail-nav,.rail-bottom { width:auto; display:flex; margin:0; } .nav-item { width:45px; padding:0; justify-content:center; } .connection-dot { margin:0 !important; } .canvas { grid-column:1; padding:0 18px 28px; } .topbar { min-height:82px; } .topbar-actions .chip-button span:not(:first-child),.user-button > span:last-child { display:none; } .workbench { grid-template-columns:1fr; gap:34px; padding-top:29px; } .reference-section { grid-column:1; grid-row:auto; } .reference-grid { grid-template-columns:repeat(4,1fr); } .gallery-section { margin-top:0; } .gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .side-dialog[open] { grid-template-columns:1fr; align-items:end; } .drawer-backdrop { display:none; } .drawer-panel { grid-column:1; height:auto; max-height:88vh; padding:25px 20px; border-radius:8px 8px 0 0; } }
@media (max-width:440px) { .topbar h1 { font-size:19px; } .topbar-actions { gap:5px; } .chip-button,.user-button { min-width:33px; padding:0 7px; justify-content:center; } .reference-grid { grid-template-columns:repeat(3,1fr); } .upload-tile { grid-column:span 1; } }
