:root {
  /* Task 022: shared light-theme design system. */
  --cream: #f5f1e7; --paper: #fffdf7; --surface: #ffffff; --surface-soft: #f0f1e9;
  --forest: #244c3c; --ink: #20392e; --graphite: var(--ink); --muted: #626e61;
  --line: #dce0d3; --line-strong: #b8c3b2;
  --orange: #ff8b32; --orange-hover: #f47b20; --orange-dark: #93420f; --orange-soft: #fff0df;
  --mint: #e6eee2; --sea: #dcece7; --danger: #953e32; --danger-soft: #faeae4;
  --location: #2769bd; --location-halo: #2769bd26;
  --shadow-card: 0 2px 5px #20392e06, 0 8px 24px #20392e06;
  --shadow-floating: 0 4px 12px #20392e08, 0 20px 48px #20392e0d;
  --shadow-overlay: 0 12px 32px #20392e12, 0 32px 96px #20392e26;
  --shadow: var(--shadow-floating); --glass-fill: var(--paper); --glass-line: var(--line); --glass-shadow: var(--shadow-floating);
  --radius-sm: 10px; --radius-md: 14px; --radius-lg: 20px; --radius-xl: 28px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px;
  --type-display: 36px; --type-h1: 28px; --type-h2: 22px; --type-h3: 18px; --type-body: 14px; --type-caption: 12px;
  --motion-fast: 160ms; --motion-surface: 280ms; --surface-ease: cubic-bezier(.22, 1, .36, 1);
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px); --safe-right: env(safe-area-inset-right, 0px);
  --sidebar-width: 352px;
  font-family: Manrope, "Segoe UI", Arial, sans-serif;
  color: var(--ink); background: var(--cream); font-synthesis: none; color-scheme: light;
  font-size: var(--type-body); line-height: 1.55;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
