/*!
 * © 2026 Kde je MHD (kdejemhd.sk). Všetky práva vyhradené. All rights reserved.
 * Kód a dizajn tejto stránky sú autorským dielom prevádzkovateľa. Ich kopírovanie, šírenie,
 * úprava alebo použitie na iných stránkach či v aplikáciách bez písomného súhlasu je zakázané.
 * Copying, redistribution, modification or reuse without written permission is prohibited.
 */
/* Kde je MHD — the journey planner (/spojenie; public/plan.js, src/render/plan.js).
   Built like a departure board: each journey is two lines, the times are the figures and
   the plates of the lines are the chain. One journey opens at a time, as a card with
   edges; the map shows the chosen one and stays quiet. Hue means the mode of transport,
   ochre a delay, as everywhere on the site.

   Type scale: 26 (times in the list), 20 (times in an open journey), 17 (names, the
   answer), 15 (everything said about it), 13 (small plates and badges).
   Corners: plates 6, controls 9, panels and cards 14. */

.jp {
    --jp-tw: 50px; --jp-rail: 22px; --jp-sticky: 0px;
    /* motion: only in answer to an action, short, starting fast */
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}
.jp ::selection { background: color-mix(in srgb, var(--focus) 24%, transparent); }
.jp input { caret-color: var(--ink); }
.jp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.jp svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── The form ──────────────────────────────────────────────────────── */
.jp-form { display: grid; gap: 12px; max-width: 600px; margin-top: 18px; }
.jp-ends {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px;
    border: 1px solid var(--line);
    border-radius: var(--r-panel);
    background: var(--paper);
}
.jp-ends:focus-within { border-color: var(--ink-2); }
.jp-field { grid-column: 1; display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; padding-left: 16px; }
.jp-field:nth-of-type(1) { grid-row: 1; }
.jp-field:nth-of-type(2) { grid-row: 2; border-top: 1px solid var(--line); }
.jp-field label { font-size: 15px; color: var(--ink-2); }
.jp-field input {
    width: 100%;
    height: 54px;
    padding: 0 8px 0 0;
    border: 0;
    outline: 0;
    background: none;
    color: var(--ink);
    font: 500 17px/1.2 var(--font);
    text-overflow: ellipsis;
}
.jp-field input::placeholder { color: var(--ink-2); font-weight: 400; opacity: 0.8; }
.jp-field input.is-set { font-weight: 600; }

.jp-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--ink-2);
    transition: background-color 0.15s, color 0.15s, transform 0.16s var(--ease-out);
}
.jp-icon svg { width: 22px; height: 22px; }
.jp-icon:active { background: var(--line-soft); transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .jp-icon:hover { background: var(--line-soft); color: var(--ink); } }
.jp-swap svg { transition: transform 0.25s var(--ease-in-out); }
.jp-swap.is-turned svg { transform: rotate(180deg); }
.jp-swap-in { grid-column: 2; grid-row: 1 / span 2; align-self: center; justify-self: center; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }

/* suggestions under the field being typed in */
.doc-body .jp-list {
    position: absolute;
    left: -1px;
    right: -1px;
    z-index: 900;
    max-height: min(56vh, 420px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--r-panel);
    background: var(--paper);
    box-shadow: var(--shadow);
}
.jp-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.jp-list li.is-on { background: var(--line-soft); }
@media (hover: hover) and (pointer: fine) { .jp-list li:hover { background: var(--line-soft); } }
.jp-list .jp-none { color: var(--ink-2); cursor: default; }
.jp-list .jp-none:hover { background: none; }
.jp-name { min-width: 0; font-weight: 500; }
.jp-name small { display: block; font-size: 13px; font-weight: 400; color: var(--ink-2); }
.jp-lines { flex: none; display: inline-flex; align-items: center; gap: 3px; }
.jp-lines small { margin-left: 3px; font-size: 13px; color: var(--ink-2); }
.jp .jp-lines .plate { min-width: 26px; height: 20px; padding: 0 4px; border-radius: 4px; font-size: 13px; }
.jp-near { justify-content: flex-start !important; color: var(--ink-2); }
.jp-near svg { width: 20px; height: 20px; }
.jp-near b { color: var(--ink); font-weight: 600; }

