@font-face {
  font-family: 'Gagarina Matrix';
  src: url('/fonts/GagarinaMatrix.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --amber: #ff9f21;
  --highlight: #a5c878;
  --muted: #b57932;
  --line: #422900;
  --pixel: 'Gagarina Matrix', monospace;
  background: #000;
  color: var(--amber);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: #000; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--amber); outline-offset: 5px; }
.display { max-width: 1000px; min-height:100svh; margin: 0 auto; display:flex; flex-direction:column; touch-action:pan-y pinch-zoom; padding: max(26px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
.display-header { position:relative; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 26px; border-bottom: 2px solid var(--amber); }
.display-header > div { min-width:0; }
.install-banner { display:flex; align-items:center; gap:10px; padding:12px 0; border-bottom:1px solid var(--line); }
.install-banner > div { flex:1; min-width:0; }
.install-banner strong, .install-banner span { display:block; }
.install-banner strong { font-size:13px; }
.install-banner span { color:var(--muted); font-size:11px; margin-top:3px; }
.install-banner button { min-height:40px; padding:0 12px; background:var(--amber); color:#171006; border:0; border-radius:4px; font-weight:700; cursor:pointer; }
.install-banner #install-dismiss { min-width:36px; padding:0; background:none; color:var(--muted); font-size:24px; }
.install-banner button:focus-visible { outline:2px solid var(--amber); outline-offset:3px; }
dialog .install-steps { color:var(--amber); font-size:15px; line-height:1.6; }
.header-tools { display:flex; align-items:center; gap:12px; flex-shrink:0; }
.settings-button { width:40px; height:40px; padding:0; display:grid; place-items:center; flex-shrink:0; border:1px solid var(--line); border-radius:4px; background:none; color:var(--amber); font-size:21px; line-height:1; cursor:pointer; }
.settings-button:focus-visible { outline:2px solid var(--amber); outline-offset:3px; }
h1, .empty-title-reserve { font: 400 clamp(27px, 7.2vw, 44px)/1.1 var(--pixel); margin: 0; text-transform: uppercase; overflow-wrap:anywhere; }
.header-title { position:relative; }
.empty-title-reserve { display:none; visibility:hidden; }
.empty-header .empty-title-reserve { display:block; }
.empty-header h1 { position:absolute; top:0; left:0; width:100%; }
.street { color: var(--muted); font-size: 12px; margin: 7px 0 0; }
.clock { display: flex; align-items: baseline; flex-shrink: 0; font: 400 clamp(40px, 12vw, 68px)/1 var(--pixel); }
.colon { display: inline-block; }
/* Only fresh forecasts animate; stale clocks keep a steady separator. */
.live .colon { animation: blink-colon 1s steps(1, end) infinite; }
.boards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 42px; }
.board { min-width: 0; }
h2 { font: 400 clamp(20px, 4.9vw, 30px)/1.3 var(--pixel); margin: 26px 0 18px; white-space: nowrap; text-transform: uppercase; }
h2 span { font-family: var(--pixel); font-size: 1em; }
table { width: 100%; table-layout: fixed; border-collapse: collapse; }
th { color: var(--muted); font-size: 12px; font-weight: 400; padding: 0 0 12px; text-align: left; }
th:first-child { width: 40%; }
th:last-child { text-align: right; }
td { height: 76px; padding: 14px 0; border-top: 1px solid var(--line); font: 400 clamp(29px, 9.25vw, 52px)/1 var(--pixel); vertical-align: middle; }
td:last-child { text-align: right; }
.arrival-time { display: inline-flex; align-items: baseline; white-space: nowrap; }
.arrival-time .colon { padding: 0; }
.stale td { color: var(--muted); }
.route-kind { font: 600 12px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; margin-right: 8px; color: var(--muted); vertical-align: middle; }
.route-button { appearance:none; min-width:44px; min-height:44px; padding:0; border:0; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.route-button[aria-pressed="true"] { color:var(--highlight); }
.route-button[aria-pressed="true"] .route-kind { color:inherit; }
.stale .route-button[aria-pressed="true"] { color:#7b9065; }
.route-button:focus-visible { outline:2px solid currentColor; outline-offset:3px; }
.stale-mark { font-family: sans-serif; font-size: .65em; vertical-align: top; }
.empty { height: 90px; text-align: left !important; font: italic 400 13px/1.8 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #a98a67; }
.updated { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 14px 0 0; }
.notice { font-size: 12px; line-height: 1.6; padding: 14px 0 0; margin: 0; color: var(--amber); }
.card-nav { display:flex; align-items:center; justify-content:space-between; gap:10px; margin: 29px 0 0; color:var(--muted); font-size:13px; }
.card-nav button { background:none; color:var(--amber); border:1px solid var(--line); border-radius:4px; width:42px; height:38px; font-size:27px; line-height:1; cursor:pointer; }
.card-nav button:focus-visible { outline:2px solid var(--amber); outline-offset:3px; }
dialog { width:min(560px, calc(100% - 24px)); max-height:90dvh; background:#111; border:1px solid var(--amber); border-radius:8px; color:var(--amber); padding:20px; font:14px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
dialog::backdrop { background:#000c; }
dialog p { color:var(--muted); font-size:12px; }
dialog h2 { margin:0; font-size:24px; white-space:normal; }
dialog h3 { font-size:15px; margin:24px 0 12px; }
.route-hint { display:flex; align-items:center; gap:13px; margin-top:18px; color:#e9bb7c; font-size:14px; line-height:1.35; }
#settings .route-hint button { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; padding:0; background:none; border-color:var(--line); color:var(--amber); font:400 22px/1 var(--pixel); }
#settings .route-hint button[aria-pressed="true"] { color:var(--highlight); }
dialog button { cursor:pointer; background:#191100; color:var(--amber); border:1px solid #65400c; border-radius:4px; padding:8px 10px; min-height:44px; }
dialog button:focus-visible, dialog input:focus-visible { outline:2px solid var(--amber); outline-offset:2px; }
dialog button:disabled { opacity:.35; cursor:default; }
.settings-header { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.settings-header button { font-size:24px; line-height:1; }
.favorite-row,.search-result { border-top:1px solid var(--line); padding:12px 0; }
.favorite-row { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.favorite-row { position:relative; }
.favorite-row.is-dissolving { pointer-events:none; }
.favorite-row.is-dissolving > * { animation:favorite-dissolve .65s ease-in forwards; }
.favorite-row.is-dissolving::after { content:''; position:absolute; inset:0; pointer-events:none; background:radial-gradient(circle at 12% 30%, var(--amber) 1px, transparent 2px), radial-gradient(circle at 28% 70%, var(--amber) 1px, transparent 2px), radial-gradient(circle at 45% 40%, var(--amber) 1px, transparent 2px), radial-gradient(circle at 61% 65%, var(--amber) 1px, transparent 2px), radial-gradient(circle at 78% 30%, var(--amber) 1px, transparent 2px), radial-gradient(circle at 92% 70%, var(--amber) 1px, transparent 2px); animation:favorite-dust .65s ease-out forwards; }
.favorite-row.joining-first { animation:join-first .52s ease-in-out forwards; pointer-events:none; }
.join-row.is-joining + .favorite-row { animation:join-second .52s ease-in-out forwards; pointer-events:none; }
.join-row.is-joining .join-button svg { animation:join-link .52s ease-in-out forwards; }
@keyframes favorite-dissolve { 0%, 10% { opacity:1; transform:translateX(0); filter:blur(0); } 100% { opacity:0; transform:translateX(20px); filter:blur(3px); } }
@keyframes favorite-dust { 0%, 15% { opacity:0; transform:translate(0, 0); } 35% { opacity:.9; } 100% { opacity:0; transform:translate(28px, -12px); } }
@keyframes join-first { to { transform:translateY(8px); } }
@keyframes join-second { to { transform:translateY(-8px); } }
@keyframes join-link { 0% { transform:scale(.8) rotate(-18deg); } 65%, 100% { transform:scale(1.15) rotate(0); } }
@media (prefers-reduced-motion: reduce) { .favorite-row.is-dissolving > *, .favorite-row.is-dissolving::after, .favorite-row.joining-first, .join-row.is-joining + .favorite-row, .join-row.is-joining .join-button svg { animation:none !important; } }
.favorite-controls { display:flex; gap:4px; flex-shrink:0; }
.favorite-controls button { width:44px; padding:0; font-size:19px; }
.favorite-name { overflow-wrap:anywhere; }
.stop-search-row { display:flex; align-items:stretch; gap:8px; }
.stop-search-row input { min-width:0; flex:1; }
.nearby-search { display:inline-flex; justify-content:center; align-items:center; flex:none; gap:6px; white-space:nowrap; }
.nearby-search svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
.search-result { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 10px; align-items:start; }
.search-result-info { min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:4px; }
.search-result strong { overflow-wrap:anywhere; }
.search-result small { color:var(--muted); }
.search-result .stop-destinations { color:#d3ac77; overflow-wrap:anywhere; }
.search-result-links { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.search-result-links button { padding:3px 7px; font-size:12px; }
.search-result-add { justify-self:end; width:44px; height:44px; padding:10px; display:grid; place-items:center; }
.search-result-add svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.search-result-add.selected { opacity:1; color:var(--highlight); border-color:#52693c; }
.search-result-add.selected svg { fill:currentColor; }
.search-result .routes-text { grid-column:1 / -1; overflow-wrap:anywhere; }
.search-result .map-link { display:inline-grid; place-items:center; width:44px; height:44px; color:var(--amber); border:1px solid #65400c; border-radius:4px; }
.map-link svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
dialog label { display:block; color:var(--muted); font-size:12px; margin-bottom:5px; }
dialog input { width:100%; color:#fff; background:#080808; border:1px solid #65400c; border-radius:4px; padding:12px; font-size:16px; }
.map-dialog { width:min(720px, calc(100% - 24px)); padding:16px; }
.map-dialog iframe { display:block; width:100%; height:min(60svh, 520px); min-height:220px; margin-top:12px; border:1px solid var(--line); background:#191100; }
.map-choices { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.map-choices button { font-size:12px; }
.map-choices button[aria-pressed="true"] { background:var(--amber); color:#171006; }
.map-external { display:inline-block; margin-top:8px; font-size:12px; color:var(--muted); text-decoration:underline; text-underline-offset:2px; }
.join-hint { margin:12px 0 8px; }
.join-row { display:flex; align-items:center; gap:8px; margin:-1px 0; }
.join-row + .favorite-row { border-top:0; }
.join-row::before, .join-row::after { content:''; flex:1; border-top:1px solid var(--line); }
.join-row .join-button { display:grid; place-items:center; width:44px; height:44px; padding:10px; }
.join-button svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.group-title { white-space:normal; overflow-wrap:anywhere; font-size:clamp(15px,4vw,24px); }
.group-member { display:block; color:var(--muted); font-size:12px; line-height:1.4; }
.group-origin { display:block; color:var(--muted); font:400 11px/1.3 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; overflow-wrap:anywhere; }
.favorite-controls .group-icon { height:44px; display:grid; place-items:center; padding:8px; }
.group-icon svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.group-icon path { transform-box:view-box; transform-origin:center; }
.animate-swap .icon-top { animation:swap-top .42s ease-in-out; }
.animate-swap .icon-bottom { animation:swap-bottom .42s ease-in-out; }
.animate-split .icon-left { animation:part-left .42s ease-in-out forwards; }
.animate-split .icon-right { animation:part-right .42s ease-in-out forwards; }
.animate-merge .icon-left { animation:part-right .42s ease-in-out forwards; }
.animate-merge .icon-right { animation:part-left .42s ease-in-out forwards; }
.icon-chain-whole { opacity:0; }
.animate-unlink .icon-chain-whole { animation:chain-whole .42s linear forwards; }
.animate-unlink .icon-chain-left { animation:chain-left .42s ease-in forwards; }
.animate-unlink .icon-chain-right { animation:chain-right .42s ease-in forwards; }
.animate-unlink .icon-cut { animation:chain-cut .42s ease-out forwards; }
@keyframes swap-top { 45% { transform:translateX(3px); } 85% { transform:translateX(-1px); } }
@keyframes swap-bottom { 45% { transform:translateX(-3px); } 85% { transform:translateX(1px); } }
@keyframes part-left { to { transform:translateX(-3px); } }
@keyframes part-right { to { transform:translateX(3px); } }
@keyframes chain-whole { 0%, 54% { opacity:1; } 55%, 100% { opacity:0; } }
@keyframes chain-left { 0%, 54% { transform:none; opacity:0; } 55% { transform:none; opacity:1; } 100% { transform:translate(-4px, 4px) rotate(-12deg); opacity:.35; } }
@keyframes chain-right { 0%, 54% { transform:none; opacity:0; } 55% { transform:none; opacity:1; } 100% { transform:translate(4px, -4px) rotate(12deg); opacity:.35; } }
@keyframes chain-cut { 0%, 12% { stroke-dasharray:26; stroke-dashoffset:26; opacity:1; } 55%, 100% { stroke-dasharray:26; stroke-dashoffset:0; opacity:1; } }
@media (prefers-reduced-motion: reduce) { .group-icon path { animation:none !important; } }
.favorite-controls .unlink-button { color:#f08a7b; border-color:#7b3a33; background:#24110f; }
.favorite-row.grouped .favorite-name { min-width:0; }
@media (max-width:480px) { .favorite-row.grouped { flex-wrap:wrap; } .favorite-row.grouped .favorite-name { flex-basis:100%; } .favorite-row.grouped .favorite-controls { gap:2px; margin-left:auto; } .favorite-row.grouped .favorite-controls button { width:38px; } }
.settings-note { margin-top:24px; }
.settings-extra { border-top:1px solid var(--line); margin-top:20px; padding-top:14px; }
.settings-extra summary { cursor:pointer; color:var(--muted); padding:6px 0; }
.settings-extra summary:focus-visible { outline:2px solid var(--amber); outline-offset:3px; }
.settings-extra button { display:block; margin:10px 0 0; text-align:left; }
#profile-status { color:var(--amber); margin:10px 0; }
#profile-status:empty { display:none; }
#settings .favorite-list:not(:empty) { margin-top:12px; }
#settings h3 { margin:18px 0 10px; }
#profile-setup { padding:4px 0 14px; border-bottom:1px solid var(--line); }
#profile-setup button, #import-local { margin:4px 4px 4px 0; }
#card-container { flex:1 0 auto; display:flex; flex-direction:column; }
.empty-start { flex:1; display:flex; align-items:center; justify-content:center; min-height:220px; padding:28px 0; text-align:center; }
.empty-start-content { width:100%; max-width:390px; }
.empty-start h2 { margin:0; white-space:normal; font-size:clamp(24px, 6vw, 34px); }
.empty-start .empty-start-intro { margin:7px 0 20px; color:var(--muted); font-size:15px; }
.empty-start-steps { display:grid; gap:13px; list-style:none; padding:0; margin:0 0 23px; text-align:left; }
.empty-start-steps li { display:flex; align-items:center; gap:13px; color:#e9bb7c; font-size:14px; line-height:1.35; }
.empty-step-icon { display:grid; flex:0 0 34px; width:34px; height:34px; place-items:center; border:1px solid var(--line); border-radius:4px; color:var(--amber); }
.empty-step-icon svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.empty-route-icon { color:var(--highlight); font:400 22px/1 var(--pixel); }
.empty-route-icon span { display:block; transform:translate(1.1px, 1.1px); }
.empty-start button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:48px; padding:0 20px; border:0; border-radius:4px; background:var(--amber); color:#171006; font-size:15px; font-weight:700; cursor:pointer; }
.empty-start button span { font-size:27px; line-height:1; }
.empty-start button:focus-visible { outline:2px solid var(--amber); outline-offset:4px; }
.display-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 11px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 24px; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; }
.footer-brand img { display: block; flex: none; }
.footer-brand-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.footer-title { color:var(--amber); font-weight:600; font-size:13px; }
#release-version { color:var(--muted); font-size:10px; font-weight:400; white-space:nowrap; }
.footer-portal { margin-left: auto; }
.display-footer a:hover { color: var(--amber); }
.footer-credit a { text-decoration: underline; text-underline-offset: 2px; }
#logout-form { border-top:1px solid var(--line); margin-top:20px; padding-top:14px; }
.login-page { min-height:100dvh; display:grid; place-items:center; padding:24px; }
.login-card { width:min(100%, 370px); border:1px solid #50330c; border-radius:8px; background:#0d0b08; padding:28px; }
.login-brand { display:flex; align-items:center; gap:12px; color:var(--amber); font:400 22px/1.3 var(--pixel); text-transform:uppercase; }
.login-brand img { flex:none; }
.login-divider { height:1px; background:var(--line); margin:24px 0; }
.login-card h1 { font-size:26px; }
.login-intro { margin:12px 0 22px; color:#c9aa81; font-size:14px; line-height:1.5; }
.login-error { color:#ffbf80; background:#2b1708; border-left:2px solid var(--amber); padding:10px 12px; font-size:13px; line-height:1.5; }
.login-form { display:grid; gap:8px; }
.login-form label { color:#c9aa81; font-size:13px; margin-top:8px; }
.login-form input { width:100%; min-height:48px; border:1px solid #76501b; border-radius:4px; padding:10px 12px; color:#fff; background:#050505; font-size:16px; }
.login-form input:focus-visible, .login-form button:focus-visible { outline:2px solid var(--amber); outline-offset:3px; }
.login-form button { min-height:48px; margin-top:18px; display:flex; justify-content:space-between; align-items:center; border:0; border-radius:4px; padding:0 16px; background:var(--amber); color:#171006; font-size:15px; font-weight:700; cursor:pointer; }
noscript p { padding: 20px; }
@keyframes blink-colon { 0%, 49.999% { opacity: 1; } 50%, 100% { opacity: .15; } }
@media (max-width: 600px) {
  .display { padding: max(20px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
  .display-header { gap: 12px; padding-bottom: 19px; }
  .street { font-size: 11px; margin-top: 5px; }
  .boards { gap: 22px; }
  h2 { margin: 21px 0 17px; }
  th { font-size: 10px; padding-bottom: 10px; }
  td { height: 58px; padding: 12px 0; font-size: clamp(29px, 9.25vw, 48px); }
  .updated { font-size: 9px; }
  .display-footer { font-size: 10px; margin-top: 21px; line-height: 1.5; }
}
@media (max-width: 350px) { .boards { gap: 16px; } h1, .empty-title-reserve { font-size: 25px; } h2 { font-size: 18px; } .clock { font-size: 38px; } }
@media (prefers-reduced-motion: reduce) { .live .colon { animation: none; } }
/* Compact login and a trolley running under the wire during loading. */
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.login-page { min-height:100svh; padding:12px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); }
.login-card { padding:22px; }
.login-brand { gap:10px; align-items:center; }
.login-brand img { width:76px; height:76px; }
.brand-copy { min-width:0; }
.login-card .brand-name { font-size:22px; line-height:1.1; white-space:nowrap; letter-spacing:-.4px; }
.brand-slogan { margin:6px 0 0; color:var(--muted); font:12px/1.35 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; text-transform:none; }
.login-divider { position:relative; height:auto; background:none; border:0; border-bottom:1px solid var(--line); margin:16px 0 32px; padding:0 0 6px; }
.login-intro { margin:8px 0 14px; }
.login-form { gap:8px; }
.login-form label.visually-hidden { margin:0; }
.login-form input { min-height:46px; }
.login-form input::placeholder { color:#aa9274; opacity:1; }
.login-form button { min-height:46px; margin:4px 0 0; }
.login-form + .login-form { margin-top:14px; }
.login-form + .login-form button { margin-top:3px; }
.login-form:first-of-type button { justify-content:center; gap:10px; }
.telegram-icon { width:22px; height:22px; flex:none; }
.login-version { margin:16px 0 0; text-align:center; color:var(--muted); font-size:11px; }
.board-bottom { position:relative; border-bottom:1px solid var(--line); margin-top:22px; padding-bottom:6px; min-height:20px; }
.board-bottom .updated { text-align:right; margin:0; }
.display-footer { border-top:0; margin-top:8px; padding-top:0; }
.footer-brand img { width:48px; height:48px; }
.trolley-track { position:absolute; inset:0; overflow:hidden; pointer-events:none; }
.trolley-track svg { position:absolute; top:0; left:0; width:48px; height:26px; fill:#0d0b08; stroke:var(--amber); stroke-width:2.3; stroke-linecap:round; stroke-linejoin:round; opacity:0; }
.trolley-track svg[data-vehicle="tram"] { width:84px; }
.trolley-track svg[data-vehicle="tram-modern"] { width:78px; }
.live-vehicle { position:absolute; z-index:1; top:0; left:0; height:26px; display:flex; align-items:center; opacity:0; }
.live-vehicle.travel-right { z-index:2; }
.live-vehicle svg { position:static; display:block; flex:none; opacity:1; }
.live-vehicle.highlighted svg { stroke:var(--highlight); }
.trolley-track svg { overflow:visible; }
.vehicle-wheel { transform-box:fill-box; transform-origin:center; stroke-width:1.5; }
.trolley-poles, .tram-pantograph { transform-box:fill-box; transform-origin:center top; }
.tram-joint { transform-box:fill-box; transform-origin:center; }
.tram-detail, .tram-rail { fill:none; stroke-width:1.2; }
.is-riding .tram-joint { animation:demo-joints 10s linear both; }
.live-vehicle .tram-joint { animation:live-joints 10s linear both; }
.vehicle-passenger { opacity:0; stroke-width:1.8; }
.window-passenger { opacity:1; stroke-width:1.5; }
.passenger-1 { --passenger-delay:0s; }
.passenger-2 { --passenger-delay:.55s; }
.passenger-3 { --passenger-delay:1.1s; }
.passenger-4 { --passenger-delay:1.65s; }
.is-riding .vehicle-wheel { animation:demo-wheels 10s linear both; }
.live-vehicle .vehicle-wheel { animation:live-wheels 10s linear both; }
.is-riding .trolley-poles, .live-vehicle .trolley-poles { animation:poles-sway 1.4s ease-in-out infinite alternate; }
.is-riding .tram-pantograph, .live-vehicle .tram-pantograph { animation:pantograph-flex 1.5s ease-in-out infinite alternate; }
.is-riding .vehicle-passenger { animation:passenger-exit 1.6s calc(3s + var(--passenger-delay)) linear both; }
.live-vehicle .vehicle-passenger { animation:passenger-exit 1.6s calc(4s + var(--passenger-delay)) linear both; }
.is-riding .window-passenger { animation:window-empty .25s calc(3s + var(--passenger-delay)) linear both; }
.live-vehicle .window-passenger { animation:window-empty .25s calc(4s + var(--passenger-delay)) linear both; }
@keyframes demo-wheels { 0% { transform:rotate(0deg); } 30%, 65% { transform:rotate(720deg); } 100% { transform:rotate(1800deg); } }
@keyframes live-wheels { 0% { transform:rotate(0deg); } 40%, 75% { transform:rotate(720deg); } 100% { transform:rotate(1440deg); } }
@keyframes demo-joints {
  0%, 8%, 16%, 24%, 30%, 65%, 73%, 81%, 89%, 97%, 100% { transform:skewX(0); }
  4%, 12%, 20%, 28%, 69%, 77%, 85%, 93% { transform:skewX(9deg); }
}
@keyframes live-joints {
  0%, 8%, 16%, 24%, 32%, 40%, 75%, 83%, 91%, 99%, 100% { transform:skewX(0); }
  4%, 12%, 20%, 28%, 36%, 79%, 87%, 95% { transform:skewX(9deg); }
}
@keyframes poles-sway { from { transform:skewX(-4deg); } to { transform:skewX(4deg); } }
@keyframes pantograph-flex { from { transform:scaleY(1); } to { transform:scaleY(.88); } }
@keyframes passenger-exit { 0% { opacity:0; transform:translateX(0); } 20% { opacity:1; } 70% { opacity:1; } 100% { opacity:0; transform:translateX(-16px); } }
@keyframes window-empty { from { opacity:1; } to { opacity:0; } }
@media (prefers-reduced-motion: reduce) { .vehicle-wheel, .trolley-poles, .tram-pantograph, .tram-joint, .vehicle-passenger, .window-passenger { animation:none !important; } }
.display-header .trolley-track, .login-divider .trolley-track { top:100%; bottom:auto; height:26px; }
.micro-board { display:grid; grid-template-columns:1fr 1fr; gap:20px; color:var(--amber); font:400 14px/1.1 var(--pixel); }
.micro-side { width:100%; max-width:105px; }
.micro-side:last-child { justify-self:end; }
.micro-direction { display:block; color:var(--muted); margin-bottom:3px; }
.micro-side > div { display:flex; justify-content:space-between; gap:10px; }
.micro-side small { margin-left:3px; font:600 9px/1 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; color:var(--muted); }
.board-bottom .micro-board { margin-top:5px; }
.arrival-options + .favorite-list { margin-top:22px; }
.minute-unit { margin-left:4px; font: 600 11px/1 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; color:var(--muted); }
.arrival-options { display:flex; gap:6px; }
.arrival-options button { flex:1; font-size:12px; }
.arrival-options button[aria-pressed="true"] { background:var(--amber); border-color:var(--amber); color:#171006; font-weight:700; }
dialog .logout-button { display:inline-flex; align-items:center; gap:8px; color:#f08a7b; border-color:#7b3a33; background:#24110f; }
.logout-button svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
@media (max-width:350px) { .login-brand img { width:64px; height:64px; } .login-card .brand-name { font-size:21px; } }
@media (max-height: 680px) { .login-page { align-items:start; } .login-card { padding:16px 20px; } .login-divider { margin:12px 0 30px; } .login-intro { margin:6px 0 10px; } .login-version { margin-top:10px; } }

.error-link { display:flex; justify-content:space-between; align-items:center; min-height:46px; padding:0 16px; background:var(--amber); color:#171006; border-radius:4px; font-weight:700; }
.max-code { margin:14px 0; color:var(--amber); font:400 36px/1.2 var(--pixel); letter-spacing:.12em; text-align:center; }
.max-action { display:flex; justify-content:center; align-items:center; width:100%; min-height:48px; padding:10px 16px; border:0; border-radius:4px; background:var(--amber); color:#171006; font-size:15px; font-weight:700; cursor:pointer; }
.max-action:focus-visible { outline:2px solid var(--amber); outline-offset:4px; }
.max-login-form button { justify-content:center; gap:10px; }
.max-mark { display:inline-grid; place-items:center; width:28px; height:28px; border:1.5px solid currentColor; border-radius:9px; font:700 8px/1 -apple-system,BlinkMacSystemFont,sans-serif; }

/* Visual details shared by the arrival board and the login demonstration. */
.trolley-track svg[data-vehicle^="tram"] { stroke-width:1.45; }
.tram-detail { stroke-width:.8; }
.trolley-body { transform-box:fill-box; transform-origin:center; }
.is-riding .trolley-body { animation:demo-bounce 10s linear both; }
.live-vehicle .trolley-body { animation:live-bounce 10s linear both; }
@keyframes demo-bounce { 0%,8%,16%,24%,30%,65%,73%,81%,89%,97%,100% { transform:translateY(0); } 4%,12%,20%,28%,69%,77%,85%,93% { transform:translateY(.9px); } }
@keyframes live-bounce { 0%,8%,16%,24%,32%,40%,75%,83%,91%,99%,100% { transform:translateY(0); } 4%,12%,20%,28%,36%,79%,87%,95% { transform:translateY(.9px); } }
.live-vehicle.highlighted .vehicle-passenger { stroke:var(--amber); }
.live-vehicle.highlighted .vehicle-passenger.passenger-2, .live-vehicle.highlighted .vehicle-passenger.passenger-3 { stroke:var(--highlight); }
.footer-brand img { width:56px; height:56px; }
.footer-title { font-size:1.12em; }
.max-icon { width:23px; height:23px; object-fit:contain; flex:none; }
#settings .favorite-row .favorite-name { font-weight:400; }
@media (prefers-reduced-motion: reduce) { .trolley-body { animation:none !important; } }

.favorite-description { font-weight:300; color:var(--muted); }
.max-cancel { display:flex; justify-content:center; align-items:center; min-height:44px; color:var(--muted); text-decoration:underline; text-underline-offset:3px; }

.account-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; color:var(--muted); font-size:13px; }
.account-row button { min-height:38px; background:none; color:#d37f76; border-color:#653e39; font-size:12px; }

.account-row { color:var(--amber); font-size:14px; }
.account-label { display:inline-flex; align-items:center; gap:9px; }
.account-label svg, .account-label img { display:block; width:24px; height:24px; flex:none; }
.account-row button { display:grid; place-items:center; width:40px; height:40px; min-height:40px; padding:0; border:0; background:transparent; color:#d1847a; font-size:25px; line-height:1; }

.gear-icon { display:block; width:25px; height:25px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
#choose-stops .gear-icon { width:30px; height:30px; }

@media (min-width: 768px) { .boards { gap:clamp(56px, 8vw, 88px); } }

.bus-smoke { opacity:0; fill:none; stroke-width:1; }
.smoke-1 { --smoke-delay:0s; }
.smoke-2 { --smoke-delay:.65s; }
.smoke-3 { --smoke-delay:1.3s; }
.is-riding .bus-smoke { animation:bus-puff .8s calc(6.5s + var(--smoke-delay)) ease-out both; }
.live-vehicle .bus-smoke { animation:bus-puff .8s calc(7.5s + var(--smoke-delay)) ease-out both; }
@keyframes bus-puff { 0% { opacity:0; transform:translate(0, 0) scale(1); } 25% { opacity:.8; } 100% { opacity:0; transform:translate(-9px, -5px) scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .bus-smoke { animation:none !important; } }

.tatra-bogie { fill:none; stroke-width:.85; }

/* The modern tram's single-arm collectors flex while rolling, and rest at the stop. */
.is-riding[data-vehicle="tram-modern"] .tram-pantograph { animation:modern-pantograph-demo 10s linear both; }
.live-vehicle svg[data-vehicle="tram-modern"] .tram-pantograph { animation:modern-pantograph-live 10s linear both; }
@keyframes modern-pantograph-demo {
  0%, 8%, 16%, 24%, 30%, 65%, 73%, 81%, 89%, 97%, 100% { transform:scaleY(1); }
  4%, 12%, 20%, 28%, 69%, 77%, 85%, 93% { transform:scaleY(.84); }
}
@keyframes modern-pantograph-live {
  0%, 8%, 16%, 24%, 32%, 40%, 75%, 83%, 91%, 99%, 100% { transform:scaleY(1); }
  4%, 12%, 20%, 28%, 36%, 79%, 87%, 95% { transform:scaleY(.84); }
}

.note-field { display:block; margin-top:16px; color:var(--amber); font-size:13px; }
.note-field input { display:block; width:100%; min-height:44px; margin-top:5px; padding:8px 10px; border:1px solid #76501b; border-radius:4px; color:var(--amber); background:#050505; font:16px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
.note-help { line-height:1.5; }
.group-title, .custom-direction { white-space:normal; overflow-wrap:anywhere; }
.favorite-description, .street { overflow-wrap:anywhere; }
.favorite-name { min-width:0; overflow-wrap:anywhere; }

.note-header-actions { display:flex; align-items:center; gap:6px; }
#note-save { display:grid; place-items:center; width:44px; height:44px; padding:0; color:#a5c878; }
#note-save svg { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

.note-counter { display:block; margin-top:4px; color:var(--muted); font-size:12px; text-align:right; }

.trolley-track svg[data-scooter] { width:36px; height:31px; top:-5px; fill:none; stroke-width:.85; }
.scooter-wheel { transform-box:fill-box; transform-origin:center; }
.scooter-moving .scooter-wheel { animation:scooter-wheel-spin .45s linear infinite; }
@keyframes scooter-wheel-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .scooter-moving .scooter-wheel { animation:none !important; } }

.scooter-wind { opacity:0; }
[data-scooter="tandem"] .scooter-wind, [data-scooter="pyramid"] .scooter-wind { transform:translateX(4px); }
.scooter-moving .scooter-wind { opacity:.75; }
.scooter-moving .scooter-wind path { animation:scooter-wind-flicker .8s ease-in-out infinite alternate; }
.scooter-moving .scooter-wind path:nth-child(2) { animation-delay:-.3s; }
.scooter-moving .scooter-wind path:nth-child(3) { animation-delay:-.55s; }
@keyframes scooter-wind-flicker { from { opacity:.35; } to { opacity:1; } }
@media (prefers-reduced-motion: reduce) { .scooter-moving .scooter-wind path { animation:none !important; } }

/* A separate sidewalk above the board divider; the login demo keeps its track. */
.display-header { padding-bottom:24px; }
.scooter-sidewalk { position:absolute; left:0; right:0; bottom:0; height:31px; overflow:hidden; pointer-events:none; }
.scooter-sidewalk svg[data-scooter] { position:absolute; top:0; left:0; width:36px; height:31px; fill:none; stroke:var(--amber); stroke-width:.85; stroke-linecap:round; stroke-linejoin:round; overflow:visible; opacity:0; }
.metrika-pixel { position:absolute; left:-9999px; }
