/* фулл хаус · Blue Living — общие токены и компоненты для двух тем */

.fh {
  --ts: var(--fh-a11y-scale, 1);
  --r-sm: 8px; --r-md: 14px; --r-lg: 16px; --r-xl: 16px;
  font-family: 'Manrope', ui-sans-serif, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}
.fh *, .fh *::before, .fh *::after { box-sizing: border-box; }

/* ---------- Светлая тема ---------- */
.fh.light {
  --app-bg: #F5F6F8;
  --app-solid: #F5F6F8;
  --surface: #FFFFFF;
  --surface-2: #EEF1F6;
  --surface-3: #E1E6F0;
  --line: rgba(8, 9, 15, .08);
  --line-2: rgba(8, 9, 15, .16);
  --text: #08090F;
  --text-2: #42485E;
  --text-3: #5C6380;
  --accent: #2457FF;
  --accent-press: #1A44D6;
  --on-accent: #FFFFFF;
  --accent-soft: #E9EEFF;
  --accent-text: #1D47D8;
  --ok: #14704A;
  --ok-soft: #E2F3EA;
  --warn: #8A4B05;
  --warn-soft: #FFF0DB;
  --scrim: rgba(8, 9, 15, .40);
  --shadow: 0 1px 2px rgba(8, 9, 15, .05), 0 8px 24px rgba(7, 6, 75, .07);
  --shadow-pop: 0 16px 48px rgba(7, 6, 75, .20), 0 2px 6px rgba(8, 9, 15, .08);
  --focus: #2457FF;
  --model-floor: #E9EEFF;
  --model-wall: #F1F4FB;
  --model-wall-2: #E7ECF7;
  --model-line: #7F98E8;
  --model-hi: rgba(36, 87, 255, .22);
  --plan-wall: #08090F;
  color-scheme: light;
}

/* ---------- Тёмная тема ---------- */
.fh.dark {
  --app-bg: #080D28;
  --app-solid: #08090F;
  --surface: #10183A;
  --surface-2: #182142;
  --surface-3: #212863;
  --line: rgba(183, 201, 255, .12);
  --line-2: rgba(183, 201, 255, .24);
  --text: #F5F6F8;
  --text-2: #B7C9FF;
  --text-3: #98A5D2;
  --accent: #2457FF;
  --accent-press: #3D6BFF;
  --on-accent: #FFFFFF;
  --accent-soft: rgba(36, 87, 255, .22);
  --accent-text: #A3B8FF;
  --ok: #67D9A0;
  --ok-soft: rgba(103, 217, 160, .14);
  --warn: #FFBE6E;
  --warn-soft: rgba(255, 190, 110, .14);
  --scrim: rgba(3, 4, 14, .62);
  --shadow: 0 1px 0 rgba(183, 201, 255, .05) inset, 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-pop: 0 20px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(183, 201, 255, .14);
  --focus: #B7C9FF;
  --model-floor: #18205A;
  --model-wall: #121845;
  --model-wall-2: #1A2156;
  --model-line: #6F8DFF;
  --model-hi: rgba(36, 87, 255, .45);
  --plan-wall: #F5F6F8;
  color-scheme: dark;
}

/* ---------- Типографика ---------- */
.fh .num { font-family: inherit; font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; letter-spacing: -.01em; }
.fh .t-brand { font-size: calc(28px * var(--ts)); line-height: 1.15; font-weight: 800; letter-spacing: -.035em; margin: 0; }
.fh .t-display { font-size: calc(40px * var(--ts)); line-height: 1.1; font-weight: 600; letter-spacing: -.03em; margin: 0; }
.fh .t-h1 { font-size: calc(22px * var(--ts)); line-height: 1.25; font-weight: 600; letter-spacing: -.02em; margin: 0; }
.fh .t-h2 { font-size: calc(19px * var(--ts)); line-height: 1.3; font-weight: 600; letter-spacing: -.015em; margin: 0; }
.fh .t-h3 { font-size: calc(17px * var(--ts)); line-height: 1.35; font-weight: 600; margin: 0; }
.fh .t-body { font-size: calc(17px * var(--ts)); line-height: 1.5; font-weight: 400; margin: 0; }
.fh .t-sub { font-size: calc(15px * var(--ts)); line-height: 1.45; font-weight: 500; margin: 0; }
.fh .t-cap { font-size: calc(14px * var(--ts)); line-height: 1.4; font-weight: 500; margin: 0; }
.fh .t-over { font-size: calc(15px * var(--ts)); line-height: 1.4; font-weight: 600; letter-spacing: 0; text-transform: none; margin: 0; color: var(--text-3); }
.fh .c2 { color: var(--text-2); }
.fh .c3 { color: var(--text-3); }
.fh .ca { color: var(--accent-text); }
.fh.lg { --ts: max(1.18, var(--fh-a11y-scale, 1)); }

