:root {
  --ink: #111827;
  --muted: #4b5563;
  --line: rgba(17, 24, 39, .14);
  --edge: #59635e;
  --control-edge: #818892;
  --paper: #fff;
  --panel: #f8f9fa;
  --background: #f8f9fa;
  --glass: rgba(255, 255, 255, .76);
  --raised: rgba(255, 255, 255, .88);
  --control: rgba(17, 24, 39, .025);
  --hover: rgba(17, 24, 39, .06);
  --accent: #d8242a;
  --accent-text: #d8242a;
  --primary: #d8242a;
  --selected: rgba(216, 36, 42, .12);
  --warning: #8a5500;
  --warning-bg: #fff8e9;
  --focus: #111827;
  --rim: inset 0 1px 0 rgba(255, 255, 255, .9);
  --shadow: 0 12px 36px rgba(17, 24, 39, .045);
  color-scheme: light;
  font-family: "Inter", "SF Pro Text", -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--background);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--background); }
body.dark {
  --ink: #f4f7f5;
  --muted: #a8b0ac;
  --line: rgba(224, 232, 228, .22);
  --edge: rgba(244, 248, 246, .68);
  --control-edge: rgba(224, 232, 228, .40);
  --paper: #121719;
  --panel: #07090a;
  --background: #0b0e10;
  --glass: rgba(16, 20, 22, .92);
  --raised: rgba(24, 27, 29, .78);
  --control: rgba(255, 255, 255, .035);
  --hover: rgba(255, 255, 255, .07);
  --accent: #d8242a;
  --accent-text: #ff747b;
  --primary: #d8242a;
  --selected: rgba(216, 36, 42, .12);
  --warning: #f2c071;
  --warning-bg: #211a10;
  --focus: #f4f7f5;
  --rim: inset 0 1px 0 rgba(255, 255, 255, .12);
  --shadow: 0 12px 36px rgba(0, 0, 0, .22);
  color-scheme: dark;
}
button, input, summary { font: inherit; }
button { cursor: pointer; color: inherit; min-height: 44px; min-width: 44px; border-radius: 12px; transition: background 160ms ease, border-color 160ms ease; }
button:disabled { opacity: .38; cursor: default; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; position: relative; z-index: 2; }
button:active:not(:disabled) { transform: translateY(1px); }
button:hover:not(:disabled) { background: var(--hover); border-color: var(--edge); }
button svg, .ui-icon { display: block; width: 24px; height: 24px; flex-shrink: 0; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1, h2, h3 { margin: 0; }
h1 { font-size: 28px; font-weight: 600; letter-spacing: -.025em; line-height: 1.3; }
h2 { font-size: 20px; font-weight: 600; letter-spacing: -.015em; line-height: 1.4; }
h3 { font-size: 16px; font-weight: 500; line-height: 1.4; }
.app-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; min-height: 104px; padding: 20px 32px; border-bottom: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(22px) saturate(110%); -webkit-backdrop-filter: blur(22px) saturate(110%); box-shadow: var(--rim); }
.brand-mark { display: flex; align-items: center; justify-content: center; padding: 12px; border: 1px solid rgba(224, 232, 228, .22); border-radius: 12px; background: #101416; }
.brand-logo { display: block; width: 160px; max-width: 100%; height: auto; object-fit: contain; aspect-ratio: 1600 / 461; }
.title-wrap { display: flex; align-items: center; min-width: 0; }
.title-icon { width: 32px; height: 32px; color: var(--ink); }
.title-caption { margin: 4px 0 0; color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.quiet-button, .icon-button { border: 1px solid var(--control-edge); background: var(--control); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.quiet-button { padding: 0 16px; font-size: 13px; }
.icon-button { width: 44px; height: 44px; }
.theme-sun { display: none !important; }
.dark .theme-sun { display: block !important; }
.dark .theme-moon { display: none !important; }
.workspace { max-width: 1640px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 384px; padding: 32px; gap: 24px; align-items: start; grid-template-areas: "layout settings" "quote settings" "materials settings"; }
.drawing-panel { min-width: 0; grid-area: layout; }
.settings-panel { grid-area: settings; }
.quote-panel { grid-area: quote; }
.materials-panel { grid-area: materials; }
.layout-card, .quote-panel, .materials-panel, .settings-panel { border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: var(--rim), var(--shadow); min-width: 0; }
.layout-card { overflow: clip; }
.drawing-header { padding: 24px 24px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.drawing-header p { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.export-button, .play-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--edge); background: var(--primary); box-shadow: var(--rim); color: #fff; font-size: 14px; font-weight: 500; }
.export-button:hover:not(:disabled), .play-button:hover:not(:disabled) { background: #bd1d23; border-color: #f0888e; }
.export-button { padding: 0 16px; white-space: nowrap; flex-shrink: 0; }
.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.summary-strip > div { min-width: 0; padding: 16px 20px; border-right: 1px solid var(--line); }
.summary-strip > div:last-child { border-right: 0; }
.summary-strip span { color: var(--muted); font-size: 12px; display: block; margin-bottom: 8px; }
.summary-strip strong { display: block; font-size: 32px; font-weight: 500; letter-spacing: -.035em; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary-strip strong small { font-size: 12px; font-weight: 400; margin-left: 4px; letter-spacing: 0; color: var(--muted); }
.canvas-wrap { height: clamp(400px, 33vw, 520px); position: relative; margin-top: 16px; background: var(--paper); }
#stand-canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
#stand-canvas.dragging { cursor: grabbing; }
.startup-error { position: absolute; inset: 12%; display: grid; place-content: center; background: var(--panel); padding: 24px; border: 1px solid var(--line); border-radius: 12px; line-height: 1.8; }
[hidden], .startup-error[hidden], #quote-content[hidden], .supplier-stats[hidden], .seat-control[hidden] { display: none !important; }
.view-toolbar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 12px 24px; border-top: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(22px) saturate(110%); -webkit-backdrop-filter: blur(22px) saturate(110%); }
.view-button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 44px; padding: 0 10px; border: 1px solid var(--control-edge); background: var(--control); font-size: 12px; white-space: nowrap; }
.view-button.zoom-button { padding: 0; width: 44px; }
#view-scale { min-width: 44px; text-align: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.view-separator { height: 24px; width: 1px; background: var(--line); margin: 0 4px; }
.drawing-toolbar { padding: 8px 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.diagram-meta { margin-left: auto; color: var(--muted); font-size: 12px; }
.frame-label { font-size: 12px; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.people-footprint-note { font-size: 12px; color: var(--muted); line-height: 1.8; margin: 0; padding: 0 24px 20px; }
.capacity-warning { margin: 0 24px 24px; border: 1px solid var(--line); border-left: 3px solid #f2a72d; padding: 12px 16px; border-radius: 10px; background: var(--warning-bg); color: var(--warning); line-height: 1.7; font-size: 13px; }
.quote-panel, .materials-panel { padding: 24px; }
.quote-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.quote-spec { color: var(--muted); font-size: 12px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; white-space: nowrap; }
.quote-unavailable { margin: 16px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.quote-overview { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 24px 0; }
.quote-groups { font-size: 14px; margin: 0; font-weight: 500; line-height: 1.8; }
.quote-capacity { font-size: 12px; line-height: 1.8; margin: 8px 0 0; color: var(--muted); }
.quote-total-wrap { flex-shrink: 0; text-align: right; }
.quote-total-wrap > span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.quote-total-wrap strong { font-size: 40px; font-weight: 500; line-height: 1.2; letter-spacing: -.035em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.quote-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; }
.quote-option { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 12px 8px; font-size: 13px; line-height: 1.6; cursor: pointer; min-height: 80px; transition: border-color 160ms ease, background 160ms ease; }
.quote-option:not(.disabled):hover { border-color: var(--edge); }
.quote-option:has(input:checked) { border-color: var(--edge); box-shadow: inset 0 -2px 0 var(--accent); background: var(--selected); }
.quote-option input { appearance: none; flex-shrink: 0; width: 44px; height: 44px; margin: 0; position: relative; cursor: pointer; }
.quote-option input::before { content: ""; position: absolute; width: 20px; height: 20px; top: 12px; left: 12px; border: 1px solid var(--edge); border-radius: 6px; background: var(--control); }
.quote-option input:checked::before { border-color: var(--accent); }
.quote-option input:checked::after { content: ""; position: absolute; left: 20px; top: 15px; width: 5px; height: 10px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); }
.quote-option small { display: block; font-size: 12px; line-height: 1.7; color: var(--muted); margin-top: 4px; }
.quote-option.disabled { opacity: .38; cursor: default; }
.quote-option input:disabled { cursor: default; }
.quote-breakdown, .materials-grid table { border-collapse: collapse; width: 100%; font-size: 14px; }
.quote-breakdown td { padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.7; }
.quote-breakdown td:last-child { text-align: right; white-space: nowrap; padding-left: 16px; font-variant-numeric: tabular-nums; }
.quote-detail { display: block; font-size: 12px; line-height: 1.7; color: var(--muted); margin-top: 4px; }
.quote-rule { font-size: 12px; line-height: 1.8; color: var(--muted); margin: 16px 0 0; }
.materials-panel h2 span { display: inline-block; font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.materials-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; margin-top: 20px; }
.materials-grid td { padding: 12px 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
.materials-grid td:last-child { text-align: right; font-variant-numeric: tabular-nums; padding-left: 16px; }
.rows-summary h3 { font-size: 14px; margin-bottom: 8px; }
.rows-summary .row-stat { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding: 12px 0; font-size: 14px; }
.rows-summary .row-stat span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rows-summary p { color: var(--muted); font-size: 12px; margin-top: 16px; }
.rows-summary p strong { color: var(--ink); font-weight: 500; }
.settings-panel { background: var(--panel); }
.panel-title { font-size: 20px; padding: 24px 24px 0; }
.control-section { margin: 0 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.field-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; margin-top: 16px; font-size: 14px; }
.control-section > .field-heading:first-child { margin-top: 0; }
.field-heading.compact { min-height: 24px; margin-top: 20px; margin-bottom: 12px; }
.number-with-unit { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.number-with-unit input { color: var(--ink); font-size: 16px; text-align: right; width: 80px; height: 44px; padding: 8px 12px; border: 1px solid var(--control-edge); border-radius: 12px; background: var(--control); font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
#angle-number { width: 100px; }
.number-with-unit input::-webkit-inner-spin-button, .number-with-unit input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.number-with-unit input::placeholder { font-size: 12px; color: var(--muted); }
input[type=range] { accent-color: var(--accent); height: 44px; width: 100%; margin: 4px 0 0; cursor: pointer; display: block; appearance: none; background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--range-fill, 50%), var(--control-edge) var(--range-fill, 50%), var(--control-edge) 100%) center / 100% 3px no-repeat; }
input[type=range]::-webkit-slider-thumb { appearance: none; height: 20px; width: 20px; border: 2px solid var(--paper); border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 1px var(--edge); }
input[type=range]::-moz-range-thumb { height: 16px; width: 16px; border: 2px solid var(--paper); border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 1px var(--edge); }
.range-caption { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 0; }
.segmented { display: flex; gap: 4px; border-radius: 12px; border: 1px solid var(--control-edge); padding: 4px; background: var(--control); }
.segmented button { flex: 1; min-width: 0; font-size: 12px; padding: 8px 4px; border: 1px solid transparent; border-radius: 8px; background: transparent; }
.segmented button.active, .mode-grid button.active, .supplier-presets button.active { background: var(--selected); border-color: var(--edge); color: var(--ink); box-shadow: var(--rim), inset 0 -2px 0 var(--accent); }
.dark .segmented button.active, .dark .mode-grid button.active, .dark .supplier-presets button.active { color: var(--accent-text); }
.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mode-grid button { min-width: 0; font-size: 13px; border: 1px solid var(--control-edge); background: var(--control); padding: 12px 4px; border-radius: 12px; line-height: 1.5; }
.mode-grid button .mode-max { font-size: 11px; display: block; color: var(--muted); margin-top: 4px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-heading h3 { font-size: 16px; }
.text-button { display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid transparent; padding: 0 8px; font-size: 12px; white-space: nowrap; }
.text-button.active { box-shadow: inset 0 -2px 0 var(--accent); }
.shoulder-presets { margin-top: 12px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.switch-label { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.switch-label input { appearance: none; width: 44px; height: 44px; position: relative; margin: 0; cursor: pointer; flex-shrink: 0; background: transparent; }
.switch-label input::before { content: ""; position: absolute; left: 4px; top: 11px; width: 36px; height: 22px; border: 1px solid var(--edge); border-radius: 11px; background: var(--control); }
.switch-label input::after { content: ""; position: absolute; left: 7px; top: 14px; height: 16px; width: 16px; background: var(--muted); border-radius: 50%; transition: left 160ms ease; }
.switch-label input:checked::before { border-color: var(--accent); }
.switch-label input:checked::after { left: 21px; background: var(--accent); }
.cross-switch { margin-top: 12px; }
.seat-control { margin-top: 12px; }
.seat-actions { display: flex; align-items: center; gap: 8px; }
.photo-details { padding: 0 24px; }
.photo-details summary { display: flex; justify-content: space-between; align-items: center; list-style: none; cursor: pointer; min-height: 72px; font-size: 16px; font-weight: 500; padding: 20px 0; }
.photo-details summary > span { display: inline-flex; align-items: center; gap: 12px; }
.photo-details summary::-webkit-details-marker { display: none; }
.details-chevron { color: var(--muted); transition: transform 160ms ease; }
.photo-details[open] .details-chevron { transform: rotate(180deg); }
.photo-content { padding: 0 0 24px; }
.photo-content > .field-heading:first-child { margin-top: 0; }
.photo-stats { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 20px 0 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.photo-stats > div { min-width: 0; }
.photo-stats dt { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.photo-stats dd { margin: 0; font-size: 16px; font-variant-numeric: tabular-nums; }
.stepper { display: flex; align-items: center; border: 1px solid var(--control-edge); border-radius: 12px; background: var(--control); }
.stepper button { display: flex; align-items: center; justify-content: center; height: 44px; width: 44px; border: 0; background: transparent; }
.stepper output { min-width: 32px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.simulation-row { display: flex; align-items: center; gap: 8px; margin-top: 24px; }
.play-button { flex: 1; padding: 0 8px; }
.play-button::before { content: ""; width: 24px; height: 24px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 4 14 8-14 8Z' fill='none' stroke='black' stroke-width='1.75' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 4 14 8-14 8Z' fill='none' stroke='black' stroke-width='1.75' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.play-button.playing { box-shadow: var(--rim), inset 0 -2px 0 var(--accent); }
.play-button.playing::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='5' width='14' height='14' rx='2' fill='none' stroke='black' stroke-width='1.75'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='5' width='14' height='14' rx='2' fill='none' stroke='black' stroke-width='1.75'/%3E%3C/svg%3E"); }
.frame-button { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: var(--control); border: 1px solid var(--control-edge); }
.sound-switch { margin-top: 12px; }
.local-note { margin: 0; padding: 20px 12px; text-align: center; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.supplier-width { color: var(--muted); font-size: 12px; white-space: nowrap; }
.supplier-intro { font-size: 12px; color: var(--muted); margin: 12px 0 16px; line-height: 1.8; }
.supplier-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.supplier-presets button { min-width: 0; border: 1px solid var(--control-edge); border-radius: 12px; background: var(--control); padding: 12px 4px; font-size: 13px; line-height: 1.5; }
.estimate-tag { font-size: 11px; color: var(--warning); background: var(--warning-bg); padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; white-space: nowrap; }
.supplier-calibration { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.supplier-status { font-size: 12px; line-height: 1.8; color: var(--muted); margin: 0; }
.supplier-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.supplier-stats div { min-width: 0; }
.supplier-stats dt { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.supplier-stats dd { font-size: 14px; margin: 0; line-height: 1.7; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.supplier-assumption { font-size: 12px; line-height: 1.8; color: var(--muted); margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 16px 20px; border: 1px solid var(--edge); border-radius: 12px; background: var(--raised); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); color: var(--ink); font-size: 14px; box-shadow: var(--rim), var(--shadow); z-index: 20; max-width: calc(100vw - 32px); text-align: center; line-height: 1.7; }
.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; }
@media (min-width: 1440px) { .workspace { padding: 32px 40px; gap: 32px; } .summary-strip strong { font-size: 36px; } }
@media (min-width: 1024px) and (max-width: 1199px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 360px; padding: 24px; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-strip > div { padding: 16px; }
  .summary-strip > div:nth-child(2) { border-right: 0; }
  .summary-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .drawing-header { align-items: flex-start; }
  .drawing-header p { font-size: 12px; }
  .export-button { padding: 0 12px; font-size: 12px; }
  .quote-options { grid-template-columns: 1fr; }
  .quote-option { min-height: 68px; padding: 8px; }
  .quote-option small { display: inline; margin-left: 8px; }
  .quote-overview { flex-direction: column; align-items: flex-start; gap: 16px; }
  .quote-total-wrap { text-align: left; }
  .materials-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 1023px) {
  .app-header { padding: 20px 24px; }
  .workspace { grid-template-columns: minmax(0, 1fr); padding: 24px; gap: 24px; }
  .workspace { grid-template-areas: "layout" "settings" "quote" "materials"; }
  .canvas-wrap { height: clamp(360px, 52vw, 480px); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .settings-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-title, .supplier-section, .photo-details, .local-note { grid-column: 1 / -1; }
  .supplier-presets { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .supplier-calibration { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .supplier-status { grid-column: 1 / -1; }
  .supplier-stats { margin: 0; }
  .supplier-assumption { margin: 0; padding: 0; border: 0; }
}
@media (max-width: 767px) {
  h1 { font-size: 20px; }
  h2 { font-size: 18px; }
  .app-header { grid-template-columns: minmax(0, 1fr) auto; min-height: 0; padding: 16px; gap: 16px 12px; }
  .brand-mark { grid-column: 1; grid-row: 1; justify-self: start; }
  .brand-logo { width: 144px; }
  .title-wrap { grid-column: 1 / -1; grid-row: 2; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .title-wrap { gap: 8px; }
  .title-icon { width: 24px; height: 24px; }
  .title-caption { font-size: 11px; letter-spacing: .04em; }
  .header-actions { gap: 8px; }
  button { min-height: 48px; min-width: 48px; }
  .quiet-button { padding: 0; width: 48px; height: 48px; }
  .quiet-button span { display: none; }
  .icon-button { width: 48px; height: 48px; }
  .workspace { padding: 16px; gap: 20px; }
  .drawing-header { padding: 20px 16px 16px; align-items: flex-start; gap: 8px; }
  .drawing-header p { font-size: 12px; max-width: 190px; line-height: 1.8; margin-top: 4px; }
  .export-button { min-height: 48px; padding: 0 12px; font-size: 12px; gap: 4px; }
  .export-button svg { width: 20px; height: 20px; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 16px; }
  .summary-strip > div { padding: 16px; }
  .summary-strip > div:nth-child(2) { border-right: 0; }
  .summary-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .summary-strip strong { font-size: 32px; }
  .canvas-wrap { height: clamp(300px, 90vw, 440px); margin-top: 12px; }
  .view-toolbar { padding: 12px 8px; gap: 4px; }
  .view-button { height: 48px; padding: 0 6px; gap: 2px; }
  .view-button.zoom-button { min-width: 48px; width: 48px; }
  .view-separator { display: none; }
  #view-scale { min-width: 40px; }
  .view-button svg { width: 20px; height: 20px; }
  .drawing-toolbar { padding: 8px 16px; gap: 8px; }
  .diagram-meta { font-size: 12px; }
  .people-footprint-note { padding: 0 16px 20px; }
  .capacity-warning { margin: 0 16px 20px; padding: 12px; font-size: 12px; }
  .quote-panel, .materials-panel { padding: 20px 16px; }
  .quote-heading { gap: 8px; }
  .quote-spec { font-size: 11px; }
  .quote-overview { flex-direction: column; align-items: flex-start; gap: 16px; margin: 20px 0; }
  .quote-total-wrap { text-align: left; }
  .quote-total-wrap strong { font-size: 36px; }
  .quote-options { grid-template-columns: 1fr; gap: 8px; }
  .quote-option { padding: 8px; min-height: 72px; }
  .quote-option small { display: inline; margin-left: 8px; }
  .quote-breakdown, .materials-grid table, .rows-summary .row-stat { font-size: 13px; }
  .materials-grid { grid-template-columns: 1fr; gap: 24px; }
  .panel-title { font-size: 20px; padding: 20px 20px 0; }
  .control-section { margin: 0 20px; padding: 20px 0; }
  .field-heading { font-size: 14px; min-height: 48px; }
  .number-with-unit input { height: 48px; }
  .supplier-width { font-size: 11px; }
  .section-heading { gap: 8px; }
  .section-heading h3 { font-size: 16px; }
  .supplier-presets button { font-size: 12px; padding: 12px 2px; }
  .mode-grid button { font-size: 12px; }
  .segmented button { min-height: 48px; }
  .supplier-calibration { padding: 16px; }
  .supplier-stats { gap: 16px 12px; }
  .toggle-row { gap: 8px; flex-wrap: wrap; }
  .switch-label, .switch-label input { min-height: 48px; }
  .switch-label input::before { top: 13px; }
  .switch-label input::after { top: 16px; }
  input[type=range] { height: 48px; }
  .photo-details { padding: 0 20px; }
  .stepper button, .frame-button { height: 48px; width: 48px; }
  .toast { bottom: 16px; font-size: 13px; }
}
@media (max-width: 359px) {
  h1 { font-size: 18px; }
  .title-icon { display: none; }
  .app-header { padding: 16px 12px; }
  .brand-logo { width: 120px; }
  .workspace { padding: 12px; }
  .drawing-header { flex-wrap: wrap; }
  .drawing-header p { max-width: none; }
  .export-button { margin-left: auto; }
  .view-toolbar { gap: 4px; }
  .view-button:last-child { flex-basis: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  button:active { transform: none !important; }
}
