@import url("/vendor/ui/fonts.css");

:root {
  --bg:        #0d0f12;
  --surface:   #14161a;
  --card:      #191c22;
  --card-2:    #1c2027;
  --raised:    #1e232b;

  --line:      #262b34;
  --line-soft: #232830;
  --line-hard: #2b313b;
  --line-lift: #333a45;

  --fg:        #f2f4f7;
  --fg-2:      #dfe3e9;
  --fg-3:      #8b95a3;
  --fg-4:      #828b99;
  --fg-5:      #4d5561;

  --accent:    #d8ff4f;
  --accent-2:  #eaffa0;
  --accent-ink: var(--accent);
  --on-accent:  #14161a;

  --info:      #4a90d9;
  --warn:      #e07a5f;
  --change:    #3ecf8e;
  --extra:     #b48cff;

  --sans:  "DM Sans", system-ui, sans-serif;
  --display: "Archivo", system-ui, sans-serif;

  --r-sm: 8px;  --r-md: 12px;  --r-lg: 16px;  --r-xl: 18px;
  --tap: 44px;
}

:root[data-theme="light"] {
  --bg:        #f4f6f8;
  --surface:   #ffffff;
  --card:      #ffffff;
  --card-2:    #eff2f6;
  --raised:    #e7ecf2;

  --line:      #d5dce5;
  --line-soft: #e3e8ee;
  --line-hard: #c2cbd7;
  --line-lift: #a8b3c1;

  --fg:        #12151a;
  --fg-2:      #2c333d;
  --fg-3:      #545e6b;
  --fg-4:      #616b78;
  --fg-5:      #78828f;

  --accent-2:  #94b800;
  --accent-ink: #56760a;
  --info:      #1d6fb8;
  --warn:      #b8482a;
  --change:    #1a8a55;
  --extra:     #6f42c1;
}

@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
    --bg: #f4f6f8; --surface: #ffffff; --card: #ffffff; --card-2: #eff2f6;
    --raised: #e7ecf2;
    --line: #d5dce5; --line-soft: #e3e8ee; --line-hard: #c2cbd7; --line-lift: #a8b3c1;
    --fg: #12151a; --fg-2: #2c333d; --fg-3: #545e6b; --fg-4: #616b78; --fg-5: #78828f;
    --accent-2: #94b800; --accent-ink: #56760a; --info: #1d6fb8; --warn: #b8482a;
    --change: #1a8a55; --extra: #6f42c1;
  }
}

a { color: var(--accent-ink); text-underline-offset: 2px; }

[hidden] { display: none !important; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.num { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; }

.sitehead {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center;
  padding: max(8px, env(safe-area-inset-top)) 14px 8px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
@supports not (backdrop-filter: blur(1px)) {
  .sitehead { background: var(--bg); }
}

.brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--fg); text-decoration: none;
  font-family: var(--display); font-weight: 800; font-size: 15px;
  letter-spacing: -.01em;
  padding: 4px; margin: -4px;
  border-radius: var(--r-sm);
}
.brand:hover { color: var(--accent-ink); }
.brand img { display: block; border-radius: 6px; }

.page { max-width: 640px; margin: 0 auto; padding: 22px 16px 60px; }
.sitehead + .page { padding-top: 16px; }

.crumb {
  display: inline-flex; align-items: center; gap: 6px; color: var(--fg-4);
  text-decoration: none; font-size: 13px; margin-bottom: 18px;
}
.crumb:hover { color: var(--accent-ink); }

