:root {
  color-scheme: light;
  --navy-950: #eef7f6;
  --navy-900: #ffffff;
  --navy-850: #e2f2f1;
  --glass: rgba(255, 255, 255, .88);
  --glass-strong: rgba(255, 255, 255, .97);
  --line: rgba(25, 96, 112, .18);
  --cyan: #067e94;
  --cyan-strong: #009bb2;
  --cyan-soft: rgba(0, 155, 178, .10);
  --yellow: #eabf2f;
  --cream: #17313b;
  --text: #17313b;
  --muted: #617c84;
  --danger: #c9512b;
  --success: #167a5d;
  --radius: 18px;
  font-family: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  min-width: 320px;
  background:
    linear-gradient(112deg, rgba(250,253,251,.965) 0%, rgba(241,249,247,.94) 52%, rgba(250,252,246,.90) 100%),
    url("assets/tourism-bg.jpg") center/cover fixed;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .55;
  background-image:
    linear-gradient(rgba(6,126,148,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6,126,148,.055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 42%, black, transparent 86%);
}
button, select, input { font: inherit; }
button { color: inherit; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
button, select, input[type="range"], label:has(input) { cursor: pointer; }
svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: fixed; width: 0; height: 0; overflow: hidden; }

.app-shell { min-height: 100dvh; display: grid; grid-template-rows: 72px 1fr 34px; position: relative; z-index: 1; }
.topbar {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) 1fr minmax(260px, .8fr);
  align-items: center;
  gap: 24px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(3,17,29,.82);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(245,201,74,.55); color: var(--yellow); box-shadow: inset 0 0 0 4px rgba(245,201,74,.05), 0 0 22px rgba(245,201,74,.08); }
