/* Навигация по разделам на телефоне (nav.js): панель, шторка «Содержание», выбор вида. */
:root {
	--vrn-pink: var(--wp--preset--color--main, #D81B60);
	--vrn-navy: var(--wp--preset--color--navy, #202F59);
	--vrn-navy-d: var(--wp--preset--color--navy-dark, #121D39);
	--vrn-soft: #F4F6F8;
	--vrn-line: #E5E5E5;
	--vrn-ease: cubic-bezier(.16, 1, .3, 1);
	--vrn-h: 52px;
}

/* Пока работает панель, старая лента меток скрыта; без JavaScript она остаётся */
.vr-nav-on .vr-anchors { display: none; }
.vr-nav-on .wp-block-post-content h2[id] { scroll-margin-top: 24px; }
.admin-bar .vrn-top { top: 46px; }

.vrn-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.vrn svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html body .vrn button { font: inherit; color: inherit; background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 0; text-transform: none; letter-spacing: normal; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.vrn :focus-visible { outline: 3px solid var(--vrn-pink); outline-offset: 2px; }

/* ---------- общая верхняя панель (A, B) ---------- */
.vrn-top {
	position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--vrn-h);
	background: rgba(255, 255, 255, .97); box-shadow: 0 2px 14px rgba(18, 29, 57, .12);
	transform: translateY(-110%); transition: transform .35s var(--vrn-ease);
	display: flex; align-items: center; gap: 4px; padding-inline: 6px;
}
.vrn-top.is-shown { transform: none; }
.vrn-line { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--vrn-pink); transform-origin: left; transform: scaleX(var(--vrn-progress, 0)); }

html body .vrn .vrn-menu-btn {
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 14px 0 12px;
	border-radius: 22px; background: var(--vrn-navy); color: #fff; font-weight: 600; font-size: 15px;
}
html body .vrn .vrn-menu-btn:active { background: var(--vrn-navy-d); }

/* ---------- A: лента в одну строку ---------- */
.vrn-strip-wrap { position: relative; flex: 1; min-width: 0; height: 100%; }
.vrn-strip {
	display: flex; gap: 8px; align-items: center; height: 100%; overflow-x: auto; scroll-snap-type: x proximity;
	scrollbar-width: none; padding-inline: 6px;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
}
.vrn-strip::-webkit-scrollbar { display: none; }
.vrn-chip {
	flex: none; scroll-snap-align: center; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
	border-radius: 22px; background: var(--vrn-soft); color: var(--vrn-navy-d); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
	transition: background .2s, color .2s;
}
.vrn-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--vrn-pink)); }
.vrn-chip[aria-current="true"] { background: var(--vrn-pink); color: #fff; }
.vrn-chip[aria-current="true"] i { background: #fff; }

/* ---------- B: панель «где я» ---------- */
html body .vrn .vrn-here { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; text-align: left; padding: 0 8px; }
html body .vrn .vrn-here b { display: block; font-size: 16px; line-height: 1.2; color: var(--vrn-navy-d); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
html body .vrn .vrn-here small { display: block; font-size: 13px; color: #555; line-height: 1.2; }
html body .vrn .vrn-here .vrn-txt { min-width: 0; flex: 1; }
.vrn-pct { font-weight: 700; font-size: 14px; color: var(--vrn-navy); padding-right: 8px; font-variant-numeric: tabular-nums; }

/* ---------- C: нижняя панель под большой палец ---------- */
.vrn-bottom {
	position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	height: 60px; border-radius: 30px; background: var(--vrn-navy-d); color: #fff;
	box-shadow: 0 10px 28px rgba(18, 29, 57, .35); display: flex; align-items: center; gap: 2px; padding: 4px;
	transform: translateY(140%); transition: transform .35s var(--vrn-ease);
}
.vrn-bottom.is-shown { transform: none; }
html body .vrn .vrn-step { width: 52px; height: 52px; border-radius: 26px; display: grid; place-items: center; flex: none; }
html body .vrn .vrn-step:disabled { opacity: .35; cursor: default; }
html body .vrn .vrn-step:not(:disabled):active { background: rgba(255, 255, 255, .14); }
html body .vrn .vrn-mid { flex: 1; min-width: 0; height: 52px; border-radius: 26px; text-align: center; display: grid; align-content: center; padding-inline: 6px; }
html body .vrn .vrn-mid b { font-size: 15px; line-height: 1.2; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body .vrn .vrn-mid small { font-size: 12.5px; opacity: .8; line-height: 1.2; font-variant-numeric: tabular-nums; }
.vrn-bottom .vrn-line { bottom: 7px; left: 56px; width: calc(100% - 112px); height: 3px; background: var(--vrn-pink); border-radius: 3px; }

/* ---------- D: кнопка «Содержание» ---------- */
html body .vrn .vrn-fab {
	position: fixed; z-index: 60; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px));
	display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 16px; border-radius: 26px;
	background: var(--vrn-navy-d); color: #fff; font-weight: 600; font-size: 15px; box-shadow: 0 10px 26px rgba(18, 29, 57, .35);
	opacity: 0; transform: translateY(16px) scale(.96); pointer-events: none; transition: opacity .3s var(--vrn-ease), transform .35s var(--vrn-ease);
}
html body .vrn .vrn-fab.is-shown { opacity: 1; transform: none; pointer-events: auto; }
html body .vrn .vrn-fab .vrn-pct { color: #fff; opacity: .85; padding: 0; }
html body .vrn .vrn-fab .vrn-line { left: 22px; width: calc(100% - 44px); height: 3px; bottom: 5px; border-radius: 3px; background: var(--vrn-pink); }

/* ---------- Шторка со списком разделов ---------- */
.vrn-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(18, 29, 57, .5); opacity: 0; pointer-events: none; transition: opacity .25s; }
.vrn-scrim.is-open { opacity: 1; pointer-events: auto; }
.vrn-sheet {
	position: fixed; z-index: 71; left: 0; right: 0; bottom: 0; max-height: 82vh; background: #fff; border-radius: 28px 28px 0 0;
	box-shadow: 0 -12px 40px rgba(18, 29, 57, .25); transform: translateY(105%); transition: transform .4s var(--vrn-ease);
	display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom, 0px);
}
.vrn-sheet.is-open { transform: none; }
.vrn-sheet header { display: flex; align-items: center; justify-content: space-between; padding: 14px 8px 6px 22px; }
.vrn-sheet h2 { margin: 0; font-size: 22px; line-height: 1.2; color: var(--vrn-pink); font-family: var(--wp--preset--font-family--display, inherit); }
html body .vrn .vrn-close { width: 48px; height: 48px; border-radius: 24px; display: grid; place-items: center; color: var(--vrn-navy-d); }
.vrn-list { list-style: none; margin: 0; padding: 4px 12px 16px; overflow-y: auto; overscroll-behavior: contain; }
.vrn-list a {
	display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 6px 12px; border-radius: 14px; color: var(--vrn-navy-d);
	text-decoration: none; font-size: 16px; font-weight: 500; line-height: 1.25;
}
.vrn-list a i { width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--vrn-pink)); flex: none; }
.vrn-list a[aria-current="true"] { background: var(--vrn-soft); font-weight: 700; }
.vrn-list a[aria-current="true"]::after { content: attr(data-here); margin-left: auto; font-size: 13px; color: var(--vrn-pink); font-weight: 700; white-space: nowrap; }
.vrn-list a:active { background: var(--vrn-soft); }

