:root {
  font-family: Roboto, Arial, sans-serif;
  --page: #151515;
  --surface: #282828;
  --raised: #353535;
  --raised-hover: #404040;
  --line: #464646;
  --ink: #fff;
  --muted: #d4d4d4;
  --dim: #b4b4b4;
  --accent: #d6ec98;
  --accent-ink: #202315;
  --accent-faint: #3e4730;
  --violet: #bfc8ed;
  --android-brand: #981c1e;
  --android-bar: #c11921;
  --app-width: 460px;
}
:root[data-theme="light"] {
  --page: #f5f5f5; --surface: #fff; --raised: #eee; --raised-hover: #e3e3e3;
  --line: #ccc; --ink: #181818; --muted: #414141; --dim: #595959;
  --accent: #c11921; --accent-ink: #fff; --accent-faint: #fce4e6;
}
body { background: #0e0e0e; }
.android-frame {
  width: min(100%, var(--app-width)); min-height: 100dvh; margin: 0 auto;
  background: var(--page); display: flex; flex-direction: column;
}
.android-header { position: sticky; top: 0; z-index: 8; background: var(--android-bar); color: white; }
.android-brand { height: 22px; display: flex; align-items: center; padding: 0 9px; font-size: 12px; font-weight: 700; background: var(--android-brand); }
.android-toolbar { min-height: 45px; display: flex; align-items: center; gap: 2px; border-bottom: 2px solid #30000030; }
.android-toolbar h1 { font-size: 20px; font-weight: 700; letter-spacing: normal; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.android-icon, .android-city {
  display: inline-flex; align-items: center; justify-content: center; border: 0;
  color: inherit; background: transparent; min-height: 42px; padding: 0 12px;
}
.android-icon { width: 48px; flex: 0 0 48px; }
.android-city { flex: 1; font-size: 18px; font-weight: 700; gap: 4px; justify-content: start; padding-left: 0; }
.android-icon:hover, .android-city:hover { background: #ffffff18; }
.android-frame .main { width: 100%; max-width: none; min-height: auto; margin: 0; padding: 0; flex: 1; }
.android-frame .screen-content { padding: 8px 8px 20px; }
.android-frame[data-page="bus"] .android-toolbar { display: none; }
.android-frame[data-page="express"] .android-header { --android-bar: #293451; }
.android-frame[data-page="journey"] .android-header { --android-bar: #403258; }
.android-bottom {
  display: flex; margin-top: auto; position: sticky; bottom: 0; z-index: 6;
  min-height: 56px; padding-bottom: env(safe-area-inset-bottom); background: var(--android-bar);
  color: #ffffffe0; box-shadow: 0 -2px 4px #0003;
}
.android-bottom a { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; padding: 6px 2px; font-size: 12px; }
.android-bottom a:hover { color: white; background: #ffffff18; }
.home-inset { padding: 8px 8px 24px; }
.android-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; }
.android-tile {
  display: flex; flex-direction: column; align-items: center; min-width: 0;
  min-height: 85px; justify-content: center; gap: 11px; padding: 13px 1px;
  background: var(--surface); color: var(--ink); text-align: center; font-size: 13px;
}
.android-tile:hover, .android-list-row:hover { background: var(--raised-hover); }
.android-tile img { width: auto; height: 30px; max-width: 80%; object-fit: contain; }
.android-heading { margin: 32px 0 12px; font-size: 14px; text-transform: uppercase; font-weight: 700; letter-spacing: normal; }
.android-history { margin-top: 6px; }
.android-list-row {
  width: 100%; min-height: 48px; display: flex; align-items: center; gap: 13px;
  padding: 8px 12px; background: var(--surface); color: var(--ink); border: 0;
  border-bottom: 1px solid var(--page); text-align: left; font-size: 15px;
}
.android-list-row img { width: 25px; height: 25px; object-fit: contain; }
.android-list-row small { display: block; margin-top: 2px; font-size: 12px; color: var(--dim); }
.android-drawer, .android-picker { background: #353535; color: white; padding: 0; border: 0; }
.android-drawer {
  position: fixed; margin: 0; inset: 0 auto 0 max(0px, calc((100vw - var(--app-width)) / 2));
  width: min(86vw, 325px); height: 100dvh; max-width: none; max-height: none;
}
.android-drawer::backdrop, .android-picker::backdrop { background: #0009; }
.android-picker { width: min(92vw, 340px); padding: 12px; border-radius: 5px; }
.drawer-heading { display: flex; align-items: center; gap: 12px; padding: 18px 12px; background: #981c1e; }
.drawer-heading img { width: 45px; height: 45px; object-fit: contain; }
.drawer-heading div { flex: 1; }
.drawer-heading strong { display: block; font-size: 20px; }
.drawer-heading small { display: block; color: #fff9; margin-top: 4px; }
.drawer-section { padding: 14px 15px 8px; font-size: 13px; font-weight: 700; color: #d4d4d4; }
.drawer-row { width: 100%; display: flex; align-items: center; gap: 13px; padding: 12px 16px; min-height: 46px; color: white; background: transparent; border: 0; border-bottom: 1px solid #444; text-align: left; }
.drawer-row:hover { background: #444; }
.drawer-row span { flex: 1; }
.android-frame .panel, .android-frame .trip, .android-frame .notice { border-radius: 4px; }
.android-frame h2, .android-frame h3 { letter-spacing: 0; }
.android-frame .button, .android-frame .icon-button { border-radius: 4px; }
.android-frame .form-grid { gap: 6px; }
.android-frame .two-col { grid-template-columns: minmax(0, 1fr); }
.line-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-bottom: 8px; }
.line-shortcuts a { min-height: 77px; display: grid; align-content: center; justify-items: center; gap: 6px; background: var(--surface); font-size: 12px; text-align: center; }
.line-letter { display: grid; place-items: center; min-width: 33px; height: 33px; padding: 0 4px; border-radius: 50%; color: #101010; background: var(--line-color, var(--accent)); font-size: 19px; font-weight: 700; }
.android-search { display: flex; gap: 6px; align-items: center; margin: 0 0 8px; }
.android-search input { flex: 1; }
.station-index { max-height: 62dvh; overflow: auto; }
.station-index .android-list-row { justify-content: space-between; }
.android-direction-tabs { display: flex; background: var(--android-bar); color: white; margin: -8px -8px 8px; min-height: 44px; }
.android-direction-tabs a { flex: 1; display: grid; place-items: center; text-align: center; padding: 4px; font-size: 12px; font-weight: 700; border-bottom: 2px solid transparent; }
.android-direction-tabs a[aria-current="page"] { border-bottom-color: #fff; background: #0002; }
.android-frame .android-train-row { margin-top: 1px; background: var(--surface); border: 0; border-radius: 0; }
.android-train-row summary { min-height: 60px; display: grid; grid-template-columns: 62px minmax(0, 1fr) 50px; gap: 7px; align-items: center; padding: 6px 8px; }
.android-train-row summary::after { display: none; }
.android-train-row summary > div { grid-column: auto; grid-row: auto; }
.native-train-time { font-size: 17px; font-variant-numeric: tabular-nums; }
.native-destination { font-size: 15px; font-weight: 700; text-transform: uppercase; }
.native-platform { font-size: 13px; color: var(--accent); text-align: end; }
.android-train-row small { font-size: 12px; color: var(--muted); }
.native-timetable-form { padding: 8px; background: var(--surface); }
.native-timetable-form summary { cursor: pointer; font-size: 14px; padding: 7px 0; }
.native-timetable-form form { margin-top: 7px; }
.bus-operators { display: flex; gap: 8px; overflow-x: auto; padding: 7px; margin: -8px -8px 8px; background: var(--android-bar); min-height: 50px; }
.bus-operators a { flex: 0 0 auto; min-width: 63px; height: 36px; padding: 0 12px; display: grid; place-items: center; font-size: 14px; font-weight: 700; border-radius: 20px; background: #a41519; color: white; }
.bus-operators a[aria-current="page"] { background: white; color: #a41519; }
.native-bus-fields { position: relative; display: grid; gap: 1px; }
.native-bus-fields input:not([type="hidden"]) { min-height: 52px; border-radius: 3px; background: #fff; color: #212121; border: 0; padding-right: 55px; }
.native-bus-fields label { gap: 0; }
.native-bus-fields .icon-button { position: absolute; top: calc(50% - 19px); right: 7px; z-index: 1; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #c11921; color: white; transform: rotate(90deg); }
.native-bus-search { width: 100%; min-height: 50px; background: #c11921; color: white; border: 0; font-weight: 700; margin: 1px 0 0; }
.native-bus-actions { display: flex; gap: 12px; }
.native-bus-actions .button { min-height: 52px; flex: 1; }
.native-map { display: block; width: 100%; height: auto; background: white; }
.map-image-link { display: block; margin-top: 8px; }
.native-fare-row { display: grid; grid-template-columns: 1fr 1fr 1fr; text-align: center; padding: 7px 2px; border-bottom: 1px solid var(--line); }
.native-form-spaced { display: grid; gap: 7px; }
.native-note { margin: 8px 0; font-size: 12px; }
.native-trace { margin: 8px -8px; }
.native-trace header { padding: 8px 12px; background: var(--android-bar); color: white; }
.native-trace header strong, .native-trace header span { display: block; text-transform: uppercase; }
.native-trace header span { margin-top: 7px; font-size: 12px; font-weight: 700; }
.native-trace ol { list-style: none; padding: 0; }
.native-trace li { display: grid; grid-template-columns: 76px 1fr; min-height: 48px; margin: 0; }
.native-trace li:nth-child(odd) { background: var(--surface); }
.native-trace li time, .native-trace li span { align-content: center; padding: 8px 12px; }
.native-trace li span { position: relative; padding-left: 22px; border-left: 2px solid var(--ink); text-transform: uppercase; }
.native-trace li span::before { content: ''; position: absolute; top: calc(50% - 5px); left: -6px; width: 10px; height: 10px; background: var(--ink); border-radius: 50%; }
.native-trace li small { display: block; color: var(--muted); }
.express-station-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 5px; align-items: end; margin: 8px 0; }
.express-result { justify-content: space-between; }
.express-result + .express-result { margin-top: 1px; }
.express-stop details { margin-top: 5px; font-size: 12px; text-transform: none; }
.express-stop > time { font-variant-numeric: tabular-nums; }
.express-coaches { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 8px 0; }
.express-coaches li { margin: 0; padding: 6px 7px; background: var(--raised); border: 1px solid var(--line); border-radius: 3px; }
.android-route-option + .android-route-option { margin-top: 6px; }
.native-train-fares { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 13px; }
.native-train-fares th, .native-train-fares td { text-align: start; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.native-route-number { display: inline-block; min-width: 43px; padding: 5px 8px; border-radius: 4px; color: #282215; background: #f3d47e; }
.bus-time-table { margin-bottom: 10px; }
.bus-time-table > summary { display: block; min-height: auto; color: var(--accent); }
.bus-time-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin: 6px 0; }
.bus-time-grid time { text-align: center; padding: 7px 2px; font-size: 13px; background: var(--raised); }
@media (min-width: 461px) {
  .android-frame { box-shadow: 0 0 0 1px #3d3d3d, 0 14px 50px #0008; }
}
