/* сторінка / (Сьогодні) — лише нові правила; спільні класи в base.css */

/* ── шапка: невисока — місце, люди й «Далі» рядом маленьких плашок ─────────────────────────── */
.now-hero .hero-in { min-height: 0; padding-top: 36px; padding-bottom: 112px; }
.now-h1 { margin: 0 0 10px; font-size: clamp(34px, 4.2vw, 52px); }
.now-h1 .hero-flag { width: 46px; height: 34px; }

/* «Богдан і Юлія» — коли всі в одному місці; «Богдан — Хюе · Юлія — Дананг» — коли в різних */
.now-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 16px; padding: 0;
  list-style: none; font-size: 14.5px; font-weight: 600; color: var(--muted); }
.now-who-t { min-width: 0; overflow-wrap: anywhere; }
.now-exit { font-size: 13.5px; font-weight: 800; color: var(--ink-2); }
.now-exit.is-hot { color: var(--red); }

.now-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* сама плашка — .pill у base.css */
.now-pill b { font-size: 14px; font-weight: 800; color: var(--navy); } /* засічковий на малому розмірі негарний — звичайний */
a.now-pill:hover b { color: var(--blue); }
.now-pill-h { font-size: 12px; font-weight: 800; color: var(--muted); } /* «Далі», «Tickets» — звичайним регістром, без розрядки */
.now-pill .ic { flex: none; width: 15px; height: 15px; color: var(--blue); }
/* одна висота з усіма .pill: плашка — один рядок; не влазить — обрізається назва (b) чи маршрут рейсу (.now-fit), а дати й час — ні */
.now-pill { max-width: 100%; white-space: nowrap; }
.now-pill b, .now-pill .now-fit { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.now-d-s { display: none; }
@media (max-width: 760px) { .now-d-l { display: none; } .now-d-s { display: inline; } } /* вузько — дати цифрами (nextBlock) */
/* «Tickets» напередодні й у день поїздки — окремим рядком під «Далі», підпис синій: це дія, а не довідка */
.now-tixs { margin-top: 10px; }
.now-tix .now-pill-h { color: var(--blue); }
.now-flag { width: 22px; height: 16px; border-radius: 3px; box-shadow: 0 1px 4px rgba(21, 37, 61, .2); }

.now-by { font-size: 11.5px; color: var(--muted); }
.now-tz { font-weight: 700; color: var(--muted); }
.now-err { margin: 12px 0 0; color: var(--red); font-size: 13px; font-weight: 700; }

/* ── мітки людей ───────────────────────────────────────────────────────────────────────────── */
.now-p { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--c, var(--blue)); color: #fff; font-size: 10.5px; font-weight: 800; line-height: 1; }
.now-ps { display: inline-flex; flex: none; } /* кружечки людей — окремим стовпчиком праворуч, внахлест */
.now-ps .now-p { box-shadow: 0 0 0 2px var(--ring, #fff); }
.now-ps .now-p + .now-p { margin-left: -3px; }
.now-ev { --ring: var(--surface-2); }
.now-ev:hover { --ring: var(--blue-50); }
.now-ev-r { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.now-task > .now-ps, .now-auto-a > .now-ps { grid-column: 3; grid-row: 1; align-self: start; margin-top: 1px; } /* лише в рядку назви */

/* ── «Маршрут»: стрічка зупинок як у макеті (ТЗ v2 §5) ─────────────────────────────────────── */
/* кружечки з фото, прапорцем, місяцем і статусом — спільні .strip/.stop із base.css */
.now-route { padding-bottom: 16px; }
.now-strip { margin: 0 -12px; padding: 4px 12px 12px; scroll-snap-type: none; } /* без прилипання: воно не пускало до самого лівого краю */
.now-stop:hover b { color: var(--blue); }
.now-stop .stop-m { font-size: 11px; line-height: 16px; } /* дні в подорожі — тим самим розміром, що й дні між подорожами (.now-gap) */
.now-fold { padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
/* подорожі впритул — суцільна лінія від центру до центру поверх пунктиру (класи ставить linkChain у now.js); right -4px — через gap стрічки */
.now-stop.link-prev::after, .now-stop.link-next::after { content: ""; position: absolute; top: 30px; left: 0; right: -4px; height: 2px; background: #c9d5e5; } /* колір пунктиру з base.css: різниця лише в суцільності */
.now-stop.link-prev:not(.link-next)::after { right: 50%; }
.now-stop.link-next:not(.link-prev)::after { left: 50%; }
.now-stop .stop-dot { z-index: 1; } /* крапка над лінією */
/* дні між окремими подорожами — на пунктирі посередині між крапками (межа зі стрічкою зліва; -2px — половина gap) */
.now-gap { position: absolute; top: 31px; left: -2px; transform: translate(-50%, -50%); padding: 0 5px; background: var(--surface);
  font-size: 11px; font-weight: 800; line-height: 16px; color: var(--muted); white-space: nowrap; }
.now-gap .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.now-stop small { margin-bottom: 4px; }
.now-stop .now-by { margin: 0 0 8px; }

/* ── два однакові блоки поруч: однакової ширини й висоти (ТЗ v2 §5) ───────────────────────── */
.now-duo { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; align-items: stretch; min-width: 0; }
/* висоту ряду задає картка подій; список задач заповнює, скільки лишилось (зайве ховає fitTasks у now.js) */
.now-duo > .card { display: flex; flex-direction: column; min-height: 460px; }
.now-todo .now-tasklist { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; contain: size; }

/* ── картка найближчих подій ───────────────────────────────────────────────────────────────── */
.now-evlist li + li { margin-top: 8px; }
.now-ev { min-width: 0; }
.now-ev:hover { background: var(--blue-50); }
.now-ev .ev-t { overflow-wrap: anywhere; }
/* кольори типів, яких нема в base.css — як у календарі хронології */
.now-evlist .ev-transport { color: var(--blue); }
.now-evlist .ev-activity { color: var(--green); }
.now-evlist .ev-payment { color: var(--amber); }
.now-evlist .ev-note { color: var(--ink-2); }
.now-evlist .ev-document { color: var(--red); }

/* ── картка задач ──────────────────────────────────────────────────────────────────────────── */
.now-task .box { display: grid; place-items: center; padding: 0; background: none; cursor: pointer; }
.now-task .box:hover { border-color: var(--blue); }
.now-task .box .ic { width: 12px; height: 12px; stroke-width: 3; }
.now-busy { opacity: .45; pointer-events: none; }
.now-m { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 7px; }
.now-sep { font-style: normal; color: var(--line); }
.now-soon { color: var(--amber); font-weight: 700; }
.now-stage { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-weight: 700; }
.now-stage .ic { width: 13px; height: 13px; color: var(--blue); }

/* задача з поїздки (ТЗ v2 §4): не запис у базі — клік відкриває саму поїздку */
.now-auto-a { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; align-items: start;
  min-width: 0; color: inherit; } /* рядок-посилання: та сама сітка, що й у .task (base.css) */
.now-auto-a:hover .task-t { color: var(--blue); }
.now-auto-ic { display: grid; place-items: center; flex: none; width: 20px; height: 20px; margin-top: 1px;
  border-radius: 50%; background: var(--amber-50); color: var(--amber); }
.now-auto-ic .ic { width: 12px; height: 12px; stroke-width: 2.2; }

@media (max-width: 760px) {
  .now-hero .hero-in { padding-top: 176px; padding-bottom: 104px; } /* на телефоні фото — смугою над текстом */
  .now-h1 { margin-bottom: 14px; }
  .now-who { gap: 4px 8px; margin-bottom: 18px; font-size: 14px; }
  .now-duo { gap: 14px; }
  .now-duo > .card { grid-column: span 12; } /* один блок під одним, обидва на всю ширину */
  .now-duo > .card { min-height: 0; }
  .now-todo .now-tasklist { contain: none; }
  .now-todo .now-tasklist > li:nth-child(n+11) { display: none !important; } /* блоки один під одним — перші 10 */
  .now-ev { grid-template-columns: 40px 32px minmax(0, 1fr) auto; gap: 9px; padding: 10px; }
}

@media (max-width: 340px) {
  .now-ev { grid-template-columns: 40px minmax(0, 1fr); gap: 4px 9px; }
  .now-ev .tile { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
  .now-ev .ev-ic { display: none; }
  .now-ev .ev-b { grid-column: 2; grid-row: 1; }
  .now-ev .ev-t { overflow-wrap: break-word; }
  .now-ev-r { grid-column: 2; grid-row: 2; flex-direction: row; align-items: center; justify-content: space-between; }
}

/* цитата внизу головної */
.now-quote { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 110px; margin: 0; padding: 20px 44px;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--navy) center / cover no-repeat; }
.now-quote::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 32, 58, .82) 0%, rgba(10, 32, 58, .55) 45%, rgba(10, 32, 58, .1) 100%); }
.now-quote blockquote, .now-quote figcaption { position: relative; max-width: 900px; margin: 0; color: #fff; }
.now-quote blockquote { font: 600 21px/1.3 var(--serif); }
.now-quote figcaption { margin-top: 6px; font-size: 13px; font-weight: 700; opacity: .85; }
@media (max-width: 760px) { .now-quote { min-height: 100px; padding: 16px 18px; } .now-quote blockquote { font-size: 17px; } }
.now-quote[data-quote] { padding-right: 64px; cursor: pointer; } /* праворуч — значок, текст під нього не заходить */
.now-quote[data-quote]:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.now-quote-ic { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .18); color: #fff; transition: background .15s; }
.now-quote[data-quote]:hover .now-quote-ic { background: rgba(255, 255, 255, .32); }
.now-quote-ic .ic { width: 17px; height: 17px; }

/* вікно «Цитата картинкою» (app/quotecard.js) */
.qc { width: min(560px, calc(100vw - 24px)); }
.qc-kinds { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.qc-kinds button { flex: 1; padding: 10px 12px; border: 0; border-radius: 999px; background: none; color: var(--ink-2);
  font: 700 14px var(--sans); cursor: pointer; }
.qc-kinds button[aria-pressed="true"] { background: var(--surface); color: var(--navy); box-shadow: 0 1px 4px rgba(21, 37, 61, .12); }
.qc-pv { display: grid; place-items: center; min-height: 240px; margin-top: 14px; }
.qc-img[hidden] { display: none; }
.qc-img { display: block; max-width: 100%; max-height: 60vh; border-radius: 14px; box-shadow: 0 8px 24px rgba(21, 37, 61, .2); }
.qc-wait { color: var(--muted); font-weight: 700; }
.qc-h { text-align: center; }
@media (pointer: fine) { .qc-h { display: none; } } /* «потримати картинку» — лише про дотик */