/* ---------- Поверхности ---------- */
.fh .screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--app-bg); animation: fh-in .26s cubic-bezier(.2, .7, .2, 1); }
.fh .pane { animation: fh-fade .22s ease; }
.fh .scroll { overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.fh .scroll::-webkit-scrollbar { display: none; }
.fh .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: none; }
.fh .hair { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Кнопки ---------- */
.fh button, .fh a, .fh input { font: inherit; color: inherit; }
.fh .btn { appearance: none; border: 0; width: 100%; min-height: 56px; padding: 12px 24px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: calc(17px * var(--ts)); cursor: pointer; text-decoration: none; transition: background-color .16s ease, transform .16s ease, color .16s ease; }
.fh .btn:active { transform: scale(.985); }
.fh .btn-primary { background: var(--accent); color: var(--on-accent); }
.fh .btn-primary:hover { background: var(--accent-press); }
.fh .btn-primary:disabled { background: var(--surface-3); color: var(--text-3); cursor: not-allowed; transform: none; }
.fh .btn-soft { background: var(--accent-soft); color: var(--accent-text); }
.fh .btn-soft:hover { background: var(--surface-3); }
.fh .btn-ghost { background: transparent; color: var(--accent-text); min-height: 48px; }
.fh .btn-ghost:hover { background: var(--accent-soft); }
.fh .btn-sm { min-height: 48px; width: auto; padding: 0 16px; border-radius: 14px; font-size: calc(15px * var(--ts)); }
.fh .icon-btn { appearance: none; border: 0; width: 48px; height: 48px; flex: none; border-radius: 24px; background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; transition: background-color .16s ease; }
.fh .icon-btn:hover { background: var(--surface-2); }
.fh .icon-btn.on { background: var(--accent-soft); color: var(--accent-text); }
.fh .icon-btn.glass { background: rgba(8, 9, 15, .55); color: #FFFFFF; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.fh .icon-btn.glass:hover { background: rgba(8, 9, 15, .72); }
.fh svg.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.fh svg.i-sm { width: 20px; height: 20px; }
.fh :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Списки ---------- */
.fh .row { appearance: none; border: 0; width: 100%; min-height: 56px; padding: 8px 16px; display: flex; align-items: center; gap: 16px; background: transparent; color: var(--text); text-align: left; cursor: pointer; transition: background-color .16s ease; text-decoration: none; }
.fh .row:hover { background: var(--surface-2); }
.fh .row-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }

/* ---------- Вкладки и сегменты ---------- */
.fh .seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--surface-2); }
.fh .seg-btn { appearance: none; border: 0; min-height: 48px; padding: 4px 8px; border-radius: 12px; background: transparent; color: var(--text-2); font-weight: 600; font-size: calc(15px * var(--ts)); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; transition: background-color .18s ease, color .18s ease; }
.fh .seg-btn:hover { color: var(--text); }
.fh .seg-btn.on { background: var(--accent); color: var(--on-accent); }
.fh .seg-btn .num { font-size: calc(12px * var(--ts)); font-weight: 500; opacity: .85; }

/* ---------- Чипы ---------- */
.fh .chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 10px; border-radius: 999px; font-size: calc(13px * var(--ts)); font-weight: 600; line-height: 1.3; white-space: nowrap; }
.fh .chip-ok { background: var(--ok-soft); color: var(--ok); }
.fh .chip-warn { background: var(--warn-soft); color: var(--warn); }
.fh .chip-info { background: var(--accent-soft); color: var(--accent-text); }
.fh .chip-mute { background: var(--surface-2); color: var(--text-2); }
.fh .chip-photo { background: rgba(8, 9, 15, .58); color: #FFFFFF; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.fh .dot { width: 8px; height: 8px; border-radius: 4px; background: currentColor; flex: none; }

/* ---------- Баннеры ---------- */
.fh .banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); }
.fh .banner-info { background: var(--accent-soft); color: var(--text); }
.fh .banner-info svg { color: var(--accent-text); }
.fh .banner-warn { background: var(--warn-soft); color: var(--text); }
.fh .banner-warn svg { color: var(--warn); }

