/* Quiet paper studio: a warmer, lower-chrome layer over the existing graphite system. */
:root{
  --studio-bg:#141311;--studio-surface:#1C1A16;--studio-raised:#27231D;--studio-text:#F1EDE4;--studio-muted:#A9A195;--studio-line:#332E26;
  --studio-accent:#D8B26A;--studio-coral:#C39A62;--studio-lime:#9CB07F;--studio-soft:rgba(216,178,106,.10);--studio-sidebar:#171511;--on-accent:#1B1A17;
  --danger:#E0A0A0;--warning:#D8B26A;--shadow:0 18px 48px rgba(0,0,0,.32);
}
:root:is([data-theme=day],[data-theme=light]){
  --studio-bg:#F4F1EA;--studio-surface:#FFFDF9;--studio-raised:#F1ECE3;--studio-text:#211F1A;--studio-muted:#6C6559;--studio-line:#E3DCCF;
  --studio-accent:#93672E;--studio-coral:#7C5A34;--studio-lime:#5F7A4E;--studio-soft:rgba(147,103,46,.08);--studio-sidebar:#F9F6EF;--on-accent:#FFF9EF;
  --danger:#A9473A;--warning:#8A6A2B;--shadow:0 18px 48px rgba(66,53,33,.08);
}
body{
  background:
    radial-gradient(900px 540px at 12% -8%, color-mix(in srgb,var(--accent) 5%,transparent), transparent 68%),
    radial-gradient(760px 500px at 100% 100%, color-mix(in srgb,var(--accent) 4%,transparent), transparent 70%),
    var(--bg);
}
.topbar{background:color-mix(in srgb,var(--surface) 88%,transparent);backdrop-filter:blur(18px);box-shadow:none}
.sidebar{background:linear-gradient(180deg,var(--sidebar),color-mix(in srgb,var(--sidebar) 82%,var(--surface)))}
.brand{letter-spacing:-.02em}
.nav-link,.studio-menu-title{border-radius:10px}
.nav-link.active,.studio-menu-title.active{background:var(--soft);color:var(--accent);font-weight:650}
.button,.tabs button{border-radius:10px}
.button.primary{box-shadow:0 8px 20px color-mix(in srgb,var(--accent) 22%,transparent),inset 0 1px #ffffff38}
.input,.select,.textarea{border-radius:10px;font-size:15px;background:var(--surface)}
.icon-button{border-radius:10px}
.card,.panel,.metric,.data-table,.section-title+.card{border-radius:16px}
.card,.panel{background:var(--surface);box-shadow:0 1px 0 color-mix(in srgb,#fff 40%,transparent) inset,0 8px 30px color-mix(in srgb,var(--text) 4%,transparent)}
.credit-pill,.profile-button{border-radius:999px}
.g-home h1,.page-title,.s-intro h2,.n-intro h2{letter-spacing:-.045em}
.g-home>header>span{color:var(--accent);font-weight:600}
.g-home-entry{background:var(--surface);border-color:var(--line);box-shadow:0 1px 0 color-mix(in srgb,#fff 50%,transparent) inset,0 10px 34px color-mix(in srgb,var(--text) 5%,transparent)}
.g-home-entry:hover{box-shadow:0 1px 0 color-mix(in srgb,#fff 55%,transparent) inset,0 20px 48px color-mix(in srgb,var(--text) 9%,transparent)}
.g-home-entry h2{letter-spacing:-.035em}
.g-entry-art{background:radial-gradient(ellipse at 55% 22%,color-mix(in srgb,var(--accent) 9%,transparent),transparent 68%),color-mix(in srgb,var(--surface-2) 72%,var(--surface))}
.g-entry-index{color:var(--accent);opacity:.8}
.g-workspace .g-composer{background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:0 1px 0 color-mix(in srgb,#fff 45%,transparent) inset,0 18px 46px color-mix(in srgb,var(--text) 6%,transparent)}
.g-workspace .g-message-user{border-bottom-color:var(--line)}
.g-workspace .g-empty-identity h2{letter-spacing:-.04em}
.g-workspace .g-send{background:var(--accent);color:var(--on-accent);border-radius:11px}
.s-studio .s-whole-text,.s-studio .s-document-preview,.n-body textarea,.n-editor textarea{font-size:16px!important;line-height:1.95!important;letter-spacing:.005em}
.s-studio .s-whole-paper{max-width:720px}
.s-assistant{background:color-mix(in srgb,var(--surface-2) 38%,var(--bg));border-left-color:var(--line)}
.s-assistant-header h3{font-weight:600;letter-spacing:-.02em}
.s-chat-message p{line-height:1.9}
.s-studio .s-episode-rail{border-right-color:var(--line)}
.s-rail-episode{border-radius:10px}
.s-rail-episode.active{background:var(--soft);border-color:color-mix(in srgb,var(--accent) 28%,var(--line))}
.s-send,.n-send,.g-send{border-radius:11px!important}
.director-shell .d-panel,.d-workspace .panel{border-radius:16px}
.field>span,.field>label{color:var(--muted)}
::selection{background:color-mix(in srgb,var(--accent) 88%,transparent);color:var(--on-accent)}
@media(prefers-reduced-motion:reduce){.g-home-entry,.card,.panel{transition:none}}
/* Content-first home: one question, one composer, quiet shortcuts. */
body .page-content:has(.g-home){padding:0 24px}
.g-home{max-width:none;margin:0;padding:0;min-height:calc(100dvh - var(--chrome-height,56px));display:flex;align-items:center;justify-content:center}
.g-home .g-home-stage{width:min(720px,100%);padding:24px 0}
.g-home .g-home-intro{text-align:center;margin:0 0 26px}
.g-home .g-home-intro h1{font-size:clamp(28px,3.4vw,38px);line-height:1.35;font-weight:600;letter-spacing:-.045em;margin:0 0 10px;color:var(--text)}
.g-home .g-home-intro p{font-size:14px;line-height:1.8;color:var(--studio-muted);margin:0}
.g-home .g-home-composer{background:var(--studio-surface);border:1px solid var(--studio-line);border-radius:20px;padding:18px 20px 14px;box-shadow:0 1px 0 color-mix(in srgb,#fff 45%,transparent) inset,0 16px 44px color-mix(in srgb,var(--text) 6%,transparent);transition:border-color .16s,box-shadow .16s}
.g-home .g-home-composer:focus-within{border-color:color-mix(in srgb,var(--studio-accent) 52%,var(--studio-line));box-shadow:0 0 0 3px var(--studio-soft),0 16px 44px color-mix(in srgb,var(--text) 7%,transparent)}
.g-home .g-home-composer textarea{display:block;width:100%;min-height:66px;max-height:220px;padding:2px 2px 14px;border:0;outline:none;resize:none;background:transparent;color:var(--studio-text);font:inherit;font-size:16px;line-height:1.8}
.g-home .g-home-composer textarea::placeholder{color:var(--studio-muted);opacity:.8}
.g-home .g-home-composer-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:12px;border-top:1px solid var(--studio-line)}
.g-home .g-home-model{display:flex;align-items:center;gap:7px;min-width:0;color:var(--studio-muted)}
.g-home .g-home-model svg{flex-shrink:0}
.g-home .g-home-model select{min-width:0;max-width:100%;min-height:32px;border:0;outline:none;background:transparent;color:var(--studio-muted);font:inherit;font-size:13px;cursor:pointer}
.g-home .g-home-send{display:grid;place-items:center;width:40px;height:40px;min-width:40px;border:0;border-radius:50%;background:var(--studio-accent);color:var(--on-accent);cursor:pointer}
.g-home .g-home-send:not(:disabled):hover{filter:brightness(1.06)}
.g-home .g-home-send:disabled{opacity:.45;cursor:not-allowed}
.g-home .g-home-shortcuts{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:18px}
.g-home .g-home-shortcuts a,.g-home .g-home-shortcuts button{display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:0 14px;border:1px solid var(--studio-line);border-radius:999px;background:transparent;color:var(--studio-muted);font:inherit;font-size:13px;text-decoration:none;cursor:pointer;transition:border-color .16s,color .16s,background .16s}
.g-home .g-home-shortcuts a:hover,.g-home .g-home-shortcuts button:hover{color:var(--studio-text);border-color:color-mix(in srgb,var(--studio-accent) 38%,var(--studio-line));background:var(--studio-soft)}
.g-home .g-home-recent{width:100%;margin-top:30px;padding-top:16px;border-top:1px solid var(--studio-line)}
.g-home .g-home-recent>p{margin:0 0 4px;font-size:12px;color:var(--studio-muted);letter-spacing:.06em}
.g-home .g-home-recent .g-home-activity{display:flex;flex-direction:column;flex-wrap:nowrap;gap:0;max-height:none;overflow:visible;padding:0;border:0}
.g-home .g-home-recent .g-home-activity>button{width:100%;min-height:42px;padding:8px 0;border-bottom:1px solid color-mix(in srgb,var(--studio-line) 70%,transparent);color:var(--studio-text)}
.g-home .g-home-recent .g-home-activity>button:last-child{border-bottom:0}
.g-home .g-home-recent .g-home-activity strong{max-width:100%;flex:1;text-align:left;font-size:13px}
.g-home .g-home-recent .g-home-activity>button:hover strong{color:var(--studio-accent)}
.g-home .g-home-recent .g-activity-kind{min-width:105px}
@media(max-width:800px){
  body .page-content:has(.g-home){padding:0 14px}
  .g-home{min-height:calc(100dvh - var(--chrome-height,56px));align-items:flex-start;padding-top:5vh}
  .g-home .g-home-stage{padding:12px 0 24px}
  .g-home .g-home-intro{text-align:left;margin-bottom:20px}
  .g-home .g-home-intro h1{font-size:27px}
  .g-home .g-home-intro p{font-size:13px}
  .g-home .g-home-composer{padding:14px 14px 12px;border-radius:16px}
  .g-home .g-home-composer textarea{min-height:78px;font-size:16px}
  .g-home .g-home-shortcuts{justify-content:flex-start;gap:7px}
  .g-home .g-home-shortcuts a,.g-home .g-home-shortcuts button{min-height:44px;padding:0 13px;font-size:13px}
  .g-home .g-home-recent{margin-top:24px}
  .g-home .g-home-recent .g-activity-kind{min-width:92px}
}
@media(prefers-reduced-motion:reduce){.g-home .g-home-composer,.g-home .g-home-shortcuts a,.g-home .g-home-shortcuts button{transition:none}}
/* One-level creation navigation: account links stay reachable inside a collapsed group. */
.sidebar .nav-account{margin-bottom:0}
.sidebar .nav-account .studio-menu-title{color:var(--muted)}
.sidebar .nav-account .studio-menu-title .qj-icon:last-child{margin-left:auto}
.sidebar .nav-account .studio-submenu .nav-link{font-size:12px;min-height:36px}
body .sidebar-compact .nav-account{display:none}
@media(max-width:480px){body .topbar{padding-inline:14px}body .topbar .credit-pill{display:none}}
/* The composer already shows the model; a running character count is noise. */
.g-workspace #generation-prompt-count{display:none}