.head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.head > div:first-child { flex: 1; min-width: 0; }
.head h1 {
  margin: 0; font-family: var(--display); font-weight: 900; font-size: 27px;
  letter-spacing: -.025em; line-height: 1.15;
}
.head h1 em { font-style: normal; color: var(--fg-4); font-weight: 700; font-size: 19px; }
.head .sub { margin: 6px 0 0; color: var(--fg-3); font-size: 13.5px; }
.head .acts { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.head .acts:not(:has(> :not([hidden]))) { display: none; }
.head .act, .calls-tools .act {
  padding: 9px 14px; border: 1px solid var(--line-hard); border-radius: 8px;
  background: var(--raised); color: var(--fg-2); font-family: var(--display);
  font-weight: 800; font-size: 13px; cursor: pointer; text-decoration: none;
}
.head .act:hover, .calls-tools .act:hover { border-color: var(--accent); color: var(--fg); }
.head .act.on, .calls-tools .act.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.page section { margin-top: 28px; }
.page section > h2 { margin: 0 0 4px; font-family: var(--display); font-weight: 800; font-size: 16px; }
.page section > p.note { margin: 0 0 10px; color: var(--fg-5); font-size: 12.5px; line-height: 1.5; }

.search {
  display: flex; align-items: center; gap: 10px;
  height: var(--tap); padding: 0 14px; margin-top: 18px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); color: var(--fg-3);
  font-family: var(--sans); font-size: 14px;
}
.search:focus-within { border-color: var(--accent); }
.search svg { flex: none; width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.search input {
  flex: 1; border: 0; background: transparent; color: var(--fg);
  font: inherit; font-size: 16px; outline: none; min-width: 0;
}
.search input::placeholder { color: var(--fg-4); }

.list { display: flex; flex-direction: column; gap: 1px; margin-top: 10px; border-radius: var(--r-sm); overflow: hidden; }
.other {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  background: var(--card); text-decoration: none; color: inherit;
  font-size: 14px;
}
.other:hover { background: var(--card-2); }
.other em { font-style: normal; color: var(--fg-4); }
.other .m { margin-left: auto; font-family: var(--display); font-weight: 800; font-size: 12.5px; color: var(--fg-4); }

.board { display: flex; flex-direction: column; gap: 1px; border-radius: var(--r-sm); overflow: hidden; }
.dep2 {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 11px 12px; background: var(--card); text-decoration: none; color: inherit;
}
.dep2:hover { background: var(--card-2); }
.dep2 .rt {
  min-width: 52px; padding: 3px 8px; border-radius: 5px; background: var(--raised);
  border: 1px solid var(--line-lift); font-family: var(--display); font-weight: 800;
  font-size: 13px; color: var(--fg); text-align: center; font-variant-numeric: tabular-nums;
}
.dep2 .to { font-size: 13.5px; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dep2 .to small { display: block; color: var(--fg-5); font-size: 11.5px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; }
.dep2 .when {
  text-align: right; font-family: var(--display); font-weight: 800;
  font-size: 16px; color: var(--fg); font-variant-numeric: tabular-nums;
}
.dep2 .when small {
  display: block; font-family: var(--sans); font-weight: 400;
  font-size: 11.5px; color: var(--fg-4);
}
.dep2.quiet { background: var(--surface); }
.dep2.quiet .rt { background: transparent; color: var(--fg-3); }
.dep2.quiet .to, .dep2.quiet .when { color: var(--fg-4); }

.tag {
  display: inline-block; padding: 0 6px; margin-left: 6px; border-radius: 4px;
  background: var(--raised); color: var(--fg-3); font-size: 11px; vertical-align: 1px;
}
.tag.freight { background: color-mix(in srgb, var(--extra) 18%, var(--card)); color: var(--extra); }
.tag.bus { background: color-mix(in srgb, var(--warn) 18%, var(--card)); color: var(--warn); }
.tag.change { background: color-mix(in srgb, var(--info) 18%, var(--card)); color: var(--info); }

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 1px; background: var(--line-soft); margin: 20px 0 0;
  border-radius: var(--r-md); overflow: hidden;
}
.fact { padding: 12px 13px; background: var(--card); }
.fact .k { font-size: 12px; color: var(--fg-4); }
.fact .v { margin-top: 3px; font-size: 15px; color: var(--fg-2); }

.calls-tools { display: flex; justify-content: flex-end; margin: 4px 0 10px; }
.calls { display: flex; flex-direction: column; gap: 1px; border-radius: var(--r-sm); overflow: hidden; }
.call {
  display: grid; grid-template-columns: 1fr 64px 64px 44px; gap: 10px; align-items: baseline;
  padding: 10px 12px; background: var(--card); font-size: 14px;
}
.call.headrow { background: transparent; padding-top: 0; padding-bottom: 4px; font-size: 12px; color: var(--fg-4); }
.call .t { text-align: right; font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; }
.call .t.work { font-weight: 600; color: var(--fg-4); }
.call .p { text-align: right; font-family: var(--display); font-weight: 800; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.call .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.call .n a { color: inherit; text-decoration: none; }
.call .n a:hover { color: var(--accent-ink); }
.call .n small { display: block; color: var(--fg-5); font-size: 11.5px; }
.call.pass { background: var(--surface); color: var(--fg-4); font-size: 13px; }
.call.pass .t { color: var(--fg-4); font-weight: 600; }

.empty { padding: 14px; background: var(--card); color: var(--fg-5); font-size: 13px; border-radius: var(--r-sm); }
.foot { margin-top: 10px; font-size: 12px; color: var(--fg-5); }
.err { padding: 13px 15px; border-radius: var(--r-sm); margin-top: 16px;
       background: color-mix(in srgb, var(--warn) 18%, var(--card));
       border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
       color: var(--fg-2); font-size: 13.5px; }

@media (max-width: 420px) {
  .call { grid-template-columns: 1fr 54px 54px 34px; gap: 8px; }
}

.live { font-weight: 600; }
.live.ontime { color: var(--change); }
.live.late { color: var(--warn); }
.live.cancel { color: var(--warn); }
.dep2 .when .live { font-family: var(--sans); }
.dep2.cancelled .sched { text-decoration: line-through; color: var(--fg-4); }
.call small.live { display: block; font-family: var(--display); font-size: 12px; white-space: nowrap; }
.call.cancelled .t { text-decoration: line-through; color: var(--fg-4); }
.call .p.moved { color: var(--warn); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  height: 56px; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-family: var(--display); font-weight: 500; font-size: 11.5px;
  color: var(--fg-4); text-decoration: none;
}
.tabbar a:hover { color: var(--fg-2); }
.tabbar a[aria-current="page"] { color: var(--accent-ink); }
.tabbar svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
body:has(.tabbar) { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }

.mapbody { height: 100dvh; overflow: hidden; }
.mapbody #map { position: absolute; inset: 0; top: calc(max(8px, env(safe-area-inset-top)) + 43px); bottom: calc(56px + env(safe-area-inset-bottom)); }
.mapcount { margin-left: auto; font-family: var(--display); font-weight: 800; font-size: 13px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.mapnote {
  position: absolute; left: 50%; top: 72px; transform: translateX(-50%); z-index: 5;
  max-width: calc(100% - 32px); padding: 10px 14px; border-radius: var(--r-md);
  background: var(--card); border: 1px solid var(--line); color: var(--fg-3); font-size: 13px;
}
.maplibregl-ctrl-attrib { background: color-mix(in srgb, var(--bg) 80%, transparent) !important; color: var(--fg-4); }
.maplibregl-ctrl-attrib a { color: var(--fg-3); }
.maplibregl-ctrl-group { background: var(--card) !important; border: 1px solid var(--line); }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line) !important; }
.sheet {
  position: fixed; z-index: 15; left: 12px; right: 12px;
  bottom: calc(68px + env(safe-area-inset-bottom));
  background: var(--card); border: 1px solid var(--line-hard);
  border-radius: var(--r-xl); padding: 18px 18px 16px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.85);
  transform: translateY(140%); visibility: hidden;
  transition: transform .22s cubic-bezier(.2,.8,.3,1), visibility 0s .22s;
  display: flex; flex-direction: column; overflow: hidden;
  max-height: calc(100dvh - 140px);
}
.sheet.on { transform: none; visibility: visible; transition: transform .22s cubic-bezier(.2,.8,.3,1), visibility 0s; }
@media (min-width: 720px) {
  .sheet { left: auto; right: 16px; top: calc(max(8px, env(safe-area-inset-top)) + 59px); bottom: auto; width: 340px;
           transform: translateX(140%); max-height: calc(100dvh - 150px); }
  .sheet.on { transform: none; }
}
:root[data-theme="light"] .sheet { box-shadow: 0 12px 34px rgba(20, 30, 45, .16); }
.sheet-body { overflow-y: auto; min-height: 0; overscroll-behavior: contain; padding-top: 26px; }
.sheet .close {
  position: absolute; top: 4px; right: 4px; z-index: 1;
  width: var(--tap); height: var(--tap);
  display: flex; align-items: center; justify-content: center;
  border: 0; background: none; color: var(--fg-3);
  font-size: 17px; cursor: pointer; line-height: 1;
}
.sheet .close::before {
  content: ""; position: absolute; z-index: -1;
  width: 34px; height: 34px; border-radius: 50%; background: var(--raised);
}
.route-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; height: 30px; padding: 0 10px; border-radius: var(--r-sm);
  background: var(--accent); color: var(--on-accent);
  font-family: var(--display); font-weight: 900; font-size: 17px; letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
