:root {
  --bg: #f8f7f3;
  --paper: #fff;
  --soft: #f1eee8;
  --canvas: #f5f3ef;
  --ink: #262421;
  --muted: #68645d;
  --line: #ded9d0;
  --control-line: #8d8478;
  --accent: #5f478b;
  --tint: #eee9f7;
  --accent-surface: #faf8fd;
  --action: #2b2926;
  --action-hover: #48433d;
  --success: #365d46;
  --success-surface: #eaf3ed;
  --warning: #893f2e;
  --warning-surface: #fff4e9;
  --warning-line: #dcb7a8;
  --scrim: #25213159;
  --radius: 10px;
  --radius-card: 14px;
  --radius-form: 16px;
  --control-height: 40px;
  --compact-control-height: 32px;
  --surface-shadow: 0 6px 20px #2b25110b;
  --floating-shadow: 0 12px 32px #2b25111c;
  --display-font: "Songti SC", "STSong", Georgia, serif;

  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

* { box-sizing: border-box }
body { margin: 0 }
h1, h2, h3, p { margin-block-start: 0 }
button, input, textarea, select { font: inherit; color: inherit }
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--control-height);
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}
button:enabled:hover { background-color: var(--soft) }
button:disabled { background: var(--soft); color: var(--muted); border-color: var(--line); cursor: default }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input:not([type="file"], [type="checkbox"]), textarea, select {
  min-inline-size: 0;
  border: 1px solid var(--control-line);
  border-radius: var(--radius);
  background: var(--paper);
}
input:not([type="file"], [type="checkbox"]), select { min-height: var(--control-height); padding: 0 12px }
input[type="checkbox"] { accent-color: var(--accent) }
::placeholder { color: var(--muted); opacity: 1 }
.ui-icon { display: block; inline-size: 16px; block-size: 16px; flex: 0 0 auto }
.icon { inline-size: var(--control-height); padding: 0; flex-shrink: 0 }
.icon .ui-icon { inline-size: 18px; block-size: 18px }
.primary { background: var(--action); color: var(--paper); padding-inline: 16px }
.primary:enabled:hover { background-color: var(--action-hover) }
.secondary { border-color: var(--control-line); background: var(--paper) }
.quiet { color: var(--muted) }
.quiet:enabled:hover { color: var(--ink) }
button.small { min-height: var(--compact-control-height); padding-inline: 10px }
.danger, .danger:enabled:hover, .save-error { color: var(--warning) }
.small { font-size: 12px }
.muted { color: var(--muted) }
.row { display: flex; align-items: center; gap: 8px }
.between { justify-content: space-between }
.grow { flex: 1; min-inline-size: 0 }
.pill, .status-label, .ref-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.status-label, .ref-chip { color: var(--accent); background: var(--tint) }
.status-label { white-space: nowrap }
.status-label.done { color: var(--success); background: var(--success-surface) }
.ref-chip { max-inline-size: 100%; min-height: 30px }
.ref-chip > span { overflow-wrap: anywhere }
.ref-chip .ui-icon { inline-size: 14px; block-size: 14px }
.chip-remove { min-height: 24px; inline-size: 24px; padding: 0; color: var(--accent) }

