/* Программа дня: карта во весь экран, сверху капсулы, снизу лист с пунктами по часам. */

.dy-body { overflow: hidden; height: 100dvh; }
.ev-gate { max-width: 30rem; margin: 15vh auto; padding: 0 1rem; line-height: 1.5; }

.dy-map { position: fixed; inset: 0; background: var(--paper); z-index: 0; }
/* вуаль поверх плиток — как на карте троп, чтобы пины читались */
.dy-map .leaflet-tile-pane { filter: brightness(calc(1 - var(--veil))) saturate(.85); }
.leaflet-container { font-family: var(--sans); }
.leaflet-control-attribution { font-size: 10px; background: rgba(15, 18, 13, .6) !important; color: var(--ink-faint) !important; }
.leaflet-control-attribution a { color: var(--ink-soft) !important; }

.dy-ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.dy-top {
  position: fixed; left: 0; right: 0; top: 0; z-index: 20;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: calc(env(safe-area-inset-top) + 10px) 10px 10px;
  background: linear-gradient(rgba(10, 12, 9, .78), rgba(10, 12, 9, 0));
}
.dy-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px;
  border: 0; border-radius: 12px; background: var(--panel-2); color: var(--ink);
  font: 600 16px var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer;
}
.dy-back { width: 44px; justify-content: center; padding: 0; font-size: 26px; font-weight: 400; }
.dy-city { flex: 1 1 8rem; justify-content: space-between; min-width: 0; }
.dy-city span { overflow: hidden; text-overflow: ellipsis; }
.dy-date input { background: none; border: 0; color: inherit; font: inherit; color-scheme: dark; width: 8.6rem; }
.dy-here[aria-pressed="true"] { background: #73A3FC; color: #0F120D; }

.dy-edges { position: fixed; inset: 0; z-index: 15; pointer-events: none; }
.dy-ptr { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; border: 0; background: none; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px; font-family: var(--sans); }
.dy-ptr b { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; background: var(--walked); color: #1A1708; font-size: 16px; display: grid; place-items: center; }
/* клювик смотрит в сторону пункта */
.dy-ptr i { position: absolute; left: 50%; top: 18px; width: 0; height: 0; margin: -7px 0 0 0; transform-origin: 0 50%;
  border-left: 30px solid var(--walked); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.dy-ptr small { font-size: 12px; font-weight: 600; color: var(--ink); background: rgba(17, 20, 15, .88); padding: 1px 6px; border-radius: 6px; white-space: nowrap; }

/* ── пины ── */
.dy-pin { display: grid; place-items: center; border-radius: 50%; font: 700 15px var(--sans); }
.dy-pin.num { width: 32px; height: 32px; background: var(--walked); color: #1A1708; }
.dy-pin.num.done { background: #6E766A; color: #E9ECE3; }
.dy-pin.num.sel { outline: 3px solid #E9ECE3; }
.dy-pin.ev { width: 34px; height: 34px; background: #11140F; font-size: 17px; }
.dy-pin.me { width: 18px; height: 18px; background: #73A3FC; outline: 3px solid #E9ECE3; }
.dy-tag { background: rgba(17, 20, 15, .88) !important; color: var(--ink) !important; border: 0 !important; border-radius: 7px !important;
  box-shadow: none !important; font: 600 12px var(--sans); padding: 2px 7px !important; }
.dy-tag::before { display: none; }

/* ── телефон: полоса карточек внизу, карта над ней большая ── */
.dy-strip { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding-bottom: calc(env(safe-area-inset-bottom) + 8px);
  background: linear-gradient(rgba(15, 18, 13, 0), rgba(15, 18, 13, .92) 56px); pointer-events: none; }
.dy-strip > * { pointer-events: auto; }
.dy-tools { display: flex; justify-content: flex-end; gap: 8px; padding: 0 12px 8px; pointer-events: none; }
.dy-tools > * { pointer-events: auto; }
.dy-round { height: 44px; min-width: 44px; padding: 0 14px; border: 0; border-radius: 22px; background: rgba(17, 20, 15, .92); color: var(--ink); font: 600 15px var(--sans); cursor: pointer; }
.dy-cards { display: flex; align-items: stretch; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 9vw 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.dy-cards::-webkit-scrollbar { display: none; }
.dy-card { flex: 0 0 82vw; max-width: 24rem; scroll-snap-align: center; background: var(--panel); border-radius: 16px; padding: 12px 14px; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; }
.dy-card.sel { outline: 2px solid var(--walked); outline-offset: -2px; }
.dy-card.done { opacity: .6; }
.dc-top { display: flex; align-items: center; gap: 10px; }
.dc-num { width: 32px; height: 32px; border-radius: 50%; background: var(--walked); color: #1A1708; font-weight: 700; display: grid; place-items: center; flex: none; }
.dy-card.done .dc-num { background: #6E766A; color: #E9ECE3; }
.dc-time { font-size: 17px; font-weight: 700; white-space: nowrap; }
.dc-time small { font-size: 13px; font-weight: 400; color: var(--ink-soft); }
.dc-title { font-size: 17px; font-weight: 600; line-height: 1.3; }
.dc-sub, .dc-go { font-size: 14px; color: var(--ink-soft); line-height: 1.35; }
.dc-go.bad { color: #F09070; } .dc-go.late { color: #F2C230; }
.dc-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.dc-acts .btn { font-size: 14px; padding: 6px 10px; }
.dy-card.add { align-items: center; justify-content: center; color: #73A3FC; font-weight: 600; font-size: 16px; cursor: pointer; border: 0; font-family: var(--sans); }
.dy-stripbar { display: flex; gap: 8px; padding: 8px 12px 0; flex-wrap: wrap; }
.dy-stripbar .btn { font-size: 15px; padding: 9px 12px; }

/* ── вся программа: лист на весь экран ── */
.dy-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; top: calc(env(safe-area-inset-top) + 66px); z-index: 40; margin: 0 auto; max-width: 40rem;
  background: var(--panel); border-radius: 20px 20px 0 0; display: none; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.dy-sheet.open { display: flex; }
.dy-sheethead { display: flex; justify-content: flex-end; padding: 8px 10px 0; flex: none; }
@media (min-width: 900px) {
  .dy-strip { display: none; }
  .dy-sheet { display: flex; left: 14px; right: auto; top: calc(env(safe-area-inset-top) + 70px); bottom: 14px; width: 30rem; border-radius: 16px; margin: 0; }
  .dy-sheethead { display: none; }
}

.dy-now { margin: 0 12px 8px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); font-size: 15px; line-height: 1.35; flex: none; }
.dy-now b { font-size: 16px; }
.dy-now .soft { color: var(--ink-soft); }

.dy-tabs { display: flex; padding: 0 14px; gap: 4px; flex: none; }
.dy-tab { flex: 1 1 0; border: 0; background: none; color: var(--ink-soft); font: 15px var(--sans); padding: 9px 4px; position: relative; cursor: pointer; }
.dy-tab[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.dy-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 25%; right: 25%; bottom: 0; height: 3px; border-radius: 2px; background: var(--walked); }

.dy-scroll { flex: 1 1 auto; overflow-y: auto; padding: 8px 14px 140px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.dy-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 4px 0 6px; }
.dy-h { font-size: 20px; font-weight: 700; }
.dy-blue { background: rgba(115, 163, 252, .16) !important; color: #73A3FC !important; border: 0 !important; font-weight: 600; }
.dy-yel { background: var(--walked) !important; color: #1A1708 !important; border: 0 !important; font-weight: 700; }
.dy-check { font-size: 14px; margin-bottom: 8px; min-height: 1em; }
.dy-check.ok { color: #9BCB8A; }
.dy-check.bad { color: #F09070; }

/* низ списка: «назад» слева, жёлтый календарь справа — одной высоты, на одной линии */
.dy-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px calc(env(safe-area-inset-bottom) + 12px);
  background: linear-gradient(rgba(23, 27, 20, 0), var(--panel) 20px); display: flex; gap: 8px; justify-content: space-between; align-items: center; border-radius: 0 0 16px 16px; }
.dy-fbtn { height: 48px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--panel-2); color: var(--ink);
  font: 600 15px/1 var(--sans); display: inline-flex; align-items: center; gap: 8px; box-sizing: border-box; cursor: pointer; white-space: nowrap; }
.dy-fbtn.y { background: var(--walked); color: #1A1708; font-weight: 700; }
/* «＋ пункт» — призрак: видно, но не спорит с жёлтым */
.dy-ghost { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 76px); z-index: 2;
  height: 40px; padding: 0 18px; border: 0; border-radius: 20px; background: rgba(233, 236, 227, .08); color: rgba(233, 236, 227, .8);
  font: 600 15px var(--sans); cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); white-space: nowrap; }
.dy-ghostbtn { background: rgba(233, 236, 227, .08) !important; color: rgba(233, 236, 227, .85) !important; border: 0 !important; }
@media (min-width: 900px) { #list-back { visibility: hidden; } }
.dy-sheet[data-h="low"] .dy-foot { display: none; }

/* ── лента дня ── */
.tl-item { display: grid; grid-template-columns: 58px 34px minmax(0, 1fr); column-gap: 10px; align-items: start; padding: 6px 4px; border-radius: 10px; cursor: pointer; }
.tl-item.sel { background: var(--panel-2); }
.tl-item.done { opacity: .55; }
.tl-tm { font-size: 16px; font-weight: 700; text-align: right; padding-top: 6px; white-space: nowrap; }
.tl-tm small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-soft); }
.tl-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--walked); color: #1A1708; font-weight: 700; font-size: 15px; }
.tl-item.done .tl-dot { background: #6E766A; color: #E9ECE3; }
.tl-body b { display: block; font-size: 16px; line-height: 1.3; padding-top: 6px; }
.tl-body span { display: block; font-size: 14px; color: var(--ink-soft); line-height: 1.35; }
.tl-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tl-acts .btn { font-size: 14px; padding: 6px 10px; }
.tl-go { display: grid; grid-template-columns: 58px 34px minmax(0, 1fr); column-gap: 10px; padding: 0 4px; min-height: 30px; align-items: center; }
.tl-go i { justify-self: center; width: 2px; align-self: stretch; background: repeating-linear-gradient(var(--walked) 0 4px, transparent 4px 8px); }
.tl-go.tr i { background: repeating-linear-gradient(#73A3FC 0 8px, transparent 8px 12px); }
.tl-go span { font-size: 14px; color: var(--ink-soft); line-height: 1.35; padding: 3px 0; }
.tl-go span.bad { color: #F09070; }
.tl-go span.late { color: #F2C230; }
.tl-empty { color: var(--ink-soft); font-size: 15px; line-height: 1.5; padding: 10px 2px; }

/* ── что идёт ── */
.ev-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 2px; }
.ev-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--panel-2); display: grid; place-items: center; font-size: 19px; }
.ev-row b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-row span { display: block; font-size: 14px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-add { border: 0; border-radius: 10px; padding: 8px 11px; font: 600 14px var(--sans); background: #2B3325; color: var(--ink); cursor: pointer; white-space: nowrap; }
.ev-add[disabled] { background: var(--panel-2); color: var(--ink-soft); cursor: default; }

/* ── форма пункта ── */
.dy-modal { position: fixed; inset: 0; z-index: 50; background: rgba(10, 12, 9, .55); display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 900px) { .dy-modal { align-items: center; } .dy-form { border-radius: 16px !important; } }
.dy-form { width: 100%; max-width: 30rem; max-height: 92dvh; overflow-y: auto; background: var(--panel); border-radius: 20px 20px 0 0;
  padding: 14px 16px calc(env(safe-area-inset-bottom) + 16px); display: flex; flex-direction: column; gap: 12px; }
.dy-x { width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--panel-2); color: var(--ink); font-size: 24px; cursor: pointer; }
.dy-kinds { display: flex; gap: 6px; flex-wrap: wrap; }
.dy-kinds button { border: 0; border-radius: 999px; padding: 8px 12px; background: var(--panel-2); color: var(--ink-soft); font: 15px var(--sans); cursor: pointer; }
.dy-kinds button[aria-pressed="true"] { background: var(--walked); color: #1A1708; font-weight: 700; }
.dy-field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.dy-field > span { font-size: 12px; color: var(--ink-faint); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.dy-field input { height: 46px; border: 0; border-radius: 10px; background: var(--panel-2); color: var(--ink); padding: 0 12px; font: 17px var(--sans); color-scheme: dark; width: 100%; }
.dy-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dy-seg { display: flex; background: var(--panel-2); border-radius: 10px; padding: 3px; gap: 3px; }
.dy-seg button { flex: 1 1 0; height: 40px; border: 0; border-radius: 8px; background: none; color: var(--ink-soft); font: 15px var(--sans); cursor: pointer; }
.dy-seg button[aria-pressed="true"] { background: #2B3325; color: var(--ink); font-weight: 600; }
.dy-found { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; background: var(--panel-2); border-radius: 10px; margin-top: 4px; max-height: 15rem; overflow-y: auto; }
.dy-found button { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--ink); padding: 10px 12px; font: 15px var(--sans); cursor: pointer; }
.dy-found button small { display: block; color: var(--ink-soft); font-size: 13px; }
.dy-found button:hover, .dy-found button:focus { background: #2B3325; }
.dy-formfoot { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; margin-top: 4px; }
.dy-formfoot .dy-yel { flex: 1 1 auto; height: 50px; font-size: 16px; }

/* ── событие подробно: в списке (A) и карточкой места на карте (B) ── */
.ev-item.open { background: var(--panel-2); border-radius: 14px; margin: 4px 0 10px; overflow: hidden; }
.ev-item.open .ev-row { padding: 10px 10px 8px; }
.evx img { width: 100%; height: 150px; object-fit: cover; display: block; }
.evx-in { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.evx-in p, .dy-place p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink); }
.evx-meta { font-size: 14px; color: var(--ink-soft); display: flex; flex-direction: column; gap: 3px; line-height: 1.35; }
.evx-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.evb { display: inline-flex; align-items: center; height: 42px; padding: 0 13px; border: 0; border-radius: 11px; background: #2B3325; color: var(--ink);
  font: 600 15px var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.evb.y { background: var(--walked); color: #1A1708; }
.evb.b { background: #2B3325; color: var(--ink); }
.evb.done { color: var(--ink-soft); cursor: default; }
.dy-place { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; margin: 0 auto; max-width: 34rem; background: var(--panel);
  border-radius: 20px 20px 0 0; padding: 16px 14px calc(env(safe-area-inset-bottom) + 16px); display: flex; flex-direction: column; gap: 10px; }
.dy-place[hidden] { display: none; }
.pl-x { position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--panel-2); color: var(--ink); font-size: 22px; cursor: pointer; }
.pl-row { display: flex; gap: 12px; padding-right: 44px; }
.pl-row img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; flex: none; }
.pl-row b { display: block; font-size: 18px; line-height: 1.25; }
.pl-s { font-size: 14px; color: var(--ink-soft); margin-top: 3px; line-height: 1.35; }
.pl-open { font-size: 14px; color: #9BCB8A; margin-top: 4px; line-height: 1.35; }
.dy-strip.under { display: none; }
@media (min-width: 900px) { .dy-place { left: auto; right: 14px; bottom: 14px; width: 26rem; border-radius: 16px; } }

/* ── варианты дня ── */
.dy-vpager { margin: 4px 0 10px; }
.dy-vpager:has(.vp-row) { background: var(--panel-2); border-radius: 16px; padding: 10px 8px; }
.dy-vpager .vp-ar, .dy-vpager .vp-btn { background: #2B3325; }
.vp-solo { display: flex; justify-content: flex-start; }
.vp-link { border: 0; background: none; padding: 4px 0; color: var(--ink-soft); font: 14px var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.vp-row { display: flex; align-items: center; gap: 8px; }
.vp-ar { width: 44px; height: 44px; flex: none; border: 0; border-radius: 12px; background: var(--panel-2); color: var(--ink); font-size: 22px; cursor: pointer; }
.vp-ar[disabled] { opacity: .3; cursor: default; }
.vp-mid { flex: 1 1 auto; min-width: 0; text-align: center; }
.vp-mid b { display: block; font-size: 18px; line-height: 1.25; }
.vp-chosen { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; padding: 3px 10px; border-radius: 10px;
  background: var(--walked); color: #1A1708; font: 700 13px var(--sans); }
.vp-mid small { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.vp-ok { font-size: 13px; color: #9BCB8A; font-weight: 600; white-space: nowrap; }
.vp-dots { display: flex; justify-content: center; gap: 7px; margin: 8px 0; }
.vp-dots i { width: 8px; height: 8px; border-radius: 4px; background: #3A4234; transition: width .2s ease; }
.vp-dots i.on { width: 22px; background: var(--walked); }
.vp-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.vp-more { margin-top: 6px; }
.vp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 12px; border: 0; border-radius: 11px;
  background: #2B3325; color: var(--ink); font: 600 14px var(--sans); cursor: pointer; white-space: nowrap; }
.vp-btn.y { background: var(--walked); color: #1A1708; }
.vp-btn.ghost { background: none; color: var(--ink-soft); }
.vp-btn.done { background: none; color: #9BCB8A; cursor: default; }
.dy-cmp { position: fixed; inset: 0; z-index: 45; background: var(--paper); overflow-y: auto;
  padding: calc(env(safe-area-inset-top) + 14px) 12px calc(env(safe-area-inset-bottom) + 20px); }
.dy-cmp[hidden] { display: none; }
.cmp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cmp-head b { font-size: 20px; }
.cmp-cols { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; }
.cmp-col { flex: 1 0 calc(50% - 4px); min-width: 0; scroll-snap-align: start; background: var(--panel); border-radius: 16px; padding: 12px 10px;
  box-sizing: border-box; display: flex; flex-direction: column; gap: 4px; }
.cmp-col.on { outline: 2px solid var(--walked); outline-offset: -2px; }
.cmp-col > b { font-size: 16px; line-height: 1.25; }
.cmp-col > small { font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }
.cmp-row { display: flex; gap: 8px; font-size: 14px; line-height: 1.3; padding: 5px 0; }
.cmp-row span { width: 44px; flex: none; font-weight: 700; }
.cmp-col .vp-btn { margin-top: 6px; }

/* «в SBB ↗» у строки поезда — тихая плашка, как «Сайт ↗» */
.sbb-go { display: inline-block; margin: 2px 0 2px 4px; padding: 4px 10px; border-radius: 9px; background: #2B3325; color: var(--ink);
  font: 600 13px/1.2 var(--sans); text-decoration: none; white-space: nowrap; }