a.route-badge[href] { text-decoration: none; cursor: pointer; }
a.route-badge[href]:hover { filter: brightness(1.12); }
.route-badge.freight { background: var(--extra); }
.route-badge.empty { background: var(--raised); color: var(--fg); border: 1px solid var(--line-lift); }
.sheet h2 { margin: 12px 0 2px; font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -.02em; line-height: 1.2; color: var(--fg); }
.sheet h2 .tolink { color: inherit; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.sheet h2 .tolink:hover { color: var(--accent-ink); border-bottom-color: var(--accent-ink); }
.sheet .towards { color: var(--fg-3); font-size: 13.5px; margin-bottom: 16px; }
.sheet .towards:empty { display: none; }
.journey { margin: 0 0 16px; padding: 14px 14px 13px; background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.journey-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.journey-head .times { font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -.01em; color: var(--fg); font-variant-numeric: tabular-nums; }
.journey-head .count { font-family: var(--display); font-weight: 700; font-size: 12.5px; color: var(--accent-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.journey-to { margin-top: 2px; font-size: 13.5px; color: var(--fg-3); }
.journey .bar { margin-top: 11px; height: 3px; border-radius: 2px; background: var(--line-hard); overflow: hidden; }
.journey .bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 2px; transition: width .3s ease; }
.journey-next {
  margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 3px 9px; align-items: baseline;
  font-size: 13px; color: var(--fg-3);
}
.journey-next b { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.journey-next a { color: var(--fg-2); text-decoration: none; font-weight: 600; }
.journey-next a:hover { color: var(--accent-ink); }
.journey-next small { flex-basis: 100%; font-size: 12.5px; color: var(--fg-4); }
.journey-next small.late { color: var(--warn); }
.sheet-note { margin: 0 0 16px; color: var(--fg-4); font-size: 13px; line-height: 1.5; }
.rows { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; align-items: baseline; margin: 0; }
.rows > div { display: contents; }
@media (max-width: 719px) {
  .rows { grid-template-columns: 1fr 1fr; gap: 12px 16px; }
  .rows > div { display: block; }
  .rows dd { margin-top: 2px; }
  .sheet { max-height: calc(100dvh - 160px); }
}
.rows dt { font-size: 12.5px; color: var(--fg-4); }
.rows dd { margin: 0; font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.rows dd.none { font-family: var(--sans); font-weight: 400; color: var(--fg-5); }
.rows dd.late { color: var(--warn); }
.ping { display: inline-flex; align-items: center; gap: 7px; }
.ping i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-ink); animation: ping 2s ease-in-out infinite; }
.ping.old i { background: var(--warn); animation: none; }
@keyframes ping { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.sheet-link { display: inline-block; margin-top: 16px; font-size: 13.5px; font-weight: 600; color: var(--accent-ink); text-decoration: none; }
.sheet-link:hover { text-decoration: underline; }

.buscard {
  display: flex; align-items: center; gap: 14px; margin-top: 28px; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  color: var(--fg); text-decoration: none;
}
.buscard:hover { border-color: var(--line-lift); }
.buscard svg { flex: none; width: 26px; height: 26px; stroke: var(--accent-ink); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.buscard .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.buscard strong { font-family: var(--display); font-weight: 800; font-size: 15px; }
.buscard .t span { color: var(--fg-3); font-size: 13.5px; }
.buscard .go { color: var(--fg-4); font-size: 18px; }

.page section > h2.gap { margin-top: 28px; }
.form { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--fg-3); }
.field input {
  height: var(--tap); padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--card); color: var(--fg); font: inherit; font-size: 16px; outline: none;
}
.field input:focus { border-color: var(--accent); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  min-height: var(--tap); padding: 0 18px; border: 1px solid var(--accent); border-radius: var(--r-md);
  background: var(--accent); color: var(--on-accent); cursor: pointer;
  font-family: var(--display); font-weight: 800; font-size: 14.5px;
}
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: var(--raised); border-color: var(--line-hard); color: var(--fg-2); }
.btn.ghost:hover { border-color: var(--accent); color: var(--fg); }
.btn.danger { background: transparent; border-color: var(--warn); color: var(--warn); }
.form .btn { align-self: flex-start; }
.more { margin-top: 18px; }
.more summary { cursor: pointer; color: var(--fg-3); font-size: 14px; }
.more summary:hover { color: var(--accent-ink); }
.more .note { margin-top: 10px; color: var(--fg-5); font-size: 12.5px; }
.flash { margin-top: 16px; padding: 12px 14px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); font-size: 14px; color: var(--fg-2); }
.flash.good { border-color: color-mix(in srgb, var(--change) 55%, var(--line)); }
.flash.bad { border-color: color-mix(in srgb, var(--warn) 60%, var(--line)); }
.linkish { margin-left: auto; border: 0; background: none; padding: 4px; color: var(--fg-4); font: inherit; font-size: 13px; cursor: pointer; }
.linkish:hover { color: var(--warn); }
.other .k {
  flex: none; padding: 2px 8px; border-radius: 999px; background: var(--raised);
  color: var(--fg-3); font-family: var(--display); font-weight: 600; font-size: 12px;
}
.other.saved a { color: var(--fg); text-decoration: none; min-width: 0; }
.other.saved a:hover { color: var(--accent-ink); }
.other.mine .t, .other.sub .t { flex: 1; min-width: 0; color: var(--fg); }
.other .st { flex: none; margin-left: auto; font-size: 13px; font-weight: 600; text-align: right; }
.other.sub { padding-left: 28px; background: var(--card); font-size: 14px; }
.st.good { color: var(--change); }
.st.warn { color: var(--warn); }
.st.bad { color: var(--warn); }
.st.dim { color: var(--fg-5); font-weight: 400; }
.picker { margin-top: 4px; }
.picker .search { margin-top: 12px; }
.picker button.other { width: 100%; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.confirmbody { display: grid; place-items: center; min-height: 100vh; }
.confirm { max-width: 380px; padding: 28px 26px; text-align: center; }
.confirm h1 { margin: 0 0 6px; font-family: var(--display); font-weight: 900; font-size: 22px; }
.confirm p { margin: 0 0 20px; color: var(--fg-3); font-size: 14px; }
.confirm b { color: var(--fg); }
.confirm .btn { width: 100%; }
.confirm small { display: block; margin-top: 16px; color: var(--fg-5); font-size: 12px; }

.notices { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.notice {
  padding: 12px 14px; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--warn) 8%, var(--card));
  border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line));
}
.notice-head { display: flex; align-items: flex-start; gap: 10px; }
.notice-head strong { flex: 1; min-width: 0; font-weight: 600; font-size: 14.5px; color: var(--fg); line-height: 1.4; }
.notice .tag {
  flex: none; padding: 2px 8px; border-radius: 999px; font-family: var(--display); font-weight: 600; font-size: 12px;
  background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn);
}
.notice .tag.planned { background: var(--raised); color: var(--fg-3); }
.notice-when { margin-top: 4px; font-size: 13px; color: var(--fg-3); }
.notice details { margin-top: 8px; }
.notice summary { cursor: pointer; color: var(--fg-3); font-size: 13px; }
.notice summary:hover { color: var(--accent-ink); }
.notice details p { margin: 8px 0; white-space: pre-line; font-size: 14px; color: var(--fg-2); line-height: 1.5; }
.notice details a { font-size: 13.5px; }
.notice.inlist { border-radius: 0; border-width: 0; padding: 10px 12px 10px 28px; }