/* when: one button that says it, a small panel to change it */
.jp-bar { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.jp-when {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    padding: 0 10px 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-ctl);
    font: 500 17px/1.2 var(--font);
    color: var(--ink);
    transition: background-color 0.15s, border-color 0.15s, transform 0.16s var(--ease-out);
}
.jp-when:active { transform: scale(0.97); }
.jp-when svg { width: 18px; height: 18px; color: var(--ink-2); transition: transform 0.2s var(--ease-out); }
.jp-when[aria-expanded="true"] { border-color: var(--ink-2); }
.jp-when[aria-expanded="true"] svg { transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine) { .jp-when:hover { background: var(--line-soft); } }
.jp-copied { margin-left: auto; font-size: 15px; color: var(--ink-2); }
.jp-copied:empty { display: none; }
.jp-copied:empty + .jp-share { margin-left: auto; }
.jp-share { display: none; }
.jp.has-results .jp-share { display: grid; }

.jp-pick { display: grid; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--paper); transform-origin: top left; animation: jp-pop 0.18s var(--ease-out); }
@keyframes jp-pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.jp-seg { display: flex; width: fit-content; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.jp-seg label { position: relative; cursor: pointer; }
.jp-seg input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.jp-seg span { display: grid; place-items: center; min-height: 44px; padding: 0 14px; border-radius: 6px; font-size: 17px; font-weight: 500; color: var(--ink-2); }
.jp-seg input:checked + span { background: var(--ink); color: var(--paper); font-weight: 600; }
.jp-seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.jp-at { display: flex; flex-wrap: wrap; gap: 10px; }
.jp-at label { display: grid; gap: 4px; font-size: 15px; color: var(--ink-2); }
.jp-at input { height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--paper); color: var(--ink); font: 500 17px/1 var(--font); color-scheme: light dark; }
.jp-at[hidden] + .jp-done { display: none; }
.jp-done { justify-self: start; min-height: 44px; padding: 0 18px; border-radius: var(--r-ctl); background: var(--ink); color: var(--paper); font: 600 17px/1 var(--font); transition: transform 0.16s var(--ease-out); }
.jp-done:active { transform: scale(0.97); }

.jp-go {
    height: 54px;
    border-radius: var(--r-panel);
    background: var(--ink);
    color: var(--paper);
    font: 600 17px/1 var(--font);
    transition: transform 0.16s var(--ease-out), opacity 0.15s;
}
.jp-go:active { transform: scale(0.97); }
.jp-form.is-busy .jp-go { opacity: 0.6; pointer-events: none; }

/* folded: once there is an answer the form is one line that says what was asked */
.jp-sum { display: none; align-items: center; gap: 4px; }
.jp-route {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 8px;
    min-height: 48px;
    padding: 6px 40px 6px 14px;
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--r-ctl);
    font: 600 17px/1.3 var(--font);
    text-align: left;
    transition: background-color 0.15s, transform 0.16s var(--ease-out);
}
.jp-route:active { transform: scale(0.98); }
.jp-route svg { width: 18px; height: 18px; color: var(--ink-2); }
.jp-route .jp-pen { position: absolute; right: 12px; top: 50%; margin-top: -9px; }
@media (hover: hover) and (pointer: fine) { .jp-route:hover { background: var(--line-soft); } }
.jp-route:active { background: var(--line-soft); }
.jp.is-folded .jp-h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; }
.jp.is-folded .jp-sum { display: flex; }
.jp.is-folded .jp-ends, .jp.is-folded .jp-go { display: none; }
.jp.is-folded .jp-form { gap: 8px; margin-top: 0; }
.jp.is-folded .jp-share { display: grid; }
/* folded before the names are known (a shared link, the first moment): the shape, without words */
.jp.is-waiting .jp-route-a:empty, .jp.is-waiting .jp-route-b:empty { display: inline-block; width: 7.5em; height: 0.9em; border-radius: 4px; background: var(--line-soft); }