.appbar, .workbar {
  display: flex;
  align-items: center;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.appbar { min-height: 70px; padding: 0 36px; gap: 32px }
.logo { padding-inline: 8px; font-family: Georgia, serif; font-size: 26px; font-weight: bold; letter-spacing: -1px }
.logo .ui-icon { inline-size: 20px; block-size: 20px; color: var(--accent) }
.nav { display: flex; align-items: center; gap: 4px }
.nav button { color: var(--muted) }
.nav [aria-current="page"] { background: var(--tint); color: var(--accent); font-weight: 600 }
.account { margin-left: auto; display: flex; align-items: center; gap: 12px }
.demo-badge { color: var(--muted); font-size: 12px; white-space: nowrap }

.home, .page-library { max-width: 1112px; margin: 0 auto; padding: 48px 36px }
.hero { max-width: 760px; margin: 0 auto; text-align: center; padding: 32px 0 46px }
.hero h1, .page-library h1, .intro h2 {
  font-family: var(--display-font);
  font-weight: 600;
  line-height: 1.24;
}
.hero h1 { margin-bottom: 28px; font-size: clamp(34px, 4.2vw, 50px) }
.home-composer, .compose-box {
  padding: 16px;
  border: 1px solid var(--control-line);
  border-radius: var(--radius-form);
  background: var(--paper);
  box-shadow: var(--surface-shadow);
}
.home-composer:focus-within, .compose-box:focus-within { outline: 2px solid var(--accent); outline-offset: 2px }
.home-composer textarea, .compose-box textarea {
  display: block;
  width: 100%;
  border: 0;
  padding: 2px;
  border-radius: 4px;
  background: transparent;
  resize: vertical;
  font-size: 15px;
  line-height: 1.65;
}
.home-composer textarea:focus-visible, .compose-box textarea:focus-visible { outline: 0 }
.home-composer textarea { min-height: 81px }
.home-composer .composer-actions, .compose-box .composer-actions { margin-top: 8px }
.skill-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 18px }
.chip-button { min-height: var(--compact-control-height); border-radius: 999px }
.chip-button.quiet { background: var(--soft) }
.chip-button.quiet:hover { background: var(--tint); color: var(--accent) }
.sectionhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px }
.sectionhead h1, .sectionhead h2 { margin: 0 }
.sectionhead h2 { font-size: 17px; font-weight: 600 }
.page-library h1 { font-size: 36px }
.projects, .library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px }
.project-card, .asset, .brand-card {
  min-inline-size: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
}
.project-card, .asset { overflow: hidden }
.project-card:focus-within { outline: 2px solid var(--accent); outline-offset: 2px }
.project-card-button {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  text-align: start;
  border: 0;
  padding: 0;
  border-radius: 0;
}
.project-cover { width: 100%; aspect-ratio: 1.55; display: block; object-fit: cover; background: var(--soft) }
.project-meta { display: flex; align-items: center; gap: 10px; padding: 14px 16px }
.project-meta b, .asset b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.project-meta p, .asset p { margin: 4px 0 0; color: var(--muted); font-size: 12px }
.project-meta .ui-icon { color: var(--accent) }
.new-card {
  flex-direction: column;
  min-height: 190px;
  border: 1px dashed var(--control-line);
  border-radius: var(--radius-card);
  background: var(--paper);
  color: var(--muted);
}
.new-card .ui-icon { inline-size: 22px; block-size: 22px; color: var(--accent) }
.filters { display: flex; align-items: center; gap: 8px; margin-bottom: 16px }
.filters input { margin-left: auto }
.projects > .empty { grid-column: 1 / -1 }
.asset img { display: block; inline-size: 100%; aspect-ratio: 1.55; object-fit: cover; background: var(--soft) }
.asset > div { padding: 14px 16px }
.asset button { margin-top: 10px }
.brand-card { max-width: 680px; padding: 24px }
.brand-card h2 { margin: 0; font: 600 27px/1.3 var(--display-font) }
.brand-card > p { margin: 12px 0 0; line-height: 1.6 }
.brand-swatches { display: flex; gap: 8px; margin: 16px 0 }
.brand-swatches i { width: 54px; height: 54px; border-radius: var(--radius); background: #5b6b46 }
.brand-swatches i:nth-child(2) { background: #eeeadf }
.brand-swatches i:nth-child(3) { background: #d5decb }
.brand-colors { color: var(--muted); overflow-wrap: anywhere }

.workspace {
  --resize-gap: 1px;
  block-size: 100dvh;
  min-block-size: var(--workspace-minimum, 400px);
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
.workbar { position: sticky; top: 0; z-index: 12; min-height: 64px; gap: 12px; padding: 8px 20px; flex-shrink: 0 }
.work-identity, .work-actions { display: flex; align-items: center; gap: 8px; min-inline-size: 0 }
.work-actions { margin-left: auto }
#project-name { field-sizing: content; min-inline-size: 4ch; max-inline-size: 22ch; border-color: transparent; font-weight: 600; text-overflow: ellipsis }
#project-name:hover, #project-name:focus-visible { border-color: var(--control-line) }
.project-count { flex-shrink: 0; color: var(--muted); font-size: 12px; white-space: nowrap }
.saved-label { min-inline-size: 7em; white-space: nowrap }
.workbody { position: relative; flex: 1; min-block-size: var(--body-minimum, 0px); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) }
.workbody[data-axis="columns"] { grid-template-columns: minmax(var(--leading-minimum), var(--leading-pane)) var(--resize-gap) minmax(var(--trailing-minimum), 1fr) }
.workbody[data-axis="rows"] { grid-template-rows: minmax(var(--leading-minimum), var(--leading-pane)) var(--resize-gap) minmax(var(--trailing-minimum), 1fr) }
.workspace-main { min-inline-size: 0; min-block-size: 0; display: flex; flex-direction: column }
.canvas-header, .chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 6px 18px;
  border-bottom: 1px solid var(--line);
}
.canvas-header, .chat-header { flex-shrink: 0 }
.canvas-header h2 { margin: 0; font-size: 14px; font-weight: 600; white-space: nowrap }
.resize-handle {
  position: relative;
  z-index: 7;
  min-inline-size: 0;
  min-block-size: 0;
  background: var(--line);
  outline-offset: 1px;
  touch-action: none;
}
.resize-handle[data-axis="x"] { cursor: col-resize }
.resize-handle[data-axis="y"] { cursor: row-resize }
.resize-handle:not([aria-disabled="true"])::before {
  position: absolute;
  content: "";
}
.resize-handle[data-axis="x"]::before { inset: 0 -6px }
.resize-handle[data-axis="y"]::before { inset: -6px 0 }
.resize-handle:focus-visible { outline: 2px solid var(--accent) }
.resize-handle[aria-disabled="true"] { cursor: default }
.resize-handle[hidden] { display: none }
.layout-resizing { user-select: none }
.chat-main { flex: 1; min-width: 0; min-height: 0; position: relative; display: flex; flex-direction: column; background: var(--paper) }
.chat-header { order: 0; flex-shrink: 0 }
.chat-context { display: inline-flex; align-items: center; gap: 8px; font-weight: 600 }
.chat-context .ui-icon, .author .ui-icon { color: var(--accent) }
.conversation { order: 2; min-block-size: 100px; overflow: auto; overscroll-behavior: contain; flex: 1; padding: 24px max(24px, calc((100% - 720px)/2)) }
.workspace[data-short="true"] .conversation { overscroll-behavior: auto }
.intro { padding: 4px 0 12px }
.intro h2 { font-size: 28px; margin-bottom: 8px }
.intro p { color: var(--muted); line-height: 1.6 }
.message { margin-bottom: 20px; line-height: 1.75; overflow-wrap: anywhere }
.message .author { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; margin-bottom: 6px }
.message-body { white-space: pre-wrap }
.user-message { background: var(--soft); border-radius: var(--radius-card); padding: 11px 15px; max-width: 90%; margin-left: auto; white-space: pre-wrap }
.plan-card { max-width: 640px; border: 1px solid var(--line); border-radius: var(--radius-card); padding: 16px; background: var(--accent-surface); margin-top: 12px }
.plan-card h3 { margin: 0; font-size: 15px; font-weight: 600 }
.plan-list { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 12px; margin: 14px 0; font-size: 13px }
.plan-list dt { color: var(--muted) }
.plan-list dd { margin: 0 }
.plan-actions { display: flex; flex-wrap: wrap; gap: 8px }
.chat-compose { order: 3; flex-shrink: 0; width: 100%; max-width: 784px; align-self: center; padding: 8px 20px 12px }
.ref-chips { display: flex; gap: 6px; flex-wrap: wrap; max-block-size: 64px; overflow: auto; margin-bottom: 8px }
.ref-chips:empty { display: none }
.compose-box { padding: 10px 12px; container: chat-composer / inline-size }
.compose-box textarea { block-size: 48px; min-height: 48px; resize: none; overflow-y: hidden }
.compose-box .composer-actions button { flex-shrink: 0; white-space: nowrap }
@container chat-composer (max-width: 320px) {
  .compose-box .composer-actions .composer-tool {
    inline-size: var(--control-height);
    min-height: var(--control-height);
    padding-inline: 0;
  }
  .composer-tool > span { display: none }
}
.compose-hint { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 11px; color: var(--muted) }
.canvas-toolbar, .selectionbar {
  background: var(--paper);
  border: 1px solid var(--control-line);
  border-radius: var(--radius-card);
  box-shadow: var(--surface-shadow);
}
.docked-chat .conversation { padding-inline: 20px }
.docked-chat .chat-compose { padding-inline: 16px }
.docked-chat .intro h2 { font-size: 24px }

.canvas-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "stage";
}
.floating-chat {
  grid-area: stage;
  align-self: end;
  justify-self: center;
  z-index: 8;
  inline-size: min(620px, calc(100% - 24px));
  max-block-size: var(--floating-max, 560px);
  margin-block-end: max(12px, env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-radius: var(--radius-form);
  box-shadow: var(--floating-shadow);
  overflow: hidden;
}
.floating-history {
  order: 2;
  flex: 0 1 auto;
  min-block-size: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  overflow: clip;
}
.floating-history[hidden] { display: none }
.floating-chat .conversation {
  min-block-size: 0;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  overscroll-behavior: contain;
}
.floating-chat .conversation > :last-child { margin-bottom: 0 }
.floating-chat .chat-compose { padding: 6px 10px 8px }
.floating-controls { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; cursor: pointer }
.floating-controls .ref-chips { min-inline-size: 0; margin-bottom: 0 }
.floating-controls .ref-chip { cursor: default }
.floating-history-toggle { margin-inline-start: auto; flex-shrink: 0; white-space: nowrap }
.floating-history-toggle[aria-expanded="true"] .ui-icon { transform: rotate(180deg) }
.canvas-stage {
  grid-area: stage;
  min-inline-size: 0;
  min-block-size: 0;
  position: relative;
  overflow: clip;
  background: var(--canvas);
  background-image: radial-gradient(var(--line) .65px, transparent .65px);
  background-size: 21px 21px;
  touch-action: none;
}
.workspace[data-short="true"] .canvas-stage:not(.hand) { touch-action: pan-y }
.canvas-stage:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px }
.canvas-stage.hand, .node { cursor: grab }
.world { position: absolute; inset: 0 auto auto 0; transform-origin: 0 0; width: 1900px; height: 1400px }
.edge-layer { position: absolute; inset: 0; overflow: visible; pointer-events: none; width: 1900px; height: 1400px }
.edge-layer path { stroke: var(--accent); stroke-width: 1.5; fill: none }
.node {
  position: absolute;
  width: 218px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--surface-shadow);
  user-select: none;
  touch-action: none;
  overflow: hidden;
}
.node.selected { outline: 2px solid var(--accent); outline-offset: 3px }
.node-header, .node-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; font-size: 12px }
.node-header { border-bottom: 1px solid var(--line); font-weight: 600 }
.node-header span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.node-header .icon { min-height: 32px; inline-size: 32px }
.node-header [aria-pressed="true"] { background: var(--tint); color: var(--accent) }
.node-footer { color: var(--muted) }
.node-footer [aria-pressed="true"] { color: var(--success); background: var(--success-surface) }
.node-content { padding: 12px; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere }
.node-content p { margin: 6px 0 }
.node img { display: block; width: 100%; height: 180px; object-fit: cover; pointer-events: none }
.node.result { width: 240px }
.node.result img { height: 230px }
.node-note { white-space: pre-wrap; color: var(--muted) }
.group-frame { position: absolute; left: 380px; top: 130px; width: 890px; height: 670px; border: 1px solid var(--accent); border-radius: var(--radius-card); background: #eee9f333; pointer-events: none }
.group-label { position: absolute; top: -42px; left: 0; display: flex; align-items: center; gap: 8px; white-space: nowrap; pointer-events: auto }
.group-label b { display: flex; align-items: center; gap: 6px; font-weight: 600 }
.group-label .ui-icon { color: var(--accent) }
.canvas-overlays {
  position: absolute;
  inset-block-start: 14px;
  inset-inline: 12px;
  z-index: 4;
  display: grid;
  justify-items: end;
  gap: 8px;
  pointer-events: none;
}
.canvas-toolbar, .selectionbar {
  display: flex;
  max-inline-size: 100%;
  flex-wrap: wrap;
  gap: 3px;
  padding: 4px;
  pointer-events: auto;
}
.canvas-toolbar {
  align-items: center;
  justify-content: end;
  gap: 4px 8px;
  font-size: 12px;
}
.canvas-tools, .canvas-view-controls { display: flex; min-inline-size: 0; align-items: center; flex-wrap: wrap; gap: 3px }
.canvas-toolbar .active { background: var(--tint); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent) }
.canvas-toolbar .icon { min-height: 32px; inline-size: 32px }
#zoom-label { min-inline-size: 4ch; text-align: center; color: var(--muted) }
.selectionbar { justify-self: center; justify-content: center; white-space: nowrap }
.progress { height: 4px; background: var(--tint); margin-top: 12px; overflow: hidden; border-radius: 3px }
.progress i { display: block; height: 100%; background: var(--accent); animation: loading 1.6s infinite; width: 45% }
@keyframes loading {
  from { transform: translateX(-100%) }
  to { transform: translateX(320%) }
}

