/* Powder-color working paper: presentation only; preserve the G01 interaction layout. */
:root {
  --paper: #fffaf7;
  --paper-pink: #f8eae7;
  --paper-side: #f6e7e4;
  --ink: #34313a;
  --muted: #70616a;
  --accent: #244b83;
  --green: #244b83;
  --rose: #934c5b;
  --line: #e6d2ce;
  --border: #e6d2ce;
  --bg: #fffaf7;
  --side: #f6e7e4;
  --paper-serif: "Songti SC", "STSong", "SimSun", serif;
}
body {
  color: var(--ink);
  background: var(--paper-pink);
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}
:root { --paper-branch: url('/assets/display/paper-branch-desktop.dfc37d49d106.webp'); --paper-wash: url('/assets/display/paper-watercolor.cb49ff148efb.webp'); }
.main-shell, .login-page {
  background-color: var(--paper);
  background-image: var(--paper-wash), var(--paper-wash),
    radial-gradient(ellipse at 100% 100%, #f0c9cc99, transparent 48%),
    radial-gradient(ellipse at 0 0, #f4d6d388, transparent 42%);
  background-position: left bottom, right top, center, center;
  background-size: 460px 310px, 400px 280px, 100% 100%, 100% 100%;
  background-repeat: no-repeat;
}
.main-shell { position: relative; isolation: isolate; }
.main-shell::after, .main-shell::before, .sidebar::after {
  content: ''; position: absolute; pointer-events: none; z-index: -1;
  background: var(--paper-branch) no-repeat center / contain;
}
.main-shell::after { right: 0; bottom: 0; width: 130px; height: 190px; opacity: .5; }
.main-shell::before { display: none; }
.main-shell:has(.is-welcome)::after { width: min(480px, 42%); height: 310px; bottom: 15px; opacity: .78; }
.main-shell:has(.is-welcome)::before { display: block; width: 260px; height: 170px; left: 0; top: 52px; transform: rotate(180deg); opacity: .3; }
.main-shell:has(.g-creation)::after { top: 65px; bottom: auto; width: 75px; height: 135px; opacity: .4; }
.main-shell:has(.collection-page)::after { display: none; }
.sidebar { isolation: isolate; }
.sidebar::after { left: 0; bottom: 72px; width: 220px; height: 155px; transform: scaleX(-1); opacity: .65; }
.sidebar:has(.session-row:nth-child(n+5))::after { display: none; }
@media (min-width: 761px) { .sidebar { position: relative; } }
@media (max-height: 760px) { .sidebar::after { display: none; } }
* { scrollbar-color: #cdb3b0 transparent; }
::-webkit-scrollbar-thumb { background: #cdb3b0; }
.sidebar { background: var(--paper-side); border-right: 1px solid var(--line); }
.topbar { background: #fffaf7f5; border-bottom: 1px solid #e6d2ce80; }
.brand strong, .login-brand, .login-form-content h1, .welcome h1,
.workspace-title, .collection-page h1, .modal-head h2 {
  font-family: var(--paper-serif);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .04em;
}
.welcome h1 { font-size: 32px; }
.welcome p, .login-intro, .login-eyebrow, .history-heading, .history-empty,
.history-empty-state, .g-hint, .g-task-state, .g-material-head > span,
.g-recent-works, .g-params > span, .g-charge, .g-account, .copy-btn,
.history-item time, .g-history-results .history-item small { color: var(--muted); }
.nav-item, .new-chat, .history-item, .g-choice, .g-reference-mode button,
.g-params .g-audio, .g-reference .g-tile-actions button { color: #64535d; }
.nav-item.active, .history-item.selected, .history-filters [aria-pressed=true] {
  background: #edd5d3;
  color: #824151;
}
.nav-item:hover, .new-chat:hover, .history-item:hover, .g-account:hover,
.session-more, .g-reference .g-tile-actions button:hover { background: #efdcda; color: #713d4b; }
.new-chat { border: 1px solid #dbc0bd; background: #fffaf780; }
.history-item:focus-visible span { background: var(--paper-side); }
.history-filters button, .history-pagination button { background: #f3e4e1; color: #64535d; }
.message-text { color: var(--ink); }
.message-text h1, .message-text h2, .message-text h3, .g-prompt > label,
.g-material-head, .collection-page h2 { color: var(--rose); }
.message.user .message-content { background: #f4e4e1; color: var(--ink); border: 1px solid #eedbd7; }
.message.user .message-text { background: transparent; color: var(--ink); border: 0; }
.message-text a, .copy-btn[data-action=bring-creation], .text-btn { color: var(--accent); }
.message-text blockquote { border-color: #bd8890; background: #f8eeeb; color: #5e4851; }
.message-text pre, .message-text code { background-color: #f3e9e5; color: #54434b; }
.message-text th, .message-text td { border-color: var(--line); }
.reasoning-block, .reasoning-block summary, .live-thinking { color: var(--muted); }
.has-conversation .composer-wrap { background: linear-gradient(#fffaf700, var(--paper) 16px); }
.composer, .g-controls #prompt, .login-field input, .g-search, .rename-input,
input, textarea, select { background-color: #fffdfa; color: var(--ink); border-color: #d9c4c0; }
.composer { box-shadow: 0 4px 18px #7c3b4010; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px #244b8312; }
.composer:not(.g-controls) #prompt, .g-controls #prompt { color: var(--ink); }
textarea::placeholder, input::placeholder, #prompt::placeholder { color: #796871; }
.primary-btn, .send-btn, .login-submit, .g-charge .primary-btn {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 3px 8px #244b8312;
}
.primary-btn:hover, .send-btn:hover, .login-submit:hover { background: #193b6b; border-color: #193b6b; }
.subtle-btn, .g-choice, .quick-actions button, .media-retry {
  background: #fffdfa; color: #5c4e58; border-color: #dfc9c5;
}
.subtle-btn:hover, .quick-actions button:hover, .media-retry:hover { background: #f4e5e2; color: var(--rose); }
.g-tabs, .g-reference-mode, .g-number { background: #f3e3df; }
.g-tabs button, .g-number button { color: #70616a; }
.g-tab-indicator, .g-number button[aria-pressed=true] { background: #fffdfa; box-shadow: 0 1px 5px #70434b12; }
.g-tabs [aria-selected=true], .g-reference-mode [aria-selected=true],
.g-number button[aria-pressed=true] { color: #934c5b; }
.g-add, .g-thumb, #reference-area .g-add { background: #faf0ed; color: #70616a; border-color: #c9aaa6; }
.g-reference img, .g-history-section, .g-history-results .history-item,
.g-task-list .task-card, .task-card, .attachment { border-color: var(--line); }
.g-preview.is-example { background: #f4e8e4; }
.g-preview-label { background: #fffaf7ee; color: #62515b; }
.g-empty-preview { color: #70616a; }
.g-controls { background: transparent; }
.image-prompt-candidate, .g-draft, .deleted-notice { background: #f7ece8; color: #64535d; }
.collection-page .task-card, .g-history-results button { background: #fffaf7; }
dialog, #history-menu, #control-panel, #asset-viewer {
  background: #fffaf7; color: var(--ink); border: 1px solid #dbc2bd;
  box-shadow: 0 16px 48px #58364124;
}
dialog::backdrop { background: #3b293552; }
.control-popover::backdrop, .reference-manager::backdrop, #history-menu::backdrop { background: transparent; }
#history-menu button, .control-popover button, .reference-manager button[data-control] { background: #fffaf7; color: #64535d; }
#history-menu button:hover, .control-popover button:hover { background: #f1dedb; }
.control-popover button[aria-pressed=true] { background: #eedad7; color: #824151; }
.format-panel .g-option-row:first-of-type button[aria-pressed=true] { border-color: #b77d86; }
.control-popover > label, .login-field label { color: #64535d; }
.field-label, .knowledge-content, .source-preview figcaption { color: var(--muted); }
dialog input, dialog textarea, dialog select { color: var(--ink); background: #fffdfa; border-color: #d9c4c0; }
dialog input:focus, dialog textarea:focus, dialog select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #244b8312; }
.g-error, #login-error, .image-prompt-tools span { color: #a0273c; }
.danger-btn { background: #a0273c; color: white; }
.offline-banner, .request-notice { background: #f7e7df; color: #783f35; border-color: #dfbcb2; }
#toast, #undo-notice, #draft-undo { background: #44313d; color: white; }
#undo-notice button, #draft-undo button { color: #f5d9dd; }
.login-shell { background: #fffaf7; border-color: #e3ccc6; border-radius: 18px; box-shadow: 0 18px 60px #753d4910; }
.login-form-panel { background: var(--paper-branch) no-repeat right bottom / 210px auto; }
.login-form-content { position: relative; }
.login-password button { color: #70616a; }
.login-password button:hover { background: #f3e2de; }
.login-art::after { background: linear-gradient(180deg, #fff4edd9, transparent 25%, transparent 65%, #422a34b3); }
.login-art-caption span { font-family: var(--paper-serif); }
.login-field input:focus, .g-controls #prompt:focus { border-color: var(--accent); outline-color: #244b8340; }
.g-audio input { accent-color: var(--accent); }
.g-working-light { background-image: linear-gradient(90deg, #f4e5e2, #a96776, #f4e5e2); }
button:disabled, .primary-btn:disabled, .send-btn:disabled, .login-submit:disabled,
.g-charge .primary-btn:disabled { background: #eae0dc; border-color: #e1d3cf; color: #7e7078; box-shadow: none; opacity: 1; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
@media (max-width: 1200px) { .main-shell:not(:has(.is-welcome))::after { display: none; } }
@media (max-width: 760px) {
  :root { --paper-branch: url('/assets/display/paper-branch-mobile.f15854a594e0.webp'); }
  .main-shell, .login-page { background-size: 280px 190px, 240px 160px, 100% 100%, 100% 100%; }
  .main-shell:has(.is-welcome)::before, .sidebar::after { display: none; }
  .main-shell:has(.is-welcome)::after { width: 165px; height: 105px; bottom: 0; opacity: .45; }
  .welcome h1 { font-size: 26px; }
  .login-form-panel { background-image: none; }
  .sidebar { background: var(--paper-side); }
}

/* Creative controls sit directly on the paper; focus belongs to the input. */
.g-creation fieldset.g-controls.composer,
.g-creation fieldset.g-controls.composer:focus-within {
  border: 0; outline: 0; box-shadow: none; background: transparent; min-width: 0;
}
.g-creation .g-controls #prompt { background: #fffdfaab; border: 1px solid #d9c4c0; }
.g-creation .g-controls #prompt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: none; }
.g-recent-works button,
.g-recent-works button:hover,
.g-recent-works button[aria-pressed=true] {
  background: transparent; border: 1px solid transparent; box-shadow: none; color: var(--muted);
}
.g-recent-works button img { border: 1px solid #d9c4c080; background: transparent; }
.g-recent-works button:hover img { border-color: #bd8890; }
.g-recent-works button[aria-pressed=true] img { outline: 2px solid var(--accent); outline-offset: 2px; }
.g-recent-works button small { background: transparent; border: 0; font-size: 12px; color: var(--muted); }
.g-recent-works button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.g-reference .g-thumb { background: transparent; }
.g-charge > span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .g-charge { gap: 12px; flex-wrap: wrap; } }

/* The conversation input is part of the paper, not a floating white card. */
.studio-page .composer { background: #fffaf7a8; border-color: #d9bdb883; box-shadow: 0 3px 16px #7c3b4008; backdrop-filter: blur(5px); }
.studio-page .composer:focus-within { border-color: #9d6976a6; box-shadow: 0 0 0 3px #934c5b12; }
.studio-page .composer #prompt { background: transparent; }
.studio-page .composer.is-dragover { border-color: var(--rose); box-shadow: 0 0 0 3px #934c5b18; }
.live-reasoning, .live-answer { white-space: pre-wrap; overflow-wrap: anywhere; }
.live-reasoning:empty { display: none; }
.live-answer[hidden] { display: none; }
@media (max-width: 700px) { .studio-page .composer { backdrop-filter: none; background: #fffaf7d9; } }

.g-open-preview { display: grid; place-items: center; max-width: 100%; max-height: 100%; margin: auto; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.g-open-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.g-batch-status { margin: 16px auto 22px; padding: 16px 18px; max-width: 700px; border-radius: 16px; background: #fffaf7c9; box-shadow: 0 8px 28px #743b4810; color: var(--muted); font-size: 12px; }
.g-batch-summary { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; }
.g-batch-summary strong { color: var(--accent); font-weight: 600; }
.g-batch-status ol { display: flex; flex-wrap: wrap; gap: 9px 15px; list-style: none; margin: 13px 0 8px; padding: 0; }
.g-batch-status li { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.g-batch-status li > span { color: #aa6e7a; }
.g-batch-status li[data-status=succeeded] > span { color: #537a5a; }
.g-batch-status li[data-status=failed] > span { color: #a0273c; }
.g-batch-status p { margin: 8px 0 0; line-height: 1.6; }
#asset-viewer:has(.work-viewer-head) { width: min(1080px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 14px; overflow: auto; border-radius: 18px; }
.work-viewer-head, .work-viewer-actions { display: flex; align-items: center; gap: 10px; }
.work-viewer-head { justify-content: space-between; padding: 2px 5px 12px; color: var(--muted); font-size: 12px; }
.work-viewer-head button { margin-left: auto; width: 34px; height: 34px; border: 0; background: transparent; color: var(--ink); }
#asset-viewer:has(.work-viewer-head) > img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 160px); margin: auto; object-fit: contain; }
.work-viewer-actions { justify-content: center; flex-wrap: wrap; padding: 14px 2px 2px; }
.work-viewer-actions button, .work-viewer-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 18px; background: #fffdfa; color: var(--accent); font-size: 12px; text-decoration: none; }
.work-viewer-actions button:hover, .work-viewer-actions a:hover { background: #f4e5e2; }
@media (max-width: 480px) { .g-batch-status { padding: 14px; } .g-batch-status ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-batch-status li { white-space: normal; } #asset-viewer:has(.work-viewer-head) { padding: 10px; } #asset-viewer:has(.work-viewer-head) > img { max-height: calc(100dvh - 210px); } .work-viewer-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
