.pulse-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 6px 2px 12px;
}
.pulse-head h2 { font-size: 18px; margin: 4px 0 0; }
.pulse-pan-hint { margin: 5px 0 0; color: var(--water2); font-size: 11px; font-weight: 800; }
.pulse-head .route-label { min-width: 230px; padding: 0; gap: 28px; }
.pulse-station-index { position: sticky; left: 0; width: 100%; display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap: 5px; margin: 0 0 9px; }
.pulse-station-index button { display: flex; align-items: center; gap: 6px; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #061319; color: var(--muted); padding: 6px 7px; font-size: 9px; font-weight: 800; text-align: left; }
.pulse-station-index button span { flex: 0 0 auto; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: rgba(79,209,197,.13); color: var(--water2); font-size: 8px; }
.pulse-station-index button:hover,.pulse-station-index button:focus-visible { border-color: var(--water); color: var(--text); }
.pulse-ribbon { padding-bottom: 14px; overflow-x: visible; }
.river-scroll-viewport { width: 100%; overflow-x: auto; overflow-y: hidden; padding-bottom: 5px; scrollbar-width: auto; scrollbar-color: var(--water) #102f38; overscroll-behavior-inline: contain; }
.river-scroll-viewport:focus-visible { outline: 2px solid var(--water); outline-offset: 3px; border-radius: 12px; }
.river-scroll-viewport::-webkit-scrollbar { display: block; height: 16px; }
.river-scroll-viewport::-webkit-scrollbar-track { background: #102f38; border: 1px solid #1b4a56; border-radius: 999px; }
.river-scroll-viewport::-webkit-scrollbar-thumb { min-width: 48px; background: var(--water); border: 4px solid #102f38; border-radius: 999px; }
.river-scroll-viewport::-webkit-scrollbar-thumb:hover { background: var(--water2); }
.pulse-chart-wrap {
  min-width: 760px;
  background: linear-gradient(180deg, rgba(112, 183, 255, .08), rgba(79, 209, 197, .03));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 12px;
}
.pulse-chart { display: block; width: 100%; height: 280px; }
.profile-mode { fill: rgba(255,255,255,.30); text-anchor: middle; font-size: 25px; font-weight: 950; letter-spacing: .16em; }
.normal-line { stroke: #9fd867; stroke-width: 2; stroke-dasharray: 8 5; opacity: .72; }
.normal-label { fill: #b9e687; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-anchor: end; }
.profile-segment { fill: none; stroke-width: 7; stroke-linecap: round; transition: d .2s ease; }
.profile-segment.rising { stroke: var(--rise); }
.profile-segment.falling { stroke: var(--fall); }
.profile-segment.steady { stroke: var(--steady); }
.profile-segment.unknown { stroke: var(--unknown); }
.profile-point { color: var(--unknown); }
.profile-point.rising { color: var(--rise); }
.profile-point.falling { color: var(--fall); }
.profile-point.steady { color: var(--steady); }
.profile-point text { fill: currentColor; text-anchor: middle; }
.profile-direction { font-size: 29px; font-weight: 950; paint-order: stroke; stroke: #07151b; stroke-width: 5px; stroke-linejoin: round; }
.profile-value { font-size: 17px; font-weight: 900; }
.profile-name { font-size: 11px; font-weight: 800; }
.profile-waterway { fill: var(--muted); font-size: 8px; font-weight: 700; }
.profile-gauge { font-size: 9px; fill: var(--muted) !important; }
.property-marker { color: #f3b34d; }
.property-marker line { stroke: currentColor; stroke-width: 1.5; stroke-dasharray: 4 4; opacity: .65; }
.property-marker path { fill: #07151b; stroke: currentColor; stroke-width: 3; }
.property-marker text { fill: currentColor; text-anchor: middle; font-weight: 900; letter-spacing: .05em; }
.property-name { font-size: 10px; }
.property-status { font-size: 8px; opacity: .8; }
.pulse-controls {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  position: sticky;
  left: 0;
  width: min(930px, calc(100vw - 48px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
  background: var(--panel);
}
.pulse-slider { min-width: 0; }
.pulse-slider input {
  appearance: none;
  display: block;
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  cursor: ew-resize;
  touch-action: none;
}
.pulse-slider input::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: #21424a; }
.pulse-slider input::-webkit-slider-thumb { appearance: none; width: 24px; height: 24px; margin-top: -8px; border: 3px solid #06242a; border-radius: 50%; background: var(--water); box-shadow: 0 0 0 2px rgba(79,209,197,.35); }
.pulse-slider input::-moz-range-track { height: 8px; border-radius: 999px; background: #21424a; }
.pulse-slider input::-moz-range-thumb { width: 20px; height: 20px; border: 3px solid #06242a; border-radius: 50%; background: var(--water); box-shadow: 0 0 0 2px rgba(79,209,197,.35); }
.pulse-scale { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 800; }
.pulse-review { display: flex; justify-content: space-between; gap: 10px; padding-top: 2px; color: var(--text); font-size: 11px; }
.pulse-review span { color: var(--water2); font-weight: 900; font-variant-numeric: tabular-nums; }
.pulse-button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #061319;
  color: var(--text);
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 800;
}
.pulse-button:disabled { opacity: .45; }
.pulse-button.primary { border-color: rgba(79,209,197,.55); color: var(--water); }
.replay-status { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; align-items: baseline; margin: -7px 2px 8px; padding: 10px 12px; border: 1px solid rgba(79,209,197,.22); border-radius: 12px; background: rgba(79,209,197,.05); }
.replay-status strong { color: var(--water); font-size: 11px; letter-spacing: .08em; }
.replay-status span { color: var(--text); font-size: 12px; font-weight: 800; }
.replay-status small { grid-column: 1 / -1; color: var(--muted); line-height: 1.4; }
.pulse-options { display: grid; grid-template-columns: repeat(4,minmax(126px,1fr)); gap: 7px; grid-column: 1 / -1; }
.option-control { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .04em; }
.option-control select { min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 9px; background: #061319; color: var(--text); padding: 8px; font: inherit; font-size: 11px; font-weight: 750; }
.custom-range { display: grid; grid-template-columns: auto minmax(210px,320px) 1fr; align-items: center; gap: 10px; margin: 8px 2px 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 11px; }
.custom-range input { border: 1px solid var(--line); border-radius: 9px; background: #061319; color: var(--text); padding: 8px; color-scheme: dark; }
.peak-note {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 2px 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(243, 179, 77, .08);
  border: 1px solid rgba(243, 179, 77, .25);
  font-size: 12px;
  color: #f9deb0;
}
.peak-note span { margin-left: auto; color: var(--muted); }
.peak-note .peak-reading { margin-left: 0; color: #f9deb0; font-weight: 900; }
.property-note { display: flex; gap: 10px; align-items: baseline; margin: -6px 2px 16px; padding: 10px 12px; border: 1px solid rgba(243,179,77,.18); border-radius: 12px; background: rgba(243,179,77,.04); font-size: 11px; }
.property-note strong { color: #f3b34d; white-space: nowrap; }
.property-note span { color: var(--muted); }
.station-normal-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
  margin-top: 1px;
}
.station-reading .station-level { color: var(--water2); }
@media (max-width: 580px) {
  .pulse-head { align-items: flex-start; flex-direction: column; }
  .pulse-head .route-label { width: 100%; min-width: 0; }
  .pulse-chart { height: 240px; }
  .pulse-controls { grid-template-columns: auto auto auto; min-width: 0; width: calc(100vw - 28px); }
  .pulse-slider { grid-column: 1 / -1; grid-row: 1; }
  .pulse-review { align-items: flex-start; flex-direction: column; gap: 2px; }
  .replay-status { grid-template-columns: 1fr; }
  .replay-status small { grid-column: auto; }
  .pulse-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .custom-range { grid-template-columns: 1fr; }
  .peak-note span { margin-left: 0; width: 100%; }
  .property-note { align-items: flex-start; flex-direction: column; }
}