.modal {
  position: fixed;
  width: 660px;
  max-width: calc(100% - 32px);
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 26px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-form);
  box-shadow: var(--floating-shadow);
  overscroll-behavior: contain;
}
.modal.wide { width: 980px }
.modal::backdrop { background: var(--scrim); backdrop-filter: blur(3px) }
body:has(#modal-root[open]) { overflow: hidden }
.modalhead { position: absolute; top: 12px; right: 12px }
.modal h2 { font: 600 25px/1.3 var(--display-font); padding-right: 44px; margin-bottom: 16px }
.modal p { line-height: 1.65 }
.modal label { display: block; color: var(--muted); margin-top: 14px; font-size: 13px }
.modal label input:not([type="checkbox"]), .modal textarea, .modal select { display: block; margin-top: 6px; width: 100% }
.modal textarea { min-height: 85px; padding: 10px 12px; resize: vertical }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 20px }
.task-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere }
.empty { padding: 24px 16px; margin: 0; text-align: center; color: var(--muted); background: var(--soft); border-radius: var(--radius-card) }
.export-preview { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 20px }
.export-preview img, .edit-canvas img { display: block; width: 100%; max-height: 420px; object-fit: contain; border-radius: var(--radius) }
.review-strip { display: flex; gap: 8px; overflow: auto; margin-top: 12px; padding: 4px }
.review-strip button { padding: 2px; border: 2px solid transparent; border-radius: var(--radius); flex-shrink: 0 }
.review-strip button.active { border-color: var(--accent) }
.review-strip img { width: 60px; height: 60px; object-fit: cover; border-radius: 6px }
.edit-canvas { position: relative }
.mask-box { position: absolute; border: 2px dashed var(--accent); background: #b59bdb33; left: 7%; top: 8%; width: 35%; height: 42%; pointer-events: none }
.mode-hint { padding: 10px 12px; border-radius: var(--radius); color: var(--muted); background: var(--soft); font-size: 13px }

#toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 8px);
  max-width: 90%;
  padding: 10px 14px;
  background: var(--action);
  color: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--surface-shadow);
  font-size: 13px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s, transform .16s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0) }
