/* Телефон: окрема розмітка «кахельна роздягальня» (html[data-layout=m]). Своя послідовність блоків. */
html[data-layout=m] {
  --tile: #f3f6f6; --grout: #c4ced1; --ink: #1b272e; --ink2: #475861; --ink3: #8996a0;
  --green: #0a7f47; --plq: #213039; --plq-ln: rgba(255, 255, 255, .22); --hl: #c84b14; --cab: #dde6ea;
  --tech: Bahnschrift, "DIN Alternate", "Roboto Condensed", "sans-serif-condensed", "Arial Narrow", system-ui, sans-serif;
  --mono: ui-monospace, "Roboto Mono", Consolas, monospace;
  background: var(--tile); color-scheme: light; -webkit-text-size-adjust: 100%;
}
html[data-layout=m] body {
  margin: 0; color: var(--ink); font: 16px/1.5 var(--tech); overflow-x: hidden; background-color: var(--tile);
  background-image: linear-gradient(var(--grout) 1.5px, transparent 1.5px), linear-gradient(90deg, var(--grout) 1.5px, transparent 1.5px),
    radial-gradient(circle at 30% 25%, #fff, rgba(255, 255, 255, 0) 60%);
  background-size: 40px 40px, 40px 40px, 40px 40px; background-position: -1px -1px;
}
/* холодна лампа над першим екраном: блимає при вмиканні */
.L-m { position: relative; }
.L-m::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 100vh; pointer-events: none;
  background: linear-gradient(180deg, rgba(214, 236, 255, .85), rgba(214, 236, 255, 0) 75%);
  animation: m-tube 1.3s steps(1, end) both;
}
@keyframes m-tube { 0% { opacity: 0; } 10% { opacity: .9; } 15% { opacity: .1; } 24% { opacity: 1; } 30% { opacity: .35; } 38%, 100% { opacity: 1; } }
.L-m > * { position: relative; }
.L-m a { color: inherit; }
.L-m :focus-visible { outline: 3px solid var(--hl); outline-offset: 3px; }
.L-m h1, .L-m h2 { margin: 0; line-height: 1.05; }

