:root {
  --ink: #1f2826;
  --ink-soft: #5d6965;
  --paper: #f5f3ed;
  --panel: #fffefb;
  --line: #deddd6;
  --line-strong: #c9cbc4;
  --green: #176b54;
  --green-dark: #0f4d3d;
  --green-soft: #e3eee8;
  --orange: #c97935;
  --orange-soft: #f3e8dc;
  --blueprint: #9bb3a9;
  --danger: #b24b3d;
  --shadow: 0 18px 48px rgba(25, 39, 34, 0.08);
  --sidebar: 236px;
  --topbar: 68px;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { width: 100%; min-height: 100%; margin: 0; }
body { overflow: hidden; background: var(--paper); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, select { cursor: pointer; }
.hidden { display: none !important; }

.app-shell {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  grid-template-rows: var(--topbar) 1fr;
}

.topbar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr) auto;
  align-items: center;
  height: var(--topbar);
  padding-right: 18px;
  background: rgba(255, 254, 251, 0.96);
  border-bottom: 1px solid var(--line);
  z-index: 20;
}

.brand {
  height: 100%;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  border-right: 1px solid var(--line);
}

.brand-mark { width: 34px; height: 34px; position: relative; display: block; }
.brand-mark i { position: absolute; display: block; background: var(--green); }
.brand-mark i:nth-child(1) { left: 2px; bottom: 3px; width: 8px; height: 25px; }
.brand-mark i:nth-child(2) { left: 13px; bottom: 3px; width: 8px; height: 31px; }
.brand-mark i:nth-child(3) { left: 24px; bottom: 3px; width: 8px; height: 18px; }
.brand strong { display: block; font-family: "Songti SC", serif; font-size: 21px; line-height: 1; letter-spacing: .12em; }
.brand small { display: block; margin-top: 5px; font-size: 7px; color: var(--ink-soft); letter-spacing: .16em; }

.project-crumb { min-width: 0; padding: 0 24px; display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-soft); }
.project-crumb strong { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-crumb b { color: var(--line-strong); font-weight: 400; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.service-state { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 30px; font-size: 11px; color: var(--ink-soft); background: var(--panel); }
.service-state i, .online-chip i { width: 7px; height: 7px; border-radius: 50%; background: #a6aaa7; }
.service-state.online i, .online-chip i { background: #46a37c; box-shadow: 0 0 0 3px rgba(70, 163, 124, .12); }
.icon-button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); }
.account-button { min-width: 170px; padding: 5px 9px 5px 6px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel); border-radius: 9px; text-align: left; }
.account-button .avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; background: var(--green); color: white; font-size: 12px; }
.account-button strong, .account-button small { display: block; }
.account-button strong { font-size: 11px; }
.account-button small { margin-top: 2px; font-size: 9px; color: var(--ink-soft); }
.account-button i { margin-left: auto; font-style: normal; color: var(--ink-soft); }

.sidebar {
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
  padding: 18px 14px 14px;
  display: flex;
  flex-direction: column;
  background: #ecebe5;
  border-right: 1px solid var(--line);
}