.save-warning:not([hidden]) { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 8px 16px; background: var(--warning-surface); color: var(--warning); border-bottom: 1px solid var(--warning-line); font-size: 13px }
.save-warning button { flex-shrink: 0 }

@media (min-width: 1450px) {
  .home { padding-top: 72px }
  .project-cover { aspect-ratio: 1.7 }
  .conversation { padding-top: 36px }
}

@media (max-width: 1100px) {
  .workbar { padding-inline: 12px; gap: 8px }
}

@media (max-width: 760px) {
  .appbar { min-height: 62px; padding-inline: 12px; gap: 8px }
  .nav { gap: 0 }
  .nav button { padding-inline: 8px }
  .logo { font-size: 21px; padding-inline: 4px }
  .logo .ui-icon { inline-size: 15px; block-size: 15px }
  .account .demo-badge, .compose-hint span:last-child { display: none }
  .home, .page-library { padding: 24px 16px }
  .hero { padding: 24px 0 32px }
  .hero h1 { margin-bottom: 22px }
  .page-library h1 { font-size: 30px }
  .projects, .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px }
  .project-cover { aspect-ratio: 1.25 }
  .project-meta, .asset > div { padding: 11px }
  .new-card { min-height: 144px }
  .filters { flex-wrap: wrap }
  .filters input { flex: 1 1 144px; margin-left: 0 }
  .brand-card { padding: 16px }
  .workbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 7px 10px }
  .work-identity { gap: 4px }
  .work-actions { grid-column: 1 / -1; margin: 0; justify-content: flex-end }
  .work-actions .saved-label { margin-right: auto; min-inline-size: 0; font-size: 11px }
  .work-actions button { min-height: 34px; padding-inline: 9px; white-space: nowrap }
  #project-name { padding-inline: 6px }
  .canvas-header, .chat-header { padding-inline: 12px }
  .conversation, .docked-chat .conversation { padding: 16px 12px }
  .chat-compose, .docked-chat .chat-compose { padding: 8px 12px max(10px, env(safe-area-inset-bottom)) }
  .home-composer textarea, .compose-box textarea { font-size: 16px }
  .composer-actions { gap: 4px }
  .compose-box .composer-actions button { padding-inline: 7px }
  .modal { padding: 18px }
  .export-preview { grid-template-columns: 1fr }
  .save-warning:not([hidden]) { padding-inline: 10px }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important }
}
