:root {
  --bg: oklch(98% 0.005 250);
  --surface: oklch(100% 0 0);
  --fg: oklch(22% 0.02 240);
  --muted: oklch(50% 0.018 240);
  --border: oklch(90% 0.008 240);
  --accent: oklch(58% 0.16 145);
  --accent-strong: oklch(45% 0.14 145);
  --accent-soft: oklch(94% 0.035 150);
  --blue: oklch(56% 0.16 252);
  --blue-soft: oklch(94% 0.028 252);
  --warn: oklch(72% 0.15 72);
  --danger: oklch(60% 0.19 28);
  --panel: oklch(95.5% 0.007 245);
  --grid: oklch(91% 0.006 245);
  --font-display: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --shadow: 0 18px 48px rgba(20, 38, 55, .08);
}

* { box-sizing: border-box; }
html { min-width: 0; color: var(--fg); background: var(--bg); font-family: var(--font-body); }
body { margin: 0; min-width: 0; background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.ok { color: var(--accent-strong); }
.warn { color: var(--warn); }
.danger { color: var(--danger); }

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  background: color-mix(in oklch, var(--surface) 88%, var(--accent-soft));
  border-right: 1px solid var(--border);
  overflow: auto;
}

.brand {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 26px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: white;
  background:
    linear-gradient(135deg, color-mix(in oklch, var(--accent) 88%, white), var(--blue));
  font-weight: 760;
  letter-spacing: -0.03em;
}

.brand h1 { margin: 0; font-size: 18px; letter-spacing: -0.01em; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.rail-label {
  margin: 22px 8px 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav-link {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  margin: 3px 0;
  border-radius: 10px;
  color: color-mix(in oklch, var(--fg) 80%, var(--muted));
  font-size: 14px;
  font-weight: 650;
}

.nav-link::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: currentColor;
  opacity: .58;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.rail-card {
  margin-top: 24px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.68);
}

.rail-card strong { display: block; font-size: 13px; }
.rail-card span { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }

.main {
  min-width: 0;
  padding: 22px clamp(14px, 2.6vw, 36px) 36px;
}

.topbar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.crumb { color: var(--muted); font-size: 13px; }
.title { margin: 4px 0 0; font-size: clamp(26px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -0.03em; }
.lede { max-width: 840px; margin: 10px 0 0; color: var(--muted); line-height: 1.65; }

.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--fg);
  font-weight: 720;
  white-space: nowrap;
}
.btn.primary { color: white; border-color: var(--accent); background: var(--accent); }
.btn.dark { color: white; border-color: var(--fg); background: var(--fg); }
.btn.danger { color: white; border-color: var(--danger); background: var(--danger); }
.btn.ghost { background: transparent; }
.btn.active { color: var(--accent-strong); border-color: color-mix(in oklch, var(--accent) 48%, var(--border)); background: var(--accent-soft); }
.btn.small { min-height: 30px; padding: 0 10px; border-radius: 8px; font-size: 12px; }
.btn[disabled] { cursor: not-allowed; opacity: .45; }

.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.lang button {
  min-width: 38px;
  height: 30px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 760;
}
.lang button.active { color: white; background: var(--fg); }

.workspace {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.work-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in oklch, var(--panel) 82%, white), white);
}

.tabs { display: flex; align-items: center; gap: 4px; overflow-x: auto; }
.tab {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 760;
  white-space: nowrap;
}
.tab.active { color: var(--accent-strong); background: var(--accent-soft); }

.work-body { padding: 16px; }
.grid { display: grid; gap: 14px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}
.panel.pad { padding: 16px; }
.panel-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklch, var(--panel) 72%, white);
}
.panel-head h2, .panel h2 { margin: 0; font-size: 18px; letter-spacing: -0.01em; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }

.metric {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in oklch, var(--surface) 86%, var(--panel));
}
.metric span { display: block; color: var(--muted); font-size: 12px; font-weight: 720; }
.metric strong { display: block; margin-top: 8px; font-size: clamp(24px, 3vw, 34px); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.metric small { display: block; margin-top: 8px; color: var(--muted); line-height: 1.45; }

.field { display: grid; gap: 7px; min-width: 0; }
.field label { color: var(--muted); font-size: 12px; font-weight: 760; }
.input, .select, .textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--fg);
  outline: none;
}
.input, .select { min-height: 42px; padding: 0 12px; }
.textarea { min-height: 96px; padding: 12px; resize: vertical; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 18%, transparent); }
.field.invalid .input, .field.invalid .select, .field.invalid .textarea { border-color: var(--danger); }
.error { min-height: 15px; color: var(--danger); font-size: 12px; }

.drop {
  min-height: 160px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1.5px dashed color-mix(in oklch, var(--accent) 55%, var(--border));
  border-radius: 14px;
  background:
    linear-gradient(135deg, color-mix(in oklch, var(--accent-soft) 78%, white), white);
  text-align: center;
}
.drop strong { display: block; font-size: 18px; }
.drop p { max-width: 460px; margin: 8px auto 0; color: var(--muted); line-height: 1.55; }
.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.file-row:last-child { border-bottom: 0; }
.progress { height: 7px; overflow: hidden; border-radius: 999px; background: var(--panel); }
.progress i { display: block; height: 100%; width: var(--w, 72%); background: var(--accent); }

