/* RailChart - original dark UI, mobile-first, no frameworks */
:root {
  --bg: #0b0e14;
  --bg-soft: #11151f;
  --card: #161b28;
  --card-2: #1c2333;
  --line: #262f45;
  --text: #e8ecf4;
  --muted: #8b94ab;
  --accent: #6d7cff;
  --accent-soft: rgba(109, 124, 255, .14);
  --green: #2fbf71;
  --green-soft: rgba(47, 191, 113, .15);
  --red: #e5484d;
  --red-soft: rgba(229, 72, 77, .14);
  --amber: #f5a524;
  --amber-soft: rgba(245, 165, 36, .14);
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  line-height: 1.45;
  min-height: 100vh;
}
.hidden { display: none !important; }
a { color: var(--accent); }

/* ---------- header ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(180deg, #141a29, var(--bg));
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #9a6dff);
  display: grid; place-items: center;
  font-weight: 800; font-size: 20px; color: #fff;
  box-shadow: none;
}
.topbar h1 { font-size: 19px; letter-spacing: .2px; }
.tagline { font-size: 11.5px; color: var(--muted); }
.icon-btn {
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  width: 40px; height: 40px; border-radius: 12px; cursor: pointer;
  display: grid; place-items: center;
}
.icon-btn:active { transform: scale(.94); }

/* ---------- layout ---------- */
main { max-width: 760px; margin: 0 auto; padding: 16px 14px 40px; }

/* ---------- search ---------- */
.search-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
}
#searchForm { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.field input, .field select {
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 11px 12px; font-size: 16px; width: 100%;
  color-scheme: dark;
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); border-color: transparent; }
.field:nth-child(3) { grid-column: 1 / -1; }
.field-hint { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.go-btn {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--accent), #9a6dff);
  color: #fff; border: 0; border-radius: 12px;
  padding: 13px; font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: none;
}
.go-btn:disabled { opacity: .55; cursor: wait; box-shadow: none; }
.go-btn:active:not(:disabled) { transform: scale(.98); }
.hint { margin-top: 10px; font-size: 13px; color: var(--muted); }
.hint b { color: var(--text); }

