.rb-external { min-width:0; min-height:0; overflow:hidden; }
.ex-screen { height:100%; min-height:0; overflow:auto; scrollbar-width:thin; color:inherit; font:500 clamp(1rem, 1.15vw, 1.5rem)/1.35 system-ui,sans-serif; text-align:left; }
.ex-screen :is(button,input,select) { font:inherit; max-width:100%; color:inherit; border:1px solid currentColor; border-radius:0; background:transparent; min-height:2.6rem; padding:.3em .65em; }
.ex-screen option,.ex-screen input[type="date"] { color-scheme:dark; }
.ex-screen option { background:#11176e; color:white; }
.ex-screen input::placeholder { color:inherit; opacity:.72; }
.ex-screen :is(button,summary,select) { cursor:pointer; }
.ex-screen a { color:inherit; text-underline-offset:.18em; }
.ex-screen :focus-visible { outline:3px solid currentColor; outline-offset:-3px; }
.ex-screen small { display:block; font-size:.86em; font-weight:normal; }
.ex-msg { padding:.65em 0; margin:.1em 0; }
.ex-sources { display:flex; flex-wrap:wrap; gap:.45rem 1.6rem; padding:1.15em 0; font-size:.87em; }
.ex-timetable,.ex-notices { padding:clamp(.65rem,1.7vw,2rem); }
.ex-controls { display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; }
.ex-controls label { display:flex; align-items:center; flex-wrap:wrap; gap:.5em; }
.ex-timetable table { margin-top:1em; width:100%; border-collapse:collapse; table-layout:fixed; }
.ex-timetable caption { text-align:left; font-weight:650; padding:.3em 0 .6em; }
.ex-timetable th,.ex-timetable td { text-align:left; padding:.55em .35em; border-bottom:1px solid currentColor; overflow-wrap:anywhere; vertical-align:top; }
.ex-timetable th:nth-child(-n+2),.ex-timetable td:nth-child(-n+2) { width:5.25em; font-variant-numeric:tabular-nums; }
.ex-notices section + section { margin-top:1.5em; }
.ex-notices h2 { margin:0 0 .6em; font-size:1.22em; }
.ex-notice { border-top:1px solid currentColor; padding:.15em 0; }
.ex-notice summary { padding:.6em 0; overflow-wrap:anywhere; }
.ex-notice summary small { margin-left:1.2em; }
.ex-notice ul { padding-inline-start:1.5em; }
.ex-notice li { margin:.4em 0; }
.ex-notice > a { display:inline-block; margin:.3em 0 .9em; }
.ex-map-view { overflow:hidden; }
.ex-map { height:100%; min-height:0; display:grid; grid-template-columns:minmax(0, 1.65fr) minmax(17rem, 1fr); }
.ex-map-canvas { position:relative; min-width:0; min-height:0; background:#0b2555; border-right:1px solid #97a8c9; }
.ex-geography { display:block; width:100%; height:100%; touch-action:none; }
.ex-zoom { position:absolute; top:.65rem; left:.65rem; display:flex; color:#fff; }
.ex-zoom button { background:#101e46; border-color:#a1b1cf; min-width:2.65rem; }
.ex-zoom button + button { border-left:0; }
.ex-legend { position:absolute; bottom:.5rem; left:.55rem; color:#fff; background:#0b2555; display:flex; gap:.75em; flex-wrap:wrap; font-size:.82rem; padding:.2em; max-width:calc(100% - 6.7rem); }
.ex-legend span { display:inline-flex; align-items:center; gap:.3em; }
.ex-legend i { width:.7em; height:.7em; flex:none; display:inline-block; border-radius:50%; }
.ex-legend-station { box-sizing:border-box; background:#142c52; border:2px solid #e9f4ff; }
.ex-legend-running { background:#ffe752; }
.ex-legend-waiting { background:#e79def; }
.ex-city { fill:#fff; font:600 var(--ex-label-size,10px) system-ui,sans-serif; stroke:#15315b; stroke-width:.24em; stroke-linejoin:round; paint-order:stroke; }
.ex-city tspan[lang="en"] { fill:#bae2ff; }
.ex-marker { cursor:pointer; }
.ex-marker-hit { fill:var(--ex-hit-fill,transparent); stroke:var(--ex-hit-stroke,none); stroke-width:3px; }
.ex-picked { --ex-hit-fill:#173456; --ex-hit-stroke:#ffe752; }
.ex-station-point { fill:#142c52; stroke:#e9f4ff; stroke-width:1.75px; }
.ex-train-running { fill:#ffe752; stroke:#352d00; stroke-width:1px; }
.ex-train-waiting { fill:#e79def; stroke:#312441; stroke-width:1px; }
.ex-map-credit { position:absolute; right:.45rem; bottom:.45rem; color:#ddd!important; font-size:.78rem; }
.ex-map-panel { min-width:0; min-height:0; display:flex; flex-direction:column; padding:.65em; }
.ex-map-filters { display:flex; flex-wrap:wrap; align-items:center; gap:.35rem; }
.ex-map-filters input { flex:1 1 9rem; min-width:0; }
.ex-map-filters select { flex:0 1 auto; }
.ex-map-list { min-height:0; overflow:auto; scrollbar-width:thin; flex:1; }
.ex-map-item { display:block; text-align:left; width:100%; border-width:0 0 1px!important; padding:.45em .2em!important; overflow-wrap:anywhere; }
.ex-map-context:not(:empty) { padding:.4em 0; }
.ex-map-time { margin:.5em 0; font-size:.85em; }
@media(max-width:680px),(orientation:portrait) {
  .ex-map { grid-template-columns:1fr; grid-template-rows:minmax(0,1.15fr) minmax(10rem,1fr); }
  .ex-map-canvas { border-right:0; border-bottom:1px solid #97a8c9; }
}
@media(max-width:450px) {
  .ex-timetable th:nth-child(-n+2),.ex-timetable td:nth-child(-n+2) {width:3.3em;}
  .ex-controls { gap:.35rem; } .ex-controls label { width:100%; }
}
@media(max-height:400px) and (orientation:landscape) {
  .ex-map {grid-template-columns:1fr 1fr; grid-template-rows:1fr; }
  .ex-zoom {top:.2rem; left:.2rem;} .ex-zoom button {min-height:2rem;}
}
.ex-geography { cursor:grab; user-select:none; -webkit-user-select:none; }
.ex-geography.ex-grabbing, .ex-geography.ex-grabbing .ex-marker { cursor:grabbing; }

.ex-train-map {
  --map-top:env(safe-area-inset-top,0px); --map-bottom:env(safe-area-inset-bottom,0px);
  --map-left:env(safe-area-inset-left,0px); --map-right:env(safe-area-inset-right,0px);
  position:fixed; inset:var(--map-top) var(--map-right) var(--map-bottom) var(--map-left);
  box-sizing:border-box; margin:auto; padding:0;
  width:min(64rem, calc(100% - var(--map-left) - var(--map-right)));
  height:min(45rem, calc(100% - var(--map-top) - var(--map-bottom)));
  max-width:100%; max-height:100%; color:var(--lti-shell-ink,#fff); background:var(--lti-shell-bg,#0b12d8);
  border:1px solid currentColor; font:500 1rem/1.35 system-ui,sans-serif;
}
.ex-train-map[open] { display:flex; flex-direction:column; }
.ex-train-map::backdrop { background:rgb(0 0 0 / 65%); }
.ex-train-map > header { display:flex; flex-wrap:wrap; align-items:center; gap:.3em 1em; padding:.45em .65em 0; }
.ex-train-map > header h2 { margin:0; font-size:1.15em; overflow-wrap:anywhere; }
.ex-train-map > header button {
  min-height:44px; padding:.25em .65em; color:inherit; border:1px solid currentColor;
  background:transparent; font:inherit; cursor:pointer;
}
.ex-train-map > header button:focus-visible { outline:3px solid currentColor; outline-offset:-3px; }
.ex-train-map > p { margin:.4em .65em; font-size:.92em; }
.ex-train-map > .ex-screen { flex:1; min-height:0; overflow:hidden; }