/* ── Messages and the answer ───────────────────────────────────────── */
.jp-msg { margin: 18px 0 0; max-width: 600px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--line-soft); font-size: 17px; }
.jp-retry { min-height: 44px; margin-left: 4px; padding: 0 4px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.jp .jp-results { margin-top: 10px; transition: opacity 0.15s; }
.jp-results.is-stale { opacity: 0.45; }
.jp-status { margin: 6px 0 2px; max-width: 600px; font-size: 17px; font-weight: 600; text-wrap: pretty; }
.jp-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 2px;
    color: var(--ink-2);
    font: 500 15px/1 var(--font);
}
.jp-more svg { width: 18px; height: 18px; }
.jp-more[disabled] { opacity: 0.5; }
@media (hover: hover) and (pointer: fine) { .jp-more:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; } }

/* the list: two lines a journey, the times in fixed columns */
.jp-js { border-top: 1px solid var(--line); }
.jp-j { position: relative; border-bottom: 1px solid var(--line); }
.jp-day { padding: 16px 0 6px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; color: var(--ink-2); }
.jp-day::first-letter { text-transform: uppercase; }
.jp-row {
    display: grid;
    gap: 8px;
    width: 100%;
    padding: 12px 0 13px;
    text-align: left;
    transition: background-color 0.15s;
}
/* the first line wraps rather than run off a narrow screen (a long Russian countdown, a
   journey over an hour): the duration then goes under it, to the right */