.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.flow-step {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.flow-step.active { border-color: color-mix(in oklch, var(--accent) 62%, var(--border)); background: var(--accent-soft); }
.flow-step span { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.flow-step strong { display: block; margin-top: 6px; }

.split {
  display: grid;
  grid-template-columns: minmax(270px, 360px) minmax(0, 1fr);
  gap: 14px;
}
.tree-panel { min-height: 650px; background: color-mix(in oklch, var(--panel) 84%, white); }
.tree-search { padding: 14px; border-bottom: 1px solid var(--border); }
.tree { padding: 12px 10px 20px; overflow: auto; max-height: 680px; }
.node {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 9px;
  font-size: 14px;
}
.node:hover, .node.selected { background: var(--accent-soft); color: var(--accent-strong); }
.node button { width: 22px; height: 22px; border: 1px solid var(--border); border-radius: 6px; background: white; }
.node .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node .meta { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.children { margin-left: 18px; padding-left: 9px; border-left: 1px solid var(--border); }
.children.collapsed { display: none; }

.table-wrap { min-width: 0; overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { position: sticky; top: 0; z-index: 1; background: color-mix(in oklch, var(--panel) 82%, white); color: var(--muted); font-size: 12px; font-weight: 800; }
td { font-size: 14px; }
tr:last-child td { border-bottom: 0; }
td:last-child, th:last-child { border-right: 0; }
tr.diff td { background: color-mix(in oklch, var(--accent-soft) 64%, white); }

.scheme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 14px;
}
.scheme-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: white;
  overflow: hidden;
}
.scheme-card.selected { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 14%, transparent); }
.scheme-visual {
  height: 128px;
  background:
    linear-gradient(135deg, rgba(16,163,127,.16), rgba(58,124,255,.10)),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(255,255,255,.55) 18px 19px);
  display: grid;
  place-items: center;
}
.wire-car {
  width: 180px;
  height: 48px;
  border: 3px solid var(--accent-strong);
  border-top-left-radius: 60px 38px;
  border-top-right-radius: 90px 42px;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 18px;
  position: relative;
}
.wire-car::before, .wire-car::after {
  content: "";
  position: absolute;
  bottom: -17px;
  width: 24px;
  height: 24px;
  border: 4px solid var(--fg);
  border-radius: 50%;
  background: white;
}
.wire-car::before { left: 24px; }
.wire-car::after { right: 28px; }
.scheme-body { padding: 14px; }
.scheme-body h3 { margin: 0; font-size: 18px; }
.scheme-body p { margin: 8px 0 12px; color: var(--muted); line-height: 1.55; }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}
.tag.ok { color: var(--accent-strong); background: var(--accent-soft); }
.tag.warn { color: color-mix(in oklch, var(--warn) 72%, black); background: color-mix(in oklch, var(--warn) 18%, white); }
.tag.danger { color: var(--danger); background: color-mix(in oklch, var(--danger) 12%, white); }

.part-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.part-form .field { padding: 12px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: white; }
.part-form .field:nth-child(4n) { border-right: 0; }
.part-form .field.wide { grid-column: span 2; }

.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.asset-card {
  min-height: 150px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: white;
}
.asset-art {
  height: 102px;
  background:
    radial-gradient(circle at 42% 54%, rgba(11, 58, 83, .26), transparent 24%),
    linear-gradient(140deg, #8dbdea, #d8e8f8);
  position: relative;
}
.asset-art::after {
  content: "";
  position: absolute;
  inset: 32px 28px;
  border: 5px solid rgba(10, 45, 66, .82);
  border-radius: 48% 22% 18% 45%;
}
.asset-card strong { display: block; padding: 10px 12px 0; }
.asset-card span { display: block; padding: 4px 12px 12px; color: var(--muted); font-size: 12px; }

.hero {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(340px, 1.08fr);
  gap: 36px;
  align-items: center;
  padding: clamp(24px, 5vw, 64px);
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(110deg, white 0%, white 48%, color-mix(in oklch, var(--blue-soft) 55%, white) 48%, color-mix(in oklch, var(--accent-soft) 70%, white) 100%);
}
.hero h1 { margin: 0; font-size: clamp(42px, 6vw, 76px); line-height: 1.02; letter-spacing: -0.055em; }
.hero p { max-width: 620px; margin: 18px 0 0; color: var(--muted); font-size: clamp(17px, 1.4vw, 21px); line-height: 1.65; }
.blueprint-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.blueprint-stage {
  aspect-ratio: 1.55;
  border-radius: 16px;
  border: 1px solid var(--border);
  background:
    linear-gradient(rgba(16,163,127,.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16,163,127,.16) 1px, transparent 1px),
    radial-gradient(circle at 48% 48%, rgba(16,163,127,.14), transparent 38%),
    white;
  background-size: 24px 24px, 24px 24px, auto, auto;
  display: grid;
  place-items: center;
}
.blueprint-stage .wire-car { width: 62%; height: 18%; }

.screen-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 14px;
}
.screen-card {
  display: grid;
  gap: 9px;
  min-height: 154px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: white;
}
.screen-card strong { font-size: 17px; }
.screen-card span { color: var(--muted); font-size: 13px; line-height: 1.5; }