.m-hero { padding: 22px 16px 18px; }
.m-eyebrow { display: inline-block; font: 11.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; margin: 0 0 14px;
  background: var(--plq); color: #fff; padding: 4px 8px; border-radius: 3px; }
.m-hero h1 { font-size: clamp(34px, 10.4vw, 46px); font-weight: 700; letter-spacing: -.01em; }
.mkin > span { display: block; overflow: clip; overflow-clip-margin: .12em; padding: .03em .1em .06em 0; }
.mkin > span > b { display: inline-block; font-weight: inherit; transform: translateY(110%); animation: m-up .75s cubic-bezier(.2, .8, .2, 1) .35s forwards; }
.mkin > span:nth-child(2) > b { animation-delay: .45s; }
.mkin > span:nth-child(3) > b { animation-delay: .55s; color: var(--green); }
@keyframes m-up { to { transform: none; } }
.m-lead { margin: 14px 0 18px; font-size: 17px; background: rgba(243, 246, 246, .88); }
/* CTA — зелений знак виходу */
.m-cta {
  display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 18px; box-sizing: border-box; border-radius: 6px;
  background: var(--green); color: #fff !important; font: 700 18px/1.1 var(--tech); text-decoration: none; text-align: center;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55), 0 0 0 1px var(--green), 0 10px 20px -10px rgba(10, 127, 71, .9);
  -webkit-tap-highlight-color: transparent;
}
.m-cta::after { content: " →"; white-space: pre; }
.m-cta:active { transform: translateY(1px); filter: brightness(1.1); }

/* план на плитці; пігулка статусу — під планом, не поверх */
.m-sheet { margin: 10px 16px 0; background: #fbfcfc; border: 1px solid var(--grout); border-radius: 8px; overflow: hidden;
  box-shadow: 0 18px 36px -24px rgba(27, 39, 46, .6); }
.m-sheet-head { display: flex; justify-content: space-between; padding: 7px 10px; font: 11px var(--mono); letter-spacing: .08em;
  background: var(--plq); color: rgba(255, 255, 255, .85); }
.m-tc { color: #7ee2a8; }
.m-plan { display: flex; justify-content: center; padding: 6px 4px 0; touch-action: pan-y; }
.m-plan svg { width: 100%; height: auto; max-height: 44vh; }
.m-pill { margin: 0; padding: 9px 12px; border-top: 1px solid var(--grout); font-size: 15px; min-height: 2.9em; box-sizing: border-box; }
.m-pill b { color: var(--hl); }

.L-m .plan text { font-family: var(--tech); fill: var(--ink); }
.L-m .plan .tile { fill: var(--tile); stroke: var(--grout); stroke-width: 1.4; opacity: 0; transform-box: fill-box; transform-origin: center;
  transform: scale(.5); transition: opacity .3s, transform .4s cubic-bezier(.2, 1.3, .4, 1); transition-delay: calc(var(--d) * 40ms); }
.L-m .plan .wall { fill: none; stroke: var(--ink); stroke-width: 7; }
.L-m .plan .door, .L-m .plan .door-arc { fill: none; stroke: var(--ink); stroke-width: 2; }
.L-m .plan .win { stroke: #5aa0d8; stroke-width: 2.5; }
.L-m .plan .hatch-l { stroke: var(--ink3); stroke-width: 1.4; }
.L-m .plan .zone { fill: url(#hatch); stroke: var(--ink3); stroke-dasharray: 4 4; }
.L-m .plan .draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s cubic-bezier(.6, 0, .3, 1); }
.L-m .plan .cab .body { fill: var(--cab); stroke: var(--ink); stroke-width: 1.6; transition: fill .3s, stroke .3s; }
.L-m .plan .cab .bench { fill: #fff; fill-opacity: .6; stroke: var(--ink2); stroke-width: 1.2; stroke-dasharray: 4 3; }
.L-m .plan .cab .split { stroke: var(--ink); stroke-width: 1; }
.L-m .plan .cab .num { display: none; font-size: 15px; font-weight: 700; text-anchor: middle; dominant-baseline: central; fill: var(--ink); }
.L-m .plan .cab { opacity: 0; transform-box: fill-box; transform-origin: center; transform: translateY(-12px);
  transition: opacity .25s, transform .4s cubic-bezier(.2, 1.4, .4, 1); transition-delay: calc(var(--i) * 20ms); }
.L-m .plan .rowlbl { font-size: 28px; font-weight: 700; text-anchor: middle; fill: var(--ink2); dominant-baseline: middle; opacity: 0; transition: opacity .4s; }
.L-m .plan .ext { stroke: var(--ink3); stroke-width: 1; }
.L-m .plan .dline { stroke: var(--ink2); stroke-width: 1.5; fill: none; }
.L-m .plan .arw { fill: none; stroke: var(--ink2); stroke-width: 1.8; }
.L-m .plan .dtext { font-size: 30px; font-weight: 600; text-anchor: middle; font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--tile); stroke-width: 6px; }
.L-m .plan .g-dims, .L-m .plan .g-zone, .L-m .plan .aisle-dim, .L-m .plan .evac-dim { opacity: 0; transition: opacity .4s; }
.L-m .plan .aisle-dim .dtext { fill: var(--hl); font-weight: 700; }
.L-m .plan .evac-dim .dtext { fill: var(--green); font-weight: 700; }
.L-m .plan .aisle { fill: var(--hl); fill-opacity: 0; transition: fill-opacity .4s; }
.L-m .plan .evac { fill: var(--green); fill-opacity: 0; stroke: var(--green); stroke-opacity: 0; stroke-dasharray: 10 8; stroke-width: 1.8; transition: fill-opacity .5s, stroke-opacity .5s; }
.L-m .plan .flow { fill: none; stroke: var(--green); stroke-width: 3; stroke-dasharray: 9 11; opacity: 0; transition: opacity .4s; }
@keyframes m-flow { to { stroke-dashoffset: -40; } }

/* таймлайн: t1 плитка і стіни, t2 габарити, t3 шафи, t4 проходи, t5 евакуація */
.m-sheet.t1 .plan .tile { opacity: 1; transform: none; }
.m-sheet.t1 .plan .g-walls .draw { stroke-dashoffset: 0; transition-delay: .5s; }
.m-sheet.t2 .plan .g-dims, .m-sheet.t2 .plan .g-zone { opacity: 1; }
.m-sheet.t2 .plan .g-dims .draw { stroke-dashoffset: 0; transition-duration: .8s; }
.m-sheet.t3 .plan .cab, .m-sheet.t3 .plan .rowlbl { opacity: 1; transform: none; }
.m-sheet.t4 .plan .aisle-dim { opacity: 1; }
.m-sheet.t4 .plan .aisle-dim .draw { stroke-dashoffset: 0; transition-duration: .6s; }
.m-sheet.t5 .plan .evac { fill-opacity: .14; stroke-opacity: .9; }
.m-sheet.t5 .plan .evac-dim { opacity: 1; }
.m-sheet.t5 .plan .evac-dim .draw { stroke-dashoffset: 0; }

/* підсвітка від картки протоколу */
.m-sheet[data-hl=cabs] .plan .cab .body { stroke: var(--hl); fill: #f7d9c8; }
.m-sheet[data-hl=cab1] .plan .cab { opacity: .35; }
.m-sheet[data-hl=cab1] .plan .cab:first-child { opacity: 1; }
.m-sheet[data-hl=cab1] .plan .cab:first-child .body { stroke: var(--hl); stroke-width: 3; fill: #f7d9c8; }
.m-sheet[data-hl=cab1] .plan .cab:first-child .num { display: inline; }
.m-sheet[data-hl=mid] .plan .aisle.a-mid { fill-opacity: .22; }
.m-sheet[data-hl=wall] .plan .aisle.a-wall { fill-opacity: .22; }
.m-sheet[data-hl=mid] .plan .aisle-dim:not(.a-mid), .m-sheet[data-hl=wall] .plan .aisle-dim:not(.a-wall) { opacity: .25; }
.m-sheet[data-hl=evac] .plan .evac { fill-opacity: .3; }
.m-sheet[data-hl=evac] .plan .flow { opacity: .95; animation: m-flow 1.1s linear infinite; }
.m-sheet:not([data-hl=evac]).t5 .plan .flow { opacity: .5; }

/* протокол: свайп-карусель табличок */
.m-proto { padding: 26px 0 8px; }
.m-proto h2 { font-size: 26px; padding: 0 16px; }
.m-proto h2 small { font-size: 15px; font-weight: 400; color: var(--ink2); }
.m-sub { margin: 6px 16px 12px; font-size: 14px; color: var(--ink2); }
.m-proto h2, .m-sub { background: rgba(243, 246, 246, .88); }
.m-cards {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 14px; scroll-padding: 0 16px;
  overscroll-behavior-x: contain; scrollbar-width: none; touch-action: pan-x pan-y;
}
.m-cards::-webkit-scrollbar { display: none; }
.m-card {
  flex: 0 0 calc(100% - 40px); scroll-snap-align: start; box-sizing: border-box; padding: 16px 18px 16px; min-height: 196px;
  color: #fff; border-radius: 8px; position: relative; user-select: none;
  background:
    radial-gradient(circle at 9px 9px, #b8c3c8 2.5px, #6d7b82 3px, transparent 3.5px),
    radial-gradient(circle at calc(100% - 9px) 9px, #b8c3c8 2.5px, #6d7b82 3px, transparent 3.5px),
    radial-gradient(circle at 9px calc(100% - 9px), #b8c3c8 2.5px, #6d7b82 3px, transparent 3.5px),
    radial-gradient(circle at calc(100% - 9px) calc(100% - 9px), #b8c3c8 2.5px, #6d7b82 3px, transparent 3.5px), var(--plq);
  box-shadow: 0 0 0 3px var(--plq) inset, 0 0 0 4px rgba(255, 255, 255, .5) inset, 0 8px 16px -10px rgba(0, 0, 0, .6);
  transition: transform .25s;
}
.m-card.on { transform: translateY(-2px); }
.m-k { margin: 0; font: 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.m-v { margin: 4px 0 6px; font-size: 46px; font-weight: 700; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.m-v small { font-size: 18px; font-weight: 400; color: rgba(255, 255, 255, .8); }
.m-x { margin: 0 0 10px; font-size: 15px; }
.m-r { margin: 0; border-top: 1px solid var(--plq-ln); padding-top: 8px; }
.L-m cite { font: 600 12.5px/1.5 var(--mono); font-style: normal; color: #ffb48a; }
.m-final cite, .m-stamp cite { color: var(--hl); }
.m-dots { display: flex; justify-content: center; padding: 0 16px; }
.m-dots button { width: 44px; height: 32px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.m-dots button::before { content: ""; width: 18px; height: 5px; border-radius: 3px; background: var(--ink3); transition: background .2s, width .2s; }
.m-dots button[aria-selected=true]::before { background: var(--green); width: 28px; }

/* табличка-специфікація */
.m-stamp { margin: 22px 16px 0; border-radius: 8px; color: #fff; background: var(--plq); padding: 6px 4px;
  box-shadow: 0 0 0 3px var(--plq) inset, 0 0 0 4px rgba(255, 255, 255, .5) inset, 0 10px 20px -12px rgba(0, 0, 0, .6); }
.m-st-title { font-size: 14px !important; font-weight: 700; padding: 8px 12px; border-bottom: 1px solid var(--plq-ln); letter-spacing: .05em; text-transform: uppercase; }
.m-stamp dl { display: grid; grid-template-columns: 1fr auto; margin: 0; }
.m-stamp dt, .m-stamp dd { margin: 0; padding: 9px 12px; border-bottom: 1px solid var(--plq-ln); font-size: 15px; }
.m-stamp dd { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-stamp .m-tot { border-bottom: 0; font-weight: 700; font-size: 17px; }
.m-stamp dd.m-tot b { font-size: 26px; color: #7ee2a8; }
.m-foot { margin: 0; padding: 10px 12px; font-size: 13px; color: rgba(255, 255, 255, .75); border-top: 1px solid var(--plq-ln); }

.m-video { padding: 30px 16px 0; }
.m-video h2 { font-size: 22px; margin-bottom: 12px; background: rgba(243, 246, 246, .88); }
.m-vid { display: block; width: 100%; max-width: 360px; margin: 0 auto; height: auto; aspect-ratio: 9 / 16; max-height: 70vh;
  border: 1px solid var(--grout); border-radius: 8px; background: #fff; }

.m-final { padding: 34px 16px 110px; }
.m-final h2 { font-size: 32px; }
.m-final h2, .m-final > p { background: rgba(243, 246, 246, .88); }
.m-final > p { margin: 10px 0 18px; }
.m-src { margin-top: 26px; font-size: 13px; color: var(--ink2); background: rgba(243, 246, 246, .92); }
.m-src summary { color: var(--ink); min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.L-m .src-list { padding-left: 1.1em; display: grid; gap: 8px; }
.L-m .src-list a { color: var(--hl); }
.m-fine { font-size: 12px; color: var(--ink2); margin-top: 14px; }

.m-bar {
  position: fixed !important; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 9;
  display: flex; align-items: center; justify-content: center; min-height: 54px; border-radius: 6px; background: var(--green); color: #fff !important;
  font: 700 17px var(--tech); text-decoration: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55), 0 8px 22px rgba(0, 0, 0, .35);
  transform: translateY(150%); transition: transform .3s;
}
.m-bar.show { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .L-m *, .L-m *::before, .L-m::before { transition: none !important; animation: none !important; }
  .mkin > span > b { transform: none; }
}
@media (max-width: 340px) {
  .m-v { font-size: 40px; }
  .m-card { flex-basis: calc(100% - 28px); }
}

/* посилання «Конфіденційність» у підвалі — кольором тексту підвалу */
.m-foot a, .m-fine a { color: inherit; }