.new-project-button { width: 100%; height: 42px; border: 0; border-radius: 7px; color: white; background: var(--green); font-size: 13px; font-weight: 650; box-shadow: 0 7px 18px rgba(23, 107, 84, .18); }
.new-project-button:hover, .primary-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.new-project-button span { margin-right: 5px; font-size: 17px; font-weight: 300; }
.primary-nav { margin-top: 18px; display: grid; gap: 4px; }
.nav-item { padding: 10px 11px; display: flex; gap: 10px; align-items: center; border: 0; border-radius: 6px; background: transparent; color: #626c68; text-align: left; font-size: 12px; }
.nav-item span { width: 17px; color: #7c8782; text-align: center; font-size: 15px; }
.nav-item:hover { background: rgba(255,255,255,.55); color: var(--ink); }
.nav-item.active { background: var(--panel); color: var(--ink); box-shadow: 0 1px 4px rgba(25,39,34,.06); }
.nav-item.active span { color: var(--green); }
.sidebar-section { min-height: 0; margin-top: 24px; display: flex; flex: 1; flex-direction: column; }
.section-label { padding: 0 7px 8px; display: flex; align-items: center; justify-content: space-between; color: #838b87; font-size: 9px; text-transform: uppercase; letter-spacing: .13em; }
.section-label button { border: 0; background: none; color: #9a9f9d; font-size: 9px; }
.project-list { min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 4px; }
.project-list-empty { padding: 13px 10px; color: #929894; font-size: 10px; line-height: 1.6; }
.project-list-item { width: 100%; padding: 9px; display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 9px; align-items: center; border: 0; border-radius: 6px; background: transparent; text-align: left; }
.project-list-item:hover, .project-list-item.active { background: rgba(255,255,255,.72); }
.project-list-item .project-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 5px; background: #d8dfda; color: var(--green); font-family: serif; font-size: 13px; }
.project-list-item strong, .project-list-item small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-list-item strong { font-size: 10px; font-weight: 650; }
.project-list-item small { margin-top: 3px; font-size: 8px; color: #8a928e; }
.sidebar-foot { padding: 12px 7px 0; border-top: 1px solid #d7d7d1; }
.environment-badge { display: inline-block; padding: 3px 5px; border-radius: 3px; background: #d8dfda; color: var(--green); font-size: 7px; letter-spacing: .14em; }
.sidebar-foot p { margin: 6px 0 0; color: #8a918d; font-size: 8px; line-height: 1.5; }

.workspace { grid-column: 2; grid-row: 2; min-width: 0; min-height: 0; overflow: auto; }
.empty-state { min-height: 100%; position: relative; display: grid; place-items: center; overflow: hidden; }
.empty-grid, .canvas-grid { position: absolute; inset: 0; opacity: .42; background-image: linear-gradient(rgba(45,65,57,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(45,65,57,.055) 1px, transparent 1px); background-size: 40px 40px; }
.empty-grid::after { content: ""; position: absolute; width: 420px; height: 420px; top: 50%; left: 50%; border: 1px solid rgba(23,107,84,.12); transform: translate(-50%,-50%) rotate(45deg); }
.empty-content { width: min(680px, 80%); position: relative; text-align: center; }
.eyebrow { color: var(--green); font-size: 8px; font-weight: 750; letter-spacing: .22em; }
.empty-content h1 { margin: 20px 0 18px; font-family: "Songti SC", "STSong", serif; font-size: clamp(38px, 4vw, 60px); font-weight: 500; letter-spacing: -.03em; line-height: 1.18; }
.empty-content > p { max-width: 560px; margin: 0 auto; color: var(--ink-soft); font-size: 13px; line-height: 1.8; }
.empty-actions { margin-top: 29px; display: flex; justify-content: center; gap: 13px; }
.primary-button, .secondary-button, .text-button { min-height: 38px; padding: 0 18px; border-radius: 6px; transition: .18s ease; }
.primary-button { border: 1px solid var(--green); background: var(--green); color: white; font-size: 11px; font-weight: 650; }
.secondary-button { border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); font-size: 11px; }
.secondary-button:hover { border-color: var(--green); color: var(--green); }
.text-button { border: 0; background: transparent; color: var(--green); font-size: 11px; }
.capability-row { margin-top: 52px; display: flex; align-items: center; justify-content: center; gap: 14px; color: #808984; font-size: 9px; letter-spacing: .08em; }
.capability-row i { width: 28px; height: 1px; background: #bdc4c0; }

.project-workspace { min-height: 100%; padding: 23px 25px 26px; display: flex; flex-direction: column; }
.workspace-head { display: flex; justify-content: space-between; align-items: end; }
.workspace-head h1 { margin: 7px 0 4px; font-family: "Songti SC", serif; font-size: 27px; font-weight: 550; }
.workspace-head p { margin: 0; color: var(--ink-soft); font-size: 10px; }
.workspace-actions { display: flex; gap: 8px; }
.workflow-strip { height: 65px; margin: 18px 0 14px; padding: 0 19px; display: flex; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.workflow-step { min-width: 130px; display: flex; align-items: center; gap: 10px; opacity: .42; }
.workflow-step.active, .workflow-step.done { opacity: 1; }
.workflow-step b { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 8px; }
.workflow-step.active b { border-color: var(--green); background: var(--green); color: white; }
.workflow-step.done b { border-color: var(--green); color: var(--green); }
.workflow-step strong, .workflow-step small { display: block; }
.workflow-step strong { font-size: 10px; }
.workflow-step small { margin-top: 3px; color: var(--ink-soft); font-size: 8px; }
.workflow-line { height: 1px; min-width: 30px; flex: 1; margin: 0 12px; background: var(--line); }
.workbench-grid { min-height: 560px; flex: 1; display: grid; grid-template-columns: minmax(260px, 24%) minmax(480px, 1fr) var(--inspector, minmax(210px, 19%)); gap: 11px; }
.panel { min-height: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }

.agent-panel { display: flex; flex-direction: column; }
.panel-title { height: 59px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-title > div { display: flex; align-items: center; gap: 9px; }
.agent-symbol, .message-avatar { display: grid; place-items: center; background: var(--green); color: white; font-family: "Songti SC", serif; }
.agent-symbol { width: 30px; height: 30px; border-radius: 7px; font-size: 13px; }
.panel-title strong, .panel-title small { display: block; }
.panel-title strong { font-size: 10px; }
.panel-title small { margin-top: 3px; font-size: 8px; color: var(--ink-soft); }
.online-chip { display: flex; align-items: center; gap: 5px; color: #4b7464; font-size: 8px; }
.conversation { min-height: 160px; flex: 1; padding: 15px 13px; overflow-y: auto; }
.message { margin-bottom: 15px; display: flex; gap: 8px; align-items: flex-start; }
.message-avatar { width: 23px; height: 23px; flex: 0 0 auto; border-radius: 5px; font-size: 9px; }
.message > div { max-width: calc(100% - 31px); }
.message p { margin: 0; padding: 10px 11px; border-radius: 3px 9px 9px 9px; background: #eff3f0; font-size: 10px; line-height: 1.65; }
.message time { margin-top: 4px; display: block; color: #a0a5a2; font-size: 7px; }
.user-message { flex-direction: row-reverse; }
.user-message .message-avatar { background: #d5d9d6; color: var(--ink); }
.user-message p { border-radius: 9px 3px 9px 9px; background: var(--green); color: white; }
.user-message time { text-align: right; }
.quick-prompts { padding: 0 12px 8px; display: flex; gap: 5px; flex-wrap: wrap; }
.quick-prompts button { padding: 5px 8px; border: 1px solid var(--line); border-radius: 20px; background: white; color: var(--ink-soft); font-size: 8px; }
.quick-prompts button:hover { border-color: var(--green); color: var(--green); }
.composer { margin: 0 10px 10px; padding: 9px; border: 1px solid var(--line-strong); border-radius: 7px; background: white; }
.composer:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,107,84,.08); }
.composer textarea { width: 100%; resize: none; border: 0; outline: 0; color: var(--ink); font-size: 10px; line-height: 1.5; }
.composer textarea::placeholder { color: #a0a6a3; }
.composer-row { margin-top: 6px; display: flex; align-items: center; gap: 7px; color: #a0a5a2; font-size: 7px; }
.attach-button { padding: 0; border: 0; background: none; color: var(--ink-soft); font-size: 8px; }
.send-button { width: 27px; height: 27px; margin-left: auto; border: 0; border-radius: 6px; background: var(--green); color: white; }

.canvas-panel { display: flex; flex-direction: column; }
.canvas-toolbar { height: 47px; padding: 0 11px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.view-tabs { height: 100%; display: flex; }
.view-tabs button { padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--ink-soft); font-size: 9px; }
.view-tabs button.active { border-bottom-color: var(--green); color: var(--ink); font-weight: 650; }
.canvas-tools { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.canvas-tools button, .canvas-tools span { min-width: 25px; height: 25px; display: grid; place-items: center; border: 0; border-right: 1px solid var(--line); background: white; font-size: 9px; }
.canvas-tools span { min-width: 40px; color: var(--ink-soft); font-size: 8px; }
.canvas-tools button:last-child { border-right: 0; }
.canvas { min-height: 0; flex: 1; position: relative; overflow: auto; background: #f7f6f1; }
.canvas-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; }
.plan-placeholder { width: 130px; height: 100px; position: relative; margin-bottom: 18px; border: 1px solid #b8c3bd; background: rgba(255,255,255,.5); transform: rotate(-2deg); }
.plan-placeholder::before, .plan-placeholder::after, .plan-placeholder span, .plan-placeholder i, .plan-placeholder b { content: ""; position: absolute; display: block; border: 1px solid var(--blueprint); }
.plan-placeholder::before { width: 38px; height: 42px; left: 17px; top: 20px; }
.plan-placeholder::after { width: 45px; height: 27px; right: 15px; bottom: 15px; }
.plan-placeholder span { width: 71px; height: 8px; left: 9px; bottom: 8px; border-width: 1px 0 0; transform: rotate(-13deg); }
.plan-placeholder i { width: 20px; height: 20px; right: 18px; top: 12px; border-radius: 50%; }
.plan-placeholder b { width: 18px; height: 31px; left: 62px; top: 10px; border-width: 0 0 1px 1px; transform: rotate(22deg); }
.canvas-empty h2 { margin: 0; font-family: "Songti SC", serif; font-size: 17px; font-weight: 500; }
.canvas-empty p { margin: 7px 0 17px; color: var(--ink-soft); font-size: 9px; }
.strategy-board { position: relative; min-width: 720px; padding: 24px; display: grid; grid-template-columns: repeat(2, minmax(290px, 1fr)); gap: 16px; }
.strategy-card { position: relative; padding: 17px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.92); box-shadow: 0 9px 25px rgba(27,43,37,.055); transition: .18s ease; }
.strategy-card:hover { border-color: #9fb4aa; transform: translateY(-2px); }
.strategy-card.selected { border-color: var(--green); box-shadow: 0 0 0 2px rgba(23,107,84,.1), 0 12px 28px rgba(27,43,37,.08); }
.strategy-card-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.strategy-index { color: var(--orange); font-family: serif; font-size: 11px; letter-spacing: .13em; }
.strategy-card h3 { margin: 5px 0 0; font-family: "Songti SC", serif; font-size: 17px; font-weight: 550; }
.strategy-card .select-chip { padding: 5px 8px; border: 1px solid var(--line); border-radius: 20px; background: white; color: var(--ink-soft); font-size: 8px; }
.strategy-card.selected .select-chip { border-color: var(--green); background: var(--green); color: white; }
.concept-only-notice { min-height: 86px; margin: 15px 0; padding: 18px; display: grid; place-content: center; text-align: center; border: 1px dashed #c8cfca; background: #f3f4f0; }
.concept-only-notice b, .concept-only-notice span { display: block; }
.concept-only-notice b { color: #69756f; font-size: 10px; }
.concept-only-notice span { margin-top: 7px; color: var(--ink-soft); font-size: 8px; }
.massing-sketch { height: 110px; margin: 15px 0; position: relative; overflow: hidden; background: #eef0eb; border: 1px solid #e0e3de; }
.massing-sketch::before, .massing-sketch::after { content: ""; position: absolute; bottom: 19px; background: #82958c; box-shadow: inset -8px -7px 0 rgba(23,48,39,.08); transform: skewY(-8deg); }
.massing-sketch::before { width: 42%; height: 50px; left: 9%; }
.massing-sketch::after { width: 31%; height: 72px; right: 10%; }
.strategy-card:nth-child(2) .massing-sketch::before { width: 27%; height: 75px; }
.strategy-card:nth-child(2) .massing-sketch::after { width: 48%; height: 40px; }
.strategy-card:nth-child(3) .massing-sketch::before { width: 65%; height: 38px; }
.strategy-card:nth-child(3) .massing-sketch::after { width: 18%; height: 85px; }
.strategy-summary { margin: 0; min-height: 48px; color: var(--ink-soft); font-size: 9px; line-height: 1.65; }
.strategy-tags { margin-top: 12px; display: flex; gap: 5px; flex-wrap: wrap; }
.strategy-tags span { padding: 4px 6px; background: var(--green-soft); color: var(--green-dark); border-radius: 3px; font-size: 7px; }
.strategy-risk { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: #8b7160; font-size: 8px; line-height: 1.5; }
.masterplan-card, .condition-board, .comparison-board { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.96); box-shadow: 0 9px 25px rgba(27,43,37,.055); }
.masterplan-card { padding: 18px; }
.masterplan-card-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.masterplan-card-head h3 { margin: 6px 0 3px; font-family: "Songti SC", serif; font-size: 19px; font-weight: 550; }
.masterplan-card-head p { margin: 0; color: var(--ink-soft); font-size: 8px; }
.scheme-narrative { margin: 12px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #dfe5df; background: #f5f8f5; }
.scheme-narrative > div { min-width: 0; padding: 10px 12px; border-right: 1px solid #dfe5df; }
.scheme-narrative > div:last-child { border-right: 0; }
.scheme-narrative b { color: var(--green-dark); font-size: 8px; }
.scheme-narrative p { margin: 5px 0 0; color: #405048; font-size: 8px; line-height: 1.65; }
.review-chip { padding: 6px 9px; border-radius: 20px; font-size: 8px; white-space: nowrap; }
.review-chip.pass { background: var(--green-soft); color: var(--green-dark); }
.review-chip.fail { background: var(--orange-soft); color: #92572c; }
.masterplan-layout { margin-top: 15px; display: grid; grid-template-columns: minmax(420px, 1.6fr) minmax(210px, .7fr); gap: 16px; }
.plan-sheet { min-height: 460px; padding: 16px; display: grid; place-items: center; border: 1px solid #d9ddd8; background: #fbfbf8; }
.masterplan-svg { width: 100%; height: 440px; overflow: visible; }
.plan-basemap { pointer-events: none; }
.plan-site-fill { fill: rgba(244, 242, 235, .48); stroke: none; }
.plan-boundary { fill: rgba(255,255,255,.38); stroke: #b64d3f; stroke-width: 1.15; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; }
.plan-feature { vector-effect: non-scaling-stroke; }
.feature-buildable_area { fill: rgba(122,161,117,.11); stroke: #6f977c; stroke-width: .9; stroke-dasharray: 4 2; }
.feature-road { fill: #deddd8; stroke: #a09f99; stroke-width: .65; }
.feature-no_build_zone, .feature-high_voltage_corridor, .feature-surrounding_obstacle { fill: rgba(190,107,63,.13); stroke: #b96c43; stroke-width: .8; }
.feature-water { fill: rgba(115,165,184,.24); stroke: #6d9daf; stroke-width: .8; }
.plan-circulation { fill: none; stroke: #ddd8ce; stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.plan-circulation-branch { fill: none; stroke: #e7e2d9; stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.plan-landscape circle { fill: rgba(126,165,112,.48); stroke: rgba(80,126,74,.35); stroke-width: .45; vector-effect: non-scaling-stroke; }
.plan-building { fill: #748f83; stroke: #263d35; stroke-width: 1; vector-effect: non-scaling-stroke; filter: drop-shadow(0 1px 1px rgba(35,45,40,.18)); }
.plan-building.use-residential_highrise { fill: #8bc3c0; }
.plan-building.use-residential_midrise { fill: #e5ba86; }
.plan-building.use-commercial { fill: #c88a55; }
.plan-building.use-community_service { fill: #d7b97a; }
.building-wing { stroke: rgba(38,61,53,.72); stroke-width: .6; vector-effect: non-scaling-stroke; }
.building-core { fill: #fffdf6; stroke: #263d35; stroke-width: .55; vector-effect: non-scaling-stroke; }
.building-label { fill: #fff; font-size: 3.2px; font-weight: 750; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.north-arrow path { fill: none; stroke: #26332e; stroke-width: 1; vector-effect: non-scaling-stroke; }
.north-arrow text { fill: #26332e; font-size: 5px; font-weight: 800; text-anchor: middle; }
.scale-bar path { fill: none; stroke: #26332e; stroke-width: 1; vector-effect: non-scaling-stroke; }
.scale-bar text { fill: #26332e; font-size: 4px; text-anchor: middle; }
.plan-output-actions { margin-top: 12px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.plan-output-actions span { margin-right: auto; color: var(--ink-soft); font-size: 7px; }
.plan-output-actions button { border: 1px solid #cfd7d1; border-radius: 4px; padding: 7px 10px; background: #fff; color: var(--green-dark); font-size: 8px; cursor: pointer; }
.plan-output-actions button:hover { border-color: var(--green); background: var(--green-soft); }
.plan-error { color: var(--danger); font-size: 10px; }
.metric-stack { display: flex; flex-direction: column; gap: 12px; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.metric-grid > div, .condition-grid > div { min-width: 0; padding: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric-grid > div:nth-child(2n) { border-right: 0; }
.metric-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.metric-grid span, .condition-grid span { display: block; color: var(--ink-soft); font-size: 7px; }
.metric-grid strong, .condition-grid strong { margin-top: 5px; display: block; color: var(--ink); font-size: 10px; overflow-wrap: anywhere; }
.prescreen-list { border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.prescreen-list > div { padding: 9px 10px; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; border-bottom: 1px solid var(--line); }
.prescreen-list > div:last-child { border-bottom: 0; }
.prescreen-list span { font-size: 8px; font-weight: 650; }
.prescreen-list b { font-size: 8px; }
.prescreen-list small { grid-column: 1 / -1; color: var(--ink-soft); font-size: 7px; line-height: 1.4; }
.status-pass { color: #2e7959; }
.status-fail { color: var(--danger); }
.status-not_checked { color: #8b7160; }
.plan-legend { padding: 9px; display: flex; gap: 9px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 5px; }
.plan-legend span { display: flex; align-items: center; gap: 4px; color: var(--ink-soft); font-size: 7px; }
.plan-legend i { width: 13px; height: 8px; display: inline-block; border: 1px solid; }
.legend-redline { border-color: #b64d3f !important; background: white; }
.legend-buildable { border-color: #50866d !important; background: rgba(79,133,104,.08); }
.legend-building { border-color: #264f40 !important; background: #748f83; }
.legend-highrise { border-color: #355a4e !important; background: #55756a; }
.legend-midrise { border-color: #769589 !important; background: #9bb3a8; }
.legend-road { border-color: #8c8e89 !important; background: #d9d8d1; }
.unverified-list { margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); color: #7f6a5b; font-size: 8px; }
.unverified-list summary { cursor: pointer; font-weight: 700; }
.unverified-list p { margin: 7px 0 0; line-height: 1.5; }
.condition-board, .comparison-board { padding: 22px; }
.board-heading span { color: var(--orange); font-family: serif; font-size: 9px; letter-spacing: .14em; }
.board-heading h3 { margin: 5px 0 4px; font-family: "Songti SC", serif; font-size: 21px; font-weight: 550; }
.board-heading p { margin: 0; color: var(--ink-soft); font-size: 9px; line-height: 1.6; }
.condition-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.condition-grid > div:nth-child(4n) { border-right: 0; }
.condition-grid > div:nth-last-child(-n+4) { border-bottom: 0; }
.condition-detail { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 5px; }
.condition-detail h4 { margin: 0 0 9px; font-size: 9px; }
.condition-detail p { margin: 0; padding: 7px 0; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); font-size: 8px; }
.condition-detail p span { color: var(--ink-soft); text-align: right; }
.comparison-table-wrap { margin-top: 18px; overflow-x: auto; }
.comparison-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 8px; }
.comparison-table th, .comparison-table td { padding: 10px 8px; border: 1px solid var(--line); text-align: right; white-space: nowrap; }
.comparison-table th:first-child, .comparison-table td:first-child { text-align: left; }
.comparison-table th { background: #f0f2ee; color: var(--ink-soft); font-weight: 650; }
.generation-issues { margin-top: 15px; padding: 12px; border-radius: 5px; background: var(--orange-soft); color: #805c44; }
.generation-issues strong { font-size: 9px; }
.generation-issues p { margin: 6px 0 0; font-size: 8px; }
.render-gallery { grid-column: 1 / -1; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--line); }
.render-gallery-head { margin-bottom: 12px; display: flex; align-items: end; justify-content: space-between; }
.render-gallery-head span { color: var(--orange); font-family: serif; font-size: 9px; letter-spacing: .15em; }
.render-gallery-head h3 { margin: 4px 0 0; font-family: "Songti SC", serif; font-size: 18px; font-weight: 550; }
.render-gallery-head small { color: var(--ink-soft); font-size: 8px; }
.render-grid { display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 14px; }
.render-card { min-height: 220px; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: white; }
.render-card img { width: 100%; aspect-ratio: 16 / 10; display: block; object-fit: cover; background: #e8ebe6; }
.render-card figcaption { padding: 10px 12px; display: flex; justify-content: space-between; gap: 10px; }
.render-card figcaption strong { font-size: 9px; }
.render-card figcaption span { color: var(--ink-soft); font-size: 7px; }
.render-placeholder { min-height: 220px; display: grid; place-content: center; justify-items: center; color: var(--ink-soft); }
.render-placeholder i { width: 24px; height: 24px; margin-bottom: 10px; border: 2px solid #d2d8d4; border-top-color: var(--green); border-radius: 50%; animation: render-spin 1s linear infinite; }
.render-placeholder strong { color: var(--ink); font-size: 10px; }
.render-placeholder span { margin-top: 5px; font-size: 8px; }
.render-card.failed .render-placeholder i { border: 0; animation: none; }
.render-card.failed .render-placeholder i::before { content: "!"; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--orange-soft); color: var(--orange); font-style: normal; font-weight: 800; }
@keyframes render-spin { to { transform: rotate(360deg); } }

.inspector-panel { display: flex; flex-direction: column; }
.inspector-head { height: 47px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.inspector-head strong { font-size: 10px; }
.inspector-head span { padding: 4px 7px; border-radius: 10px; background: #eceeea; color: var(--ink-soft); font-size: 7px; }
.inspector-block { padding: 13px; border-bottom: 1px solid var(--line); }
.inspector-block > label { display: block; margin-bottom: 9px; color: #8b928f; font-size: 8px; letter-spacing: .08em; }
.current-task { padding: 9px; border-left: 2px solid var(--orange); background: var(--orange-soft); }
.current-task b, .current-task small { display: block; }
.current-task b { font-size: 9px; }
.current-task small { margin-top: 4px; color: #8d7867; font-size: 7px; line-height: 1.5; }
.constraint-list { display: grid; gap: 6px; }
.constraint-list p { margin: 0; color: #989e9b; font-size: 8px; }
.constraint-item { padding: 7px 7px 7px 22px; position: relative; border: 1px solid var(--line); border-radius: 4px; font-size: 8px; line-height: 1.45; }
.constraint-item::before { content: "✓"; position: absolute; left: 7px; top: 7px; color: var(--green); font-weight: 800; }
.agent-status-list { display: grid; gap: 10px; }
.agent-status-list div { display: grid; grid-template-columns: 1fr 7px auto; gap: 7px; align-items: center; font-size: 8px; }
.agent-status-list i { width: 6px; height: 6px; border-radius: 50%; background: #aeb3b0; }
.agent-status-list i.running { background: var(--orange); box-shadow: 0 0 0 3px rgba(201,121,53,.12); }
.agent-status-list i.done { background: #47a37c; }
.agent-status-list b { color: #89908d; font-size: 7px; font-weight: 500; }
.inspector-actions { margin-top: auto; padding: 12px; }
.action-hint { margin: 8px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.full { width: 100%; }

.modal { width: min(600px, calc(100vw - 40px)); padding: 0; border: 0; border-radius: 10px; background: var(--panel); box-shadow: 0 28px 90px rgba(20,31,27,.25); }
.modal::backdrop { background: rgba(26,35,32,.45); backdrop-filter: blur(3px); }
.large-modal { width: min(820px, calc(100vw - 40px)); max-height: calc(100vh - 40px); overflow-y: auto; }
.compact-modal { width: min(440px, calc(100vw - 40px)); }
.modal form { padding: 23px; }
.modal-head { margin-bottom: 21px; display: flex; justify-content: space-between; align-items: start; }
.modal-head h2 { margin: 6px 0 0; font-family: "Songti SC", serif; font-size: 22px; font-weight: 550; }
.close-button { width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--ink-soft); font-size: 18px; line-height: 1; }
.form-grid { display: grid; gap: 14px; }
.brief-input-block { display: grid; gap: 9px; }
.brief-input-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink-soft); font-size: 9px; }
.brief-input-actions .secondary-button { flex: 0 0 auto; }
.brief-summary { margin-top: 15px; padding: 13px 14px; border: 1px solid #bed8cf; border-radius: 7px; background: var(--green-soft); color: var(--green-dark); }
.brief-summary.error { border-color: #d9aaa0; background: #fff4f1; color: var(--danger); }
.brief-summary strong, .brief-summary p { display: block; margin: 0; }
.brief-summary strong { font-size: 11px; }
.brief-summary p { margin-top: 5px; font-size: 9px; line-height: 1.65; }
.brief-summary-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.brief-summary-grid span { padding: 8px; border: 1px solid rgba(23,107,84,.16); border-radius: 5px; background: rgba(255,255,255,.62); color: var(--ink-soft); font-size: 8px; line-height: 1.5; }
.brief-summary-grid b { display: block; color: var(--ink); font-size: 10px; }
.brief-summary-grid i { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 7.5px; font-style: normal; line-height: 1.5; }
.advanced-settings { margin-top: 14px; border: 1px solid var(--line); border-radius: 7px; background: #fbfbf8; }
.advanced-settings > summary { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; color: var(--ink); font-size: 10px; font-weight: 700; }
.advanced-settings > summary small { color: var(--ink-soft); font-size: 8px; font-weight: 500; }
.advanced-settings-grid { padding: 2px 14px 14px; }
.location-settings { margin-bottom: 14px; }
.modal-inline-error { scroll-margin: 24px; margin: 14px 0; padding: 12px 14px; border: 1px solid #d9aaa0; border-radius: 7px; background: #fff4f1; color: var(--danger); }
.modal-inline-error strong, .modal-inline-error p { display: block; margin: 0; }
.modal-inline-error strong { font-size: 11px; }
.modal-inline-error p { margin-top: 6px; font-size: 9px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.location-preview { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #f4f3ef; }
.location-preview-head { margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.location-preview-head strong, .location-preview-head small { display: block; }
.location-preview-head strong { font-size: 11px; }
.location-preview-head small { margin-top: 3px; color: var(--ink-soft); font-size: 8px; }
.location-preview-map { overflow: hidden; border: 1px solid rgba(38,54,50,.18); border-radius: 5px; background: #cbc8c3; }
.location-preview-map svg { width: 100%; height: auto; display: block; cursor: crosshair; }
.location-draw-tools { margin-top: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.location-draw-tools span { margin-right: auto; color: var(--ink-soft); font-size: 8px; }
.location-draw-tools button { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: 8px; cursor: pointer; }
.location-draw-tools button:last-child { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); font-weight: 700; }
.geometry-import-action button { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--green); font-weight: 700; cursor: pointer; }
.site-geometry-import-summary { scroll-margin: 24px; border: 1px solid #cfd8d2; border-radius: 12px; background: #f7faf8; padding: 14px; }
.site-geometry-import-summary h4 { margin: 0 0 6px; }
.site-geometry-import-summary p { margin: 4px 0; color: var(--muted); }
.site-geometry-import-summary .layer-mapping-grid { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr); gap: 8px 12px; margin-top: 12px; align-items: center; }
.site-geometry-import-summary select { min-height: 38px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 8px; }
.site-geometry-import-summary .geometry-confirmation { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; color: #7b4b2a; }
.geometry-preview .parcel { fill: rgba(23, 107, 84, 0.12); stroke: #176b54; stroke-width: 1.5; }
.geometry-preview .hole { fill: #fff; stroke: #c85b34; stroke-width: 1; stroke-dasharray: 4 3; }
.geometry-preview .feature { fill: rgba(95, 116, 134, 0.14); stroke: #667985; stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.geometry-preview polyline.feature { fill: none; }
.geometry-preview .feature-road_centerline,
.geometry-preview .feature-road_boundary { stroke: #8b6b4a; }
.geometry-preview .feature-water_boundary { fill: rgba(83, 151, 188, 0.22); stroke: #4b8dad; }
.geometry-preview .feature-no_build_zone { fill: rgba(176, 73, 50, 0.18); stroke: #a44b36; }
.geometry-preview .feature-entrance { fill: #d66a2c; stroke: #fff; }
.location-preview > p { margin: 8px 2px 0; color: var(--danger); font-size: 8px; line-height: 1.6; }
.status-chip { padding: 5px 8px; border-radius: 999px; background: #ece8dc; color: #765c31; font-size: 8px; white-space: nowrap; }
.status-chip.approved { background: var(--green-soft); color: var(--green-dark); }
.form-section-title { grid-column: 1 / -1; margin-top: 4px; padding: 9px 0 7px; display: flex; align-items: baseline; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.form-section-title strong { color: var(--green-dark); font-size: 10px; }
.form-section-title span { color: var(--ink-soft); font-size: 8px; text-align: right; }
.two-columns { grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: 6px; }
.field.wide { grid-column: 1 / -1; }
.field > span { color: var(--ink-soft); font-size: 9px; font-weight: 650; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line-strong); border-radius: 5px; background: #fbfbf8; color: var(--ink); outline: none; font-size: 11px; }
.field input, .field select { height: 39px; padding: 0 10px; }
.field textarea { padding: 9px 10px; resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,107,84,.08); }
.inline-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.field.checkbox-field { grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
.field.checkbox-field input { width: 15px; height: 15px; }
.field.checkbox-field > span { font-size: 9px; line-height: 1.6; }
.field .field-hint { color: var(--ink-soft); font-size: 7.5px; line-height: 1.5; }
.modal-note { margin-top: 17px; padding: 10px 11px; display: flex; gap: 8px; border-radius: 5px; background: #eef1ee; color: var(--ink-soft); }
.modal-note.accent { background: var(--green-soft); color: var(--green-dark); }
.modal-note i { width: 17px; height: 17px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; border: 1px solid currentColor; font-size: 8px; font-style: normal; }
.modal-note p { margin: 0; font-size: 8px; line-height: 1.6; }
.modal-actions { margin-top: 21px; display: flex; justify-content: flex-end; gap: 8px; }
#locationContextModal .modal-actions {
  position: sticky;
  bottom: -23px;
  z-index: 20;
  margin: 21px -23px -23px;
  padding: 14px 23px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  box-shadow: 0 -10px 24px rgba(20,31,27,.08);
  backdrop-filter: blur(8px);
}
.form-hint { color: var(--ink-soft); font-size: 9px; line-height: 1.6; }
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; justify-items: end; gap: 8px; }
.toast { width: min(380px, calc(100vw - 36px)); min-width: 270px; padding: 11px 13px; display: grid; grid-template-columns: 4px minmax(0, 1fr); gap: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: var(--shadow); animation: toast-in .22s ease; }
.toast::before { content: ""; border-radius: 3px; background: var(--green); }
.toast.error::before { background: var(--danger); }
.toast > div { min-width: 0; }
.toast strong, .toast span { display: block; }
.toast strong { font-size: 9px; }
.toast span { margin-top: 4px; color: var(--ink-soft); font-size: 8px; line-height: 1.5; overflow-wrap: anywhere; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1180px) {
  :root { --sidebar: 206px; }
  .workbench-grid { grid-template-columns: 280px minmax(460px,1fr); }
  .inspector-panel { display: none; }
  .workflow-step { min-width: 105px; }
}

@media (max-width: 860px) {
  body { overflow: auto; }
  .app-shell { min-height: 100vh; height: auto; grid-template-columns: 1fr; grid-template-rows: 60px auto 1fr; }
  .topbar { grid-template-columns: 1fr auto; height: 60px; padding-right: 10px; }
  .brand { border-right: 0; }
  .project-crumb, .service-state, .account-button > span, .account-button > i { display: none; }
  .account-button { min-width: 42px; width: 42px; }
  .sidebar { grid-row: 2; grid-column: 1; padding: 8px 10px; flex-direction: row; gap: 8px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .new-project-button { width: auto; min-width: 120px; }
  .primary-nav { margin: 0; display: flex; }
  .nav-item { white-space: nowrap; }
  .sidebar-section, .sidebar-foot { display: none; }
  .workspace { grid-row: 3; grid-column: 1; overflow: visible; }
  .project-workspace { padding: 16px 12px; }
  .workspace-head { align-items: start; gap: 15px; }
  .workspace-actions .secondary-button { display: none; }
  .workflow-strip { overflow-x: auto; }
  .workbench-grid { min-height: 900px; grid-template-columns: 1fr; grid-template-rows: 420px 560px; }
  .canvas-panel { grid-row: 1; }
  .agent-panel { grid-row: 2; }
  .strategy-board { min-width: 0; grid-template-columns: 1fr; }
  .render-grid { grid-template-columns: 1fr; }
  .masterplan-layout { grid-template-columns: 1fr; }
  .scheme-narrative { grid-template-columns: 1fr 1fr; }
  .scheme-narrative > div:nth-child(2) { border-right: 0; }
  .scheme-narrative > div:nth-child(-n+2) { border-bottom: 1px solid #dfe5df; }
  .plan-sheet { min-height: 300px; }
  .masterplan-svg { height: 290px; }
  .condition-grid { grid-template-columns: 1fr 1fr; }
  .condition-grid > div:nth-child(2n) { border-right: 0; }
  .two-columns { grid-template-columns: 1fr; }
  .field.wide { grid-column: 1; }
  .brief-input-actions { align-items: stretch; flex-direction: column; }
  .brief-summary-grid { grid-template-columns: 1fr 1fr; }
}

.plan-stage { display: grid; gap: 8px; }
/* 十个视角一行放不下，允许换行；标签用小字保持紧凑。 */
.plan-view-tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: #f1f1ec; justify-self: start; max-width: 100%; }
.plan-view-tabs button { padding: 5px 12px; border: 0; border-radius: 4px; background: transparent; color: var(--ink-soft); font-size: 9px; font-weight: 650; }
.plan-view-tabs button.active { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(25,39,34,.08); }

/* 流线图需要已审批路网，缺了就在图位上说明原因，不留空白。 */
.plan-empty { display: grid; place-content: center; min-height: 220px; padding: 24px; color: var(--ink-soft); font-size: 11px; text-align: center; }

/* ── 一键推演 ─────────────────────────────────────────────────────────
   界面要回答三件事：现在在干什么、走到哪一步、结果是什么。所以表单之后
   紧跟一条时间线，暂停的原因写在最显眼的位置——那是设计上要保留的停顿，
   不能让人误以为系统卡死了。 */
.autorun-board { position: absolute; inset: 0; overflow: auto; padding: 20px 24px 28px; display: grid; gap: 16px; align-content: start; }
.autorun-intro h3 { margin: 0 0 6px; font-size: 15px; color: var(--ink); }
.autorun-intro p { margin: 0; font-size: 11px; line-height: 1.85; color: var(--ink-soft); max-width: 720px; }
.autorun-intro b { color: var(--ink); }
.autorun-group { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px 14px; margin: 0; background: var(--panel); }
.autorun-group legend { padding: 0 6px; font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--ink-soft); }
.autorun-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 10px; }
.autorun-grid label { display: grid; gap: 4px; }
.autorun-grid span { font-size: 10px; color: var(--ink-soft); }
.autorun-grid i { font-style: normal; opacity: .6; }
.autorun-grid input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); font-size: 12px; color: var(--ink); }
.autorun-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.autorun-hint { font-size: 10px; color: var(--ink-soft); }
.autorun-timeline { border-top: 1px solid var(--line); padding-top: 14px; }
.autorun-idle { margin: 0; font-size: 11px; color: var(--ink-soft); }
.autorun-running { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; }
.autorun-running i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--ink); animation: autorun-spin .8s linear infinite; grid-row: span 2; }
.autorun-running b { font-size: 12px; color: var(--ink); }
.autorun-running small { font-size: 10px; color: var(--ink-soft); }
@keyframes autorun-spin { to { transform: rotate(360deg); } }
.autorun-steps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 2px; }
.autorun-step { display: grid; grid-template-columns: 20px 1fr; gap: 8px; padding: 8px 10px; border-radius: 6px; }
.autorun-step > i { font-style: normal; font-size: 11px; text-align: center; color: var(--ink-soft); }
.autorun-step b { font-size: 12px; color: var(--ink); }
.autorun-step small { display: block; font-size: 10px; color: var(--ink-soft); margin-top: 2px; }
.autorun-step em { display: block; font-size: 10px; font-style: normal; margin-top: 3px; color: #8a6a3a; }
.autorun-state { font-size: 9px; font-weight: 700; letter-spacing: .06em; margin-left: 6px; color: var(--ink-soft); }
.autorun-step.done > i { color: #3f8a52; }
.autorun-step.waiting_review { background: #fbf6ea; }
.autorun-step.waiting_review > i { color: #b8860b; }
.autorun-step.waiting_input { background: #fbeeea; }
.autorun-step.waiting_input > i { color: #b4452c; }
.autorun-waiting, .autorun-done { padding: 10px 12px; border-radius: 6px; display: grid; gap: 3px; }
.autorun-waiting { background: #fbf6ea; border: 1px solid #e6d9b8; }
.autorun-done { background: #eef5ec; border: 1px solid #c9dfc6; }
.autorun-waiting b, .autorun-done b { font-size: 12px; color: var(--ink); }
.autorun-waiting small, .autorun-done small { font-size: 10px; color: var(--ink-soft); }
.autorun-notes { margin-top: 10px; font-size: 10px; color: var(--ink-soft); }
.autorun-notes p { margin: 4px 0; }
.autorun-failed { padding: 10px 12px; border-radius: 6px; background: #fbeeea; border: 1px solid #e4c4ba; display: grid; gap: 3px; }
.autorun-failed b { font-size: 12px; color: var(--ink); }
.autorun-failed small { font-size: 10px; color: var(--ink-soft); }

/* ── 下一步提示 ────────────────────────────────────────────────────────
   用户最常问的是"现在轮到谁了"，所以把它放在流程条正下方，而不是塞进
   右侧检查器里让人去找。 */
.next-action { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: -4px 0 14px; padding: 9px 14px; border: 1px solid var(--line); border-left: 3px solid var(--ink); border-radius: 6px; background: var(--panel); }
.next-action.waiting { border-left-color: #b8860b; background: #fbf6ea; }
.next-action.done { border-left-color: #3f8a52; background: #eef5ec; }
.next-action b { font-size: 12px; color: var(--ink); }
.next-action span { font-size: 11px; color: var(--ink-soft); flex: 1; min-width: 220px; }
.next-action i { font-style: normal; font-size: 9px; font-weight: 700; letter-spacing: .06em; color: var(--ink-soft); padding: 2px 7px; border: 1px solid var(--line); border-radius: 99px; }
.workflow-step.waiting b { background: #b8860b; border-color: #b8860b; color: #fff; }
.workflow-step[title] { cursor: help; }
.next-action .secondary-button { padding: 4px 12px; font-size: 10px; }

/* ── 侧栏折叠 ──────────────────────────────────────────────────────────
   窗口不大时侧栏占掉 236px 很肉疼。折叠成图标条而不是整个藏起来，导航
   还点得到；宽度本来就由 --sidebar 驱动，顶栏第一列会跟着一起收。 */
.sidebar { position: relative; }
.sidebar-toggle {
  /* 收在侧栏边界内：860px 以下侧栏变成横条并且 overflow-x:auto，
     悬挑出去的按钮会被直接裁掉。 */
  position: absolute; top: 8px; right: 8px; z-index: 5;
  width: 22px; height: 22px; padding: 0; line-height: 1;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--panel); color: var(--ink-soft); font-size: 11px;
}
.sidebar-toggle:hover { color: var(--ink); border-color: var(--ink-soft); }

.app-shell.sidebar-collapsed { --sidebar: 56px; }
.sidebar-collapsed .sidebar { padding: 40px 8px 14px; }
.sidebar-collapsed .sidebar-toggle { right: 50%; transform: translateX(50%) rotate(180deg); }
/* 折叠时只留图标：文字用 em 包着，整块隐藏，图标保持居中 */
.sidebar-collapsed .nav-item em,
.sidebar-collapsed .new-project-button em,
.sidebar-collapsed .sidebar-section,
.sidebar-collapsed .sidebar-foot,
.sidebar-collapsed .brand span:last-child { display: none; }
.sidebar-collapsed .nav-item { justify-content: center; padding: 10px 0; }
.sidebar-collapsed .new-project-button { justify-content: center; padding: 10px 0; }
.sidebar-collapsed .brand { justify-content: center; padding-left: 0; }

/* 窄屏下侧栏本来就是横条、不占宽度，折叠没有意义。这段必须排在折叠样式
   之后，否则同优先级的后写规则会把它盖掉。 */
@media (max-width: 860px) {
  .sidebar-toggle { display: none; }
  .app-shell.sidebar-collapsed { --sidebar: 1fr; }
  .sidebar-collapsed .sidebar { padding: 8px 10px; }
  .sidebar-collapsed .nav-item em,
  .sidebar-collapsed .new-project-button em,
  .sidebar-collapsed .sidebar-section,
  .sidebar-collapsed .sidebar-foot,
  .sidebar-collapsed .brand span:last-child { display: revert; }
  .sidebar-collapsed .nav-item,
  .sidebar-collapsed .new-project-button { justify-content: flex-start; padding: 10px 11px; }
}

/* ── 右侧检查器折叠 ────────────────────────────────────────────────────
   和侧栏同一套做法：折成一条窄条，标题竖排，随时能点回来。整个藏掉的话
   用户就找不到入口了。 */
.inspector-head { position: relative; }
.panel-toggle {
  position: absolute; top: 50%; left: 10px; transform: translateY(-50%);
  width: 20px; height: 20px; padding: 0; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--panel); color: var(--ink-soft); font-size: 10px; line-height: 1;
}
.panel-toggle:hover { color: var(--ink); border-color: var(--ink-soft); }
.inspector-head > strong { margin-left: 26px; }

.app-shell.inspector-collapsed { --inspector: 38px; }
.inspector-collapsed .inspector-block,
.inspector-collapsed .inspector-actions,
.inspector-collapsed .inspector-head > strong,
.inspector-collapsed #runStatusBadge { display: none; }
/* 折叠时头部只留按钮的高度，撑满会把下面的竖排标题顶到底部 */
.inspector-collapsed .inspector-head { height: 40px; align-items: flex-start; padding: 0; border-bottom: 0; }
.inspector-collapsed .panel-toggle { left: 50%; top: 12px; transform: translateX(-50%) rotate(180deg); }
.inspector-collapsed .inspector-panel::after {
  content: "项目状态"; margin-top: 4px; writing-mode: vertical-rl;
  font-size: 10px; letter-spacing: .18em; color: var(--ink-soft); text-align: center;
}
.inspector-collapsed .inspector-panel { align-items: center; }

/* 1180px 以下检查器本来就整块隐藏，折叠无从谈起。必须排在折叠样式之后。 */
@media (max-width: 1180px) {
  .panel-toggle { display: none; }
  .app-shell.inspector-collapsed { --inspector: 0; }
}

/* ── 效果图提示词弹窗 ── */
.render-prompt-dialog { width: min(920px, 92vw); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.render-prompt-dialog::backdrop { background: rgba(25, 39, 34, .35); }
.render-prompt-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.render-prompt-head strong { font-size: 13px; }
.render-prompt-head [data-close] { margin-left: auto; }
.render-prompt-hint { margin: 0 0 8px; font-size: 10px; color: var(--ink-soft); }
.render-prompt-note { margin: 0 0 8px; font-size: 10px; color: #8a3d2c; }
.render-prompt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.render-prompt-grid h4 { margin: 0 0 6px; font-size: 10px; color: var(--ink-soft); }
.render-prompt-grid textarea { width: 100%; height: 260px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font-size: 10px; line-height: 1.7; resize: vertical; }
.render-prompt-grid .secondary-button { margin-top: 6px; }
@media (max-width: 860px) { .render-prompt-grid { grid-template-columns: 1fr; } }
.render-prompt-actions { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.render-prompt-status { font-size: 10px; color: var(--ink-soft); }
.render-prompt-result img { width: 100%; border-radius: 6px; border: 1px solid var(--line); }
.render-prompt-result p { margin: 6px 0 10px; font-size: 10px; color: var(--ink-soft); }
.render-video-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.render-video-row select { padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); font-size: 11px; }
.render-prompt-result video { width: 100%; border-radius: 6px; border: 1px solid var(--line); }

/* ── 图面样式弹窗（配色 / 轮廓 / 淡化自调） ─────────────────────────── */
.drawing-style-dialog {
  border: 1px solid #e0ddd2;
  border-radius: 12px;
  padding: 18px 20px;
  width: min(460px, 92vw);
  box-shadow: 0 18px 44px rgba(30, 42, 38, 0.18);
}
.drawing-style-dialog::backdrop { background: rgba(30, 42, 38, 0.35); }
.plan-style-button {
  margin-left: auto;
  border: 1px dashed #b9b2a2;
  background: #fffefa;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.plan-style-button:hover { border-color: #4a6d62; color: #2f5548; }
.style-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  margin: 10px 0;
}
.style-slider-row input[type="range"] { flex: 1; }
.style-color-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  margin: 12px 0;
}
.style-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.style-color-row input[type="color"] {
  width: 30px;
  height: 24px;
  border: 1px solid #d8d4c8;
  border-radius: 6px;
  padding: 0;
  background: none;
}
.style-color-code { color: #8a948e; font-size: 11px; }