@media (prefers-reduced-motion: reduce) {
	.vrn-top, .vrn-bottom, .vrn-fab, .vrn-scrim, .vrn-sheet, .vrn-chip { transition: none; }
}

/* ---------- Выбор вида навигации (внутри шторки) ---------- */
.vrn-pick { padding: 12px 16px 16px; border-top: 1px solid var(--vrn-line); background: #fff; }
.vrn-pick-t { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 8px; }
.vrn-pick-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
html body .vrn .vrn-pick-row button {
	min-height: 64px; border-radius: 14px; border: 2px solid var(--vrn-line); background: #fff; color: var(--vrn-navy-d);
	display: grid; justify-items: center; align-content: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 6px 2px;
}
html body .vrn .vrn-pick-row button[aria-checked="true"] { border-color: var(--vrn-pink); background: #FFF1F6; color: var(--vrn-pink); }
.vrn-ico { position: relative; width: 28px; height: 18px; border: 2px solid currentColor; border-radius: 5px; display: block; }
.vrn-ico::after { content: ""; position: absolute; background: currentColor; border-radius: 2px; }
.vrn-ico-b::after, .vrn-ico-a::after { left: 3px; right: 3px; top: 2px; height: 3px; }
.vrn-ico-a::after { right: 9px; }
.vrn-ico-c::after { left: 3px; right: 3px; bottom: 2px; height: 3px; }
.vrn-ico-d::after { right: 3px; bottom: 2px; width: 8px; height: 5px; }
