/* Страница «3D умного дома» (/napravleniya/umnyj-dom/): живая квартира — assets/js/smarthome.js,
   модель — assets/models/apartment.glb (сцена Blender: tools/3d/apartment/apartment.py). Язык — owl.css. */

/* первый экран — плашка направления, как на главной и на «Направлениях»: жёлтое поле с предметом и колонка текста */
.dh-hero { min-height: min(86vh, 820px); }
.dh-hero .dir__txt { padding-top: clamp(96px, 9vw, 150px); padding-bottom: clamp(32px, 4vw, 64px); }
.dh-hero__h { font-size: clamp(40px, 5.6vw, 104px); }
.dh-hero .more { align-self: flex-start; }
.dh-crumb { border-bottom: 1px solid transparent; transition: border-color .3s; }
.dh-crumb:hover { border-color: currentColor; }
.dh-hero__crumbs { margin-top: clamp(6px, 1.4vw, 22px); padding-top: 16px; border-top: 1px solid var(--o-line); }
.dh-hero__crumbs a { padding-block: 6px; }
@media (max-width: 899px) {
  .dh-hero.dir .dir__art { order: 2; }                /* на телефоне сначала текст на тёмном: шапка поверх жёлтого не читается */
  .dh-hero .dir__txt { padding-top: 96px; }
}
.dh-hero__crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--o-fs-ui); text-transform: uppercase; color: var(--o-mut); }
.dh-hero__crumbs a:hover { color: var(--o-fg); }

