/* Интерактивна карта на болницата (interaktivna-karta.html) */
.m3wrap { padding-top: calc(var(--header-h) + 24px); }
.m3head { margin-bottom: 18px; }
.m3head__row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 32px; margin-top: 14px; }
.m3head__note { max-width: 520px; font-size: var(--t-xs); color: var(--muted); }
.m3head__note .m3-badge { margin-right: 6px; }

.m3 { --side: 340px; position: relative; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); height: min(820px, calc(100vh - var(--header-h) - 40px)); min-height: 560px; margin: 0 var(--gap); border-radius: var(--r-lg); overflow: hidden; background: var(--paper); border: 1px solid var(--line-2); transition: grid-template-columns var(--d); }
.m3.is-full, .m3:fullscreen { margin: 0; height: 100vh; border-radius: 0; }

/* левият панел */
.m3__side { display: flex; flex-direction: column; min-height: 0; background: var(--white); border-right: 1px solid var(--line-2); }
.m3__tabs { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid var(--line-2); }
.m3__tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.m3__tabs button .i { width: 16px; height: 16px; }
.m3__tabs button[aria-selected='true'] { background: var(--ink); color: #fff; }
.m3__tab-info { display: none !important; }
.m3__pane { display: none; flex: 1; min-height: 0; overflow: auto; padding: 14px 14px 20px; }
.m3[data-tab='find'] .m3__pane--find, .m3[data-tab='route'] .m3__pane--route, .m3[data-tab='info'] .m3__pane--find { display: block; }
.m3__search { position: relative; display: block; }
.m3__search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.m3__search input { width: 100%; height: 48px; padding: 0 14px 0 42px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--paper); font: inherit; font-size: 15px; }
.m3__search input:focus { outline: none; border-color: var(--ink); background: var(--white); }
.m3__h { margin: 18px 4px 6px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.m3__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.m3__results[hidden] { display: none; }
.m3__results { margin-top: 8px; padding: 6px; border-radius: var(--r-md); background: var(--paper); }
.m3__list button { width: 100%; display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; line-height: 1.3; color: var(--ink); }
.m3__list button:hover, .m3__list button:focus-visible { background: var(--paper-2); }
.m3__list small { font-size: 12px; color: var(--red-ink); font-weight: 500; }
.m3__list small.is-pend { color: var(--faint); font-weight: 400; }
.m3__none { padding: 10px 12px; font-size: 13px; color: var(--muted); }

.m3__field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-bottom: 12px; min-width: 0; }
.m3__field span { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.m3__field select { height: 46px; padding: 0 12px; width: 100%; min-width: 0; max-width: 100%; text-overflow: ellipsis; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--white); font: inherit; font-size: 14.5px; color: var(--ink); }
.m3__check { display: flex; gap: 10px; align-items: center; margin: 4px 2px 16px; font-size: 14px; }
.m3__check input { width: 20px; height: 20px; accent-color: var(--red); }
.m3__hint { font-size: 13.5px; color: var(--muted); }
.m3__warn { margin: 10px 0; padding: 10px 12px; border-radius: var(--r-sm); background: #FFF6E5; color: #6B4A00; font-size: 12.5px; line-height: 1.45; }
.m3__eta { font-size: 15px; margin-bottom: 8px; }
.m3__steps { margin: 8px 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.m3__steps li { counter-increment: s; position: relative; padding-left: 36px; font-size: 14px; line-height: 1.45; }
.m3__steps li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; }
.m3__steps li:last-child::before { background: var(--red); }
.m3__steps li span { display: block; color: var(--muted); font-size: 12.5px; }

/* сцената */
.m3__stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--paper); touch-action: none; }
.m3__stage canvas { display: block; width: 100%; height: 100%; }
.m3__labels { position: absolute; inset: 0; pointer-events: none; }
.m3__labels > * { position: absolute; left: 0; top: 0; will-change: transform; }
.m3-tag { translate: -50% -50%; font-family: var(--f-sans); font-size: 15px; line-height: 1.1; text-align: center; color: var(--ink); text-shadow: 0 0 6px #fff, 0 0 2px #fff; }
.m3-tag b { font-weight: 650; }
.m3-tag small { display: block; font-size: 10.5px; color: var(--muted); }
.m3-tag--muted { color: var(--muted); }
.m3-pin { translate: -50% -100%; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--r-pill); background: var(--white); box-shadow: var(--sh-2); font-size: 12.5px; white-space: nowrap; color: var(--ink); pointer-events: auto; }
.m3-pin i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.m3-pin--sel { background: var(--red); color: #fff; font-weight: 500; }
.m3-pin--sel i { background: #fff; }
.m3-pin--in { font-size: 12px; }
.m3-pin--in:hover { background: var(--ink); color: #fff; }
.m3__tip { position: absolute; left: 0; top: 0; padding: 6px 10px; border-radius: var(--r-sm); background: var(--ink); color: #fff; font-size: 12.5px; pointer-events: none; max-width: 320px; z-index: 3; }
.m3__floors { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: grid; gap: 6px; z-index: 2; }
.m3__floors button { min-width: 48px; height: 44px; padding: 0 10px; border-radius: 14px; background: var(--white); box-shadow: var(--sh-1); font-size: 15px; font-weight: 600; color: var(--ink); }
.m3__floors button[data-floor='all'] { font-size: 11px; font-weight: 500; max-width: 64px; line-height: 1.1; height: 52px; white-space: normal; }
.m3__floors button[aria-pressed='true'] { background: var(--ink); color: #fff; }
.m3__tools { position: absolute; left: 14px; bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 2; }
.m3__tool { height: 40px; padding: 0 14px; border-radius: var(--r-pill); background: var(--white); box-shadow: var(--sh-1); font-size: 13px; color: var(--ink); }
.m3__tool[aria-pressed='true'] { background: var(--ink); color: #fff; }
.m3__tool--icon { width: 40px; padding: 0; font-size: 17px; }
.m3__load { position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; text-align: center; font-size: 14px; color: var(--muted); background: var(--paper); z-index: 4; }
.m3__load[hidden] { display: none; }
.m3__load b { display: block; width: 220px; height: 3px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.m3__load i { display: block; height: 100%; width: 8%; background: var(--red); transition: width .2s; }
.m3__notice { position: absolute; left: 14px; right: 14px; top: 14px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--white); box-shadow: var(--sh-1); font-size: 13px; z-index: 3; }
.m3__svg { width: 100%; height: 100%; }

/* панел на звеното */
/* панелът на звеното плава върху картата - не я стеснява */
.m3__info { position: absolute; z-index: 6; top: 68px; right: 76px; width: min(340px, calc(100% - 300px)); max-height: calc(100% - 140px); overflow: auto; padding: 22px 20px; background: var(--white); border-radius: var(--r-lg); box-shadow: var(--sh-2); }
.m3:not(.has-info) .m3__info { display: none; }
.m3[data-view='area'] .m3__info { display: none; }
.m3__close { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--muted); }
.m3__close:hover { background: var(--paper-2); color: var(--ink); }
.m3__title { margin: 12px 0 6px; font-size: 1.35rem; line-height: 1.2; letter-spacing: -.01em; font-weight: 600; padding-right: 30px; }
.m3__loc { font-size: 14.5px; color: var(--red-ink); font-weight: 500; }
.m3__src { margin-top: 6px; font-size: 12px; color: var(--muted); }
.m3__sum { margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.m3__phone { margin-top: 12px; font-size: 1.15rem; font-weight: 600; }
.m3__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.m3-badge { display: inline-block; padding: 3px 9px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 500; background: var(--paper-2); color: var(--ink-2); }
.m3-badge--ok { background: rgba(26, 154, 92, .14); color: #137A48; }
.m3-badge--site { background: #E8EFF7; color: #22476E; }
.m3-badge--draw { background: #FFF1D6; color: #7A5200; }
.m3-badge--pend { background: var(--paper-2); color: var(--muted); }

.m3about { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.m3about p, .m3about ul { margin-top: 14px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.m3about code { font-size: 12px; background: var(--paper-2); padding: 1px 5px; border-radius: 4px; word-break: break-all; }

/* телефон и таблет: търсачката над картата, моделът на цялата ширина, панелите - отдолу */
@media (max-width: 900px) {
  .m3, .m3.has-info { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(360px, 60vh) auto auto; height: auto; min-height: 0; margin: 0 12px; background: var(--white); }
  .m3__side, .m3 .m3__pane--find { display: contents !important; }
  .m3__search { grid-row: 1; margin: 12px 12px 0; }
  .m3__results { grid-row: 2; margin: 6px 12px 0; }
  .m3__stage { grid-row: 3; margin-top: 10px; }
  .m3__tabs { grid-row: 4; border-top: 1px solid var(--line-2); }
  .m3__dir { grid-row: 5; padding: 0 14px 20px; }
  .m3[data-tab='route'] .m3__dir, .m3[data-tab='info'] .m3__dir { display: none; }
  .m3__pane--route { grid-row: 5; max-height: none; }
  .m3__info, .m3:not(.has-info) .m3__info { display: none; position: static; width: auto; max-height: none; border-radius: 0; box-shadow: none; }
  .m3.has-info[data-tab='info'] .m3__info { display: block; grid-row: 5; padding: 18px 16px 22px; }
  .m3__tab-info { display: inline-flex !important; }
  .m3:not(.has-info) .m3__tab-info { display: none !important; }
  .m3__floors { right: 10px; top: 56px; transform: none; gap: 4px; }
  .m3__floors button { min-width: 40px; height: 36px; border-radius: 11px; font-size: 14px; }
  .m3__floors button[data-floor='all'] { height: 40px; font-size: 10px; max-width: 54px; }
  .m3__tools { left: 10px; bottom: 10px; }
  .m3-pin { max-width: calc(100vw - 150px); overflow: hidden; text-overflow: ellipsis; }
  .m3about { grid-template-columns: minmax(0, 1fr); }
}

/* район - реална карта */
.m3 .m3__geo { position: absolute; inset: 0; z-index: 3; background: #EEEDE8; }
.m3__geo[hidden] { display: none; }
.m3__view { position: absolute; left: 14px; top: 14px; z-index: 5; display: flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--white); box-shadow: var(--sh-2); }
.m3__view button { height: 36px; padding: 0 14px; border-radius: var(--r-pill); font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.m3__view button[aria-pressed='true'] { background: var(--ink); color: #fff; }
.m3__view .m3__sat { display: none; }
.m3[data-view='area'] .m3__view .m3__sat { display: inline-block; }
.m3__view .m3__sat[aria-pressed='true'] { background: var(--paper-2); color: var(--ink); }
.m3[data-view='area'] .m3__floors, .m3[data-view='area'] .m3__tools, .m3[data-view='area'] .m3__labels { display: none; }
.m3g-blk { display: grid; justify-items: center; font-family: var(--f-sans); font-size: 17px; line-height: 1.1; color: var(--ink); text-shadow: 0 0 6px #fff, 0 0 2px #fff; pointer-events: auto; }
.m3g-blk b { font-weight: 650; }
.m3g-blk small { font-size: 10px; color: var(--muted); }
.m3g-pin { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: var(--r-pill); background: var(--white); box-shadow: var(--sh-2); font-size: 12px; line-height: 1.2; color: var(--ink); white-space: nowrap; }
.m3g-pin > i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); flex: none; margin-left: 2px; }
.m3g-pin--in > i { background: var(--red); }
.m3g-pin--in:hover { background: var(--ink); color: #fff; }
.m3g-pin--gate > i { border-radius: 2px; background: repeating-linear-gradient(45deg, var(--red) 0 3px, #fff 3px 6px); width: 14px; }
.m3g-pin small { display: block; font-size: 10.5px; color: var(--muted); }
.m3g-stop { width: 22px !important; height: 22px !important; display: grid !important; place-items: center; color: #fff; font-style: normal; font-size: 12px; font-weight: 700; }
.m3g-stop--metro { background: #1F5FAA !important; }
.m3g-stop--tram { background: #E58A00 !important; }
.m3g-stop--bus { background: #2E8B57 !important; }
.m3g-pin--park { padding: 0; }
.m3g-pin--park > i { width: 24px; height: 24px; border-radius: 6px; background: #3B6EA5; color: #fff; font-style: normal; font-weight: 700; font-size: 13px; display: grid; place-items: center; margin: 0; }
.m3g-note { padding: 3px 8px; border-radius: 6px; background: rgba(255,255,255,.9); color: var(--red-ink); font-size: 11px; font-style: italic; }
.m3g-legend { position: absolute; left: 14px; bottom: 14px; z-index: 2; display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--r-md); background: rgba(255,255,255,.94); box-shadow: var(--sh-2); font-size: 12.5px; color: var(--ink-2); max-width: 300px; }
.m3g-legend span { display: flex; align-items: center; gap: 8px; }
.m3g-legend button { margin-top: 4px; justify-self: start; }
.m3g-l-path { width: 22px; height: 0; border-top: 3px dashed var(--red); }
.m3g-l-site { width: 16px; height: 12px; border: 1.5px dashed var(--red); background: rgba(227,6,19,.05); border-radius: 2px; }
.m3g-l-park { width: 18px; height: 18px; border-radius: 4px; background: #3B6EA5; color: #fff; font-style: normal; font-weight: 700; font-size: 11px; display: grid; place-items: center; }
.m3__also { margin: 10px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); display: grid; gap: 3px; }
@media (max-width: 900px) {
  .m3__view { left: 10px; top: 10px; }
  .m3__view button { height: 32px; padding: 0 11px; font-size: 12px; }
  .m3g-pin { font-size: 11px; }
  .m3g-legend { left: 10px; bottom: 28px; max-width: calc(100% - 20px); font-size: 11.5px; padding: 8px 10px; gap: 4px; }
  .m3g-legend span:nth-child(n+2) { display: none; }
  .m3g-legend button { margin-top: 2px; }
}
@media (prefers-reduced-motion: reduce) { .m3 { transition: none; } }
/* посочване на фасадата в изгледа „Район“ */
.m3g-tip { position: absolute; z-index: 3; display: grid; gap: 2px; min-width: 200px; max-width: 300px; padding: 10px 12px; border-radius: var(--r-md); background: rgba(255,255,255,.97); box-shadow: var(--sh-2); font-size: 12.5px; line-height: 1.3; color: var(--ink-2); pointer-events: none; }
.m3g-tip.is-pinned { pointer-events: auto; }
.m3g-tip b { color: var(--ink); font-size: 13px; margin-bottom: 4px; }
.m3g-tip button { all: unset; display: block; padding: 3px 0 3px 12px; position: relative; color: var(--ink); cursor: pointer; }
.m3g-tip button::before { content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.m3g-tip.is-pinned button:hover, .m3g-tip.is-pinned button:focus-visible { color: var(--red); text-decoration: underline; }
.m3g-tip small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.m3g-tip__hint { border-top: 1px solid var(--line, #e6e4de); padding-top: 5px; margin-top: 6px !important; }

/* Always available in both the area map and the indoor model. */
.m3__orbit { position: absolute; top: 70px; left: 14px; z-index: 5; display: flex; gap: 4px; padding: 4px; background: var(--white); border-radius: var(--r-pill); box-shadow: var(--sh-1); }
.m3__orbit button { min-width: 44px; height: 40px; padding: 0 12px; border-radius: var(--r-pill); font-size: 13px; color: var(--ink); }
.m3__orbit button:first-child, .m3__orbit button:last-child { font-size: 24px; }
.m3__orbit button:hover { background: var(--paper-2); }
.m3.no-webgl .m3__orbit { display: none; }
.m3__stage > canvas { cursor: grab; }
.m3__stage > canvas:active { cursor: grabbing; }
@media (max-width: 900px) {
  .m3__orbit { top: 60px; left: 10px; }
  .m3__tools { right: 60px; }
}

/* --- „Заведи ме“ --- */
.m3-go { margin: 4px 0 10px; }
.m3__actions .m3-go { margin: 0; }
.m3.is-tour .m3__info, .m3.is-tour .m3__tools, .m3.is-tour .m3__orbit, .m3.is-tour .m3__floors { display: none !important; }
/* избор на вход */
.m3-pick { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(246, 245, 241, .72); backdrop-filter: blur(3px); overflow: auto; }
.m3-pick[hidden] { display: none; }
.m3-pick__card { position: relative; width: min(560px, 100%); max-height: 100%; overflow: auto; padding: 24px 24px 18px; border-radius: var(--r-lg); background: var(--white); box-shadow: var(--sh-2); }
.m3-pick__x { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border-radius: 50%; font-size: 24px; line-height: 1; color: var(--ink-2); }
.m3-pick__x:hover { background: var(--paper-2); }
.m3-pick__eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin: 0 0 6px; }
.m3-pick__card h2 { font-size: 22px; line-height: 1.2; margin: 0 44px 4px 0; }
.m3-pick__loc { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.m3-pick__q { font-weight: 600; margin: 0 0 8px; font-size: 14px; }
.m3-pick__list { display: grid; gap: 8px; }
.m3-ent { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; width: 100%; padding: 8px; border-radius: var(--r-md); border: 1.5px solid var(--line-2); background: var(--white); text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.m3-ent:hover:not(:disabled) { border-color: var(--ink-2); }
.m3-ent[aria-pressed="true"] { border-color: var(--red); box-shadow: 0 0 0 3px rgba(227, 6, 19, .12); }
.m3-ent:disabled { opacity: .55; cursor: not-allowed; }
.m3-ent img, .m3-ent__ph { width: 96px; height: 68px; border-radius: 10px; object-fit: cover; }
.m3-ent__ph { display: grid; place-items: center; text-align: center; font-size: 10.5px; line-height: 1.25; color: var(--muted); background: repeating-linear-gradient(135deg, var(--paper-2) 0 8px, #F6F5F1 8px 16px); }
.m3-ent__t { display: grid; gap: 3px; min-width: 0; }
.m3-ent__t b { font-size: 14px; color: var(--ink); }
.m3-ent__t small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.m3-ent__t em { justify-self: start; font-style: normal; }
.m3-pick__sf { margin: 14px 0 0; }
.m3-pick__go { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.m3-pick__go .btn { flex: 1 1 180px; justify-content: center; min-height: 48px; }
.m3-pick__msg { color: var(--red); font-size: 13px; margin: 8px 0 0; min-height: 1em; }
.m3-pick__note { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
/* лента на пътуването */
.m3-tour { position: absolute; z-index: 8; bottom: 14px; left: calc(var(--side) + (100% - var(--side)) / 2); transform: translateX(-50%); width: min(720px, calc(100% - var(--side) - 28px)); padding: 12px 14px 12px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .97); box-shadow: 0 2px 6px rgba(11, 22, 38, .06), 0 20px 48px -12px rgba(11, 22, 38, .28); }
.m3-tour[hidden] { display: none; }
.m3-tour__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-right: 40px; font-size: 12.5px; color: var(--muted); }
.m3-tour__head b { color: var(--ink); font-weight: 600; }
.m3-tour__st { font-size: 11px; }
.m3-tour__x { position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--ink-2); }
.m3-tour__x:hover { background: var(--paper-2); }
.m3-tour__prog { display: flex; gap: 4px; list-style: none; margin: 10px 0 10px; padding: 0; }
.m3-tour__prog li { flex: 1; height: 4px; border-radius: 4px; background: var(--paper-2); overflow: hidden; }
.m3-tour__prog li.done { background: var(--red); }
.m3-tour__prog li.cur i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--red); transition: width .1s linear; }
.m3-tour__body { display: flex; gap: 14px; align-items: flex-start; }
.m3-tour__txt { flex: 1; min-width: 0; font-size: 16px; line-height: 1.45; color: var(--ink); }
.m3-tour__txt p { margin: 0 0 4px; }
.m3-tour__txt span { color: var(--muted); font-size: 13.5px; }
.m3-tour__dest b { display: block; font-size: 18px; }
.m3-tour__dest span { display: block; color: var(--red) !important; font-weight: 600; font-size: 14px !important; }
.m3-tour__note { font-size: 12.5px !important; color: var(--muted); }
.m3-tour__ph { flex: none; width: 150px; margin: 0; }
.m3-tour__ph img { width: 150px; height: 100px; object-fit: cover; border-radius: 12px; display: block; }
.m3-tour__ph figcaption { font-size: 10.5px; color: var(--muted); margin-top: 3px; line-height: 1.3; }
.m3-tour__ctl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.m3-tour__sp { flex: 1; }
.m3-tour__b { min-height: 40px; padding: 0 12px; border-radius: var(--r-pill); font-size: 13px; color: var(--ink); background: var(--paper-2); }
.m3-tour__b:hover:not(:disabled) { background: #E4E2DA; }
.m3-tour__b:disabled { opacity: .45; cursor: default; }
.m3-tour__play { min-width: 104px; }
.m3-tour__next { min-height: 40px; }
@media (max-width: 900px) {
  .m3.is-tour .m3__tabs, .m3.is-tour .m3__pane--route, .m3.is-tour .m3__dir, .m3.is-tour .m3__search, .m3.is-tour .m3__results { display: none !important; }
  .m3.is-tour { grid-template-rows: auto minmax(380px, 62vh) auto; }
  .m3.is-tour .m3__stage { grid-row: 2; margin-top: 0; }
  .m3-tour { position: relative; left: auto; bottom: auto; grid-row: 3; transform: none; width: auto; border-radius: 0; box-shadow: none; border-top: 1px solid var(--line-2); padding: 12px 14px 16px; }
  .m3-tour__txt { font-size: 15px; }
  .m3-tour__ph, .m3-tour__ph img { width: 104px; height: 78px; }
  .m3-tour__ctl { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 6px; }
  .m3-tour__sp { display: none; }
  .m3-tour__b, .m3-tour__next { min-height: 48px; justify-content: center; }
  .m3-tour__ctl [data-act="all"], .m3-tour__ctl [data-act="home"] { grid-column: span 1; }
  .m3-tour__ctl [data-act="all"] { grid-column: 1 / 3; }
  .m3-pick { position: fixed; z-index: 1000; align-items: end; padding: 0; }
  .m3-pick__card { width: 100%; max-height: 92vh; border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 20px 16px 18px; }
  .m3-ent { grid-template-columns: 80px minmax(0, 1fr); }
  .m3-ent img, .m3-ent__ph { width: 80px; height: 60px; }
}
@media (prefers-reduced-motion: reduce) { .m3-tour__prog li.cur i { transition: none; } .m3-ent { transition: none; } }
/* публична версия - без „Сателит“ и „Заведи ме“ */
#m3Sat { display: none !important; }   /* сателит - изключен навсякъде засега */
.m3[data-public] [data-tour] { display: none !important; }

/* малката карта на началната страница (.m3--mini) - само сцената; пълната карта е в „Контакти“ */
.m3.m3--mini, .m3.m3--mini.has-info { grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: minmax(0, 1fr) !important; height: auto !important; min-height: 0 !important; aspect-ratio: 5 / 4; margin: 0 !important; background: #EEEDE8; }
.m3--mini .m3__side, .m3--mini .m3__orbit, .m3--mini .m3__tools, .m3--mini .m3__load { display: none !important; }
.m3--mini .m3__stage { grid-row: 1 !important; grid-column: 1 !important; margin: 0 !important; background: #EEEDE8 var(--nkb-map-preview, url(../img/karta-preview.jpg)) center / cover no-repeat; /* --nkb-map-preview: R2 URL set in app/layout.tsx */ touch-action: pan-y; }
.m3mini { position: relative; }
.m3mini .mapprev__cta { z-index: 8; }
@media (max-width: 900px) { .m3--mini .m3__info { display: none !important; } .m3--mini .m3__view { top: 10px; } }
.m3--mini .m3g-legend { display: none !important; }
.m3--mini .m3g-pin { display: none !important; }   /* без етикети на спирки, входове и паркинг - само буквите на блоковете */
.m3--mini [data-go], .m3--mini [data-tour], .m3--mini .m3__src, .m3--mini .m3__pane--route { display: none !important; }   /* началната страница: показва кое къде е, без упътвания */

/* Телефон: „Търсене / Как да стигна?“ най-горе, резултатите не избутват картата (до ~⅓ екран, превъртат се), маршрутът е над картата */
@media (max-width: 900px) {
  .m3:not(.m3--mini), .m3.has-info:not(.m3--mini) { grid-template-rows: auto auto auto minmax(340px, 58vh) auto; }
  .m3:not(.m3--mini) .m3__tabs { grid-row: 1; border-top: 0; border-bottom: 1px solid var(--line-2); }
  .m3:not(.m3--mini) .m3__search { grid-row: 2; }
  .m3:not(.m3--mini) .m3__results { grid-row: 3; max-height: 34vh; overflow: auto; }
  .m3:not(.m3--mini) .m3__stage { grid-row: 4; }
  .m3:not(.m3--mini) .m3__dir { grid-row: 5; }
  .m3:not(.m3--mini)[data-tab='route'] .m3__pane--route { grid-row: 3; max-height: 46vh; overflow: auto; border-bottom: 1px solid var(--line-2); }
  .m3:not(.m3--mini)[data-tab='route'] .m3__search, .m3:not(.m3--mini)[data-tab='route'] .m3__results { display: none; }
  .m3.has-info[data-tab='info']:not(.m3--mini) .m3__info { grid-row: 5; }
}