.livepill {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-family: var(--display); font-weight: 700; font-size: 12px;
  color: var(--fg-2); font-variant-numeric: tabular-nums;
}
.livepill i { width: 7px; height: 7px; border-radius: 50%; background: var(--change); box-shadow: 0 0 0 3px color-mix(in srgb, var(--change) 25%, transparent); }
.livepill.stale i { background: var(--fg-5); box-shadow: none; }

.page.home { max-width: 640px; }
.hero h1 { margin: 0; font-family: var(--display); font-weight: 900; font-size: 30px; letter-spacing: -.025em; line-height: 1.1; }
.hero .sub { margin: 6px 0 0; color: var(--fg-3); font-size: 14px; }
.hero .search { height: 52px; border-radius: 14px; margin-top: 16px; }
.recent { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.recent a {
  padding: 6px 11px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  color: var(--fg-2); text-decoration: none; font-size: 13px;
}
.recent a:hover { border-color: var(--line-lift); color: var(--fg); }
.recent a b { margin-left: 5px; font-family: var(--display); font-weight: 800; font-size: 11.5px; color: var(--fg-4); }
.homegrid { display: grid; gap: 28px; margin-top: 28px; }
.homecol { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.page.home section { margin: 0; }
.sechead { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; }
.sechead h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 16px; }
.sechead > a, .sechead > span { margin-left: auto; font-size: 13px; color: var(--fg-4); text-decoration: none; white-space: nowrap; }
.sechead > a { color: var(--accent-ink); }
.page.home section > p.note { margin: -4px 0 10px; }

.locate {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: var(--tap);
  border: 1px dashed var(--line-hard); border-radius: var(--r-md); background: transparent; cursor: pointer;
  color: var(--fg-2); font: inherit; font-size: 14px;
}
.locate:hover { border-color: var(--accent); color: var(--fg); }
.locate svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; }
#near-body > .note { margin: 8px 0 0; color: var(--fg-5); font-size: 12.5px; }
.near { display: flex; flex-direction: column; gap: 10px; }
.stcard { background: var(--card); border-radius: var(--r-md); overflow: hidden; }
.stcard .h { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.stcard .h:hover strong { color: var(--accent-ink); }
.stcard .h strong { font-family: var(--display); font-weight: 800; font-size: 15px; }
.stcard .h .code { font-family: var(--display); font-weight: 800; font-size: 12px; color: var(--fg-4); }
.stcard .h .d { margin-left: auto; font-size: 12.5px; color: var(--fg-4); }
.ndep { display: grid; grid-template-columns: 50px 1fr auto; gap: 10px; align-items: center; padding: 8px 14px; font-size: 13.5px; color: inherit; text-decoration: none; }
.ndep:hover { background: var(--card-2); }
.ndep + .ndep { border-top: 1px solid var(--line-soft); }
.ndep .tm { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; }
.ndep.cx .tm { text-decoration: line-through; color: var(--fg-4); }
.ndep .to { min-width: 0; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ndep .to small { margin-left: 6px; color: var(--fg-5); font-size: 12px; }
.ndep .st { font-size: 12.5px; font-weight: 600; text-align: right; }
.stcard .none { padding: 10px 14px; color: var(--fg-5); font-size: 13px; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-soft); border-radius: var(--r-md); overflow: hidden; }
.stat { background: var(--card); padding: 13px 14px; }
.stat .v { font-family: var(--display); font-weight: 900; font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .v.good { color: var(--change); }
.stat .v.warn { color: var(--warn); }
.stat .v.extra { color: var(--extra); }
.stat .k { margin-top: 2px; font-size: 12.5px; color: var(--fg-4); }
.stat .k2 { margin-top: 1px; font-size: 12px; color: var(--fg-5); }
.spark { margin-top: 10px; padding: 12px 14px 10px; background: var(--card); border-radius: var(--r-md); }
.spark .top { display: flex; font-size: 12.5px; color: var(--fg-4); }
.spark .top b { color: var(--fg-2); font-weight: 600; }
.spark .top span { margin-left: auto; }
.spark svg { display: block; width: 100%; height: 56px; margin-top: 6px; }
.spark polygon { fill: color-mix(in srgb, var(--accent) 12%, transparent); }
.spark polyline { fill: none; stroke: var(--accent-ink); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark .ax { display: flex; justify-content: space-between; font-size: 11px; color: var(--fg-5); }

.feed { display: flex; flex-direction: column; gap: 10px; }
.fi { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; padding: 12px 14px; background: var(--card); border-radius: var(--r-md); color: inherit; text-decoration: none; }
a.fi:hover { background: var(--card-2); }
.fi .badge { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--raised); color: var(--fg-3); }
.fi .badge svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fi.warn .badge { color: var(--warn); background: color-mix(in srgb, var(--warn) 15%, var(--card)); }
.fi.extra .badge { color: var(--extra); background: color-mix(in srgb, var(--extra) 15%, var(--card)); }
.fi.info .badge { color: var(--info); background: color-mix(in srgb, var(--info) 15%, var(--card)); }
.fi .body { min-width: 0; }
.fi .k { display: flex; gap: 8px; font-size: 12px; color: var(--fg-4); }
.fi .k span:last-child:not(:first-child) { margin-left: auto; white-space: nowrap; }
.fi .t { margin-top: 1px; font-size: 14.5px; font-weight: 500; color: var(--fg); line-height: 1.4; }
.fi .s { margin-top: 3px; font-size: 13px; color: var(--fg-3); }
.fi .mine-tag { color: var(--warn); font-weight: 600; }
.fi .hc { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; }
.fi details { margin-top: 6px; }
.fi summary { cursor: pointer; color: var(--fg-3); font-size: 13px; }
.fi summary:hover { color: var(--accent-ink); }
.fi details p { margin: 8px 0; white-space: pre-line; font-size: 14px; color: var(--fg-2); line-height: 1.5; }
.fi details a { font-size: 13.5px; }
.more-btn { display: block; margin: 8px 0 0; padding: 4px 0; color: var(--accent-ink); }
.more-btn:hover { color: var(--accent-2); }
.page.home .buscard { margin-top: 0; }

@media (min-width: 900px) {
  .page.home { max-width: 1180px; padding-top: 28px; }
  .hero { max-width: 720px; }
  .hero h1 { font-size: 36px; }
  .homegrid { grid-template-columns: 1.25fr 1fr; gap: 40px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
}

.head .act.maplink { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; }
.head .act.maplink svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.routemap { display: none; }
.routemap.on { display: block; position: fixed; inset: 0; z-index: 200; background: var(--bg); }
#rm-map { position: absolute; inset: 0; }
html.map-open, html.map-open body { overflow: hidden; }
.rm-bar {
  position: absolute; z-index: 3; display: flex; align-items: flex-start; gap: 10px;
  top: calc(12px + env(safe-area-inset-top)); left: calc(12px + env(safe-area-inset-left)); right: calc(12px + env(safe-area-inset-right));
  pointer-events: none;
}
.rm-bar > * { pointer-events: auto; }
.rm-here, .rm-close, .rm-legend {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line-hard); border-radius: 8px; backdrop-filter: blur(6px);
}
.rm-here { min-width: 0; padding: 7px 12px; font-size: 12.5px; color: var(--fg-4); }
.rm-here b { display: block; font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-close {
  margin-left: auto; flex: none; height: var(--tap); padding: 0 16px; cursor: pointer; color: var(--fg-2);
  font-family: var(--display); font-weight: 700; font-size: 13.5px;
}
.rm-close:hover { border-color: var(--accent); color: var(--fg); }
.rm-legend {
  position: absolute; z-index: 3; left: calc(12px + env(safe-area-inset-left)); bottom: calc(30px + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 8px 11px; font-size: 12px; color: var(--fg-3);
}
.rm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rm-legend i { display: block; flex: none; box-sizing: border-box; width: 18px; height: 11px; border-radius: 4px; }
.rm-legend i.lg-route { height: 4px; border-radius: 2px; background: #4a90d9; }
.rm-legend i.lg-self { background: var(--accent); }
.rm-legend i.lg-other { border: 2px solid var(--accent); background: var(--surface); }
.routemap .maplibregl-popup-content { background: var(--card); color: var(--fg-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; font-family: var(--sans); }
.routemap .maplibregl-popup-tip { display: none; }
.rmpop { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.rmpop strong { font-family: var(--display); font-weight: 800; font-size: 16px; color: var(--fg); font-variant-numeric: tabular-nums; }
@media (max-width: 719px) {
  .rm-legend { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
.routemap .maplibregl-ctrl-attrib { background: color-mix(in srgb, var(--bg) 80%, transparent) !important; color: var(--fg-4); }