.project-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
}

.project-board {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  gap: 14px;
}

.project-list {
  display: grid;
  gap: 12px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(135deg, color-mix(in oklch, var(--surface) 92%, var(--blue-soft)), white);
}

.project-card:hover {
  border-color: color-mix(in oklch, var(--accent) 58%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 10%, transparent);
}

.project-card h3 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.project-card p { margin: 8px 0 0; color: var(--muted); line-height: 1.55; }
.project-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.project-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.project-card[hidden], [hidden] { display: none !important; }
.tag.owner { color: var(--blue); background: var(--blue-soft); }
.tag.shared { color: var(--accent-strong); background: var(--accent-soft); }

.collab-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.avatar {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid color-mix(in oklch, var(--accent) 34%, var(--border));
  border-radius: 999px;
  background: color-mix(in oklch, var(--accent-soft) 78%, white);
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
}

.avatar.ghost {
  color: var(--muted);
  background: var(--panel);
  border-color: var(--border);
}

.share-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 122px;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.share-box .btn { grid-column: 1 / -1; }

.member-list,
.delivery-log {
  display: grid;
  gap: 0;
  margin-top: 14px;
  border-top: 1px solid var(--border);
}

.member-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.member-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.member-row span:last-child { color: var(--muted); font-size: 12px; font-weight: 720; }

.project-status {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.project-status:last-child { border-bottom: 0; }
.project-status strong { font-size: 13px; }
.project-status span { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }

.delivery-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
  gap: 18px;
  align-items: stretch;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(135deg, white 0%, color-mix(in oklch, var(--blue-soft) 48%, white) 100%),
    white;
}

.delivery-hero h2 {
  margin: 12px 0 0;
  max-width: 760px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.delivery-hero p {
  max-width: 780px;
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.delivery-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.delivery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, .82fr);
  gap: 14px;
}

.section-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-line h2 { margin: 0; font-size: 18px; }
.section-line p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; }

.delivery-package-list {
  display: grid;
  gap: 10px;
}

.delivery-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in oklch, var(--surface) 92%, var(--panel));
}

.delivery-item.active {
  border-color: color-mix(in oklch, var(--accent) 58%, var(--border));
  background: var(--accent-soft);
}

.delivery-item strong { display: block; font-size: 14px; }
.delivery-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }

.item-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: var(--fg);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
}

.customer-preview {
  min-height: 276px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(rgba(16,163,127,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16,163,127,.12) 1px, transparent 1px),
    white;
  background-size: 22px 22px;
}

.mini-tree {
  display: grid;
  gap: 8px;
}

.mini-tree div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,.86);
}

.mini-tree span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  font-family: var(--font-mono);
}

.mini-tree strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.mini-tree em { color: var(--muted); font-family: var(--font-mono); font-size: 12px; font-style: normal; }

.acceptance-list {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.acceptance-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
  font-size: 13px;
  font-weight: 650;
}

.delivery-assets {
  display: grid;
  gap: 10px;
}

.delivery-assets div {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.86);
}

.delivery-assets strong { display: block; font-family: var(--font-mono); font-size: 13px; }
.delivery-assets span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  transform: translateY(14px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 14px;
  border-radius: 12px;
  color: white;
  background: var(--fg);
  box-shadow: var(--shadow);
  transition: 180ms ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1180px) {
  .page-shell { grid-template-columns: 1fr; }
  .rail { position: relative; height: auto; display: block; border-right: 0; border-bottom: 1px solid var(--border); }
  .rail nav { display: flex; gap: 6px; overflow-x: auto; }
  .rail-card, .rail-label { display: none; }
  .split { grid-template-columns: 1fr; }
  .tree-panel { min-height: auto; }
  .tree { max-height: 320px; }
  .hero { grid-template-columns: 1fr; }
  .scheme-grid, .screen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-board { grid-template-columns: 1fr; }
  .delivery-hero, .delivery-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .main { padding: 14px; }
  .topbar, .work-head { align-items: flex-start; flex-direction: column; }
  .cols-2, .cols-3, .cols-4, .flow, .scheme-grid, .screen-grid { grid-template-columns: 1fr; }
  .part-form { grid-template-columns: 1fr; }
  .part-form .field, .part-form .field:nth-child(4n) { border-right: 0; }
  .part-form .field.wide { grid-column: span 1; }
  .gallery { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding: 24px; background: white; }
  .tabs { width: 100%; }
  .project-toolbar, .project-card, .share-box { grid-template-columns: 1fr; }
  .delivery-summary, .delivery-item { grid-template-columns: 1fr; }
}
