/* Телефонна розмітка «нічний гараж»: своя послідовність блоків, усе під html[data-ui=m]. */
html[data-ui=m] {
  --bg: #06080b; --line: #232d36; --tx: #e6edf3; --mut: #8fa1b3;
  --cyan: #2ff3ff; --mag: #ff2ea6; --green: #78ff8c; --amber: #ffb347;
  --head: "Bahnschrift", "DIN Alternate", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  color-scheme: dark; background: var(--bg);
}
html[data-ui=m] body {
  margin: 0; background: var(--bg); color: var(--tx);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden; -webkit-tap-highlight-color: transparent;
}
[data-layout=m] *, [data-layout=m] *::before, [data-layout=m] *::after { box-sizing: border-box; }
[data-layout=m] :focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
[data-layout=m] .chrome {
  font-family: var(--head); font-weight: 700; line-height: 1.02;
  background: linear-gradient(180deg, #fff 0%, #cfd8e2 38%, #6f7d8b 52%, #e9eef3 70%, #9aa7b3 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-layout=m] .kinetic span { display: inline-block; padding-bottom: .06em; background: inherit; -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (prefers-reduced-motion: no-preference) {
  [data-layout=m] .kinetic span { animation: m-rise .7s cubic-bezier(.2, .8, .2, 1) both; }
  [data-layout=m] .kinetic span:nth-child(2) { animation-delay: .12s; }
  [data-layout=m] .kinetic span:nth-child(3) { animation-delay: .24s; }
}
@keyframes m-rise { from { transform: translateY(.6em); opacity: 0; } to { transform: none; opacity: 1; } }

/* 1. ворота на весь екран */
.m-door {
  position: relative; min-height: 100svh; display: flex; flex-direction: column;
  padding: 0 0 calc(88px + env(safe-area-inset-bottom));
  background: radial-gradient(90% 60% at 50% 100%, #0f2a33 0%, #06080b 70%);
  touch-action: pan-y;
}
.m-door__bay {
  position: relative; flex: 1 1 auto; min-height: 36svh; overflow: hidden;
  background: radial-gradient(80% 70% at 50% 60%, #0f2a33, #06080b); border-bottom: 3px solid var(--cyan);
  box-shadow: 0 6px 22px rgba(47, 243, 255, .45);
}
.m-door__bay img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12px; opacity: .9; }
.m-door__slats {
  position: absolute; inset: 0; display: grid; grid-template-rows: repeat(7, 1fr);
  transition: transform .7s cubic-bezier(.6, 0, .25, 1);
}
.m-door__slats i {
  display: block; border-bottom: 2px solid #05070a;
  background: linear-gradient(180deg, #7d8994 0%, #c3ccd5 16%, #57626d 50%, #9aa6b1 84%, #343d46 100%);
  box-shadow: inset 0 -1px 0 rgba(47, 243, 255, .55);
}
.m-door.up .m-door__slats { transform: translateY(-101%); }
.m-door__text { position: relative; z-index: 1; padding: 20px 16px 0; }
.m-eyebrow { margin: 0 0 10px; color: var(--cyan); font: 600 12px/1 var(--head); letter-spacing: .16em; text-transform: uppercase; }
.m-door h1 { margin: 0 0 12px; font-size: clamp(36px, 12vw, 52px); }
.m-lead { margin: 0 0 18px; color: #b9c6d2; font-size: 16px; }
.m-lift {
  min-height: 48px; padding: 0 20px; border-radius: 999px; font: 600 16px/1 var(--head); letter-spacing: .03em;
  color: #d9fbff; background: rgba(6, 8, 11, .6); border: 1px solid var(--cyan); box-shadow: 0 0 16px rgba(47, 243, 255, .4);
}
@media (prefers-reduced-motion: reduce) { .m-door__slats { transition: none; } }

/* 2. сцена */
.m-stage { position: relative; overflow: hidden; height: 64svh; min-height: 340px; background: radial-gradient(120% 80% at 40% 20%, #10202a, #06080b 65%); scroll-margin-top: 0; }
.m-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.m-pill {
  position: absolute; left: 12px; top: 12px; right: 12px; width: fit-content; max-width: calc(100% - 24px); margin: 0;
  padding: 6px 12px; border-radius: 999px; font-size: 13px; pointer-events: none;
  background: rgba(6, 8, 11, .75); border: 1px solid rgba(47, 243, 255, .55); color: #d9fbff;
}
.m-item {
  position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 12px; border-radius: 12px; background: rgba(10, 14, 19, .9); border: 1px solid rgba(255, 179, 71, .7);
}
.m-item[hidden] { display: none; }
.m-item p { margin: 0; flex: 1; display: grid; font-size: 13px; min-width: 0; }
.m-item p b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-item p span { color: var(--mut); }
.m-item__x { min-width: 40px; height: 40px; border-radius: 10px; background: none; border: 1px solid var(--line); color: var(--tx); font-size: 16px; }
[data-layout=m] .shutter {
  position: absolute; inset: 0; z-index: 3; display: grid; grid-template-rows: repeat(6, 1fr);
  transform: translateY(-101%); transition: transform .38s cubic-bezier(.6, 0, .3, 1); pointer-events: none;
}
[data-layout=m] .shutter.down { transform: none; }
[data-layout=m] .shutter i { display: block; border-bottom: 2px solid #05070a; background: linear-gradient(180deg, #8e9aa6, #c9d2db 18%, #5d6873 52%, #a4afba 82%, #3b444d); box-shadow: inset 0 -1px 0 rgba(47, 243, 255, .65); }
@media (prefers-reduced-motion: reduce) { [data-layout=m] .shutter { transition: none; } }

/* 3. варіанти — горизонтальні картки */
.m-variants {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 14px 14% 6px;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.m-variants::-webkit-scrollbar { display: none; }
.m-var {
  flex: 0 0 72%; scroll-snap-align: center; display: grid; gap: 2px; text-align: left; padding: 12px 14px;
  border-radius: 14px; border: 1px solid var(--line); color: var(--tx); font: inherit;
  background: linear-gradient(180deg, #151b22, #0c1015);
}
.m-var[aria-selected=true] { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan) inset, 0 0 18px rgba(47, 243, 255, .25); }
.m-var__label { font: 600 16px/1.2 var(--head); }
.m-var__size { color: var(--mut); font-size: 13px; }
.m-var__sum { font: 700 24px/1.2 var(--head); color: #fff; }

.m-h2 { margin: 0 0 12px; font: 700 24px/1.1 var(--head); color: #e9eef3; }

/* 4. перевірки */
.m-checks { padding: 18px 16px 8px; }
.m-checks ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
[data-layout=m] .chk { display: grid; gap: 2px; padding: 10px 12px; border-left: 3px solid; border-radius: 4px; background: rgba(255, 255, 255, .03); font-size: 14px; }
[data-layout=m] .chk span { color: #b9c6d2; }
[data-layout=m] .chk--car { border-color: var(--mag); }
[data-layout=m] .chk--bench { border-color: var(--green); }
[data-layout=m] .chk--path { border-color: var(--amber); }

/* 5. картки «а раптом» */
.m-fears { padding: 22px 0 8px; }
.m-fears .m-h2 { padding: 0 16px; }
.m-carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.m-carousel::-webkit-scrollbar { display: none; }
.m-card {
  flex: 0 0 100%; scroll-snap-align: start; margin: 0; padding: 18px 16px 16px; position: relative;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #11171d, #0a0d11);
}
.m-card h3 { margin: 0 0 10px; font: 700 22px/1.15 var(--head); }
.m-card--car h3 { color: #ffd1ea; text-shadow: 0 0 14px rgba(255, 46, 166, .45); }
.m-card--bench h3 { color: #d6ffdc; text-shadow: 0 0 14px rgba(120, 255, 140, .4); }
.m-card--price h3 { color: #d9fbff; text-shadow: 0 0 14px rgba(47, 243, 255, .4); }
.m-card p { margin: 0 0 10px; color: #b9c6d2; }
.m-card blockquote { margin: 0; padding: 10px 12px; border-radius: 10px; background: #07090c; border: 1px dashed rgba(255, 46, 166, .55); display: grid; gap: 6px; font-size: 14px; }
.m-card blockquote span:first-child { color: #ffd1ea; font-weight: 600; }
.m-dots { display: flex; justify-content: center; gap: 8px; padding: 10px 0 0; }
.m-dots i { width: 7px; height: 7px; border-radius: 50%; background: #2a3640; }
.m-dots i.on { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

[data-layout=m] .zones { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
[data-layout=m] .zones li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 4px 8px; }
[data-layout=m] .zones li > span:first-child { grid-column: 1 / -1; color: #b9c6d2; }
[data-layout=m] .zbar { height: 8px; border-radius: 4px; background: rgba(120, 255, 140, .18); position: relative; overflow: hidden; }
[data-layout=m] .zbar { overflow: visible; background: rgba(120, 255, 140, .5); }
[data-layout=m] .zbar i { position: absolute; top: -3px; bottom: -3px; left: var(--r); width: 2px; background: #fff; box-shadow: 0 0 6px #fff; } /* смуга — вільно, риска — норма */
[data-layout=m] .zones b { font-family: var(--head); }
[data-layout=m] .zones small { color: var(--mut); }
[data-layout=m] .bars { display: grid; gap: 8px; }
[data-layout=m] .bar { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; text-align: left; background: none; border: 1px solid transparent; border-radius: 10px; padding: 8px; color: var(--tx); font: inherit; min-height: 44px; }
[data-layout=m] .bar.is-on { border-color: rgba(47, 243, 255, .5); }
[data-layout=m] .bar__label { font-size: 14px; }
[data-layout=m] .bar__label small { color: var(--mut); }
[data-layout=m] .bar__track { grid-column: 1; height: 8px; border-radius: 4px; background: #121920; overflow: hidden; }
[data-layout=m] .bar__fill { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, #22c9d6, #2ff3ff); }
[data-layout=m] .bar b { grid-row: 1 / 3; grid-column: 2; font: 700 16px/1 var(--head); white-space: nowrap; }

/* 6. специфікація — розкривний блок */
.m-spec { margin: 22px 16px 0; border: 1px solid var(--line); border-radius: 14px; background: #0a0d11; }
.m-spec summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; min-height: 52px; cursor: pointer; font: 600 17px/1.2 var(--head); list-style: none; }
.m-spec summary::-webkit-details-marker { display: none; }
.m-spec summary::after { content: "▾"; color: var(--cyan); }
.m-spec[open] summary::after { content: "▴"; }
.m-spec summary b { margin-left: auto; color: #fff; }
.m-spec ul { list-style: none; margin: 0; padding: 0 16px; }
.m-spec li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.m-spec li b { white-space: nowrap; font-family: var(--head); }
.m-spec img { display: block; width: calc(100% - 32px); height: auto; margin: 12px 16px; border-radius: 10px; }
.m-fine { margin: 0 16px 14px; color: var(--mut); font-size: 12.5px; }

/* 7. ролик 9:16 */
.m-film { padding: 26px 16px 0; }
.m-film video { display: block; width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 9 / 16; max-height: 78svh; border-radius: 16px; background: #07090c; border: 1px solid var(--line); object-fit: contain; }
.m-foot { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); color: var(--mut); font-size: 12.5px; }

/* липка CTA */
.m-cta {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; border-radius: 14px;
  text-decoration: none; font: 700 18px/1 var(--head); letter-spacing: .02em; color: #041014;
  background: linear-gradient(180deg, #e9fdff, #7ff7ff 45%, #22c9d6 55%, #b7fbff);
  box-shadow: 0 0 0 1px #9ffaff inset, 0 0 22px rgba(47, 243, 255, .5), 0 8px 24px rgba(0, 0, 0, .6);
}

/* ролик: поки файлу немає або він не грає — видно постер-план */
[data-layout=m] .film-wrap { max-width: 420px; margin: 0 auto; position: relative; }
[data-layout=m] .film-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 16px; border-radius: 16px; }
[data-layout=m] .film { position: relative; opacity: 0; transition: opacity .4s; }
[data-layout=m] .film.is-playing { opacity: 1; }
[data-layout=m] .film-wrap { max-width: 420px; margin: 0 auto; border: 1px solid var(--line); border-radius: 16px; background: #07090c; overflow: hidden; }
[data-layout=m] .film-wrap .film { border: 0; }

/* посилання «Конфіденційність» у підвалі — кольором тексту підвалу */
.m-foot a, .m-fine a { color: inherit; }
