:root {
  --ink: #22291f;
  --muted: #788172;
  --line: #e1e6da;
  --paper: #f5f6f1;
  --green: #d8f47d;
  --sidebar: #20271f;
  --radius: 16px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { border: 0; background: none; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .42; transform: none !important; }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #95b954; outline-offset: 3px;
}
input:focus, textarea:focus { outline: 2px solid #a6c975; outline-offset: 1px; }
a { color: inherit; text-decoration: none; }
a[aria-disabled="true"] { pointer-events: none; opacity: .5; }
[hidden] { display: none !important; }
::selection { background: #e2f4b3; color: #26311b; }
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; background: var(--sidebar); color: #dce2d5;
  padding: 32px 20px 24px; position: fixed; inset: 0 auto 0 0;
  display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; color: #f0f5e9; }
.brand-mark { display: block; flex: 0 0 44px; width: 44px; height: 44px; }
.brand-mark img { display: block; width: 100%; height: 100%; }
.brand-wordmark { display: block; min-width: 0; }
.brand-wordmark > span { display: flex; align-items: baseline; gap: 3px; white-space: nowrap; letter-spacing: -1.2px; }
.brand-wordmark strong { font-size: 21px; font-weight: 760; }
.brand-wordmark em { color: #c9d6be; font-size: 16px; font-style: normal; font-weight: 380; }
.brand-wordmark small { display: block; margin-top: 4px; color: #a6b89a; font-size: 7px; font-weight: 650; letter-spacing: 1.7px; white-space: nowrap; }
.primary, .secondary, .dark-button {
  min-height: 40px; padding: 11px 17px; border-radius: 9px;
  font-size: 12px; font-weight: 600; line-height: 1.4;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  transition: background .16s, border-color .16s, box-shadow .16s;
}
.primary { background: var(--green); color: #26331a; border: 1px solid transparent; }
.primary:hover { background: #ccec69; box-shadow: 0 3px 10px #91ac3f18; }
.secondary { border: 1px solid #dce2d4; background: #fff; white-space: nowrap; }
.secondary:hover { background: #f4f7ed; border-color: #bdc9ad; }
.dark-button { background: #2b3824; color: #f0f5e9; border: 1px solid #2b3824; }
.dark-button:hover { background: #415336; }
.new-project { margin-top: 38px; width: 100%; min-height: 46px; font-size: 13px; }
.new-project span { font-size: 22px; font-weight: 400; }
.nav-label { font-size: 9px; font-weight: 600; letter-spacing: 1.6px; color: #96a48b; margin: 32px 8px 15px; display: flex; justify-content: space-between; align-items: center; }
.nav-label span { letter-spacing: 0; background: #364030; padding: 3px 7px; border-radius: 5px; font-variant-numeric: tabular-nums; }
#project-list { overflow: auto; flex: 1; }
.project-nav { width: 100%; display: flex; text-align: left; align-items: center; gap: 10px; padding: 14px 12px; border-radius: 9px; color: #aebaa4; font-size: 12px; margin-bottom: 5px; border: 1px solid transparent; transition: background .16s; }
.project-nav:hover { background: #2c3627; color: #e4ebdd; }
.project-nav.selected { background: #35432c; border-color: #425137; color: #edf5df; }
.nav-dot { width: 6px; height: 6px; background: #9aa88f; border-radius: 50%; flex-shrink: 0; }
.nav-dot.ready { background: #d3f583; box-shadow: 0 0 0 3px #d3f5830c; }
.nav-dot.stopped { background: transparent; border: 1px solid #97a38c; width: 7px; height: 7px; }
.nav-dot.error { background: #ef927a; }
.nav-dot.review { background: #d9aa62; }
.nav-dot.generating, .nav-dot.provisioning, .nav-dot.reviewing, .nav-dot.restoring, .nav-dot.saving { background: #e5c569; animation: pulse 1.5s infinite; }
.nav-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-empty { font-size: 12px; line-height: 1.8; color: #95a28a; padding: 4px 9px; }
.sidebar-bottom { margin-top: 20px; padding: 15px; border: 1px solid #3b4b39; border-radius: 14px; background: #263427; color: #e4eddb; }
.sidebar-bottom-heading { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sidebar-bottom-heading strong { flex: 1; min-width: 0; font-size: 11px; font-weight: 630; line-height: 1.25; }
.sidebar-bottom-heading svg { flex: 0 0 18px; width: 18px; height: 18px; color: #9fb493; }
.local-indicator { display: block; flex: 0 0 7px; width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 3px #d7f47813; }
.sidebar-bottom p { margin: 9px 0 0 15px; color: #aebda5; font-size: 10px; line-height: 1.55; }
main { margin-left: 232px; min-width: 0; width: calc(100% - 232px); display: flex; flex-direction: column; }
.topbar { min-height: 76px; padding: 16px 32px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 24px; background: #fcfdf9; }
.breadcrumb { min-width: 0; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.breadcrumb span { color: #b8c1ae; }
.breadcrumb strong { color: #58634e; font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 380px; }
.system { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.status-pill { font-size: 11px; font-weight: 500; white-space: nowrap; padding: 7px 11px; border: 1px solid #dde5d4; background: #f3f7ec; border-radius: 7px; color: #69765b; }
.status-pill.ok { color: #517536; }
.status-pill.paused { color: #78745f; background: #f2f0e8; border-color: #e4e0d2; }
.status-pill.error { color: #a34b37; background: #fff2ed; border-color: #eac7bd; }
.status-pill.busy { color: #90762c; background: #fcf8e8; border-color: #e9ddaf; }
.status-pill.review { color: #9b6b25; background: #fff7e8; border-color: #ead5a9; }
.account-button { font-size: 11px; font-weight: 550; display: flex; gap: 8px; align-items: center; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 8px 5px; }
.account-button span { font-size: 16px; }
#profile-select { max-width: 145px; padding: 9px 28px 9px 11px; font-size: 12px; }
select { border: 1px solid #dce3d2; background: #fff; border-radius: 8px; padding: 10px 30px 10px 12px; color: #3e4c34; min-height: 38px; }
.model-toolbar { min-height: 70px; display: flex; align-items: center; gap: 16px; padding: 12px 32px; border-bottom: 1px solid var(--line); background: #fcfdf9; }
.toolbar-label { font-size: 12px; color: #6c7860; display: flex; align-items: center; gap: 9px; margin-right: 10px; white-space: nowrap; }
.spark { color: #8ca753; font-size: 19px; }
.toolbar-field { display: flex; align-items: center; gap: 9px; font-size: 11px; color: #849075; }
.toolbar-field select { max-width: 240px; font-size: 12px; }
.toolbar-hint { margin-left: auto; font-size: 11px; color: #8a957e; }
.text-button { font-size: 21px; color: #7b886d; padding: 5px 8px; border-radius: 6px; min-width: 32px; min-height: 32px; }
.text-button:hover { color: #36511d; background: #edf2e4; }
.connection-banner { margin: 24px 32px 0; background: #eef4e3; border: 1px solid #dce7cd; border-radius: 12px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.connection-banner strong { font-size: 13px; }
.connection-banner p { font-size: 12px; color: #78846a; margin: 6px 0 0; line-height: 1.6; }
.welcome { max-width: 1060px; width: 100%; margin: 0 auto; padding: 72px 60px 40px; flex: 1; }
.eyebrow { font-size: 9px; letter-spacing: 1.9px; font-weight: 650; color: #7a896b; display: flex; align-items: center; gap: 9px; }
.eyebrow > span { width: 6px; height: 6px; border-radius: 50%; background: #93a66b; }
.welcome h1 { font-size: clamp(36px, 3.6vw, 58px); font-weight: 500; letter-spacing: -2.8px; line-height: 1.12; margin: 25px 0; }
.welcome h1 > span { color: #8a977e; }
.welcome-copy { font-size: 14px; line-height: 1.9; color: #7a8670; margin: 0 0 28px; }
.hero-button { padding: 15px 22px; gap: 28px; font-size: 13px; }
.workflow { display: flex; align-items: flex-start; margin-top: 64px; gap: 24px; }
.workflow > div { flex: 1; }
.step-icon { font-size: 11px; color: #73825e; width: 36px; height: 36px; display: grid; place-items: center; background: #edf1e6; border: 1px solid #dde4d2; border-radius: 10px; }
.workflow h3 { font-size: 13px; font-weight: 600; margin-top: 17px; }
.workflow p { font-size: 12px; color: #849078; line-height: 1.8; max-width: 210px; }
.step-line { height: 1px; background: #dce2d3; width: 35px; margin-top: 18px; }
.welcome-footer { display: flex; flex-wrap: wrap; gap: 30px; border-top: 1px solid var(--line); padding-top: 25px; margin-top: 45px; font-size: 9px; letter-spacing: 1px; color: #87947b; font-weight: 600; }
.main-footer { display: flex; justify-content: space-between; padding: 22px 32px; font-size: 8px; letter-spacing: 1.3px; color: #919e85; border-top: 1px solid var(--line); margin-top: auto; }
.main-footer span { letter-spacing: 0; font-size: 11px; }
.project-view { padding: 30px 32px; flex: 1; }
.project-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.project-heading > div:first-child { min-width: 0; }
.project-heading h1 { font-size: clamp(23px, 2vw, 30px); font-weight: 550; letter-spacing: -1px; line-height: 1.25; margin: 9px 0 10px; overflow-wrap: anywhere; }
.project-heading a { font-size: 12px; color: #839375; }
.project-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.studio-grid { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(360px, 1.45fr); gap: 20px; height: clamp(540px, calc(100vh - 300px), 790px); }
.chat-panel, .preview-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 3px 8px #26361b03; }
.panel-heading { height: 56px; border-bottom: 1px solid #e9ede4; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; flex-shrink: 0; }
.panel-heading strong { font-size: 12px; display: flex; align-items: center; gap: 9px; font-weight: 600; }
.panel-heading > span { font-size: 8px; letter-spacing: 1.4px; color: #849574; background: #f1f5e9; padding: 5px 8px; border-radius: 5px; }
.messages { overflow: auto; flex: 1; padding: 24px; display: flex; flex-direction: column; gap: 24px; scrollbar-width: thin; scrollbar-color: #d9e1ce transparent; }
.message { font-size: 13px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-link { color: #4d7237; text-decoration: underline; text-decoration-color: #a4bd8b; text-underline-offset: 3px; font-weight: 600; }
.message-link:hover, .message-link:focus-visible { color: #2f571f; text-decoration-color: currentColor; }
.message.user { background: #f3f6ec; border: 1px solid #e3ead8; padding: 14px 16px; border-radius: 12px; }
.message-label { display: block; font-size: 8px; font-weight: 650; letter-spacing: 1.6px; color: #8c9d7d; margin-bottom: 8px; }
.message-area { display: block; width: fit-content; max-width: 100%; margin-bottom: 8px; padding: 4px 8px; border-radius: 6px; background: #e5efd5; color: #4d6a37; font-size: 11px; font-weight: 600; overflow-wrap: anywhere; }
.chat-intro { font-size: 13px; color: #819273; line-height: 1.9; }
.chat-form { margin: 14px; border: 1px solid #dce5d1; border-radius: 12px; padding: 13px; background: #fcfdf9; transition: border-color .16s; }
.chat-form:focus-within { border-color: #9ebd71; box-shadow: 0 0 0 3px #e7f1d7; }
.chat-form textarea { display: block; border: 0; background: none; width: 100%; resize: vertical; min-height: 62px; font-size: 12px; line-height: 1.7; color: var(--ink); }
.chat-form textarea::placeholder { color: #98a58b; }
.chat-form textarea:focus { outline: 0; }
.chat-form > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-form > div > span { font-size: 9px; color: #899a79; flex: 1; line-height: 1.5; }
.send-button { width: 34px; height: 34px; border-radius: 9px; background: var(--green); font-size: 22px; flex-shrink: 0; }
.site-paused .chat-form { background: #f5f6f1; border-style: dashed; }
.site-paused .panel-heading > span { background: #f1f1ec; color: #959c8c; }
.preview-toolbar { height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid #e6ebdf; flex-shrink: 0; }
.browser-dots { display: flex; gap: 4px; }
.browser-dots i { height: 5px; width: 5px; background: #d5dfc9; border-radius: 50%; }
.preview-toolbar > span { background: #f5f7f0; border-radius: 7px; padding: 8px 12px; font-size: 11px; color: #839475; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-controls { display: flex; align-items: center; gap: 3px; }
.viewport-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid #dfe7d7; border-radius: 10px; background: #f4f7ef; }
.viewport-button { display: grid; place-items: center; width: 34px; height: 32px; padding: 0; border-radius: 7px; color: #71816a; transition: background .16s, color .16s, box-shadow .16s; }
.viewport-button svg { display: block; width: 20px; height: 20px; }
.viewport-button:hover { color: #385928; background: #eaf2df; }
.viewport-button.active { color: #3d6529; background: #fff; box-shadow: 0 1px 5px #293a1b1c; }
.viewport-button:focus-visible { outline: 3px solid #95b954; outline-offset: 2px; }
.annotate-button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; margin-right: 5px; border: 1px solid #dce5d1; border-radius: 8px; color: #53723e; background: #f8fbf3; font-size: 11px; font-weight: 650; white-space: nowrap; }
.annotate-button:hover, .annotate-button.active { background: #e7f3d1; border-color: #a9c47e; color: #2e4b1f; }
.annotate-button:focus-visible { outline: 3px solid #95b954; outline-offset: 2px; }
.canvas-focus-button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 9px; border: 1px solid #dce5d1; border-radius: 8px; color: #56714a; background: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; }
.canvas-focus-button:hover, .canvas-focus-button[aria-pressed="true"] { background: #edf5e5; color: #34552a; }
.canvas-focus-button:focus-visible { outline: 3px solid #95b954; outline-offset: 2px; }
.preview-controls .text-button { font-size: 19px; }
.preview-controls a { display: grid; place-items: center; width: 30px; height: 32px; font-size: 19px; color: #7d8d6f; }
.preview-controls a[aria-disabled="true"] { opacity: .3; }
.preview-surface { position: relative; background: #edf1e6; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 14px; }
.preview-surface iframe { border: 0; background: white; height: 100%; width: 100%; box-shadow: 0 4px 20px #25391c0b; border-radius: 7px; transition: width .25s; }
.annotation-composer { position: absolute; z-index: 3; right: 24px; top: 24px; width: min(330px, calc(100% - 32px)); max-height: calc(100% - 48px); overflow: auto; padding: 18px; border: 1px solid #cbd9bb; border-radius: 16px; background: #fff; box-shadow: 0 20px 65px #1b2e1b3b; }
.annotation-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.annotation-head > div { flex: 1; min-width: 0; }
.annotation-head strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-size: 15px; line-height: 1.35; margin-top: 5px; }
.annotation-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; color: #788a6b; font-size: 11px; }
.annotation-head .text-button { font-size: 21px; line-height: 1; }
.annotation-composer textarea { width: 100%; min-height: 82px; resize: vertical; border: 1px solid #dce5d1; border-radius: 10px; padding: 10px; color: var(--ink); font-size: 13px; line-height: 1.5; }
.annotation-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.annotation-actions .primary { flex: 1; justify-content: center; padding: 10px 14px; }
.preview-surface iframe.mobile { width: min(390px, 100%); }
#preview-empty { text-align: center; padding: 36px 24px; max-width: 440px; }
.preview-symbol { height: 56px; width: 56px; margin: 0 auto 24px; background: #e2ebd3; border: 1px solid #d4e1c1; display: grid; place-items: center; border-radius: 18px; font-size: 30px; color: #8ca168; }
.empty-eyebrow { display: block; font-size: 9px; font-weight: 650; letter-spacing: 2px; color: #8b9a7a; }
#preview-empty h3 { font-size: 25px; font-weight: 500; letter-spacing: -.9px; margin: 15px 0 12px; line-height: 1.25; }
#preview-empty p { font-size: 13px; color: #7c8d6c; max-width: 305px; line-height: 1.85; margin: 0 auto 26px; }
#preview-empty.paused .preview-symbol { display: none; }
#preview-empty.paused { max-width: 460px; }
#preview-empty.paused .empty-eyebrow { display: inline-block; background: #e6eadc; border: 1px solid #d6dfc8; padding: 8px 12px; border-radius: 6px; font-size: 9px; color: #71825e; letter-spacing: 1.4px; }
#preview-empty.paused h3 { font-size: clamp(25px, 2.2vw, 34px); margin-top: 22px; }
#preview-start { padding: 12px 23px; font-size: 13px; }
.paused-info { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 26px auto 0; color: #8a987d; font-size: 10px; }
.paused-info span + span { border-left: 1px solid #cfdac1; padding-left: 14px; }
.progress-track { height: 3px; background: #dce5ce; border-radius: 3px; width: 180px; margin: 0 auto 14px; overflow: hidden; }
.progress-track span { display: block; background: #9bb96c; height: 100%; width: 15%; transition: width 1s; }
#progress-label { font-size: 11px; color: #829471; }
.activity { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fcfdf9; overflow: hidden; }
.task-panel, .review-panel { margin: 18px 0; border: 1px solid #dce5d2; border-radius: 16px; background: #fff; padding: 23px 26px; }
.task-panel-top, .review-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.task-panel h2, .review-panel h2 { font-size: 18px; letter-spacing: -.4px; margin: 6px 0 0; }
#task-elapsed { color: #586f49; background: #f1f6e8; border-radius: 20px; padding: 7px 11px; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.task-bar { margin: 20px 0 15px; height: 7px; border-radius: 10px; background: #e9eedf; overflow: hidden; }
.task-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: #9ebe62; transition: width .4s; }
.task-steps { display: flex; gap: 9px; flex-wrap: wrap; }
.task-step { font-size: 11px; color: #87947c; padding: 7px 10px; border-radius: 8px; background: #f6f8f2; }
.task-step.done { color: #4d7237; background: #eaf3dd; }
.task-step.active { color: #304e23; background: #dff0bd; font-weight: 650; }
#task-help, #review-meta { color: #728268; font-size: 12px; line-height: 1.6; margin: 15px 0 0; }
.review-panel.warning { border-color: #e7d8ad; background: #fffcf6; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.review-issues { margin-top: 18px; display: grid; gap: 8px; }
.review-issue { padding: 10px 12px; background: #fff1e6; border-left: 3px solid #d6a463; border-radius: 0 8px 8px 0; font-size: 12px; line-height: 1.5; }
.review-ok { padding: 10px 12px; background: #f0f7e9; border-left: 3px solid #9ebe62; border-radius: 0 8px 8px 0; font-size: 12px; }
.review-shots { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.review-shots figure { margin: 0; border: 1px solid #e2e8da; border-radius: 10px; overflow: hidden; background: #f7f8f4; width: min(320px, 100%); }
.review-shots figure:last-child { width: min(190px, 100%); }
.review-shots img { display: block; width: 100%; height: 210px; object-fit: cover; object-position: top; }
.review-shots figure:last-child img { height: 260px; }
.review-shots figcaption { font-size: 11px; color: #65775a; padding: 9px 11px; }
.activity summary { padding: 17px 20px; font-size: 12px; font-weight: 550; cursor: pointer; color: #5f7251; transition: background .16s; }
.activity summary:hover { background: #f3f7eb; }
.activity summary span { font-size: 10px; font-weight: 400; color: #8c9b7d; margin-left: 10px; }
.activity[open] > summary { border-bottom: 1px solid #e9ede2; }
.activity > .detail-note { padding: 0 20px; }
.detail-note { font-size: 12px; color: #849276; line-height: 1.75; margin: 16px 0; }
#reasoning-summary { max-height: 260px; overflow: auto; white-space: pre-wrap; font-size: 13px; line-height: 1.8; padding: 0 20px 16px; scrollbar-width: thin; }
#reasoning-summary p { margin: 0 0 14px; }
#reasoning-summary p:last-child { margin-bottom: 0; }
#reasoning-summary .progress-activity { padding: 8px 12px; border-left: 2px solid #b4c991; border-radius: 0 7px 7px 0; background: #f3f7ec; font-size: 12px; line-height: 1.5; }
#agent-plan { padding: 0 20px; }
#agent-plan .plan-step { font-size: 12px; border-left: 2px solid #b4c991; padding: 9px 13px; background: #f3f7ec; border-radius: 0 6px 6px 0; }
#token-usage { font-size: 10px; font-weight: 400; margin-left: 12px; color: #8c9b7d; }
#save-version { margin: 0 20px 12px; }
#version-list { padding: 0 20px 10px; }
.version-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid #e9ede2; font-size: 12px; }
.version-row:last-child { border: 0; }
.version-row small { display: block; color: #8c9b7d; margin-top: 6px; font-size: 11px; }
.version-row strong { overflow-wrap: anywhere; font-weight: 550; }
#activity-log { max-height: 180px; overflow: auto; padding: 12px 20px 16px; scrollbar-width: thin; }
.log-line { display: flex; gap: 16px; font-size: 11px; line-height: 1.8; margin: 7px 0; color: #7c8b6e; overflow-wrap: anywhere; }
.log-line time { color: #9ba88f; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.error-banner { padding: 16px 20px; background: #fff4ef; border: 1px solid #eed7cb; border-radius: 12px; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 12px; color: #a66242; margin-bottom: 20px; }
.error-banner span { overflow-wrap: anywhere; }
dialog { border: 1px solid #dce4d1; border-radius: 20px; padding: 30px; width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow: auto; color: var(--ink); background: #fcfdf9; box-shadow: 0 24px 100px #1c29172e; }
dialog::backdrop { background: #16200e80; backdrop-filter: blur(5px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; }
.dialog-header button { font-size: 25px; }
dialog h2 { font-size: 30px; font-weight: 500; letter-spacing: -1.2px; line-height: 1.2; margin: 16px 0 12px; }
dialog p { font-size: 12px; color: #819174; line-height: 1.8; margin-bottom: 22px; }
dialog label { display: block; font-size: 12px; font-weight: 550; margin: 20px 0 9px; }
dialog input, dialog textarea, dialog select { width: 100%; border: 1px solid #dce4d2; border-radius: 9px; padding: 12px 13px; font-size: 13px; background: white; line-height: 1.7; color: var(--ink); }
dialog select { padding-right: 30px; }
dialog textarea { resize: vertical; }
dialog input::placeholder, dialog textarea::placeholder { color: #9ba78f; }
#create-dialog { width: min(850px, calc(100% - 40px)); padding: 32px; }
#create-dialog h2 { font-size: 32px; margin-top: 15px; }
.dialog-intro { margin: 0 0 28px; }
.create-body { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 28px; align-items: stretch; }
.brief-fields > label:first-child { margin-top: 0; }
.brief-fields textarea { min-height: 220px; }
.field-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field-heading span { font-size: 10px; color: #91a180; }
.field-help { font-size: 11px; color: #879979; line-height: 1.7; margin: 9px 0 0; }
.create-settings { background: #f1f5e9; border: 1px solid #e0e8d4; border-radius: 13px; padding: 20px; }
.settings-heading { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 20px; }
.settings-heading h3 { font-size: 13px; font-weight: 600; margin: 0 0 4px; }
.settings-heading p { font-size: 11px; margin: 0; color: #869675; }
.create-settings label { font-size: 11px; margin-top: 17px; color: #657a54; }
.create-settings select { font-size: 12px; padding: 10px 27px 10px 12px; }
.create-account { margin-top: 23px; padding-top: 20px; border-top: 1px solid #dce5cd; }
.create-account > span { display: block; font-size: 8px; font-weight: 600; letter-spacing: 1.5px; color: #899a77; }
.create-account strong { display: block; font-size: 12px; font-weight: 600; margin: 8px 0 5px; }
.create-account small { display: block; font-size: 10px; color: #8b9a7b; line-height: 1.6; }
.create-note { margin-top: 20px; font-size: 11px; color: #819270; line-height: 1.9; }
.create-note strong { display: block; color: #61774f; font-size: 11px; margin-bottom: 7px; font-weight: 550; }
.create-note span { display: block; }
.dialog-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); margin-top: 28px; padding-top: 22px; }
.creation-summary { margin-right: auto; color: #8a9a79; font-size: 11px; }
#profiles-dialog { width: min(620px, calc(100% - 40px)); }
#profiles-dialog h3 { font-size: 15px; font-weight: 550; }
#profile-form { display: grid; gap: 12px; margin: 24px 0; padding: 20px; border: 1px solid #e2ead7; border-radius: 12px; background: #f3f7ec; }
#profile-form label { margin: 0; }
#profile-form .primary { justify-self: start; }
.profile-controls { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 30px; }
#dialog-profile { display: block; width: 100%; margin-top: 8px; }
#toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); padding: 15px 20px; background: #293722; color: #eef4e4; border: 1px solid #52683e; border-radius: 12px; font-size: 12px; max-width: min(600px, calc(100% - 32px)); z-index: 20; box-shadow: 0 10px 35px #192b1826; line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@keyframes pulse { 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 1250px) {
  .topbar { flex-wrap: wrap; gap: 14px; }
  .breadcrumb { max-width: 100%; }
  .system { flex-wrap: wrap; }
  .toolbar-hint { display: none; }
  .project-heading { align-items: flex-start; }
  .project-actions { flex-wrap: wrap; justify-content: flex-end; }
  .studio-grid { grid-template-columns: minmax(250px, .9fr) minmax(300px, 1.2fr); }
  .toolbar-label { display: none; }
  .account-button { max-width: 200px; }
}
@media (max-width: 1000px) {
  .sidebar { width: 200px; padding: 28px 16px; }
  main { margin-left: 200px; width: calc(100% - 200px); }
  .brand { gap: 8px; }
  .brand-mark { flex-basis: 40px; width: 40px; height: 40px; }
  .brand-wordmark strong { font-size: 19px; }
  .brand-wordmark em { font-size: 14px; }
  .brand-wordmark small { font-size: 6px; letter-spacing: 1.35px; }
  .sidebar-bottom { padding: 12px; }
  .topbar, .model-toolbar { padding: 16px 24px; }
  .model-toolbar { gap: 10px; flex-wrap: wrap; }
  .project-view { padding: 26px 24px; }
  .project-heading { flex-direction: column; gap: 16px; }
  .project-actions { justify-content: flex-start; }
  .studio-grid { grid-template-columns: minmax(240px, .9fr) minmax(270px, 1fr); gap: 14px; }
  .preview-toolbar { gap: 8px; padding: 0 10px; }
  .browser-dots { display: none; }
  .preview-controls { gap: 0; }
  .preview-controls .text-button { padding: 5px; min-width: 28px; }
  .messages { padding: 20px; }
  .welcome { padding: 50px 36px; }
  .connection-banner { margin-left: 24px; margin-right: 24px; }
}
@media (max-width: 820px) {
  .sidebar { width: 180px; padding: 25px 14px; }
  main { margin-left: 180px; width: calc(100% - 180px); }
  .brand { gap: 7px; }
  .brand-mark { flex-basis: 32px; width: 32px; height: 32px; }
  .brand-wordmark strong { font-size: 17px; }
  .brand-wordmark em { font-size: 12px; }
  .brand-wordmark small { font-size: 5.5px; letter-spacing: 1px; }
  .sidebar-bottom { padding: 10px; }
  .breadcrumb strong { max-width: 300px; }
  .system { gap: 8px; width: 100%; }
  .system .account-button { margin-left: auto; }
  .toolbar-field { flex-direction: column; align-items: flex-start; gap: 5px; }
  .toolbar-field select { max-width: 205px; }
  .model-toolbar { align-items: flex-end; }
  .studio-grid { grid-template-columns: 1fr; height: auto; }
  .chat-panel { height: 440px; }
  .preview-panel { height: 570px; }
  .connection-banner { align-items: flex-start; flex-direction: column; gap: 14px; }
  .workflow { flex-direction: column; gap: 20px; margin-top: 40px; }
  .workflow > div { display: grid; grid-template-columns: 36px 1fr; column-gap: 15px; }
  .workflow h3 { margin: 2px 0 5px; }
  .workflow p { grid-column: 2; margin: 0; max-width: none; }
  .step-line, .desktop-break { display: none; }
  .welcome h1 { letter-spacing: -1.8px; }
  .welcome-footer { gap: 17px; }
  .create-body { gap: 20px; }
  #create-dialog { padding: 26px; }
  .creation-summary { max-width: 180px; line-height: 1.6; }
}
@media (max-width: 600px) {
  .app { display: block; }
  .sidebar { position: relative; width: 100%; padding: 18px; display: grid; grid-template-columns: 1fr auto; gap: 16px; }
  .brand { gap: 8px; }
  .new-project { margin: 0; width: auto; font-size: 11px; padding: 10px 13px; min-height: 40px; }
  .nav-label, .sidebar-bottom { display: none; }
  #project-list { grid-column: 1 / -1; display: flex; gap: 8px; }
  .project-nav { flex-shrink: 0; width: auto; max-width: 210px; margin: 0; padding: 9px 12px; }
  .sidebar-empty { display: none; }
  main { margin: 0; width: 100%; }
  .topbar { padding: 16px 18px; }
  .breadcrumb { font-size: 11px; }
  .breadcrumb strong { max-width: 250px; }
  .system .account-button { width: 100%; max-width: none; margin: 0; text-align: left; }
  .model-toolbar { padding: 14px 18px; }
  .toolbar-field { flex: 1; min-width: 0; }
  .toolbar-field select { width: 100%; max-width: none; padding-right: 22px; }
  .welcome { padding: 38px 24px; }
  .welcome h1 { font-size: 37px; }
  .project-view { padding: 25px 16px; }
  .project-heading h1 { font-size: 25px; }
  .project-actions { gap: 7px; }
  .project-actions .primary, .project-actions .secondary, .project-actions .dark-button { font-size: 11px; padding: 10px 12px; }
  .project-actions .status-pill { font-size: 10px; }
  .chat-panel { height: 430px; }
  .preview-panel { height: 480px; }
  .preview-surface { padding: 10px; }
  .main-footer { padding: 20px; }
  .main-footer span { display: none; }
  dialog, #create-dialog { padding: 22px; width: calc(100% - 24px); max-height: calc(100dvh - 24px); border-radius: 16px; }
  dialog h2, #create-dialog h2 { font-size: 27px; }
  .create-body { grid-template-columns: 1fr; }
  .brief-fields textarea { min-height: 180px; }
  .create-settings { padding: 18px; }
  .settings-heading { margin-bottom: 14px; }
  .create-note { display: none; }
  .field-heading span { display: none; }
  .dialog-footer { flex-wrap: wrap; }
  .creation-summary { max-width: none; flex-basis: 100%; }
  .dialog-footer .primary { flex: 1; }
  .activity summary { padding: 16px; }
  #token-usage { display: block; margin: 8px 0 0 12px; }
  .version-row { flex-wrap: wrap; }
}
.environment-note { margin: 16px 0 0; font-size: 10px; color: #71895e; line-height: 1.7; }
.environment-note.offline { color: #9b7a38; }
.access-screen { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 60px; padding: clamp(24px, 7vw, 100px); background: radial-gradient(ellipse at 20% 35%, #dce9c4 0, transparent 60%), var(--paper); }
.access-brand { font-size: clamp(42px, 6vw, 86px); font-weight: 700; letter-spacing: -5px; }
.access-brand > span { font-weight: 300; }
.access-brand small { display: block; font-size: 15px; letter-spacing: 0; font-weight: 400; color: #56654a; margin-top: 22px; }
.access-card { background: #fff; border: 1px solid var(--line); padding: clamp(24px, 4vw, 52px); border-radius: 24px; max-width: 480px; width: 100%; box-shadow: 0 18px 80px #24341908; }
.access-card h1 { font-size: 30px; letter-spacing: -1px; margin: 22px 0 12px; }
.access-card p { font-size: 13px; line-height: 1.7; color: #65715b; }
.access-card form { display: grid; gap: 16px; margin: 28px 0 14px; }
.access-card label { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 600; }
.access-card input { width: 100%; padding: 13px 14px; border: 1px solid #dce2d4; border-radius: 9px; background: #fcfdf9; font-size: 14px; }
.access-card .primary { min-height: 46px; margin-top: 8px; }
.access-card .text-button { font-size: 12px; }
.access-card .access-footnote { font-size: 11px; margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.access-card .access-error { color: #a33d26; margin: 0; }
.device-code { display: block; padding: 22px; background: #f0f4e7; border: 1px dashed #c5d5af; border-radius: 12px; text-align: center; font: 600 30px ui-monospace, monospace; letter-spacing: 4px; margin: 22px 0; }
#codex-dialog .profile-controls, #team-dialog form { display: flex; flex-wrap: wrap; gap: 12px; }
#team-dialog form label, #team-dialog form input { width: 100%; }
#invite-result { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 24px; }
#invite-link { font: 11px ui-monospace, monospace; }
@media (max-width: 820px) {
  .access-screen { grid-template-columns: 1fr; gap: 30px; justify-items: center; padding: 32px 20px; }
  .access-brand { font-size: 42px; letter-spacing: -2.5px; text-align: center; }
  .access-brand small { margin-top: 10px; font-size: 12px; }
}

/* Refined workspace */
:root { --paper: #f4f5ef; --line: #dfe5d9; --sidebar: #1d261e; --green: #d7f478; --radius: 18px; }
.sidebar { padding-top: 34px; border-right: 1px solid #354133; }
.new-project { box-shadow: 0 8px 24px #111c0b32; }
.new-project .new-project-label { font-size: 13px; font-weight: 600; }
.project-nav { min-height: 46px; }
.project-nav.selected { box-shadow: inset 3px 0 0 var(--green); }
.topbar { background: #fff; }
.model-toolbar { background: #fafbf7; }
.toolbar-field select { min-width: 130px; }
.project-view { padding-top: 35px; }
.project-heading { margin-bottom: 28px; }
.project-heading h1 { font-size: clamp(25px, 2.15vw, 34px); letter-spacing: -1.35px; }
.project-heading a { display: inline-block; word-break: break-all; }
.project-actions .status-pill { min-height: 36px; display: inline-flex; align-items: center; }
.studio-grid { gap: 22px; }
.studio-grid .chat-panel { grid-column: 1; grid-row: 1; }
.studio-grid .preview-panel { grid-column: 2; grid-row: 1; }
.chat-panel, .preview-panel { border-color: #dce4d4; box-shadow: 0 12px 38px #30402108, 0 2px 6px #30402105; }
.panel-heading, .preview-toolbar { height: 61px; }
.panel-heading { background: #fcfdf9; }
.preview-toolbar { background: #fff; }
.preview-toolbar > span { background: #f4f6ef; border: 1px solid #edf0e7; }
.preview-surface { background: #e9eee2; }
.chat-form { margin: 16px; border-radius: 14px; }
.activity { background: #fff; box-shadow: 0 4px 20px #26361b04; }
.activity summary { font-size: 13px; font-weight: 600; }
.site-paused .preview-surface { background: radial-gradient(circle at 48% 35%, #f7f9f1 0, #e9eee2 76%); }
.site-paused #preview-empty { width: min(100%, 470px); max-width: 470px; background: #fff; border: 1px solid #dce5d3; border-radius: 22px; padding: clamp(28px, 3.5vw, 52px) 30px 34px; box-shadow: 0 25px 65px #29382014; }
.site-paused #preview-empty.paused .preview-symbol { display: grid; width: 62px; height: 62px; margin-bottom: 24px; background: #ecf3df; border-radius: 18px; }
.site-paused #preview-empty.paused .empty-eyebrow { background: #eff3e8; border-radius: 999px; color: #547040; padding: 7px 12px; letter-spacing: 1.3px; }
.site-paused #preview-empty h3 { margin-top: 22px; font-size: clamp(26px, 2.3vw, 36px); letter-spacing: -1.3px; }
.site-paused #preview-empty p { max-width: 340px; color: #6e7d65; margin-bottom: 24px; }
.site-paused #preview-start { min-height: 46px; padding: 12px 22px; box-shadow: 0 7px 17px #76902d20; }
.site-paused .paused-info { padding-top: 23px; border-top: 1px solid #e7ecdf; color: #708360; }
.site-paused .chat-form { background: #f5f7f1; }
#create-dialog { width: min(930px, calc(100% - 40px)); padding: 0; border: 1px solid #d7e1d0; background: #fff; box-shadow: 0 32px 110px #16251938; }
#create-dialog .dialog-header { padding: 29px 34px 0; }
#create-dialog .dialog-header button { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #f1f4eb; color: #53664b; }
#create-dialog h2 { padding: 0 34px; margin: 17px 0 9px; font-size: clamp(30px, 3vw, 41px); line-height: 1.1; letter-spacing: -1.8px; }
#create-dialog .dialog-intro { padding: 0 34px; margin: 0 0 28px; font-size: 13px; color: #6e7c65; }
.create-body { gap: 0; grid-template-columns: minmax(0, 1.15fr) minmax(295px, .85fr); border-top: 1px solid #e7ecdf; border-bottom: 1px solid #e7ecdf; align-items: stretch; }
.brief-fields { padding: 27px 34px 31px; min-width: 0; }
.brief-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.brief-pair > div { min-width: 0; }
.brief-fields input, .brief-fields textarea { width: 100%; }
.required-mark { color: #a6533f; }
.optional-label { color: #8a9a7d; font-size: 11px; font-weight: 450; }
#create-dialog input[type="file"] { padding: 10px; background: #f8faf5; color: #52634b; font-size: 11px; }
#create-dialog input[type="file"]::file-selector-button { border: 1px solid #d8e1d1; background: #fff; border-radius: 7px; padding: 7px 10px; margin-right: 11px; color: #3b4f35; font: inherit; cursor: pointer; }
.brand-details #brand-details-content { padding: 4px 20px 18px; }
.brand-detail-row { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-top: 1px solid #edf0e7; font-size: 12px; line-height: 1.5; }
.brand-detail-row strong { color: #617255; font-weight: 650; }
.brand-detail-row span { white-space: pre-wrap; overflow-wrap: anywhere; }
.brand-detail-row a { color: #4d763b; text-decoration: underline; text-underline-offset: 3px; }
.create-settings { border: 0; border-left: 1px solid #e0e8d8; border-radius: 0; padding: 27px 30px 30px; background: #f7f9f2; min-width: 0; }
.create-section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 27px; }
.section-number { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px; background: #e6efcf; color: #526a39; font-size: 11px; font-weight: 700; letter-spacing: .5px; }
.create-section-heading strong { display: block; font-size: 14px; font-weight: 650; letter-spacing: -.25px; }
.create-section-heading small { display: block; margin-top: 2px; font-size: 11px; color: #869479; }
#create-dialog label { color: #344531; font-weight: 600; margin-top: 20px; }
.brief-fields > label:first-of-type { margin-top: 0; }
#create-dialog input, #create-dialog textarea, #create-dialog select { border-color: #d8e1d1; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px #2d411007; }
#create-dialog input:focus, #create-dialog textarea:focus, #create-dialog select:focus { border-color: #91ad69; outline: 3px solid #e8f1d9; outline-offset: 0; }
#create-dialog textarea { min-height: 80px; line-height: 1.65; }
#create-dialog #project-brief { min-height: 105px; }
#create-dialog .create-settings label { margin-top: 19px; }
#create-dialog .create-settings select { min-height: 45px; font-size: 13px; }
.create-account { border-top-color: #dbe6d2; margin-top: 27px; }
.create-account strong { overflow-wrap: anywhere; }
.create-note { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 8px; margin-top: 20px; line-height: 1.5; }
.create-note strong { grid-column: 1 / -1; margin-bottom: 4px; }
.create-note span { font-size: 10px; }
.create-note span::before { content: '✓'; margin-right: 6px; color: #64843f; font-weight: 700; }
#create-dialog .dialog-footer { margin: 0; padding: 20px 34px; border: 0; background: #fff; }
.creation-summary { color: #5f7550; font-weight: 550; }
#create-submit { min-height: 44px; padding: 12px 21px; }
@media (max-width: 1000px) {
  .create-body { grid-template-columns: minmax(0, 1fr) minmax(265px, .9fr); }
  .brief-fields { padding-left: 26px; padding-right: 26px; }
  .create-settings { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 820px) {
  .studio-grid .chat-panel, .studio-grid .preview-panel { grid-column: auto; grid-row: auto; }
}
@media (max-width: 680px) {
  .task-panel, .review-panel { padding: 18px; }
  .review-head { flex-direction: column; }
  .review-actions { width: 100%; }
  .review-actions button { flex: 1 1 auto; }
  #create-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
  #create-dialog .dialog-header { padding: 22px 22px 0; }
  #create-dialog h2, #create-dialog .dialog-intro { padding-left: 22px; padding-right: 22px; }
  .create-body { grid-template-columns: 1fr; }
  .brief-pair { grid-template-columns: 1fr; }
  .brand-detail-row { grid-template-columns: 1fr; gap: 3px; }
  .brief-fields { padding: 23px 22px 26px; }
  .create-settings { border-left: 0; border-top: 1px solid #e0e8d8; padding: 23px 22px 26px; }
  .create-section-heading { margin-bottom: 18px; }
  #create-dialog textarea { min-height: 175px; }
  #create-dialog .dialog-footer { padding: 17px 22px 22px; }
  .site-paused #preview-empty { padding: 28px 20px; }
}

/* Phone layout: content first, then the conversation and project activity. */
@media (max-width: 600px) {
  .app { min-width: 0; }
  .sidebar { padding: 16px 16px 12px; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; border-right: 0; }
  .brand { min-width: 0; }
  .brand-mark { flex: 0 0 36px; width: 36px; height: 36px; }
  .brand-wordmark strong { font-size: 19px; }
  .brand-wordmark em { font-size: 14px; }
  .brand-wordmark small { margin-top: 3px; font-size: 6px; }
  .new-project { margin: 0; min-height: 44px; padding: 8px 12px; gap: 6px; white-space: nowrap; }
  .new-project .new-project-label { font-size: 11px; }
  #project-list { grid-column: 1 / -1; width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; scroll-snap-type: x proximity; padding-bottom: 2px; }
  #project-list::-webkit-scrollbar { display: none; }
  .project-nav { min-height: 42px; max-width: min(210px, 70vw); scroll-snap-align: start; }
  .topbar { padding: 13px 16px; gap: 12px; }
  .breadcrumb { width: 100%; min-width: 0; }
  .breadcrumb strong { min-width: 0; max-width: calc(100vw - 122px); }
  .system { min-width: 0; width: 100%; gap: 8px 10px; flex-wrap: wrap; }
  .system > * { min-height: 38px; }
  .system .account-button { order: 3; flex: 1 1 100%; min-width: 0; max-width: 100%; min-height: 36px; margin: 0; overflow: hidden; text-overflow: ellipsis; }
  .system #sign-out { margin-left: auto; font-size: 12px; }
  .model-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 10px; padding: 13px 16px 16px; align-items: end; }
  .toolbar-label { display: flex; grid-column: 1 / -1; font-weight: 600; }
  .toolbar-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; align-items: stretch; }
  .toolbar-field select { min-width: 0; width: 100%; max-width: 100%; height: 44px; font-size: 16px; padding: 9px 24px 9px 9px; }
  #refresh-models { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); background: #fff; border-radius: 9px; }
  .connection-banner { margin: 14px 16px 0; padding: 16px; }
  .connection-banner .secondary { width: 100%; min-height: 44px; }
  .welcome { padding: 36px 20px 32px; }
  .welcome h1 { font-size: clamp(32px, 9vw, 42px); line-height: 1.08; }
  .welcome-copy { line-height: 1.7; }
  .hero-button { min-height: 46px; }
  .project-view { min-width: 0; padding: 23px 14px 30px; }
  .project-heading { gap: 16px; margin-bottom: 20px; }
  .project-heading h1 { font-size: clamp(24px, 6.5vw, 31px); }
  .project-heading a { max-width: 100%; font-size: 11px; }
  .project-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: 100%; gap: 8px; }
  .project-actions .status-pill { grid-column: 1 / -1; justify-self: start; }
  .project-actions .secondary, .project-actions .dark-button, .project-actions .primary { min-width: 0; min-height: 44px; white-space: normal; text-align: center; line-height: 1.25; padding: 9px 7px; font-size: 11px; }
  .error-banner { align-items: stretch; flex-direction: column; gap: 12px; padding: 15px; }
  .error-banner .secondary { min-height: 44px; }
  .studio-grid { display: flex; flex-direction: column; height: auto; gap: 16px; }
  .preview-panel { order: 0; height: clamp(380px, 58dvh, 540px); }
  .chat-panel { order: 1; height: clamp(430px, 62dvh, 580px); }
  .panel-heading, .preview-toolbar { height: 54px; }
  .messages { padding: 16px; gap: 16px; }
  .message { font-size: 12px; line-height: 1.7; }
  .chat-form { margin: 10px; padding: 12px; }
  .chat-form textarea { font-size: 16px; }
  .chat-form > div > span { font-size: 10px; }
  .send-button { width: 44px; height: 44px; }
  .preview-toolbar { padding: 0 10px; gap: 6px; }
  .preview-toolbar > span { min-width: 0; padding: 8px; font-size: 10px; }
  .preview-controls { gap: 0; flex-shrink: 0; }
  .viewport-switch { padding: 2px; margin-right: 2px; }
  .viewport-button { width: 36px; height: 38px; }
  .viewport-button svg { width: 21px; height: 21px; }
  .annotate-button { min-width: 44px; min-height: 44px; justify-content: center; padding: 0 8px; margin-right: 2px; font-size: 18px; }
  .annotate-button span { display: none; }
  .annotation-composer { right: 12px; top: auto; bottom: 12px; max-height: calc(100% - 24px); }
  .annotation-composer textarea { font-size: 16px; }
  .preview-controls .text-button, .preview-controls a { min-width: 34px; width: 34px; min-height: 44px; height: 44px; padding: 0; }
  .preview-surface { padding: 8px; }
  #preview-empty { padding: 22px 16px; }
  #preview-empty h3 { font-size: 24px; }
  .site-paused #preview-empty { max-height: 100%; overflow: auto; padding: 22px 18px; }
  .site-paused #preview-empty h3 { font-size: 25px; margin-top: 15px; }
  .site-paused #preview-empty p { line-height: 1.6; }
  .site-paused .paused-info { margin-top: 18px; padding-top: 16px; flex-wrap: wrap; }
  .activity summary { min-height: 44px; }
  #agent-plan, #reasoning-summary { overflow-wrap: anywhere; }
  #activity-log { max-height: 230px; }
  .log-line { gap: 9px; }
  dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); padding: 22px 18px; }
  dialog input, dialog textarea, dialog select { font-size: 16px; }
  #create-dialog { width: calc(100% - 12px); max-height: calc(100dvh - 12px); border-radius: 16px; }
  #create-dialog .dialog-header { padding: 18px 18px 0; }
  #create-dialog h2 { font-size: 29px; padding: 0 18px; line-height: 1.12; letter-spacing: -1px; }
  #create-dialog .dialog-intro { padding: 0 18px; margin-bottom: 20px; }
  .brief-fields, .create-settings { padding: 20px 18px; }
  #create-dialog input, #create-dialog textarea, #create-dialog select { font-size: 16px; }
  #create-dialog textarea { min-height: 150px; }
  #create-dialog #brief-objective { min-height: 95px; }
  #create-dialog #project-brief { min-height: 110px; }
  .create-note { display: none; }
  #create-dialog .dialog-footer { position: sticky; bottom: 0; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 12px 18px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); box-shadow: 0 -8px 22px #26361b09; }
  .creation-summary { grid-column: 1 / -1; max-width: 100%; line-height: 1.3; font-size: 11px; }
  #create-dialog .dialog-footer .secondary, #create-submit { min-width: 0; width: 100%; min-height: 44px; padding: 9px; }
  .profile-controls { display: grid; grid-template-columns: 1fr; }
  .profile-controls > *, #team-dialog form .primary { width: 100%; min-height: 44px; }
  .device-code { font-size: clamp(19px, 7vw, 30px); letter-spacing: 2px; overflow-wrap: anywhere; }
  .access-screen { min-height: 100dvh; gap: 20px; padding: 24px 16px max(24px, env(safe-area-inset-bottom)); align-content: center; }
  .access-brand { font-size: 36px; }
  .access-card { padding: 24px 20px; border-radius: 18px; }
  .access-card h1 { font-size: 27px; }
  .access-card input { font-size: 16px; }
}
@media (max-width: 360px) {
  .new-project { width: 44px; justify-self: end; padding: 8px; }
  .new-project .new-project-label { display: none; }
  .brand-wordmark strong { font-size: 17px; }
  .brand-wordmark em { font-size: 12px; }
  .brand-wordmark small { letter-spacing: .8px; }
  .project-actions { grid-template-columns: 1fr; }
  .project-actions .status-pill { grid-column: 1; }
  .preview-panel { height: 390px; }
  .preview-controls .text-button, .preview-controls a { min-width: 31px; width: 31px; }
}

/* Dedicated workspace settings */
.topbar { flex-wrap: nowrap; }
.topbar .breadcrumb { flex: 1 1 auto; }
.breadcrumb .breadcrumb-root { color: var(--muted); }
.topbar .system { flex: 0 0 auto; width: auto; }
.settings-open-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 14px; border: 1px solid #dfe6d8; border-radius: 10px; background: #fff; color: #405336; font-size: 12px; font-weight: 600; white-space: nowrap; }
.settings-open-button:hover, .settings-open-button.active { background: #eff5e7; border-color: #c8d8b8; }
.settings-open-button:focus-visible { outline: 3px solid #95b954; outline-offset: 3px; }
.settings-view { width: min(1180px, 100%); min-height: calc(100vh - 146px); margin: 0 auto; padding: 44px 42px 70px; }
.settings-page-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.settings-page-header .eyebrow { color: #829573; }
.settings-page-header h1 { margin: 12px 0 8px; font-size: clamp(35px, 4vw, 53px); font-weight: 600; letter-spacing: -2.2px; line-height: 1.08; }
.settings-page-header p { margin: 0; color: #78876e; font-size: 14px; line-height: 1.6; }
.settings-page-header .secondary { min-height: 44px; }
.settings-page-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.settings-card { min-width: 0; padding: 27px 28px 26px; border: 1px solid #dfe7d7; border-radius: 18px; background: #fff; box-shadow: 0 10px 30px #26361b06; }
.settings-card-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 25px; }
.settings-card-icon { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #eff5e7; color: #5c744a; font-size: 12px; font-weight: 700; }
.settings-card-heading .eyebrow { color: #8c9d7e; font-size: 9px; }
.settings-card h2 { margin: 5px 0 0; font-size: 21px; font-weight: 600; letter-spacing: -.65px; }
.settings-card p { color: #78876e; font-size: 12px; line-height: 1.75; margin: 0 0 20px; }
.settings-person { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; min-width: 0; margin-bottom: 19px; padding: 16px; border: 1px solid #e4ebdd; border-radius: 13px; background: #f8faf5; }
.settings-avatar { flex: 0 0 46px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--green); color: #26331a; font-size: 20px; font-weight: 700; }
.settings-person > div { display: grid; gap: 4px; flex: 1 1 170px; min-width: 0; }
.settings-person strong { font-size: 14px; overflow-wrap: anywhere; }
.settings-person small { color: #7c8b72; font-size: 11px; overflow-wrap: anywhere; }
.settings-role { padding: 6px 9px; border: 1px solid #dbe5d0; border-radius: 7px; color: #587348; background: #f0f5ea; font-size: 10px; font-weight: 600; white-space: nowrap; }
.settings-connection { display: flex; align-items: flex-start; gap: 11px; min-width: 0; margin: 2px 0 17px; padding: 16px; border: 1px solid #e4ebdd; border-radius: 13px; background: #f8faf5; }
.settings-connection > div { display: grid; gap: 5px; min-width: 0; }
.settings-connection strong { font-size: 13px; }
.settings-connection small { color: #78876e; font-size: 11px; overflow-wrap: anywhere; line-height: 1.5; }
.settings-dot { flex: 0 0 9px; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: #adb9a2; box-shadow: 0 0 0 4px #adb9a220; }
.settings-dot.connected { background: #80a949; box-shadow: 0 0 0 4px #80a94920; }
.settings-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; margin-top: 14px; padding: 11px 14px; border: 1px solid #dce5d3; border-radius: 9px; background: #f8fbf4; color: #344a29; font-size: 12px; font-weight: 600; text-align: left; }
.settings-action:hover { background: #eef5e7; border-color: #c6d8b8; }
.settings-fields { display: grid; gap: 9px; }
.settings-fields label { color: #627454; font-size: 11px; font-weight: 600; }
.settings-fields select { width: 100%; min-height: 44px; margin-bottom: 10px; }
.settings-environment { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.settings-environment small { color: #87947e; font-size: 11px; }
.settings-environment-card p { margin-bottom: 0; }
@media (max-width: 820px) {
  .settings-view { padding: 32px 24px 58px; }
  .settings-page-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .topbar { flex-wrap: nowrap; align-items: center; }
  .topbar .breadcrumb { width: auto; min-width: 0; }
  .topbar .breadcrumb strong { max-width: min(42vw, 220px); }
  .topbar .system { width: auto; min-width: 0; flex-wrap: nowrap; }
  .settings-open-button { min-width: 44px; padding: 10px; }
  .settings-open-button span { display: none; }
  .settings-view { min-height: calc(100dvh - 200px); padding: 29px 16px 48px; }
  .settings-page-header { display: block; margin-bottom: 20px; }
  .settings-page-header h1 { font-size: 38px; }
  .settings-page-header .secondary { margin-top: 20px; }
  .settings-page-grid { gap: 12px; }
  .settings-card { padding: 21px 19px; border-radius: 15px; }
  .settings-fields select { font-size: 16px; }
}
@media (max-width: 380px) {
  .topbar .breadcrumb strong { max-width: 47vw; }
  .breadcrumb-root, .breadcrumb-divider { display: none; }
}
.project-view.canvas-focus .studio-grid { grid-template-columns: minmax(0, 1fr); height: clamp(620px, calc(100dvh - 225px), 1100px); }
.project-view.canvas-focus .studio-grid .chat-panel { display: none; }
.project-view.canvas-focus .studio-grid .preview-panel { grid-column: 1; grid-row: 1; }
@media (max-width: 820px) {
  .canvas-focus-button span { display: none; }
}
@media (max-width: 600px) {
  .canvas-focus-button { display: none; }
  .project-view.canvas-focus .studio-grid .chat-panel { display: flex; }
  .project-view.canvas-focus .studio-grid { height: auto; }
}

.attachment-toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:8px 0; }
.attachment-toolbar small { color:#748368; font-size:10px; line-height:1.5; }
.attachment-button { border:1px solid #d8e3cc; border-radius:8px; background:#f1f6e9; color:#3c5230; padding:8px 11px; font-size:11px; cursor:pointer; }
.attachment-list { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0; }
.attachment-list[hidden] { display:none; }
.attachment-card { position:relative; width:95px; border:1px solid #dce5d1; border-radius:9px; padding:5px; background:#fff; }
.attachment-card img { width:83px; height:65px; object-fit:cover; border-radius:5px; display:block; }
.attachment-card span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10px; margin-top:4px; color:#526448; }
.attachment-remove { position:absolute; top:-6px; right:-6px; width:23px; height:23px; padding:0; border:1px solid #ccd9c0; border-radius:50%; background:#fff; color:#33452a; cursor:pointer; }
.message-images { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.message-image { max-width:155px; color:inherit; text-decoration:none; font-size:10px; }
.message-image img { display:block; width:140px; height:105px; object-fit:cover; border:1px solid #dce5d1; border-radius:8px; margin-bottom:4px; }
.message-image span { overflow-wrap:anywhere; }
.chat-form > .attachment-list { justify-content:flex-start; }
.chat-form > .attachment-toolbar { justify-content:flex-start; }

.annotation-composer { max-height: min(78vh, 700px); overflow-y:auto; }

/* Project creation: fast message or guided brief, with shared settings and logo. */
.create-mode-tabs { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:24px; }
.create-mode-tabs button { text-align:left; background:#f7f9f3; border:1px solid #d7e0cc; border-radius:12px; padding:14px 16px; color:#35462d; font-family:inherit; font-size:14px; font-weight:600; cursor:pointer; }
.create-mode-tabs button small { display:block; font-size:11px; font-weight:400; margin-top:4px; color:#748368; }
.create-mode-tabs button[aria-selected="true"] { background:#eaf3d4; border-color:#95b568; box-shadow:0 0 0 1px #95b568; }
.create-mode-tabs button:focus-visible { outline:3px solid #8eac5c; outline-offset:3px; }
#create-form-fields { border:0; padding:0; margin:0; min-width:0; }
#create-chat-panel[hidden], #create-form-panel[hidden], #create-name-optional[hidden] { display:none; }
.create-chat-welcome { display:flex; gap:12px; margin:22px 0 16px; padding:16px; background:#f4f7ed; border-radius:12px; }
.create-chat-welcome>span { color:#7a994f; font-size:23px; }
.create-chat-welcome strong { font-size:15px; color:#2e4028; }
.create-chat-welcome p { font-size:12px; line-height:1.7; margin:6px 0 0; color:#748368; }
#create-chat-prompt { resize:vertical; min-height:180px; line-height:1.7; }
#create-dialog .dialog-footer { position:sticky; bottom:0; z-index:2; border-top:1px solid #e0e8d8; box-shadow:0 -8px 22px #26361b09; }
#create-form-panel .create-section-heading { margin-top:20px; }