.brand-mark svg { width: 27px; height: 27px; }
.brand strong { font-family: "Unbounded", sans-serif; font-size: 1.04rem; letter-spacing: -.04em; }
.brand span { font-family: "Unbounded", sans-serif; color: var(--yellow); font-size: 1.04rem; margin-left: 3px; }
.brand small { display: block; color: var(--muted); font-size: .58rem; letter-spacing: .2em; margin-top: 2px; }
.system-line { display: flex; justify-content: center; align-items: center; gap: 9px; color: #b7d0d6; font-size: .76rem; letter-spacing: .04em; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(116,224,189,.08), 0 0 10px var(--success); }
.coord { padding-left: 12px; margin-left: 5px; border-left: 1px solid var(--line); color: #698d99; }
.top-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.ghost-button, .icon-button { border: 1px solid var(--line); background: rgba(255,255,255,.025); border-radius: 10px; padding: 9px 12px; display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; }
.ghost-button:hover, .icon-button:hover { background: var(--cyan-soft); border-color: rgba(95,227,239,.35); }
.lang-chip { font-size: .7rem; letter-spacing: .12em; color: var(--yellow); border: 1px solid rgba(245,201,74,.32); padding: 9px 10px; border-radius: 9px; }

.workspace { display: grid; grid-template-columns: minmax(300px, 22vw) minmax(430px, 1fr) minmax(315px, 24vw); min-height: 0; }
.glass-panel { background: var(--glass); backdrop-filter: blur(22px); min-width: 0; }
.planner-panel { border-right: 1px solid var(--line); padding: 21px 20px 18px; overflow-y: auto; }
.passport-panel { border-left: 1px solid var(--line); padding: 21px 20px 18px; overflow-y: auto; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.panel-heading h1, .panel-heading h2 { margin: 5px 0 0; line-height: 1.13; font-size: 1.22rem; letter-spacing: -.035em; }
.eyebrow { color: var(--cyan); font-weight: 700; font-size: .63rem; letter-spacing: .16em; }
.step-status { color: var(--yellow); border: 1px solid rgba(245,201,74,.3); background: rgba(245,201,74,.07); font: 700 .72rem "Unbounded", sans-serif; padding: 8px 9px; border-radius: 10px; }
.icon-button { padding: 9px; }

.field-block { display: block; padding: 14px 0; border-top: 1px solid rgba(135,210,225,.1); }
.field-block:first-of-type { border-top: 0; padding-top: 4px; }
.field-block label, .field-block legend { width: 100%; padding: 0; display: flex; justify-content: space-between; align-items: baseline; color: #cce0e4; border: 0; font-size: .78rem; font-weight: 700; margin-bottom: 8px; }
.field-block label em, .field-block legend em { color: #5f818d; font-style: normal; font-weight: 500; font-size: .65rem; }
.input-wrap { height: 42px; border: 1px solid rgba(135,210,225,.2); background: rgba(1,14,24,.46); border-radius: 11px; display: flex; align-items: center; padding: 0 11px; gap: 8px; }
.input-wrap:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(95,227,239,.08); }
.input-wrap svg { color: var(--cyan); }
select { width: 100%; min-width: 0; border: 0; color: var(--text); background: transparent; outline: 0; font-size: .83rem; }
select option { color: #082033; background: white; }
.text-button { border: 0; background: none; color: var(--cyan); font-size: .68rem; display: inline-flex; gap: 5px; align-items: center; padding: 8px 0 0; }
.text-button:hover { color: #b5f8ff; }
.split-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.range-value { display: flex; justify-content: space-between; align-items: baseline; min-height: 28px; gap: 8px; }
.range-value strong { font-size: .94rem; color: var(--cream); }
.range-value span { color: var(--muted); font-size: .64rem; }
input[type="range"] { width: 100%; height: 3px; appearance: none; border-radius: 8px; background: linear-gradient(90deg, var(--yellow) var(--range-fill, 22%), rgba(255,255,255,.12) var(--range-fill, 22%)); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 15px; height: 15px; border-radius: 50%; background: var(--yellow); border: 3px solid #2b3032; box-shadow: 0 0 0 2px rgba(245,201,74,.3); }
fieldset { margin: 0; min-width: 0; border: 0; padding: 0; }
.interest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.interest-grid label { margin: 0; }
.interest-grid input, .transport-row input { position: absolute; opacity: 0; pointer-events: none; }
.interest-grid span { width: 100%; min-height: 39px; display: flex; justify-content: flex-start; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid rgba(135,210,225,.15); background: rgba(1,14,24,.34); border-radius: 10px; color: #8eabb4; font-size: .72rem; }
.interest-grid span svg { color: #7598a3; }
.interest-grid input:checked + span { color: var(--cream); border-color: rgba(245,201,74,.42); background: rgba(245,201,74,.08); box-shadow: inset 3px 0 var(--yellow); }
.interest-grid input:checked + span svg { color: var(--yellow); }
.season-transport { align-items: end; }
.season-transport .field-block { padding: 0; }
.input-wrap.compact { height: 38px; }
.season-icon { color: var(--yellow); }
.transport-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.transport-row label { margin: 0; }
.transport-row span { width: 100%; height: 38px; display: grid; place-items: center; border: 1px solid rgba(135,210,225,.15); background: rgba(1,14,24,.34); border-radius: 9px; color: #7598a3; font-size: .61rem; font-weight: 800; }
.transport-row input:checked + span { color: #061929; background: var(--yellow); border-color: var(--yellow); }

.algorithm-card { padding: 12px; margin-top: 8px; border-radius: 12px; border: 1px solid rgba(95,227,239,.2); background: linear-gradient(120deg, rgba(95,227,239,.09), rgba(95,227,239,.025)); }
.algo-top { display: flex; align-items: center; justify-content: space-between; font-size: .73rem; font-weight: 800; }
.algo-top span { color: var(--cyan); display: flex; align-items: center; gap: 6px; }
.algo-top small { color: #6c909b; }
.factor-line { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 9px 0 7px; }
.factor-line i { height: 3px; background: var(--cyan); border-radius: 4px; opacity: .65; }
.factor-line i.main { background: var(--yellow); opacity: 1; }
.algorithm-card p { margin: 0; font-size: .64rem; color: var(--muted); }
.form-actions { display: grid; grid-template-columns: .6fr 1.4fr; gap: 8px; margin-top: 13px; }
.secondary-button, .primary-button, .passport-export { min-height: 42px; border-radius: 11px; border: 1px solid var(--line); font-weight: 800; font-size: .74rem; }
.secondary-button { background: rgba(255,255,255,.02); color: #8eabb4; }
.secondary-button:hover { color: white; background: rgba(255,255,255,.06); }
.primary-button { border-color: var(--yellow); background: var(--yellow); color: #102131; display: flex; justify-content: center; align-items: center; gap: 7px; box-shadow: 0 7px 22px rgba(245,201,74,.14); }
.primary-button:hover { background: #ffdb68; transform: translateY(-1px); }
.primary-button.loading svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.map-panel { min-width: 0; min-height: 0; position: relative; overflow: hidden; background: radial-gradient(circle at 55% 45%, rgba(32,191,212,.08), transparent 45%), #061725; }
.map-toolbar { position: absolute; z-index: 5; left: 18px; right: 18px; top: 16px; display: flex; justify-content: space-between; align-items: center; padding: 11px 12px 11px 15px; }
.glass-strip { background: rgba(5,23,36,.75); border: 1px solid rgba(135,210,225,.19); border-radius: 13px; backdrop-filter: blur(16px); box-shadow: 0 14px 40px rgba(0,0,0,.18); }
.map-toolbar strong { display: block; font-size: .8rem; margin-top: 3px; }
.map-switch { display: flex; padding: 3px; background: rgba(0,0,0,.18); border-radius: 9px; }
.map-switch button { border: 0; background: transparent; color: #73939e; padding: 7px 10px; border-radius: 7px; font-size: .66rem; font-weight: 700; }
.map-switch button.active { background: rgba(95,227,239,.14); color: var(--cyan); }
.map-canvas { width: 100%; height: 100%; min-height: 660px; position: relative; overflow: hidden; }
#smartMap { width: 100%; height: 100%; min-height: 660px; touch-action: none; user-select: none; background: radial-gradient(circle at center, rgba(9,42,60,.7), rgba(2,15,25,.92)); }
#mapViewport { transform-origin: 500px 320px; transition: transform .18s ease-out; }
#smartMap.dragging #mapViewport { transition: none; }
.country-shadow { fill: none; stroke: rgba(95,227,239,.12); stroke-width: 24; filter: url(#glow); }
.country { fill: rgba(13,48,66,.55); stroke: rgba(95,227,239,.52); stroke-width: 2; }
.contours path { stroke: rgba(95,227,239,.13); stroke-width: 1.2; stroke-dasharray: 5 8; }
.country-label { fill: rgba(151,213,222,.08); font: 700 44px "Unbounded", sans-serif; letter-spacing: .14em; }
.map-marker { cursor: pointer; transition: opacity .2s; }
.map-marker .halo { fill: currentColor; opacity: .12; }
.map-marker .pin { fill: #082033; stroke: currentColor; stroke-width: 2; }
.map-marker .core { fill: currentColor; }
.map-marker text { fill: #d6e9ec; font: 600 12px "Manrope", sans-serif; paint-order: stroke; stroke: #061725; stroke-width: 4px; stroke-linejoin: round; }
.map-marker.selected .halo { opacity: .28; animation: markerPulse 1.8s ease-out infinite; }
.map-marker.selected .pin { fill: currentColor; }
.map-marker.selected .core { fill: #061725; }
.map-marker.dimmed { opacity: .2; }
@keyframes markerPulse { 0% { transform: scale(.6); opacity: .4; } 100% { transform: scale(1.55); opacity: 0; } }
.route-shadow { fill: none; stroke: rgba(0,0,0,.55); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.route-line { fill: none; stroke: var(--cyan); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 10 7; filter: url(#glow); animation: routeFlow 16s linear infinite; }
@keyframes routeFlow { to { stroke-dashoffset: -170; } }
.start-marker { fill: var(--yellow); stroke: #061725; stroke-width: 3; }
.start-pulse { fill: none; stroke: var(--yellow); stroke-width: 2; opacity: .65; animation: markerPulse 1.8s infinite; transform-origin: center; }
.map-controls { position: absolute; z-index: 6; right: 18px; top: 92px; display: grid; gap: 6px; }
.map-controls button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: rgba(5,23,36,.82); color: var(--cyan); font-size: 1rem; backdrop-filter: blur(10px); }
.map-controls button:hover { background: rgba(95,227,239,.12); }
.north-compass { position: absolute; left: 22px; top: 91px; z-index: 4; color: rgba(245,201,74,.64); display: grid; justify-items: center; font-size: .62rem; letter-spacing: .18em; }
.north-compass svg { width: 38px; height: 38px; margin-top: 3px; }
.macro-dock { position: absolute; z-index: 6; left: 18px; right: 18px; bottom: 16px; display: grid; grid-template-columns: repeat(6, 1fr); overflow: hidden; }
.macro-dock button { min-width: 0; border: 0; border-right: 1px solid rgba(135,210,225,.12); background: transparent; padding: 10px 8px; text-align: left; position: relative; }
.macro-dock button:last-child { border-right: 0; }
.macro-dock button:hover { background: rgba(255,255,255,.035); }
.macro-dock button.active { background: rgba(95,227,239,.1); box-shadow: inset 0 2px var(--yellow); }
.macro-dock b, .macro-dock small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.macro-dock b { font-size: .65rem; color: #c8dee2; margin: 4px 0 2px; }
.macro-dock small { font-size: .56rem; color: #6d909b; }
.macro-dot { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--cyan)); box-shadow: 0 0 10px var(--dot, var(--cyan)); }
.macro-dot.smart { --dot: var(--yellow); }.macro-dot.west { --dot: #4ce0bd; }.macro-dot.east { --dot: #9f8cff; }.macro-dot.central { --dot: #5fe3ef; }.macro-dot.south { --dot: #ff9f75; }.macro-dot.zhetysu { --dot: #f5c94a; }
.map-tooltip { position: absolute; z-index: 8; left: 22px; top: 148px; width: min(250px, calc(100% - 80px)); padding: 13px; }
.map-tooltip button { position: absolute; right: 7px; top: 7px; border: 0; background: transparent; color: #7798a3; }
.map-tooltip .tooltip-category { display: block; color: var(--cyan); font-size: .58rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 5px; }
.map-tooltip strong { display: block; padding-right: 24px; font-size: .86rem; }
.tooltip-meta { display: flex; gap: 12px; margin: 8px 0 5px; color: var(--cream); font-size: .68rem; }
.map-tooltip small { color: #6f919c; font-size: .6rem; }
.yandex-view { position: absolute; inset: 0; background: #e5e5e5; }
.yandex-view iframe { border: 0; width: 100%; height: 100%; }
.yandex-route-link { position: absolute; z-index: 4; right: 70px; bottom: 91px; display: flex; align-items: center; gap: 8px; color: #13212d; background: var(--yellow); text-decoration: none; padding: 11px 14px; border-radius: 10px; font-size: .7rem; font-weight: 800; box-shadow: 0 10px 25px rgba(0,0,0,.22); }

.match-card { display: grid; grid-template-columns: 88px 1fr; align-items: center; gap: 14px; padding: 13px; border-radius: 14px; border: 1px solid rgba(95,227,239,.2); background: radial-gradient(circle at 16% 50%, rgba(95,227,239,.13), transparent 45%), rgba(1,14,24,.32); }
.score-ring { --score: 0; width: 82px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--yellow) calc(var(--score) * 1%), rgba(255,255,255,.08) 0); position: relative; }
.score-ring::before { content: ""; position: absolute; inset: 7px; border-radius: inherit; background: #092234; }
.score-ring > div { position: relative; z-index: 1; text-align: center; }
.score-ring strong { font: 700 1.3rem "Unbounded", sans-serif; color: var(--cream); }
.score-ring span { display: block; font-size: .54rem; color: var(--muted); margin-top: 2px; }
.match-text span { color: var(--cyan); font-size: .6rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.match-text strong { display: block; font-size: .86rem; line-height: 1.35; margin: 5px 0 7px; }
.match-text small { display: inline-block; color: var(--yellow); font-size: .54rem; letter-spacing: .1em; border: 1px solid rgba(245,201,74,.23); border-radius: 5px; padding: 4px 6px; }
.passport-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 11px 0 14px; }
.passport-stats div { padding: 10px; min-height: 66px; position: relative; border: 1px solid rgba(135,210,225,.11); border-radius: 11px; background: rgba(1,14,24,.27); }
.passport-stats svg { color: #5c8996; position: absolute; right: 9px; top: 9px; }
.passport-stats span { display: block; color: #74949e; font-size: .58rem; }
.passport-stats strong { display: block; color: var(--cream); margin-top: 10px; font-size: .82rem; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.section-title span { font-size: .75rem; font-weight: 800; }
.section-title small { color: var(--muted); font-size: .58rem; }
.itinerary { list-style: none; padding: 0; margin: 0; max-height: 250px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(95,227,239,.2) transparent; }
.itinerary li { position: relative; display: grid; grid-template-columns: 27px 1fr auto; gap: 8px; padding: 8px 0; align-items: center; }
.itinerary li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 34px; width: 1px; height: 14px; background: rgba(95,227,239,.24); }
.stop-number { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: rgba(95,227,239,.1); border: 1px solid rgba(95,227,239,.3); color: var(--cyan); font-size: .62rem; font-weight: 800; }
.itinerary li:first-child .stop-number { border-color: var(--yellow); color: var(--yellow); }
.stop-info strong, .stop-info span { display: block; }
.stop-info strong { font-size: .69rem; color: #d7e8ea; }
.stop-info span { color: #6e909b; font-size: .57rem; margin-top: 2px; }
.stop-time { color: var(--cream); font-size: .58rem; white-space: nowrap; }
.itinerary .empty-result { display: block; color: var(--muted); font-size: .68rem; text-align: center; padding: 24px 0; }
.passport-note { display: grid; grid-template-columns: 26px 1fr; gap: 9px; align-items: start; margin-top: 9px; padding: 10px; border-radius: 10px; }
.passport-note > span, .passport-note > svg { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.passport-note p { margin: 0; }
.passport-note strong, .passport-note em { display: block; }
.passport-note strong { font-size: .64rem; margin-bottom: 3px; }
.passport-note em { color: #92adb5; font-style: normal; font-size: .58rem; line-height: 1.45; }
.season-note { background: rgba(245,201,74,.07); border: 1px solid rgba(245,201,74,.15); }
.season-note > span { color: #142334; background: var(--yellow); font-size: .72rem; font-weight: 900; }
.season-note.warning { background: rgba(255,159,117,.08); border-color: rgba(255,159,117,.2); }
.season-note.warning > span { background: var(--danger); }
.reason-note { background: rgba(95,227,239,.055); border: 1px solid rgba(95,227,239,.13); }
.reason-note > svg { color: var(--cyan); padding: 3px; }
.passport-export { width: 100%; margin-top: 11px; background: transparent; color: var(--cyan); border-color: rgba(95,227,239,.3); display: flex; justify-content: center; align-items: center; gap: 7px; }
.passport-export:hover { background: var(--cyan-soft); }
.data-note { color: #577681; font-size: .54rem; text-align: center; line-height: 1.5; margin: 8px 0 0; }
.statusbar { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-top: 1px solid var(--line); background: rgba(3,17,29,.92); color: #5d7d88; font-size: .58rem; letter-spacing: .07em; }
.statusbar span:first-child { display: flex; align-items: center; gap: 7px; }
.statusbar i { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }
.mobile-tabs { display: none; }

dialog { width: min(620px, calc(100vw - 28px)); border: 1px solid rgba(95,227,239,.23); border-radius: 18px; color: var(--text); background: rgba(5,23,36,.97); box-shadow: 0 30px 90px rgba(0,0,0,.55); padding: 23px; }
dialog::backdrop { background: rgba(0,8,14,.74); backdrop-filter: blur(5px); }
.dialog-head { display: flex; justify-content: space-between; gap: 20px; }
.dialog-head h2 { margin: 5px 0 18px; font-size: 1.25rem; }
.dialog-head button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: transparent; }
.guide-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.guide-steps article { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid rgba(135,210,225,.12); background: rgba(1,14,24,.35); }
.guide-steps article > span { color: var(--yellow); font: 700 .7rem "Unbounded", sans-serif; }
.guide-steps strong { font-size: .73rem; }
.guide-steps p { margin: 4px 0 0; color: var(--muted); font-size: .66rem; line-height: 1.5; }
.algo-explainer { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--cyan-soft); }
.algo-explainer strong { color: var(--cyan); font-size: .74rem; }
.algo-explainer p { margin: 5px 0 0; font-size: .67rem; line-height: 1.5; color: #a8c3ca; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 48px; transform: translate(-50%, 18px); color: #082033; background: var(--cream); padding: 10px 14px; border-radius: 10px; font-size: .7rem; font-weight: 800; opacity: 0; pointer-events: none; transition: .22s ease; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Light cartographic edition */
.topbar, .statusbar { background: rgba(255,255,255,.88); box-shadow: 0 8px 30px rgba(31,80,88,.06); }
.brand-mark { background: #fffaf0; color: #b88700; border-color: rgba(184,135,0,.35); box-shadow: inset 0 0 0 4px rgba(234,191,47,.1); }
.brand span, .step-status, .lang-chip { color: #a87700; }
.brand small, .system-line, .coord { color: #68838b; }
.pulse { background: #1b9b77; box-shadow: 0 0 0 5px rgba(27,155,119,.10), 0 0 10px rgba(27,155,119,.35); }
.glass-panel { background: rgba(255,255,255,.87); }
.planner-panel, .passport-panel { box-shadow: 0 16px 50px rgba(31,80,88,.08); }
.panel-heading h1, .panel-heading h2 { color: #17313b; }
.ghost-button, .icon-button { background: rgba(255,255,255,.78); }
.field-block { border-color: rgba(25,96,112,.12); }
.field-block label, .field-block legend { color: #264953; font-size: .82rem; }
.field-block label em, .field-block legend em { color: #718b92; font-size: .72rem; }
.input-wrap { background: rgba(250,253,252,.94); border-color: rgba(25,96,112,.23); }
select { color: #17313b; }
.range-value strong { color: #17313b; }
input[type="range"] { background: linear-gradient(90deg, #d4a900 var(--range-fill, 22%), rgba(23,49,59,.15) var(--range-fill, 22%)); }
input[type="range"]::-webkit-slider-thumb { background: #edc43a; border-color: white; }
.interest-grid span, .transport-row span { background: rgba(249,252,251,.92); border-color: rgba(25,96,112,.18); color: #54737c; }
.interest-grid input:checked + span { color: #17313b; background: rgba(234,191,47,.15); border-color: rgba(184,135,0,.45); box-shadow: inset 3px 0 #d4a900; }
.transport-row input:checked + span { color: #17313b; background: #edc43a; border-color: #d4a900; }
.algorithm-card { background: linear-gradient(120deg, rgba(0,155,178,.10), rgba(255,255,255,.6)); border-color: rgba(0,126,148,.22); }
.secondary-button { background: white; color: #607d85; }
.primary-button { color: #17313b; background: #edc43a; border-color: #d4a900; }
.primary-button:hover { background: #f4d45a; }

.map-panel { background: radial-gradient(circle at 52% 46%, #ffffff, #e7f3f2 72%); }
#smartMap { background: radial-gradient(circle at center, #ffffff, #e6f3f2); }
.map-paper { fill: rgba(255,255,255,.92); stroke: rgba(20,112,126,.18); stroke-width: 1.5; filter: drop-shadow(0 14px 24px rgba(27,82,89,.12)); }
#kazakhstanBase { opacity: .94; }
.map-credit { fill: #67838a; font: 600 10px "Manrope", sans-serif; letter-spacing: .04em; }
.map-toolbar, .macro-dock, .map-tooltip { background: rgba(255,255,255,.87); border-color: rgba(25,96,112,.18); box-shadow: 0 14px 40px rgba(31,80,88,.10); }
.map-switch { background: rgba(6,126,148,.07); }
.map-switch button { color: #5f7c84; }
.map-switch button.active { background: #dff3f3; color: #076e82; box-shadow: 0 2px 8px rgba(15,97,111,.08); }
.map-controls button { background: rgba(255,255,255,.94); color: #076e82; box-shadow: 0 5px 16px rgba(31,80,88,.09); }
.north-compass { color: #a97e00; }
.macro-dock button { border-color: rgba(25,96,112,.12); }
.macro-dock button.active { background: rgba(234,191,47,.12); }
.macro-dock b { color: #244852; font-size: .71rem; }
.macro-dock small { color: #6c858d; font-size: .63rem; }
.map-marker .pin { fill: white; }
.map-marker text { fill: #183943; stroke: rgba(255,255,255,.96); stroke-width: 5px; font-size: 12.5px; }
.map-marker.selected .core { fill: white; }
.route-shadow { stroke: rgba(255,255,255,.92); stroke-width: 9; }
.route-line { stroke: #009bb2; filter: drop-shadow(0 1px 3px rgba(0,126,148,.45)); }
.start-marker { fill: #edc43a; stroke: white; }
.start-pulse { stroke: #c89d0c; }
.map-tooltip .tooltip-category { color: #067e94; }
.tooltip-meta { color: #17313b; }
.yandex-route-link { color: #17313b; background: #edc43a; }

.match-card, .passport-stats div { background: rgba(249,252,251,.86); border-color: rgba(25,96,112,.14); }
.score-ring { background: conic-gradient(#e1b526 calc(var(--score) * 1%), rgba(23,49,59,.10) 0); }
.score-ring::before { background: white; }
.score-ring strong, .passport-stats strong { color: #17313b; }
.itinerary li:not(:last-child)::after { background: rgba(6,126,148,.28); }
.stop-number { background: #e4f4f3; border-color: rgba(6,126,148,.35); color: #067e94; }
.stop-info strong { color: #24454e; }
.stop-time { color: #17313b; }
.season-note { background: #fff9df; border-color: rgba(187,142,0,.2); }
.reason-note { background: #edf9f8; border-color: rgba(6,126,148,.15); }
.passport-note em { color: #607b83; font-size: .68rem; }
.passport-note strong { font-size: .72rem; }
.data-note { color: #6b858d; font-size: .63rem; }
.statusbar { color: #68838b; }
dialog { color: #17313b; background: rgba(255,255,255,.98); border-color: rgba(6,126,148,.22); }
dialog::backdrop { background: rgba(18,44,50,.40); }
.guide-steps article { background: #f7fbfa; border-color: rgba(25,96,112,.14); }
.guide-steps p, .algo-explainer p { color: #617c84; }
.algo-explainer { background: #e7f6f5; }
.toast { color: white; background: #176e7e; }

.language-switch { display: flex; padding: 3px; border: 1px solid rgba(25,96,112,.18); border-radius: 10px; background: rgba(255,255,255,.72); }
.language-switch button { border: 0; border-radius: 7px; background: transparent; color: #6a858d; padding: 6px 7px; font-size: .64rem; font-weight: 800; }
.language-switch button:hover { color: #076e82; }
.language-switch button.active { background: #173f49; color: white; }

.safety-card { margin-top: 11px; padding: 12px; border: 1px solid rgba(201,81,43,.18); border-radius: 12px; background: #fff8f2; }
.safety-card ul { margin: 0; padding: 0 0 0 17px; color: #576f76; font-size: .7rem; line-height: 1.55; }
.safety-card li + li { margin-top: 4px; }
.safety-card button { width: 100%; margin-top: 9px; padding: 8px 0 0; display: flex; justify-content: space-between; align-items: center; border: 0; border-top: 1px solid rgba(201,81,43,.13); background: transparent; color: #a34325; font-size: .68rem; font-weight: 800; }
.safety-alert { padding: 13px; border-radius: 12px; background: #fff3ea; border: 1px solid rgba(201,81,43,.2); }
.safety-alert strong { color: #9e3d20; font-size: .85rem; }
.safety-alert p { margin: 5px 0 0; color: #627a81; font-size: .75rem; line-height: 1.5; }
.safety-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; list-style: none; counter-reset: safety; padding: 0; margin: 12px 0; }
.safety-rules li { counter-increment: safety; padding: 11px; border: 1px solid rgba(25,96,112,.13); background: #f7fbfa; border-radius: 11px; color: #4d6971; font-size: .72rem; line-height: 1.5; }
.safety-rules li::before { content: counter(safety, decimal-leading-zero); display: block; color: #067e94; font: 700 .66rem "Unbounded", sans-serif; margin-bottom: 4px; }
.safety-disclaimer { margin: 0; color: #6b838a; font-size: .66rem; line-height: 1.55; }

@media (max-width: 1180px) {
  .workspace { grid-template-columns: minmax(280px, 31vw) 1fr; }
  .passport-panel { position: fixed; z-index: 15; right: 10px; top: 84px; bottom: 44px; width: min(360px, calc(100vw - 20px)); transform: translateX(calc(100% + 20px)); transition: transform .25s ease; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 70px rgba(0,0,0,.45); }
  .passport-panel.active { transform: translateX(0); }
  .mobile-tabs { display: flex; position: fixed; z-index: 16; right: 17px; bottom: 43px; background: rgba(5,23,36,.93); border: 1px solid var(--line); border-radius: 11px; padding: 4px; box-shadow: 0 12px 30px rgba(0,0,0,.3); }
  .mobile-tabs button { border: 0; background: transparent; color: var(--muted); font-size: .62rem; padding: 7px 9px; border-radius: 7px; }
  .mobile-tabs button.active { color: #082033; background: var(--yellow); }
  .mobile-tabs button[data-panel="planner"], .mobile-tabs button[data-panel="map"] { display: none; }
}

@media (max-width: 760px) {
  body { background-attachment: scroll; }
  .app-shell { grid-template-rows: 62px 44px 1fr 30px; }
  .topbar { grid-template-columns: 1fr auto; padding: 0 12px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand strong, .brand span { font-size: .89rem; }
  .brand small { font-size: .5rem; }
  .system-line { display: none; }
  .ghost-button span, .lang-chip { display: none; }
  .ghost-button { padding: 9px; }
  .mobile-tabs { position: static; display: grid; grid-template-columns: repeat(3, 1fr); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 5px 12px; background: rgba(3,17,29,.88); box-shadow: none; }
  .mobile-tabs button[data-panel="planner"], .mobile-tabs button[data-panel="map"] { display: block; }
  .mobile-tabs button { font-size: .66rem; }
  .workspace { display: block; min-height: 0; }
  .workspace > [data-panel-name] { display: none; }
  .workspace > [data-panel-name].active { display: block; }
  .planner-panel, .passport-panel { position: static; width: auto; height: calc(100dvh - 136px); overflow-y: auto; border: 0; border-radius: 0; transform: none; padding: 18px 16px 90px; box-shadow: none; }
  .map-panel { height: calc(100dvh - 136px); }
  .map-canvas, #smartMap { min-height: 100%; height: 100%; }
  .map-toolbar { left: 10px; right: 10px; top: 10px; }
  .map-toolbar > div:first-child strong { font-size: .69rem; }
  .map-switch button { padding: 7px; }
  .north-compass { left: 15px; top: 84px; }
  .map-controls { right: 12px; top: 84px; }
  .macro-dock { left: 10px; right: 10px; bottom: 10px; display: flex; overflow-x: auto; scrollbar-width: none; }
  .macro-dock button { flex: 0 0 116px; }
  .map-tooltip { left: 12px; top: 140px; }
  .yandex-route-link { right: 12px; bottom: 88px; }
  .statusbar { padding: 0 12px; }
  .statusbar span:nth-child(2), .statusbar span:nth-child(3) { display: none; }
}

@media (max-width: 430px) {
  .split-row { grid-template-columns: 1fr; gap: 14px; }
  .field-block.split-row > div + div, .season-transport > fieldset { border-top: 1px solid rgba(135,210,225,.1); padding-top: 12px; }
  .interest-grid { gap: 6px; }
  .guide-steps { grid-template-columns: 1fr; }
  .safety-rules { grid-template-columns: 1fr; }
  .passport-stats { grid-template-columns: 1fr 1fr; }
}

@media print {
  body { color: #102131; background: white; }
  body::before, .topbar, .planner-panel, .map-panel, .mobile-tabs, .statusbar, .passport-export, .icon-button { display: none !important; }
  .app-shell, .workspace { display: block; }
  .passport-panel { display: block !important; position: static; width: 100%; transform: none; background: white; border: 0; color: #102131; overflow: visible; }
  .itinerary { max-height: none; overflow: visible; }
  .match-card, .passport-stats div, .passport-note { border-color: #ccd8dc; background: #f5f8f9; }
  .score-ring::before { background: white; }
  .stop-info strong, .passport-stats strong, .score-ring strong { color: #102131; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
