/* Дизайн-код: эстетика, вкус, ландшафт, озеленение, доверие, мой дом, уют.
   Плёночная палитра: слоновая кость, мох, лён, терракота. */
:root {
  --bg: #ece8de;
  --card: #f7f4ec;
  --text: #22251c;
  --muted: #6c6d5f;
  --line: #d9d3c4;
  --moss: #2e3626;
  --moss-2: #44502f;
  --linen: #d8cdb5;
  --snow: #f1ede3;
  --spruce: #3f5a3a;
  --radius: 18px;
  --shadow: 0 1px 1px rgba(46, 54, 38, 0.04), 0 10px 30px rgba(46, 54, 38, 0.07);
  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Inter Tight", system-ui, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --accent: #a4492f;
  --accent-ink: #fbf7ef;
  --btn: #2e3626;
  --btn-ink: #f4efe4;
  --good: #3d6b3a;
  --good-bg: #e2e8d3;
  --bad: #a13a26;
  --bad-bg: #f3e1d8;
  --mixed: #8a6420;
  --mixed-bg: #f2e7cf;
  --period: #f1dfae;
  --door: #2f5f8a;
  --room-kitchen: #f1e1c3;
  --room-bedroom: #dfe3e3;
  --room-utility: #e3dfd5;
  --room-hall: #f4f0e7;
  --room-office: #e1e6d2;
  --furniture: #5c5a50;
  --window: #4f86ad;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15170f;
    --card: #1d2017;
    --text: #ebe6d9;
    --muted: #a5a491;
    --line: #34382a;
    --snow: #20241a;
    --linen: #4a4536;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --accent: #d77a5a;
    --accent-ink: #15170f;
    --btn: #d8cdb5;
    --btn-ink: #1d2017;
    --good: #9cc58b;
    --good-bg: #26311f;
    --bad: #ec8f78;
    --bad-bg: #3a221a;
    --mixed: #e2bb6a;
    --mixed-bg: #3a3118;
    --period: #4a3e16;
    --door: #86b6dd;
    --room-kitchen: #463a23;
    --room-bedroom: #2b3233;
    --room-utility: #33332c;
    --room-hall: #262920;
    --room-office: #2d3a24;
    --furniture: #cfcabb;
    --window: #8cc0e4;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

/* Плёночное зерно поверх всей страницы */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.serif { font-family: var(--serif); font-style: italic; }

/* ---- Шапка и вкладки ---- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 1100;
  color: var(--text);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.masthead-in { max-width: 1480px; margin: 0 auto; padding: 10px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand .logo { width: 30px; height: 30px; flex: none; color: var(--moss-2); }
.brand b { display: block; font: 500 26px/1 var(--serif); letter-spacing: 0.01em; }
.brand small { display: block; font: 400 10px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.tabs { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; max-width: 100%; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--card) 70%, transparent); border: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 8px 16px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px;
  border-radius: 999px; transition: color 0.2s, background 0.2s;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-selected="true"] { color: var(--btn-ink); background: var(--btn); }
.tab-ico { font-size: 13px; opacity: 0.8; }
.tab-short { display: none; }

.intro { max-width: 1480px; margin: 0 auto; padding: 40px 24px 8px; }
.intro h1 { margin: 0; font: 300 clamp(32px, 5vw, 64px)/1.02 var(--display); letter-spacing: -0.03em; }
.intro p { margin: 12px 0 0; color: var(--muted); max-width: 720px; font-size: 16px; }
.tab-page[hidden] { display: none; }

/* ---- Главная ---- */
.home { max-width: 1480px; margin: 0 auto; padding: 16px 24px 24px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 24px; align-items: stretch; min-height: calc(100vh - 100px); }
.hero-text { display: flex; flex-direction: column; justify-content: space-between; padding: 24px 0 8px; }
.hero-coords { color: var(--muted); margin: 0; }
.hero-title { margin: 32px 0 0; font-weight: 300; font-family: var(--display); line-height: 0.9; }
.hero-title span { display: block; }
.hero-title .t-small { font-size: clamp(30px, 3.6vw, 56px); letter-spacing: -0.02em; padding-left: 0.08em; color: var(--muted); }
.hero-title .t-big { font-size: clamp(96px, 17vw, 260px); letter-spacing: 0.06em; line-height: 0.82; }
.hero-title .t-serif { font: italic 400 clamp(34px, 4.4vw, 68px)/1 var(--serif); letter-spacing: -0.01em; color: var(--moss-2); margin-top: 0.55em; padding-left: 0.12em; }
.hero-lead { margin: 36px 0 0; color: var(--moss-2); font-size: 12px; letter-spacing: 0.16em; }
.hero-desc { max-width: 460px; color: var(--muted); font-size: 16px; margin: 20px 0 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  background: var(--btn); color: var(--btn-ink); border: 1px solid var(--btn);
  border-radius: 999px; padding: 13px 24px; font-weight: 500; font-size: 15px; transition: transform 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--text); border-color: color-mix(in srgb, var(--text) 35%, transparent); }