/* ---------- Карточка помещения ---------- */
.fh .room { appearance: none; border: 1px solid var(--line); padding: 0; width: 100%; text-align: left; cursor: pointer; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; box-shadow: none; color: var(--text); display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.fh .room:hover { border-color: var(--line-2); }
.fh .room:active { transform: scale(.99); }
.fh .room img { display: block; width: 100%; height: 128px; object-fit: cover; }
.fh .room .go { color: var(--accent-text); }

/* ---------- Выбор материала ---------- */
.fh .mat { appearance: none; width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-md); padding: 8px 16px 8px 8px; display: flex; align-items: center; gap: 16px; text-align: left; cursor: pointer; color: var(--text); min-height: 80px; transition: border-color .16s ease, box-shadow .16s ease; }
.fh .mat:hover { border-color: var(--line-2); }
.fh .mat.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.fh .mat img, .fh .mat .flat { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; display: block; }
.fh .mat .flat { background: linear-gradient(160deg, #FFFFFF 0%, #E7EAF1 100%); border: 1px solid var(--line); }
.fh .radio { width: 24px; height: 24px; border-radius: 12px; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; transition: border-color .16s ease, background-color .16s ease; }
.fh .radio.on { border-color: var(--accent); background: var(--accent); color: #FFFFFF; }

/* ---------- Степпер и поля ---------- */
.fh .step { display: flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 14px; padding: 2px; }
.fh .step button { appearance: none; border: 0; width: 48px; height: 44px; border-radius: 12px; background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; }
.fh .step button:hover { background: var(--surface-3); }
.fh .field { width: 100%; min-height: 52px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); padding: 0 16px; font-size: calc(17px * var(--ts)); font-weight: 500; }
.fh .field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Прогресс ---------- */
.fh .bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.fh .bar span { height: 6px; border-radius: 3px; background: rgba(183, 201, 255, .22); transition: background-color .3s ease; }
.fh .bar span.on { background: var(--accent); }

/* ---------- Оверлеи ---------- */
.fh .scrim { position: absolute; inset: 0; border: 0; padding: 0; background: var(--scrim); cursor: pointer; animation: fh-fade .2s ease; }
.fh .scrim.clear { background: rgba(8, 9, 15, .18); }
.fh .menu { position: absolute; top: 112px; right: 16px; width: 248px; padding: 8px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-pop); border: 1px solid var(--line); animation: fh-pop .2s cubic-bezier(.2, .7, .2, 1); transform-origin: top right; }
.fh .menu .row { border-radius: 12px; min-height: 52px; padding: 8px 12px; gap: 12px; font-weight: 600; font-size: calc(16px * var(--ts)); }
.fh .menu .row.danger { color: var(--warn); }
.fh .sheet { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 24px 42px; border-radius: 28px 28px 0 0; background: var(--surface); box-shadow: var(--shadow-pop); animation: fh-up .3s cubic-bezier(.2, .7, .2, 1); }
.fh .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 16px; }
.fh .toast { position: absolute; left: 24px; right: 24px; bottom: 124px; padding: 14px 16px; border-radius: 16px; background: #08090F; color: #F5F6F8; box-shadow: 0 12px 32px rgba(0, 0, 0, .3); display: flex; gap: 12px; align-items: center; font-weight: 600; font-size: calc(15px * var(--ts)); animation: fh-up .26s cubic-bezier(.2, .7, .2, 1); }
.fh.dark .toast { background: #F5F6F8; color: #08090F; }

/* ---------- Скан ---------- */
.fh .scan-img { position: absolute; inset: 0 0 auto 0; height: 600px; width: 100%; object-fit: cover; transition: filter .3s ease; }
.fh .scan-img.lost { filter: blur(6px) brightness(.55) saturate(.6); }
.fh .reticle { position: absolute; left: 50%; top: 300px; width: 128px; height: 128px; margin: -64px 0 0 -64px; color: #FFFFFF; animation: fh-breathe 2.4s ease-in-out infinite; }
.fh .corner-dot { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 8px; background: #2457FF; box-shadow: 0 0 0 4px rgba(255, 255, 255, .9); animation: fh-pop .3s ease both; }

/* ---------- Анимации ---------- */
@keyframes fh-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes fh-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fh-pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes fh-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fh-breathe { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.06); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .fh *, .fh *::before, .fh *::after { animation: none !important; transition: none !important; }
}

/* ---------- Оболочка демонстрации ---------- */
.shell { min-height: 100vh; display: grid; grid-template-columns: 360px minmax(0, 1fr); background: var(--app-bg); }
.shell-panel { padding: 48px 40px; display: flex; flex-direction: column; gap: 32px; border-right: 1px solid var(--line); background: var(--surface); }
.shell-stage { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.shell .bezel { padding: 10px; border-radius: 58px; background: #05060B; box-shadow: 0 40px 100px rgba(7, 6, 75, .28), 0 0 0 1px rgba(183, 201, 255, .16); }
.shell .jump { appearance: none; border: 0; width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 12px; background: transparent; text-align: left; display: flex; align-items: center; gap: 12px; cursor: pointer; color: var(--text); font-weight: 600; font-size: 15px; }
.shell .jump:hover { background: var(--surface-2); }
.shell .jump.on { background: var(--accent-soft); color: var(--accent-text); }
.shell .jump .num { color: var(--text-3); font-size: 13px; width: 24px; }
.shell .switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; cursor: pointer; font-weight: 600; font-size: 15px; }
.shell .switch input { width: 44px; height: 26px; accent-color: #2457FF; cursor: pointer; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .shell-panel { border-right: 0; border-bottom: 1px solid var(--line); padding: 24px 16px; gap: 24px; }
  .shell-stage { padding: 24px 0; }
  .shell .bezel { padding: 0; background: transparent; box-shadow: none; }
  .shell .jumps { display: flex !important; flex-wrap: wrap; gap: 4px; }
  .shell .jumps .jump { width: auto; }
}
@media (max-width: 420px) {
  .shell-stage { padding: 0; }
}

/* ===================== v2: обложки, формы, расчёты ===================== */
.fh .cover { position: relative; display: block; width: 100%; height: 128px; overflow: hidden; background: var(--surface-2); }
.fh .cover.h160 { height: 160px; }
.fh .cover.h96 { height: 96px; }
.fh .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; display: block; }
.fh .cover svg.plan-cover { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fh .cover .skel { position: absolute; inset: 0; background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%); background-size: 200% 100%; animation: fh-shimmer 1.4s linear infinite; }
.fh .cover .fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-3); background: repeating-linear-gradient(135deg, var(--surface-2) 0 12px, var(--surface-3) 12px 13px); font-size: calc(13px * var(--ts)); font-weight: 600; }
.fh .cover .tag { position: absolute; left: 12px; top: 12px; }
.fh .room .cover { height: 128px; }
.fh .room img { height: 100%; }
@keyframes fh-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.fh .label { font-size: calc(13px * var(--ts)); font-weight: 600; color: var(--text-2); }
.fh .hint { font-size: calc(13px * var(--ts)); font-weight: 500; color: var(--text-3); line-height: 1.4; margin: 0; }
.fh .err-text { font-size: calc(13px * var(--ts)); font-weight: 600; color: var(--warn); line-height: 1.4; margin: 0; }
.fh .field.err { border-color: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.fh .unit-field { position: relative; display: block; }
.fh .unit-field .field { padding-right: 44px; }
.fh .unit-field .unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: calc(15px * var(--ts)); font-weight: 600; pointer-events: none; }
.fh select.field { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; cursor: pointer; }

.fh .sheet.tall { max-height: 88%; overflow-y: auto; scrollbar-width: none; }
.fh .sheet.tall::-webkit-scrollbar { display: none; }

.fh .thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fh .thumb { appearance: none; padding: 0; border: 2px solid transparent; border-radius: 14px; overflow: hidden; background: var(--surface-2); cursor: pointer; position: relative; height: 72px; transition: border-color .16s ease; }
.fh .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fh .thumb.on { border-color: var(--accent); }
.fh .thumb .ok { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border-radius: 11px; background: var(--accent); color: #FFFFFF; display: grid; place-items: center; }

.fh .opt { appearance: none; width: 100%; padding: 0; border: 2px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); cursor: pointer; text-align: left; color: var(--text); display: flex; flex-direction: column; transition: border-color .16s ease; }
.fh .opt.on { border-color: var(--accent); }
.fh .opt:disabled { cursor: not-allowed; opacity: .75; }
.fh .opt .opt-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; min-height: 48px; }