.jp-l1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.jp-cd { display: none; font-size: 15px; font-weight: 600; white-space: nowrap; }
.jp-js.has-cd .jp-cd { display: block; flex: 0 0 var(--jp-cdw, 4.3em); }
.jp-cd.is-live::before {
    /* the site's sign for a time that comes from the vehicle itself (as on the departure boards) */
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: currentColor;
    vertical-align: 2px;
}
.jp-tt { display: inline-flex; align-items: baseline; gap: 6px; font: 700 26px/1 var(--font-cond); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; white-space: nowrap; }
.jp-tt svg { width: 16px; height: 16px; color: var(--ink-2); align-self: center; }
.jp-tt span { font-weight: 600; color: var(--ink-2); }
.jp-dur { margin-left: auto; font-size: 15px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.jp-x { display: none; width: 24px; height: 24px; color: var(--ink-2); align-self: center; }
.jp-l2 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-width: 0; }
.jp-chain { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.jp .jp-chain .plate, .jp .jp-step .plate { min-width: 34px; height: 26px; padding: 0 6px; font-size: 17px; }
.jp-pl { display: inline-flex; align-items: center; gap: 3px; }
.jp-pl .badge { padding: 1px 5px; font: 700 13px/1.3 var(--font); }
.jp-then { width: 12px; height: 12px; color: var(--ink-2); }
.jp-walkc { display: inline-flex; align-items: center; gap: 2px; font-size: 15px; color: var(--ink-2); white-space: nowrap; }
.jp-walkc svg, .jp-walkico { width: 18px; height: 18px; }
.jp-walkc svg circle, .jp-walkico circle { fill: currentColor; stroke: none; }
.jp-ch { font-size: 15px; color: var(--ink-2); white-space: nowrap; }
.jp-risk { display: inline-flex; align-items: center; gap: 5px; font-size: 15px; font-weight: 600; color: var(--ink); }
.jp-risk svg { width: 20px; height: 20px; fill: var(--ochre); stroke: var(--ochre-ink); stroke-width: 1.5; }
.jp-tt s { font-weight: 600; color: var(--ink-2); text-decoration-thickness: 2px; }
.jp-j.is-gone > .jp-row { opacity: 0.5; }
/* journeys that have already left, folded into one line above the rest */
.jp-j.is-tucked { display: none; }
.jp-gone { border-bottom: 1px solid var(--line); }
.jp-gonebtn { min-height: 44px; padding: 0 2px; font-size: 15px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .jp-gonebtn:hover { color: var(--ink); } }
/* journeys added by "earlier" or "later" come in one after another, so one sees which are new */
.jp-js.is-new .jp-j.is-fresh { animation: jp-in 0.22s var(--ease-out) backwards; animation-delay: calc(var(--n, 0) * 40ms); }
@keyframes jp-in { from { opacity: 0; transform: translateY(-4px); } }

/* skeleton while the first answer is on its way: the shape of three rows, standing still */
.jp-skel { display: grid; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.jp-skel i { display: block; height: 22px; width: 62%; border-radius: 5px; background: var(--line-soft); }
.jp-skel i + i { height: 18px; width: 38%; }

/* ── One journey, opened: a card ───────────────────────────────────── */
.jp-j.is-open {
    margin: 8px -10px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-panel);
    background: var(--paper);
    box-shadow: 0 1px 2px rgba(20, 24, 30, 0.05), 0 8px 24px rgba(20, 24, 30, 0.07);
}
:root[data-theme="dark"] .jp-j.is-open { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); }
.jp-j.is-open + .jp-j, .jp-j.is-open + .jp-day { border-top: 1px solid var(--line); }
/* its first line stays in view while the steps are read, with the way to close it */
.jp-j.is-open > .jp-row {
    position: sticky;
    top: var(--jp-sticky);
    z-index: 3;
    padding: 12px 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    border-radius: var(--r-panel) var(--r-panel) 0 0;
}
.jp-j.is-open > .jp-row .jp-l2 { display: none; }
.jp-j.is-open > .jp-row .jp-x { display: block; }
.jp-j.is-open > .jp-row .jp-dur { margin-left: auto; }
.jp-card { padding: 6px 0 14px; }
.jp-card.is-opening { animation: jp-open 0.2s var(--ease-out) backwards; }
@keyframes jp-open { from { opacity: 0; transform: translateY(-4px); } }

.jp-steps { margin-top: 4px; }
.jp-step { position: relative; }
.jp-node, .jp-via, .jp-walk, .jp-change { display: grid; grid-template-columns: var(--jp-tw) var(--jp-rail) minmax(0, 1fr); column-gap: 10px; }
/* Every row of a step is lined up on the middle of its first line, 22 px from its top: the
   time, the dot and the name. A ride's bar in the colour of its mode runs from the dot where
   one gets on to the dot where one gets off, made of a half below the first dot, the part
   beside the line and its stops, and a half above the last dot, so a name over two lines
   does not break it. */