.hero-photo { position: relative; margin: 0; border-radius: 28px; overflow: hidden; min-height: 560px; background: var(--moss); }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 45%; animation: breathe 18s ease-in-out infinite alternate; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 22, 14, 0.28), transparent 22%, transparent 70%, rgba(20, 22, 14, 0.45)); }
.hero-photo figcaption { position: absolute; z-index: 1; inset: auto 22px 20px; display: flex; justify-content: space-between; gap: 12px; color: #f2ecdf; }
@keyframes breathe { from { transform: scale(1.02); } to { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .hero-photo img { animation: none; } html { scroll-behavior: auto; } }

.captions { display: flex; justify-content: space-between; gap: 12px; margin: 96px 0 18px; color: var(--muted); font-size: 22px; }
.section-title { margin: 0; text-align: center; font: 300 clamp(32px, 4.6vw, 64px)/1.02 var(--display); letter-spacing: -0.035em; }
.section-lead { max-width: 560px; margin: 18px auto 0; text-align: center; color: var(--muted); font-size: 16px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 44px; }
.step-card {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 420px; padding: 20px;
  border-radius: 24px; overflow: hidden; color: #f2ecdf; text-decoration: none; isolation: isolate;
  background: url("../img/hero.jpg") var(--pos) / 320% no-repeat, var(--moss);
}
.step-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20, 22, 14, 0.15), rgba(20, 22, 14, 0.62)); transition: background 0.3s; }
.step-card:hover::before { background: linear-gradient(180deg, rgba(20, 22, 14, 0.05), rgba(20, 22, 14, 0.5)); }
.step-name { font: 300 clamp(26px, 2.4vw, 34px)/1.05 var(--display); letter-spacing: -0.02em; margin-top: auto; }
.step-go { position: absolute; right: 20px; bottom: 20px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #f2ecdf; color: var(--moss); font-size: 18px; transition: transform 0.25s; }
.step-card:hover .step-go { transform: rotate(-45deg); }

.code { margin-top: 96px; padding: 8px clamp(18px, 4vw, 56px) 56px; border-radius: 36px; background: var(--moss); color: #ece5d6; }
.code .captions { color: rgba(236, 229, 214, 0.6); margin-top: 32px; }
.code-list { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 32px; }
.code-list li { display: grid; align-content: start; grid-template-columns: 40px 1fr; gap: 2px 12px; padding: 22px 0; border-top: 1px solid rgba(236, 229, 214, 0.18); }
.code-list .mono { color: rgba(236, 229, 214, 0.55); padding-top: 8px; }
.code-list b { font: 400 30px/1.1 var(--serif); font-style: italic; }
.code-list p { grid-column: 2; margin: 4px 0 0; color: rgba(236, 229, 214, 0.72); font-size: 15px; }

.outro { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 96px 0 40px; }
.outro .serif { font-size: clamp(30px, 4vw, 52px); margin: 0; color: var(--moss-2); }

.foot { max-width: 1480px; margin: 0 auto; padding: 24px 24px 36px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.foot p { margin: 4px 0; }
.foot-mark { font: 400 clamp(48px, 10vw, 140px)/0.9 var(--serif); color: var(--text); letter-spacing: -0.02em; margin-bottom: 0.3em !important; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 18px;
  padding: 20px 24px;
  align-items: start;
  max-width: 1480px;
  margin: 0 auto;
}
.plan-layout, .garden-layout { grid-template-columns: 360px minmax(0, 1fr); }
.garden-layout { grid-template-columns: 340px minmax(0, 1fr); }

.map-wrap { position: sticky; top: 76px; }
.card.flush { padding: 8px; }
#map { height: calc(100vh - 150px); min-height: 360px; border-radius: 12px; }
.map-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.hint { color: var(--muted); margin: 6px 4px 2px; font-size: 13px; }

.panel { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.card h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font: 400 20px/1.2 var(--display); letter-spacing: -0.015em; }
.card h2 .num {
  display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none;
  border-radius: 50%; border: 1px solid var(--line); color: var(--muted); font: 400 12px var(--mono);
}
.note { color: var(--muted); font-size: 13px; margin: 6px 0 0; }

label { display: block; margin: 6px 0; font-size: 13px; color: var(--muted); }
input, select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 4px;
}
input:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 0; border-color: var(--accent); }
input[type="range"] { accent-color: var(--moss-2); padding: 0; border: 0; background: none; }
input[type="radio"] { width: auto; margin: 0 6px 0 0; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; margin-top: 8px; }
.row input[type="number"] { width: 90px; flex: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

label.check { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 14px; margin: 8px 0; }
input[type="checkbox"] { width: auto; margin: 0; }

.plans { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.plan { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.plan-cell { fill: var(--card); stroke: var(--line); stroke-width: 1; }
.plan-cell.facing { fill: var(--bad-bg); }
.plan-cell.sitting { fill: var(--bg); }
.plan-outline { fill: none; stroke: var(--text); stroke-width: 2; }
.plan-facade { stroke: var(--accent); stroke-width: 6; }
.plan-star { fill: var(--text); font-weight: 700; font-family: inherit; }
.plan-star.wang { fill: var(--accent); }
.plan-dir, .plan-base { fill: var(--muted); font-family: inherit; }
.plan-label { fill: var(--text); font-size: 12px; font-family: inherit; }
.plan-label.muted { fill: var(--muted); }
.plan-title { fill: var(--text); font-size: 14px; font-weight: 700; font-family: inherit; }
.plan-north { fill: var(--accent); }
.room-kitchen, .room-lounge { fill: var(--room-kitchen); }
.room-bedroom, .room-guest { fill: var(--room-bedroom); }
.room-utility { fill: var(--room-utility); }
.room-hall, .room-entry, .room-extra { fill: var(--room-hall); }
.room-office { fill: var(--room-office); }
.room-name { fill: var(--text); font-weight: 700; font-family: inherit; paint-order: stroke; stroke: var(--card); stroke-width: 3px; stroke-linejoin: round; }
.room-stars { fill: var(--text); font-weight: 700; font-family: inherit; paint-order: stroke; stroke: var(--card); stroke-width: 3px; }
.pill { stroke: none; }
.pill-text { font-weight: 700; font-family: inherit; }
rect.pill-wang { fill: var(--accent); }
text.pill-wang { fill: var(--accent-ink); }
rect.pill-good { fill: var(--good-bg); stroke: var(--good); stroke-width: 1; }
text.pill-good { fill: var(--good); }
rect.pill-mid { fill: var(--card); stroke: var(--muted); stroke-width: 1; }
text.pill-mid { fill: var(--muted); }
rect.pill-bad { fill: var(--bad-bg); stroke: var(--bad); stroke-width: 1; }
text.pill-bad { fill: var(--bad); }
.pill-inline { display: inline-block; border-radius: 999px; padding: 0 6px; font-weight: 700; font-size: 12px; border: 1px solid var(--muted); }
.pill-inline.pill-wang { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pill-inline.pill-good { background: var(--good-bg); color: var(--good); border-color: var(--good); }
.pill-inline.pill-mid { background: var(--card); color: var(--muted); }
.pill-inline.pill-bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.furn { fill: none; stroke: var(--furniture); stroke-width: 1.5; }
.furn-fill { fill: var(--furniture); opacity: 0.35; }
.furn-label { fill: var(--furniture); font-size: 9px; font-family: inherit; }
.layout-notes li { margin: 4px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip { background: var(--snow); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.steppers { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 8px 0; }
.stepper { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.stepper .step { width: 32px; height: 32px; padding: 0; font-size: 18px; line-height: 1; }
.stepper output { min-width: 1.5em; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.variants { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.variant { border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.variant-plans { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.variant .plan { max-width: 100%; }
.cell-hit { fill: transparent; cursor: pointer; }
.cell-hit:hover { fill: var(--accent); fill-opacity: 0.08; }
.cell-hit.selected { fill: var(--accent); fill-opacity: 0.15; stroke: var(--accent); stroke-width: 2; }
.door-gap { stroke: var(--card); stroke-width: 5; }
.door-leaf { fill: none; stroke: var(--text); stroke-width: 1; }
.window-gap { stroke: var(--card); stroke-width: 5; }
.window-line { stroke: var(--window); stroke-width: 1.2; }
.editor { border: 1px solid var(--accent); border-radius: 8px; padding: 10px; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.editor .fits { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; }
.custom-rooms { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.custom-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; align-items: end; }
.plan-wall { stroke: var(--text); stroke-width: 2; stroke-linecap: square; }
.plan-facade { stroke-linecap: square; }
.plan-cut { stroke: none; }
.hatch-line { stroke: var(--bad); stroke-width: 1.6; }
.plan-star.missing, .plan-dir.missing, .plan-base.missing { fill: var(--bad); }
.alarm { fill: var(--bad); color: var(--bad); }
.missing-star .alarm { font-size: 0.6em; vertical-align: super; }

.table-wrap { overflow-x: auto; }
h3.sub { font-size: 14px; margin: 12px 0 4px; }
.fit-table th, .fit-table td { text-align: center; }
.fit-table th:first-child, .fit-table td:first-child { text-align: left; }
.fit-table .stars-pair { font-weight: 700; white-space: nowrap; }
.fit { font-weight: 700; }
.fit-good { color: var(--good); background: var(--good-bg); }
.fit-ok { color: var(--mixed); }
.fit-fix { color: var(--mixed); background: var(--mixed-bg); }
.fit-bad { color: var(--bad); background: var(--bad-bg); }
.fit-none, .fit-na { color: var(--muted); }
.sector-desc { font-size: 14px; }
.sector-desc p { margin: 4px 0; }
.facade-table th, .facade-table td { text-align: center; }
.facade-table th:first-child, .facade-table td:first-child { text-align: left; }
.facade-table input { width: auto; margin: 0; }
.facade-table .score td { font-weight: 700; }
.facade-table .best { background: var(--good-bg); }
details { margin-top: 8px; }
summary { cursor: pointer; color: var(--moss-2); font-size: 14px; font-weight: 500; padding: 4px 0; }
.guide { font-size: 14px; }
.guide h3 { font-size: 14px; margin: 12px 0 4px; }
.guide p, .guide ul, .guide ol { margin: 4px 0; }
.guide ul, .guide ol { padding-left: 20px; }
.plan-door { stroke: var(--door); stroke-width: 7; stroke-linecap: butt; }
.plan-door-label { fill: var(--door); font-size: 11px; font-weight: 700; font-family: inherit; }

.shape { border-left: 2px solid var(--line); padding-left: 10px; margin: 6px 0; }
.cut { border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 6px; }
.cut-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text); }
.cell.missing { background: repeating-linear-gradient(45deg, var(--bad-bg) 0 5px, var(--card) 5px 10px); border-color: var(--bad); }
.missing-star { color: var(--bad); }
.house-label.missing { color: #c0271a; background: rgba(255, 235, 232, 0.92); }

fieldset.radio { border: 0; padding: 0; margin: 8px 0 0; }
fieldset.radio legend { font-size: 13px; color: var(--muted); padding: 0; }
fieldset.radio label { display: flex; align-items: center; color: var(--text); font-size: 14px; margin: 4px 0; }

button {
  font: inherit;
  border: 1px solid var(--btn);
  background: var(--btn);
  color: var(--btn-ink);
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 500;
  cursor: pointer;
  transition: filter 0.15s, background 0.15s;
}
button:hover { filter: brightness(1.08); }
button.secondary { background: transparent; color: var(--text); border-color: color-mix(in srgb, var(--text) 30%, transparent); }
button.active { outline: 2px solid var(--accent); outline-offset: 2px; }
button.link { border: 0; background: none; color: var(--accent); padding: 0 4px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.big { font-size: 18px; }

.msg { border-radius: 10px; padding: 10px 12px; margin-top: 8px; font-size: 14px; }
.msg strong { display: block; }
.msg.good { background: var(--good-bg); color: var(--good); }
.msg.bad { background: var(--bad-bg); color: var(--bad); }
.msg.mixed { background: var(--mixed-bg); color: var(--mixed); }

.stars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 8px;
}
.cell {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  text-align: center;
  position: relative;
  min-height: 78px;
}
.cell.facing { border: 2px solid var(--accent); }
.cell.sitting { border: 2px dashed var(--muted); }
.cell .dir { font-size: 11px; color: var(--muted); }
.stars-grid[hidden], .plans[hidden] { display: none; }
.cell .pair { display: flex; justify-content: center; gap: 14px; font-size: 22px; font-weight: 700; }
.cell .base { font-size: 13px; color: var(--muted); }
.cell .tag { position: absolute; top: 2px; right: 4px; font-size: 10px; color: var(--accent); }
.star-wang { background: var(--period); border-radius: 4px; padding: 0 3px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.good { color: var(--good); }
td.bad { color: var(--bad); }

.person { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.person:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.person .grid3 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; align-items: end; }
.person .grid3 button { justify-self: start; margin-bottom: 8px; }

/* Подписи на карте */
.house-label {
  background: rgba(255, 255, 255, 0.88);
  color: #111;
  border-radius: 4px;
  font: 600 12px/1.1 system-ui, sans-serif;
  text-align: center;
  padding: 2px 3px;
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}
.house-label small { font-weight: 400; color: #555; }
.sector-label { color: #fff; font: 700 13px system-ui, sans-serif; text-shadow: 0 0 3px #000, 0 0 3px #000; white-space: nowrap; }
.handle { width: 18px; height: 18px; border-radius: 50%; background: #b23a2b; border: 3px solid #fff; box-shadow: 0 0 3px #000; cursor: grab; }
.mover { width: 16px; height: 16px; border-radius: 3px; background: #fff; border: 3px solid #b23a2b; box-shadow: 0 0 3px #000; cursor: move; }

/* ---- Мебель и утверждение планировки ---- */
.furn-cat { margin-top: 10px; }
.furn-cat .chips { margin: 4px 0 0; }
.uf { fill: var(--card); stroke: var(--furniture); stroke-width: 1.2; }
.uf-soft { fill: color-mix(in srgb, var(--furniture) 18%, var(--card)); stroke: var(--furniture); stroke-width: 0.8; }
.uf-dark { fill: var(--furniture); }
.uf-rug { fill: color-mix(in srgb, var(--accent) 12%, transparent); stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 2; }
.uf-line { stroke: var(--furniture); stroke-width: 0.8; }
.uf-label { fill: var(--furniture); font-family: var(--font); font-weight: 600; pointer-events: none; }
.ufurn { cursor: grab; }
.ufurn.sel .uf, .ufurn.sel .uf-rug { stroke: var(--accent); stroke-width: 2; }
.plans.placing .plan { cursor: crosshair; }
.plan.no-auto .furn, .plan.no-auto .furn-fill, .plan.no-auto .furn-label, .plan.no-auto .auto-furn { display: none; }
.afurn { pointer-events: none; }
#furn-edit .editor { box-shadow: var(--shadow); background: var(--card); }
#layout-plans .plan { touch-action: none; }
.wall-hit { fill: transparent; }
.wall-hit.v { cursor: ew-resize; }
.wall-hit.h { cursor: ns-resize; }
.wall-hit:hover { fill: var(--accent); fill-opacity: 0.18; }
.door-hit { fill: transparent; cursor: grab; }
.door-hit:hover { fill: var(--door); fill-opacity: 0.25; }
.door-hit.sel { fill: var(--door); fill-opacity: 0.4; stroke: var(--door); stroke-width: 1.5; }
.wall-knob { cursor: grab; touch-action: none; }
.wall-knob.v { cursor: ew-resize; }
.wall-knob.h { cursor: ns-resize; }
.wall-knob line { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 2 2; }
.wall-knob circle { fill: var(--card); stroke: var(--accent); stroke-width: 2; }
.wall-knob:hover circle { fill: var(--accent); }
.op-jamb { stroke: var(--text); stroke-width: 1.5; }
.op-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.op-list li { display: flex; align-items: center; gap: 8px; }
.op-list select { width: auto; margin: 0; }
.rot-row { display: flex; align-items: center; gap: 8px; color: var(--text); }
.rot-row input { flex: 1; }
.approve { font-size: 16px; padding: 12px 26px; margin-top: 8px; }
.approve-card { border-color: color-mix(in srgb, var(--moss-2) 40%, var(--line)); }
.design-wrap a:not(.btn), .tab-page .note a { color: var(--moss-2); }
.design-wrap { max-width: 1480px; margin: 0 auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.design-plans { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.design-plans .plan { max-width: 100%; height: auto; }
.design-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.sched td:last-child, .sched th:last-child { text-align: right; white-space: nowrap; }
.sched tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.design-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.design-steps li { border: 1px dashed var(--line); border-radius: 14px; padding: 10px 12px; background: var(--snow); }
.design-steps li b { display: block; }
.design-steps li span { color: var(--muted); font-size: 13px; }

/* ---- Чертёж «План расстановки мебели» ---- */
.arch { width: 100%; max-width: 1100px; height: auto; display: block; margin: 0 auto; font-family: "Inter Tight", "Arial Narrow", sans-serif; font-style: italic; }
.a-sheet { fill: #fff; }
.a-title { font-size: 26px; fill: #111; }
.a-floor { fill: #fff; }
.a-furn .furn { fill: none; stroke: #8a8a8a; stroke-width: 1; }
.a-furn .furn-fill { fill: #bdbdbd; opacity: 0.35; }
.a-furn .furn-label { fill: #8a8a8a; font-size: 9px; }
.a-furn .uf, .a-furn .uf-soft { fill: #fff; stroke: #8a8a8a; stroke-width: 1; }
.a-furn .uf-dark { fill: #8a8a8a; }
.a-furn .uf-line { stroke: #8a8a8a; }
.a-furn .uf-rug { fill: none; stroke: #b0b0b0; stroke-dasharray: 3 2; }
.a-furn .uf-label { fill: #8a8a8a; }
.a-wall-ext { stroke: #111; stroke-linecap: square; }
.a-wall-core { stroke: #fff; stroke-linecap: square; }
.a-wall-ins { stroke: #d33; stroke-width: 1; stroke-dasharray: 10 3 2 3; }
.a-wall-int { stroke: #3a3a3a; stroke-linecap: square; }
.a-gap { stroke: #fff; stroke-linecap: butt; }
.a-gap-fill { fill: #fff; }
.a-window { fill: #9cc6e8; stroke: #4a7fa8; stroke-width: 1; }
.a-leaf .door-leaf, .a-entry { fill: none; stroke: #111; stroke-width: 1.2; }
.a-room { font-size: 15px; fill: #111; }
.a-area { font-size: 11px; fill: #111; text-decoration: underline; }
.a-mark { font-size: 15px; fill: #111; }
.a-dim, .a-ext { stroke: #111; stroke-width: 0.8; }
.a-tick { stroke: #111; stroke-width: 1.6; }
.a-dimt { font-size: 14px; fill: #111; }
.a-axis { stroke: #d33; stroke-width: 0.8; stroke-dasharray: 14 4 3 4; }
.a-bubble { fill: #fff; stroke: #111; stroke-width: 1.2; }
.a-axt { font-size: 16px; fill: #111; }
.a-note { font-size: 13px; fill: #555; }
.a-north { fill: #d33; }
.design-plans .arch { border: 1px solid var(--line); border-radius: 12px; }

/* ---- Эскизный проект: листы А4 ---- */
.agree { align-items: flex-start; line-height: 1.4; }
.agree input { margin-top: 3px; }
.agree-card summary { font: 400 16px var(--display); }
.mats { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.mat { display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--snow); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-weight: 400; }
.mat:hover { filter: none; border-color: var(--moss-2); }
.mat.on { border: 2px solid var(--moss-2); background: color-mix(in srgb, var(--moss-2) 8%, var(--card)); }
.mat b { font-weight: 600; }
.mat span { font-size: 13px; color: var(--moss-2); }
.mat .note { color: var(--muted); margin: 0; }
.grid3.params { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 12px; }
.sites label.check { margin: 4px 0; }
fieldset.geo { border: 0; padding: 0; margin: 0; }
fieldset.geo[disabled] { opacity: 0.45; }
.nogeo { margin-top: 10px; color: var(--bad); }
.variants-abc ul { margin: 4px 0; padding-left: 20px; font-size: 14px; }
.variants-abc p { margin: 8px 0 2px; }
.quiz-q { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.quiz-a { display: flex; gap: 12px; }
.quiz-a label { display: flex; align-items: center; gap: 4px; margin: 0; color: var(--text); font-size: 14px; }
.quiz .msg ul, .lens ul, .lens ol { margin: 4px 0; padding-left: 20px; font-size: 14px; }
.lens p { margin: 6px 0; font-size: 14px; }
tr.on-row td { background: color-mix(in srgb, var(--moss-2) 10%, transparent); }
.found-pick .chip[disabled] { opacity: 0.45; cursor: not-allowed; }
.found-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.found-when ul { margin: 4px 0; padding-left: 20px; font-size: 14px; }
.found-when p { margin: 4px 0; }
table.cmp th.on, table.cmp td.on { background: color-mix(in srgb, var(--moss-2) 10%, transparent); }
.checks { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.checks li { border-left: 3px solid var(--muted); background: var(--snow); border-radius: 4px; padding: 6px 10px; }
.checks li.good { border-color: var(--good); }
.checks li.bad { border-color: var(--bad); }
.checks li.mixed { border-color: var(--mixed); }
.checks .note { display: block; margin: 2px 0 0; font-size: 12px; }
.sheets-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.sheets-head h2 { margin: 0; }
.sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-top: 12px; }
.sheet-wrap { background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12); border-radius: 4px; overflow: hidden; }
svg.sheet { display: block; width: 100%; height: auto; font-family: "Inter Tight", "Arial Narrow", sans-serif; font-style: italic; }
.sh-t { fill: #000; }
.sh-l { stroke: #000; stroke-width: 0.25; fill: none; }
.sh-thick { stroke: #000; stroke-width: 0.6; fill: none; }
.sh-dim { stroke: #000; stroke-width: 0.15; }
.sh-tick { stroke: #000; stroke-width: 0.35; }
.sh-axis { stroke: #d33; stroke-width: 0.18; stroke-dasharray: 3 1 0.6 1; }
.sh-bub { fill: #fff; stroke: #000; stroke-width: 0.25; }
.sh-dash { stroke: #555; stroke-width: 0.2; stroke-dasharray: 1.5 1; fill: none; }
.sh-found { fill: #e9e9e9; stroke: #000; stroke-width: 0.35; }
.sh-grill { fill: #f4f4f4; stroke: #000; stroke-width: 0.3; stroke-dasharray: 1.2 0.6; }
.sh-pile { fill: #fff; stroke: #000; stroke-width: 0.35; }
.sh-ground { fill: #d8d0bf; stroke: #000; stroke-width: 0.2; }
.sh-wall { fill: #e8c99a; stroke: #000; stroke-width: 0.3; }
.sh-ins { fill: #f6e27a; stroke: #000; stroke-width: 0.2; }
.sh-air { fill: #fff; stroke: #000; stroke-width: 0.15; stroke-dasharray: 0.8 0.5; }
.sh-layer { fill: #cfcfcf; stroke: #000; stroke-width: 0.2; }
.sh-floor { fill: #bdbdbd; stroke: #000; stroke-width: 0.2; }
.sh-roof { stroke: #000; stroke-width: 0.6; fill: none; }
.sh-roofface { fill: #8a6a5a; stroke: #000; stroke-width: 0.3; opacity: 0.85; }
.sh-roofface.tiles { fill: #9c7a68; }
.sh-roofplan { fill: #f1ebe4; stroke: #000; stroke-width: 0.5; }
.sh-facade { fill: #f3e7d3; stroke: #000; stroke-width: 0.4; }
.sh-siding { stroke: #000; stroke-width: 0.08; opacity: 0.5; }
.sh-plinth { fill: #c9c4ba; stroke: #000; stroke-width: 0.3; }
.sh-win { fill: #bcd9ee; stroke: #000; stroke-width: 0.3; }
.sh-door { fill: #8c6a4a; stroke: #000; stroke-width: 0.3; }
.sh-beam { stroke: #000; stroke-width: 0.45; }
.sh-mauer { stroke: #7a4a2a; stroke-width: 0.9; }
.sh-gutter { stroke: #2f5f8a; stroke-width: 0.5; stroke-dasharray: 2 1; }
.sh-arrow { stroke: #000; stroke-width: 0.25; fill: none; }

/* ---- Смета ---- */
table.est { font-size: 13px; min-width: 900px; }
table.est th { white-space: nowrap; background: var(--snow); }
table.est td.num { text-align: right; white-space: nowrap; }
table.est tr.est-sec td { background: color-mix(in srgb, var(--moss-2) 12%, var(--card)); font-weight: 700; }
table.est tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
table.est td.note { font-size: 12px; margin: 0; }
.est-price { width: 96px; text-align: right; padding: 4px 6px; margin: 0; font-size: 13px; }
.est-price[data-edited] { border-color: var(--accent); }
.est-total { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 12px; font-size: 15px; }
.est-total b { font: 500 20px var(--display); }
.est-btns { align-self: end; margin-bottom: 6px; }

/* ---- Конструктор участка ---- */
.chip .dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex: none; margin-right: 6px; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.chip small { margin-left: 6px; color: var(--muted); font-size: 11px; }
.chip[aria-pressed="true"] small { color: inherit; opacity: 0.75; }
.chip-group { width: 100%; font: 400 11px var(--mono); color: var(--muted); margin: 14px 0 2px; text-transform: uppercase; letter-spacing: 0.08em; }
.chip-bad { border-color: var(--bad); color: var(--bad); }
.plant-chip b { font-family: var(--mono); font-weight: 500; font-size: 11px; color: var(--accent); }

.sun-head { display: flex; align-items: center; gap: 16px; }
.clock { width: 74px; height: 74px; flex: none; }
.clock svg { width: 100%; height: 100%; }
.clock-face { fill: var(--snow); stroke: var(--line); stroke-width: 2; }
.clock-ticks line { stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.clock-h { stroke: var(--text); stroke-width: 5; stroke-linecap: round; }
.clock-m { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.clock-pin { fill: var(--text); }
.clock-sym { font-size: 16px; fill: #d9a52b; }
.sun-read { flex: 1; min-width: 0; }
.sun-time { display: block; font: 300 44px/1 var(--display); letter-spacing: -0.03em; }
.sun-read .mono { margin: 6px 0 0; color: var(--muted); font-size: 11px; text-transform: none; }
.play { width: 48px; height: 48px; padding: 0; font-size: 16px; flex: none; }
#y-time { margin: 14px 0 4px; width: 100%; }
.y-views { align-items: center; margin-top: 0; }
.y-views .chips { margin: 0; }

.y-plan { margin-top: 12px; }
.y-plan svg { width: 100%; height: auto; max-height: 78vh; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
.y-plot { fill: color-mix(in srgb, var(--spruce) 14%, var(--card)); stroke: var(--spruce); stroke-width: 0.15; stroke-dasharray: 0.8 0.5; }
.y-grid { stroke: color-mix(in srgb, var(--spruce) 18%, transparent); stroke-width: 0.05; }
.y-shadows { opacity: 0.6; }
.y-shadows polygon { fill: #141a0e; }
.y-shadows.glass { opacity: 0.22; }
.y-night { fill: #1b2214; opacity: 0.35; }
.y-obj { cursor: grab; }
.y-obj polygon { stroke: rgba(30, 30, 20, 0.55); stroke-width: 0.12; }
.y-obj.flat polygon { stroke-dasharray: 0.4 0.3; opacity: 0.85; }
.y-obj.glass polygon { opacity: 0.75; }
.y-obj text { fill: #22251c; paint-order: stroke; stroke: rgba(247, 244, 236, 0.85); stroke-width: 0.12; stroke-linejoin: round; font-family: var(--font); font-weight: 500; pointer-events: none; }
.y-house polygon { fill: var(--linen); stroke: var(--text); stroke-width: 0.18; }
.y-facade { fill: none; stroke: var(--accent); stroke-width: 0.5; stroke-linecap: round; }
.y-obj.sel polygon, .y-obj.sel circle:not(.ring):not(.y-comp-dot) { stroke: var(--accent); stroke-width: 0.3; }
.y-plant circle { stroke: rgba(255, 255, 255, 0.85); stroke-width: 0.08; }
.y-plant .ring { fill: none; stroke-width: 0.18; }
.y-plant.lvl-good .ring { stroke: var(--good); }
.y-plant.lvl-mixed .ring { stroke: var(--mixed); }
.y-plant.lvl-bad .ring { stroke: var(--bad); stroke-dasharray: 0.4 0.25; }
.y-plant text { fill: #fff; paint-order: stroke; stroke: rgba(0, 0, 0, 0.45); stroke-width: 0.12; }
.y-north path { fill: var(--accent); }
.y-north text { fill: var(--text); font-family: var(--display); font-weight: 600; }
.y-sun { fill: #f2c94c; stroke: #fff; stroke-width: 0.2; }
.y-sunray { stroke: #e0b030; stroke-width: 0.12; stroke-dasharray: 0.6 0.4; }
.y-scale { stroke: var(--text); stroke-width: 0.18; }
.y-scale-t, .y-dim { fill: var(--muted); font-family: var(--mono); }
.y-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 8px; font-size: 13px; }
.y-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; }
.y-legend .lg-shadow { background: #141a0e; opacity: 0.6; }
.y-legend .lg-sun { background: #f2c94c; border-radius: 50%; }
.y-legend .note { margin: 0; }
.editor .grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0 8px; }
.editor { border-color: var(--line); background: var(--snow); border-radius: 14px; }
.y-warn, .y-plant-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.y-warn li, .y-plant-list li { border-left: 3px solid var(--muted); padding: 4px 10px; border-radius: 4px; background: var(--snow); }
.y-plant-list li { cursor: pointer; }
.y-warn li.bad, .y-plant-list li.bad { border-color: var(--bad); }
.y-plant-list li.good { border-color: var(--good); }
.y-plant-list li.mixed { border-color: var(--mixed); }
.y-plant-list li span { color: var(--muted); font-size: 13px; }
.bed-rows { margin: 6px 0 12px; padding-left: 20px; }
.soil-card .chip-group:first-of-type { margin-top: 6px; }
.soil-help { margin-top: 8px; font-size: 14px; }
.soil-help ol { margin: 6px 0 0; padding-left: 20px; }
.soil-help li { margin: 4px 0; }
.memo { position: sticky; top: 76px; }
.memo ul { padding-left: 18px; margin: 6px 0; font-size: 14px; }
.memo li { margin: 4px 0; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 10px 0 18px; }
.preset { display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--snow); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 8px 10px 10px; font-weight: 400; }
.preset:hover { border-color: var(--moss-2); filter: none; }
.preset-pic { display: block; border-radius: 10px; overflow: hidden; }
.preset-pic .elev { min-width: 0; margin: 0; }
.preset-pic .elev text, .preset-pic .elev line { display: none; }
.preset b { font-weight: 600; font-size: 14px; line-height: 1.25; }
.preset-side { font: 400 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
.preset-add { color: var(--moss-2); font-weight: 600; font-size: 13px; }
.comp-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.comp-list li { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--snow); cursor: pointer; transition: border-color 0.2s; }
.comp-list li:hover { border-color: var(--moss-2); }
.comp-list b { display: block; font-weight: 600; }
.comp-list span { color: var(--muted); font-size: 13px; }
.y-comp-dot { stroke: rgba(255, 255, 255, 0.8); stroke-width: 0.05; pointer-events: none; }
.y-scn circle { fill: none; stroke: var(--accent); stroke-width: 0.25; stroke-dasharray: 0.6 0.4; }
.y-scn text { fill: var(--accent); font-family: var(--font); font-weight: 600; paint-order: stroke; stroke: var(--card); stroke-width: 0.25; }
.y-door { fill: var(--door); }
.y-dialog { width: min(820px, calc(100vw - 24px)); max-height: calc(100vh - 32px); border: 1px solid var(--line); border-radius: 22px; padding: 18px 20px; background: var(--card); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3); }
.y-dialog::backdrop { background: rgba(20, 22, 14, 0.45); backdrop-filter: blur(3px); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dlg-head h3 { margin: 0; font: 400 24px/1.2 var(--display); letter-spacing: -0.02em; }
.dlg-head button { width: 40px; height: 40px; padding: 0; flex: none; }
#y-dlg-pic { overflow-x: auto; }
.elev { width: 100%; min-width: 620px; height: auto; display: block; border-radius: 14px; margin-top: 10px; }
.dlg-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.dlg-list li { border-left: 3px solid var(--good); background: var(--snow); border-radius: 6px; padding: 6px 10px; font-size: 13px; }
.dlg-list li.mixed { border-color: var(--mixed); }
.dlg-list li.bad { border-color: var(--bad); }
.dlg-list b { font-size: 14px; }
.dlg-list .fix { color: var(--moss-2); }
.y-gold line { stroke: #c9a227; stroke-width: 0.12; stroke-dasharray: 0.9 0.5; }
.y-gold circle { fill: #c9a227; stroke: #fff; stroke-width: 0.1; }
.y-gold path { fill: none; stroke: #c9a227; stroke-width: 0.14; opacity: 0.7; }
.y-gold rect { fill: none; stroke: #c9a227; stroke-width: 0.06; opacity: 0.5; }
.y-group { align-items: center; margin: 4px 0 0; }
.y-group .chips { margin: 0; }
.harmony { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.harmony li { border-left: 3px solid var(--muted); background: var(--snow); border-radius: 4px; padding: 8px 12px; font-size: 14px; }
.harmony li.good { border-color: var(--good); }
.harmony li.mixed { border-color: var(--mixed); }
.harmony li b { display: block; }
.harmony li span { color: var(--muted); }
.harmony button { margin-top: 6px; }
.bed-rows li { margin: 6px 0; }
.bed-rows .chips { margin: 4px 0 0; }

@media (max-width: 1100px) {
  .plan-layout, .garden-layout { grid-template-columns: minmax(0, 1fr); }
  .memo { position: static; }
  /* На узком экране схема участка — сразу после палитры */
  .garden-layout > .panel { display: contents; }
  .y-oplot { order: -1; } .y-o0 { order: 0; } .y-o1 { order: 1; } .y-o2 { order: 2; } .y-o3 { order: 3; } .y-o3b { order: 4; } .y-o3c { order: 5; } .y-o4 { order: 6; } .y-o5 { order: 7; } .y-o6 { order: 8; } .y-o7 { order: 9; } .y-o9 { order: 10; }
}

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 12px 16px; }
  .map-wrap { position: static; }
  #map { height: 60vh; }
  .masthead-in { padding: 10px 16px; }
  .tabs { margin-left: 0; width: 100%; }
  .tabs a { flex: 1 0 auto; justify-content: center; padding: 8px 10px; font-size: 13px; }
  .tab-ico { display: none; }
  .intro { padding: 28px 16px 4px; }
  .home { padding: 12px 16px 16px; }
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 8px; }
  .hero-text { padding: 8px 0 0; }
  .hero-title { margin-top: 18px; }
  .hero-photo { min-height: 0; aspect-ratio: 4 / 5; order: -1; border-radius: 22px; }
  .captions { margin-top: 64px; font-size: 18px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step-card { min-height: 260px; }
  .code { margin-top: 64px; border-radius: 26px; }
  .outro { padding: 64px 0 28px; }
  .tab-long { display: none; }
  /* Правка мебели на телефоне — панель внизу экрана, чтобы видеть план */
  #furn-edit .editor { position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 1200; margin: 0; }
  .tab-short { display: inline; }
  .brand small { display: none; }
}

@media print {
  @page { size: A4 portrait; margin: 0; }
  body.print-project > *:not(#tab-design), body.print-project .design-wrap > section:not(.sheets-card), body.print-project .design-wrap > details, body.print-project .intro, body.print-project .sheets-head, body.print-project .sheets-card > .note { display: none !important; }
  body.print-project .design-wrap, body.print-project .sheets-card { padding: 0 !important; margin: 0 !important; border: 0 !important; box-shadow: none !important; background: none !important; max-width: none; }
  body.print-project .sheets { display: block; margin: 0; }
  body.print-project .sheet-wrap { width: 210mm; height: 297mm; box-shadow: none; border-radius: 0; page-break-after: always; break-after: page; overflow: hidden; }
  body.print-project svg.sheet { width: 210mm; height: 297mm; }
  body.print-project::after { display: none; }
  @page est { size: A4 landscape; margin: 10mm; }
  body.print-estimate > *:not(#tab-estimate), body.print-estimate .intro, body.print-estimate .est-head .params, body.print-estimate .est-head > .note { display: none !important; }
  body.print-estimate #tab-estimate { page: est; }
  body.print-estimate .design-wrap { padding: 0; max-width: none; }
  body.print-estimate .card { border: 0; box-shadow: none; padding: 0; background: none; }
  body.print-estimate table.est { min-width: 0; font-size: 9pt; }
  body.print-estimate .est-price { border: 0; width: auto; background: none; padding: 0; }
  body.print-estimate::after { display: none; }
  .no-print, .map-tools, .hint, button, .masthead, .intro p, .home, .foot { display: none !important; }
  .arch { max-width: none; border: 0 !important; }
  body::after { display: none; }
  .card { box-shadow: none; }
  .layout { grid-template-columns: 1fr; }
  .map-wrap { position: static; }
  #map { height: 420px; }
  .card { break-inside: avoid; }
  body { background: #fff; color: #000; }
}
