/* Top passenger diagram. Shared semantic/material tokens own all three
 * appearances; only the functional surface has blur. The existing SVG owns all
 * content scaling; the viewport owns two-axis scrolling and pointer gestures. */
.line-strip {
  --strip-material: var(--material-panel,var(--ui-field));
  position: fixed;
  inset: max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) auto max(12px,env(safe-area-inset-left));
  z-index: 8200;
  overflow: hidden;
  border: 1px solid var(--material-rim,var(--ui-line));
  border-radius: 18px;
  background: var(--strip-material);
  color: var(--ui-text);
  box-shadow: var(--material-shadow,var(--ui-shadow));
  backdrop-filter: var(--material-blur,none);
  -webkit-backdrop-filter: var(--material-blur,none);
  font: 14px/1.4 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}
html.cityrail-glass-ui.cityrail-city-entered .line-strip {
  --strip-material: url("../assets/ui/control-material-grain.svg"),
    color-mix(in srgb, var(--material-chrome) 55%, transparent);
}
.line-strip[hidden] { display: none; }
.line-strip-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 12px;
}
.line-strip-picker { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; flex: none; }
.line-strip-picker::after {
  content: '';
  position: absolute;
  right: 8px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--ui-muted);
  border-bottom: 1.5px solid var(--ui-muted);
  transform: translateY(-2px) rotate(45deg);
  pointer-events: none;
}
.line-strip-picker i { width: 4px; height: 22px; border-radius: 2px; flex: none; }
.line-strip-picker select {
  appearance: none;
  -webkit-appearance: none;
  max-width: min(240px,30vw);
  min-width: 80px;
  height: 32px;
  padding: 0 24px 0 4px;
  border: 0;
  border-radius: 8px;
  color: var(--ui-text);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.02em;
  cursor: pointer;
}
.line-strip-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 12px;
  margin: 0;
  padding: 0;
  min-width: 0;
  list-style: none;
  color: var(--ui-muted);
  font-size: 12px;
}
.line-strip-legend li { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.line-strip-legend i { width: 10px; height: 3px; border-radius: 2px; flex: none; }
.line-strip-tools { display: flex; align-items: center; gap: 4px; }
.line-strip-tools button {
  min-width: 36px;
  min-height: 36px;
  padding: 4px 8px;
  border: 0;
  border-radius: 9px;
  color: var(--ui-text);
  background: transparent;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.line-strip-tools button:active { background: var(--ui-card); transform: scale(.96); }
.line-strip-tools button:disabled { opacity: .4; cursor: default; }
.line-strip :is(button,select,[tabindex]):focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; }
@media (hover:hover) and (pointer:fine) {
  .line-strip-tools button:hover { background: var(--ui-card); }
}
.line-strip-viewport {
  position: relative;
  height: min(198px,42svh);
  overflow: auto;
  overscroll-behavior: contain;
  cursor: grab;
  touch-action: none;
  scrollbar-width: thin;
  scrollbar-color: var(--ui-line) transparent;
}
.line-strip-viewport.is-dragging { cursor: grabbing; user-select: none; }
.line-strip-sheet { width: max-content; min-width: 100%; transition: translate 400ms cubic-bezier(.32,.72,0,1); }
.line-strip-diagram { display: block; overflow: visible; }
.line-strip-diagram[hidden] { display: none; }
.line-strip-rail { stroke: var(--strip-line); stroke-width: 5; stroke-linecap: round; }
.line-strip-closed .line-strip-rail { stroke-dasharray: 8 7; opacity: .5; }
.line-strip-guide { stroke: var(--ui-muted); opacity: .5; fill: none; stroke-width: 1; }
.line-strip-station-name {
  color: var(--ui-text);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.line-strip-square { fill: var(--ui-field); stroke: var(--strip-line); stroke-width: 2.5; }
.line-strip-transfer > rect:first-child { fill: var(--ui-field); stroke: var(--ui-line); stroke-width: 1; }
.line-strip-transfer-name { color: var(--ui-text); font-size: 13px; line-height: 22px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line-strip-waiting { fill: var(--ui-text); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.line-strip-train path { fill: var(--strip-train); stroke: var(--ui-field); stroke-width: 1.4; stroke-linejoin: round; }
.line-strip-empty { margin: 24px; color: var(--ui-muted); text-align: center; }
@media (max-width:600px) {
  .line-strip { inset-inline: max(6px,env(safe-area-inset-left)) max(6px,env(safe-area-inset-right)); border-radius: 14px; }
  .line-strip-toolbar { flex-wrap: wrap; gap: 4px 6px; padding: 4px 6px; }
  .line-strip-legend { order: 1; flex-basis: 100%; justify-content: flex-start; gap: 4px 10px; padding-bottom: 4px; }
  .line-strip-picker { gap: 6px; flex: 1; }
  .line-strip-picker select { max-width: 100%; width: 100%; }
  .line-strip-tools { gap: 0; }
  .line-strip-tools button { min-width: 44px; min-height: 44px; padding-inline: 6px; }
}
@media (prefers-reduced-motion:reduce) {
  .line-strip-sheet { transition: none; }
  .line-strip-tools button:active { transform: none; }
}
@media (prefers-reduced-transparency:reduce) {
  .line-strip { background: var(--ui-field); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast:more) {
  .line-strip { background: var(--ui-field); border-color: var(--ui-text); }
  .line-strip-guide { opacity: 1; }
}

