@font-face {font-family:Rooftop;src:url("/brand/rooftop.woff2") format("woff2");font-display:swap}
@font-face {font-family:Rooftop;src:url("/brand/rooftop-bold.woff2") format("woff2");font-weight:700;font-display:swap}
@font-face {font-family:Gravity;src:url("/brand/gravity.woff2") format("woff2");font-display:swap}
@font-face {font-family:Sora;src:url("/static/fonts/sora-latin-400-normal.woff2") format("woff2");font-display:swap}
@font-face {font-family:Sora;src:url("/static/fonts/sora-latin-500-normal.woff2") format("woff2");font-weight:500;font-display:swap}
@font-face {font-family:Sora;src:url("/static/fonts/sora-latin-600-normal.woff2") format("woff2");font-weight:600;font-display:swap}

:root {
  color-scheme: light;
  --paper:#fbf9f6; --white:#fffdfb; --warm:#f6eee5; --ink:#271b15; --muted:#655750;
  --line:#e7dcd2; --side:#221711; --accent:#aa4218; --orange:#e86e2c; --green:#25634b;
  --body:Rooftop, system-ui, sans-serif; --title:Gravity, Rooftop, system-ui, sans-serif;
  --ease:cubic-bezier(.23,1,.32,1);
}
* {box-sizing:border-box}
[hidden] {display:none !important}
body {margin:0;background:var(--paper);color:var(--ink);font:16px/1.5 var(--body)}
h1,h2,p,figure {margin:0}
button,input,textarea {font:inherit}
button {cursor:pointer}
button:disabled {opacity:.52;cursor:default}
a {color:var(--accent)}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible {
  outline:3px solid #b45328;outline-offset:3px
}
img {max-width:100%;display:block}
textarea,input {width:100%;color:var(--ink);background:var(--white);border:1px solid var(--line);border-radius:12px}
textarea {padding:12px 14px;resize:vertical;min-height:66px}
input {padding:11px 14px}
label {display:block;font-weight:700}
.sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.button {
  display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;
  padding:0 14px;border:1px solid transparent;border-radius:11px;text-decoration:none;
  font-weight:700;line-height:1.2;white-space:nowrap;
  transition:background-color 170ms var(--ease),border-color 170ms var(--ease),transform 160ms var(--ease);
}
.button:active:not(:disabled) {transform:scale(.98)}
.primary {background:var(--accent);color:white}
.primary:hover:not(:disabled) {background:#8e3514}
.outline {background:var(--white);color:var(--ink);border-color:var(--line)}
.outline:hover:not(:disabled) {background:#f4e9df;border-color:#d6b8a4}
.error {color:#982f18;font-size:14px;overflow-wrap:anywhere}

.login-shell {
  min-height:100svh;display:grid;place-items:center;padding:24px 0;
  background:radial-gradient(ellipse at 15% 5%, #fae6d7, transparent 48%), var(--paper);
}
.login-card {
  display:grid;grid-template-columns:1fr 1fr;width:min(92vw,760px);min-height:520px;
  background:var(--white);border:1px solid var(--line);border-radius:24px;overflow:hidden;
  box-shadow:0 24px 74px #6b362320;
}
.login-form {align-self:center;padding:48px;font:400 14px/21px Sora,system-ui,sans-serif}
.login-brand {display:flex;align-items:center;gap:12px;margin-bottom:16px;white-space:nowrap}
.login-brand img {height:26px;width:auto}
.login-brand span {border-left:1px solid var(--line);padding-left:12px;font-size:13px;font-weight:500;line-height:18px}
.login-form h1 {font:700 32px/35.2px var(--body);letter-spacing:-.03em}
.login-form > p {color:var(--muted);margin-top:8px}
.login-form form {display:grid;margin-top:25px}
.login-form label {font-size:13px;line-height:18px;font-weight:600;margin-bottom:6px}
.login-form input {font:400 16px/24px Sora,system-ui,sans-serif;min-height:46px;margin-bottom:14px}
.login-form .button {margin-top:3px;width:100%;height:46px;font:600 14px/20px Sora,system-ui,sans-serif}
.login-form .error {padding-bottom:8px}
.login-art {
  padding:34px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;
  background:radial-gradient(ellipse at 70% 10%,#ffb488,transparent 64%),linear-gradient(145deg,#f5d5b7,#edab81);
  color:#3c2318;
}
.login-art img {max-height:278px;width:auto;object-fit:contain;filter:drop-shadow(0 18px 16px #743b1c34)}
.login-art p {margin-top:8px;font:700 26px/30px var(--body);letter-spacing:-.03em}

.studio {display:grid;grid-template-columns:252px minmax(0,1fr);height:100svh;min-height:540px}
.sidebar {display:flex;flex-direction:column;min-height:0;padding:24px 17px 15px;background:var(--side);color:#fff5ee}
.studio-brand {display:flex;align-items:center;gap:10px;color:inherit;text-decoration:none;margin:2px 4px 24px}
.studio-brand img {width:105px;height:auto}
.studio-brand span {font-weight:700;font-size:14px;border-left:1px solid #705142;padding-left:10px}
.side-new {width:100%;justify-content:flex-start;background:#422b1e;color:#fff3eb;border-color:#614134}
.side-new:hover {background:#583827}
.side-new span {font-size:19px}
.project-navigation {display:flex;flex-direction:column;flex:1;min-height:0;margin-top:25px}
.project-navigation h2 {margin:0 9px 7px;color:#d9bcab;font-size:13px;font-weight:700}
.project-navigation nav {display:grid;align-content:start;gap:3px;overflow:auto;min-height:0}
.project-navigation a,.side-footer a,.side-footer button {
  display:flex;align-items:center;gap:7px;min-height:44px;padding:7px 10px;border:none;border-radius:8px;
  color:#f6e8e0;background:transparent;text-decoration:none;text-align:left;overflow-wrap:anywhere
}
.project-navigation a:hover,.side-footer :is(a,button):hover {background:#3c281e}
.project-navigation a[aria-current] {background:#563323;color:#fff}
.side-footer {display:grid;grid-template-columns:1fr auto;gap:4px;border-top:1px solid #533626;padding-top:9px;font-size:14px}
.side-footer a,.side-footer button {white-space:nowrap}
.studio-main {min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);min-width:0}
.toolbar {display:flex;align-items:center;justify-content:space-between;gap:18px;padding:17px clamp(18px,3vw,42px);border-bottom:1px solid var(--line);min-height:68px}
.toolbar h1 {font-family:var(--title);font-size:clamp(21px,2vw,31px);line-height:1.14;overflow-wrap:anywhere}
.worker-status {display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);white-space:nowrap}
.worker-status::before {content:"";width:8px;height:8px;border-radius:50%;background:#ad6b3e}
.worker-status[data-online=true]::before {background:#388968}
.workspace {display:grid;grid-template-columns:minmax(335px,1.08fr) minmax(318px,1fr);min-height:0}
.mobile-nav {display:none}
.conversation {min-width:0;min-height:0;display:flex;flex-direction:column}
.conversation-scroll {flex:1;overflow:auto;min-height:0;padding:30px clamp(16px,3vw,42px)}
.welcome {margin:clamp(8px,5vh,65px) 0 18px;max-width:440px}
.welcome h2,.empty-art h2 {font-family:var(--title);font-weight:400;font-size:clamp(28px,3.5vw,48px);line-height:1.02;letter-spacing:-.025em}
.welcome p,.empty-art p {margin-top:12px;color:var(--muted);max-width:34ch}
.prompt-example {
  min-height:44px;margin-top:20px;padding:9px 12px;border:1px solid #dfcab9;border-radius:10px;
  background:#f9efe6;color:#653723;text-align:left
}
.prompt-example:hover {background:#f2e1d3}
.composer {display:grid;gap:9px;padding:14px clamp(16px,3vw,42px) 20px;border-top:1px solid var(--line)}
.composer textarea {min-height:86px;max-height:240px}
.composer-actions {display:flex;justify-content:flex-end;align-items:center;gap:7px;flex-wrap:wrap;font-size:14px}
.model-label {margin-right:auto;color:var(--muted);font-size:13px}
.messages {display:grid;gap:13px}
.message {max-width:94%;padding:10px 13px;border:1px solid var(--line);border-radius:13px;background:var(--white)}
.message.user {justify-self:end;background:#f6e8dc}
.message strong {color:#73442e;font-size:13px}
.message p {white-space:pre-wrap;overflow-wrap:anywhere}
.job-status {margin-top:17px;color:var(--muted);padding-left:13px;border-left:2px solid var(--orange)}
.job-status.failed {color:#982f18}
.queue-actions .button {margin-top:9px}
.artwork {min-width:0;overflow:auto;padding:22px clamp(18px,3vw,34px);background:var(--warm);border-left:1px solid var(--line)}
.empty-art {display:flex;min-height:100%;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:20px 2px}
.empty-art h2 {font-size:clamp(25px,3.1vw,39px)}
.slide-stack {
  position:relative;isolation:isolate;width:clamp(130px,16vw,210px);aspect-ratio:4/5;margin:3px 0 27px;
  display:grid;place-items:center;border-radius:16px;border:1px solid #c89270;background:linear-gradient(145deg,#fff0e6,#e9ad85);
  box-shadow:0 14px 36px #64322126
}
.slide-stack::before,.slide-stack::after {content:"";position:absolute;inset:2px;border-radius:14px;border:1px solid #cdad98;z-index:-2;transform:rotate(-9deg);background:#fae5d3}
.slide-stack::after {transform:rotate(8deg);z-index:-1;background:#f5d4bc}
.slide-stack img {position:absolute;inset:7% 5%;z-index:1;height:86%;width:90%;object-fit:contain;filter:drop-shadow(0 10px 8px #77362138)}
.art-toolbar {display:flex;align-items:center;justify-content:space-between;gap:8px}
.art-toolbar h2 {font-family:var(--title);font-size:28px;font-weight:400;line-height:1.1}
.version-status {font-size:13px;color:var(--muted)}
.version-status[data-state=approved] {color:var(--green)}
.version-status[data-state=changes_requested] {color:#9b3819}
.pills {display:flex;flex-wrap:wrap;gap:7px;margin:13px 0}
.pills button {min-height:44px;min-width:44px;padding:0 10px;border:1px solid var(--line);border-radius:20px;background:#fff5ed;color:#573421}
.pills button[aria-pressed=true] {background:var(--side);border-color:var(--side);color:#fff5ed}
.slide {margin:0 auto;max-width:380px}
.slide-frame {aspect-ratio:4/5;max-width:min(380px,48vh);margin:auto;border-radius:10px;overflow:hidden;background:#e9d6c5;box-shadow:0 10px 27px #4a2a1a20}
.slide-frame img {width:100%;height:100%;object-fit:contain}
.slide-nav {display:flex;justify-content:center;align-items:center;gap:13px;margin:12px 0 10px;font-size:13px}
.review-actions {display:grid;grid-template-columns:1fr 1fr;gap:8px}
.review-status {margin-top:8px;color:var(--accent);font-size:14px}
.caption {margin-top:13px;border-top:1px solid #e1cfc1;font-size:14px}
.caption summary {cursor:pointer;min-height:44px;padding:11px 0;font-weight:700}
.caption p {white-space:pre-wrap;overflow-wrap:anywhere}
.caption ul {margin:0;padding-left:18px;overflow-wrap:anywhere}
.file-links {display:flex;gap:16px;flex-wrap:wrap}
.file-links a {display:flex;align-items:center;min-height:44px}
dialog {width:min(94vw,490px);border:1px solid #d9c7ba;border-radius:18px;padding:23px;background:var(--white);color:var(--ink);box-shadow:0 16px 55px #21160e52}
dialog::backdrop {background:#20130eb5}
dialog label {margin-top:11px;margin-bottom:6px}
.dialog-actions {display:flex;justify-content:flex-end;gap:8px;margin-top:10px}
.archive-empty {max-width:750px;margin:44px auto;padding:0 22px}
.archive-empty h1 {margin:10px 0;font-family:var(--title)}
@media (max-width:1050px) {
  .studio {grid-template-columns:201px minmax(0,1fr)}
  .sidebar {padding-inline:12px}
  .side-footer {grid-template-columns:1fr}
}
@media (max-width:850px) {
  .studio {display:block;height:auto;min-height:100svh}
  .sidebar {display:grid;grid-template-columns:1fr auto;gap:8px;padding:12px;align-items:center}
  .studio-brand {margin:0}
  .side-new {width:auto}
  .project-navigation {grid-column:1/-1;margin:0}
  .project-navigation h2 {display:none}
  .project-navigation nav {display:flex;overflow:auto}
  .project-navigation a {white-space:nowrap}
  .side-footer {grid-column:1/-1;display:flex;padding-top:1px;justify-content:space-between}
  .studio-main {display:block}
  .toolbar {min-height:58px;padding:12px 15px}
  .worker-status {font-size:12px}
  .mobile-nav {display:flex;padding:6px 15px;gap:7px;background:var(--paper);border-bottom:1px solid var(--line)}
  .mobile-nav button {border:1px solid var(--line);border-radius:9px;min-height:44px;padding:0 15px;background:var(--white);color:var(--ink);font-weight:700}
  .mobile-nav button[aria-pressed=true] {border-color:#b26a49;background:#f5e5d8}
  .workspace {display:block}
  .workspace[data-mobile=chat] .artwork,.workspace[data-mobile=art] .conversation {display:none}
  .conversation {min-height:430px}
  .conversation-scroll {min-height:220px;max-height:55svh;padding-block:17px}
  .welcome {margin-top:4px}
  .artwork {border-left:0;min-height:430px}
  .empty-art {min-height:360px}
  .slide-frame {max-width:min(340px,78vw)}
}
@media (max-width:640px) {
  .login-card {grid-template-columns:1fr;min-height:0}
  .login-form {padding:24px}
  .login-art {display:none}
  .login-brand img {height:22px}
  .login-brand span {font-size:12px}
  .login-form h1 {font-size:30px;line-height:34px}
}
@media (prefers-reduced-motion:reduce) {
  .button {transition:none}
  .button:active:not(:disabled) {transform:none}
}
