/* Нитка · турклуб «Восхождение». Плоские цвета логотипа, жёсткие контуры и тени — как у печатного плаката. */
:root {
  --navy: #133C6A; --navy-d: #0B2A4D; --sky: #459BD6; --sky-m: #9CCBEB; --sky-l: #D5E9F7; --sky-xl: #EEF6FC;
  --sun: #FEBC0E; --sun-l: #FFE9A6; --orange: #F68A1D; --red: #E2001A; --violet: #7A1AAA; --green: #1E8C4B;
  --ink: #0F2540; --muted: #56677D; --paper: #fff; --line: 2px solid var(--navy);
  --sh: 4px 4px 0 var(--navy); --sh-s: 2px 2px 0 var(--navy); --r: 14px; --r-s: 9px;
  --head: 'Sofia Sans Condensed', 'Arial Narrow', sans-serif; --body: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 15px/1.45 var(--body); color: var(--ink); background: var(--sky-xl); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 800; line-height: 1.02; margin: 0; letter-spacing: .005em; }
a { color: var(--navy); }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
#app { min-height: 100%; }
.boot { height: 100vh; display: grid; place-content: center; justify-items: center; gap: 8px; font: 800 28px var(--head); color: var(--navy); }
.boot img { height: 84px; animation: bob 1s var(--ease) infinite alternate; }
@keyframes bob { to { transform: translateY(-7px) rotate(-2deg); } }

/* ---------- кнопки и поля */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border: var(--line); border-radius: 999px; background: var(--paper);
  font: 700 17px var(--head); letter-spacing: .02em; text-transform: uppercase; color: var(--navy); cursor: pointer; box-shadow: var(--sh-s); transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .15s; text-decoration: none; white-space: nowrap; user-select: none; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--navy); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--navy); }