.fh .kv { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: calc(15px * var(--ts)); }
.fh .kv span:first-child { color: var(--text-2); font-weight: 500; }
.fh .kv span:last-child { font-weight: 600; text-align: right; }
.fh .chain { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.fh .chain li { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; font-size: calc(14px * var(--ts)); line-height: 1.4; }
.fh .chain li .k { color: var(--text-3); font-weight: 600; min-width: 18px; }
.fh .chain li.total { font-weight: 700; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; }
.fh .delta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fh .delta > div { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.fh .delta > div.hi { background: var(--accent-soft); }

.fh .chip-btn { appearance: none; border: 0; cursor: pointer; min-height: 36px; padding: 6px 12px; }
.fh .link-btn { appearance: none; border: 0; background: none; padding: 0 4px; min-height: 44px; color: var(--accent-text); font-weight: 700; font-size: calc(14px * var(--ts)); cursor: pointer; }
.fh .wall-hit { cursor: pointer; }
.fh .wall-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fh .wall-chip { appearance: none; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); min-width: 48px; min-height: 44px; padding: 0 12px; border-radius: 12px; font-weight: 700; font-size: calc(14px * var(--ts)); cursor: pointer; }
.fh .wall-chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.fh .saved { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-size: calc(13px * var(--ts)); font-weight: 600; }
.fh .toast .t-act { appearance: none; border: 0; background: transparent; color: #9DB4FF; font-weight: 800; font-size: calc(15px * var(--ts)); min-height: 44px; padding: 0 4px 0 12px; cursor: pointer; margin-left: auto; white-space: nowrap; }
.fh.dark .toast .t-act { color: #1D47D8; }
.fh .skel-line { display: block; height: 12px; border-radius: 6px; background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%); background-size: 200% 100%; animation: fh-shimmer 1.4s linear infinite; }
.fh .mini-plan { background: rgba(8, 9, 15, .55); border-radius: 16px; padding: 8px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.fh .progress-dot { width: 10px; height: 10px; border-radius: 5px; background: var(--accent); animation: fh-breathe 1.6s ease-in-out infinite; }

.fh .field::placeholder { color: var(--text-3); opacity: .55; font-weight: 500; }
.fh .scroll > *, .fh .pane > *, .fh .room, .fh .cover { flex-shrink: 0; }
.fh .radio svg { opacity: 0; transition: opacity .16s ease; }
.fh .radio.on svg { opacity: 1; }

/* ===================== v3 ===================== */
.fh .cover .ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 0 16px; }
.fh .cover .ph.v1 { background: radial-gradient(120% 140% at 80% 0%, #DDE6FF 0%, #EEF1F8 45%, #E4E8F1 100%); color: #3A4A86; }
.fh .cover .ph.v2 { background: radial-gradient(120% 140% at 20% 0%, #2A3480 0%, #141A52 50%, #0B0F33 100%); color: #B7C9FF; }
.fh .cover .ph .ph-t { font-size: calc(14px * var(--ts)); font-weight: 700; }
.fh .cover .ph .ph-s { font-size: calc(12px * var(--ts)); font-weight: 600; opacity: .85; }
.fh .thumb .ph { position: absolute; inset: 0; }
.fh .thumb .ph.v1 { background: linear-gradient(160deg, #DDE6FF, #E4E8F1); }
.fh .thumb .ph.v2 { background: linear-gradient(160deg, #2A3480, #0B0F33); }

.fh .opt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fh .opt-chip { appearance: none; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); min-height: 44px; padding: 0 14px; border-radius: 12px; font-weight: 600; font-size: calc(14px * var(--ts)); cursor: pointer; transition: background-color .16s ease, border-color .16s ease; }
.fh .opt-chip:hover { border-color: var(--accent); }
.fh .opt-chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.fh .opt-chip.unk.on { background: var(--surface-3); border-color: var(--line-2); color: var(--text); }
.fh .q-row { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.fh .q-row:first-of-type { border-top: 0; padding-top: 4px; }

.fh .prep-item { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line); }
.fh .prep-item.off { opacity: .6; }
.fh .mini-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 2px; border-radius: 12px; background: var(--surface-2); }
.fh .mini-seg button { appearance: none; border: 0; min-height: 40px; border-radius: 10px; background: transparent; color: var(--text-2); font-weight: 600; font-size: calc(13px * var(--ts)); cursor: pointer; }
.fh .mini-seg button.on-req { background: var(--accent); color: var(--on-accent); }
.fh .mini-seg button.on-done { background: var(--ok); color: #FFFFFF; }
.fh.dark .mini-seg button.on-done { color: #08090F; }
.fh .mini-seg button.on-unk { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.fh .mat-link { display: flex; gap: 8px; align-items: flex-start; font-size: calc(13px * var(--ts)); line-height: 1.4; color: var(--text-2); }
.fh .mat-link svg { flex: none; margin-top: 1px; }

.fh .entry { appearance: none; border: 1px solid var(--line); background: var(--surface); border-radius: 18px; padding: 12px 14px; text-align: left; display: flex; flex-direction: column; gap: 4px; cursor: pointer; color: var(--text); min-height: 88px; box-shadow: none; }
.fh .entry:hover { border-color: var(--line-2); }

.fh .styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fh .style-card { appearance: none; border: 2px solid var(--line); background: var(--surface); border-radius: 16px; padding: 0; overflow: hidden; cursor: pointer; color: var(--text); text-align: left; display: flex; flex-direction: column; }
.fh .style-card.on { border-color: var(--accent); }
.fh .style-card .sw { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: 44px; }
.fh .style-card .sw span { display: block; background-size: cover; background-position: center; }
.fh .style-card .nm { padding: 8px 10px 10px; font-weight: 700; font-size: calc(14px * var(--ts)); line-height: 1.25; }
.fh .chipswatch { width: 48px; height: 48px; border-radius: 12px; flex: none; border: 1px solid var(--line); display: block; object-fit: cover; }

.fh .look-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--line); }

.fh .sheet.split { display: flex; flex-direction: column; padding: 12px 0 0; max-height: 90%; }
.fh .sheet.split .sheet-body { overflow-y: auto; padding: 0 24px 16px; scrollbar-width: none; }
.fh .sheet.split .sheet-body::-webkit-scrollbar { display: none; }
.fh .sheet.split .grab { margin-bottom: 12px; }
.fh .sheet-foot { border-top: 1px solid var(--line); padding: 12px 24px 30px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border-radius: 0 0 0 0; }
.fh .disclose { appearance: none; width: 100%; border: 0; background: transparent; color: var(--text); padding: 12px 0; min-height: 48px; display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: calc(15px * var(--ts)); cursor: pointer; border-top: 1px solid var(--line); }

.fh .plan-wrap { position: relative; margin: 0 auto; }
.fh .plan-wrap svg { display: block; touch-action: none; }
.fh .lbl { position: absolute; transform: translate(-50%, -50%); font-size: 11px; line-height: 1; white-space: nowrap; pointer-events: none; }
.fh .lbl.dist { background: var(--surface); color: var(--accent-text); font-weight: 700; padding: 2px 4px; border-radius: 4px; font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.fh .lbl.furn { color: var(--text); font-weight: 700; font-size: 10px; }
.fh .lbl.warnl { color: var(--warn); }
.fh .furn-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.fh .full-plan { position: absolute; inset: 0; background: var(--app-bg); display: flex; flex-direction: column; animation: fh-fade .2s ease; z-index: 2; }
.fh .zoom-box { flex-grow: 1; overflow: auto; margin: 0 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); scrollbar-width: none; }
.fh .zoom-box::-webkit-scrollbar { display: none; }
.fh .chip-meas { min-height: 24px; font-size: calc(12px * var(--ts)); }
.fh .style-card .nm { font-size: calc(13px * var(--ts)); padding: 8px 8px 10px; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
.fh .link-btn { text-align: left; }

/* ===================== v4: адаптивность и удобство ===================== */
.fh-phone { position: relative; overflow: hidden; width: 100%; min-width: 0; height: 100vh; height: 100dvh; min-height: 560px; border-radius: 0; background: var(--app-bg); }
.fh-phone.fixed { width: 390px; height: 844px; min-height: 0; border-radius: 48px; }
@media (max-width: 440px) { .shell .fh-phone.fixed { width: 100vw; height: 100dvh; border-radius: 0; } }
.fh .seg-btn { min-width: 0; padding: 4px; font-size: calc(14px * var(--ts)); line-height: 1.2; text-align: center; overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
.fh .scroll { scroll-padding-bottom: 24px; }
.fh .sheet, .fh .sheet-body { overflow-x: hidden; }
.fh .kv span { min-width: 0; overflow-wrap: anywhere; }
.fh .screen:has(.scroll input:focus, .scroll select:focus) .cta-bar { display: none; }
.fh .plan-wrap { position: relative; margin: 0 auto; width: 100%; }
.fh .plan-wrap svg { width: 100%; height: 100%; display: block; touch-action: none; }
.fh .stepbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.fh .stepbar span { height: 6px; border-radius: 3px; background: var(--surface-3); }
.fh .stepbar span.on { background: var(--accent); }
.fh .acc { border-top: 1px solid var(--line); }
.fh .acc:first-child { border-top: 0; }
.fh .acc-head { appearance: none; width: 100%; border: 0; background: transparent; color: var(--text); padding: 12px 0; min-height: 52px; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; }
.fh .acc-head .v { margin-left: auto; color: var(--text-2); font-weight: 600; font-size: calc(14px * var(--ts)); text-align: right; }
.fh .acc-head .v.unk { color: var(--warn); }
.fh .acc-body { padding: 0 0 14px; }
.fh .ref { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 3 / 2; background: var(--surface-2); }
.fh .ref img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fh .ref .tag { position: absolute; left: 10px; bottom: 10px; }
.fh .palette { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fh .palette .sw { aspect-ratio: 1 / 1; border-radius: 12px; border: 1px solid var(--line); background-size: cover; background-position: center; }
.fh .palette .pl { font-size: calc(12px * var(--ts)); font-weight: 600; color: var(--text-2); line-height: 1.25; margin-top: 4px; overflow-wrap: anywhere; }
.fh .sumbar { display: flex; flex-direction: column; gap: 2px; padding: 0 2px 4px; }
.fh .sum-details { max-height: 168px; overflow-y: auto; overflow-x: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.fh .later-chip { background: var(--surface-3); color: var(--text-2); }
.fh .chip { max-width: 100%; }
.fh .chip-meas { white-space: normal; text-align: left; }
.fh .step.compact button { width: 44px; }

.fh .room .t-h3 { overflow-wrap: anywhere; }
.fh .sum-details { max-height: 120px; }
.fh .ref .tag { right: 10px; white-space: normal; }
.fh .toast { bottom: 172px; }
.fh .toast { bottom: auto; top: 112px; }

/* ================= v5 · отделка отдельных стен ================= */
.fh .lbl.lbl-sel { color: var(--on-accent); background: var(--accent); font-weight: 800; padding: 3px 5px; border-radius: 6px; }
.fh .lbl.lbl-own { color: var(--accent-text); font-weight: 800; }
.fh .plan-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: calc(12px * var(--ts)); font-weight: 600; color: var(--text-3); }
.fh .plan-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fh .plan-legend i { display: inline-block; width: 22px; height: 0; border-top: 4px solid var(--plan-wall); }
.fh .plan-legend i.lg-dash { border-top: 4px dashed var(--accent); }
.fh .plan-legend i.lg-sel { border-top: 6px solid var(--accent); border-radius: 3px; }
.fh .wall-list { display: flex; flex-direction: column; gap: 6px; }
.fh .wall-row { appearance: none; width: 100%; text-align: left; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px 8px 8px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.fh .wall-row:hover { background: var(--surface-2); }
.fh .wall-row.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; background: var(--accent-soft); }
.fh .wl-id { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: calc(16px * var(--ts)); background: var(--surface-2); color: var(--text); }
.fh .wall-row.own .wl-id { background: transparent; border: 2px dashed var(--accent); color: var(--accent-text); }
.fh .wall-row.on .wl-id, .fh .wl-id.on { background: var(--accent); color: var(--on-accent); border: 0; }
.fh .cov { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.fh .cov-row { display: flex; flex-direction: column; gap: 1px; padding-top: 6px; border-top: 1px solid var(--line); }
.fh .cov-row:first-of-type { border-top: 0; padding-top: 0; }
.fh .chain li.note { color: var(--text-3); font-size: calc(13px * var(--ts)); }

/* ================= v5 · паспорт помещения ================= */
.fh .pp-switch { display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 10px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.fh .pp-switch input { flex: none; width: 46px; height: 28px; accent-color: #2457FF; cursor: pointer; margin: 0; }
.fh .pp-view { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 0; border-radius: 16px; background: var(--surface-3); }
.fh .pp-view.pan { align-items: flex-start; overflow-x: auto; padding: 12px; overscroll-behavior-x: contain; }
.fh .pp-page { position: relative; flex: none; overflow: hidden; border-radius: 4px; box-shadow: 0 6px 18px rgba(7, 6, 75, .18); background: #FFFFFF; }
.fh .a4 { position: absolute; left: 0; top: 0; width: 794px; height: 1123px; transform-origin: 0 0; padding: 48px 56px 64px; background: #FFFFFF; color: #08090F; display: flex; flex-direction: column; gap: 20px; overflow: hidden; --ts: var(--fh-a11y-scale, 1); font-size: 13px; line-height: 1.45; }
.fh .a4.doc { --surface: #FFFFFF; --surface-2: #F5F6F8; --surface-3: #E7EAF1; --text: #08090F; --text-2: #42485E; --text-3: #5C6380; --plan-wall: #08090F; --model-floor: #F5F6F8; --accent: #2457FF; --accent-text: #1D47D8; --on-accent: #FFFFFF; --warn: #8A4B05; --warn-soft: #FFF0DB; }
.fh .a4.stale::after { content: 'Устаревший снимок — не передавать'; position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%) rotate(-24deg); padding: 14px 28px; border: 4px solid #B4232C; border-radius: 12px; color: #B4232C; font-size: 34px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; background: rgba(255, 255, 255, .86); }
.fh .a4 h2 { margin: 0 0 8px; font-size: 15px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: #07064B; }
.fh .a4 .num { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.fh .a4 .warn { color: #8A4B05; font-weight: 700; }
.fh .d-head { display: flex; flex-direction: column; gap: 6px; padding-bottom: 14px; border-bottom: 2px solid #07064B; }
.fh .d-brand { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #2457FF; }
.fh .d-logo { text-transform: none; letter-spacing: -.02em; font-size: 16px; font-weight: 800; color: #07064B; }
.fh .d-title { margin: 0; font-size: 32px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; overflow-wrap: anywhere; }
.fh .d-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: #42485E; }
.fh .d-dims { font-size: 13px; font-weight: 600; }
.fh .d-legend { margin: 0; font-size: 11px; color: #5C6380; }
.fh .d-sec { display: flex; flex-direction: column; }
.fh .d-clarify { padding: 12px 16px; border-radius: 10px; background: #FFF0DB; border-left: 5px solid #C77A12; }
.fh .d-clarify h2 { color: #6B3A04; }
.fh .d-clarify ul { margin: 0; padding-left: 18px; columns: 2; column-gap: 28px; font-size: 12px; }
.fh .d-clarify li { break-inside: avoid; margin-bottom: 3px; }
.fh .d-clarify p { margin: 0; }
.fh .d-plan .plan-wrap { max-width: 640px !important; }
.fh .a4 .lbl { font-size: 13px; }
.fh .a4 .lbl.otag { font-size: 11px; font-weight: 700; color: #1D47D8; background: #E9EEFF; padding: 1px 4px; border-radius: 4px; }
.fh .a4 .lbl.furn { font-size: 11px; color: #42485E; }
.fh .d-note { margin: 6px 0 0; font-size: 11px; color: #5C6380; }
.fh .d-tab { display: flex; flex-direction: column; border-top: 1px solid #C9CFDB; }
.fh .d-tr { display: grid; gap: 10px; padding: 6px 4px; border-bottom: 1px solid #E1E6F0; align-items: baseline; font-size: 12px; }
.fh .d-th { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #5C6380; }
.fh .d-walls .d-tr { grid-template-columns: 44px 70px 70px minmax(0, 1.5fr) 74px minmax(0, 1.7fr); }
.fh .d-walls .d-tr.own { background: #EEF2FF; }
.fh .d-surf .d-tr { grid-template-columns: 90px minmax(0, 1fr) 140px; }
.fh .d-surf .d-tr.d-two { grid-template-columns: 160px minmax(0, 1fr); }
.fh .d-mats .d-tr { grid-template-columns: minmax(0, 2.2fr) 110px minmax(0, 1fr) 84px 84px; }
.fh .d-mats.np .d-tr { grid-template-columns: minmax(0, 2.4fr) 130px minmax(0, 1.2fr); }
.fh .d-total { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; padding: 10px 12px; border-radius: 8px; background: #F5F6F8; font-size: 11px; color: #42485E; }
.fh .d-total b { font-size: 15px; color: #08090F; }
.fh .d-calc { margin: 8px 0 0; padding-left: 18px; font-size: 11px; color: #42485E; }
.fh .d-pg { display: flex; flex-direction: column; margin-top: 8px; }
.fh .d-pg > b { font-size: 12px; padding-bottom: 2px; }
.fh .d-pi { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; border-bottom: 1px solid #E1E6F0; font-size: 12px; }
.fh .pst { flex: none; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: #EEF1F6; color: #42485E; white-space: nowrap; }
.fh .pst.req { background: #E9EEFF; color: #1D47D8; }
.fh .pst.done { background: #E3F4EB; color: #14704A; }
.fh .pst.unk { background: #FFF0DB; color: #8A4B05; }
.fh .pst.ex { background: #F5F6F8; color: #8A90A6; text-decoration: line-through; }
.fh .d-disc { margin: auto 0 0; padding-top: 12px; border-top: 1px solid #C9CFDB; font-size: 11px; color: #5C6380; }
.fh .d-foot { position: absolute; left: 56px; right: 56px; bottom: 24px; font-size: 10px; color: #8A90A6; display: flex; justify-content: space-between; }
.fh .sheet-foot .btn { padding: 0 16px; }
.fh .kv.st { flex-direction: column; gap: 2px; padding: 8px 0; }
.fh .kv.st span:last-child { text-align: left; }
.fh .chain li.note, .fh .chain li.dist { flex-direction: column; gap: 2px; }
.fh .chain li.note span, .fh .chain li.dist span { text-align: left !important; }
.fh .chain li.dist { color: var(--text-2); font-weight: 600; }
.fh .est-right { max-width: 46%; }
.fh .est-right .chip { white-space: normal; text-align: right; justify-content: flex-end; }

/* ================= v6 · уточнения ================= */
.fh .back2 { appearance: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: -6px 0 10px; padding: 0 14px 0 8px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font: inherit; font-weight: 700; font-size: calc(14px * var(--ts)); cursor: pointer; }
.fh .cl-count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--surface-2); font-size: calc(13px * var(--ts)); font-weight: 600; }
.fh .cl-row { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.fh .cl-act { flex: none; max-width: 46%; white-space: normal; text-align: center; line-height: 1.2; }
.fh .cl-item { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; border-left: 4px solid var(--line-2); }
.fh .cl-item.block { border-left-color: var(--warn); }
.fh .cl-item.def { border-left-color: var(--accent); border-left-style: dashed; }
.fh .cl-item.ex { border-left-color: var(--text-3); opacity: .9; }
.fh .cl-btns { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }
.fh .focus-ring { box-shadow: 0 0 0 3px var(--accent), 0 0 0 7px var(--accent-soft); }

/* ================= v6 · комплект ================= */
.fh .kit-block { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.fh .kit-row { appearance: none; width: 100%; text-align: left; display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; min-height: 56px; }
.fh .kit-row:hover { background: var(--surface-2); }
.fh .kit-foot { display: flex; flex-direction: column; gap: 8px; }
.fh .kit-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.fh .kit-acts .btn { flex: 1 1 auto; }

/* ================= v6 · заметки ================= */
.fh .nmark { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 2px; height: 24px; min-width: 30px; padding: 0 6px; border-radius: 12px; border: 0; background: var(--accent); color: var(--on-accent); font: 700 12px/1 'Manrope', sans-serif; cursor: pointer; box-shadow: 0 2px 6px rgba(7, 6, 75, .25); }
.fh .nmark::after { content: ''; position: absolute; inset: -12px -9px; }
.fh .nmark svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.fh .note { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.fh .note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.fh .note-area { min-height: 88px; padding: 12px 14px; line-height: 1.45; font-weight: 500; resize: vertical; }
.fh .pp-switch.note-pass { min-height: 48px; padding: 4px 0; border-top: 0; }

/* ================= v6 · паспорт: чтение ================= */
.fh .rd { display: flex; flex-direction: column; gap: 12px; }
.fh .rd-head, .fh .rd-sec { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.fh .rd-status { padding: 8px 10px; border-radius: 10px; background: var(--warn-soft); color: var(--text); font-weight: 600; }
.fh .rd-cl { display: flex; flex-direction: column; gap: 2px; padding: 8px 0 8px 12px; border-left: 3px solid var(--line-2); }
.fh .rd-cl.block { border-left-color: var(--warn); }
.fh .rd-cl.def { border-left-color: var(--accent); }
.fh .rd-cl.ex { border-left-color: var(--text-3); }
.fh .rd-plan { overflow-x: auto; border-radius: 12px; overscroll-behavior-x: contain; }
.fh .rd-plan-in { background: #FFFFFF; border-radius: 12px; padding: 8px 0; color: #08090F; }
.fh .rd-plan.big .rd-plan-in { width: 220%; }
.fh .rd-plan .plan-wrap { max-width: none !important; }
.fh .rd-plan .lbl { font-size: 10px; }
.fh .rd-plan .lbl.otag { font-size: 9px; color: #1D47D8; background: #E9EEFF; padding: 1px 3px; border-radius: 3px; font-weight: 700; }
.fh .rd-plan.big .lbl { font-size: 13px; }
.fh .rd-wall { display: flex; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.fh .rd-note { display: block; margin-top: 4px; padding: 6px 8px; border-radius: 8px; background: var(--accent-soft); font-size: calc(13px * var(--ts)); font-weight: 600; white-space: pre-wrap; overflow-wrap: anywhere; }
.fh .rd-mat { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); }
.fh .rd-mat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
.fh .rd-mat-grid span { display: flex; flex-direction: column; min-width: 0; }
.fh .rd-mat-grid i { font-style: normal; font-size: calc(12px * var(--ts)); color: var(--text-3); font-weight: 600; }
.fh .rd-mat-grid b { font-size: calc(14px * var(--ts)); font-weight: 600; overflow-wrap: anywhere; }
.fh .rd-mat-grid b.warn { color: var(--warn); }
.fh .rd-total { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: calc(13px * var(--ts)); color: var(--text-2); }
.fh .rd-total b { font-size: calc(16px * var(--ts)); color: var(--text); }
.fh .rd-prep { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.fh .rd-gen { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); }
.fh .opt.preset { display: flex; }

/* ================= v6 · паспорт: A4 ================= */
.fh .d-statusline { margin: 2px 0 0; padding: 6px 10px; border-radius: 6px; background: #FFF0DB; font-size: 12px; font-weight: 600; color: #6B3A04; }
.fh .d-clarify ul { columns: 1 !important; padding-left: 18px; }
.fh .d-clarify li { margin-bottom: 4px; overflow-wrap: anywhere; }
.fh .d-rel { color: #5C6380; }
.fh .ctag { display: inline-block; font-size: 10px; font-weight: 700; padding: 0 6px; border-radius: 99px; background: #FFFFFF; color: #8A4B05; white-space: nowrap; }
.fh .ctag.defer { color: #42485E; } .fh .ctag.def { color: #1D47D8; } .fh .ctag.ex { color: #5C6380; text-decoration: none; } .fh .ctag.none { display: none; }
.fh .d-wnote { padding: 4px 8px 6px 48px; font-size: 11px; color: #1D47D8; font-weight: 600; border-bottom: 1px solid #E1E6F0; overflow-wrap: anywhere; white-space: pre-wrap; }
.fh .d-gen { padding: 5px 0; border-bottom: 1px solid #E1E6F0; font-size: 12px; overflow-wrap: anywhere; white-space: pre-wrap; }
.fh .d-pgh { display: block; font-size: 12px; padding: 8px 0 2px; }
.fh .d-mats.ps .d-tr { grid-template-columns: minmax(0, 2.1fr) 96px 86px 74px 74px 74px; }
.fh .d-mats.so .d-tr { grid-template-columns: minmax(0, 2.2fr) 104px minmax(0, 1fr) 90px 80px; }
.fh .d-mats .d-tr span { overflow-wrap: anywhere; }
.fh .d-mats i { font-style: normal; color: #5C6380; font-size: 11px; }
.fh .a4 .d-title { overflow-wrap: anywhere; }
.fh .cl-row { flex-direction: column; align-items: stretch; gap: 6px; }
.fh .cl-act { max-width: none; align-self: flex-start; min-height: 44px; }

.fh .rd-plan:not(.big) .lbl.otag { display: none; }
.fh .rd-prep { flex-wrap: wrap; }
.fh .rd-prep .pst { white-space: normal; text-align: left; }

/* ================= v7 · что сохраняем, что меняем ================= */
.fh .dec-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.fh .dec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.fh .dec-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.fh .dec-seg.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fh .dec-btn { appearance: none; border: 0; min-height: 48px; padding: 4px 6px; border-radius: 10px; background: transparent; color: var(--text-2); font: inherit; font-weight: 600; font-size: calc(14px * var(--ts)); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; line-height: 1.2; }
.fh .dec-btn span { font-weight: 800; font-size: calc(16px * var(--ts)); }
.fh .dec-btn.on { background: var(--surface); color: var(--text); box-shadow: 0 0 0 2px var(--accent) inset; }
.fh .dec-btn.keep.on { box-shadow: 0 0 0 2px var(--text-3) inset; }
.fh .dec-wall { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.fh .dsym-badge { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-weight: 800; font-size: 15px; border: 2px dashed var(--line-2); color: var(--text-3); background: var(--surface); }
.fh .dsym-badge.keep { border: 2px solid var(--text-3); color: var(--text-2); background: var(--surface-2); }
.fh .dsym-badge.update { border: 2px solid var(--accent-text); color: var(--accent-text); background: var(--accent-soft); }
.fh .dsym-badge.replace { border: 2px dashed var(--accent); color: var(--accent-text); background: var(--surface); }
.fh .dsym-badge.remove { border: 2px solid var(--warn); color: var(--warn); background: var(--warn-soft); }
.fh .dec-sum { display: flex; flex-direction: column; gap: 4px; }
.fh .dec-line { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 4px 0; border-top: 1px solid var(--line); }
.fh .dec-strip { appearance: none; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 14px; border-radius: 14px; border: 1px dashed var(--line-2); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.fh .dec-minus::before { content: '− '; font-weight: 800; color: var(--warn); }
.fh .dec-plus::before { content: '+ '; font-weight: 800; color: var(--ok); }
.fh .lbl.dsym { font-size: 13px; font-weight: 800; padding: 0 4px; border-radius: 5px; background: var(--surface); color: var(--text); border: 1.5px solid var(--text-3); line-height: 1.25; }
.fh .lbl.dsym.update { border-color: var(--accent-text); color: var(--accent-text); }
.fh .lbl.dsym.replace { border-style: dashed; border-color: var(--accent); color: var(--accent-text); }
.fh .lbl.dfloor { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--surface); color: var(--text-2); border: 1px dashed var(--line-2); }
.fh .lbl.dfloor.keep { border: 1.5px solid var(--text-3); }
.fh .lbl.dfloor.update, .fh .lbl.dfloor.replace { border: 1.5px solid var(--accent); color: var(--accent-text); }
.fh .a4 .dsym-badge, .fh .a4 .dsym { display: inline-grid; width: 18px; height: 18px; font-size: 11px; border-radius: 4px; margin-right: 4px; }
.fh .dsym.keep, .fh .dsym.update, .fh .dsym.replace, .fh .dsym.remove, .fh .dsym.none { place-items: center; }
.fh .a4 .dsym.none { border: 1.5px dashed #9AA3B8; color: #5C6380; } .fh .a4 .dsym.keep { border: 1.5px solid #5C6380; color: #42485E; background: #F5F6F8; }
.fh .a4 .dsym.update { border: 1.5px solid #1D47D8; color: #1D47D8; } .fh .a4 .dsym.replace { border: 1.5px dashed #2457FF; color: #1D47D8; } .fh .a4 .dsym.remove { border: 1.5px solid #8A4B05; color: #8A4B05; }

/* ================= v7 · мои материалы ================= */
.fh .my-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.fh .my-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.fh .my-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fh .my-item { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.fh .my-item .flat, .fh .mat .flat { width: 44px; height: 44px; border-radius: 12px; flex: none; border: 1px solid var(--line); }
.fh .opt-chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.fh .dec-btn { flex-direction: column; gap: 0; min-height: 52px; font-size: calc(13px * var(--ts)); }
.fh .dec-btn span { font-size: calc(15px * var(--ts)); line-height: 1.1; }
/* v7: сегменты решений переносятся во второй ряд на узком экране и с крупным текстом */
.fh .dec-seg, .fh .dec-seg.four { grid-template-columns: repeat(auto-fit, minmax(calc(76px * var(--ts)), 1fr)); }
.fh .dec-btn { min-width: 0; overflow-wrap: anywhere; }
.fh .my-item .chip { align-self: flex-start; }