.jp-time { grid-column: 1; align-self: start; margin-top: 12px; text-align: right; white-space: nowrap; }
.jp-time time { display: block; font: 700 20px/1 var(--font-cond); font-variant-numeric: tabular-nums; }
.jp-time s { display: block; margin-top: 4px; font: 500 13px/1 var(--font); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.jp-dot { grid-column: 2; position: relative; }
.jp-dot::after { content: ''; position: absolute; z-index: 1; left: 50%; top: 14px; width: 16px; height: 16px; margin-left: -8px; border: 4px solid var(--mode); border-radius: 50%; background: var(--paper); }
.jp-dot::before { content: ''; position: absolute; left: 50%; width: 6px; margin-left: -3px; background: var(--mode); }
.is-from .jp-dot::before { top: 22px; bottom: 0; }
.is-to .jp-dot::before { top: 0; height: 22px; }
.jp-stop { grid-column: 3; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-height: 44px; padding: 11px 0 8px; }
.jp-stop b { font-size: 17px; line-height: 22px; font-weight: 600; }
/* a name is a link to the stop's page: tall enough to tap without moving the line (an inline
   element's padding widens what reacts to a tap, not the line it sits in) */
.jp-stop a { padding: 12px 0; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .jp-stop a:hover { text-decoration: underline; } }
.jp-pc, .jp-req, .jp-arrlive { font-size: 15px; color: var(--ink-2); white-space: nowrap; }
.jp-req { font-style: italic; }
.jp-arrlive { flex-basis: 100%; }
.jp-via::before { content: ''; grid-column: 2; grid-row: 1; justify-self: center; width: 6px; background: var(--mode); }
.jp-via > div { grid-column: 3; grid-row: 1; display: grid; gap: 2px; padding: 2px 0 6px; }
.doc .jp-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; max-width: none; font-size: 15px; color: var(--ink-2); }
.jp-line a.plate { position: relative; text-decoration: none; }
.jp-line a.plate::after { content: ''; position: absolute; inset: -9px -5px; }
.doc .jp-live { margin: 2px 0 0; font-size: 15px; color: var(--ink); }
.jp-live.is-quiet { color: var(--ink-2); }
.jp-live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: currentColor; vertical-align: 2px; }
.jp-stops summary { display: flex; align-items: center; gap: 4px; width: fit-content; min-height: 44px; font-size: 15px; color: var(--ink-2); cursor: pointer; list-style: none; }
.jp-stops summary::-webkit-details-marker { display: none; }
.jp-stops summary svg { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
.jp-stops[open] summary svg { transform: rotate(180deg); }
.doc .jp-nonstop { min-height: 32px; padding-top: 6px; font-size: 15px; color: var(--ink-2); }
.doc-body .jp-stops ol { margin: 0 0 6px; }
.jp-stops li { display: flex; gap: 10px; min-height: 44px; align-items: center; font-size: 15px; }
.jp-stops time { flex: none; min-width: 40px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.jp-stops a { padding: 12px 0; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .jp-stops a:hover { text-decoration: underline; } }

/* on foot at the start or the end: a dotted rail */
.jp-walk::before, .jp-change::before { content: ''; grid-column: 2; grid-row: 1; justify-self: center; width: 0; border-left: 4px dotted var(--ink-3); }
/* a note after the end (the stop a walk from the station): not a step, so no rail */
.jp-walk.is-note::before { border-left: 0; }
.jp-walk > p { grid-column: 3; grid-row: 1; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 0; font-size: 15px; color: var(--ink-2); }

/* a change: walk and wait in one block, with the warning when the live feed sees it fail */
.jp-change { padding: 4px 0; }
.jp-chg { grid-column: 3; grid-row: 1; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 8px; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--r-ctl); background: var(--line-soft); font-size: 15px; color: var(--ink-2); }
.jp-chg-i { display: flex; height: 21px; align-items: center; }
.jp-chg-i svg { width: 18px; height: 18px; }
.doc .jp-chg p { margin: 0; }
.jp-chg.is-risk { border-color: color-mix(in srgb, var(--ochre) 55%, transparent); background: color-mix(in srgb, var(--ochre) 14%, var(--paper)); color: var(--ink); }
.jp-chg.is-missed { background: color-mix(in srgb, var(--ochre) 24%, var(--paper)); }
.jp-chg .jp-warnline { font-weight: 600; }
.jp-chg .jp-warn svg { width: 20px; height: 20px; fill: var(--ochre); stroke: var(--ochre-ink); stroke-width: 1.5; }
.jp-instead { min-width: 0; }
.jp-step.is-void { opacity: 0.45; }
.jp-chg .plate { min-width: 30px; height: 22px; padding: 0 5px; font-size: 15px; vertical-align: 1px; }
.jp-altbtn {
    transition: transform 0.16s var(--ease-out);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    width: 100%;
    min-height: 44px;
    padding: 6px 10px;
    border: 1px solid color-mix(in srgb, var(--ochre-ink) 25%, transparent);
    border-radius: var(--r-ctl);
    background: var(--paper);
    font-size: 15px;
    text-align: left;
}
.jp-altbtn:active { transform: scale(0.98); }
.jp-altbtn b { font: 700 18px/1 var(--font-cond); font-variant-numeric: tabular-nums; }
.jp-altbtn .jp-chain, .jp-risk .jp-chain { flex-wrap: nowrap; }
.jp-altbtn > svg:last-child { width: 18px; height: 18px; margin-left: auto; color: var(--ink-2); transition: transform 0.2s var(--ease); }
.jp-altbtn[aria-expanded="true"] > svg:last-child { transform: rotate(180deg); }
.jp-alt { margin: 4px 0 0; padding: 4px 0 0; }
.jp-alt .jp-steps { margin: 0; }

/* the ticket in one line, the rest behind (i) */
.jp-ticket { display: flex; align-items: center; gap: 4px; margin-top: 10px; padding-top: 6px; border-top: 1px solid var(--line-soft); font-size: 15px; color: var(--ink-2); }
.jp-ticket > span { flex: 1; min-width: 0; }
.jp-ticket b { font-weight: 600; color: var(--ink); }
.jp-ticket a { padding: 12px 0; font-weight: 600; white-space: nowrap; }
.jp-ticket .jp-icon { width: 44px; height: 44px; }
.jp-ticket .jp-icon[aria-expanded="true"] { background: var(--line-soft); color: var(--ink); }
.doc .jp-tmore { max-width: 62ch; padding-bottom: 4px; font-size: 15px; color: var(--ink-2); }
.jp-tmore a { display: inline-block; min-height: 44px; padding-top: 11px; font-weight: 600; white-space: nowrap; }

/* the map of an open journey on a phone: a preview that opens full screen */
.jp-mapslot { position: relative; height: 180px; margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; isolation: isolate; background: var(--ground); }
.jp-mapslot:not(:has(#jpmap)) .jp-mapbtn span { display: none; }
.jp-mapbtn { position: absolute; inset: 0; z-index: 800; display: flex; align-items: flex-end; justify-content: flex-end; padding: 8px; }
.jp-mapbtn span { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--paper); font-size: 15px; font-weight: 600; box-shadow: 0 1px 3px rgba(20, 24, 30, 0.12); }
.jp-mapbtn span svg { width: 18px; height: 18px; }

.jp-full { position: fixed; inset: 0; z-index: 1300; display: flex; flex-direction: column; background: var(--paper); animation: jp-sheet 0.26s var(--ease) backwards; }
@keyframes jp-sheet { from { opacity: 0; transform: translateY(24px); } }
/* opened from the keyboard: at once, as keyboard actions should be */
.jp-pick.is-kb, .jp-full.is-kb { animation: none; }
.jp-full[hidden] { display: none; }
.jp-full-top { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 6px max(8px, env(safe-area-inset-right)) 6px max(16px, env(safe-area-inset-left)); padding-top: max(6px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); }
.jp-full-top p { flex: 1; min-width: 0; font: 700 20px/1.1 var(--font-cond); font-variant-numeric: tabular-nums; }
.jp-full-top p span { font: 500 15px/1.3 var(--font); color: var(--ink-2); }
.jp-full-map { position: relative; flex: 1; min-height: 0; isolation: isolate; }
html.jp-locked, html.jp-locked body { overflow: hidden; }

/* names on the map: small, only where one gets on, changes and gets off */
.leaflet-tooltip.jp-tip { padding: 2px 7px 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); font: 600 13px/1.25 var(--font); box-shadow: 0 1px 2px rgba(20, 24, 30, 0.12); white-space: nowrap; }
.leaflet-tooltip.jp-tip::before { display: none; }

.jp-foot { margin-top: 26px; max-width: 600px; font-size: 15px; color: var(--ink-2); }

/* ── Phones and narrow windows ─────────────────────────────────────── */
@media (max-width: 999px) {
    /* the top bar scrolls away here: the open journey's own first line is what stays */
    body[data-p="plan"] .site-top { position: relative; }
    :root:has(body[data-p="plan"]) { scroll-padding-top: 8px; }
    .jp-mapcol { display: none; }
    .jp .doc-rest { padding-bottom: 40px; }
    .jp.is-folded .doc-intro { padding-top: 10px; }
    /* typing a stop on a phone: room below the field, so it can sit at the top above the keyboard */
    .jp.is-typing { padding-bottom: 100vh; }
}
@media (max-width: 420px) {
    .jp { --jp-tw: 46px; --jp-rail: 20px; }
    .jp-field { grid-template-columns: 64px minmax(0, 1fr); padding-left: 14px; }
    .jp-tt { font-size: 25px; }
    .jp-seg span { padding: 0 11px; }
}
/* the smallest phones: the times a little smaller, and the open card's pinned first line
   keeps the countdown, the times and the close button, leaving out the duration */
@media (max-width: 380px) {
    .jp-l1 { column-gap: 8px; }
    .jp-tt { gap: 4px; font-size: 23px; }
    .jp-tt svg { width: 14px; height: 14px; }
}
@media (max-width: 360px) {
    .jp-j.is-open > .jp-row .jp-dur { display: none; }
    .jp-j.is-open > .jp-row .jp-x { margin-left: auto; }
}

/* ── Wide screens: the list on the left, the chosen journey on the map ─ */
@media (min-width: 1000px) {
    .jp { --jp-sticky: 60px; }
    .jp-mapslot { display: none; }
    .jp.is-folded .doc-intro { padding-top: 22px; }
    .jp-row { margin: 0 -12px; padding-inline: 12px; width: calc(100% + 24px); border-radius: var(--r-ctl); }
    .jp-j.is-open > .jp-row { margin: 0; width: 100%; padding-inline: 0; }
    .jp-j.is-sel:not(.is-open) > .jp-row { background: color-mix(in srgb, var(--ink) 6%, var(--paper)); }
}
@media (min-width: 1000px) and (hover: hover) and (pointer: fine) {
    .jp-j:not(.is-open) > .jp-row:hover { background: var(--line-soft); }
}

/* less motion asked for: the site stops every animation and transition (styles.css); here
   also the press that shrinks a button and the turned swap arrows stay still */
@media (prefers-reduced-motion: reduce) {
    .jp-icon:active, .jp-when:active, .jp-done:active, .jp-go:active, .jp-route:active, .jp-altbtn:active, .jp-swap.is-turned svg { transform: none; }
}

/* ── A journey set off on (the trip; public/trip.js) ─────────────────── */
/* the way in: one button on top of an open card */
.jp-startrow { padding: 4px 0 6px; }
.jp-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px 0 18px;
    border-radius: var(--r-ctl);
    background: var(--focus);
    color: #fff;
    font: 600 17px/1 var(--font);
    transition: transform 0.16s var(--ease-out), filter 0.15s;
}
.jp-start svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
@media (hover: hover) and (pointer: fine) { .jp-start:hover { filter: brightness(1.08); } }
.jp-start:active { transform: scale(0.97); }
:root[data-theme="dark"] .jp-start { color: #10151f; }
@media (max-width: 999px) { .jp-start { width: 100%; } }

/* the answer is now that journey: what else the list had is put away */
.jp.is-trip .jp-more, .jp.is-trip .jp-status, .jp.is-trip .jp-day, .jp.is-trip .jp-gone { display: none; }
.jp.is-trip .jp-j.is-open > .jp-row { cursor: default; }
.jp.is-trip .jp-j.is-open > .jp-row .jp-x { display: none; }

/* what to do now: the line, the thing to do and where, the minutes beside it */
.jp-trip {
    display: grid;
    gap: 10px;
    margin: 2px 0 10px;
    padding: 14px 14px 12px;
    border: 1px solid color-mix(in srgb, var(--focus) 35%, transparent);
    border-radius: var(--r-panel);
    background: color-mix(in srgb, var(--focus) 7%, var(--paper));
}
.jp-trip-now { display: flex; align-items: flex-start; gap: 12px; }
.jp-trip-now .plate { flex: none; margin-top: 1px; }
.jp-trip-ico { display: grid; place-items: center; flex: none; width: 36px; height: 28px; border-radius: var(--r-plate); background: var(--ink); color: var(--paper); }
.jp-trip-ico svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.jp-trip.is-done .jp-trip-ico { background: var(--trolley); color: #fff; }
.doc .jp-trip-txt { flex: 1; min-width: 0; display: grid; gap: 3px; margin: 0; }
.jp-trip-txt b { font-size: 19px; line-height: 1.25; font-weight: 650; color: var(--ink); }
.jp-trip-txt span { font-size: 15px; line-height: 1.35; color: var(--ink-2); }
.doc .jp-trip-n { flex: none; display: grid; justify-items: center; min-width: 44px; margin: 0; line-height: 1; }
.jp-trip-n b { font: 700 32px/1 var(--font-cond); font-variant-numeric: tabular-nums; color: var(--ink); }
.jp-trip-n small { margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.doc .jp-trip-warn { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 10px; border-radius: var(--r-ctl); background: color-mix(in srgb, var(--ochre) 20%, var(--paper)); font-size: 15px; font-weight: 600; color: var(--ink); }
.jp-trip-warn svg { width: 20px; height: 20px; fill: var(--ochre); stroke: var(--ochre-ink); stroke-width: 1.5; }
.jp-trip-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.jp-trip-acts button {
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-ctl);
    background: var(--paper);
    color: var(--ink);
    font: 500 15px/1 var(--font);
    transition: transform 0.16s var(--ease-out), background-color 0.15s;
}
.jp-trip-acts button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .jp-trip-acts button:hover { background: var(--line-soft); } }
.jp-trip-acts .jp-tend { margin-left: auto; }
.jp-trip.is-done .jp-tend { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* the steps: behind faded, now marked with a band behind it */
.jp.is-trip .jp-step.is-past { opacity: 0.42; }
/* (a walk's and a change's ::before is their rail: the band is the step's own background,
   carried 8 px out to each side by its shadow) */
.jp.is-trip .jp-step.is-now {
    --jp-now: color-mix(in srgb, var(--focus) 8%, var(--paper));
    background: var(--jp-now);
    box-shadow: -8px 0 0 var(--jp-now), 8px 0 0 var(--jp-now);
    border-radius: 2px;
}
.jp.is-trip .jp-step.is-now .jp-stop b { color: var(--ink); }

/* the phone's own place on the map */
.jp-me span { display: block; width: 18px; height: 18px; margin: 2px; border: 3px solid #fff; border-radius: 50%; background: var(--focus); box-shadow: 0 0 0 6px color-mix(in srgb, var(--focus) 22%, transparent), 0 1px 3px rgba(0, 0, 0, 0.3); }

/* the vehicles of the journey's lines: the one matched to a ride with a ring, the others smaller */
.vm-wrap.jp-vown .vm-plate { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink), 0 2px 6px rgba(0, 0, 0, 0.3); }
.vm-wrap.jp-voth { opacity: 0.88; }
.vm-wrap.jp-voth .vm-plate { transform: scale(0.84); }
.vm-wrap.jp-voth:hover .vm-plate { transform: scale(1); }

/* the ticket bought in the IDS BK app: a link beside the price */
.jp-ticket .jp-tapp { margin-right: 4px; }
/* inside a sentence: its padding widens the tap, not the line */
.jp-tmore .jp-tsms { display: inline; min-height: 0; padding: 12px 0; }