.btn:focus-visible, .chip:focus-visible, input:focus-visible, select:focus-visible, .row:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.btn.go { background: var(--sun); }
.btn.big { min-height: 54px; font-size: 22px; padding: 0 28px; box-shadow: var(--sh); }
.btn.big:hover { box-shadow: 6px 6px 0 var(--navy); transform: translate(-2px, -2px); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 14.5px; box-shadow: none; }
.btn.sm:hover { background: var(--sky-l); transform: none; box-shadow: none; }
.btn.ghost { border-color: transparent; box-shadow: none; background: transparent; }
.btn.ghost:hover { background: var(--sky-l); transform: none; box-shadow: none; }
.btn.warn { color: #B3001B; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; display: inline-grid; place-items: center; color: var(--navy); flex: none; }
.icon-btn:hover { background: var(--sky-l); }
.icon-btn svg { width: 18px; height: 18px; }
.field { display: grid; gap: 5px; }
.field > span, .lbl { font: 700 13.5px var(--head); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
input[type=text], input[type=date], input[type=number], input[type=tel], input[type=url], select, textarea { width: 100%; min-height: 42px; padding: 8px 12px; border: var(--line); border-radius: var(--r-s); background: var(--paper); transition: box-shadow .12s; }
input:focus, select:focus { box-shadow: 3px 3px 0 var(--sky); outline: none; }
input::placeholder { color: #94A3B5; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: var(--line); border-radius: 999px; background: var(--paper); font: 600 13.5px var(--body); cursor: pointer; transition: background .12s, transform .12s; user-select: none; }
.chip:hover { background: var(--sky-l); }
.chip.on { background: var(--navy); color: #fff; }
.chip .cnt { opacity: .6; font-weight: 500; }
.chip svg { width: 16px; height: 16px; flex: none; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.switch input { appearance: none; width: 40px; height: 24px; border: var(--line); border-radius: 999px; background: var(--paper); position: relative; cursor: pointer; flex: none; transition: background .15s; margin: 0; }
.switch input::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--navy); transition: transform .18s var(--ease); }
.switch input:checked { background: var(--sun); }
.switch input:checked::after { transform: translateX(16px); }
.hint { color: var(--muted); font-size: 13.5px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font: 700 12.5px var(--head); letter-spacing: .05em; text-transform: uppercase; background: var(--sky-l); color: var(--navy); white-space: nowrap; }
.tag.ok { background: #D4F0DE; color: #11602F; } .tag.warn { background: #FFE3C2; color: #8A4300; } .tag.sun { background: var(--sun-l); color: #6B4B00; }

/* ---------- вход */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); background: var(--paper); }
.scene { position: relative; overflow: hidden; background: var(--sky); border-right: var(--line); min-height: 280px; }
.scene svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene .hiker { position: absolute; left: 5%; bottom: 3%; height: min(31%, 270px); animation: walk 1.1s var(--ease) infinite alternate; transform-origin: 50% 100%; filter: drop-shadow(0 6px 0 rgba(19, 60, 106, .12)); }
@keyframes walk { from { transform: translateY(0) rotate(0); } to { transform: translateY(-9px) rotate(-1.6deg); } }
.scene .thread { stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: draw 3.6s .4s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.scene .pop { opacity: 0; transform-box: fill-box; transform-origin: 50% 100%; animation: pop .5s var(--ease) forwards; }
@keyframes pop { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
.scene .cloud { animation: drift 60s linear infinite; }
@keyframes drift { from { transform: translateX(-140px); } to { transform: translateX(900px); } }
.scene .sun { transform-box: fill-box; transform-origin: center; animation: sun 9s ease-in-out infinite alternate; }
@keyframes sun { to { transform: scale(1.06); } }
.login-side { display: grid; align-content: center; padding: clamp(24px, 6vw, 72px); gap: 26px; }
.login-side .club { font: 700 15px var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--sky); }
.login-side h1 { font-size: clamp(64px, 9vw, 112px); color: var(--navy); letter-spacing: -.01em; }
.login-side h1 i { font-style: normal; color: var(--red); }
.login-side .lead { font-size: 18px; max-width: 30em; margin: -10px 0 0; }
.login form { display: grid; gap: 14px; max-width: 420px; }
.login form input { min-height: 54px; font-size: 18px; border-radius: 12px; }
.login .fine { color: var(--muted); font-size: 13.5px; max-width: 34em; }
.how { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: s; max-width: 420px; }
.how li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: baseline; }
.how li::before { content: counter(s); font: 800 16px var(--head); width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; }

/* ---------- шапка */
.top { position: sticky; top: 0; z-index: 900; display: flex; align-items: center; gap: 14px; height: 58px; padding: 0 clamp(12px, 3vw, 28px); background: var(--navy); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 26px var(--head); letter-spacing: .01em; color: #fff; text-decoration: none; cursor: pointer; flex: none; }
.brand .badge { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; }
.brand .badge img { height: 34px; transition: transform .3s var(--ease); }
.brand:hover .badge img { transform: translateY(-2px) rotate(-6deg); }
.top .sp { flex: 1; min-width: 0; }
.top .who { font-weight: 600; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .btn.ghost { color: #fff; } .top .btn.ghost:hover { background: rgba(255, 255, 255, .14); }
.top .icon-btn { color: #fff; } .top .icon-btn:hover { background: rgba(255, 255, 255, .14); }

/* ---------- мои походы */
.home { max-width: 1180px; margin: 0 auto; padding: clamp(20px, 4vw, 44px) clamp(14px, 3vw, 28px) 80px; }
.home-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.home-head h1 { font-size: clamp(40px, 6vw, 64px); color: var(--navy); }
.home-head p { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.card { position: relative; display: grid; grid-template-rows: 150px auto; border: var(--line); border-radius: var(--r); background: var(--paper); box-shadow: var(--sh); overflow: hidden; cursor: pointer; text-align: left; padding: 0;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease); animation: rise .45s var(--ease) backwards; }
.card:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--navy); }
.card:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--navy); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.card .shape { background: var(--sky-l) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='150'%3E%3Cg fill='none' stroke='%23133C6A' stroke-opacity='.13' stroke-width='1.3'%3E%3Cpath d='M-10 120c40-30 70-8 110-28s60-48 130-40'/%3E%3Cpath d='M-10 95c40-30 70-8 110-28s60-48 130-40'/%3E%3Cpath d='M-10 70c40-30 70-8 110-28s60-48 130-40'/%3E%3Cpath d='M-10 145c40-30 70-8 110-28s60-48 130-40'/%3E%3Cpath d='M-10 45c40-30 70-8 110-28s60-48 130-40'/%3E%3C/g%3E%3C/svg%3E"); border-bottom: var(--line); position: relative; }
.card .shape svg { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); overflow: visible; }
.card .shape path { fill: none; stroke: var(--red); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw1 1.4s .2s var(--ease) forwards; }
.card .shape path.b { stroke: var(--violet); }
.card .shape path.under { stroke: #fff; stroke-width: 6.5; animation: none; stroke-dasharray: none; }
@keyframes draw1 { to { stroke-dashoffset: 0; } }
.card .shape .empty { position: absolute; inset: 0; display: grid; place-content: center; color: var(--navy); opacity: .55; font: 700 15px var(--head); letter-spacing: .08em; text-transform: uppercase; }
.card .info { padding: 14px 16px 15px; display: grid; gap: 7px; }
.card h3 { font-size: 27px; color: var(--navy); overflow-wrap: anywhere; }
.card .meta { color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 3px 12px; }
.card .more { position: absolute; top: 8px; right: 8px; background: rgba(255, 255, 255, .9); border: var(--line); z-index: 2; }
.card.new { grid-template-rows: 1fr; place-items: center; min-height: 262px; border-style: dashed; background: transparent; box-shadow: none; color: var(--navy); }
.card.new:hover { background: var(--sun-l); box-shadow: var(--sh); border-style: solid; }
.card.new div { display: grid; justify-items: center; gap: 10px; font: 800 24px var(--head); text-transform: uppercase; letter-spacing: .03em; }
.card.new .plus { width: 62px; height: 62px; border-radius: 50%; background: var(--sun); border: var(--line); display: grid; place-items: center; font-size: 40px; line-height: 0; padding-bottom: 5px; transition: transform .25s var(--ease); }
.card.new:hover .plus { transform: rotate(90deg); }
.menu { position: fixed; z-index: 2000; min-width: 190px; padding: 6px; border: var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--sh); display: grid; animation: rise .14s var(--ease); }
.menu button { text-align: left; padding: 9px 12px; border: 0; background: none; border-radius: 8px; cursor: pointer; font-weight: 500; }
.menu button:hover { background: var(--sky-l); } .menu button.warn { color: #B3001B; }

/* ---------- модалки, тосты */
.veil { position: fixed; inset: 0; z-index: 3000; background: rgba(11, 42, 77, .55); display: grid; place-items: center; padding: 16px; animation: fade .15s; overflow: auto; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(520px, 100%); border: var(--line); border-radius: 18px; background: var(--paper); box-shadow: 8px 8px 0 var(--navy-d); padding: 24px; display: grid; gap: 16px; animation: rise .22s var(--ease); }
.modal h2 { font-size: 34px; color: var(--navy); }
.modal .acts { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
#toasts { position: fixed; z-index: 4000; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: min(560px, calc(100% - 24px)); }
.toast { pointer-events: auto; padding: 11px 16px; border: var(--line); border-radius: 12px; background: var(--navy); color: #fff; font-weight: 500; box-shadow: 4px 4px 0 rgba(11, 42, 77, .35); animation: toast .3s var(--ease); max-width: 100%; }
.toast.err { background: #fff; color: #9A0016; border-color: #B3001B; }
.toast.out { opacity: 0; transform: translateY(8px); transition: .25s; }
@keyframes toast { from { opacity: 0; transform: translateY(16px) scale(.96); } }

/* ---------- редактор */
.ed { height: 100vh; height: 100dvh; display: grid; grid-template-rows: 58px 1fr; }
.ed .top .title { min-width: 60px; max-width: 34vw; background: transparent; border: 2px solid transparent; color: #fff; font: 800 24px var(--head); padding: 2px 8px; min-height: 38px; border-radius: 8px; text-overflow: ellipsis; }
.ed .top .title:hover { border-color: rgba(255, 255, 255, .35); } .ed .top .title:focus { background: #fff; color: var(--navy); box-shadow: none; }
.saved { font-size: 12.5px; opacity: .75; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.saved::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #6BD08E; }
.saved.busy::before { background: var(--sun); animation: pulse .7s infinite alternate; }
.saved.bad::before { background: #FF6B6B; }
@keyframes pulse { to { opacity: .3; } }
.steps { display: flex; align-items: center; gap: 0; height: 100%; }
.step { position: relative; display: flex; align-items: center; gap: 8px; height: 100%; padding: 0 14px 0 6px; border: 0; background: none; color: rgba(255, 255, 255, .72); font: 700 17px var(--head); letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.step .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center; font-size: 15px; transition: background .2s, transform .2s var(--ease); background: var(--navy); position: relative; z-index: 1; }
.step + .step::before { content: ''; position: absolute; left: -16px; top: 50%; width: 24px; border-top: 2px dashed rgba(255, 255, 255, .45); }
.step + .step { margin-left: 12px; }
.step:hover { color: #fff; }
.step.on { color: #fff; } .step.on .dot { background: var(--sun); color: var(--navy); border-color: var(--sun); transform: scale(1.12); }
.step.done .dot { background: #fff; color: var(--navy); border-color: #fff; }
.ed-body { display: grid; grid-template-columns: minmax(360px, 460px) 1fr; min-height: 0; }
.ed-body.wide { grid-template-columns: 1fr; }
.ed-body.wide .mapwrap { display: none; }
.panel { overflow-y: auto; background: var(--paper); border-right: var(--line); padding: 20px 20px 0; display: flex; flex-direction: column; gap: 18px; scroll-behavior: smooth; }
.panel > * { flex: none; animation: rise .28s var(--ease) backwards; }
.panel h2 { font-size: 36px; color: var(--navy); }
.panel h2 + p { margin: -10px 0 0; color: var(--muted); }
.sec { display: grid; gap: 10px; }
.sec > h3 { font-size: 21px; color: var(--navy); text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; gap: 8px; }
.mapwrap { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; background: var(--sky-l); }
.leaflet-container { font-family: var(--body); }
.mapbar { position: absolute; z-index: 800; top: 12px; right: 12px; display: flex; gap: 6px; }
.mapbar .chip { box-shadow: var(--sh-s); }
.maphint { position: absolute; z-index: 800; left: 50%; top: 12px; transform: translateX(-50%); padding: 8px 14px; border: var(--line); border-radius: 999px; background: var(--sun); font-weight: 600; box-shadow: var(--sh-s); animation: rise .2s var(--ease); white-space: nowrap; }
.pm { display: grid; place-items: center; transition: transform .15s var(--ease); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
.pm svg { width: 20px; height: 20px; }
.pm.sel { transform: scale(1.55); z-index: 1000 !important; filter: drop-shadow(0 0 0 #fff) drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.pm.off { opacity: .35; }
.leaflet-tooltip.tt { border: var(--line); border-radius: 8px; box-shadow: var(--sh-s); font-weight: 600; color: var(--ink); padding: 3px 8px; }
.leaflet-tooltip.tt::before { display: none; }

/* загрузка треков */
.drop { border: 2px dashed var(--navy); border-radius: var(--r); background: var(--sky-xl); padding: 26px 18px; display: grid; justify-items: center; gap: 10px; text-align: center; cursor: pointer; transition: background .15s, transform .15s var(--ease); }
.drop:hover, .drop.over { background: var(--sun-l); }
.drop.over { transform: scale(1.015); border-style: solid; }
.drop b { font: 800 26px var(--head); color: var(--navy); text-transform: uppercase; letter-spacing: .02em; }
.drop svg { width: 54px; height: 54px; }
.drop.busy { pointer-events: none; opacity: .7; }
.linkrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
details.help { border: var(--line); border-radius: var(--r-s); background: var(--paper); }
details.help summary { cursor: pointer; padding: 11px 14px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
details.help summary::before { content: '?'; width: 22px; height: 22px; border-radius: 50%; background: var(--sun); border: var(--line); display: grid; place-items: center; font: 800 14px var(--head); flex: none; }
details.help summary::-webkit-details-marker { display: none; }
details.help .in { padding: 0 14px 14px; display: grid; gap: 10px; font-size: 14px; }
details.help code { font: 600 13px ui-monospace, 'JetBrains Mono', monospace; background: var(--sky-l); padding: 1px 6px; border-radius: 5px; white-space: nowrap; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: baseline; }
.list { display: grid; gap: 6px; }
.row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border: 2px solid transparent; border-radius: var(--r-s); background: var(--sky-xl); cursor: pointer; transition: background .12s, border-color .12s; text-align: left; width: 100%; min-height: 46px; }
.row { scroll-margin-top: 14px; }
.row:hover { background: var(--sky-l); }
.row.sel { border-color: var(--navy); background: var(--paper); box-shadow: var(--sh-s); }
.row .t { font-weight: 600; overflow-wrap: anywhere; line-height: 1.25; }
.row .s { color: var(--muted); font-size: 13px; }
.row .ico svg { width: 24px; height: 24px; display: block; }
.row.off .t, .row.off .ico { opacity: .45; }
.banner { border: var(--line); border-radius: var(--r-s); padding: 12px 14px; background: var(--sun-l); display: grid; gap: 8px; }
.banner.blue { background: var(--sky-l); } .banner.ok { background: #DDF3E5; }
.banner b { font-weight: 700; }
.next { position: sticky; bottom: 0; z-index: 5; margin-top: auto; padding: 18px 0 16px; display: flex; justify-content: space-between; gap: 10px; background: linear-gradient(to top, var(--paper) 72%, transparent); }

/* дни */
.day { border: var(--line); border-radius: var(--r-s); overflow: hidden; background: var(--paper); }
.day > header { display: flex; align-items: baseline; gap: 10px; padding: 8px 12px; color: #fff; background: var(--red); font: 800 20px var(--head); letter-spacing: .02em; }
.day.even > header { background: var(--violet); }
.day.rest > header { background: #8A97A8; }
.day > header small { font: 500 13.5px var(--body); opacity: .92; margin-left: auto; text-align: right; }
.day .pc { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; padding: 9px 12px; border-top: 1px solid var(--sky-l); align-items: center; cursor: pointer; }
.day .pc:first-of-type { border-top: 0; }
.day .pc:hover, .day .pc.sel { background: var(--sun-l); }
.day .pc .nm { font-weight: 600; overflow-wrap: anywhere; line-height: 1.25; }
.day .pc .ctl { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.day .pc select, .day .pc input { min-height: 32px; padding: 3px 8px; width: auto; font-size: 13.5px; border-width: 1.5px; }
.day .pc input[type=number] { width: 62px; }
.day.loose { border-color: var(--orange); } .day.loose > header { background: var(--orange); }
.day.skip > header { background: #B6C0CC; color: var(--ink); }

/* точки */
.pe { grid-column: 1 / -1; display: grid; gap: 12px; padding: 14px; border: var(--line); border-radius: var(--r-s); background: var(--paper); box-shadow: var(--sh-s); animation: rise .2s var(--ease); }
.pe .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pe .raw { font-size: 13px; color: var(--muted); }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; outline: 2px solid transparent; cursor: pointer; }
.swatches button.on { outline-color: var(--navy); }

/* сборка */
.build { display: grid; grid-template-columns: minmax(320px, 400px) 1fr; min-height: 0; height: 100%; }
.build .panel { border-right: var(--line); }
.out { overflow-y: auto; padding: 22px clamp(14px, 3vw, 30px) 90px; display: flex; flex-direction: column; gap: 20px; }
.out > * { flex: none; }
.out-title { font-size: 36px; color: var(--navy); margin-bottom: -10px; }
.out-acts { position: sticky; top: 0; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 6px; margin: 0 -6px; background: var(--sky-xl); }
.out-acts .sp { flex: 1; }
.out-acts svg { flex: none; }
.dlall { margin-left: 10px; box-shadow: none; }
.dlall svg { width: 16px; height: 16px; }
.next.edit { background: linear-gradient(to top, var(--sun-l) 80%, transparent); margin: auto -20px 0; padding-left: 20px; padding-right: 20px; }
.prog { border: var(--line); border-radius: var(--r); background: var(--paper); padding: 16px 18px 14px; box-shadow: var(--sh); display: grid; gap: 4px; }
.prog .stage { font: 800 24px var(--head); color: var(--navy); }
.trail { position: relative; height: 74px; margin: 6px 4px 0; }
.trail .ln { position: absolute; left: 0; right: 0; bottom: 14px; border-top: 3px dashed var(--sky-m); }
.trail .fill { position: absolute; left: 0; bottom: 14px; height: 3px; background: var(--red); transition: width .8s var(--ease); margin-bottom: -3px; transform: translateY(-3px); }
.trail .walker { position: absolute; bottom: 12px; height: 60px; transform: translateX(-50%); transition: left .8s var(--ease); }
.trail .walker img { height: 100%; animation: walk .55s var(--ease) infinite alternate; transform-origin: 50% 100%; }
.trail .tent { position: absolute; bottom: 8px; width: 13px; height: 12px; transform: translateX(-50%); clip-path: polygon(50% 0, 100% 100%, 0 100%); background: var(--sky-m); transition: background .3s, transform .3s var(--ease); }
.trail .tent.ok { background: var(--sun); transform: translateX(-50%) scale(1.25); }
.trail .tent.err { background: #B3001B; }
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.sheet { border: var(--line); border-radius: var(--r-s); background: var(--paper); overflow: hidden; display: grid; grid-template-rows: 190px auto; box-shadow: var(--sh-s); transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.sheet.ok { animation: develop .7s var(--ease) backwards; cursor: zoom-in; }
.sheet.ok:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--navy); }
@keyframes develop { from { opacity: 0; transform: scale(.92) rotate(-1.5deg); filter: saturate(0) brightness(1.4); } }
.sheet .pic { background: var(--sky-xl); display: grid; place-items: center; overflow: hidden; border-bottom: var(--line); position: relative; }
.sheet .pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.sheet .pic .wait { font: 700 14px var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: grid; justify-items: center; gap: 8px; }
.sheet.run .pic .wait::before { content: ''; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--sky-m); border-top-color: var(--red); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sheet .cap { padding: 9px 11px 10px; display: grid; gap: 5px; }
.sheet .cap b { font: 800 18.5px/1.05 var(--head); color: var(--navy); }
.sheet .cap .s { font-size: 12.5px; color: var(--muted); }
.sheet .dl { display: flex; gap: 6px; }
.sheet .dl a { font: 700 13px var(--head); letter-spacing: .06em; padding: 3px 9px; border: 1.5px solid var(--navy); border-radius: 999px; text-decoration: none; }
.sheet .dl a:hover { background: var(--sun); }
table.sum { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.sum th { font: 700 12.5px var(--head); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 6px 8px; border-bottom: var(--line); }
table.sum td { padding: 6px 8px; border-bottom: 1px solid var(--sky-l); vertical-align: top; }
table.sum td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tblwrap { border: var(--line); border-radius: var(--r-s); background: var(--paper); overflow-x: auto; }
.light { position: fixed; inset: 0; z-index: 3500; background: rgba(11, 42, 77, .93); display: grid; grid-template-rows: auto 1fr; animation: fade .15s; }
.light header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: #fff; }
.light header b { font: 800 22px var(--head); margin-right: auto; }
.light .view { overflow: auto; display: grid; place-items: center; padding: 0 12px 16px; cursor: zoom-in; }
.light .view img { max-width: 100%; max-height: 100%; background: #fff; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.light .view.zoom { place-items: start center; cursor: zoom-out; } .light .view.zoom img { max-width: none; max-height: none; }
.light .btn.ghost, .light .icon-btn { color: #fff; } .light .btn.ghost:hover, .light .icon-btn:hover { background: rgba(255, 255, 255, .15); }

/* ---------- телефон */
.tabbar { display: none; }
@media (max-width: 880px) {
  .login { grid-template-columns: 1fr; grid-template-rows: 36vh auto; }
  .scene { border-right: 0; border-bottom: var(--line); }
  .scene .hiker { height: 62%; left: 6%; bottom: 3%; }
  .login-side { align-content: start; padding-top: 26px; gap: 20px; }
  .ed { grid-template-rows: 52px 1fr 60px; }
  .top { height: 52px; gap: 6px; }
  .ed .top .steps, .ed .top .who { display: none; }
  .ed .top .title { max-width: none; flex: 1; font-size: 21px; }
  .brand span { display: none; }
  .ed-body { grid-template-columns: 1fr; grid-template-rows: var(--maph, 36vh) 1fr; }
  .ed-body .mapwrap { order: -1; border-bottom: var(--line); }
  .ed-body.wide { grid-template-rows: 1fr; }
  .panel { border-right: 0; padding: 16px 14px 0; }
  .build { display: flex; flex-direction: column; height: 100%; overflow-y: auto; }
  .build .panel, .build .out { overflow: visible; border-right: 0; flex: none; }
  .build .out { order: -1; padding-bottom: 24px; }
  .build .panel { border-top: var(--line); padding-bottom: 30px; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--navy); border-top: 2px solid var(--navy-d); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar .step { justify-content: center; flex-direction: column; gap: 1px; font-size: 13px; padding: 0; margin: 0 !important; }
  .tabbar .step::before { display: none; }
  .tabbar .step .dot { width: 24px; height: 24px; font-size: 13.5px; }
  .gal { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .sheet { grid-template-rows: 150px auto; }
  .home-head { align-items: start; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } .scene .thread { stroke-dashoffset: 0; } }

/* точки/участки, сторона подписи, рамка листа */
.seg { display: inline-flex; border: var(--line); border-radius: 999px; overflow: hidden; align-self: flex-start; background: var(--paper); }
.seg button { border: 0; background: none; padding: 7px 16px; font: 700 16px var(--head); letter-spacing: .04em; text-transform: uppercase; color: var(--navy); cursor: pointer; display: flex; gap: 7px; align-items: baseline; }
.seg button span { font: 500 13px var(--body); opacity: .65; }
.seg button.on { background: var(--navy); color: #fff; }
.seg button:not(.on):hover { background: var(--sky-l); }
.bsw { display: block; width: 26px; height: 14px; border-radius: 3px; background: var(--c); opacity: .8; position: relative; }
.bsw::after { content: ''; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: var(--red); }
.bsw.h { background-image: repeating-linear-gradient(45deg, transparent 0 3px, rgba(0, 0, 0, .35) 3px 4.5px); background-color: var(--c); }
.compass { display: grid; grid-template-columns: repeat(3, 46px); gap: 4px; }
.compass button { height: 34px; border: 1.5px solid var(--navy); border-radius: 8px; background: var(--paper); cursor: pointer; font-size: 17px; color: var(--navy); }
.compass button:nth-child(5) { font: 600 12px var(--body); }
.compass button:hover { background: var(--sky-l); }
.compass button.on { background: var(--navy); color: #fff; }
.modal.wide { width: min(760px, 100%); }
.fmap { height: min(52vh, 440px); border: var(--line); border-radius: var(--r-s); overflow: hidden; background: var(--sky-l); }
.fhandle { width: 34px; height: 34px; border-radius: 50%; background: var(--sun); border: var(--line); display: grid; place-items: center; font-size: 19px; color: var(--navy); cursor: grab; box-shadow: var(--sh-s); }
.maphint { display: flex; align-items: center; gap: 4px; padding: 4px 6px 4px 14px; max-width: calc(100% - 24px); top: 58px; }
.maphint .icon-btn { width: 28px; height: 28px; }
.sheet .dl a[data-a="frame"] { margin-left: auto; border-style: dashed; }
.logo-opt { border: var(--line); border-radius: var(--r-s); padding: 10px 12px; background: var(--sky-xl); }
.logo-opt img { height: 40px; flex: none; }
.only-m { display: none; }
@media (max-width: 880px) {
  .only-m { display: inline-flex; }
  .out-acts .btn.big { width: 100%; } .out-acts .sp { display: none; }
  .dlall span { display: none; } .dlall { margin-left: 4px; padding: 0 10px; }
  .next.edit { margin: auto -14px 0; padding-left: 14px; padding-right: 14px; }
  .modal { max-height: calc(100dvh - 24px); overflow-y: auto; }
  .modal .acts { position: sticky; bottom: -24px; background: var(--paper); padding: 12px 0 6px; }
}

/* препятствия и категории трудности */
.gb { display: grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px; border-radius: 7px; background: var(--g); color: #fff; font: 800 15px var(--head); letter-spacing: .02em; }
.gsum { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border: var(--line); border-radius: 999px; background: var(--paper); font-weight: 600; font-size: 13.5px; }
.gsum b { background: var(--g); color: #fff; border-radius: 999px; padding: 1px 9px; font: 800 14px var(--head); }
.chip.gr { border-color: var(--g); color: var(--g); font-weight: 700; }
.chip.gr.on { background: var(--g); color: #fff; }
.chip.gr:hover { background: color-mix(in srgb, var(--g) 14%, #fff); }
.chip.gr.on:hover { background: var(--g); }
.star { font-size: 19px; color: #B6C0CC; }
.star.on { color: var(--sun); text-shadow: 0 0 0 var(--navy), 1px 1px 0 var(--navy), -1px -1px 0 var(--navy), 1px -1px 0 var(--navy), -1px 1px 0 var(--navy); }
.seg { flex-wrap: wrap; border-radius: 18px; }