/* ---------- status / errors ---------- */
#statusArea { margin-top: 14px; }
.notice {
  border-radius: var(--radius); padding: 16px; font-size: 14.5px;
  border: 1px solid var(--line); background: var(--card);
  display: flex; gap: 12px; align-items: flex-start;
}
.notice .n-icon { font-size: 22px; line-height: 1.2; }
.notice.error { background: var(--red-soft); border-color: rgba(229,72,77,.4); }
.notice.warn { background: var(--amber-soft); border-color: rgba(245,165,36,.4); }
.notice h3 { font-size: 15px; margin-bottom: 4px; }
.notice p { color: var(--muted); font-size: 13.5px; }
.notice.error p { color: #f0b5b7; }
.notice.warn p { color: #f0d6a3; }
.spinner {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin .8s linear infinite; margin-top: 2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- tabs ---------- */
.tab-bar {
  display: flex; gap: 8px; margin-top: 18px;
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 6px; border-radius: 14px;
  position: sticky; top: 69px; z-index: 10;
  overflow-x: auto;
}
.tab {
  flex: 1; white-space: nowrap;
  background: transparent; border: 0; color: var(--muted);
  padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.tab.active { background: var(--accent-soft); color: var(--accent); }

/* ---------- generic cards ---------- */
.content { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
}
.card h2 { font-size: 15px; margin-bottom: 10px; letter-spacing: .2px; }
.card h2 .sub { color: var(--muted); font-weight: 500; font-size: 12.5px; margin-left: 6px; }

/* ---------- overview ---------- */
.train-head { display: flex; flex-direction: column; gap: 4px; }
.train-head .tname { font-size: 19px; font-weight: 700; }
.train-head .troute { color: var(--muted); font-size: 14px; }
.train-head .troute b { color: var(--text); }
.day-bubbles { display: flex; gap: 5px; margin-top: 8px; }
.day-bubbles span {
  width: 26px; height: 26px; border-radius: 8px; font-size: 11px;
  display: grid; place-items: center; color: var(--muted);
  background: var(--bg-soft); border: 1px solid var(--line);
}
.day-bubbles span.on { background: var(--accent-soft); color: var(--accent); border-color: rgba(109,124,255,.4); font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px;
}
.stat .s-val { font-size: 22px; font-weight: 800; }
.stat .s-val.small { font-size: 16px; }
.stat .s-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat .s-val.good { color: var(--green); }
.stat .s-val.bad { color: var(--red); }
.stat .s-val.wait { color: var(--amber); }
.class-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 4px; border-bottom: 1px dashed var(--line);
}
.class-row:last-child { border-bottom: 0; }
.class-tag {
  font-weight: 800; font-size: 13px; background: var(--accent-soft); color: var(--accent);
  border-radius: 8px; padding: 3px 9px; min-width: 42px; text-align: center;
}
.class-row .cr-info { font-size: 13.5px; color: var(--muted); }
.class-row .cr-free { font-weight: 700; font-size: 15px; }
.cr-free.good { color: var(--green); }
.cr-free.bad { color: var(--red); }

/* ---------- coach chips ---------- */
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.rake-strip { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; padding: 2px 2px 10px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.rake-strip .coach-chip { flex: 0 0 auto; scroll-snap-align: start; }
.rake-strip:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.coach-chip {
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 9px 12px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px;
  font-size: 14px; font-weight: 700;
}
.coach-chip .cc-sub { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.coach-chip .cc-free { font-size: 10.5px; font-weight: 700; }
.cc-free.good { color: var(--green); }
.cc-free.bad { color: var(--red); }
.coach-chip.active { border-color: var(--accent); background: var(--accent-soft); }
.coach-chip:active { transform: scale(.96); }
.chip {
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.chip.active { background: var(--accent-soft); border-color: rgba(109,124,255,.5); color: var(--accent); }

/* ---------- seat map ---------- */
.bay {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px; margin-bottom: 10px;
}
.bay .bay-label { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.bay-grid { --aisle: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.berth {
  border-radius: 10px; padding: 8px 6px 7px; text-align: center;
  border: 1px solid var(--line); background: var(--card-2);
}
.berth .b-num { font-size: 14px; font-weight: 800; }
.berth .b-code { font-size: 9.5px; color: var(--muted); font-weight: 700; letter-spacing: .3px; }
.berth.free { border-color: rgba(47,191,113,.55); background: var(--green-soft); }
.berth.free .b-code { color: var(--green); }
.berth.partial { border-color: rgba(245,165,36,.5); background: var(--amber-soft); }
.berth.partial .b-code { color: var(--amber); }
.berth .legbar { display: flex; gap: 1px; margin-top: 6px; height: 5px; border-radius: 3px; overflow: hidden; }
.berth .legbar i { flex: 1; background: rgba(255,255,255,.3); }
.berth .legbar i.free { background: var(--green); }
.berth .legbar i.occ { background: var(--red); }
.berth .legbar i.unk { background: rgba(255,255,255,.3); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.legend .l-free { background: var(--green); }
.legend .l-occ { background: var(--red); }
.legend .l-unk { background: rgba(255,255,255,.3); }
.quota-line { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.quota-pill {
  font-size: 12px; font-weight: 700; border-radius: 8px; padding: 4px 9px;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted);
}
.quota-pill b { color: var(--text); }

/* ---------- vacancies ---------- */
.leg-block { margin-bottom: 14px; }
.leg-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 12px; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 10px; font-size: 14px; font-weight: 700; margin-bottom: 8px;
}
.leg-head .lc { color: var(--green); font-size: 12.5px; }
.vac-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.vac-item {
  background: var(--green-soft); border: 1px solid rgba(47,191,113,.4);
  border-radius: 10px; padding: 7px 10px; font-size: 13px; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; min-width: 62px;
}
.vac-item .v-sub { font-size: 10.5px; color: var(--muted); font-weight: 600; }

/* ---------- route ---------- */
.route-list { display: flex; flex-direction: column; }
.stop {
  display: grid; grid-template-columns: 52px 20px 1fr auto; gap: 10px;
  padding: 9px 0; align-items: center; position: relative;
}
.stop .stime { font-size: 13px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.stop .stime .arr { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.stop .sdot { display: flex; flex-direction: column; align-items: center; align-self: stretch; }
.stop .sdot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--line); margin: 5px 0; flex: 0 0 auto; }
.stop .sdot::after { content: ""; width: 2px; flex: 1; background: var(--line); }
.stop:last-child .sdot::after { display: none; }
.stop.board .sdot::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.stop.charted .sdot::before { background: var(--green); }
.stop .sname { font-size: 14px; font-weight: 600; }
.stop .sname small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.stop .smeta { font-size: 11.5px; color: var(--muted); text-align: right; }
.flag-pill {
  display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .3px;
  padding: 2px 8px; border-radius: 999px; margin-top: 3px;
}
.flag-pill.board { background: var(--accent-soft); color: var(--accent); }
.flag-pill.chart { background: var(--green-soft); color: var(--green); }
.flag-pill.pending { background: var(--amber-soft); color: var(--amber); }

/* ---------- analysis table ---------- */
.ana-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ana-table th, .ana-table td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--line); }
.ana-table th { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; }
.ana-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.pbar { height: 6px; border-radius: 3px; background: var(--bg-soft); overflow: hidden; min-width: 60px; }
.pbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--amber), var(--red)); }

/* ---------- misc ---------- */
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-ghost {
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 14px; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.btn-ghost:disabled { opacity: .5; cursor: wait; }
.mini-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
footer {
  max-width: 760px; margin: 0 auto; padding: 0 14px 34px;
  color: var(--muted); font-size: 12px; text-align: center;
}
@media (min-width: 640px) {
  #searchForm { grid-template-columns: 1fr 1fr 1fr auto; }
  .field:nth-child(3) { grid-column: auto; }
  .go-btn { grid-column: auto; align-self: end; padding: 11px 26px; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .bay-grid { grid-template-columns: repeat(4, 1fr); }
}

/* berth tap + bottom sheet */
.berth { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.berth:active, .berth:focus-visible { outline: 2px solid var(--accent); }
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 70vh; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px 16px 0 0; padding: 14px 14px 22px; animation: sheetUp .18s ease-out; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.sheet-head b { display: block; font-size: 15px; }
.sheet-head span { color: var(--muted); font-size: 12px; }
.sheet-x { background: var(--card-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; width: 34px; height: 34px; font-size: 20px; line-height: 1; }
.run { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; margin-bottom: 6px; border: 1px solid var(--line); background: var(--card-2); font-size: 13px; }
.run small { color: var(--muted); }
.run .run-tag { flex: none; min-width: 58px; text-align: center; font-size: 11px; font-weight: 800; padding: 3px 6px; border-radius: 6px; }
.run.free .run-tag { background: var(--green-soft); color: var(--green); }
.run.occ .run-tag { background: var(--red-soft); color: var(--red); }
.run.unk .run-tag { background: rgba(255,255,255,.3); color: var(--muted); }

/* train autocomplete */
.suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; margin-top: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.suggest.hidden { display: none; }
.sug-item { display: flex; gap: 10px; align-items: baseline; width: 100%; text-align: left; padding: 10px 12px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--text); font-size: 13px; cursor: pointer; }
.sug-item:last-child { border-bottom: 0; }
.sug-item b { color: var(--accent); font-variant-numeric: tabular-nums; }
.sug-item span { color: var(--muted); }

/* ---------- v5 additions ---------- */
.tab-bar { overflow-x: auto; scrollbar-width: none; }
.tab-bar::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; padding: 9px 14px; }
.hidden { display: none !important; }
#stationText { width: 100%; }
.verdict { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; margin-bottom: 12px; border: 1px solid var(--line); }
.verdict.yes { background: var(--green-soft); border-color: rgba(47,191,113,.45); }
.verdict.no { background: var(--red-soft); border-color: rgba(229,72,77,.45); }
.verdict .v-ico { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 18px; }
.verdict.yes .v-ico { background: var(--green); color: #06210f; }
.verdict.no .v-ico { background: var(--red); color: #2a0608; }
.verdict b { display: block; font-size: 15px; }
.verdict span { font-size: 12.5px; color: var(--muted); }
.chart-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.cs { border: 1px solid var(--line); background: var(--card-2); border-radius: 12px; padding: 10px; font-size: 12.5px; display: flex; flex-direction: column; gap: 2px; }
.cs b { font-size: 11px; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.cs span { font-weight: 700; }
.cs.done span { color: var(--green); } .cs.pend span { color: var(--amber); }
.cs small { color: var(--muted); }
.snap-lines { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.snap-lines div { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; padding: 8px 10px; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; }
.snap-lines span { color: var(--muted); flex-basis: 100%; font-size: 11.5px; }
.snap-lines em { font-style: normal; color: var(--muted); font-size: 12px; }
/* route timeline */
.stop.tappable { cursor: pointer; }
.stop.sel .sname b, .stop.sel .sname { color: var(--accent); }
.stop.sel .sdot::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.lv-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: 8px; align-items: center; }
.lv { display: inline-block; width: 18px; height: 6px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.lv.g, .leg.g .lrail { background: var(--green); } .lv.a, .leg.a .lrail { background: var(--amber); } .lv.r, .leg.r .lrail { background: var(--red); }
.lv-note { margin-left: auto; font-size: 11px; }
.leg { display: grid; grid-template-columns: 52px 20px 1fr; gap: 10px; align-items: stretch; }
.leg .lrail { width: 4px; border-radius: 2px; justify-self: center; min-height: 34px; }
.leg.dim { opacity: .38; } .leg.dim .lrail { background: var(--line); }
.leg .lbody { padding: 6px 0; }
.leg .lbar { height: 8px; border-radius: 4px; background: var(--card-2); overflow: hidden; }
.leg .lbar i { display: block; height: 100%; border-radius: 4px; }
.leg.g .lbar i { background: var(--green); } .leg.a .lbar i { background: var(--amber); } .leg.r .lbar i { background: var(--red); }
.leg .ltxt { display: flex; justify-content: space-between; font-size: 12px; margin-top: 4px; }
.leg .ltxt b { font-size: 13px; } .leg .ltxt span { color: var(--muted); }
.sflow { margin-top: 5px; display: flex; flex-direction: column; gap: 3px; font-weight: 500; }
.sflow > div { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.sflow .up, .sflow .dn { font-size: 11px; font-weight: 800; margin-right: 2px; }
.sflow .up, .mini-h.up { color: var(--green); } .sflow .dn, .mini-h.dn { color: var(--red); }
.cchip { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); color: var(--text); }
.cchip i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.qpill { display: inline-block; font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; margin: 0 4px 3px 0; }
.qpill b { color: var(--text); }
.cls-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.flow-svg { width: 100%; height: auto; display: block; }
.flow-svg .ax { fill: var(--muted); font-size: 9px; }
.mini-h { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; margin: 14px 0 6px; color: var(--muted); }
.rank-row { display: flex; gap: 8px; margin-bottom: 8px; }
.rk { flex: none; width: 18px; color: var(--muted); font-size: 12px; font-weight: 800; text-align: right; padding-top: 1px; }
.rk-main { flex: 1; min-width: 0; }
.rk-top { display: flex; gap: 6px; align-items: baseline; font-size: 13px; }
.rk-top small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-n { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.rk-sub { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.sbar { height: 8px; border-radius: 4px; background: var(--card-2); margin-top: 4px; overflow: hidden; }
.sbar-in { display: flex; height: 100%; border-radius: 4px; overflow: hidden; }
.sbar-in i { display: block; height: 100%; }
.sbar-in.q i { background: var(--accent); }
.q-line { margin-top: 10px; }
.link-btn { background: none; border: 0; color: var(--accent); text-decoration: underline; font-size: inherit; padding: 0; cursor: pointer; }
.qbar-row { margin-bottom: 9px; }
.qb-top { display: flex; gap: 6px; align-items: baseline; font-size: 13px; }
.qb-top small { color: var(--muted); font-size: 11px; }
.st-det { border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); margin-bottom: 8px; overflow: hidden; }
.st-det summary { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; cursor: pointer; font-size: 14px; list-style: none; }
.st-det summary::-webkit-details-marker { display: none; }
.st-det summary small { color: var(--muted); font-size: 11.5px; }
.st-n { font-weight: 800; background: var(--accent-soft); color: var(--accent); padding: 1px 10px; border-radius: 999px; }
.st-q { padding: 0 12px 8px; font-size: 12px; color: var(--muted); }
.st-q b { color: var(--text); }
.st-coach { padding: 8px 12px; border-top: 1px solid var(--line); }
.st-ch { font-size: 13px; margin-bottom: 5px; } .st-ch small { color: var(--muted); } .st-ch em { font-style: normal; color: var(--muted); margin-left: 4px; }
.st-berths { display: flex; flex-wrap: wrap; gap: 5px; }
.st-b { font-size: 11.5px; padding: 3px 8px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); }
.st-b i { font-style: normal; color: var(--accent); font-weight: 800; }
.st-b small { color: var(--muted); }
.qlegend { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card-2); padding: 8px 10px; font-size: 12px; }
.qlegend summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.qrow { display: flex; gap: 10px; padding: 4px 0; }
.qrow b { flex: none; width: 44px; color: var(--accent); }
.qrow span { color: var(--text); }
.run-tag em { display: block; font-style: normal; font-size: 10px; opacity: .85; }
/* vacancies */
.range-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.range-row label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.range-row select { width: 100%; min-width: 0; background: var(--card-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; font-size: 13px; text-transform: none; letter-spacing: 0; }
.vac-summary { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); font-size: 13px; }
.vac-summary b { color: var(--green); font-size: 16px; }
.corr { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.corr-t { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; flex-basis: 100%; }
.corr-chip { background: var(--green-soft); border: 1px solid rgba(47,191,113,.45); color: var(--text); border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.corr-chip b { color: var(--green); }
.split-box { margin-top: 16px; }
.split-box h3 { font-size: 14px; margin-bottom: 8px; } .split-box h3 .sub { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 6px; }
.split-opt { border: 1px solid var(--line); background: var(--card-2); border-radius: 12px; padding: 10px; margin-bottom: 8px; font-size: 13px; }
.split-mid { margin-bottom: 6px; } .split-mid small { color: var(--muted); }
.split-leg { padding: 3px 0; } .split-leg small { color: var(--muted); }
.sl-tag { display: inline-block; width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 800; margin-right: 6px; }
.conf-list { display: flex; flex-direction: column; gap: 5px; }
.conf-item { font-size: 12.5px; padding: 7px 10px; border-radius: 8px; background: var(--card-2); border: 1px solid var(--line); }
.conf-item span { color: var(--muted); } .conf-item small { display: block; color: var(--muted); margin-top: 2px; }

/* ---------- date picker ---------- */
.date-wrap { position: relative; }
.date-wrap #dateInput { padding-right: 46px; width: 100%; }
.date-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; color: #fff; border-radius: 9px; background: linear-gradient(135deg, #ff7a59, #ff4fa3); overflow: hidden; }
.date-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; font-size: 16px; }
.date-native::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }

/* ---------- colourful theme ---------- */
:root {
  --bg: #0a0c18; --bg-soft: #10132a; --card: #151934; --card-2: #1c2142; --line: #2c3361;
  --accent: #7b8cff; --accent-soft: rgba(123, 140, 255, .18);
  --green: #38d47f; --green-soft: rgba(56, 212, 127, .17);
  --amber: #ffb02e; --amber-soft: rgba(255, 176, 46, .17);
  --red: #ff5a67; --red-soft: rgba(255, 90, 103, .17);
  --c-overview: #7b8cff; --c-vac: #38d47f; --c-coach: #ffb02e; --c-route: #2fd7e0; --c-quota: #ff6fb5;
  --tab-c: var(--c-overview);
}
body {
  background:
    radial-gradient(900px 420px at 0% -5%, rgba(123, 140, 255, .28), transparent 60%),
    radial-gradient(700px 380px at 100% 8%, rgba(255, 111, 181, .20), transparent 60%),
    radial-gradient(800px 500px at 50% 105%, rgba(47, 215, 224, .16), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
#content[data-tab="overview"] { --tab-c: var(--c-overview); }
#content[data-tab="vacancies"] { --tab-c: var(--c-vac); }
#content[data-tab="coaches"] { --tab-c: var(--c-coach); }
#content[data-tab="route"] { --tab-c: var(--c-route); }
#content[data-tab="quota"] { --tab-c: var(--c-quota); }
#content .card { border-top: 3px solid var(--tab-c); background-image: linear-gradient(180deg, color-mix(in srgb, var(--tab-c) 9%, transparent), transparent 90px); }
#content .card:nth-child(3n+2) { border-top-color: color-mix(in srgb, var(--tab-c) 55%, #ff6fb5); }
#content .card:nth-child(3n+3) { border-top-color: color-mix(in srgb, var(--tab-c) 55%, #ffb02e); }
#content .card h2 { color: color-mix(in srgb, var(--tab-c) 55%, #fff); }
.tab[data-tab="overview"].active { background: rgba(123,140,255,.22); color: var(--c-overview); }
.tab[data-tab="vacancies"].active { background: rgba(56,212,127,.2); color: var(--c-vac); }
.tab[data-tab="coaches"].active { background: rgba(255,176,46,.2); color: var(--c-coach); }
.tab[data-tab="route"].active { background: rgba(47,215,224,.2); color: var(--c-route); }
.tab[data-tab="quota"].active { background: rgba(255,111,181,.2); color: var(--c-quota); }
.tab[data-tab="overview"] { box-shadow: inset 0 -2px 0 var(--c-overview); }
.tab[data-tab="vacancies"] { box-shadow: inset 0 -2px 0 var(--c-vac); }
.tab[data-tab="coaches"] { box-shadow: inset 0 -2px 0 var(--c-coach); }
.tab[data-tab="route"] { box-shadow: inset 0 -2px 0 var(--c-route); }
.tab[data-tab="quota"] { box-shadow: inset 0 -2px 0 var(--c-quota); }
.chip.active { background: color-mix(in srgb, var(--tab-c, #7b8cff) 25%, transparent); border-color: var(--tab-c, #7b8cff); color: #fff; }
.go-btn { background: linear-gradient(120deg, #6d7cff, #b06cff 45%, #ff6fb5 80%, #ffb02e); }
.logo, .brand-mark, header .mark { background: linear-gradient(135deg, #6d7cff, #ff6fb5 60%, #ffb02e) !important; }
.stat:nth-child(4n+1) { border-left: 3px solid #7b8cff; } .stat:nth-child(4n+2) { border-left: 3px solid #2fd7e0; }
.stat:nth-child(4n+3) { border-left: 3px solid #ffb02e; } .stat:nth-child(4n+4) { border-left: 3px solid #ff6fb5; }
.stat { background: var(--card-2); }
.class-tag { background: linear-gradient(135deg, rgba(123,140,255,.3), rgba(255,111,181,.25)); }
.cs.done { border-color: rgba(56,212,127,.5); } .cs.pend { border-color: rgba(255,176,46,.5); }
.qpill { background: rgba(255,111,181,.16); color: #ff9fd0; }
.st-n { background: rgba(255,111,181,.18); color: #ff9fd0; }
.qrow b { color: #ff9fd0; } .st-b i { color: #ff9fd0; }
.sbar-in.q i { background: linear-gradient(90deg, #7b8cff, #ff6fb5); }
.berth.free { background: linear-gradient(180deg, rgba(56,212,127,.28), rgba(56,212,127,.1)); }
.berth.partial { background: linear-gradient(180deg, rgba(255,176,46,.26), rgba(255,176,46,.09)); }
.sheet { border-top: 3px solid var(--c-coach); }
.verdict.yes { background: linear-gradient(120deg, rgba(56,212,127,.28), rgba(47,215,224,.14)); }
.verdict.no { background: linear-gradient(120deg, rgba(255,90,103,.28), rgba(255,176,46,.12)); }
.split-opt { border-left: 3px solid var(--c-vac); }
.corr-chip { background: rgba(56,212,127,.16); }

.link-a { display: inline-block; text-decoration: none; text-align: center; }

.ntes-lines { display: flex; flex-direction: column; gap: 5px; }
.ntes-lines div { font-size: 12.5px; padding: 7px 10px; background: var(--card-2); border: 1px solid var(--line); border-radius: 8px; }

/* v8 */
.fq-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.fq-sum div { background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; }
.fq-sum b { display: block; font-size: 20px; color: #ff9fd0; }
.fq-sum span { font-size: 11px; color: var(--muted); }
.cls-chip { font-size: 12px; padding: 3px 10px; border: 1.5px solid; border-radius: 999px; }
.fq-actions { display: flex; gap: 8px; margin-bottom: 10px; }
.fq-actions .btn-ghost { flex: 1; }
.fq-det { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: var(--card-2); }
.fq-det summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
.fq-det summary::-webkit-details-marker { display: none; }
.fq-det summary::after { content: '+'; color: var(--muted); font-weight: 800; }
.fq-det[open] summary::after { content: '\2212'; }
.fq-name { flex: none; min-width: 64px; }
.fq-name i { font-style: normal; font-size: 12px; font-weight: 700; }
.fq-bar { flex: 1; height: 8px; background: rgba(255,255,255,.07); border-radius: 6px; overflow: hidden; }
.fq-bar u { display: block; height: 100%; border-radius: 6px; }
.fq-n { font-weight: 800; min-width: 38px; text-align: right; }
.fq-n small { color: var(--muted); font-weight: 600; }
.fq-body { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 10px; }
.fq-berth { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 12px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.fq-berth b { color: #fff; font-size: 14px; }
.fq-berth small { color: var(--muted); }
.fq-berth span { color: var(--muted); }
.fq-berth i { font-style: normal; color: #ff9fd0; font-weight: 700; }
.flow-svg { display: block; margin: 6px 0; overflow: visible; }
.flow-heads { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 0 6px; }
.flow-list h3 { font-size: 14px; margin: 12px 0 6px; display: flex; align-items: center; gap: 8px; }
.flow-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 7px 10px; background: var(--card-2); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 5px; font-size: 13px; }
.flow-row em { font-style: normal; font-weight: 800; color: #ff9fd0; }
.flow-row small { grid-column: 1 / -1; color: var(--muted); }
.brand-mark { padding: 0 !important; overflow: hidden; display: block; }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.credit { margin-top: 8px; font-weight: 700; color: var(--text); }
.confirm-line { color: #fff; }

.stop .stime .tl { display: block; font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; }
.stop .stime .tl em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-right: 3px; }
.mode-card { display: flex; flex-direction: column; gap: 10px; }
.seg { display: flex; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; padding: 9px 6px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: linear-gradient(135deg, #ffb02e, #ff6fb5); color: #fff; }
.fq-map { padding: 0 10px 10px; }
.fq-fail { padding: 10px 12px; color: var(--muted); font-size: 13px; }
.berth.qm { border-color: #ff6fb5; background: rgba(255,111,181,.22); box-shadow: 0 0 0 1px #ff6fb5 inset; }
.berth.qm .b-code { color: #ffd0e8; font-weight: 800; }
.berth.qdim { opacity: .28; }


/* ---------- live running status ---------- */
.live-card { border-color: rgba(47,191,113,.35); background: linear-gradient(160deg, rgba(47,191,113,.08), var(--card) 55%); }
.live-hero { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--green-soft); border: 1px solid rgba(47,191,113,.4); }
.live-hero.late { background: var(--amber-soft); border-color: rgba(245,165,36,.5); }
.live-pos { font-weight: 700; font-size: 15px; }
.live-next { font-size: 13px; margin-top: 4px; color: var(--text); }
.live-bar { margin-top: 10px; height: 8px; }
.live-bar i { background: linear-gradient(90deg, #2fbf71, #6d7cff); }
.live-sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.live-err { color: var(--amber); }
.live-stops { margin-top: 12px; }
.live-stops summary { cursor: pointer; font-size: 13px; color: var(--accent); padding: 6px 0; }
.lv-list { margin-top: 6px; }
.lv-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.lv-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--muted); flex: none; }
.lv-row.done .lv-dot { background: var(--green); border-color: var(--green); }
.lv-row.here .lv-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.lv-row.done { opacity: .75; }
.lv-main { flex: 1; min-width: 0; }
.lv-main small { color: var(--muted); display: block; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-t { text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.lv-t em { display: block; font-style: normal; font-size: 11.5px; font-weight: 600; }
.lv-t em.ok { color: var(--green); }
.lv-t em.late { color: var(--amber); }
.lv-t small { display: block; color: var(--muted); font-size: 11px; }

/* ---------- fare, route search, run-day ---------- */
.route-search { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.route-search summary { cursor: pointer; font-size: 13px; color: var(--accent); }
.rs-grid { display: grid; gap: 10px; margin-top: 10px; }
.rs-pos { position: relative; }
.rs-train { display: block; width: 100%; text-align: left; margin-top: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); font: inherit; cursor: pointer; }
.rs-train:active { transform: scale(.99); }
.rs-top { font-size: 14px; }
.rs-times { margin-top: 4px; font-size: 14px; font-weight: 600; }
.rs-times small { color: var(--muted); font-weight: 500; margin-left: 6px; }
.rs-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.rs-cls i { font-style: normal; font-size: 11.5px; padding: 2px 7px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); margin-left: 4px; }
.fare-card { border-color: rgba(255,176,46,.35); background: linear-gradient(160deg, rgba(255,176,46,.07), var(--card) 55%); }
.fare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fare-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; min-width: 0; }
.fare-grid select, .fare-grid input { width: 100%; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); font: inherit; font-size: 14px; text-transform: none; min-width: 0; }
.fare-date { grid-column: 1 / -1; }
.fare-box { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); }
.fare-top b { display: block; font-size: 14px; }
.fare-top span { font-size: 12px; color: var(--muted); }
.fare-lines { margin-top: 8px; }
.fare-lines > div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13.5px; border-bottom: 1px dashed var(--line); }
.fare-lines .fare-total { border-bottom: 0; font-size: 16px; font-weight: 700; color: var(--amber); padding-top: 8px; }
.avl-list { margin-top: 10px; }
.avl-row { display: flex; justify-content: space-between; padding: 8px 10px; margin-top: 6px; border-radius: 10px; background: var(--bg-soft); font-size: 13.5px; }
.avl.ok { color: var(--green); } .avl.rac { color: var(--amber); } .avl.wl { color: var(--red); }
.runday { border-color: rgba(245,165,36,.5); background: var(--amber-soft); }
.runday h2 { color: var(--amber); }

.berth { position: relative; }
.berth .b-share { position: absolute; top: 2px; right: 3px; min-width: 14px; height: 14px; line-height: 14px; border-radius: 7px; background: var(--amber); color: #111; font-size: 9px; font-weight: 800; text-align: center; }
.shared-box { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--amber); border-radius: 10px; background: var(--amber-soft); }
.shared-box > b { display: block; margin-bottom: 6px; font-size: 13px; }
.shared-row { font-size: 13px; padding: 4px 0; }
.shared-row span { font-weight: 700; }
.shared-row em { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 8px; background: var(--amber); color: #111; margin-right: 4px; }
.mx-table td, .mx-table th { white-space: nowrap; padding: 6px 8px; }
.mx-table .mx-0 { color: var(--muted); opacity: .5; }
.mx-table tr.mx-tot td { border-top: 1px solid var(--line, rgba(255,255,255,.3)); }
.fare-card > summary { cursor: pointer; list-style: none; }
.fare-card > summary::-webkit-details-marker { display: none; }
.fare-card > summary h2 { margin-bottom: 0; }
.fare-card[open] > summary h2 { margin-bottom: 10px; }
.mx-b { background: none; border: 0; color: inherit; font: inherit; font-weight: 700; padding: 4px 8px; border-radius: 8px; cursor: pointer; text-decoration: underline dotted; }
.mx-b.on { background: var(--amber); color: #111 !important; text-decoration: none; }
.mx-list { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line, rgba(255,255,255,.3)); border-radius: 10px; }
.mx-list > b { display: block; margin-bottom: 6px; font-size: 13px; }
.mx-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.07); font-size: 13px; }
.mx-row .mx-leg { grid-column: 1 / 3; color: var(--muted); font-size: 12px; }
.mx-row .mx-q { font-size: 11px; font-weight: 700; color: var(--amber); }
.mx-sum { margin-top: 10px; font-size: 13px; }
.mx-list { margin-top: 10px; }
.mx-list > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
#mxChips { margin-top: 8px; }

.recent-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.recent-h { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-right: 2px; }
.recent-chip small { color: var(--muted); }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.share-row .mini-note { margin: 0; }
#iosHint { margin-top: 10px; }
.pnr-box { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line, rgba(255,255,255,.3)); border-radius: 10px; }
.pnr-top { font-size: 14px; margin-bottom: 6px; }
.pnr-lines > div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 13px; }
.pnr-lines span { color: var(--muted); }
.pnr-pax { margin-top: 8px; }
.pnr-p { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.07); font-size: 13px; }
.pnr-p > span { grid-column: 1 / 3; font-weight: 700; }
.pnr-p small { color: var(--muted); }
.pnr-p em { font-style: normal; color: var(--muted); font-size: 12px; }

/* ================= v21 refresh: brighter theme, clear tap affordances, train loader ================= */
:root {
  --bg: #2b2478;
  --bg-soft: #372f8f;
  --card: #41399f;
  --card-2: #4d44b4;
  --line: rgba(255,255,255,.24);
  --text: #ffffff;
  --muted: #d6d1ff;
  --accent: #a3b2ff;
  --accent-soft: rgba(163,178,255,.26);
  --green: #3bf09a; --green-soft: rgba(59,240,154,.2);
  --amber: #ffc43d; --amber-soft: rgba(255,196,61,.22);
  --red: #ff6b7a; --red-soft: rgba(255,107,122,.22);
  --c-overview: #a3b2ff; --c-vac: #3bf09a; --c-coach: #ffc43d; --c-route: #3ee8f2; --c-quota: #ff7cc4;
  --raise: 0 3px 0 rgba(10,6,50,.45);
}
body {
  background:
    radial-gradient(900px 480px at 0% -5%, rgba(255,111,181,.50), transparent 60%),
    radial-gradient(800px 460px at 100% 6%, rgba(62,232,242,.38), transparent 60%),
    radial-gradient(900px 560px at 50% 108%, rgba(255,196,61,.34), transparent 60%),
    linear-gradient(180deg, #2f2788, #231d66);
  background-attachment: fixed;
}
.topbar { background: linear-gradient(180deg, #5246c9, #3a31a0); border-bottom: 1px solid rgba(255,255,255,.25); }
.tagline { color: #e4e0ff; }
.notice.error p { color: #ffd2d6; } .notice.warn p { color: #ffeab8; }
.tab-bar { background: rgba(20,12,80,.35); }
.tab { color: #e4e0ff; }
input, select { background: #2a2377; color: #fff; border-color: rgba(255,255,255,.35); }
.recent-h, .mini-note, .hint { color: var(--muted); }

/* --- tappable things look raised, static things stay flat --- */
.tab, .chip, .btn-ghost, .coach-chip, .mx-b, .fq-berth, .rs-train, .icon-btn, .go-btn, .berth, .flow-node {
  cursor: pointer; -webkit-tap-highlight-color: rgba(255,255,255,.25);
}
.chip, .btn-ghost, .coach-chip, .rs-train, .icon-btn, .fq-berth {
  border: 1.5px solid rgba(255,255,255,.5); box-shadow: var(--raise);
  background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.08));
  color: #fff; font-weight: 700;
}
.chip:active, .btn-ghost:active, .coach-chip:active, .rs-train:active, .icon-btn:active, .fq-berth:active, .go-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(10,6,50,.45); }
.go-btn { box-shadow: 0 4px 0 rgba(10,6,50,.5), 0 8px 18px rgba(255,111,181,.35); border: 1.5px solid rgba(255,255,255,.45); color: #fff; font-weight: 800; }
.chip.active, .coach-chip.active { color: #fff; box-shadow: 0 0 0 2px var(--tab-c, #fff) inset, var(--raise); }
.berth { box-shadow: 0 2px 0 rgba(10,6,50,.4); border: 1.5px solid rgba(255,255,255,.4); }
.berth:active { transform: translateY(1px); }
.tab { border: 1.5px solid rgba(255,255,255,.25); }
.mx-b { text-decoration: underline; text-underline-offset: 3px; }
.link-btn { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* static info: flat, no shadow, no border-lift */
.stat, .stat-box, .quota-pill, .flag-pill, .qpill, .class-tag, .cs, .fare-box, .pnr-box, .ntes-lines div, .fq-sum div {
  box-shadow: none; cursor: default;
}
.quota-pill, .flag-pill, .qpill, .st-n { border-style: dashed; }
/* tappable route stops get an arrow */
.stop.tappable { cursor: pointer; }
.stop.tappable .smeta::after { content: ' \203A'; font-weight: 900; font-size: 18px; color: var(--tab-c); }

/* --- every expandable gets the same chevron pill --- */
details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after, .fq-det summary::after, .fq-det[open] summary::after {
  content: ''; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.22) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/16px no-repeat;
  box-shadow: none; transition: transform .18s ease; color: inherit; font-weight: 400;
}
details[open] > summary::after, .fq-det[open] summary::after { transform: rotate(180deg); }
details.route-search > summary, details.foot-priv > summary, .mx-list > summary {
  padding: 10px 12px; border: 1.5px solid rgba(255,255,255,.45); border-radius: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.06)); box-shadow: var(--raise);
}
details.route-search[open] > summary { margin-bottom: 10px; }
.fare-card > summary h2 .sub { display: block; margin: 2px 0 0; }
.foot-priv { margin: 10px auto; max-width: 520px; text-align: left; }
.foot-priv p { margin-top: 8px; font-size: 12.5px; color: var(--muted); }

/* --- train loader: a little train rolling along a track --- */
.spinner {
  width: 112px; height: 34px; border: 0; border-radius: 0; margin-top: 0; position: relative; flex: 0 0 auto; animation: none;
  background:
    linear-gradient(#fff, #fff) 0 27px / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, rgba(255,255,255,.75) 0 3px, transparent 3px 11px) 0 31px / 100% 3px repeat-x;
  animation: sleepers .45s linear infinite;
}
.spinner::before {
  content: ''; position: absolute; left: 4px; top: 1px; width: 104px; height: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 104 28'%3E%3Crect x='2' y='7' width='22' height='15' rx='3' fill='%23ff6fb5'/%3E%3Crect x='5' y='10' width='6' height='5' rx='1' fill='%23fff'/%3E%3Crect x='14' y='10' width='6' height='5' rx='1' fill='%23fff'/%3E%3Crect x='27' y='7' width='22' height='15' rx='3' fill='%23ffc43d'/%3E%3Crect x='30' y='10' width='6' height='5' rx='1' fill='%23fff'/%3E%3Crect x='39' y='10' width='6' height='5' rx='1' fill='%23fff'/%3E%3Cpath d='M24 17h3M49 17h5' stroke='%23fff' stroke-width='2'/%3E%3Crect x='54' y='5' width='20' height='17' rx='3' fill='%233ee8f2'/%3E%3Crect x='52' y='2' width='24' height='4' rx='2' fill='%23fff'/%3E%3Crect x='58' y='9' width='9' height='7' rx='1.5' fill='%232b2478'/%3E%3Crect x='72' y='10' width='28' height='12' rx='5' fill='%2316b8c9'/%3E%3Crect x='88' y='3' width='7' height='8' rx='1.5' fill='%232b2478'/%3E%3Crect x='86' y='1' width='11' height='3' rx='1.5' fill='%23fff'/%3E%3Ccircle cx='80' cy='9' r='3.2' fill='%23ffc43d'/%3E%3Ccircle cx='99' cy='14' r='2' fill='%23fff7a8'/%3E%3Cpath d='M98 22h6l-6 -5z' fill='%23fff'/%3E%3Ccircle cx='9' cy='24' r='2.6' fill='%23fff'/%3E%3Ccircle cx='18' cy='24' r='2.6' fill='%23fff'/%3E%3Ccircle cx='32' cy='24' r='2.6' fill='%23fff'/%3E%3Ccircle cx='43' cy='24' r='2.6' fill='%23fff'/%3E%3Ccircle cx='61' cy='24' r='3.4' fill='%23fff'/%3E%3Ccircle cx='75' cy='24' r='2.8' fill='%23fff'/%3E%3Ccircle cx='85' cy='24' r='2.8' fill='%23fff'/%3E%3Ccircle cx='95' cy='24' r='2.8' fill='%23fff'/%3E%3C/svg%3E") no-repeat 0 0 / 104px 28px;
  animation: rock .5s ease-in-out infinite alternate;
}
.spinner::after {
  content: ''; position: absolute; left: 96px; top: -2px; width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.85); animation: puff 1.1s ease-out infinite;
}
@keyframes puff { from { transform: translate(0,0) scale(.5); opacity: .9; } to { transform: translate(-14px,-10px) scale(1.5); opacity: 0; } }
@keyframes sleepers { to { background-position: 0 27px, -11px 31px; } }
@keyframes rock { from { transform: translateY(0); } to { transform: translateY(-1.5px); } }
@media (prefers-reduced-motion: reduce) { .spinner, .spinner::before, .spinner::after { animation: none; } }
#slowNote:empty { display: none; }

/* v21b */
body { background:
    radial-gradient(900px 480px at 0% -5%, rgba(255,111,181,.55), transparent 60%),
    radial-gradient(800px 460px at 100% 6%, rgba(62,232,242,.42), transparent 60%),
    radial-gradient(900px 560px at 50% 108%, rgba(255,196,61,.38), transparent 60%),
    linear-gradient(180deg, #3d34ad, #2d2689); background-attachment: fixed; }
:root { --card: #4a41b4; --card-2: #5850c6; --bg-soft: #4036a8; }
.tab-bar { background: #3a30a0; box-shadow: 0 6px 14px rgba(20,10,80,.35); }
.quota-pill, .flag-pill, .qpill, .st-n { border-style: solid; border-color: transparent; }
.credit { margin-top: 12px; }
.credit a, footer a { color: #fff; font-weight: 700; text-underline-offset: 3px; }
.upd-row { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.ver { color: var(--muted); opacity: .8; }
footer { text-align: center; }
.foot-priv { text-align: left; }

/* v24: flatter look - borders carry the tappable cue, shadows nearly gone */
:root { --raise: none; }
.chip, .btn-ghost, .coach-chip, .rs-train, .icon-btn, .fq-berth { box-shadow: none; border: 1.5px solid rgba(255,255,255,.4); }
.chip:active, .btn-ghost:active, .coach-chip:active, .rs-train:active, .icon-btn:active, .fq-berth:active, .go-btn:active { transform: none; box-shadow: none; opacity: .8; }
.go-btn { box-shadow: none; }
.chip.active, .coach-chip.active { box-shadow: 0 0 0 2px var(--tab-c, #fff) inset; }
.berth { box-shadow: none; }
.berth:active { transform: none; opacity: .8; }
.berth.qm { box-shadow: 0 0 0 1px #ff6fb5 inset; }
details > summary .chev, .chev { box-shadow: none; }
details summary::after, details > summary::before { box-shadow: none; }
.tab-bar { box-shadow: 0 1px 0 rgba(255,255,255,.15); }
.suggest { box-shadow: 0 4px 10px rgba(10,6,50,.25); }
/* Option A: seat with backrest and armrests */
.bay-grid{gap:16px 8px!important}
.berth{--sc:rgba(255,255,255,.5);--sf:rgba(255,255,255,.08);background:var(--sf)!important;border:1.5px solid var(--sc)!important;border-left-width:4px!important;border-right-width:4px!important;border-radius:5px 5px 13px 13px!important;margin-top:12px;padding:7px 4px 7px!important;position:relative}
.berth::before{content:"";position:absolute;left:8%;right:8%;top:-13px;height:12px;background:var(--sf);border:1.5px solid var(--sc);border-bottom:0;border-radius:10px 10px 0 0}
.berth.free{--sc:#38d47f;--sf:rgba(56,212,127,.2)}
.berth.partial{--sc:#ffb02e;--sf:rgba(255,176,46,.2)}
.berth.qm{--sc:#ff6fb5;--sf:rgba(255,111,181,.25)}
.berth.free .b-code,.berth.partial .b-code{color:inherit}

/* mini train for button loading text */
.mini-train { display: inline-block; width: 28px; height: 10px; vertical-align: -1px; margin-right: 6px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 104 28'%3E%3Crect x='2' y='7' width='22' height='15' rx='3' fill='%23ff6fb5'/%3E%3Crect x='5' y='10' width='6' height='5' rx='1' fill='%23fff'/%3E%3Crect x='14' y='10' width='6' height='5' rx='1' fill='%23fff'/%3E%3Crect x='27' y='7' width='22' height='15' rx='3' fill='%23ffc43d'/%3E%3Crect x='30' y='10' width='6' height='5' rx='1' fill='%23fff'/%3E%3Crect x='39' y='10' width='6' height='5' rx='1' fill='%23fff'/%3E%3Cpath d='M24 17h3M49 17h5' stroke='%23fff' stroke-width='2'/%3E%3Crect x='54' y='5' width='20' height='17' rx='3' fill='%233ee8f2'/%3E%3Crect x='52' y='2' width='24' height='4' rx='2' fill='%23fff'/%3E%3Crect x='58' y='9' width='9' height='7' rx='1.5' fill='%232b2478'/%3E%3Crect x='72' y='10' width='28' height='12' rx='5' fill='%2316b8c9'/%3E%3Crect x='88' y='3' width='7' height='8' rx='1.5' fill='%232b2478'/%3E%3Crect x='86' y='1' width='11' height='3' rx='1.5' fill='%23fff'/%3E%3Ccircle cx='80' cy='9' r='3.2' fill='%23ffc43d'/%3E%3Ccircle cx='99' cy='14' r='2' fill='%23fff7a8'/%3E%3Cpath d='M98 22h6l-6 -5z' fill='%23fff'/%3E%3Ccircle cx='9' cy='24' r='2.6' fill='%23fff'/%3E%3Ccircle cx='18' cy='24' r='2.6' fill='%23fff'/%3E%3Ccircle cx='32' cy='24' r='2.6' fill='%23fff'/%3E%3Ccircle cx='43' cy='24' r='2.6' fill='%23fff'/%3E%3Ccircle cx='61' cy='24' r='3.4' fill='%23fff'/%3E%3Ccircle cx='75' cy='24' r='2.8' fill='%23fff'/%3E%3Ccircle cx='85' cy='24' r='2.8' fill='%23fff'/%3E%3Ccircle cx='95' cy='24' r='2.8' fill='%23fff'/%3E%3C/svg%3E") no-repeat 0 0 / 28px 8px; animation: rock .5s ease-in-out infinite alternate; }

/* ===== v26: TrainWala theme - calm slate (night) + light (day), few gradients, almost no shadows ===== */
:root{--bg:#151c2c;--bg-soft:#1c2539;--card:#232d47;--card-2:#2b3654;--line:rgba(255,255,255,.2);--text:#f1f4fb;--muted:#b6c0d8;--accent:#8fb4ff;--accent-soft:rgba(143,180,255,.2);--green:#4be39a;--green-soft:rgba(75,227,154,.18);--amber:#ffbf47;--amber-soft:rgba(255,191,71,.18);--red:#ff7a85;--red-soft:rgba(255,122,133,.18);--c-overview:#8fb4ff;--c-vac:#4be39a;--c-coach:#ffbf47;--c-route:#5ed6e8;--c-quota:#f5a0d0;--raise:none}
body{background:#151c2c!important;color:var(--text)}
.topbar{background:#1c2539!important;border-bottom:1px solid rgba(255,255,255,.14)!important;box-shadow:none!important}
.tab-bar{background:#151c2c!important;box-shadow:0 1px 0 rgba(255,255,255,.12)!important}
.go-btn{background:#4f7be8!important;box-shadow:none!important;border:0!important;color:#fff!important}
.date-btn{background:#4f7be8!important;box-shadow:none!important}
.brand-mark,.logo,header .mark{background:#4f7be8!important}
#content .card{background-image:none!important}
.class-tag{background:var(--accent-soft)!important}
.sbar-in.q i{background:var(--accent)!important}
.verdict.yes{background:var(--green-soft)!important}
.verdict.no{background:var(--red-soft)!important}
.seg button.on{background:var(--accent)!important;color:#10182b!important}
.live-card,.fare-card{background:var(--card)!important}
.chip,.btn-ghost,.coach-chip,.rs-train,.icon-btn,.fq-berth,.tab,.mx-b{background:rgba(255,255,255,.07)!important;box-shadow:none!important}
.chip.active,.coach-chip.active{background:var(--accent-soft)!important}
details.route-search>summary,details.foot-priv>summary,.mx-list>summary{background:rgba(255,255,255,.07)!important;box-shadow:none!important}
.suggest{box-shadow:none!important;border:1px solid rgba(255,255,255,.3)!important}
.berth.free{--sc:#4be39a;--sf:rgba(75,227,154,.2)}
.berth.partial{--sc:#ffbf47;--sf:rgba(255,191,71,.2)}
.berth.qm{--sc:#f5a0d0;--sf:rgba(245,160,208,.25)}
.top-actions{display:flex;gap:8px;align-items:center}
.top-actions .icon-btn.hidden{display:none}

/* light (day) mode */
html[data-theme="light"]{--bg:#f2f6fb;--bg-soft:#e8eef7;--card:#ffffff;--card-2:#f3f7fc;--line:rgba(30,50,90,.22);--text:#1b2638;--muted:#55627a;--accent:#2563d8;--accent-soft:rgba(37,99,216,.14);--green:#0f9d58;--green-soft:rgba(15,157,88,.14);--amber:#c77700;--amber-soft:rgba(224,140,0,.16);--red:#d93a4a;--red-soft:rgba(217,58,74,.14);--c-overview:#2563d8;--c-vac:#0f9d58;--c-coach:#d98200;--c-route:#0891b2;--c-quota:#d6338a}
html[data-theme="light"] body{color:var(--text);background:#f2f6fb!important}
html[data-theme="light"] .topbar{background:linear-gradient(180deg,#ffffff,#eef3fa)!important;border-bottom:1px solid rgba(30,50,90,.2)!important;color:var(--text)}
html[data-theme="light"] .topbar *{color:var(--text)}
html[data-theme="light"] .topbar .sub,html[data-theme="light"] .topbar p{color:var(--muted)!important}
html[data-theme="light"] .tab-bar{background:#f2f6fb!important;box-shadow:0 1px 0 rgba(30,50,90,.15)!important}
html[data-theme="light"] .card,html[data-theme="light"] .bay,html[data-theme="light"] .notice{color:var(--text)}
html[data-theme="light"] h1,html[data-theme="light"] h2,html[data-theme="light"] h3,html[data-theme="light"] h4,html[data-theme="light"] b,html[data-theme="light"] strong,html[data-theme="light"] label,html[data-theme="light"] summary,html[data-theme="light"] .b-num,html[data-theme="light"] .chip,html[data-theme="light"] .btn-ghost,html[data-theme="light"] .coach-chip,html[data-theme="light"] .tab,html[data-theme="light"] .rs-train,html[data-theme="light"] .icon-btn,html[data-theme="light"] .fq-berth,html[data-theme="light"] .mx-b,html[data-theme="light"] .credit,html[data-theme="light"] .credit a,html[data-theme="light"] footer a,html[data-theme="light"] .stop,html[data-theme="light"] .sname{color:var(--text)!important}
html[data-theme="light"] .chip,html[data-theme="light"] .btn-ghost,html[data-theme="light"] .coach-chip,html[data-theme="light"] .rs-train,html[data-theme="light"] .icon-btn,html[data-theme="light"] .fq-berth,html[data-theme="light"] .tab,html[data-theme="light"] .mx-b{background:#fff!important;border:1.5px solid rgba(30,50,90,.35)!important}
html[data-theme="light"] .chip.active,html[data-theme="light"] .coach-chip.active{background:var(--accent-soft)!important}
html[data-theme="light"] input,html[data-theme="light"] select{background:#fff!important;color:var(--text)!important;border-color:rgba(30,50,90,.35)!important}
html[data-theme="light"] .go-btn{background:#2563d8!important;color:#fff!important}
html[data-theme="light"] .go-btn *{color:#fff!important}
html[data-theme="light"] .date-btn{background:#2563d8!important}
html[data-theme="light"] .berth{--sc:rgba(30,50,90,.5);--sf:rgba(30,50,90,.06)}
html[data-theme="light"] .berth.free{--sc:#0f9d58;--sf:rgba(15,157,88,.16)}
html[data-theme="light"] .berth.partial{--sc:#d98200;--sf:rgba(224,140,0,.18)}
html[data-theme="light"] .berth.qm{--sc:#d6338a;--sf:rgba(214,51,138,.16)}
html[data-theme="light"] .berth .b-code{color:var(--muted)}
html[data-theme="light"] .berth .legbar i{background:rgba(30,50,90,.2)}
html[data-theme="light"] .legend,html[data-theme="light"] .mini-note,html[data-theme="light"] .bay .bay-label{color:var(--muted)!important}
html[data-theme="light"] .mx-b{color:var(--text)!important}
html[data-theme="light"] details > summary::after,html[data-theme="light"] .fq-det summary::after,html[data-theme="light"] .fq-det[open] summary::after{background-color:rgba(30,50,90,.14)!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b2638' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")!important}
html[data-theme="light"] details.route-search>summary,html[data-theme="light"] details.foot-priv>summary,html[data-theme="light"] .mx-list>summary{background:#fff!important;border:1.5px solid rgba(30,50,90,.35)!important;color:var(--text)!important}
html[data-theme="light"] .legend .l-unk{background:rgba(30,50,90,.3)}
html[data-theme="light"] .topbar{background:#fff!important}
html[data-theme="light"] .brand-mark{background:#2563d8!important}
html[data-theme="light"] .tab-bar{background:#f2f6fb!important}
html[data-theme="light"] .seg button.on{background:#2563d8!important;color:#fff!important}
html[data-theme="light"] .spinner{background-color:#243050;border-radius:8px}
html[data-theme="light"] .suggest{border:1px solid rgba(30,50,90,.3)!important}
html[data-theme="light"] .top-actions .icon-btn{color:var(--text)!important}
html[data-theme="light"] .berth .legbar i.free{background:var(--green)}
html[data-theme="light"] .berth .legbar i.occ{background:var(--red)}
.brand-mark,html[data-theme="light"] .brand-mark{background:#243050!important;border-radius:10px}
html[data-theme="light"] .link-btn{color:var(--accent)!important;font-weight:700}
html[data-theme="light"] .qpill,html[data-theme="light"] .st-n,html[data-theme="light"] .qrow b,html[data-theme="light"] .st-b i,html[data-theme="light"] .fq-sum b,html[data-theme="light"] .fq-berth i,html[data-theme="light"] .flow-row em{color:#b3206f!important}

/* v30: tab bar scroll hint - arrows get their own slots beside the tabs, never over labels */
.tab-wrap { position: sticky; top: 69px; z-index: 10; margin-top: 18px; display: flex; align-items: center; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: #151c2c; }
.tab-wrap:has(.tab-bar.hidden) { display: none; }
.tab-wrap .tab-bar { position: static; margin-top: 0; flex: 1 1 auto; min-width: 0; background: transparent !important; border: 0 !important; padding: 0 !important; box-shadow: none !important; border-radius: 0; }
.tab-arrow { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.55); background: var(--accent); color: #10182b; font-size: 21px; line-height: 1; font-weight: 800; display: grid; place-items: center; padding: 0 0 3px; cursor: pointer; }
.tab-arrow.off { display: grid; visibility: hidden; pointer-events: none; }
html[data-theme="light"] .tab-wrap { background: #f2f6fb; border-color: rgba(30,50,90,.22); }
html[data-theme="light"] .tab-arrow { background: #2563d8; color: #fff; border-color: #fff; }

/* v30: coach view - free berths stand out, with a shape cue as well as colour */
.berth.free { --sf: color-mix(in srgb, var(--green) 34%, transparent); border-width: 2px; }
.berth.partial { --sf: color-mix(in srgb, var(--amber) 30%, transparent); }
.berth:not(.free):not(.partial):not(.qm) { opacity: .62; }
.berth.free::after, .berth.partial::after { position: absolute; left: 7px; top: 3px; font-size: 11px; font-weight: 900; line-height: 1; }
.berth.free::after { content: "\2713"; color: var(--green); }
.berth.partial::after { content: "\25D0"; color: var(--amber); }
.focus-free .berth:not(.free):not(.partial) { opacity: .18; }
.berth.flash { animation: bflash .6s ease-in-out 3; }
@keyframes bflash { 0%,100% { transform: none; } 50% { transform: scale(1.12); } }
.free-sum { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.fs-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.fs-head span { color: var(--muted); font-size: 12.5px; flex: 1 1 140px; }
.fs-row { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; }
.fs-tag { flex: 0 0 auto; font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 8px; white-space: nowrap; }
.fs-tag.full { background: var(--green-soft); color: var(--green); }
.fs-tag.part { background: var(--amber-soft); color: var(--amber); }
.fs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { border: 1.5px solid var(--line); background: transparent; color: var(--text); border-radius: 10px; padding: 4px 8px; font-size: 12px; cursor: pointer; }
.fchip b { font-size: 13px; }
.fchip small { color: var(--muted); font-size: 10.5px; }
.fchip.full { border-color: var(--green); }
.fchip.part { border-color: var(--amber); }
.legend .l-bfull, .legend .l-bpart, .legend .l-bocc { width: 12px; height: 12px; border-radius: 3px 3px 6px 6px; border: 2px solid; background: transparent; }
.legend .l-bfull { border-color: var(--green); background: var(--green-soft); }
.legend .l-bpart { border-color: var(--amber); background: var(--amber-soft); }
.legend .l-bocc { border-color: rgba(255,255,255,.45); opacity: .6; }
html[data-theme="light"] .legend .l-bocc { border-color: rgba(30,50,90,.5); }
html[data-theme="light"] .berth.free::after { color: #0b7a43; }
html[data-theme="light"] .berth.partial::after { color: #a35f00; }
html[data-theme="light"] .fchip { color: var(--text); }
.cc-free.unk, .cr-free.unk { color: var(--muted, #8a94a8); font-weight: 600; }
.cr-free.unk { font-size: 13px; }
.warn-note { margin: 8px 0 0; padding: 6px 8px; border-left: 3px solid #d99a1c; background: rgba(217,154,28,.12); border-radius: 4px; }
.berth.inc { border-style: dashed; }
.berth.inc::after { content: "?"; color: var(--amber); }
html[data-theme="light"] .berth.inc::after { color: #a35f00; }
.fchip.inc { border-color: var(--amber); border-style: dashed; }
.fs-tag.inc { background: rgba(139,148,171,.2); color: var(--muted); }
.legend .l-binc { width: 12px; height: 12px; border-radius: 3px 3px 6px 6px; border: 2px dashed var(--amber); background: transparent; }
