/* ============================================================
 * TrainWala v0.13 makeover: calm solid surfaces, landing home,
 * tools grid, self-hosted fonts. Loaded last - wins ties by order.
 * ============================================================ */

/* self-hosted fonts (woff2, latin). Files are the family binaries
 * served per weight; declare the used weight for each face. */
@font-face { font-family:'Inter'; font-style:normal; font-weight:400; font-display:swap; src:url('../fonts/Inter-400.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:600; font-display:swap; src:url('../fonts/Inter-600.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:700; font-display:swap; src:url('../fonts/Inter-700.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:800; font-display:swap; src:url('../fonts/Inter-800.woff2') format('woff2'); }
@font-face { font-family:'Plus Jakarta Sans'; font-style:normal; font-weight:700; font-display:swap; src:url('../fonts/PlusJakartaSans-700.woff2') format('woff2'); }
@font-face { font-family:'Plus Jakarta Sans'; font-style:normal; font-weight:800; font-display:swap; src:url('../fonts/PlusJakartaSans-800.woff2') format('woff2'); }

/* ---------- backdrop: quiet, solid ---------- */
html[data-theme="light"] body{
  background:#f2f5fa!important; background-image:none!important;
  font-family:'Inter','Segoe UI',system-ui,sans-serif!important; color:#101a33;
}
html:not([data-theme="light"]) body{
  background:#0d1120!important; background-image:none!important;
  font-family:'Inter','Segoe UI',system-ui,sans-serif!important; color:#e9edf7;
}

/* ---------- header ---------- */
.topbar{
  background:transparent!important; border:0!important; box-shadow:none!important;
  -webkit-backdrop-filter:none!important; backdrop-filter:none!important;
  padding:14px 18px 6px!important;
}
.topbar h1 a{ font-family:'Plus Jakarta Sans','Inter',sans-serif!important; font-weight:800; font-size:22px; letter-spacing:-.02em; }
html[data-theme="light"] .topbar h1 a{ color:#101a33; }
.tagline{ font-size:12.5px; }

/* ---------- hero ---------- */
.mk-hero{ padding:26px 20px 8px; }
.mk-eyebrow{ font-size:11.5px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:#4f6cff; margin:0 0 10px; }
html:not([data-theme="light"]) .mk-eyebrow{ color:#8ea0ff; }
.mk-h1{ font-family:'Plus Jakarta Sans','Inter',sans-serif; font-size:32px; line-height:1.12; font-weight:800; letter-spacing:-.025em; margin:0 0 10px; color:#101a33; }
html:not([data-theme="light"]) .mk-h1{ color:#f2f5ff; }
.mk-sub{ font-size:14.5px; line-height:1.5; color:#5a6480; margin:0; max-width:36ch; }
html:not([data-theme="light"]) .mk-sub{ color:#9aa4c0; }

/* ---------- cards: solid, one soft shadow ---------- */
html .search-card, html .card, html .tools-card{
  background:#fff!important; background-image:none!important; border:0!important;
  -webkit-backdrop-filter:none!important; backdrop-filter:none!important;
  border-radius:22px!important; box-shadow:0 6px 24px rgba(30,50,110,.10)!important;
}
html:not([data-theme="light"]) .search-card, html:not([data-theme="light"]) .card, html:not([data-theme="light"]) .tools-card{
  background:#171d31!important; box-shadow:0 8px 26px rgba(0,0,0,.45)!important;
}
.search-card{ padding:18px 18px 16px!important; margin:14px 4px 0!important; }

/* ---------- fields ---------- */
html .field label{ font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:#5a6480; }
html:not([data-theme="light"]) .field label{ color:#9aa4c0; }
html input, html select{
  background:#f3f6fb!important; border:1px solid #e3e9f4!important; border-radius:14px!important;
  box-shadow:none!important; font-size:15px; color:#101a33; padding:11px 12px;
}
html:not([data-theme="light"]) input, html:not([data-theme="light"]) select{
  background:#10152a!important; border-color:#273050!important; color:#e9edf7;
}
html input::placeholder{ color:#98a2bd; }
#trainInput::placeholder{ font-size:13.5px; } /* placeholder used to clip */
.field-hint, .mini-note{ color:#7b86a3!important; }
html:not([data-theme="light"]) .field-hint, html:not([data-theme="light"]) .mini-note{ color:#8b95b5!important; }

/* ---------- buttons ---------- */
html .go-btn, html[data-theme="light"] .go-btn{
  background:#4f6cff!important; background-image:none!important; border-radius:999px!important;
  box-shadow:0 8px 20px rgba(79,108,255,.35)!important; font-weight:700; font-size:15.5px;
  padding:13px 18px!important; border:0!important; color:#fff!important;
}
html .btn-ghost{ border-radius:999px!important; border:1px solid #dbe3f2!important; background:#fff!important; color:#41507a!important; box-shadow:none!important; }
html:not([data-theme="light"]) .btn-ghost{ background:#171d31!important; border-color:#2c365a!important; color:#aeb8d8!important; }
html .route-only-btn{ grid-column:1/-1; width:100%; text-align:center; white-space:normal; line-height:1.35; padding:10px 14px!important; }
html .chip{ border-radius:999px!important; border:1px solid #e0e7f3!important; background:#fff!important; box-shadow:none!important; color:#33415f; }
html .rs-train{ border-radius:14px!important; border:1px solid #e0e7f3!important; background:#fff!important; box-shadow:none!important; color:#33415f; } /* card, not pill (bug: board rows rendered as ovals) */
html:not([data-theme="light"]) .chip{ background:#171d31!important; border-color:#2c365a!important; color:#c4cde6; }
html:not([data-theme="light"]) .rs-train{ background:#171d31!important; border-color:#2c365a!important; color:#c4cde6; }

/* ---------- tools grid ---------- */
.tools-card h2{ font-family:'Plus Jakarta Sans','Inter',sans-serif; font-size:19px; font-weight:800; letter-spacing:-.01em; }
.grp-label{ display:none; }
/* tool tiles grouped under small headings (home retouch, Nov 2026) */
.mk-group{ margin-top:14px; }
.mk-group:first-child{ margin-top:10px; }
.mk-group-title{
  font-size:11.5px; font-weight:700; letter-spacing:.09em; text-transform:uppercase;
  color:#6b7592; margin:0;
}
html:not([data-theme="light"]) .mk-group-title{ color:#8b95b5; }
.mk-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:7px; }
.mk-tool{
  display:flex; flex-direction:column; gap:6px; align-items:flex-start; text-align:left;
  background:#f6f8fd; border:1px solid #e6ecf7; border-radius:18px; padding:10px 11px;
  cursor:pointer; font-family:inherit;
}
.mk-tool:active{ transform:translateY(1px); }
html:not([data-theme="light"]) .mk-tool{ background:#10152a; border-color:#273050; }
.mk-tool .mk-ic{ width:28px; height:28px; border-radius:9px; background:#e9efff; color:#4f6cff; display:flex; align-items:center; justify-content:center; }
.mk-tool .mk-ic svg{ width:15px; height:15px; }
html:not([data-theme="light"]) .mk-tool .mk-ic{ background:#232c52; color:#9db0ff; }
.mk-tool b{ font-size:13.5px; font-weight:700; color:#17224a; letter-spacing:-.01em; }
html:not([data-theme="light"]) .mk-tool b{ color:#e9edf7; }
.mk-tool span{ font-size:11.4px; line-height:1.35; color:#6b7592; }
html:not([data-theme="light"]) .mk-tool span{ color:#8b95b5; }
.mk-tool[aria-pressed="true"]{ border-color:#4f6cff; box-shadow:0 0 0 1px #4f6cff inset; }

/* tool panels: hidden until opened from the grid */
details.tool-panel{ margin-top:12px; }
details.tool-panel:not([open]){ display:none!important; }
details.tool-panel > summary{ display:none; }
details.tool-panel{
  border:1px solid #e6ecf7!important; background:#f8fafd!important; border-radius:18px!important; box-shadow:none!important;
}
html:not([data-theme="light"]) details.tool-panel{ background:#10152a!important; border-color:#273050!important; }
.mk-close{ float:right; margin:2px 2px 0 0; }

/* ---------- tab bar (chart views only) ---------- */
html .tab-bar{ background:#e9eef8!important; border:0!important; box-shadow:none!important; -webkit-backdrop-filter:none!important; backdrop-filter:none!important; border-radius:999px!important; padding:4px!important; }
html:not([data-theme="light"]) .tab-bar{ background:#171d31!important; }
html .tab{ border:0!important; background:transparent!important; box-shadow:none!important; color:#5a6480!important; font-weight:600; }
html:not([data-theme="light"]) .tab{ color:#9aa4c0!important; }
html .tab.active, html[data-theme="light"] .tab.active{ background:#101a33!important; color:#fff!important; border-color:transparent!important; }
html:not([data-theme="light"]) .tab.active{ background:#4f6cff!important; }

footer{ color:#7b86a3; }
.mk-fact{ font-size:12px; color:#8a94ad; margin:10px 0 0; }
.mk-fact b{ color:#4f6cff; font-weight:700; }

/* ---------- gimmick 1: splash (first open per session) ---------- */
.splash{
  position:fixed; inset:0; z-index:999; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px;
  background:#0d1120; color:#fff;
  animation:mkSplashOut .45s ease .95s forwards;
}
.splash .sp-loco{ width:72px; height:72px; animation:mkLocoIn .7s cubic-bezier(.2,.9,.3,1.2); }
.splash .sp-word{ font-family:'Plus Jakarta Sans','Inter',sans-serif; font-weight:800; font-size:26px; letter-spacing:-.02em; animation:mkFadeUp .5s ease .15s both; }
.splash .sp-puff{ position:absolute; width:14px; height:14px; border-radius:50%; background:rgba(255,255,255,.5); top:calc(50% - 62px); animation:mkPuff 1s ease-out .35s both; }
@keyframes mkLocoIn{ from{ transform:translateX(-46px); opacity:0 } to{ transform:none; opacity:1 } }
@keyframes mkFadeUp{ from{ transform:translateY(10px); opacity:0 } to{ transform:none; opacity:1 } }
@keyframes mkPuff{ from{ transform:translate(0,0) scale(.4); opacity:.7 } to{ transform:translate(10px,-26px) scale(1.7); opacity:0 } }
@keyframes mkSplashOut{ to{ opacity:0; visibility:hidden } }

/* ---------- gimmick 2: playful loading quips ---------- */
.load-quip{ font-size:12.5px; color:#7b86a3; margin:6px 0 0; min-height:1.2em; transition:opacity .25s; }
html:not([data-theme="light"]) .load-quip{ color:#9aa4c0; }

/* ---------- gimmick 3: free-berth celebration + steam puff ---------- */
.verdict.yes.tw-pop{ animation:mkPop .5s cubic-bezier(.2,.9,.3,1.4); }
@keyframes mkPop{ 0%{ transform:scale(.96) } 60%{ transform:scale(1.02) } 100%{ transform:scale(1) } }
.steam-puff{ position:absolute; width:12px; height:12px; border-radius:50%; pointer-events:none; z-index:30;
  background:rgba(120,140,200,.45); animation:mkPuff 1.1s ease-out both; }
html:not([data-theme="light"]) .steam-puff{ background:rgba(200,210,255,.4); }

@media (prefers-reduced-motion:reduce){
  .splash, .splash .sp-loco, .splash .sp-word, .splash .sp-puff, .verdict.yes.tw-pop, .steam-puff{ animation:none!important; }
  .splash{ display:none!important; }
}
@media print{
  .splash, .mk-hero, .mk-grid, .steam-puff{ display:none!important; }
}

/* ---------- live background (gimmick 5): pick ONE via body class.
 * bgfx-clouds-on = drifting clouds (default); bgfx-train-on = a small
 * train makes a slow journey along the bottom now and then, at one
 * fixed strength. Transform-only animations, fixed layer, invisible
 * to pointer events, off under reduced-motion. ---------- */
.bgfx{ position:fixed; inset:0; z-index:-1; overflow:hidden; pointer-events:none; transform:translateZ(0); } /* own composited layer: no scroll-drag repaint on mobile */
.bgfx-cloud, .bgfx-train{ display:none; }
body.bgfx-clouds-on .bgfx-cloud{ display:block; }
body.bgfx-train-on .bgfx-train{ display:flex; }
.bgfx-cloud{
  position:absolute; width:170px; height:52px; border-radius:999px;
  background:rgba(255,255,255,.6); filter:blur(3px); opacity:.55;
  animation:mkDrift linear infinite; will-change:transform;
}
html:not([data-theme="light"]) .bgfx-cloud{ background:rgba(150,165,220,.16); }
.bgfx-cloud.c1{ top:9%; left:-190px; animation-duration:95s; }
.bgfx-cloud.c2{ top:22%; left:-140px; width:120px; height:38px; opacity:.35; animation-duration:135s; animation-delay:-48s; }
.bgfx-cloud.c3{ top:4%; left:-110px; width:92px; height:30px; opacity:.28; animation-duration:170s; animation-delay:-95s; }
@keyframes mkDrift{ from{ transform:translateX(0) } to{ transform:translateX(calc(100vw + 320px)) } }
.bgfx-train{
  position:absolute; bottom:20px; left:0; gap:5px; align-items:flex-end; flex-direction:row-reverse;
  /* row-reverse puts the loco (first in markup) at the right end, so it
   * leads the left-to-right journey. One fixed strength: standard in
   * light theme, the softer value in dark - no intensity knob. */
  opacity:.30; animation:mkJourney 64s linear infinite; will-change:transform;
}
html:not([data-theme="light"]) .bgfx-train{ opacity:.22; }
.bgfx-train .bt-loco{ width:30px; height:16px; border-radius:5px 8px 3px 3px; background:#4f6cff; position:relative; animation:mkBob .5s ease-in-out infinite alternate; }
.bgfx-train .bt-loco::before{ content:''; position:absolute; top:-7px; left:4px; width:9px; height:8px; border-radius:2px; background:#4f6cff; }
.bgfx-train .bt-car{ width:26px; height:13px; border-radius:3px; background:#7f8fe8; position:relative; animation:mkBob .5s ease-in-out infinite alternate; }
.bgfx-train .bt-car:nth-child(2){ animation-delay:.07s; }
.bgfx-train .bt-car:nth-child(3){ animation-delay:.14s; }
.bgfx-train .bt-car:nth-child(4){ animation-delay:.21s; }
html:not([data-theme="light"]) .bgfx-train .bt-loco{ background:#8ea0ff; }
html:not([data-theme="light"]) .bgfx-train .bt-car{ background:#5a669e; }
/* wheels: real spans carrying an off-centre hub speck, so the spin reads */
.bgfx-train .bt-wheel{ position:absolute; bottom:-4px; width:6px; height:6px; border-radius:50%; background:#33415f; animation:mkWheelSpin .7s linear infinite; }
.bgfx-train .bt-wheel::after{ content:''; position:absolute; top:1px; left:1px; width:2px; height:2px; border-radius:50%; background:rgba(255,255,255,.55); }
.bgfx-train .bt-loco .w1{ left:5px; }
.bgfx-train .bt-loco .w2{ left:19px; }
.bgfx-train .bt-car .w1{ left:4px; }
.bgfx-train .bt-car .w2{ left:16px; }
html:not([data-theme="light"]) .bgfx-train .bt-wheel{ background:#0d1120; }
/* steam puffs from the loco stack, trailing behind the rightward run */
.bgfx-train .bt-puff{ position:absolute; top:-11px; left:6px; width:7px; height:7px; border-radius:50%; background:rgba(255,255,255,.85); opacity:0; animation:mkSteam 1.8s ease-out infinite; }
.bgfx-train .bt-puff.p2{ animation-delay:.6s; }
.bgfx-train .bt-puff.p3{ animation-delay:1.2s; }
html:not([data-theme="light"]) .bgfx-train .bt-puff{ background:rgba(200,210,255,.55); }
/* one journey per 64 s cycle: ~16 s easeful crossing (slow out of the
 * platform, slow in at the far end), then a long off-screen wait */
@keyframes mkJourney{
  0%{ transform:translateX(-180px); animation-timing-function:cubic-bezier(.45,.05,.55,.95); }
  25%{ transform:translateX(calc(100vw + 30px)); }
  100%{ transform:translateX(calc(100vw + 30px)); }
}
@keyframes mkBob{ from{ transform:translateY(0); } to{ transform:translateY(-1px); } }
@keyframes mkWheelSpin{ to{ transform:rotate(360deg); } }
@keyframes mkSteam{
  0%{ transform:translate(0,0) scale(.5); opacity:0; }
  18%{ opacity:.8; }
  100%{ transform:translate(-16px,-26px) scale(1.6); opacity:0; }
}
@media (prefers-reduced-motion:reduce){
  .bgfx-cloud, .bgfx-train{ animation:none!important; display:none!important; }
}
@media print{ .bgfx{ display:none!important; } }

/* ---------- header loco, same journey character as the background
 * train (base strip lives in styles.css): an easeful pass once a
 * minute with a long wait off-strip instead of a constant crawl, a
 * gentle chug on the body, wheels turning at a speed that matches
 * the pass, and steam trailing behind the leftward run. ---------- */
.topbar .loco-run{ animation:mkLocoJourney 60s linear infinite; }
.topbar .loco svg{ animation:mkLocoBob .55s ease-in-out infinite alternate; }
.topbar .wheel{ animation-duration:5.5s; }
.topbar .puff{ animation-name:mkLocoPuffTrail; }
@keyframes mkLocoJourney{
  0%{ transform:translateX(100vw); animation-timing-function:cubic-bezier(.45,.05,.55,.95); }
  20%{ transform:translateX(-170px); }
  100%{ transform:translateX(-170px); }
}
@keyframes mkLocoBob{ from{ transform:translateY(0); } to{ transform:translateY(-1.2px); } }
@keyframes mkLocoPuffTrail{
  0%{ transform:translate(0,0) scale(.5); opacity:0; }
  15%{ opacity:.55; }
  100%{ transform:translate(24px,-46px) scale(1.9); opacity:0; }
}
@media (prefers-reduced-motion: reduce){
  .topbar .loco-run{ animation:none; left:50%; transform:translateX(-50%); }
  .topbar .loco svg{ animation:none; }
  .topbar .wheel, .topbar .puff{ animation:none; }
}

/* small tap-target makeups, header + footer only */
.topbar .icon-btn{ width:44px; height:44px; }
.upd-row .chip{ min-height:40px; display:inline-flex; align-items:center; }

/* grid collapsed while a tool is open */
.tools-card.tool-open .mk-grid, .tools-card.tool-open > h2, .tools-card.tool-open .mk-group-title{ display:none; }
.mk-backbar{ display:none; align-items:center; gap:10px; margin:2px 0 12px; }
.tools-card.tool-open .mk-backbar{ display:flex; }
.mk-back{ background:none; border:0; padding:4px 0; font:inherit; font-size:13.5px; font-weight:700; color:#4f6cff; cursor:pointer; }
.mk-back-name{ font-size:13px; color:#6b7592; }
html:not([data-theme="light"]) .mk-back{ color:#9db0ff; }
html:not([data-theme="light"]) .mk-back-name{ color:#8b95b5; }

/* ---------- tool panels: systematic mobile alignment (14 Nov) ---------- */
/* rows size to their own content; cards within a row still stretch
   equal via .mk-tool height:100% (retouch: one global 1fr row height
   made every row as tall as the longest description) */
.mk-tool{ height:100%; }
details.tool-panel{ position:relative; padding-top:52px; }  /* room for the Close chip */
details.tool-panel .mk-close{ position:absolute; top:12px; right:12px; margin:0; }
details.tool-panel .field{ margin-bottom:12px; }
details.tool-panel .go-btn{ width:100%; text-align:center; }

/* ---------- live map page (/live) + its tool-grid link ---------- */
/* The Live Map is a standalone page (public/live.html) opened in a new
   tab; the grid entry is an <a class="mk-tool">, so it needs the link
   resets below to render exactly like the neighbouring buttons. */
a.mk-tool{ text-decoration:none; color:inherit; }

/* Featured tile: Live Map leads the grid - full-row span, accent frame
   and gradient in the site palette, plus a LIVE badge with a soft pulse. */
.mk-tool-featured{
  grid-column:1/-1; position:relative;
  background:linear-gradient(135deg,#e9efff 0%,#f6f8fd 72%);
  border-color:#4f6cff; box-shadow:0 0 0 1px #4f6cff inset;
}
html:not([data-theme="light"]) .mk-tool-featured{
  background:linear-gradient(135deg,#232c52 0%,#10152a 72%);
  border-color:#4f6cff;
}
.mk-tool .mk-live-badge{
  position:absolute; top:10px; right:10px;
  display:inline-flex; align-items:center; gap:6px;
  font-size:10.5px; font-weight:800; letter-spacing:.09em; line-height:1;
  color:#146c43; background:rgba(53,199,89,.16);
  padding:5px 9px; border-radius:999px;
}
html:not([data-theme="light"]) .mk-tool .mk-live-badge{ color:#7ee2a8; background:rgba(53,199,89,.18); }
.mk-tool .mk-live-dot{
  width:7px; height:7px; border-radius:50%; background:#35c759; flex:none;
  animation:mk-live-pulse 1.6s ease-in-out infinite;
}
@keyframes mk-live-pulse{ 0%,100%{ opacity:1; transform:scale(1); } 50%{ opacity:.4; transform:scale(.75); } }
@media (prefers-reduced-motion:reduce){ .mk-tool .mk-live-dot{ animation:none; } }
.lm-head{ display:flex; align-items:center; gap:12px; padding:14px 16px 4px; max-width:980px; margin:0 auto; }
.lm-brand{ font-family:'Plus Jakarta Sans','Inter',sans-serif; font-size:20px; font-weight:800; letter-spacing:-.01em; color:#17224a; text-decoration:none; }
html:not([data-theme="light"]) .lm-brand{ color:#e9edf7; }
.lm-title{ font-size:15px; font-weight:700; color:#4f6cff; }
html:not([data-theme="light"]) .lm-title{ color:#9db0ff; }
.lm-back{ margin-left:auto; font-size:13.5px; font-weight:700; color:#4f6cff; text-decoration:none; }
html:not([data-theme="light"]) .lm-back{ color:#9db0ff; }
.lm-wrap{ max-width:980px; margin:0 auto; padding:10px 16px 28px; }
.lm-banner{ background:#fff7e0; border:1px solid #eed9a0; color:#7a5a12; font-size:13px; line-height:1.55; padding:11px 13px; border-radius:14px; }
html:not([data-theme="light"]) .lm-banner{ background:#2e2812; border-color:#6b5518; color:#ffd58a; }
.lm-tools{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top:12px; }
.lm-search{ flex:1 1 220px; font:inherit; font-size:14px; padding:11px 13px; border-radius:12px; border:1px solid #dbe3f2; background:#f6f8fd; color:#17224a; }
html:not([data-theme="light"]) .lm-search{ background:#10152a; border-color:#273050; color:#e9edf7; }
.lm-legend{ display:flex; gap:8px; flex-wrap:wrap; }
.lm-chip{ display:inline-flex; align-items:center; gap:6px; font-size:11.5px; padding:5px 10px; border-radius:999px; border:1px solid #dbe3f2; color:#6b7592; }
html:not([data-theme="light"]) .lm-chip{ border-color:#273050; color:#8b95b5; }
.lm-dot{ width:10px; height:10px; border-radius:50%; display:inline-block; position:relative; }
.lm-dot-est{ background:#E69F00; border:2px solid #ffffff; box-shadow:0 1px 3px rgba(15,23,42,.35); }
.lm-dot-ntes{ background:#009E73; border:2px solid #ffffff; box-shadow:0 1px 3px rgba(15,23,42,.35); }
.lm-dot-ntes::after{ content:"\2713"; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:8px; font-weight:900; line-height:1; color:#fff; }
.lm-count{ font-size:12.5px; color:#6b7592; margin:10px 2px 8px; }
html:not([data-theme="light"]) .lm-count{ color:#8b95b5; }
.lm-map{ height:70vh; min-height:380px; border-radius:16px; border:1px solid #dbe3f2; overflow:hidden; z-index:0; }
html:not([data-theme="light"]) .lm-map{ border-color:#273050; }
.lm-card{ margin-top:12px; border:1px solid #e6ecf7; background:#f8fafd; border-radius:16px; padding:14px; }
html:not([data-theme="light"]) .lm-card{ background:#10152a; border-color:#273050; }
.lm-card-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:15px; }
.lm-card-route{ font-size:13px; color:#6b7592; margin-top:3px; }
html:not([data-theme="light"]) .lm-card-route{ color:#8b95b5; }
.lm-card-line{ font-size:13.5px; line-height:1.55; margin-top:9px; }
.lm-card-note{ font-size:12px; line-height:1.5; color:#6b7592; margin-top:7px; }
html:not([data-theme="light"]) .lm-card-note{ color:#8b95b5; }
.lm-refine{ margin-top:11px; }
.lm-listhead{ font-size:15px; font-weight:800; margin:18px 2px 6px; font-family:'Plus Jakarta Sans','Inter',sans-serif; }
.lm-list{ display:flex; flex-direction:column; }
.lm-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; text-align:left; font:inherit; background:none; border:0; border-top:1px solid #e6ecf7; padding:11px 4px; cursor:pointer; color:inherit; }
html:not([data-theme="light"]) .lm-row{ border-top-color:#273050; }
.lm-row-on{ background:rgba(79,108,255,.08); }
.lm-row-main{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.lm-row-main b{ font-size:13.5px; }
.lm-row-main small{ font-size:11.8px; color:#6b7592; }
html:not([data-theme="light"]) .lm-row-main small{ color:#8b95b5; }
.lm-badge{ flex:none; font-size:10.5px; font-weight:700; padding:4px 8px; border-radius:999px; }
.lm-badge-est{ background:rgba(245,166,35,.16); color:#9a6a00; border:1px solid rgba(217,138,0,.55); }
html:not([data-theme="light"]) .lm-badge-est{ color:#ffd58a; }
.lm-badge-ntes{ background:rgba(53,199,89,.14); color:#177245; border:1px solid rgba(30,158,74,.5); }
html:not([data-theme="light"]) .lm-badge-ntes{ color:#7fe2a0; }
.lm-empty{ font-size:13px; color:#6b7592; padding:12px 4px; }
html:not([data-theme="light"]) .lm-empty{ color:#8b95b5; }
.lm-foot{ font-size:11.8px; line-height:1.6; color:#6b7592; margin-top:16px; }
.lm-foot a{ color:#4f6cff; font-weight:600; }
html:not([data-theme="light"]) .lm-foot{ color:#8b95b5; }

/* ---------- what is my seat ---------- */
.seat-result{ margin-top:14px; }
.seat-big{ font-size:24px; font-weight:800; color:#17224a; letter-spacing:-.01em; margin:0; font-family:'Plus Jakarta Sans','Inter',sans-serif; }
html:not([data-theme="light"]) .seat-big{ color:#e9edf7; }
.seat-code{ color:#4f6cff; }
html:not([data-theme="light"]) .seat-code{ color:#9db0ff; }
.seat-sub{ font-size:12.5px; color:#6b7592; margin:4px 0 0; }
html:not([data-theme="light"]) .seat-sub{ color:#8b95b5; }
#refundCard .rf-check{ display:flex; align-items:center; gap:10px; margin-top:10px; font-weight:600; cursor:pointer; }
#refundCard .rf-check input[type="checkbox"]{ width:20px; height:20px; flex:0 0 auto; margin:0; accent-color:#2563d8; }
.rf-line{ display:flex; justify-content:space-between; gap:12px; margin-top:10px; font-size:14px; }
.rf-line b{ white-space:nowrap; }
.rf-rule{ margin:2px 0 0; font-size:12.5px; opacity:.75; }
.seat-err{ margin-top:12px; font-size:13.5px; font-weight:600; color:#b3261e; }
html:not([data-theme="light"]) .seat-err{ color:#ff9d94; }
.seat-bay{ display:flex; gap:10px; margin-top:12px; }
.seat-stack{ display:flex; flex-direction:column; gap:6px; }
.seat-stack.seat-side{ margin-left:16px; justify-content:flex-end; }
.seat-cell{ display:flex; flex-direction:column; align-items:center; width:54px; padding:6px 0 5px; border:1.5px solid #d4daee; border-radius:10px; background:#f7f9ff; color:#6b7592; }
.seat-cell b{ font-size:12.5px; color:#17224a; }
.seat-cell i{ font-style:normal; font-size:10.5px; }
html:not([data-theme="light"]) .seat-cell{ border-color:#273050; background:#0d1122; color:#8b95b5; }
html:not([data-theme="light"]) .seat-cell b{ color:#e9edf7; }
.seat-cell.hit{ border-color:#4f6cff; background:#e9efff; box-shadow:0 0 0 1px #4f6cff inset; }
html:not([data-theme="light"]) .seat-cell.hit{ background:#232c52; }
/* TrainWala Records panel */
.rec-list{ display:flex; flex-direction:column; gap:8px; margin-top:12px; }
.rec-row{ display:flex; align-items:center; gap:10px; width:100%; text-align:left; padding:10px 12px; border-radius:12px; border:1px solid #e0e7f3; background:#fff; color:#33415f; cursor:pointer; font:inherit; }
.rec-row.rec-static{ cursor:default; }
html:not([data-theme="light"]) .rec-row{ background:#171d31; border-color:#2c365a; color:#c4cde6; }
.rec-rank{ font-weight:800; min-width:1.6em; text-align:right; opacity:.6; }
.rec-main{ flex:1; min-width:0; line-height:1.35; }
.rec-main small{ opacity:.75; }
.rec-metric{ font-weight:800; white-space:nowrap; }
.rec-metric small{ font-weight:600; opacity:.7; }
.stt-list{ display:flex; flex-direction:column; gap:8px; margin-top:12px; }
.stt-row{ display:flex; align-items:center; gap:10px; width:100%; text-align:left; padding:10px 12px; border-radius:12px; border:1px solid #e0e7f3; background:#fff; color:#33415f; cursor:pointer; font:inherit; }
html:not([data-theme="light"]) .stt-row{ background:#171d31; border-color:#2c365a; color:#c4cde6; }
.stt-time{ font-weight:800; white-space:nowrap; min-width:4.2em; line-height:1.25; }
.stt-time small{ display:block; font-weight:600; opacity:.7; }
.stt-main{ flex:1; min-width:0; line-height:1.35; }
.stt-main small{ opacity:.75; }