button, a, h1, h2, h3, p, .place-body { overflow-wrap: anywhere; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
a { color: inherit; text-underline-offset: 4px; }
button, a, input { touch-action: manipulation; }
button { transition: background .16s, border-color .16s, box-shadow .16s, transform .16s; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #9d4a00; outline-offset: 3px; }
[hidden] { display: none !important; }
svg { flex-shrink: 0; }
button svg, .search-field svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.site-header { min-height: calc(64px + var(--safe-top)); flex-shrink: 0; display: flex; align-items: center; gap: 24px; padding: var(--safe-top) max(20px, var(--safe-right)) 0 max(20px, var(--safe-left)); border-bottom: 1px solid var(--line); background: #fff; position: relative; z-index: 20; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; width: 316px; min-width: 0; flex-shrink: 0; }
.brand-symbol { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }
.brand-copy { display: flex; flex-direction: column; gap: 3px; }
.brand-copy strong { font-size: 20px; font-weight: 800; letter-spacing: -.6px; line-height: 1.2; }
.brand-copy > span { font-size: 12px; font-weight: 600; letter-spacing: .1px; color: var(--muted); }
.brand-dot { color: var(--orange); }
.main-nav { display: flex; align-self: stretch; gap: 26px; }
.nav-button { display: flex; align-items: center; gap: 8px; padding: 0 2px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #7d847d; font-size: 13px; font-weight: 700; }
.nav-button svg { width: 18px; height: 18px; }
.nav-button.is-active, .nav-button[aria-pressed="true"] { border-bottom-color: var(--orange); color: var(--graphite); }
.nav-button.is-active svg { color: #e77500; }
.nav-button:hover { color: var(--graphite); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 9px; background: transparent; }
.icon-button:hover { background: #f6f7f3; }
.icon-button svg { width: 20px; height: 20px; }
.app-shell { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); position: relative; }
.sidebar { grid-column: 1; min-height: 0; background: #fff; border-right: 1px solid #e8ece4; display: flex; flex-direction: column; position: relative; z-index: 10; }
.sidebar-scroll { flex: 1; min-height: 0; min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 18px max(18px, var(--safe-bottom)) max(18px, var(--safe-left)); scrollbar-width: thin; scrollbar-color: #d9ddd4 transparent; scroll-padding-block: 12px; }
.eyebrow { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: 1.05px; color: #7b8479; line-height: 1.5; }
.intro-section h1 { margin: 8px 0; font-size: 30px; line-height: 1.16; font-weight: 750; letter-spacing: -.9px; }
.intro-copy { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; max-width: 100%; padding: 9px 13px; border: 1px solid transparent; border-radius: 10px; background: var(--orange); color: #25261e; font-size: 13px; line-height: 1.4; font-weight: 800; text-decoration: none; }
.primary-button:hover { background: #f17b00; box-shadow: 0 4px 13px #ff850028; }
.secondary-button { border-color: #e4e8df; background: white; }
.secondary-button:hover { background: #f7f8f3; border-color: #d5dccb; }
.first-time-button { margin-top: 12px; width: 100%; justify-content: flex-start; }
.first-time-button svg { width: 18px; height: 18px; }
.button-arrow { margin-left: auto; font-size: 18px; font-weight: 500; }
.search-section { margin-top: 16px; }
.search-field { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 11px; border: 1px solid #e6eae2; border-radius: 10px; background: #fafbf8; color: #8b9385; }
.search-field:focus-within { border-color: #c7cfbd; background: white; }
.search-field svg { width: 17px; height: 17px; }
.search-field input { width: 100%; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 13px; color: var(--graphite); }
.search-field input::placeholder { color: #8b9287; opacity: 1; }
.search-field:has(input:focus-visible) { outline: 3px solid #9d4a00; outline-offset: 3px; }
.category-controls { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.category-button { border: 1px solid #e5e9e0; border-radius: 7px; background: white; min-height: 34px; max-width: 100%; padding: 6px 12px; color: #6f786b; font-size: 12px; font-weight: 700; }
.category-button:hover { background: #f8faf5; }
.category-button.is-active, .category-button[aria-pressed="true"] { color: #88500a; background: #fff4df; border-color: #ffdfb5; }
.places-section { margin-top: 16px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.section-heading h2 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: -.4px; }
.place-count { font-size: 12px; color: #7c8773; white-space: nowrap; }
.place-list { display: grid; gap: 4px; padding: 0; margin: 0; list-style: none; }
.place-card { position: relative; display: block; min-width: 0; width: 100%; padding: 0; border: 1px solid transparent; border-bottom-color: #f0f2ec; border-radius: 11px; background: #fff; text-align: left; }
.place-card:hover { background: #fafbf7; }
.place-card.is-selected, .place-card[aria-current="true"] { background: #fff9ed; border-color: #ffe0b8; }
.place-thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; display: block; background: #f2f5e9; overflow: hidden; }
.place-thumb img { width: 100%; height: 100%; object-fit: cover; }
.place-body { min-width: 0; }
.place-kind { display: block; margin: 0 0 4px; font-size: 12px; line-height: 1.35; color: #748168; font-weight: 600; }
.place-title { display: block; margin: 0; font-size: 15px; font-weight: 800; letter-spacing: -.25px; line-height: 1.35; overflow-wrap: anywhere; }
.place-tag { display: block; margin-top: 5px; color: #7c8770; font-size: 11px; line-height: 1.35; }
.place-open { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 10px; align-items: center; border: 0; border-radius: 10px; background: transparent; width: 100%; min-height: 78px; padding: 8px 36px 8px 6px; color: var(--graphite); text-align: left; }
.place-open:hover { background: #fafbf6; }
.save-place { position: absolute; top: 8px; right: 3px; width: 32px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; padding: 5px; color: #9aa38d; }
.save-place svg { width: 17px; height: 17px; }
.save-place:hover { background: #f1f4ea; color: #6d7c5c; }
.save-place.is-saved, .save-place[aria-pressed="true"] { background: #fff0d7; color: #b2670c; }
.save-place.is-saved svg, .save-place[aria-pressed="true"] svg { fill: #ffc778; }
.bookmark-button[aria-pressed="true"] { color: #af6107; background: #fff2de; }
.quest-promo { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 13px 10px 13px 14px; background: #fff4e4; border-radius: 13px; position: relative; }
.quest-promo-copy { position: relative; z-index: 1; flex: 1; min-width: 0; }
.quest-promo .eyebrow { color: #98744c; font-size: 11px; letter-spacing: .5px; }
.quest-promo h2 { margin: 5px 0 7px; font-size: 17px; line-height: 1.3; letter-spacing: -.4px; font-weight: 800; }
.quest-guide { flex-shrink: 0; width: 82px; height: 82px; object-fit: contain; align-self: flex-end; }
.promo-link { border: 0; padding: 0; background: transparent; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; color: #aa5a10; font-size: 12px; font-weight: 800; text-align: left; }
.promo-link:hover { color: var(--graphite); }
.promo-link span { font-size: 16px; font-weight: 500; }
.catalog-note { color: #7e8874; font-size: 12px; line-height: 1.5; margin: 12px 2px 0; }
.map-stage { grid-column: 2; min-width: 0; min-height: 0; position: relative; overflow: hidden; background: #edf1e3; }
.map-canvas, .map-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-fallback { z-index: 1; background: #eef2e5; }
.map-fallback > svg { width: 100%; height: 100%; display: block; }
.map-topline { position: absolute; z-index: 3; top: 16px; left: max(16px, var(--safe-left)); right: max(16px, var(--safe-right)); display: flex; align-items: center; justify-content: space-between; gap: 16px; pointer-events: none; }
.district-badge { display: flex; align-items: center; gap: 8px; min-height: 34px; max-width: 100%; padding: 7px 11px; border: 1px solid #fff9; border-radius: 8px; background: #fffffff2; box-shadow: var(--shadow); font-size: 12px; line-height: 1.4; font-weight: 750; }
.district-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.map-caption { margin: 0; font-size: 12px; font-weight: 600; color: #6d7d65; text-align: right; text-shadow: 0 1px 4px white, 0 0 10px white; }
.map-caption span { color: #92a083; margin-left: 5px; }
.map-context { position: absolute; z-index: 5; top: 62px; left: max(16px, var(--safe-left)); right: max(76px, calc(var(--safe-right) + 60px)); max-width: 440px; max-height: calc(100% - 104px); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.map-context > :not([hidden]) { pointer-events: auto; }
.map-context > .map-messages { position: static; min-height: 0; max-width: none; max-height: none; flex: 0 1 auto; }
.map-context > .map-messages:not(:has(> :not([hidden]))) { display: none; }
.map-context:has(#journey-progress:not([hidden])) .selected-place { display: none; }
.map-context:has(#journey-progress:not([hidden])) > .map-messages:not(:has(#map-status:not([hidden]))) { display: none; }
.map-context:has(#journey-progress:not([hidden])) > .map-messages { max-height: 96px; }
.map-messages { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; scrollbar-width: thin; }
.map-messages:has(> :not([hidden])) { padding: 2px; }
#journey-progress { min-height: 0; min-width: 0; flex: 0 1 auto; overflow-y: auto; overscroll-behavior: contain; border-radius: 18px; scrollbar-width: thin; scrollbar-color: #cab9a1 transparent; scroll-padding-block: 10px; }
#journey-progress .journey-card { display: grid; gap: 11px; margin: 0; padding: 16px; border: 1px solid #fff; border-radius: 18px; background: linear-gradient(145deg, #fffffffa, #fff8edee); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2); }
#journey-progress .journey-heading { position: sticky; top: 0; z-index: 2; min-width: 0; padding-block: 4px; border-radius: 9px; background: #fffaf2f5; }
#journey-progress .journey-heading .eyebrow { margin: 0 0 5px; color: #9a6020; font-size: 12px; letter-spacing: .3px; }
#journey-progress .journey-heading h3 { margin: 0; font-size: 17px; line-height: 1.35; letter-spacing: -.35px; font-weight: 800; }
#journey-progress .journey-meter { display: block; width: 100%; height: 6px; margin: 0; border: 0; border-radius: 10px; overflow: hidden; appearance: none; -webkit-appearance: none; background: #eee8dc; color: var(--orange); }
#journey-progress .journey-meter::-webkit-progress-bar { border-radius: 10px; background: #eee8dc; }
#journey-progress .journey-meter::-webkit-progress-value { border-radius: 10px; background: #ff9b2d; }
#journey-progress .journey-meter::-moz-progress-bar { border-radius: 10px; background: #ff9b2d; }
#journey-progress .journey-current { margin: 0; font-size: 14px; line-height: 1.5; font-weight: 700; color: var(--graphite); }
#journey-progress .journey-presence { display: grid; gap: 8px; padding-block: 10px; border-block: 1px solid #ece7dc; }
#journey-progress .journey-presence > p { margin: 0; font-size: 12px; line-height: 1.55; color: #6f7866; }
#journey-progress .journey-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
#journey-progress .journey-actions > button, #journey-progress .journey-actions > a { flex: 1 1 110px; min-width: 0; min-height: 38px; margin: 0; padding: 8px 11px; font-size: 13px; line-height: 1.4; text-align: center; }
#journey-progress .journey-actions .text-button { background: transparent; border: 0; color: #756c60; text-decoration: underline; text-underline-offset: 3px; }
#journey-progress .journey-details { min-width: 0; border: 1px solid #ebe7dc; border-radius: 11px; background: #ffffff80; }
#journey-progress .journey-details > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 36px; padding: 8px 11px; font-size: 12px; font-weight: 700; color: #6c725f; list-style: none; cursor: pointer; }
#journey-progress .journey-details > summary::-webkit-details-marker { display: none; }
#journey-progress .journey-details > summary::after { content: "⌄"; flex-shrink: 0; font-size: 18px; line-height: 1; }
#journey-progress .journey-details[open] > summary::after { transform: rotate(180deg); }
#journey-progress .journey-checklist { display: grid; gap: 4px; max-height: 160px; overflow-y: auto; overscroll-behavior: contain; counter-reset: journey-stop; list-style: none; padding: 0 8px 8px; margin: 0; scrollbar-width: thin; }
#journey-progress .journey-checklist > li { counter-increment: journey-stop; display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: center; gap: 9px; min-height: 37px; padding: 5px; border-radius: 8px; font-size: 13px; line-height: 1.45; color: #7c8273; }
#journey-progress .journey-checklist > li::before { content: counter(journey-stop); display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid #e5e5dc; border-radius: 50%; background: white; color: #8a8e80; font-size: 11px; font-weight: 700; }
#journey-progress .journey-checklist > li.is-current { color: var(--graphite); background: #fff3df; font-weight: 750; }
#journey-progress .journey-checklist > li.is-current::before { background: #ff981f; color: #32281b; border-color: #ff981f; }
#journey-progress .journey-checklist > li.is-done::before { content: "✓"; color: #81632b; background: #f7eddb; border-color: #e8dbc2; }
#journey-progress .journey-checklist > li::before { grid-row: 1 / span 2; }
#journey-progress .journey-checkpoint { grid-column: 2; border: 0; background: transparent; padding: 0; text-align: left; font: inherit; color: inherit; line-height: 1.45; }
#journey-progress .journey-checkpoint:disabled { cursor: default; opacity: .65; }
#journey-progress .journey-verification { grid-column: 2; margin-top: -5px; font-size: 11px; line-height: 1.4; color: #737b69; }
.survey-reference { margin-top: 16px; padding: 12px; border: 1px solid #e7e6de; border-radius: 14px; background: #ffffff66; font-size: 13px; }
.survey-reference summary { cursor: pointer; font-weight: 700; }
#journey-progress .journey-details > .journey-actions { padding: 5px 10px 10px; border-top: 1px solid #eee9df; }
#journey-progress .micro-copy { margin: 0; font-size: 12px !important; line-height: 1.5; color: #7d8174; }
.map-status { flex-shrink: 0; background: #fffffff2; border: 1px solid #e0e5d8; border-radius: 9px; padding: 10px 12px; margin: 0; font-size: 12px; line-height: 1.5; color: #64705c; box-shadow: var(--shadow); }
.map-controls { position: absolute; z-index: 4; right: 22px; top: 43%; display: flex; flex-direction: column; align-items: center; background: white; border: 1px solid #e2e7dc; border-radius: 10px; padding: 4px; box-shadow: var(--shadow); }
.map-controls button { display: grid; place-items: center; border: 0; border-radius: 6px; background: white; width: 34px; height: 34px; font-size: 22px; font-weight: 400; }
.map-controls button:hover { background: #f5f8ef; }
.map-controls button svg { width: 18px; height: 18px; stroke-width: 1.7; }
.control-divider { width: 22px; border-top: 1px solid #e9ede4; margin: 2px 0; }
.guide-button { position: absolute; z-index: 4; right: max(16px, var(--safe-right)); bottom: max(34px, var(--safe-bottom)); display: flex; align-items: center; gap: 9px; min-height: 42px; max-width: calc(100% - 32px); padding: 7px 12px 7px 9px; background: white; border: 1px solid #e6eadf; border-radius: 11px; box-shadow: var(--shadow); font-size: 12px; font-weight: 800; }
.guide-button:hover { background: #fff8ec; transform: translateY(-2px); }
.guide-button > span:last-child { color: #909b85; font-size: 16px; margin-left: 5px; }
.guide-button img { width: 27px; height: 27px; object-fit: contain; }
.selected-place { position: relative; flex-shrink: 0; min-width: 0; width: 100%; padding: 12px 38px 12px 12px; border-radius: 12px; border: 1px solid #e7eadf; background: white; box-shadow: 0 5px 18px #2b3d2718; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.selected-thumb { width: 44px; height: 48px; border-radius: 8px; object-fit: cover; }
.selected-copy { min-width: 0; }
.selected-copy h2 { font-size: 15px; line-height: 1.35; margin: 0 0 4px; letter-spacing: -.25px; }
.selected-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.selected-place .place-kind { font-size: 12px; }
.selected-place .primary-button { font-size: 12px; min-height: 38px; padding: 8px 10px; gap: 5px; }
.selected-place .primary-button svg { width: 16px; height: 16px; }
.selected-close { position: absolute; top: 5px; right: 5px; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 6px; padding: 6px; background: #f5f7f0; color: #7c8970; }
.selected-close svg { width: 14px; height: 14px; }
.selected-close:hover { background: #eaf0de; }
.map-marker { width: max-content; max-width: 190px; height: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; padding: 0; background: transparent; color: var(--graphite); box-shadow: none; font: 750 11px Manrope, "Segoe UI", sans-serif; cursor: pointer; }
.map-marker-bubble { display: grid; place-items: center; width: 48px; height: 48px; border: 3px solid #fff; border-radius: 50%; background: #ffedcd; box-shadow: 0 3px 12px #4a603a36; }
.map-marker-bubble img { display: block; width: 35px; height: 35px; object-fit: contain; border-radius: 50%; }
.map-marker-label { display: block; max-width: 160px; border: 1px solid #fff; border-radius: 6px; padding: 4px 7px; background: white; box-shadow: 0 3px 11px #52654419; font-size: 12px; font-weight: 750; line-height: 1.35; white-space: normal; text-align: center; }
.map-marker:hover .map-marker-bubble { border-color: #ffb24d; }
.map-marker.is-selected { background: transparent; border: 0; box-shadow: none; }
.map-marker.is-selected .map-marker-bubble { border-color: var(--orange); box-shadow: 0 0 0 4px #ff850022, 0 4px 14px #4a603a36; }
.map-marker.is-selected .map-marker-label { border-color: #ffcc84; background: #fff8e9; }
.map-marker.is-passed .map-marker-bubble { opacity: .5; filter: grayscale(.4); box-shadow: 0 2px 8px #4a603a20; }
.map-marker.is-passed .map-marker-bubble[data-step]::after { content: "✓"; background: #637364; }
.map-marker.is-current-stop .map-marker-bubble { border-color: var(--orange); box-shadow: 0 0 0 5px #ff85002b, 0 5px 16px #57452b38; }
.map-marker.is-current-stop .map-marker-bubble[data-step]::after { background: #d86a00; }
.map-marker.is-current-stop .map-marker-label { opacity: 1; border-color: #ffb459; background: #fff8e9; }
.map-marker.is-passed:focus-visible .map-marker-bubble, .map-marker.is-passed:hover .map-marker-bubble { opacity: .85; }
.map-fallback [data-place-id].is-passed { opacity: .35; }
.map-fallback [data-place-id].is-current-stop { r: 11; stroke: #fff; stroke-width: 4; }
.maplibregl-ctrl-bottom-right { z-index: 6; }
.maplibregl-ctrl-attrib { font-family: Manrope, "Segoe UI", sans-serif; font-size: 11px; background: #ffffffd9; }
.maplibregl-popup-content { padding: 15px; border-radius: 12px; font-family: Manrope, "Segoe UI", sans-serif; }
.sheet-toggle { display: none; }
.content-dialog { width: min(520px, calc(100% - 32px - var(--safe-left) - var(--safe-right))); max-height: calc(100dvh - 32px - var(--safe-top) - var(--safe-bottom)); overflow-y: auto; overscroll-behavior: contain; border: 1px solid #e6e9e0; border-radius: 18px; padding: 24px; color: var(--graphite); background: white; box-shadow: 0 24px 90px #14221640; }
.content-dialog::backdrop { background: #17231962; backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: 13px; right: 14px; width: 31px; height: 31px; border: 0; border-radius: 50%; background: #f5f7f0; color: #6f7b64; font-size: 24px; line-height: 1; display: grid; place-items: center; }
.dialog-close:hover { background: #eaf0df; }
.detail-heading { margin: 0 0 14px; }
.detail-heading > .eyebrow { font-size: 11px; font-weight: 800; line-height: 1.6; letter-spacing: .8px; color: #8d7960; margin: 0 28px 7px 0; }
.detail-heading h2 { font-size: 26px; font-weight: 800; line-height: 1.3; letter-spacing: -.8px; margin: 0 20px 12px 0; }
.detail-heading .dialog-copy { margin: 0; font-size: 13px; font-weight: 400; line-height: 1.8; letter-spacing: 0; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 11px; color: #7a8571; margin: 12px 0; }
.content-dialog h2 { font-size: 24px; letter-spacing: -.6px; line-height: 1.25; margin: 0 28px 12px 0; }
.content-dialog h3 { font-size: 15px; line-height: 1.5; margin: 18px 0 8px; }
.content-dialog p, .detail-heading .dialog-copy { font-size: 14px; line-height: 1.6; color: #6c7565; }
.content-dialog img.detail-image { width: 100%; height: 180px; object-fit: cover; border-radius: 13px; margin: 10px 0; }
.content-dialog .primary-button, .content-dialog .secondary-button { margin-top: 12px; }
.content-dialog .primary-button + .secondary-button { margin-left: 5px; }
.primary-button svg, .secondary-button svg, .source-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.detail-art { display: block; width: 100%; height: 152px; object-fit: cover; border-radius: 12px; background: #f6f4e8; margin: 4px 0 16px; }
.place-gallery { margin: 4px 0 20px; min-width: 0; }
.place-gallery-stage { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 3 / 2; max-height: 300px; overflow: hidden; border: 1px solid #ffffffc9; border-radius: 18px; background: linear-gradient(135deg, #f7f5ed, #edf3f4); }
.place-gallery-image { display: block; width: 100%; height: 100%; min-height: 0; max-height: 300px; object-fit: contain; }
.place-gallery-fallback { display: block; width: 104px; height: 104px; object-fit: contain; }
.place-gallery-badge { position: absolute; left: 12px; bottom: 12px; padding: 4px 9px; border-radius: 20px; background: #ffffffda; color: #69767b; font-size: 10px; line-height: 1.4; }
.place-gallery-loading { position: absolute; padding: 7px 12px; border-radius: 20px; color: #56666d; background: #ffffffeb; font-size: 11px; }
.place-gallery-caption { display: grid; gap: 4px; min-width: 0; padding: 10px 2px 0; color: #59676b; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.place-gallery .place-gallery-source { max-width: 100%; margin: 0; font-size: 11px; line-height: 1.6; }
.place-gallery-credit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.place-gallery-credit-sep { color: #8a8f8d; }
.place-gallery-source svg { width: 13px; height: 13px; }
.place-gallery-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; margin-top: 12px; }
.place-gallery-control { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 8px 10px; border: 1px solid #e1e6e5; border-radius: 12px; background: #ffffffc9; font-size: 12px; font-weight: 700; line-height: 1.4; }
.place-gallery-control:hover { background: #fff5e8; border-color: #ecc99d; }
.place-gallery-control:focus-visible { outline: 3px solid #9d4a00; outline-offset: 3px; }
.place-gallery-control svg { width: 16px; height: 16px; }
.place-gallery-previous svg { transform: rotate(180deg); }
.place-gallery-position { min-width: 48px; text-align: center; color: #647176; font-size: 11px; font-variant-numeric: tabular-nums; }
@media (max-width: 380px) { .place-gallery-controls { gap: 7px; } .place-gallery-control { padding-inline: 7px; } }
@media (prefers-reduced-motion: reduce) { .place-gallery *, .place-gallery *::before, .place-gallery *::after { animation: none !important; transition: none !important; } }
.guide-art { display: block; width: 72px; height: 72px; object-fit: contain; margin: 0 auto 12px; }
.info-note { padding: 12px 14px; background: #f6f8f1; border: 1px solid #e9edde; border-radius: 10px; font-size: 12px !important; line-height: 1.75 !important; }
.dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 20px; }
.dialog-actions .primary-button, .dialog-actions .secondary-button { margin: 0; }
.source-link { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; margin-top: 14px; color: #788266; font-size: 13px; line-height: 1.5; text-decoration: none; }
.source-link:hover { color: #ad5c05; text-decoration: underline; }
.walk-stops { display: grid; gap: 8px; margin: 16px 0; }
.walk-stop { display: grid; grid-template-columns: 28px 58px minmax(0, 1fr) 18px; align-items: center; gap: 10px; width: 100%; padding: 11px; border: 1px solid #e5eadc; border-radius: 12px; background: white; text-align: left; font-size: 13px; font-weight: 750; line-height: 1.5; }
.walk-stop:hover { background: #fff9ed; border-color: #ffd59b; }
.walk-thumb { width: 58px; height: 52px; object-fit: cover; border-radius: 7px; }
.walk-stop > svg { width: 16px; height: 16px; color: #93a082; }
.step-number { display: grid; place-items: center; min-width: 28px; min-height: 28px; border-radius: 8px; background: #fff0d6; color: #ad660c; font-size: 12px; font-weight: 800; }
.empty-state { padding: 18px 14px; border: 1px dashed #dce3d3; border-radius: 11px; background: #fafbf7; text-align: center; color: #7e8975; font-size: 13px; line-height: 1.6; }
.empty-state h3 { color: var(--graphite); font-size: 14px; margin: 0 0 8px; }
.empty-state p { margin: 0; }
.intent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)); gap: 8px; margin: 16px 0 8px; }
.intent-button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 1px solid #e3e9dc; border-radius: 12px; padding: 18px 9px; background: #fafcf6; text-align: center; font-size: 12px; font-weight: 750; line-height: 1.5; }
.intent-button:hover { border-color: #ffd396; background: #fff7e9; }
.step-row { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; margin-top: 12px; }
.step-row > :first-child:not(p) { display: grid; place-items: center; min-height: 30px; border-radius: 9px; background: #fff1d9; color: #b1690a; font-size: 12px; font-weight: 800; }
.step-row h3 { margin: 2px 0 4px; }
.step-row p { margin: 0; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: max(20px, var(--safe-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px - var(--safe-left) - var(--safe-right)); border-radius: 11px; background: #283529; color: #fff; box-shadow: 0 8px 28px #20342230; padding: 11px 14px; font-size: 13px; line-height: 1.5; }
.toast:not(.is-visible) { opacity: 0; visibility: hidden; pointer-events: none; }
.toast.is-visible { opacity: 1; visibility: visible; }
@media (max-width: 1200px) and (min-width: 761px) {
  .site-header { gap: 18px; }
  .main-nav { gap: 18px; }
  .header-actions { gap: 7px; }
  .brand { width: auto; flex: 1; }
  .map-caption { display: none; }
  .selected-thumb { display: none; }
  .selected-place { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 760px) {
  :root { --sheet-height: min(54dvh, 66%); --nav-height: calc(60px + var(--safe-bottom)); }
  .site-header { min-height: calc(62px + var(--safe-top)); gap: 10px; padding: var(--safe-top) max(14px, var(--safe-right)) 0 max(14px, var(--safe-left)); }
  .brand { width: auto; min-width: 0; gap: 7px; flex: 1; }
  .brand-symbol { width: 32px; height: 36px; }
  .brand-copy strong { font-size: 19px; letter-spacing: -.7px; }
  .brand-copy > span { font-size: 12px; letter-spacing: 0; }
  .header-actions { gap: 6px; }
  .icon-button { width: 30px; height: 32px; }
  .main-nav { position: fixed; z-index: 25; inset: auto 0 0; min-height: var(--nav-height); padding: 0 max(12px, var(--safe-right)) var(--safe-bottom) max(12px, var(--safe-left)); gap: 0; justify-content: space-around; background: white; border-top: 1px solid #e8ede2; margin: 0; }
  .nav-button { flex: 1; min-width: 0; max-width: 140px; flex-direction: column; justify-content: center; gap: 3px; padding: 7px 4px 6px; border-bottom: 0; border-top: 2px solid transparent; font-size: 12px; line-height: 1.35; }
  .nav-button svg { width: 20px; height: 20px; }
  .nav-button.is-active, .nav-button[aria-pressed="true"] { border-top-color: var(--orange); color: #a85b05; }
  .app-shell { display: block; margin-bottom: var(--nav-height); }
  .app-shell:has(#journey-progress:not([hidden])) { --sheet-height: min(40dvh, 48%); }
  .map-stage { position: absolute; inset: 0; }
  .sidebar { position: absolute; bottom: 0; left: 0; right: 0; height: var(--sheet-height); border: 0; border-top: 1px solid #e7eadd; border-radius: 18px 18px 0 0; box-shadow: 0 -5px 25px #30452412; overflow: hidden; transition: height .2s; }
  .sheet-toggle { flex-shrink: 0; position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: 42px; border: 0; padding: 12px max(16px, var(--safe-right)) 4px max(16px, var(--safe-left)); background: #fff; }
  .sheet-handle { position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 30px; height: 3px; border-radius: 3px; background: #dbe0d3; }
  .sheet-toggle-label { font-size: 13px; font-weight: 800; }
  .sheet-chevron { color: #8c987e; font-size: 21px; line-height: 1; }
  .sidebar.is-collapsed, .app-shell.is-sheet-collapsed .sidebar { height: 47px; }
  .sidebar.is-collapsed .sidebar-scroll, .app-shell.is-sheet-collapsed .sidebar-scroll { display: none; }
  .sidebar.is-collapsed .sheet-chevron, .app-shell.is-sheet-collapsed .sheet-chevron { transform: rotate(180deg); }
  .sidebar-scroll { padding: 4px max(14px, var(--safe-right)) 16px max(14px, var(--safe-left)); }
  .intro-section > .eyebrow, .intro-section h1, .intro-copy { display: none; }
  .first-time-button { margin: 0; min-height: 40px; font-size: 13px; }
  .search-section { margin-top: 10px; }
  .search-field { height: 42px; }
  .search-field input { font-size: 16px; }
  .category-controls { margin-top: 8px; }
  .category-button { min-height: 34px; font-size: 12px; padding: 6px 12px; }
  .places-section { margin-top: 12px; }
  .section-heading { margin-bottom: 6px; }
  .section-heading h2 { font-size: 15px; }
  .place-open { min-height: 76px; grid-template-columns: 56px minmax(0, 1fr); gap: 9px; padding: 7px 36px 7px 5px; }
  .place-thumb { width: 56px; height: 56px; }
  .place-title { font-size: 15px; }
  .place-kind { font-size: 12px; }
  .save-place { right: 2px; width: 32px; }
  .quest-promo { margin-top: 12px; }
  .map-topline { top: 12px; left: max(12px, var(--safe-left)); right: max(64px, calc(var(--safe-right) + 52px)); }
  .district-badge { min-height: 32px; padding: 6px 9px; font-size: 12px; }
  .map-caption { display: none; }
  .map-context { top: 54px; left: max(12px, var(--safe-left)); right: max(64px, calc(var(--safe-right) + 52px)); max-height: max(0px, calc(100% - var(--sheet-height) - 104px)); }
  .sidebar.is-collapsed ~ .map-stage .map-context, .app-shell.is-sheet-collapsed .map-context { max-height: max(0px, calc(100% - 144px)); }
  .map-context:has(#journey-progress:not([hidden])) > .map-messages { max-height: 70px; }
  #journey-progress .journey-card { padding: 12px; gap: 9px; border-radius: 16px; }
  #journey-progress .journey-heading h3 { font-size: 15px; line-height: 1.35; }
  #journey-progress .journey-heading .eyebrow { font-size: 12px; margin-bottom: 3px; }
  #journey-progress .journey-current { font-size: 13px; line-height: 1.45; }
  #journey-progress .journey-presence { padding-block: 8px; gap: 7px; }
  #journey-progress .journey-actions { gap: 7px; }
  #journey-progress .journey-actions > button, #journey-progress .journey-actions > a { flex-basis: 100px; min-height: 37px; padding: 7px 9px; font-size: 12px; }
  #journey-progress .journey-checklist { max-height: 135px; }
  .sidebar:not(.is-collapsed) ~ .map-stage .selected-place { display: none; }
  .map-status { font-size: 12px; padding: 8px 10px; }
  .map-controls { right: max(12px, var(--safe-right)); top: 64px; padding: 3px; border-radius: 9px; }
  .map-controls button { width: 32px; height: 34px; font-size: 21px; }
  .map-controls button svg { width: 16px; height: 16px; }
  .guide-button { right: max(12px, var(--safe-right)); top: 190px; bottom: auto; width: 40px; height: 40px; min-height: 0; justify-content: center; padding: 5px; border-radius: 9px; }
  .guide-button > span { display: none; }
  .guide-button img { width: 26px; height: 26px; }
  .selected-place { padding: 10px 34px 10px 10px; gap: 8px; grid-template-columns: minmax(0, 1fr); }
  .selected-thumb { display: none; }
  .selected-copy h2 { font-size: 14px; margin: 0; line-height: 1.4; }
  .selected-copy p, .selected-copy .place-kind { display: none; }
  .selected-place .primary-button { display: inline-flex; justify-self: start; min-height: 36px; padding: 7px 10px; font-size: 12px; gap: 4px; }
  .selected-place .primary-button svg { width: 13px; height: 13px; }
  .selected-close { width: 26px; height: 26px; top: 4px; right: 4px; padding: 5px; }
  .selected-close svg { width: 12px; height: 12px; }
  .maplibregl-ctrl-bottom-right { right: var(--safe-right); bottom: var(--sheet-height); }
  .sidebar.is-collapsed ~ .map-stage .maplibregl-ctrl-bottom-right, .app-shell.is-sheet-collapsed .maplibregl-ctrl-bottom-right { bottom: 47px; }
  .maplibregl-ctrl-attrib { font-size: 11px; }
  .content-dialog { padding: 22px 18px 20px; border-radius: 17px; }
  .content-dialog h2, .detail-heading h2 { font-size: 22px; }
  .content-dialog p { font-size: 14px; }
  .intent-grid { grid-template-columns: 1fr; gap: 9px; }
  .intent-button { flex-direction: row-reverse; justify-content: space-between; padding: 14px 15px; text-align: left; }
  .detail-art { height: 130px; margin-top: 10px; }
  .guide-art { width: 64px; height: 64px; margin-bottom: 12px; }
  .walk-stop { grid-template-columns: 24px 43px minmax(0, 1fr) 14px; gap: 8px; padding: 10px; font-size: 12px; }
  .walk-thumb { width: 43px; height: 46px; }
  .walk-stop .step-number { min-width: 24px; min-height: 27px; }
  .toast { bottom: calc(var(--nav-height) + 12px); font-size: 13px; }
}
@media (max-width: 359px) {
  .site-header { gap: 6px; padding-left: max(12px, var(--safe-left)); padding-right: max(12px, var(--safe-right)); }
  .brand-copy strong { font-size: 18px; }
  .brand-symbol { width: 30px; }
  .header-actions { gap: 5px; }
  .bookmark-button { width: 27px; }
  .map-caption { display: none; }
  .sidebar-scroll { padding-left: max(12px, var(--safe-left)); padding-right: max(12px, var(--safe-right)); }
  .category-button { padding-left: 12px; padding-right: 12px; }
  .place-title { font-size: 14px; }
  .quest-guide { width: 64px; height: 72px; }
}
@media (max-width: 760px) and (max-height: 500px) {
  .map-controls { top: 12px; }
  .guide-button { top: 138px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* Vlada onboarding: isolated surfaces, never header/auth/profile styling. */
.vlada-ob-coach { min-width: 0; margin: 0 0 14px; }
.content-dialog .intent-grid > .vlada-ob-reopen { grid-column: 1 / -1; min-height: 44px; flex-direction: row; align-items: center; justify-content: space-between; }
.vlada-ob-inline { min-width: 0; padding: 13px; border: 1px solid #ffdbb2; border-radius: 16px; background: #fff8eefa; color: var(--graphite); }
.vlada-ob-inline .svoi-mascot-panel { display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: start; gap: 10px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.vlada-ob-inline .svoi-mascot-panel .svoi-mascot-figure { height: 86px; min-height: 0; margin: 0; }
.vlada-ob-inline .svoi-mascot-panel .svoi-mascot-copy { min-width: 0; text-align: left; }
.vlada-ob-inline .svoi-mascot-panel .svoi-mascot-eyebrow { font-size: 10px; margin: 0 0 4px; }
.vlada-ob-inline .svoi-mascot-panel .svoi-mascot-title { font-size: 16px; line-height: 1.35; margin: 0 0 7px; }
.vlada-ob-inline .svoi-mascot-panel .svoi-mascot-text { font-size: 13px; line-height: 1.55; margin: 0; }
.vlada-ob-actions, .vlada-ob-footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.vlada-ob-actions > button { min-width: 0; max-width: 100%; font-size: 12px; white-space: normal; }
.vlada-ob-inline > .text-button { display: block; margin-top: 8px; padding: 4px 0; font-size: 12px; }
.content-dialog.vlada-ob-dialog .svoi-mascot-panel { grid-template-columns: 110px minmax(0, 1fr); gap: 16px; }
.vlada-ob-dialog .svoi-mascot-panel .svoi-mascot-figure { height: 150px; min-height: 0; margin: 0; }
.vlada-ob-name { display: grid; gap: 8px; margin: 18px 0 10px; font-size: 14px; line-height: 1.5; }
.vlada-ob-name input { box-sizing: border-box; width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #e2e6e9; border-radius: 12px; font: inherit; font-size: 16px; background: #fff; color: var(--graphite); }
.vlada-ob-caption { font-size: 12px !important; line-height: 1.5 !important; color: var(--muted); }
.vlada-ob-choices { display: grid; gap: 9px; margin-top: 16px; }
.vlada-ob-choices > button { justify-content: flex-start; text-align: left; min-width: 0; white-space: normal; }
.vlada-ob-footer { padding-top: 8px; border-top: 1px solid #eceff1; }
.vlada-ob-footer .text-button { min-height: 34px; font-size: 12px; }
.vlada-ob-dialog button, .vlada-ob-dialog p, .vlada-ob-inline button { overflow-wrap: anywhere; }
#detail-content > .vlada-ob-inline { margin-top: 0; margin-bottom: 18px; }
@media (max-width: 760px) {
  .vlada-ob-inline { padding: 11px; }
  .content-dialog.vlada-ob-dialog .svoi-mascot-panel { grid-template-columns: 85px minmax(0, 1fr); gap: 12px; }
  .vlada-ob-dialog .svoi-mascot-panel .svoi-mascot-figure { height: 118px; }
  .vlada-ob-actions { flex-direction: column; align-items: stretch; }
  .vlada-ob-actions > button { width: 100%; }
}
@media (max-width: 359px) {
  .content-dialog.vlada-ob-dialog .svoi-mascot-panel { grid-template-columns: minmax(0, 1fr); }
  .vlada-ob-dialog .svoi-mascot-panel .svoi-mascot-figure { height: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  .vlada-ob-dialog *, .vlada-ob-inline * { animation: none !important; transition: none !important; }
}

/* Geolocation "Что рядом со мной" */
.nearby-section { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.nearby-controls { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.nearby-button { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 7px 13px; border: 1px solid #ffdfb5; border-radius: 8px; background: #fff4df; color: #88500a; font-size: 11px; font-weight: 750; cursor: pointer; }
.nearby-button:hover { background: #ffedcd; }
.nearby-button:disabled { opacity: .55; cursor: default; }
.nearby-button svg { width: 16px; height: 16px; flex: none; }
.nearby-radius select { min-height: 36px; border: 1px solid #e5e9e0; border-radius: 8px; background: white; padding: 6px 10px; color: #6f786b; font-size: 11px; font-weight: 700; cursor: pointer; }
.nearby-hint { margin: 0; font-size: 11px; line-height: 1.5; color: var(--muted); }
.nearby-status { margin: 0; font-size: 11px; line-height: 1.55; color: #64705c; background: #f8faf5; border: 1px solid #e5e9e0; border-radius: 8px; padding: 8px 11px; }
.nearby-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.nearby-link { border: 0; background: transparent; padding: 0; color: var(--orange-dark); font-size: 11px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.nearby-link:hover { color: var(--graphite); }
.place-distance { display: block; margin-top: 4px; color: var(--orange-dark); font-size: 11px; font-weight: 750; }
.you-marker { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.you-dot { width: 18px; height: 18px; border-radius: 50%; background: #2b7fff; border: 3px solid #fff; box-shadow: 0 0 0 4px #2b7fff33, 0 2px 8px #24362b40; }
.you-label { border: 1px solid #fff; border-radius: 6px; padding: 3px 8px; background: #2b7fff; color: #fff; font-size: 11px; font-weight: 750; white-space: nowrap; box-shadow: 0 2px 8px #2b7fff33; }

/* --- Задача 013: демо-вход, отметки, профиль и топ --- */
.auth-button { display: inline-flex; align-items: center; min-height: 36px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 7px 14px; border: 1px solid #e4e8df; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 800; }
.auth-button:hover { background: #f7f8f3; border-color: #d5dccb; }
.auth-button.is-authed { background: var(--cream); border-color: #f0ddba; color: #6f5038; }
.auth-form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: #6f786b; }
.auth-field input { min-height: 40px; padding: 8px 11px; border: 1px solid #e6eae2; border-radius: 10px; background: #fafbf8; font-size: 14px; color: var(--graphite); }
.auth-field input:focus { border-color: #c7cfbd; background: #fff; }
.auth-error { margin: 0; color: #b4231f; font-size: 12.5px; font-weight: 700; }
.social-box { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fafbf8; display: flex; flex-direction: column; gap: 9px; }
.social-counters { margin: 0; font-size: 12.5px; font-weight: 750; color: #6f786b; }
.social-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.social-toggle { flex: 1 1 130px; min-height: 38px; padding: 7px 10px; border: 1px solid #e4e8df; border-radius: 10px; background: #fff; font-size: 13px; font-weight: 750; }
.social-toggle:hover { background: #f7f8f3; }
.social-toggle[aria-pressed="true"] { background: var(--cream); border-color: var(--orange); color: var(--orange-dark); }
.profile-stats { display: flex; gap: 10px; margin-top: 12px; }
.profile-stat { flex: 1; padding: 12px; border: 1px solid var(--line); border-radius: 12px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.profile-stat strong { font-size: 22px; letter-spacing: -.4px; }
.profile-stat span { font-size: 11.5px; color: var(--muted); font-weight: 750; }
.profile-lists { display: grid; gap: 12px; margin-top: 12px; }
.profile-list h3 { margin: 0 0 6px; font-size: 13px; }
.profile-places { margin: 0; padding-left: 18px; font-size: 12.5px; color: #555c55; display: flex; flex-direction: column; gap: 3px; }
.profile-empty { list-style: none; margin-left: -18px; color: var(--muted); }
.board-list { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.board-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.board-row.is-me { border-color: var(--orange); background: var(--cream); }
.board-rank { font-weight: 800; min-width: 20px; color: #7b8479; }
.board-login { font-weight: 750; flex: 1; overflow-wrap: anywhere; }
.board-count { font-weight: 750; white-space: nowrap; }
.board-likes { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* --- Задача 014: ручной ввод координат старта --- */
.manual-coords { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.manual-coord { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: #6f786b; }
.manual-coord input { min-height: 40px; padding: 8px 11px; border: 1px solid #e6eae2; border-radius: 10px; background: #fafbf8; font-size: 14px; color: var(--graphite); }
.manual-coord input:focus { border-color: #c7cfbd; background: #fff; }

/* Practical guide: address-only candidates stay separate from map places. */
.practical-guides-view { display: grid; gap: 14px; min-width: 0; }
.practical-guides-view .practical-guides-back { justify-self: start; min-height: 36px; margin: 0; padding: 7px 11px; font-size: 12px; }
.practical-guides-view .practical-guides-head { min-width: 0; }
.practical-guides-view .practical-guides-notice { margin: 0; padding: 12px 14px; border: 1px solid #f0dfc5; border-radius: 13px; background: #fff6e8; color: #86643c; font-size: 12px; line-height: 1.65; }
.practical-guides-view .practical-guides-status { margin: 0; color: #747d74; font-size: 12px; line-height: 1.5; }
.practical-guides-view .practical-guides-results { min-width: 0; }
.practical-guides-view .practical-guides-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.practical-guides-view .practical-guides-card { min-width: 0; padding: 16px; border: 1px solid #e7ebe3; border-radius: 16px; background: #ffffffd9; box-shadow: inset 0 1px 0 #fff; }
.practical-guides-view .practical-guides-title { margin: 0 0 8px; font-size: 16px; line-height: 1.4; letter-spacing: -.2px; color: var(--graphite); }
.practical-guides-view .practical-guides-address { margin: 0; color: #536157; font-size: 14px; line-height: 1.6; }
.practical-guides-view .practical-guides-price { margin: 9px 0 0; color: #8c611c; font-size: 13px; line-height: 1.6; }
.practical-guides-view .practical-guides-note { margin: 9px 0 0; color: #657061; font-size: 13px; line-height: 1.65; }
.practical-guides-view .practical-guides-verification { margin: 10px 0 0; color: #78816f; font-size: 12px; line-height: 1.65; }
.practical-guides-view .practical-guides-source { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; margin: 9px 0 0; font-size: 13px; line-height: 1.5; color: #9b5918; }
.practical-guides-view .practical-guides-source svg { width: 16px; height: 16px; }
.practical-guides-view .practical-guides-loading { display: flex; align-items: center; gap: 11px; min-height: 90px; padding: 16px; border: 1px solid #edf0e8; border-radius: 14px; background: #fbfcf7; }
.practical-guides-view .practical-guides-loading p, .practical-guides-view .practical-guides-error p { margin: 0; font-size: 14px; line-height: 1.6; }
.practical-guides-view .practical-guides-spinner { width: 21px; height: 21px; flex-shrink: 0; border: 2px solid #e8e2d7; border-top-color: var(--orange); border-radius: 50%; animation: practical-guides-spin 850ms linear infinite; }
.practical-guides-view .practical-guides-empty, .practical-guides-view .practical-guides-error { margin: 0; padding: 17px; border: 1px solid #e8ebe3; border-radius: 14px; background: #fafbf7; color: #65705e; font-size: 14px; line-height: 1.75; }
.practical-guides-view .practical-guides-retry { margin-top: 12px; }
@keyframes practical-guides-spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) {
  .practical-guides-view { gap: 12px; }
  .practical-guides-view .practical-guides-card { padding: 14px; border-radius: 14px; }
  .practical-guides-view .practical-guides-title { font-size: 15px; }
  .practical-guides-view .practical-guides-notice { padding: 11px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .practical-guides-view .practical-guides-spinner { animation: none; }
}

/* Personal route builder (P0): ordered stops, honest straight-line estimates. */
.place-card .place-open { padding-right: 68px; }
.route-button { position: relative; }
.route-count { position: absolute; top: 1px; right: 1px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: #ff8500; color: #fff; font-size: 10px; font-weight: 800; line-height: 15px; text-align: center; }
.route-place { position: absolute; top: 8px; right: 36px; width: 32px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; padding: 5px; color: #9aa38d; }
.route-place svg { width: 17px; height: 17px; }
.route-place:hover { background: #f1f4ea; color: #6d7c5c; }
.route-place.is-in-route, .route-place[aria-pressed="true"] { background: #e9f2ff; color: #2f6cae; }
.content-dialog.route-dialog { width: min(580px, calc(100% - 32px - var(--safe-left) - var(--safe-right))); }
.route-start { margin: 14px 0; padding: 14px; border: 1px solid #eef0e8; border-radius: 13px; background: #fafbf7; }
.route-start-label { margin: 0 0 8px; font-size: 14px; font-weight: 650; color: var(--graphite); }
.route-start-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.route-start-actions .secondary-button { margin-top: 0; }
.route-link { border: 0; background: transparent; color: #b2670c; padding: 4px 0; font-size: 13px; text-decoration: underline; }
.route-manual { margin-top: 10px; }
.route-manual summary { cursor: pointer; font-size: 13px; color: #6c7565; }
.route-input { box-sizing: border-box; width: 100%; margin: 8px 0 0; padding: 9px 10px; border: 1px solid #e3e7dc; border-radius: 9px; font: inherit; font-size: 14px; color: var(--graphite); }
.route-input:focus-visible { outline: 2px solid #ffb35c; outline-offset: 1px; }
.route-manual .secondary-button { margin-top: 8px; }
.route-hint { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: #7c8573; }
.route-empty { margin: 12px 0; padding: 16px; border: 1px dashed #dfe4d6; border-radius: 12px; font-size: 13px; color: #6c7565; text-align: center; }
.route-stops { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.route-stop { padding: 11px 12px; border: 1px solid #eef0e8; border-radius: 12px; background: #fff; }
.route-stop-head { display: flex; align-items: center; gap: 8px; }
.route-stop-number { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: #fff0d7; color: #b2670c; font-size: 12px; font-weight: 800; }
.route-stop-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 650; color: var(--graphite); }
.route-stop-actions { display: flex; flex: none; gap: 2px; }
.route-move { width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: #8b9480; font-size: 15px; line-height: 1; }
.route-move:hover { background: #f1f4ea; color: #4c5544; }
.route-move:disabled { opacity: .35; }
.route-remove { color: #b06a5a; }
.route-stop-distance { margin: 7px 0 0; font-size: 12px; color: #7c8573; }
.route-leg-link { display: inline-block; margin-top: 6px; font-size: 12px; }
.route-summary { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #f7f9f2; }
.route-total { margin: 0 0 4px; font-size: 14px; font-weight: 650; color: var(--graphite); }
@media (max-width: 760px) {
  .route-stop-title { font-size: 13px; }
  .route-start { padding: 12px; }
}

/* Readability and section rhythm (task 019). */
.sidebar-scroll > section + section,
.sidebar-scroll > section + details,
.sidebar-scroll > details + section { margin-top: 18px; padding-top: 18px; border-top: 1px solid #edf0e7; }
.intro-copy { color: #5a6255; font-size: 13.5px; line-height: 1.6; }
.catalog-note { color: #646c5e; line-height: 1.55; }
.content-dialog p, .detail-heading .dialog-copy { color: #555d50; }
.adventure-card p { color: #5b6356; line-height: 1.62; }
.place-distance { color: #6b7364; font-size: 12.5px; }
.vlada-ob-inline { padding: 15px; border-color: #f2c48c; background: linear-gradient(160deg, #fffaf2, #fff5e6); box-shadow: 0 12px 30px #b8863a14; }
.vlada-ob-inline .svoi-mascot-title { font-size: 17px; letter-spacing: -.25px; }
.vlada-ob-inline .svoi-mascot-text { color: #4d5549; font-size: 13.5px; line-height: 1.62; }
.vlada-ob-inline .svoi-mascot-eyebrow { color: #a4681f; letter-spacing: .08em; }
.vlada-ob-actions > button { font-size: 12.5px; }

/* Profile avatars: six static images, three unlocked by quests. */
.profile-avatars { margin: 0 0 16px; }
.profile-avatars h3 { margin: 0 0 4px; font-size: 14px; }
.profile-avatar-hint { margin: 0 0 10px; font-size: 12.5px; line-height: 1.5; color: #6c7565; }
.avatar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.avatar-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 8px 9px; border: 1px solid #e6eae0; border-radius: 14px; background: #fff; color: var(--graphite); cursor: pointer; font: inherit; }
.avatar-tile:hover:not(:disabled) { border-color: #ffcf96; background: #fffaf2; }
.avatar-tile:focus-visible { outline: 2px solid #ffb35c; outline-offset: 2px; }
.avatar-tile img { width: 68px; height: 68px; object-fit: contain; }
.avatar-tile.is-selected { border-color: #ffb35c; background: #fff8ee; box-shadow: inset 0 0 0 1px #ffd7a8; }
.avatar-tile.is-locked { opacity: .6; filter: grayscale(.45); cursor: default; }
.avatar-name { font-size: 12.5px; font-weight: 700; }
.avatar-state { font-size: 10.5px; line-height: 1.3; color: #7c8573; text-align: center; }
.avatar-tile.is-locked .avatar-state { color: #8b877b; }
.avatar-reward { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; padding: 12px; border: 1px solid #ffd9ae; border-radius: 14px; background: #fff8ee; }
.avatar-reward img { width: 76px; height: 76px; object-fit: contain; flex: none; }
.avatar-reward-copy { min-width: 0; }
.avatar-reward-copy h3 { margin: 0 0 4px; font-size: 16px; }
.avatar-quote { margin: 0 0 8px; font-size: 13px; line-height: 1.5; color: #5b6355; }
.avatar-reward-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.avatar-reward-actions .primary-button { margin-top: 0; }
@media (max-width: 760px) {
  .avatar-tile img { width: 54px; height: 54px; }
  .avatar-tile { padding: 8px 6px; }
  .avatar-name { font-size: 11.5px; }
  .avatar-state { font-size: 10px; }
}

/* Task 022: cohesive shell and components. Styles load after legacy glass/polish;
   native dialogs and the existing motion controller keep their behavior. */
body { padding: var(--space-4); gap: var(--space-4); background: var(--cream); }
button, input, select, textarea { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { transition: background var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; }
button:disabled { opacity: .55; }
.eyebrow { color: var(--muted); font-size: 11px; letter-spacing: .1em; line-height: 1.5; font-weight: 800; }
/* Shell dimensions keep map, navigation and sidebar scroll independent. */
.site-header { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--space-4); min-height: 76px; margin: 0; padding: var(--space-3) var(--space-6); border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--paper); box-shadow: var(--shadow-card); -webkit-backdrop-filter: none; backdrop-filter: none; }
.brand { width: auto; max-width: 260px; min-width: 0; gap: var(--space-3); }
.brand-symbol { width: 38px; height: 44px; }
.brand-copy { min-width: 0; gap: 2px; }
.brand-copy strong { color: var(--forest); font-size: 21px; font-weight: 800; letter-spacing: -.9px; white-space: nowrap; }
.brand-copy > span { color: var(--muted); font-size: var(--type-caption); letter-spacing: 0; }
.brand-dot { color: var(--orange-dark); }
.main-nav { align-self: center; gap: var(--space-1); padding: var(--space-1); border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); }
.nav-button { min-height: 44px; justify-content: center; gap: var(--space-2); padding: 10px 18px; border: 1px solid transparent; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 750; }
.nav-button svg { width: 18px; height: 18px; }
.nav-button:hover { color: var(--forest); background: var(--paper); }
.nav-button.is-active, .nav-button[aria-pressed="true"] { color: var(--forest); border-color: var(--line); background: var(--surface); box-shadow: var(--shadow-card); }
.nav-button.is-active svg { color: var(--orange-dark); }
.header-actions { justify-self: end; min-width: 0; margin-left: 0; gap: var(--space-2); }
.icon-button { flex: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--forest); background: var(--paper); }
.icon-button:hover, .bookmark-button[aria-pressed="true"] { color: var(--forest); background: var(--mint); border-color: var(--line-strong); }
.auth-button { display: inline-flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; max-width: 180px; padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--forest); font-weight: 750; font-size: 13px; }
.auth-button:has(.auth-avatar) { padding-left: 5px; }
.auth-button:hover { border-color: var(--line-strong); background: var(--mint); }
.auth-avatar { width: 32px; height: 32px; flex: none; border: 1px solid var(--line); border-radius: 50%; object-fit: cover; background: var(--paper); }
.auth-login { min-width: 0; max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-count { top: -5px; right: -5px; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border: 2px solid var(--paper); border-radius: 999px; background: var(--orange); color: var(--ink); font-size: 11px; font-variant-numeric: tabular-nums; line-height: 1; }
.app-shell { min-width: 0; padding: 0; margin: 0; gap: var(--space-4); grid-template-columns: var(--sidebar-width) minmax(0, 1fr); background: transparent; }
.sidebar { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--paper); box-shadow: var(--shadow-card); -webkit-backdrop-filter: none; backdrop-filter: none; overflow: hidden; }
.sidebar-scroll { padding: var(--space-6); scrollbar-color: var(--line-strong) transparent; scroll-padding-block: var(--space-4); }
.sidebar-scroll > section + section, .sidebar-scroll > section + details, .sidebar-scroll > details + section { margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--line); }
.intro-section h1 { margin: var(--space-3) 0; color: var(--forest); font-size: var(--type-display); font-weight: 800; line-height: 1.12; letter-spacing: -1.7px; }
.intro-copy { color: var(--muted); font-size: var(--type-body); line-height: 1.65; }
.primary-button, .secondary-button { min-height: 44px; padding: 10px 16px; border: 1px solid transparent; border-radius: var(--radius-md); font-size: 13px; line-height: 1.5; font-weight: 800; }
.primary-button, .svoi-mascot-action.is-primary { color: var(--ink); background: var(--orange); border-color: var(--orange); box-shadow: none; }
.primary-button:hover, .svoi-mascot-action.is-primary:hover { background: var(--orange-hover); border-color: var(--orange-hover); box-shadow: var(--shadow-card); }
.secondary-button, .svoi-mascot-action:not(.is-primary) { color: var(--forest); background: var(--surface); border-color: var(--line); box-shadow: none; }
.secondary-button:hover, .svoi-mascot-action:not(.is-primary):hover { background: var(--mint); border-color: var(--line-strong); }
.first-time-button { margin-top: var(--space-4); }
.search-field { height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--muted); background: var(--surface); box-shadow: none; }
.search-field input { font-size: var(--type-body); color: var(--ink); }
.search-field input::placeholder { color: var(--muted); }
.search-field:focus-within { border-color: var(--forest); background: var(--surface); }
.search-field:has(input:focus-visible) { outline-color: var(--forest); }
.category-controls { gap: var(--space-1); margin-top: var(--space-3); padding: var(--space-1); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.category-button { flex: 1; min-height: 44px; padding: 8px 9px; border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--muted); background: transparent; font-size: var(--type-caption); font-weight: 750; }
.category-button.is-active, .category-button[aria-pressed="true"] { color: var(--forest); background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-card); }
.category-button:hover { color: var(--forest); background: var(--paper); }
.nearby-section { display: block; margin-top: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); box-shadow: none; }
.nearby-section summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 48px; padding: 10px 12px; color: var(--forest); font-size: var(--type-caption); font-weight: 750; cursor: pointer; list-style: none; }
.nearby-section summary::-webkit-details-marker { display: none; }
.nearby-section[open] summary { border-bottom: 1px solid var(--line); }
.nearby-section > :not(summary) { margin: var(--space-3); }
.nearby-controls { gap: var(--space-2); }
.nearby-button, .nearby-radius select { min-height: 44px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--forest); background: var(--paper); font-size: var(--type-caption); }
.nearby-button:hover { background: var(--mint); }
.nearby-radius select { max-width: 100%; }
.nearby-hint, .nearby-status, .nearby-link { color: var(--muted); font-size: var(--type-caption); line-height: 1.65; }
.nearby-status { padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); }
.nearby-actions { gap: var(--space-1) var(--space-3); }
.nearby-link { min-height: 44px; padding-block: 8px; color: var(--orange-dark); }
.section-heading { align-items: center; margin-bottom: var(--space-3); }
.section-heading h2 { color: var(--forest); font-size: 18px; line-height: 1.35; letter-spacing: -.5px; }
.place-count { display: grid; place-items: center; min-width: 28px; min-height: 28px; padding: 2px 8px; border-radius: 999px; background: var(--mint); color: var(--forest); font-size: var(--type-caption); font-weight: 800; font-variant-numeric: tabular-nums; }
/* Content cards have dedicated, accessible action rows. */
.place-list { display: grid; gap: var(--space-3); }
.place-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); overflow: visible; }
.place-card:hover { background: var(--surface); border-color: var(--line-strong); transform: none; box-shadow: var(--shadow-floating); }
.place-card.is-selected, .place-card[aria-current="true"] { border-color: var(--forest); background: var(--mint); }
.place-card:focus-within { outline: 3px solid var(--forest); outline-offset: 3px; }
.place-card .place-open { grid-template-columns: 72px minmax(0, 1fr); min-height: 96px; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-lg) var(--radius-lg) 0 0; color: var(--ink); background: transparent; }
.place-card .place-open:hover { background: transparent; }
.place-card .place-open:focus-visible { outline-offset: -4px; }
.place-card-visual, .place-thumb { display: block; width: 72px; height: 72px; flex: none; overflow: hidden; border-radius: var(--radius-md); background: var(--surface-soft); }
.place-thumb.is-photo, .selected-thumb.is-photo { object-fit: cover; }
.place-thumb.is-illustration, .selected-thumb.is-illustration { object-fit: contain; padding: 6px; }
.place-title { color: var(--forest); font-size: 16px; font-weight: 800; line-height: 1.4; letter-spacing: -.3px; }
.place-kind { margin-bottom: 4px; color: var(--muted); font-size: var(--type-caption); font-weight: 600; }
.place-distance, .place-tag { margin-top: 6px; color: var(--muted); font-size: var(--type-caption); line-height: 1.5; font-weight: 650; }
.place-card-actions { display: flex; align-items: center; gap: var(--space-2); padding: 0 var(--space-3) var(--space-3); }
.place-card-actions .route-place, .place-card-actions .save-place { position: static; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; width: 44px; padding: 9px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); color: var(--forest); }
.place-card-actions .route-place { flex: 1; width: auto; justify-content: flex-start; padding-inline: var(--space-3); }
.place-action-label { font-size: var(--type-caption); font-weight: 750; }
.place-card-actions .route-place:hover, .place-card-actions .save-place:hover { border-color: var(--line-strong); background: var(--mint); color: var(--forest); }
.place-card-actions .route-place.is-in-route, .place-card-actions .route-place[aria-pressed="true"], .place-card-actions .save-place.is-saved, .place-card-actions .save-place[aria-pressed="true"] { background: var(--mint); border-color: var(--forest); color: var(--forest); }
.save-place[aria-pressed="true"] svg { fill: var(--mint); }
.quest-promo { gap: var(--space-2); padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--mint); box-shadow: none; }
.quest-promo h2 { color: var(--forest); font-size: var(--type-h3); line-height: 1.35; }
.quest-promo .eyebrow { color: var(--muted); }
.quest-guide { width: 84px; height: 112px; object-fit: contain; }
.promo-link { min-height: 44px; color: var(--forest); font-size: var(--type-caption); }
.catalog-note { color: var(--muted); font-size: var(--type-caption); line-height: 1.65; }

/* Map tools have reserved lanes, away from attribution and active journeys. */
.map-stage { border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--sea); box-shadow: var(--shadow-card); }
.map-topline { top: 20px; left: 20px; right: 88px; gap: var(--space-3); border: 0; background: none; box-shadow: none; }
.district-badge { min-height: 40px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--forest); box-shadow: var(--shadow-card); font-size: var(--type-caption); }
.district-dot { width: 7px; height: 7px; background: var(--orange-dark); }
.map-caption { padding: 8px 12px; border-radius: 999px; background: var(--paper); color: var(--forest); text-shadow: none; font-size: var(--type-caption); }
.map-caption span { color: var(--orange-dark); }
.map-context { top: auto; bottom: 116px; left: 20px; right: 88px; width: auto; max-width: 400px; max-height: calc(100% - 196px); gap: var(--space-3); }
.map-context:has(#journey-progress:not([hidden])) > .map-messages { max-height: 88px; }
.map-controls { top: 88px; right: 16px; padding: 5px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow-floating); }
.map-controls button { width: 44px; height: 44px; border-radius: var(--radius-md); background: transparent; color: var(--forest); }
.map-controls button:hover { background: var(--mint); box-shadow: none; }
.control-divider { width: 28px; border-color: var(--line); margin-block: 4px; }
.guide-button { right: 20px; bottom: 36px; top: auto; gap: var(--space-3); min-height: 64px; padding: 6px 16px 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); color: var(--forest); box-shadow: var(--shadow-floating); text-align: left; }
.guide-button:hover { background: var(--mint); transform: translateY(-2px); }
.guide-button img { width: 46px; height: 52px; }
.guide-button-copy { display: grid; gap: 2px; }
.guide-button-eyebrow { font-size: 10px; font-weight: 650; color: var(--muted); }
.guide-button-copy strong { font-size: 13px; }
.guide-button > .guide-button-arrow { color: var(--orange-dark); margin-left: 4px; }
.selected-place { grid-template-columns: 56px minmax(0, 1fr); gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow-floating); }
.selected-thumb { display: block; width: 56px; height: 64px; border-radius: var(--radius-md); background: var(--surface-soft); }
.selected-copy h2 { margin-right: 32px; color: var(--forest); font-size: 16px; line-height: 1.4; }
.selected-copy p { color: var(--muted); font-size: var(--type-caption); }
.selected-place .primary-button { grid-column: 1 / -1; min-height: 44px; justify-self: stretch; font-size: 13px; }
.selected-close { top: 6px; right: 6px; width: 44px; height: 44px; padding: 13px; border-radius: var(--radius-md); color: var(--muted); background: transparent; }
.selected-close:hover { background: var(--mint); }
.map-status { padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper); color: var(--muted); box-shadow: var(--shadow-card); font-size: var(--type-caption); }
.map-marker-bubble { width: 46px; height: 46px; border-color: var(--paper); background: var(--orange-soft); box-shadow: var(--shadow-card); }
.map-marker-label { border-color: var(--line); background: var(--paper); color: var(--forest); }
.map-marker.is-selected .map-marker-bubble { border-color: var(--forest); }
.map-marker:focus-visible { outline: 3px solid var(--forest); outline-offset: 4px; border-radius: 50%; }
.you-dot { background: var(--location); border-color: var(--surface); box-shadow: 0 0 0 4px var(--location-halo); }
.you-label { background: var(--location); color: var(--surface); border-color: var(--surface); }
.maplibregl-ctrl-bottom-right { right: 8px; bottom: 8px; }
.maplibregl-ctrl-attrib { color: var(--ink); background: var(--paper); border-radius: var(--radius-sm); font-size: 11px; }
/* Journey progress shares the same surface and real 44px controls. */
#journey-progress { border-radius: var(--radius-lg); scrollbar-color: var(--line-strong) transparent; }
#journey-progress .journey-card { gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow-floating); -webkit-backdrop-filter: none; backdrop-filter: none; }
#journey-progress .journey-heading { background: var(--paper); }
#journey-progress .journey-heading h3 { color: var(--forest); font-size: var(--type-h3); }
#journey-progress .journey-heading .eyebrow { color: var(--orange-dark); }
#journey-progress .journey-current { color: var(--ink); }
#journey-progress .journey-presence, #journey-progress .journey-details, #journey-progress .journey-details > .journey-actions { border-color: var(--line); }
#journey-progress .journey-presence > p, #journey-progress .micro-copy, #journey-progress .journey-verification { color: var(--muted); font-size: var(--type-caption) !important; }
#journey-progress .journey-actions > button, #journey-progress .journey-actions > a { min-height: 44px; padding: 10px 12px; font-size: 13px; }
#journey-progress .journey-actions .text-button { color: var(--muted); }
#journey-progress .journey-details { border-radius: var(--radius-md); background: var(--surface-soft); }
#journey-progress .journey-details > summary { min-height: 44px; color: var(--forest); font-size: var(--type-caption); }
#journey-progress .journey-checklist > li { min-height: 44px; color: var(--muted); }
#journey-progress .journey-checkpoint { min-height: 44px; }
#journey-progress .journey-checklist > li.is-current { color: var(--forest); background: var(--mint); }
#journey-progress .journey-checklist > li::before { color: var(--forest); background: var(--surface); border-color: var(--line); }
#journey-progress .journey-checklist > li.is-current::before { background: var(--orange); border-color: var(--orange); color: var(--ink); }
#journey-progress .journey-checklist > li.is-done::before { background: var(--mint); border-color: var(--line-strong); color: var(--forest); }
#journey-progress .journey-meter, #journey-progress .journey-meter::-webkit-progress-bar { background: var(--line); }
#journey-progress .journey-meter::-webkit-progress-value { background: var(--forest); }
#journey-progress .journey-meter::-moz-progress-bar { background: var(--forest); }
/* Native dialogs retain their motion and internal scroll. */
.content-dialog, .content-dialog.route-dialog { width: min(640px, calc(100% - 48px - var(--safe-left) - var(--safe-right))); max-height: calc(100dvh - 48px - var(--safe-top) - var(--safe-bottom)); padding: 64px var(--space-8) var(--space-8); border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--paper); color: var(--ink); box-shadow: var(--shadow-overlay); -webkit-backdrop-filter: none; backdrop-filter: none; scrollbar-color: var(--line-strong) transparent; scroll-padding-block: 16px; }
.content-dialog::backdrop { background: #20392e66; -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
.content-dialog { --dialog-max-height: calc(100dvh - 48px - var(--safe-top) - var(--safe-bottom)); --dialog-footer: 32px; max-height: var(--dialog-max-height); overflow: hidden; scrollbar-gutter: auto; }
.content-dialog > div[id$="-content"] { min-width: 0; max-height: calc(var(--dialog-max-height) - 64px - var(--dialog-footer)); margin: -4px; padding: 4px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; scroll-padding-block: 12px; }
.content-dialog .dialog-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--forest); z-index: 5; }
.content-dialog .dialog-close:hover { background: var(--mint); }
.content-dialog h2, .detail-heading h2 { margin: 0 0 var(--space-3); color: var(--forest); font-size: var(--type-h1); font-weight: 800; line-height: 1.2; letter-spacing: -.8px; }
.content-dialog h3 { color: var(--forest); font-size: var(--type-h3); line-height: 1.4; }
.content-dialog p, .content-dialog .dialog-copy, .detail-heading .dialog-copy { color: var(--muted); font-size: var(--type-body); line-height: 1.7; }
.content-dialog .eyebrow, .detail-heading > .eyebrow { color: var(--orange-dark); font-size: 11px; letter-spacing: .08em; }
.content-dialog .dialog-actions { gap: var(--space-2); margin-top: var(--space-6); }
.content-dialog .dialog-actions .primary-button, .content-dialog .dialog-actions .secondary-button { margin: 0; }
.source-link { min-height: 44px; align-items: center; padding-block: 8px; color: var(--orange-dark); font-size: 13px; text-decoration: underline; text-decoration-thickness: 1px; }
.source-link:hover { color: var(--forest); }
.info-note, .fact-card, .survey-reference, .quest-feedback { padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-soft); color: var(--muted); box-shadow: none; }
.fact-card .eyebrow { color: var(--muted); }
.fiction-copy { padding-left: var(--space-4); border-color: var(--orange); }
.micro-copy { color: var(--muted); font-size: var(--type-caption) !important; line-height: 1.6; }
.quest-options, .adventure-list { gap: var(--space-3); }
.quest-option, .adventure-card, .walk-stop, .intent-button { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); color: var(--forest); }
.quest-option { min-height: 48px; padding: var(--space-4); font-size: var(--type-body); }
.quest-option:hover, .walk-stop:hover, .intent-button:hover { background: var(--mint); border-color: var(--line-strong); transform: none; }
.quest-option.is-correct, .quest-feedback.is-correct { background: var(--mint); border-color: var(--line-strong); color: var(--forest); }
.quest-feedback.is-wrong { background: var(--orange-soft); color: var(--orange-dark); }
.adventure-card { padding: var(--space-6); }
.adventure-card h3 { margin: var(--space-2) 0; font-size: var(--type-h2); }
.adventure-card p { margin-block: var(--space-2); }
.walk-stop { min-height: 84px; padding: var(--space-3); }
.walk-thumb { border-radius: var(--radius-sm); }
.step-number { background: var(--orange-soft); color: var(--orange-dark); border-radius: var(--radius-sm); }
.intent-grid, .content-dialog .intent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin-block: var(--space-6); }
.intent-button { min-height: 64px; padding: var(--space-4); font-size: 13px; }
.helper-category-row .secondary-button { min-height: 44px; }
.text-button { min-height: 44px; padding-block: 10px; color: var(--orange-dark); font-size: var(--type-caption); }
.empty-state, .route-empty { padding: var(--space-6); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--surface-soft); color: var(--muted); }
.empty-state h3 { color: var(--forest); }
.manual-select, .manual-coord input, .route-input, .auth-field input, .vlada-ob-name input { min-height: 48px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font-size: 16px; }
.manual-coord, .auth-field { color: var(--forest); font-size: 13px; }
.manual-coords { border-color: var(--line); }
/* Mascot illustrations have a quieter inline coaching scale. */
.content-dialog .svoi-mascot-panel, .content-dialog.vlada-ob-dialog .svoi-mascot-panel { grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: var(--space-6); }
.content-dialog .svoi-mascot-panel .svoi-mascot-figure { height: 164px; min-height: 0; margin: 0; }
.content-dialog .svoi-mascot-copy { min-width: 0; text-align: left; }
.content-dialog .svoi-mascot-title { margin: 0 0 var(--space-3); color: var(--forest); font-size: var(--type-h1); line-height: 1.2; letter-spacing: -.7px; }
.content-dialog .svoi-mascot-text { color: var(--muted); font-size: var(--type-body); line-height: 1.65; }
.content-dialog .svoi-mascot-eyebrow { color: var(--orange-dark); font-size: 11px; letter-spacing: .08em; }
.content-dialog .svoi-mascot-actions { grid-column: 1 / -1; gap: var(--space-2); }
.svoi-mascot-action { min-height: 44px; border-radius: var(--radius-md); font-size: 13px; }
.vlada-ob-inline { padding: var(--space-4); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--mint); box-shadow: none; }
.vlada-ob-inline .svoi-mascot-panel, .content-dialog .vlada-ob-inline .svoi-mascot-panel { grid-template-columns: 64px minmax(0, 1fr); align-items: start; gap: var(--space-3); }
.vlada-ob-inline .svoi-mascot-panel .svoi-mascot-figure, .content-dialog .vlada-ob-inline .svoi-mascot-panel .svoi-mascot-figure { height: 86px; }
.vlada-ob-inline .svoi-mascot-panel .svoi-mascot-title { font-size: 17px; line-height: 1.35; }
.vlada-ob-inline .svoi-mascot-panel .svoi-mascot-text { color: var(--forest); font-size: 13px; line-height: 1.65; }
.vlada-ob-inline .svoi-mascot-panel .svoi-mascot-eyebrow { color: var(--forest); font-size: 10px; }
.vlada-ob-actions > button, .vlada-ob-footer .text-button { min-height: 44px; font-size: var(--type-caption); }
.vlada-ob-footer { border-color: var(--line); }
.vlada-ob-caption { color: var(--muted); }

/* Galleries, practical guides, profile and route use the same component tokens. */
.place-gallery-stage { border-color: var(--line); border-radius: var(--radius-lg); background: var(--surface-soft); }
.place-gallery-badge, .place-gallery-loading { color: var(--forest); background: var(--paper); border: 1px solid var(--line); font-size: var(--type-caption); }
.place-gallery-caption, .place-gallery-position { color: var(--muted); font-size: var(--type-caption); }
.place-gallery .place-gallery-source { color: var(--orange-dark); font-size: var(--type-caption); }
.place-gallery-control { min-height: 44px; border-color: var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--forest); }
.place-gallery-control:hover { background: var(--mint); border-color: var(--line-strong); }
.place-gallery-control:focus-visible { outline-color: var(--forest); }
.practical-guides-view .practical-guides-card { padding: var(--space-6); border-color: var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.practical-guides-view .practical-guides-title { color: var(--forest); font-size: var(--type-h3); }
.practical-guides-view .practical-guides-address, .practical-guides-view .practical-guides-note, .practical-guides-view .practical-guides-verification, .practical-guides-view .practical-guides-status { color: var(--muted); }
.practical-guides-view .practical-guides-notice, .practical-guides-view .practical-guides-price { color: var(--orange-dark); border-color: var(--line); background: var(--orange-soft); }
.practical-guides-view .practical-guides-source { min-height: 44px; color: var(--orange-dark); }
.practical-guides-view .practical-guides-back { min-height: 44px; }
.practical-guides-view .practical-guides-loading, .practical-guides-view .practical-guides-empty, .practical-guides-view .practical-guides-error { border-color: var(--line); background: var(--surface-soft); color: var(--muted); border-radius: var(--radius-lg); }
.social-block { padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-soft); }
.social-counts { color: var(--forest); }
.social-toggle { min-height: 44px; border-color: var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--forest); font-size: 13px; }
.social-toggle:hover, .social-toggle[aria-pressed="true"] { background: var(--mint); color: var(--forest); border-color: var(--line-strong); }
.profile-stats { gap: var(--space-3); margin-block: var(--space-6); }
.profile-stat { padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--mint); }
.profile-stat strong { color: var(--forest); font-size: 28px; font-variant-numeric: tabular-nums; }
.profile-stat span { color: var(--forest); font-size: var(--type-caption); }
.profile-avatars { margin-bottom: var(--space-6); }
.profile-avatars h3 { font-size: var(--type-h3); }
.profile-avatar-hint { color: var(--muted); font-size: var(--type-caption); line-height: 1.65; }
.avatar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.avatar-tile { min-width: 0; gap: var(--space-2); padding: var(--space-4) var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--forest); }
.avatar-tile img { width: 84px; height: 84px; max-width: 100%; object-fit: contain; }
.avatar-tile:hover:not(:disabled) { border-color: var(--forest); background: var(--mint); }
.avatar-tile.is-selected { border-color: var(--forest); background: var(--mint); box-shadow: inset 0 0 0 1px var(--forest); }
.avatar-tile.is-locked { opacity: 1; filter: none; background: var(--surface-soft); }
.avatar-tile.is-locked img { filter: grayscale(.7); opacity: .55; }
.avatar-name { color: var(--forest); font-size: 13px; line-height: 1.4; }
.avatar-state, .avatar-tile.is-locked .avatar-state { color: var(--muted); font-size: var(--type-caption); line-height: 1.4; }
.avatar-tile:focus-visible, .route-input:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; }
.avatar-reward { border-color: var(--line); border-radius: var(--radius-lg); background: var(--mint); }
.avatar-quote, .profile-places, .profile-empty { color: var(--muted); font-size: 13px; }
.profile-lists { gap: var(--space-6); }
.profile-list h3 { margin-bottom: var(--space-3); font-size: 16px; }
.profile-places { gap: var(--space-2); line-height: 1.6; }
.board-row { padding: var(--space-3) var(--space-4); border-color: var(--line); border-radius: var(--radius-md); background: var(--surface); }
.board-row.is-me { background: var(--mint); border-color: var(--forest); }
.board-rank, .board-likes { color: var(--muted); font-size: var(--type-caption); }
.board-count { color: var(--forest); font-variant-numeric: tabular-nums; }
.route-start, .route-summary { padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--mint); }
.route-start-label, .route-total { color: var(--forest); }
.route-link { min-height: 44px; color: var(--orange-dark); }
.route-hint, .route-stop-distance, .route-manual summary { color: var(--muted); font-size: var(--type-caption); }
.route-manual summary { min-height: 44px; padding-block: 10px; }
.route-stops { gap: var(--space-3); }
.route-stop { padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.route-stop-head { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: var(--space-2); }
.route-stop-number { width: 28px; height: 28px; color: var(--forest); background: var(--mint); font-variant-numeric: tabular-nums; }
.route-stop-title { font-size: var(--type-body); line-height: 1.5; color: var(--forest); }
.route-stop-actions { gap: var(--space-1); }
.route-move { width: 44px; height: 44px; color: var(--forest); background: var(--surface-soft); border-radius: var(--radius-sm); }
.route-move:hover { background: var(--mint); color: var(--forest); }
.route-remove { color: var(--danger); }
.route-leg-link { min-height: 44px; padding-block: 10px; color: var(--orange-dark); font-size: 13px; }
.auth-tab { min-height: 44px; color: var(--muted); border-radius: var(--radius-md); }
.auth-tab[aria-pressed="true"], .auth-tab.is-active { color: var(--forest); background: var(--mint); }
.auth-error { color: var(--danger); background: var(--danger-soft); border-radius: var(--radius-sm); }
.toast { bottom: max(24px, var(--safe-bottom)); padding: var(--space-3) var(--space-4); border: 1px solid var(--forest); border-radius: var(--radius-md); background: var(--forest); color: var(--paper); box-shadow: var(--shadow-floating); }

@media (min-width: 1600px) {
  :root { --sidebar-width: 384px; --type-display: 38px; }
  .sidebar-scroll { padding: var(--space-8); }
}
@media (min-width: 761px) and (max-width: 1100px) {
  :root { --sidebar-width: 288px; --type-display: 30px; }
  body { padding: var(--space-3); gap: var(--space-3); }
  .site-header { grid-template-columns: minmax(0, 1fr) auto auto; min-height: 72px; gap: var(--space-2); padding: 10px 12px; border-radius: var(--radius-lg); }
  .brand { gap: var(--space-2); }
  .brand-symbol { width: 30px; height: 38px; }
  .brand-copy strong { font-size: 17px; letter-spacing: -.6px; }
  .brand-copy > span { font-size: 10px; }
  .nav-button { gap: 5px; padding: 10px 12px; font-size: var(--type-caption); }
  .header-actions { gap: var(--space-1); }
  .auth-login { max-width: 72px; }
  .auth-button { padding-right: 10px; }
  .app-shell { gap: var(--space-3); }
  .sidebar-scroll { padding: var(--space-4); }
  .map-caption { display: none; }
  .map-topline { top: 16px; left: 16px; }
  .map-context { left: 16px; right: 84px; }
  .selected-thumb { display: none; }
  .selected-place { grid-template-columns: minmax(0, 1fr); }
  .selected-place .primary-button { grid-column: 1; }
  .guide-button { right: 16px; padding-right: 12px; }
  .guide-button-eyebrow { display: none; }
}
@media (max-width: 760px) {
  :root { --nav-height: calc(76px + var(--safe-bottom)); --sheet-height: min(42dvh, 48%); --type-h1: 25px; }
  body { padding: 0; gap: 0; }
  .site-header { grid-template-columns: minmax(0, 1fr) auto; min-height: calc(72px + var(--safe-top)); gap: 6px; padding: var(--safe-top) max(12px, var(--safe-right)) 0 max(12px, var(--safe-left)); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--paper); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .brand { gap: 6px; max-width: none; }
  .brand-symbol { width: 30px; height: 38px; }
  .brand-copy strong { font-size: clamp(15px, 4.2vw, 18px); letter-spacing: -.6px; }
  .brand-copy > span { font-size: 10px; }
  .header-actions { gap: 4px; }
  .icon-button { width: 44px; height: 44px; border-color: transparent; background: transparent; }
  .auth-button { gap: 5px; max-width: 92px; min-height: 44px; padding: 5px 9px; font-size: var(--type-caption); }
  .auth-button:has(.auth-avatar) { padding-left: 5px; }
  .auth-avatar { width: 28px; height: 28px; }
  .auth-login { max-width: 44px; }
  .main-nav { position: fixed; inset: auto 0 0; display: flex; align-items: stretch; justify-content: space-around; min-height: var(--nav-height); padding: 7px max(12px, var(--safe-right)) calc(7px + var(--safe-bottom)) max(12px, var(--safe-left)); gap: 5px; margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: var(--paper); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav-button { flex: 1; max-width: 150px; min-height: 56px; flex-direction: column; gap: 3px; margin: 0; padding: 7px 10px; border: 1px solid transparent; border-radius: var(--radius-md); font-size: 11px; line-height: 1.4; color: var(--muted); }
  .nav-button svg { width: 22px; height: 22px; }
  .nav-button.is-active, .nav-button[aria-pressed="true"] { border-color: transparent; color: var(--forest); background: var(--mint); box-shadow: none; }
  .app-shell { display: block; margin: 0 0 var(--nav-height); padding: 0; gap: 0; background: var(--sea); }
  .app-shell:has(#journey-progress:not([hidden])) { --sheet-height: min(30dvh, 36%); }
  .map-stage { position: absolute; inset: 0; border: 0; border-radius: 0; box-shadow: none; }
  .sidebar { height: var(--sheet-height); bottom: 0; left: 0; right: 0; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; background: var(--paper); box-shadow: 0 -8px 32px #20392e12; transition: height var(--motion-surface) var(--surface-ease); }
  .sidebar.is-collapsed, .app-shell.is-sheet-collapsed .sidebar { height: 56px; }
  .sheet-toggle { min-height: 56px; padding: 18px 20px 8px; border-radius: var(--radius-xl) var(--radius-xl) 0 0; color: var(--forest); background: var(--paper); }
  .sheet-handle { top: 8px; width: 36px; height: 4px; background: var(--line-strong); }
  .sheet-toggle-label { font-size: 13px; }
  .sheet-chevron { color: var(--forest); }
  .sidebar-scroll { padding: var(--space-2) max(16px, var(--safe-right)) var(--space-6) max(16px, var(--safe-left)); }
  .sidebar-scroll > section + section, .sidebar-scroll > section + details, .sidebar-scroll > details + section { margin-top: var(--space-4); padding-top: var(--space-4); }
  .intro-section > .eyebrow, .intro-section h1, .intro-copy { display: none; }
  .first-time-button { min-height: 44px; margin: 0; }
  .search-field { height: 48px; }
  .search-field input { font-size: 16px; }
  .category-button { min-height: 44px; padding-inline: 10px; }
  .section-heading h2 { font-size: 17px; }
  .place-card .place-open { grid-template-columns: 72px minmax(0, 1fr); padding: var(--space-3); }
  .place-title { font-size: 16px; }
  .place-thumb { width: 72px; height: 72px; }
  .quest-guide { width: 76px; height: 96px; }
  .map-topline { top: 16px; left: max(12px, var(--safe-left)); right: max(84px, calc(var(--safe-right) + 72px)); }
  .district-badge { min-height: 40px; padding: 9px 12px; }
  .map-caption { display: none; }
  .map-controls { top: 80px; right: max(12px, var(--safe-right)); padding: 5px; }
  .map-controls button { width: 44px; height: 44px; }
  .control-divider { height: auto; width: 28px; margin: 4px 0; border-left: 0; border-top: 1px solid var(--line); }
  .guide-button { top: 12px; right: max(12px, var(--safe-right)); bottom: auto; width: 52px; height: 52px; min-height: 52px; max-width: 52px; padding: 3px; border-radius: var(--radius-md); }
  .guide-button img { width: 44px; height: 46px; }
  .guide-button > span { display: none; }
  .map-context { top: 72px; bottom: auto; left: max(12px, var(--safe-left)); right: max(84px, calc(var(--safe-right) + 72px)); max-height: max(0px, calc(100% - var(--sheet-height) - 124px)); }
  .sidebar.is-collapsed ~ .map-stage .map-context, .app-shell.is-sheet-collapsed .map-context { max-height: max(0px, calc(100% - 176px)); }
  .map-context:has(#journey-progress:not([hidden])) > .map-messages { max-height: 70px; }
  .selected-place { padding: var(--space-3); gap: var(--space-2); }
  .selected-copy h2 { font-size: var(--type-body); }
  .selected-place .primary-button { min-height: 44px; padding: 10px 12px; font-size: var(--type-caption); }
  .selected-close { top: 3px; right: 3px; }
  #journey-progress .journey-card { padding: var(--space-3); gap: var(--space-2); }
  #journey-progress .journey-heading h3 { font-size: 16px; }
  #journey-progress .journey-actions > button, #journey-progress .journey-actions > a { min-height: 44px; padding: 9px; font-size: var(--type-caption); }
  #journey-progress .journey-checklist { max-height: 140px; }
  /* The current stop is named in the progress card; keep its numbered pin clear. */
  .app-shell:has(#journey-progress:not([hidden])) .map-marker-label { display: none; }
  .maplibregl-ctrl-bottom-right { right: var(--safe-right); bottom: calc(var(--sheet-height) + 8px); }
  .sidebar.is-collapsed ~ .map-stage .maplibregl-ctrl-bottom-right, .app-shell.is-sheet-collapsed .maplibregl-ctrl-bottom-right { bottom: 64px; }
  .content-dialog, .content-dialog.route-dialog { --dialog-max-height: calc(100dvh - 8px - var(--safe-top)); --dialog-footer: max(24px, var(--safe-bottom)); width: 100%; max-width: 100%; max-height: var(--dialog-max-height); margin: auto 0 0; padding: 64px max(20px, var(--safe-right)) var(--dialog-footer) max(20px, var(--safe-left)); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
  .content-dialog h2, .detail-heading h2 { font-size: var(--type-h1); }
  .content-dialog h3 { font-size: 17px; }
  .content-dialog p { font-size: var(--type-body); }
  .content-dialog .intent-grid { grid-template-columns: minmax(0, 1fr); }
  .intent-button { min-height: 56px; flex-direction: row-reverse; justify-content: space-between; text-align: left; }
  .content-dialog .svoi-mascot-panel, .content-dialog.vlada-ob-dialog .svoi-mascot-panel { grid-template-columns: 86px minmax(0, 1fr); gap: var(--space-4); }
  .content-dialog .svoi-mascot-panel .svoi-mascot-figure { height: 128px; }
  .content-dialog .svoi-mascot-title { font-size: 24px; }
  .content-dialog .vlada-ob-inline .svoi-mascot-panel { grid-template-columns: 56px minmax(0, 1fr); gap: var(--space-3); }
  .content-dialog .vlada-ob-inline .svoi-mascot-panel .svoi-mascot-figure { height: 76px; }
  .vlada-ob-inline .svoi-mascot-panel .svoi-mascot-title { font-size: 17px; }
  .walk-stop { grid-template-columns: 28px 44px minmax(0, 1fr) 16px; gap: var(--space-2); font-size: 13px; }
  .walk-thumb { width: 44px; height: 48px; }
  .avatar-grid { gap: var(--space-2); }
  .avatar-tile { padding: var(--space-3) 6px; }
  .avatar-tile img { width: 68px; height: 68px; }
  .avatar-name { font-size: var(--type-caption); }
  .avatar-state { font-size: 11px; }
  .route-stop-head { grid-template-columns: 28px minmax(0, 1fr); }
  .route-stop-actions { grid-column: 2; justify-self: start; }
  .route-start, .route-stop { padding: var(--space-4); }
  .route-start-actions > button { min-height: 44px; }
  .practical-guides-view .practical-guides-card { padding: var(--space-4); }
  .toast { bottom: calc(var(--nav-height) + 12px); }
}
@media (max-width: 359px) {
  .site-header { padding-inline: 8px; }
  .brand-copy > span { display: none; }
  .brand-symbol { width: 26px; }
  .auth-login { max-width: 30px; }
  .auth-button { max-width: 76px; }
  .content-dialog .svoi-mascot-panel, .content-dialog.vlada-ob-dialog .svoi-mascot-panel { grid-template-columns: 64px minmax(0, 1fr); gap: var(--space-3); }
  .content-dialog .svoi-mascot-panel .svoi-mascot-figure { height: 104px; }
  .content-dialog .svoi-mascot-title { font-size: 22px; }
}
@media (prefers-reduced-transparency: reduce) {
  .sidebar, .content-dialog, .district-badge, .map-controls, .selected-place, .guide-button, .map-status, .site-header, .main-nav { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .place-card:hover, .walk-stop:hover, .intent-button:hover, .guide-button:hover, .primary-button:active, .secondary-button:active, .icon-button:active { transform: none; }
}