/* ---------- сцена ---------- */
.sh { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 380px; height: min(88vh, 880px); min-height: 560px; border-block: 1px solid var(--o-line); background: #0d1011; }
.sh__stage { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 55% 40%, #1c2224 0%, #0d1011 70%); touch-action: pan-y; }
.sh__poster, .sh__gl { position: absolute; inset: 0; width: 100%; height: 100%; }
.sh__poster { object-fit: contain; object-position: 50% 52%; padding: 4% 3% 9%; transition: opacity .8s var(--o-ease), filter .8s var(--o-ease); }
.sh__gl { opacity: 0; transition: opacity .9s var(--o-ease); outline: none; }
.sh__stage[data-state="ready"] .sh__gl { opacity: 1; }
.sh__stage[data-state="ready"] .sh__poster { opacity: 0; filter: blur(6px); pointer-events: none; }
.sh__stage[data-state="ready"] .sh__gl { cursor: grab; }
.sh__stage[data-state="ready"] .sh__gl:active { cursor: grabbing; }
.sh__stage.is-hot .sh__gl { cursor: pointer; }

.sh__load { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; padding: 8px 14px; border-radius: 999px; background: rgba(18, 22, 23, .78); font-size: 13px; text-transform: uppercase; color: var(--o-mut); transition: opacity .5s; }
.sh__load b { display: block; width: 90px; height: 2px; background: var(--o-line); overflow: hidden; }
.sh__load b i { display: block; height: 100%; width: var(--p, 0%); background: var(--o-yellow); transition: width .3s; }
.sh__stage[data-state="ready"] .sh__load, .sh__stage[data-state="fallback"] .sh__load { opacity: 0; pointer-events: none; }
.sh__stage[data-state="idle"] .sh__load { opacity: 0; }

/* сценарии и кнопки камеры */
.sh__top { position: absolute; z-index: 3; left: 14px; right: 14px; top: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; pointer-events: none; }
.sh__top > * { pointer-events: auto; }
.sh__lbl { margin-right: 4px; font-size: 12px; text-transform: uppercase; color: var(--o-mut); }
.sh-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 13px; border: 1.5px solid rgba(237, 233, 232, .38); border-radius: 999px; background: rgba(18, 22, 23, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 14px; text-transform: uppercase; letter-spacing: -.01em; cursor: pointer; transition: background .3s var(--o-ease), color .3s var(--o-ease), border-color .3s var(--o-ease); }
.sh-btn:hover { border-color: var(--o-fg); }
.sh-btn[aria-pressed="true"], .sh-btn.is-on { background: var(--o-yellow); border-color: var(--o-yellow); color: var(--o-ink); }
.sh-btn i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .55; }
.sh-btn[aria-pressed="true"] i { opacity: 1; animation: sh-blink 1.2s infinite; }
.sh__cam { position: absolute; z-index: 3; right: 14px; bottom: 14px; display: flex; gap: 6px; }
.sh__cam .sh-btn { width: 38px; justify-content: center; padding: 0; font-size: 18px; }
.sh__cam .sh-btn--wide { width: auto; padding: 0 12px; font-size: 13px; }
.sh__hint { position: absolute; z-index: 2; left: 14px; bottom: 16px; max-width: 46%; font-size: 13px; color: var(--o-mut); text-transform: uppercase; transition: opacity .6s; }
.sh__stage.is-touched .sh__hint { opacity: 0; }

/* метки датчиков */
.sh__pins { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.sh-pin { position: absolute; left: 0; top: 0; width: 26px; height: 26px; margin: -13px 0 0 -13px; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; transition: opacity .3s; }
.sh-pin::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--o-yellow); box-shadow: 0 0 0 2px rgba(18, 22, 23, .7); }
.sh-pin::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; border: 1.5px solid var(--o-yellow); opacity: 0; animation: sh-ring 2.6s var(--o-ease) infinite; animation-delay: var(--d, 0s); }
.sh-pin span { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, 4px); white-space: nowrap; padding: 4px 8px; border-radius: 999px; background: var(--o-fg); color: var(--o-ink); font-size: 12px; text-transform: uppercase; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--o-ease); }
.sh-pin:hover span, .sh-pin:focus-visible span, .sh-pin.is-sel span { opacity: 1; transform: translate(-50%, -2px); }
.sh-pin.is-alarm::before { background: #FF5A4E; }
.sh-pin.is-alarm::after { border-color: #FF5A4E; animation-duration: .9s; }
.sh-pin.is-hidden { opacity: 0; pointer-events: none; }
.sh__stage.no-pins .sh-pin { opacity: 0; pointer-events: none; }

/* уведомления как на телефоне */
.sh__toasts { position: absolute; z-index: 4; right: 14px; top: 60px; width: min(320px, calc(100% - 28px)); display: grid; gap: 8px; pointer-events: none; }
.sh-toast { display: grid; grid-template-columns: 28px 1fr; gap: 2px 10px; padding: 11px 13px; border-radius: 16px; background: rgba(237, 233, 232, .94); color: var(--o-ink); font-size: 14px; line-height: 1.3; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); animation: sh-toast-in .55s var(--o-ease) both; }
.sh-toast.is-out { animation: sh-toast-out .45s var(--o-ease) both; }
.sh-toast i { grid-row: span 2; width: 28px; height: 28px; border-radius: 9px; background: var(--o-ink); position: relative; }
.sh-toast i::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--o-yellow); }
.sh-toast--alarm i::after { background: #FF5A4E; }
.sh-toast b { font-weight: 600; font-size: 12px; text-transform: uppercase; color: var(--o-ink-mut); }

/* панель: карточка устройства и список по комнатам */
.sh__panel { position: relative; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--o-line); background: var(--o-bg); }
.sh__card { padding: 18px 18px 16px; border-bottom: 1px solid var(--o-line); }
.sh__card[hidden] { display: none; }
.sh__room { font-size: 12px; text-transform: uppercase; color: var(--o-mut); }
.sh__name { margin-top: 6px; font-size: 22px; font-weight: 500; text-transform: uppercase; letter-spacing: -.02em; line-height: 1.05; }
.sh__text { margin-top: 10px; font-size: 15px; line-height: 1.4; color: #CFCAC8; }
.sh__state { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; }
.sh__state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9FE0B0; }
.sh__state.is-on::before { background: var(--o-yellow); }
.sh__state.is-alarm::before { background: #FF5A4E; animation: sh-blink .8s infinite; }
.sh__acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.sh__intro { padding: 18px; border-bottom: 1px solid var(--o-line); font-size: 15px; line-height: 1.4; color: #CFCAC8; }
.sh__intro b { color: var(--o-fg); font-weight: 500; }
.sh__list { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 4px 0 14px; scrollbar-width: thin; scrollbar-color: rgba(237, 233, 232, .2) transparent; }
.sh__grp { padding: 12px 18px 4px; font-size: 12px; text-transform: uppercase; color: var(--o-mut); display: flex; justify-content: space-between; }
.sh__item { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; width: 100%; min-height: 40px; padding: 6px 18px; border: 0; background: none; text-align: left; font-size: 15px; cursor: pointer; transition: background .25s; }
.sh__item:hover, .sh__item[aria-current="true"] { background: rgba(237, 233, 232, .07); }
.sh__item i { width: 8px; height: 8px; border-radius: 50%; background: #5d6466; transition: background .3s; }
.sh__item.is-on i { background: var(--o-yellow); }
.sh__item.is-alarm i { background: #FF5A4E; animation: sh-blink .8s infinite; }
.sh__item small { font-size: 12px; color: var(--o-mut); text-transform: uppercase; }

@keyframes sh-ring { 0% { transform: scale(.6); opacity: .9; } 70%, 100% { transform: scale(1.7); opacity: 0; } }
@keyframes sh-blink { 50% { opacity: .25; } }
@keyframes sh-toast-in { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
@keyframes sh-toast-out { to { opacity: 0; transform: translateX(30px); } }

@media (max-width: 999px) {
  .sh { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .sh__stage { height: min(78vh, 640px); min-height: 420px; }
  .sh__panel { border-left: 0; border-top: 1px solid var(--o-line); }
  .sh__list { max-height: 360px; }
  .sh__hint { max-width: 60%; }
}
@media (max-width: 559px) {
  .sh__stage { height: 74vh; min-height: 400px; }
  .sh__top { left: 0; right: 0; top: 10px; gap: 5px; flex-wrap: nowrap; overflow-x: auto; padding: 0 10px; scrollbar-width: none; }
  .sh__top::-webkit-scrollbar { display: none; }
  .sh__top .sh-btn { flex: none; }
  .sh__lbl { display: none; }
  .sh-btn { min-height: 32px; padding: 0 10px; font-size: 13px; }
  .sh__toasts { top: auto; bottom: 62px; right: 10px; width: calc(100% - 20px); }
  .sh__hint { display: none; }
  .sh__cam { right: 10px; bottom: 10px; }
}

/* ---------- как это работает ---------- */
.dh-how__head { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 80px); align-items: end; margin-bottom: clamp(30px, 4vw, 70px); }
.dh-how__h { font-size: var(--o-fs-h2); }
.dh-how__p { max-width: 30em; font-size: clamp(17px, 1.4vw, 24px); line-height: 1.38; color: #CFCAC8; }
.dh-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--o-line); }
.dh-step { padding: 22px 22px 26px 0; border-right: 1px solid var(--o-line); }
.dh-step + .dh-step { padding-left: 22px; }
.dh-step:last-child { border-right: 0; }
.dh-step__n { font-size: 12px; color: var(--o-mut); }
.dh-step__t { margin-top: 40px; font-size: clamp(20px, 1.7vw, 30px); font-weight: 500; text-transform: uppercase; letter-spacing: -.02em; line-height: 1.05; }
.dh-step__p { margin-top: 12px; font-size: 16px; line-height: 1.42; color: #CFCAC8; }
@media (max-width: 999px) {
  .dh-how__head { grid-template-columns: 1fr; }
  .dh-steps { grid-template-columns: 1fr 1fr; }
  .dh-step { padding: 20px 16px 22px 0 !important; border-right: 0; border-bottom: 1px solid var(--o-line); }
  .dh-step:nth-child(odd) { border-right: 1px solid var(--o-line); }
  .dh-step:nth-child(even) { padding-left: 16px !important; }
  .dh-step__t { margin-top: 22px; }
}
@media (max-width: 559px) { .dh-steps { grid-template-columns: 1fr; } .dh-step:nth-child(odd) { border-right: 0; } .dh-step:nth-child(even) { padding-left: 0 !important; } }

/* ---------- что в квартире (список для чтения и без JS) ---------- */
.dh-dev { border-top: 1px solid var(--o-line); }
.dh-dev__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 32px); margin-top: clamp(26px, 3vw, 50px); }
.dh-dev__room { font-size: var(--o-fs-ui); text-transform: uppercase; padding-bottom: 10px; border-bottom: 1px solid var(--o-line); }
.dh-dev__room small { color: var(--o-mut); font-size: 1em; }
.dh-dev ul { margin-top: 10px; display: grid; gap: 8px; font-size: 16px; line-height: 1.35; color: #CFCAC8; }
.dh-dev li::before { content: "— "; color: var(--o-mut); }
@media (max-width: 999px) { .dh-dev__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 559px) { .dh-dev__grid { grid-template-columns: 1fr; } }

/* ---------- статус и соседние направления ---------- */
.dh-note { margin-top: clamp(26px, 3vw, 46px); max-width: 44em; font-size: 14px; color: var(--o-mut); line-height: 1.45; }
.dh-nav { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--o-line); }
.dh-nav a { display: grid; gap: 8px; padding: clamp(24px, 3vw, 48px) var(--o-pad); transition: background .4s var(--o-ease), color .4s var(--o-ease); }
.dh-nav a + a { border-left: 1px solid var(--o-line); text-align: right; }
.dh-nav a:hover { background: var(--o-fg); color: var(--o-ink); }
.dh-nav small { font-size: var(--o-fs-ui); text-transform: uppercase; color: var(--o-mut); }
.dh-nav a:hover small { color: var(--o-ink-mut); }
.dh-nav span { font-size: clamp(24px, 3vw, 54px); font-weight: 500; text-transform: uppercase; letter-spacing: -.03em; line-height: 1; }

@media (prefers-reduced-motion: reduce) {
  .sh-pin::after, .sh-btn[aria-pressed="true"] i, .sh__item.is-alarm i, .sh__state.is-alarm::before { animation: none; }
  .sh-toast, .sh-toast.is-out { animation: none; }
}

/* подсказка: мышь или касание */
.sh__hint .for-touch { display: none; }
.sh__stage.is-touch .sh__hint .for-mouse { display: none; }
.sh__stage.is-touch .sh__hint .for-touch { display: inline; }
@media (max-width: 559px) { .sh__stage.is-touch .sh__hint { display: block; left: 10px; right: 10px; bottom: 56px; max-width: none; font-size: 12px; } }

/* ---------- панель: вкладки «Устройства» и «Смета» ---------- */
.sh__tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--o-line); }
.sh__tabs [role="tab"] { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; justify-content: center; min-height: 48px; padding: 8px 10px; border: 0; background: none; font-size: 14px; text-transform: uppercase; color: var(--o-mut); cursor: pointer; transition: color .3s, background .3s; }
.sh__tabs [role="tab"] b { font-weight: 500; color: var(--o-yellow); text-transform: none; white-space: nowrap; }
.sh__tabs [role="tab"][aria-selected="true"] { color: var(--o-fg); box-shadow: inset 0 -2px 0 var(--o-yellow); }
.sh__tabs [role="tab"]:hover { color: var(--o-fg); }
.sh__pane { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sh__pane[hidden] { display: none; }
.sh__price { margin-top: 10px; font-size: 14px; color: var(--o-yellow); }

.sh__estnote { padding: 12px 18px; border-bottom: 1px solid var(--o-line); font-size: 13px; color: var(--o-mut); line-height: 1.4; }
.sh__estlist { flex: 1; overflow: auto; overscroll-behavior: contain; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: rgba(237, 233, 232, .2) transparent; }
.sh__eline { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "c n p" ". s s"; gap: 2px 10px; align-items: center; padding: 8px 18px; border-bottom: 1px solid rgba(237, 233, 232, .07); transition: opacity .3s; }
.sh__eline input { grid-area: c; width: 18px; height: 18px; margin: 0; accent-color: var(--o-yellow); cursor: pointer; }
.sh__en { grid-area: n; padding: 0; border: 0; background: none; text-align: left; font-size: 14px; line-height: 1.3; cursor: pointer; }
button.sh__en:hover { text-decoration: underline; text-underline-offset: 3px; }
.sh__es { grid-area: s; font-size: 12px; color: var(--o-mut); }
.sh__ep { grid-area: p; font-size: 14px; white-space: nowrap; }
.sh__eline.is-off { opacity: .45; }
.sh__eline.is-off .sh__ep { text-decoration: line-through; }
.sh__eline--project { border-top: 1px solid var(--o-line); }
.sh__eline--project i { grid-area: c; width: 8px; height: 8px; border-radius: 50%; background: var(--o-yellow); justify-self: center; }
.sh__eline--project .sh__en { font-weight: 500; cursor: default; }
.sh__esttot { padding: 12px 18px 16px; border-top: 1px solid var(--o-line); background: var(--o-bg); display: grid; gap: 4px; }
.sh__esttot p { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: #CFCAC8; }
.sh__esttot .sh__esttot-sum { margin-top: 4px; font-size: 20px; color: var(--o-fg); text-transform: uppercase; }
.sh__esttot-sum b { font-weight: 500; color: var(--o-yellow); }
.sh__esttot .sh-btn { justify-content: center; margin-top: 10px; }
@media (max-width: 999px) { .sh__estlist { max-height: 420px; } }

/* ---------- сколько стоит ---------- */
.dh-cost { border-top: 1px solid var(--o-line); }
.dh-cost__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--o-line); }
.dh-cost__cell { display: grid; align-content: start; gap: 12px; padding: 22px 22px 28px 0; border-right: 1px solid var(--o-line); }
.dh-cost__cell + .dh-cost__cell { padding-left: 22px; }
.dh-cost__cell:last-child { border-right: 0; }
.dh-cost__cell .lbl { color: var(--o-mut); }
.dh-cost__n { font-size: clamp(30px, 3.4vw, 60px); font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.dh-cost__cell--sum .dh-cost__n { color: var(--o-yellow); }
.dh-cost__p { max-width: 24em; font-size: 16px; line-height: 1.42; color: #CFCAC8; }
.dh-cost__inc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(22px, 2.6vw, 40px); }
.dh-cost__inc li { padding: .3em .8em; border: 1.2px solid var(--o-line); border-radius: 999px; font-size: 14px; text-transform: uppercase; }
@media (max-width: 759px) {
  .dh-cost__grid { grid-template-columns: 1fr; }
  .dh-cost__cell, .dh-cost__cell + .dh-cost__cell { padding: 18px 0 20px; border-right: 0; border-bottom: 1px solid var(--o-line); }
}

/* подключение бесплатно, скидка с кухней */
.sh__esttot .sh__free { color: var(--o-yellow); }
.sh__kitchen { display: flex; gap: 10px; align-items: center; margin: 6px 0 2px; font-size: 14px; cursor: pointer; }
.sh__kitchen input { width: 18px; height: 18px; margin: 0; accent-color: var(--o-yellow); }
.sh__esttot-disc[hidden] { display: none; }
.dh-cost__cell--free .dh-cost__n { color: var(--o-yellow); }
/* вид изнутри и пролёт (smarthome.js → walk) */
.sh__walkhint { position: absolute; z-index: 2; left: 14px; bottom: 16px; max-width: 52%; margin: 0; font-size: 13px; color: var(--o-fg); text-transform: uppercase; opacity: 0; pointer-events: none; transition: opacity .5s; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.sh__walkhint .for-touch { display: none; }
.sh__stage.is-touch .sh__walkhint .for-mouse { display: none; }
.sh__stage.is-touch .sh__walkhint .for-touch { display: inline; }
.sh__stage.is-walk .sh__walkhint { opacity: 1; }
.sh__stage.is-walk .sh__hint, .sh__stage.is-walk .sh__pins, .sh__stage.is-walk [data-pins], .sh__stage.is-walk [data-cam="in"], .sh__stage.is-walk [data-cam="out"] { display: none; }
.sh__stage.is-walk .sh__gl { cursor: grab; }
.sh__stage.is-walk.is-dragging .sh__gl { cursor: grabbing; }
.sh__stage.is-walk.is-floor .sh__gl { cursor: crosshair; }
.sh__ring { position: absolute; z-index: 2; left: 0; top: 0; width: 46px; height: 46px; margin: -23px 0 0 -23px; border: 2px solid rgba(252, 232, 127, .9); border-radius: 50%; transform: scaleY(.45); pointer-events: none; opacity: 0; transition: opacity .25s; }
.sh__stage.is-walk.is-floor .sh__ring { opacity: 1; }
@media (max-width: 559px) {
  .sh__cam [data-cam="in"], .sh__cam [data-cam="out"] { display: none; }
  .sh__walkhint { left: 10px; right: 10px; bottom: 56px; max-width: none; font-size: 12px; }
}

/* ---------- доводка 2026-10-07 ---------- */
/* первый экран: статус — как подпись (капсом, размер интерфейса), а не строка текста */
.dh-hero__crumbs a { transition: color .3s var(--o-ease); }

/* шаги: нумерация своя, маркеры списка не нужны */
.dh-steps { margin: 0; padding: 0; list-style: none; }
.dh-step__n { font-size: var(--o-fs-ui); }

/* подписи поверх сцены читаются и на светлой стене: своя тёмная подложка */
.sh__lbl { padding: 5px 10px; border-radius: 999px; background: rgba(18, 22, 23, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #CFCAC8; }
.sh__hint, .sh__walkhint { padding: 8px 12px; border-radius: 14px; background: rgba(18, 22, 23, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); line-height: 1.35; text-shadow: none; }
.sh__hint { left: 14px; bottom: 14px; max-width: min(46%, 30em); color: #CFCAC8; }
.sh__walkhint { bottom: 14px; max-width: min(48%, 34em); }
.sh-btn { color: var(--o-fg); white-space: nowrap; }

/* клавиатура: обводка внутрь — список и вкладки обрезают внешнюю */
.sh__item:focus-visible, .sh__tabs [role="tab"]:focus-visible, .sh__en:focus-visible { outline-offset: -3px; }
.sh__eline input:focus-visible, .sh__kitchen input:focus-visible { outline-offset: 2px; }
.sh-pin:focus-visible { outline-offset: -4px; border-radius: 50%; }

/* список устройств: состояние не давит название */
.sh__item span { min-width: 0; line-height: 1.25; }
.sh__item small { text-align: right; line-height: 1.2; max-width: 16em; }
.sh__grp { letter-spacing: .01em; }

/* смета */
.sh__estnote { padding: 14px 18px; font-size: 14px; color: #CFCAC8; }
.sh__eline { padding: 10px 18px; }
.sh__en { color: var(--o-fg); }
.sh__es[hidden] { display: none; }
.sh__ep { font-variant-numeric: tabular-nums; }
.sh__esttot span:last-child, .sh__esttot-sum b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sh__esttot { gap: 6px; padding-top: 14px; }
.sh__esttot .sh__esttot-sum { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--o-line); align-items: baseline; }
.sh__kitchen { margin: 6px 0; padding: 9px 12px; border: 1.2px solid var(--o-line); border-radius: 12px; line-height: 1.3; transition: border-color .3s var(--o-ease); }
.sh__kitchen:hover, .sh__kitchen:has(input:checked) { border-color: rgba(252, 232, 127, .6); }
.sh__kitchen input { flex: none; }
.sh__esttot .sh-btn { min-height: 44px; margin-top: 8px; }

/* что в квартире: вторая строка пункта — под текстом, а не под тире */
.dh-dev li { padding-left: 1.25em; text-indent: -1.25em; }
.dh-cost__n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dh-cost__cell .more { justify-self: start; }

@media (max-width: 999px) {
  .sh__hint, .sh__walkhint { max-width: min(60%, 30em); }
}
@media (max-width: 559px) {
  /* сценарии листаются вбок: край гаснет — видно, что там есть ещё */
  .sh__top { padding: 0 44px 0 10px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); }
  /* кнопки камеры — во всю ширину, на узком телефоне листаются, а не вылезают */
  .sh__cam { left: 10px; right: 10px; gap: 5px; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .sh__cam > :first-child { margin-left: auto; }
  .sh__cam .sh-btn--wide { padding: 0 10px; }
  .sh__cam::-webkit-scrollbar { display: none; }
  .sh__cam .sh-btn { flex: none; min-height: 36px; }
  .sh__stage.is-touch .sh__hint, .sh__walkhint { left: 10px; right: auto; bottom: 56px; max-width: calc(100% - 20px); padding: 7px 10px; }
  /* уведомления компактнее и не больше двух — сцена остаётся видна */
  .sh__toasts { bottom: 58px; gap: 6px; }
  .sh-toast { padding: 9px 11px; font-size: 13px; border-radius: 14px; }
  .sh-toast:nth-child(n+3) { display: none; }
  .sh__item { min-height: 44px; }
  .sh__tabs [role="tab"] { min-height: 52px; }
  .dh-nav span { font-size: clamp(18px, 5.6vw, 24px); overflow-wrap: anywhere; }
  .dh-nav a { padding-inline: var(--o-pad) 10px; }
  .dh-nav a + a { padding-inline: 10px var(--o-pad); }
}
