/* Screen-sized pages, with bounded reading areas for long documents. */
.site-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 max(clamp(28px, 3.4vw, 48px), calc((100vw - 1664px) / 2)); gap: 24px; border-bottom: 1.5px solid var(--border-line); }
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; font-size: 15px; }
.brand b { font: 20px var(--font-serif); letter-spacing: .08em; }
.brand-mark { display: block; flex: none; width: 29px; height: 29px; }
.session-exit { justify-self: end; color: var(--text-muted); font-size: 13px; }
.page-nav { display: flex; align-self: stretch; gap: 28px; }
.page-nav button { position: relative; padding: 0 2px; color: var(--text-muted); font-size: 14px; white-space: nowrap; }
.page-nav button[aria-selected="true"] { color: var(--text-main); font-weight: 600; }
.page-nav button[aria-selected="true"]::after { content: ""; position: absolute; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent-terracotta); left: 0; right: 0; bottom: -1px; }
.nav-indicator { position: absolute; right: -6px; top: 22px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-terracotta); }
.workspace { min-height: 0; min-width: 0; overflow: hidden; }
.page { width: 100%; height: 100%; min-height: 0; outline: none; }
.page-create { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(380px, 530px); align-items: start; column-gap: clamp(50px, 9vw, 160px); max-width: 1280px; margin: auto; padding: 22px 64px 40px; }
.intro { min-width: 0; }
.intro h1 { font: 400 clamp(37px, 3.7vw, 56px)/1.4 var(--font-serif); letter-spacing: -.04em; }
.studio-sketch { display: block; width: min(100%, 355px); height: clamp(115px, 20vh, 190px); margin: 8px 0 6px -12px; }
.brief { width: 100%; min-width: 0; padding: 6px 0; }
.brief-top { display: flex; align-items: center; justify-content: flex-end; }
.brief h2 { font: 400 29px/1.5 var(--font-serif); margin: 9px 0 20px; letter-spacing: -.03em; }
.input-modes { display: flex; border-bottom: 1px solid var(--border-line); margin-bottom: 23px; gap: 25px; }
.input-modes button { position: relative; padding: 0 0 11px; font-size: 12px; color: var(--text-muted); }
.input-modes button[aria-selected="true"] { color: var(--text-main); }
.input-modes button[aria-selected="true"]::after { position: absolute; content: ""; bottom: -1px; height: 2px; background: var(--text-main); left: 0; right: 0; }
.task-form { display: flex; flex-direction: column; gap: 20px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.label-row span { font-size: 10px; color: var(--text-muted); }
#scene-description { height: 98px; }
.platform-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.platform-options button { display: flex; gap: 7px; flex-direction: column; justify-content: center; align-items: center; height: 65px; border: 1.5px solid var(--border-line); border-radius: 9px; font-size: 12px; font-weight: 500; color: var(--text-muted); }
.platform-options button:hover { background: var(--bg-surface-subtle); }
.platform-options button[aria-pressed="true"] { border-color: var(--accent-terracotta); color: var(--accent-terracotta); background: var(--accent-tint); }
.brief-options { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brief-options > span { color: var(--text-muted); font-size: 10px; }
.form-action { padding-top: 6px; }
.form-action .btn-primary { width: 100%; justify-content: space-between; min-height: 48px; padding-left: 19px; padding-right: 19px; }
.form-error { color: var(--state-bad); font-size: 12px; line-height: 1.5; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 22px; flex: 0 0 auto; }
.page-heading h2 { font: 400 33px/1.4 var(--font-serif); letter-spacing: -.03em; }
.page-description { color: var(--text-muted); font-size: 14px; line-height: 1.8; margin-top: 10px; }
.page-process, .page-evidence { display: flex; flex-direction: column; max-width: 1320px; margin: auto; padding: 30px 64px 20px; }
.process-meta:has(.runbar[hidden]) { display: none; }
.process-meta { display: flex; justify-content: space-between; align-items: center; min-height: 40px; padding: 0 0 14px; border-bottom: 1px solid var(--border-line); flex: 0 0 auto; gap: 16px; }
.process-meta > span { color: var(--text-muted); font-size: 11px; }
.runbar { display: flex; gap: 10px; align-items: center; min-width: 0; }
.runbar b { font-size: 12px; font-weight: 400; }
.runbar-meta { font-size: 10px; color: var(--text-muted); white-space: nowrap; }
.runbar-spin { width: 12px; height: 12px; border: 1.5px solid var(--border-line); border-top-color: var(--accent-terracotta); border-radius: 50%; animation: turn 1s linear infinite; flex: 0 0 auto; }
@keyframes turn { to { transform: rotate(360deg); } }
.process-content { min-height: 0; flex: 1; border: 1.5px solid var(--border-line); border-radius: 14px; padding: 12px; background: var(--bg-surface); }
#flow { height: 100%; min-height: 0; }
.bot-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); height: 100%; align-items: center; padding: 15px 16px; column-gap: 36px; row-gap: 20px; }
.bot-grid { position: relative; }
.flow-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.flow-links path { fill: none; stroke: #d2cec0; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.flow-links .done path { stroke: #aab69e; }
.flow-links .handoff path { stroke: var(--accent-terracotta); }
.flow-links .handoff .link-line { stroke-dasharray: 5 4; animation: pass-note .8s linear infinite; }
.bot-node .bot-connector { display: none; }
.bot-node { position: relative; display: flex; align-items: center; flex-direction: column; min-height: 0; }
.bot-node:nth-child(5) { grid-column: 4; grid-row: 2; }
.bot-node:nth-child(6) { grid-column: 3; grid-row: 2; }
.bot-node:nth-child(7) { grid-column: 2; grid-row: 2; }
.bot-node:nth-child(8) { grid-column: 1; grid-row: 2; }
.bot-button { display: flex; flex-direction: column; align-items: center; padding: 6px; border-radius: 9px; width: 100%; }
.bot-button:hover .bot-avatar { background: var(--bg-surface-subtle); }
.bot-avatar { width: clamp(75px, 12vh, 112px); height: clamp(75px, 12vh, 112px); position: relative; display: grid; place-items: center; border-radius: 50%; }
.bot-portrait { width: 80%; height: 80%; overflow: visible; }
.bot-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); fill: none; }
.ring-track { stroke: #e3e0d7; stroke-width: 1; }
.ring-active { stroke: var(--accent-terracotta); stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 36 250; opacity: 0; transform-origin: center; }
.bot-node.running .ring-active, .bot-node.settling .ring-active { opacity: 1; animation: turn 1.7s linear infinite; }
.bot-node.running .bot-portrait, .bot-node.settling .bot-portrait { animation: bot-bob 2.7s ease-in-out infinite; }
@keyframes bot-bob { 50% { transform: translateY(-3px) rotate(2deg); } }
.bot-node.done .ring-track { stroke: #b8c5ae; stroke-width: 1.4; }
.bot-node.wait .bot-portrait { opacity: .55; }
.bot-node.error .ring-track { stroke: var(--state-bad); stroke-width: 1.7; }
.bot-check { position: absolute; bottom: 1px; right: 2px; display: grid; place-items: center; border-radius: 50%; width: 20px; height: 20px; background: #dfe8d5; color: var(--state-ok); border: 3px solid var(--bg-canvas); }
.bot-check .icon { width: 11px; height: 11px; }
.bot-name { margin-top: 11px; font-size: 14px; font-weight: 600; }
.bot-role { font-size: 12px; margin-top: 6px; color: var(--text-muted); }
.bot-node.running .bot-role, .bot-node.settling .bot-role { color: var(--accent-terracotta); }
.bot-connector { position: absolute; top: clamp(38px, 5vh, 55px); left: calc(50% + 58px); width: calc(100% - 80px); height: 18px; pointer-events: none; overflow: visible; }
.bot-connector path { stroke: #dedbd0; stroke-width: 1.3; fill: none; }
.bot-node.done .bot-connector path { stroke: #aab69e; }
.bot-node.handoff .bot-connector .connector-line { stroke: var(--accent-terracotta); stroke-dasharray: 5 4; animation: pass-note .8s linear infinite; }
@keyframes pass-note { to { stroke-dashoffset: -18; } }
.bot-node:nth-child(4) .bot-connector { left: calc(50% - 9px); top: calc(100% + 2px); width: 18px; height: 34px; transform: rotate(90deg); transform-origin: 9px 9px; }
.bot-node:nth-child(n+5) .bot-connector { left: auto; right: calc(50% + 58px); transform: rotate(180deg); }
.process-footer { display: flex; justify-content: flex-end; gap: 20px; align-items: center; border-top: 1px solid var(--border-line); padding-top: 15px; flex-shrink: 0; }
.process-progress { width: 150px; height: 3px; background: var(--border-line); border-radius: 2px; }
#process-progress-fill { display: block; height: 100%; width: 0; background: #9eae91; transition: width .5s; }
#progress-count { color: var(--text-muted); font-size: 10px; }
.need-container:empty { display: none; }
.need-container { margin-top: 12px; flex: 0 0 auto; max-height: 155px; overflow: auto; background: var(--accent-tint); border-radius: 6px; padding: 15px 20px; }
.need-container h3 { font-size: 14px; margin-bottom: 8px; }
.need-container p, .need-container li { font-size: 12px; line-height: 1.8; }
.need-container ul { margin: 7px 0; padding-left: 18px; }
.need-container .btn-secondary { margin: 8px 7px 0 0; min-height: 32px; font-size: 11px; padding: 7px 10px; }
.need-candidates { display: flex; flex-wrap: wrap; align-items: center; font-size: 12px; }
.empty-state { display: flex; height: 100%; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 17px; padding: 20px; }
.empty-icon { width: 46px; height: 46px; fill: none; stroke: var(--accent-terracotta); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 11px; }
.empty-state h2, .empty-state h3 { font: 400 28px/1.5 var(--font-serif); }
.empty-state p { color: var(--text-muted); line-height: 1.8; font-size: 12px; }
.empty-state .btn-secondary { margin-top: 10px; }
.evidence-preview { justify-content: safe center; overflow-y: auto; }
.evidence-preview .empty-icon { margin-bottom: 0; }
.evidence-preview h3 { margin: 0; }
.empty-lead { max-width: 48ch; margin: 0; }
.evidence-preview-list { display: grid; gap: 10px; width: min(780px, 100%); margin: 6px 0 2px; padding: 0; list-style: none; text-align: left; }
.evidence-preview-list li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 13px 16px; border: 1px solid var(--border-line); border-left: 3px solid var(--accent-terracotta); border-radius: 8px; background: var(--bg-surface); }
.evidence-preview-list b { font-size: 13px; font-weight: 650; }
.evidence-preview-list span { color: var(--text-muted); font-size: 12px; line-height: 1.7; }
.page-work { max-width: 1760px; margin: auto; padding: 30px clamp(28px, 3.4vw, 48px) 24px; }
.stage-container { height: 100%; display: flex; flex-direction: column; }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-shrink: 0; }
.stage-heading { min-width: 0; }
.work-eyebrow { font-size: 13px; font-weight: 600; color: var(--accent-terracotta); margin-bottom: 8px; letter-spacing: .08em; }
.stage-title-group { min-width: 0; display: flex; align-items: center; gap: 14px; }
.stage-title-group b { display: block; min-width: 0; font: 600 clamp(26px, 2.2vw, 34px)/1.4 var(--font-serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-title-group span { display: inline-flex; flex-shrink: 0; color: var(--accent-terracotta-dark); background: var(--accent-tint); border-radius: 6px; padding: 5px 10px; font-size: 12px; font-weight: 600; }
.stage-actions { display: flex; gap: 8px; flex-shrink: 0; }
.stage-actions .btn-secondary { min-height: 44px; padding: 10px 16px; font-size: 13px; }
.stage-actions .icon { width: 16px; height: 16px; }
.work-body { min-height: 0; flex: 1; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 24px 0; }
.work-summary { padding: 24px 18px; align-self: start; max-height: 100%; min-height: 0; overflow: auto; scrollbar-width: thin; border: 1.5px solid var(--border-line); border-radius: 14px; background: #f0ede5; }
.work-summary h2 { font: 600 27px/1.5 var(--font-serif); margin: 0 0 12px; }
.result-model { font-size: 13px; font-weight: 500; line-height: 1.8; color: var(--text-muted); margin-bottom: 22px; overflow-wrap: anywhere; }
.chips-container { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding-bottom: 18px; margin-bottom: 14px; border-bottom: 1px solid var(--border-line); }
.chips-container .tag { background: transparent; padding: 5px 0 5px 14px; position: relative; margin: 0; font-size: 13px; font-weight: 500; line-height: 1.7; }
.chips-container .tag::before { content: ""; width: 4px; height: 4px; background: currentColor; border-radius: 50%; position: absolute; left: 0; top: 13px; }
.chips-container .tag:first-child { width: 100%; padding: 10px 12px; border-left: 3px solid currentColor; border-radius: 5px; margin-bottom: 4px; background: var(--state-warn-bg); }
.chips-container .tag:first-child.ok { background: var(--state-ok-bg); }
.chips-container .tag:first-child::before { display: none; }
.work-summary .text-button { font-size: 13px; font-weight: 600; }
.notice-strip:empty { display: none; }
.notice-strip { max-height: 75px; overflow: auto; flex-shrink: 0; scrollbar-width: thin; }
.warnbar { color: var(--state-warn); font-size: 11px; line-height: 1.8; margin: 7px 0 18px; }
.preview-backdrop { min-height: 0; overflow: auto; overscroll-behavior: contain; background: var(--bg-surface-subtle); border: 1px solid var(--border-hairline); border-radius: 9px; padding: 24px; scrollbar-width: thin; }
.preview-stage { width: 100%; display: flex; flex-direction: column; align-items: center; }
.preview-stage .pv-phone { flex-shrink: 0; box-shadow: none; background: var(--bg-surface); }
.preview-stage .pv-poster { flex-shrink: 0; }
.revise-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; border: 1.5px solid var(--border-line); border-radius: 12px; background: #eeeadf; padding: 12px 16px; flex-shrink: 0; }
.revise-bar label { margin: 0; font-size: 14px; }
.revise-bar input { background: var(--bg-surface); min-height: 46px; }
.revise-bar .btn-primary { font-size: 14px; min-height: 46px; }
.insights { min-height: 0; flex: 1; display: flex; flex-direction: column; background: var(--bg-surface); border: 1.5px solid var(--border-line); border-radius: 14px; padding: 0 24px 20px; }
.insight-tabs { display: flex; flex-shrink: 0; border-bottom: 1px solid var(--border-line); gap: 28px; }
.insight-tabs button { position: relative; padding: 17px 0; font-size: 14px; font-weight: 600; color: var(--text-muted); }
.insight-tabs button[aria-selected="true"] { color: var(--text-main); }
.insight-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent-terracotta); }
.insight-pane { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-top: 22px; padding-right: 10px; }
.insight-caption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.insight-caption h3 { font-size: 16px; font-weight: 600; }
.insight-caption span { font-size: 13px; color: var(--text-muted); }
.dbg-content { font-size: 14px; line-height: 1.9; }
.dbg-content table { font-size: 13px; }
.dbg-content th { font-weight: 600; }
.dbg-content table + table { margin-top: 30px; }
.dbg-content h3 { font: 20px/1.5 var(--font-serif); margin: 25px 0 13px; }
.dbg-content p { margin: 10px 0; }
.dbg-content ul { padding-left: 20px; }
.orchestration-explainer { margin: 0 0 28px; padding: 20px 22px 18px; border: 1px solid var(--border-line); border-radius: 10px; background: var(--bg-surface-subtle); max-width: 900px; }
.orchestration-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.orchestration-heading h3 { margin: 0; font: 20px/1.45 var(--font-serif); }
.orchestration-heading span { color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.orchestration-intro { color: var(--text-muted); font-size: 13px; line-height: 1.8; margin: 8px 0 16px !important; }
.orchestration-sources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.orchestration-source { min-width: 0; padding: 15px 16px 13px; border: 1px solid var(--border-line); border-radius: 8px; background: var(--bg-surface); }
.orchestration-source.structured { border-top: 3px solid #8d765f; }
.orchestration-source.unstructured { border-top: 3px solid var(--accent-terracotta); }
.source-kicker { display: flex; justify-content: space-between; gap: 10px; color: var(--text-muted); font-size: 11px; letter-spacing: .04em; }
.source-kicker b { color: var(--text-main); font-size: 13px; letter-spacing: 0; }
.orchestration-source strong { display: block; margin-top: 9px; font-size: 14px; }
.orchestration-source p { color: var(--text-muted); font-size: 12px; line-height: 1.7; margin: 6px 0 9px !important; }
.orchestration-source small { display: block; color: var(--text-muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.orchestration-formula { margin: 15px 0 0 !important; padding-top: 13px; border-top: 1px dashed var(--border-line); color: var(--text-main); font-size: 12px; font-family: var(--font-mono); }
.orchestration-impact { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--border-line); }
.orchestration-impact span { color: var(--accent-terracotta); font-size: 11px; font-weight: 650; }
.orchestration-impact p { margin: 0 !important; color: var(--text-main); font-size: 12px; line-height: 1.7; }
.dimrow { display: grid; grid-template-columns: 140px minmax(0, 1fr) 115px; gap: 15px; align-items: center; margin: 10px 0; max-width: 720px; font-size: 11px; }
.bar { height: 4px; background: var(--border-line); border-radius: 2px; }
.bar i { display: block; height: 100%; background: #b17c61; border-radius: 2px; }
.dimvalue { display: flex; flex-direction: column; align-items: flex-end; color: var(--text-main); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dim-sources { color: var(--text-muted); font-size: 9px; line-height: 1.5; font-weight: 400; }
.studio-dialog { border: 1px solid var(--border-line); padding: 30px; width: min(760px, calc(100vw - 40px)); max-height: calc(100dvh - 44px); background: var(--bg-canvas); color: var(--text-main); border-radius: 10px; box-shadow: 0 20px 80px #25241f26; scrollbar-width: thin; }
.studio-dialog::backdrop { background: #25241f59; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.dialog-heading h2 { font: 26px/1.5 var(--font-serif); margin-top: 6px; }
.dialog-copy { color: var(--text-muted); font-size: 12px; line-height: 1.8; margin: 12px 0 22px; }
.presets-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 25px; }
.preset { padding: 18px 8px 18px 0; border-top: 1px solid var(--border-line); text-align: left; display: flex; flex-direction: column; gap: 7px; }
.preset b { font-size: 12px; font-weight: 400; }
.preset span { color: var(--text-muted); font-size: 10px; }
.preset:hover b { color: var(--accent-terracotta); }
.options-dialog { max-width: 500px; }
.options-fields { display: flex; flex-direction: column; gap: 20px; margin-top: 24px; }
.options-fields .btn-primary { margin-top: 2px; }
.options-advanced { border-top: 1px solid var(--border-line); padding-top: 15px; }
.options-advanced summary { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 12px; cursor: pointer; list-style: none; }
.options-advanced summary::-webkit-details-marker { display: none; }
.options-advanced summary::before { content: "＋"; color: var(--accent-terracotta); font-size: 12px; }
.options-advanced[open] summary::before { content: "－"; }
.options-advanced summary:hover { color: var(--text-main); }
.options-advanced-note { margin: 7px 0 0; color: var(--text-faint); font-size: 11px; line-height: 1.65; }
.options-advanced .form-group { margin-top: 14px; }
.step-dialog-body pre { background: var(--bg-surface-subtle); padding: 16px; border-radius: 5px; margin: 8px 0 20px; }
.step-dialog-body h3 { font-size: 12px; margin-top: 15px; font-weight: 400; }
.step-dialog-body p { font-size: 12px; color: var(--text-muted); line-height: 1.8; }
.toast { position: fixed; bottom: 58px; left: 50%; transform: translateX(-50%); background: var(--text-main); color: var(--bg-canvas); border-radius: 5px; font-size: 12px; padding: 13px 20px; z-index: 20; box-shadow: 0 5px 25px #25241f18; white-space: nowrap; }
@media (min-width: 901px) { .page-create { padding-top: clamp(72px, 10vh, 128px); } }
@media (min-width: 1500px) { .page-create { max-width: 1460px; padding-left: 48px; padding-right: 48px; grid-template-columns: 1fr 530px; column-gap: 170px; } .intro h1 { font-size: 60px; } .studio-sketch { height: 210px; width: 380px; margin: 16px 0 14px -12px; } .brief h2 { font-size: 33px; } .task-form { gap: 24px; } }
@media (max-height: 760px) and (min-width: 901px) { .intro h1 { font-size: 42px; } .studio-sketch { height: 130px; margin-top: 2px; } .brief h2 { font-size: 27px; margin: 6px 0 12px; } .input-modes { margin-bottom: 13px; } .task-form { gap: 12px; } .form-action .btn-primary { min-height: 44px; } .page-process, .page-evidence { padding-top: 20px; } .page-heading { padding-bottom: 16px; } .page-heading h2 { font-size: 29px; } }
@media (max-width: 1120px) { .site-header { gap: 16px; } .page-nav { gap: 23px; } .page-create { padding-left: 40px; padding-right: 40px; gap: 55px; grid-template-columns: minmax(290px, 1fr) minmax(350px, 1.1fr); } .page-process, .page-evidence { padding-left: 40px; padding-right: 40px; } .work-body { grid-template-columns: 220px 1fr; } }
@media (max-width: 900px) { .page-create { grid-template-columns: 1fr; padding: 22px 28px; max-width: 600px; } .intro { display: none; } .brief { align-self: center; } .site-header { grid-template-columns: 1fr auto; padding: 0 24px; gap: 12px; } .page-nav { gap: 20px; } .brand { gap: 8px; font-size: 12px; } .brand b { font-size: 17px; } .brand-divider { margin: 0 5px; } .brand-mark { width: 25px; height: 25px; } .work-body { grid-template-columns: 190px 1fr; } .work-summary { padding-right: 20px; } .work-summary h2 { font-size: 23px; } .stage-title-group b { font-size: 18px; } .bot-grid { column-gap: 14px; padding-left: 0; padding-right: 0; } .bot-connector { left: calc(50% + 43px); width: calc(100% - 60px); } .bot-node:nth-child(n+5) .bot-connector { right: calc(50% + 43px); } }
@media (max-width: 600px) {
  body { grid-template-rows: 100px minmax(0, 1fr); }
  .site-header { padding: 0 20px; grid-template-columns: 1fr auto; grid-template-rows: 51px 49px; gap: 0; }
  .header-actions { grid-column: 2; grid-row: 1; justify-self: end; }
  .page-nav { grid-column: 1 / -1; grid-row: 2; }
  .brand { font-size: 12px; } .brand b { font-size: 18px; } .brand-mark { width: 24px; height: 24px; }
  .page-nav { justify-content: space-between; gap: 12px; } .page-nav button { font-size: 12px; } .nav-indicator { top: 11px; }
  .page-create { padding: 16px 22px; } .brief { padding: 0; } .brief h2 { font-size: 25px; margin: 5px 0 15px; } .input-modes { gap: 24px; margin-bottom: 18px; }
  .input-modes button { font-size: 11px; padding-bottom: 10px; } .task-form { gap: 17px; }
  input, select, textarea { font-size: 12px; padding: 10px 11px; } label, legend { font-size: 11px; margin-bottom: 7px; }
  .label-row span { font-size: 9px; } .field-pair { gap: 11px; } .platform-options { gap: 7px; }
  .platform-options button { font-size: 10px; height: 59px; gap: 6px; } .platform-options .icon { width: 16px; height: 16px; }
  .brief-options .text-button { font-size: 11px; } .brief-options > span { font-size: 9px; }
  .form-action { padding-top: 1px; } .form-action .btn-primary { min-height: 43px; } #scene-description { height: 97px; } .page-process, .page-evidence { padding: 20px 20px 12px; } .page-heading { gap: 10px; padding-bottom: 16px; }
  .page-heading h2 { font-size: 24px; } .page-heading .btn-secondary { font-size: 10px; padding: 7px 9px; min-height: 32px; } .page-heading .text-button { font-size: 10px; }
  .process-meta { min-height: 29px; padding-bottom: 9px; } .runbar { gap: 7px; flex-wrap: wrap; }
  .runbar b { font-size: 11px; } .runbar-meta { font-size: 9px; } .process-meta > span { font-size: 9px; }
  .process-meta:has(.runbar:not([hidden])) > span { display: none; }
  .bot-grid { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, minmax(0, 1fr)); padding: 9px 12px; column-gap: 30px; row-gap: 5px; }
  .bot-node:nth-child(n) { grid-column: auto; grid-row: auto; }
  .bot-node:nth-child(3) { grid-column: 2; grid-row: 2; } .bot-node:nth-child(4) { grid-column: 1; grid-row: 2; }
  .bot-node:nth-child(7) { grid-column: 2; grid-row: 4; } .bot-node:nth-child(8) { grid-column: 1; grid-row: 4; }
  .bot-button { padding: 2px; } .bot-avatar { width: clamp(42px, 7vh, 65px); height: clamp(42px, 7vh, 65px); }
  .bot-name { font-size: 12px; margin-top: 4px; } .bot-role { font-size: 10px; margin-top: 3px; }
  .bot-check { width: 16px; height: 16px; border-width: 2px; right: 0; } .bot-check .icon { width: 9px; height: 9px; }
  .bot-node:nth-child(n) .bot-connector { left: calc(50% + 37px); right: auto; top: 24px; width: calc(100% - 45px); height: 14px; transform: none; }
  .bot-node:nth-child(3) .bot-connector, .bot-node:nth-child(7) .bot-connector { left: auto; right: calc(50% + 37px); transform: rotate(180deg); }
  .bot-node:nth-child(even) .bot-connector { top: calc(100% - 1px); left: calc(50% - 7px); width: 14px; height: 13px; transform: rotate(90deg); transform-origin: 7px 7px; }
  .process-footer { gap: 10px; padding-top: 9px; } .process-progress { width: 55px; } #progress-count { font-size: 9px; }
  .need-container { max-height: 125px; padding: 10px; } .need-container h3 { font-size: 12px; } .need-container p, .need-container li { font-size: 10px; }
  .page-work { padding: 16px 16px 12px; } .stage-bar { align-items: flex-start; flex-direction: column; gap: 12px; }
  .stage-heading { width: 100%; } .work-eyebrow { display: none; }
  .stage-title-group { width: 100%; gap: 10px; } .stage-title-group b { font-size: 22px; } .stage-title-group span { font-size: 11px; padding: 4px 7px; }
  .page-description { font-size: 12px; margin-top: 6px; }
  .stage-actions { width: 100%; } .stage-actions .btn-secondary { flex: 1; min-height: 38px; font-size: 12px; padding: 8px 12px; }
  .work-body { display: block; padding: 12px 0; } .work-summary { display: none; } .preview-backdrop { height: 100%; padding: 12px; border-radius: 6px; }
  .revise-bar { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 10px; } .revise-bar label { display: none; }
  .revise-bar input { min-height: 42px; font-size: 13px; padding: 9px; } .revise-bar .btn-primary { min-height: 42px; font-size: 12px; padding: 9px 12px; } .revise-bar .icon { display: none; }
  .empty-state h2, .empty-state h3 { font-size: 23px; } .empty-state p { font-size: 11px; }
  .evidence-preview-list li { grid-template-columns: 1fr; gap: 4px; padding: 12px 13px; }
  .process-content { padding: 4px; }
  .insights { padding: 0 12px 12px; }
  .insight-tabs { gap: 20px; } .insight-tabs button { font-size: 12px; } .insight-caption { flex-direction: column; gap: 6px; }
  .insight-caption h3 { font-size: 14px; } .insight-caption span { font-size: 12px; } .insight-pane { padding-top: 17px; padding-right: 0; }
  .dbg-content { font-size: 13px; } .dbg-content table { min-width: 560px; font-size: 12px; } th, td { padding: 10px; }
  .orchestration-explainer { padding: 16px 14px 15px; }
  .orchestration-heading h3 { font-size: 17px; }
  .orchestration-heading span { font-size: 10px; }
  .orchestration-intro { font-size: 12px; }
  .orchestration-sources { grid-template-columns: minmax(0, 1fr); }
  .orchestration-impact { grid-template-columns: 58px minmax(0, 1fr); gap: 8px; }
  .dimrow { grid-template-columns: 100px minmax(0, 1fr) 108px; gap: 10px; font-size: 10px; }
  .studio-dialog { width: calc(100vw - 28px); padding: 22px; max-height: calc(100dvh - 32px); }
  .dialog-heading h2 { font-size: 22px; } .dialog-heading { gap: 10px; } .dialog-copy { font-size: 10px; margin-bottom: 15px; }
  .presets-grid { gap: 0 16px; } .preset { padding: 16px 0; } .preset b { font-size: 11px; line-height: 1.6; } .preset span { font-size: 9px; line-height: 1.6; }
  .options-fields { gap: 18px; margin-top: 22px; } .toast { bottom: 45px; padding: 11px 15px; font-size: 10px; }
}
@media (max-width: 600px) and (max-height: 700px) { .page-create { padding-top: 10px; padding-bottom: 10px; } .brief h2 { font-size: 23px; margin-bottom: 10px; } .input-modes { margin-bottom: 13px; } .task-form { gap: 13px; } .platform-options button { height: 54px; } label, legend { margin-bottom: 6px; } .page-process { padding-top: 14px; } .page-heading { padding-bottom: 11px; } }
@media (max-width: 600px) and (max-height: 580px) { body { grid-template-rows: 78px minmax(0, 1fr); } .site-header { grid-template-rows: 38px 40px; } .brief-top { display: none; } .brief h2 { margin-top: 0; font-size: 20px; } .task-form { gap: 10px; } input, select { padding-top: 7px; padding-bottom: 7px; } .platform-options button { height: 44px; flex-direction: row; gap: 5px; } .platform-options .icon { display: none; } #scene-description { height: 70px; } }
/* A short, quiet opening. The workspace keeps its original compact layout. */
.welcome { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: var(--bg-canvas); padding: 32px; transition: opacity .35s ease, visibility .35s; }
.welcome-content { width: min(100%, 620px); padding-bottom: 24px; }
.welcome-logo { display: block; margin-bottom: 30px; opacity: 0; animation: welcome-reveal .8s ease forwards; }
.welcome h1 { font: 400 clamp(44px, 7vw, 76px)/1.4 var(--font-serif); letter-spacing: .07em; opacity: 0; animation: welcome-reveal .8s .15s ease forwards; }
.welcome p { max-width: 470px; margin-top: 24px; font-size: 15px; line-height: 2; color: var(--text-muted); opacity: 0; animation: welcome-reveal .8s .3s ease forwards; }
.welcome-enter { display: flex; align-items: center; justify-content: space-between; gap: 56px; padding: 12px 0; margin-top: 45px; color: var(--text-main); font-size: 13px; opacity: 0; animation: welcome-reveal .8s .5s ease forwards; }
.welcome-enter:focus-visible { outline: none; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 7px; }
.welcome-enter:hover { color: var(--text-muted); }
.welcome-enter:hover span { transform: translate(2px, -2px); }
.welcome-enter span { transition: transform .2s ease; }
.welcome-edition { position: absolute; bottom: 26px; left: 32px; color: var(--text-muted); font-size: 10px; letter-spacing: .08em; }
.welcome.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes welcome-reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 900px) {
  .site-header { position: relative; }
  .session-exit { position: absolute; right: 24px; top: 17px; }
  .page-create { overflow-y: auto; overscroll-behavior: contain; }
}
@media (max-width: 600px) {
  .session-exit { right: 20px; top: 20px; }
  .welcome { padding: 36px; }
  .welcome-logo { width: 52px; height: 52px; margin-bottom: 24px; }
  .welcome p { font-size: 13px; margin-top: 19px; }
  .welcome-enter { margin-top: 34px; }
  .welcome-edition { left: 36px; }
}
@media (prefers-reduced-motion: reduce) { .welcome-logo, .welcome h1, .welcome p, .welcome-enter { opacity: 1; animation: none; } }
