/* ChargeViz components.css (from the webapp, comments stripped). */
.app {
  display: grid;
  --nav-w: var(--sidebar-w);
  position: relative;
  grid-template-columns: var(--nav-w) 1fr;
  grid-template-rows: var(--banner-h) var(--topbar-h) 1fr;
  grid-template-areas:
    "banner banner"
    "sidebar topbar"
    "sidebar content";
  height: 100vh;
  overflow: hidden;
}
.env-banner {
  grid-area: banner;
  display: flex; align-items: center; gap: var(--space-2);
  padding: 0 var(--content-pad);
  background: var(--navy-800); color: var(--text-on-navy);
  font-size: var(--text-sm); font-weight: var(--fw-medium);
}
.env-banner__dot { width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--cyan-500); }
.sidebar {
  grid-area: sidebar;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-3);
  display: flex; flex-direction: column; gap: var(--space-1);
  overflow-y: auto;
}
.sidebar__brand {
  display: flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-md); font-weight: var(--fw-semibold);
  color: var(--text-primary); padding: var(--space-2) var(--space-3) var(--space-4);
}
.sidebar__mark { width: 22px; height: 22px; border-radius: var(--radius-xs); flex: none; }
.sidebar__group-header {
  font-size: var(--text-xs); font-weight: var(--fw-semibold); letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-muted);
  padding: var(--space-4) var(--space-3) var(--space-1);
}
.nav-item {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm); font-weight: var(--fw-medium);
  color: var(--text-secondary); cursor: pointer;
}
.nav-item__icon { flex: none; }
.nav-item:hover { background: var(--color-surface-subtle); text-decoration: none; }
.nav-item--active { background: var(--color-accent-soft); color: var(--text-primary); font-weight: var(--fw-semibold); }
.nav-item--active .nav-item__icon { color: var(--text-link); }
.topbar {
  grid-area: topbar;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--content-pad);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.topbar__title { font-size: var(--text-lg); font-weight: var(--fw-semibold); }
.content { grid-area: content; position: relative; overflow: hidden; }
.map-view { position: relative; height: 100%; width: 100%; overflow-y: auto; }
.map-stage { position: relative; height: calc(100% - var(--drawer-peek-h)); }
#map { position: absolute; inset: 0; }
.maplibregl-map { font: var(--text-sm)/var(--lh-normal) var(--font-sans); }
#map .maplibregl-ctrl-bottom-right {
  right: calc(var(--rail-w) + 2 * var(--space-4));
  bottom: calc(var(--space-4) - 10px);
}
#map .cvz-ctrl-home,
#market-map .cvz-ctrl-home {
  font-size: 20px; line-height: 1; padding-bottom: 2px;
  color: var(--text-primary);
}
.perimeter-chrome {
  position: absolute; top: var(--space-4); left: var(--space-4);
  right: calc(var(--rail-w) + 2 * var(--space-4));
  z-index: var(--z-sticky);
  display: flex; align-items: flex-start; gap: var(--space-3); flex-wrap: wrap;
  pointer-events: none;
}
.perimeter-chrome > * { pointer-events: auto; }
.chrome-search { flex: none; width: var(--map-chrome-w); max-width: 100%; }
.map-slot {
  position: absolute; left: var(--space-4); bottom: var(--space-4);
  z-index: var(--z-sticky);
  width: var(--map-slot-w); max-width: calc(100% - 2 * var(--space-4));
  padding: var(--space-2) var(--space-3) var(--space-3);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.map-slot .field { margin-bottom: 0; gap: 0; }
.map-slot .field__label { font-size: var(--text-xs); }
.map-slot .field + .field__hint { display: block; margin-top: var(--space-2); }
.map-slot .range { margin: var(--space-2) 0 var(--space-1); display: block; }
.tabs {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.tab {
  padding: 5px var(--space-3); border: 0; background: transparent;
  border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: var(--fw-medium);
  color: var(--text-secondary); cursor: pointer; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.tab:hover { color: var(--text-primary); }
.tab--active {
  background: var(--color-surface); color: var(--text-primary);
  font-weight: var(--fw-semibold); box-shadow: var(--shadow-xs);
}
.tab:focus-visible { outline: none; box-shadow: var(--focus-ring); }
a.tab, a.tab:hover { text-decoration: none; }
a.tab { display: inline-block; }
.dd__panel.dd__panel--radius { width: max-content; min-width: 0; padding: var(--space-3); }
.radius-ctl { display: flex; align-items: center; gap: var(--space-2); }
.radius-ctl .field__hint { font-size: var(--text-sm); }
.radius-ctl__note { margin: var(--space-2) 0 0; max-width: 200px; }
.range.range--sm { flex: none; width: 120px; height: 4px; }
.range.range--sm::-webkit-slider-thumb { width: 12px; height: 12px; }
.range.range--sm::-moz-range-thumb { width: 12px; height: 12px; }
.range.range--sm::-moz-range-track { height: 4px; }
.tabs--sm { gap: 1px; padding: 2px; border-radius: var(--radius-md); }
.tab--sm { padding: 2px 6px; font-size: .625rem; border-radius: var(--radius-sm); }
.searchbar { position: relative; width: 100%; min-width: 0; }
.searchbar__input {
  width: 100%; height: 40px; padding: 0 var(--space-12) 0 var(--space-4);
  background: var(--color-surface); color: var(--text-primary);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); font-size: var(--text-base);
  text-overflow: ellipsis;
}
.searchbar__input::placeholder { color: var(--text-muted); }
.searchbar__input:focus {
  outline: none; border-color: var(--color-border-focus); box-shadow: var(--focus-ring);
}
.searchbar__tools {
  position: absolute; right: var(--space-3); top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: var(--space-2);
}
.searchbar__icon { display: flex; color: var(--text-muted); pointer-events: none; }
.searchbar__clear {
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; padding: 0;
  border: 0; border-radius: var(--radius-full);
  background: transparent; color: var(--text-muted); cursor: pointer;
}
.searchbar__clear:hover { background: var(--color-surface-subtle); color: var(--text-primary); }
.searchbar__clear:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.searchbar__clear[x-cloak] { display: none; }
.searchbar__menu {
  position: absolute; z-index: var(--z-dropdown); left: 0; right: 0;
  margin: var(--space-1) 0 0; padding: var(--space-1); list-style: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-height: 280px; overflow-y: auto; overscroll-behavior: contain;
}
.searchbar__opt {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-2); border-radius: var(--radius-sm);
  font-size: var(--text-sm); color: var(--text-primary); cursor: pointer;
}
.searchbar__opt:hover { background: var(--color-surface-subtle); }
.searchbar__opt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.searchbar__opt-label,
.searchbar__opt-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.searchbar__opt-sub { font-size: var(--text-xs); color: var(--text-muted); }
.searchbar__opt-tag {
  flex: none; padding: 1px var(--space-2); border-radius: var(--radius-full);
  background: var(--color-surface-sunken); border: 1px solid var(--color-border);
  font-size: var(--text-xs); color: var(--text-secondary); white-space: nowrap;
}
.searchbar__opt--note { color: var(--text-muted); cursor: default; font-size: var(--text-xs); }
.searchbar__opt--note:hover { background: transparent; }
.chrome-hints {
  display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap;
  padding-left: var(--space-1);
}
.chrome-chip[hidden] { display: none; }
.chrome-chip {
  display: inline-flex; align-items: center;
  padding: 2px var(--space-2); border-radius: var(--radius-full);
  background: var(--color-surface); border: 1px solid var(--color-border);
  box-shadow: var(--shadow-xs);
  font-size: var(--text-xs); font-weight: var(--fw-medium); color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.chrome-chip--error {
  border-radius: var(--radius-md); padding: var(--space-1) var(--space-2);
  color: var(--color-negative); font-variant-numeric: normal;
}
.chrome-chip--back {
  font: inherit; font-size: var(--text-xs); font-weight: var(--fw-medium);
  color: var(--color-primary); cursor: pointer;
}
.chrome-chip--back:hover { background: var(--color-surface-subtle); }
.chip-bar {
  flex: 1; min-width: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
  padding-top: var(--space-1);
}
.chip {
  display: inline-flex; align-items: center; height: 30px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-full); box-shadow: var(--shadow-xs);
  font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-primary);
}
.chip--add { border-style: dashed; background: var(--color-surface-subtle); box-shadow: none; }
.chip--add .chip__btn { color: var(--text-secondary); padding: 0 var(--space-3); }
.chip__wrap { position: relative; }
.chip__btn, .chip__rm {
  display: inline-flex; align-items: center; gap: var(--space-1);
  height: 100%; padding: 0 var(--space-3);
  border: 0; background: none; cursor: pointer;
  font: inherit; color: inherit; border-radius: var(--radius-full);
  transition: background var(--dur-fast) var(--ease-out);
}
.chip__rm { padding: 0 var(--space-1) 0 var(--space-2); color: var(--text-muted);
            font-size: var(--text-md); line-height: 1; }
.chip__rm + .chip__btn { padding-left: var(--space-2); }
.chip__btn:hover, .chip__rm:hover { background: var(--color-surface-subtle); }
.chip__rm:hover { color: var(--text-primary); }
.chip__btn:focus-visible, .chip__rm:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.chip__field { color: var(--text-secondary); }
.chip__sep { color: var(--color-border-strong); }
.chip__clear {
  border: 0; background: none; cursor: pointer; padding: 0 var(--space-2);
  font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-link);
}
.chip__clear:hover { color: var(--text-link-hover); text-decoration: underline; }
.chip__clear:focus-visible { outline: none; box-shadow: var(--focus-ring);
                             border-radius: var(--radius-xs); }
.dd__panel--chip { right: auto; min-width: 220px; max-width: 300px; margin-top: var(--space-1); }
.dd__item {
  display: block; width: 100%; text-align: left;
  padding: var(--space-2); border: 0; background: none; cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm); color: var(--text-primary);
}
.dd__item:hover { background: var(--color-surface-subtle); }
.dd__item:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.summary-rail {
  position: absolute; top: var(--space-4); right: var(--space-4);
  bottom: var(--space-4);
  z-index: var(--z-sticky); width: var(--rail-w); max-width: calc(100% - 2 * var(--space-4));
  display: flex; flex-direction: column; pointer-events: none;
}
.summary-rail > * { pointer-events: auto; flex: none; }
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-xs);
}
.card__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-4);
}
.card__title { font-size: var(--text-md); font-weight: var(--fw-semibold); }
.card__sub { font-size: var(--text-sm); color: var(--text-muted); }
.card--tight { padding: var(--space-4); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 32px; padding: 0 var(--space-4);
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: var(--text-sm); font-weight: var(--fw-semibold);
  cursor: pointer; transition: background var(--dur-fast) var(--ease-out);
}
.btn--primary { background: var(--color-primary); color: var(--color-primary-text); }
.btn--primary:hover { background: var(--color-primary-hover); }
.btn--secondary { background: var(--color-surface); color: var(--text-primary); border-color: var(--color-border-strong); }
.btn--secondary:hover { background: var(--color-surface-subtle); }
.btn:disabled { opacity: .45; cursor: default; }
.btn--primary:disabled:hover { background: var(--color-primary); }
.field { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-3); }
.field__label { font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-secondary); }
.input, .select {
  height: 36px; padding: 0 var(--space-3);
  background: var(--color-surface); color: var(--text-primary);
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font-size: var(--text-base);
}
.input:focus, .select:focus { outline: none; border-color: var(--color-border-focus); box-shadow: var(--focus-ring); }
.range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 5px; margin: 0;
  background: linear-gradient(to right,
    var(--color-primary) 0 calc(var(--pct, 0) * 1%),
    var(--color-border) calc(var(--pct, 0) * 1%) 100%);
  border-radius: var(--radius-full);
  outline: none;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--color-surface); border: 2px solid var(--color-primary);
  box-shadow: var(--shadow-xs); cursor: pointer;
}
.range::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; box-sizing: border-box;
  background: var(--color-surface); border: 2px solid var(--color-primary);
  box-shadow: var(--shadow-xs); cursor: pointer;
}
.range::-moz-range-track {
  height: 5px; border-radius: var(--radius-full);
  background: linear-gradient(to right,
    var(--color-primary) 0 calc(var(--pct, 0) * 1%),
    var(--color-border) calc(var(--pct, 0) * 1%) 100%);
}
.range:focus-visible { box-shadow: var(--focus-ring); }
.field__hint { font-size: var(--text-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.field__hint--input { display: inline-flex; align-items: baseline; gap: 1px; }
.km-input {
  width: 3.2em; padding: 0 2px; border: 1px solid transparent;
  border-radius: var(--radius-sm); background: transparent;
  font: inherit; color: inherit; font-variant-numeric: tabular-nums;
  text-align: right; -moz-appearance: textfield;
}
.km-input::-webkit-outer-spin-button,
.km-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.km-input:hover { border-color: var(--color-border); }
.km-input:focus {
  outline: none; border-color: var(--color-border-focus);
  background: var(--color-surface); color: var(--text-primary);
}
#summary-panel.htmx-request .card > *,
#list-panel.htmx-request,
#rail-list-panel.htmx-request,
#detail-panel.htmx-request > *,
#evolution.is-loading > * {
  opacity: .45;
  transition: opacity 180ms var(--ease-out) 120ms;
}
#summary-panel .card > *, #list-panel, #rail-list-panel, .rail-evolution > * {
  transition: opacity 90ms var(--ease-out);
}
.dd__search {
  width: 100%; height: 28px; margin-bottom: var(--space-2);
  font-size: var(--text-xs);
}
.dd__note {
  padding: var(--space-2) 0 0;
  font-size: .625rem; color: var(--text-muted); line-height: var(--lh-tight);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-1);
}
.searchbar__opt--recent + .searchbar__opt:not(.searchbar__opt--recent) {
  border-top: 1px solid var(--color-border);
}
.searchbar__opt--recent .searchbar__opt-sub { font-style: italic; }
.kpi { display: flex; flex-direction: column; gap: var(--space-1); }
.kpi__label { font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-muted); }
.kpi__value { font-size: var(--text-3xl); font-weight: var(--fw-bold); color: var(--text-primary); font-variant-numeric: tabular-nums; }
.kpi__unit { font-size: var(--text-md); font-weight: var(--fw-regular); color: var(--text-muted); margin-left: var(--space-1); }
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.kpi-grid > .kpi { align-items: center; text-align: center; }
.kpi-grid--3 { grid-template-columns: repeat(3, 1fr); }
.kpi-grid--4 { grid-template-columns: repeat(4, 1fr); }
.kpi-line {
  display: flex; flex-wrap: nowrap; gap: 6px;
  align-items: stretch;
}
.kpi-line > .kpi {
  flex: 1 1 0; min-width: 0; align-items: center; gap: 0;
  justify-content: space-between;
}
.kpi--sm .kpi__label {
  font-size: 11px; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.kpi--sm .kpi__value { flex: none; font-size: var(--text-xl); white-space: nowrap; }
.kpi--sm .kpi__unit { font-size: .625rem; margin-left: 2px; }
.kpi__note {
  font-size: .625rem;
  line-height: var(--lh-tight);
  color: var(--text-muted);
  text-align: center;
}
.th__qual { font-weight: var(--fw-regular); color: var(--text-muted); }
.kpi--infra__counts { text-align: right; }
.kpi--infra .kpi__value {
  font-size: var(--text-md); line-height: 1.25;
}
.kpi--rank .kpi__value { font-size: var(--text-xl); }
.metric-row { display: flex; align-items: baseline; justify-content: space-between; padding: var(--space-2) 0; border-top: 1px solid var(--color-border); }
.metric-row__label { font-size: var(--text-sm); color: var(--text-secondary); }
.metric-row__value { font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--text-primary); font-variant-numeric: tabular-nums; }
.badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: 2px var(--space-2); border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: var(--fw-semibold);
  background: var(--color-neutral-bg); color: var(--color-neutral);
}
.badge[hidden] { display: none; }
.muted { color: var(--text-muted); }
[x-cloak] { display: none !important; }
.check-row {
  display: flex; gap: var(--space-2); align-items: center;
  font-size: var(--text-xs); color: var(--text-secondary);
  padding: var(--space-1) 0;
}
.dd__chev { font-size: var(--text-xs); color: var(--text-muted); }
.dd__panel {
  position: absolute; z-index: var(--z-dropdown, 30); left: 0; right: 0;
  margin-top: 2px; padding: var(--space-2) var(--space-3);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md, 0 4px 14px rgba(10, 37, 64, .12));
  max-height: 220px; overflow-y: auto;
  overscroll-behavior: contain;
}
.preset-row {
  display: block; width: 100%; padding: var(--space-1) var(--space-2);
  border: 0; border-radius: var(--radius-sm); background: transparent;
  text-align: left; font-size: var(--text-sm); color: var(--text-secondary);
  cursor: pointer;
}
.preset-row:hover { background: var(--color-surface-subtle); }
.preset-row--active {
  background: var(--color-accent-soft); color: var(--text-link);
  font-weight: var(--fw-semibold);
}
.dd__divider { border-top: 1px solid var(--color-border); margin: var(--space-2) 0; }
.period { position: relative; }
.period__btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  height: 32px; padding: 0 var(--space-3);
  background: var(--color-surface); color: var(--text-primary);
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font-size: var(--text-sm); font-weight: var(--fw-medium);
  font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.period__btn:hover { background: var(--color-surface-subtle); border-color: var(--color-border-strong); }
.period__btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.period__icon { display: flex; color: var(--text-muted); }
.period__label { max-width: 290px; overflow: hidden; text-overflow: ellipsis; }
.period__panel {
  position: absolute; top: calc(100% + var(--space-2)); right: 0;
  z-index: calc(var(--z-dropdown) + 10);
  display: flex; gap: var(--space-3); padding: var(--space-3);
  width: 620px; max-width: calc(100vw - 2 * var(--content-pad));
  background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  text-align: left;
}
.period__rail {
  flex: none; width: 148px;
  display: flex; flex-direction: column; gap: 2px;
  padding-right: var(--space-3); border-right: 1px solid var(--color-border);
}
.period__cal { flex: 1; min-width: 0; }
.period__fields { display: grid; grid-template-columns: 1fr 1fr auto; gap: var(--space-3); align-items: end; }
.period__fields .field { margin-bottom: 0; }
.period__actions { display: flex; gap: var(--space-2); }
.cal__nav {
  display: grid; grid-template-columns: 28px 1fr 1fr 28px;
  align-items: center; margin-bottom: var(--space-2);
}
.cal__arrow {
  width: 28px; height: 28px; line-height: 1;
  background: var(--color-surface); color: var(--text-secondary);
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  cursor: pointer;
}
.cal__arrow:hover:not(:disabled) { background: var(--color-surface-subtle); }
.cal__arrow:disabled { color: var(--text-disabled); cursor: default; }
.cal__arrow:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.cal__title { text-align: center; font-size: var(--text-sm); font-weight: var(--fw-semibold); }
.cal__grids { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.cal__dow, .cal__days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal__dow span {
  text-align: center; padding-bottom: var(--space-1);
  font-size: var(--text-xs); color: var(--text-muted);
}
.cal__day {
  height: 28px; padding: 0; border: 0; background: transparent;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm); color: var(--text-primary);
  font-variant-numeric: tabular-nums; cursor: pointer;
}
.cal__day:hover:not(:disabled) { background: var(--color-surface-subtle); }
.cal__day:disabled { color: var(--text-disabled); cursor: default; }
.cal__day:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.cal__day--in { background: var(--color-accent-soft); border-radius: 0; }
.cal__day--edge, .cal__day--edge:hover:not(:disabled) {
  background: var(--color-primary); color: var(--color-primary-text);
  font-weight: var(--fw-semibold);
}
.cal__day--blank { visibility: hidden; }
@media (max-width: 900px) {
  .period__panel { flex-direction: column; width: min(380px, calc(100vw - 2 * var(--content-pad))); }
  .period__rail {
    width: auto; display: grid; grid-template-columns: 1fr 1fr;
    padding: 0 0 var(--space-2); border-right: 0; border-bottom: 1px solid var(--color-border);
  }
  .cal__nav { grid-template-columns: 28px 1fr 28px; }
  .cal__nav .cal__title:nth-of-type(2) { display: none; }
  .cal__grids { grid-template-columns: 1fr; }
  .cal__grids > :nth-child(2) { display: none; }
  .period__fields { grid-template-columns: 1fr 1fr; }
  .period__actions { grid-column: 1 / -1; justify-content: flex-end; }
}
.modal-layer {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-12);
}
.modal-scrim {
  position: absolute; inset: 0; background: var(--color-overlay);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .modal-scrim { background: rgba(10, 37, 64, .45); }
}
.modal {
  position: relative; display: flex; flex-direction: column;
  width: min(1080px, 100%); max-height: 100%;
  background: var(--color-surface); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}
.modal:focus { outline: none; }
.modal__filters {
  flex: none; display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--modal-pad);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-subtle);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal__filters > .chip-bar { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; }
.modal__filters-period { flex: none; margin-left: auto; }
.modal__filters .modal__close {
  position: static; flex: none; margin-left: var(--space-3);
}
.modal__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: var(--modal-pad); }
.modal__close {
  position: absolute; top: var(--space-4); right: var(--space-4); z-index: 2;
  width: 32px; height: 32px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface); color: var(--text-muted);
  font-size: var(--text-md); line-height: 1; cursor: pointer;
}
.modal__close:hover { color: var(--text-primary); background: var(--color-surface-subtle); }
.detail-empty {
  border: 1px dashed var(--color-border-strong); border-radius: var(--radius-lg);
  padding: var(--space-6); text-align: center; color: var(--text-muted);
  font-size: var(--text-sm); background: color-mix(in srgb, var(--color-surface) 80%, transparent);
}
.app--nav-collapsed { --nav-w: 60px; }
.app--nav-collapsed .nav-item__label,
.app--nav-collapsed .sidebar__brand-text,
.app--nav-collapsed .sidebar__group-header,
.app--nav-collapsed .sidebar__footer { display: none; }
.app--nav-collapsed .sidebar { padding-left: var(--space-2); padding-right: var(--space-2); }
.app--nav-collapsed .nav-item,
.app--nav-collapsed .sidebar__brand { justify-content: center; padding-left: 0; padding-right: 0; }
.nav-collapse {
  position: absolute; left: var(--nav-w); top: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--z-dropdown, 30);
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; padding: 0;
  border: 1px solid var(--color-border); border-radius: var(--radius-full);
  background: var(--color-surface); color: var(--text-muted);
  cursor: pointer; opacity: .55;
  transition: opacity var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.nav-collapse:hover,
.sidebar:hover ~ .nav-collapse {
  opacity: 1; color: var(--color-primary); border-color: var(--color-primary);
}
.nav-collapse:focus-visible {
  outline: none; opacity: 1; box-shadow: var(--focus-ring);
}
.nav-collapse svg { transition: transform var(--dur) var(--ease-out); }
@media (prefers-reduced-motion: reduce) { .nav-collapse svg { transition: none; } }
.input--compact { height: 30px; font-size: var(--text-sm); width: auto; }
.swatch {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin-right: var(--space-1); vertical-align: middle; flex: none;
}
.swatch--sub { width: 8px; height: 8px; }
.map-drawer {
  position: relative;
  min-height: 100%;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}
.map-drawer__band {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  width: 100%; height: var(--drawer-peek-h); padding: 0 var(--space-4);
  background: none; border: none; cursor: pointer; text-align: left;
  font-size: var(--text-sm); font-weight: var(--fw-semibold);
  color: var(--text-primary);
}
.map-drawer__band:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.map-drawer__label { min-width: 0; }
.map-drawer__hint {
  font-size: var(--text-xs); font-weight: var(--fw-regular);
  color: var(--text-muted);
}
.map-drawer__chev {
  position: absolute; left: 50%; top: 50%; pointer-events: none;
  display: inline-flex; color: var(--text-secondary);
  transition: transform var(--dur) var(--ease-out), color var(--dur-fast) var(--ease-out);
  transform: translate(-50%, -50%);
}
.map-drawer__band:hover .map-drawer__chev { color: var(--color-primary); }
.map-drawer__chev--up { transform: translate(-50%, -50%) rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .map-drawer__chev { transition: none; } }
.map-drawer__body { padding: 0 var(--space-4) var(--space-6); }
.list-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.list-table th {
  position: sticky; top: 0; z-index: 1; background: var(--color-surface);
  text-align: left; padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs); font-weight: var(--fw-semibold);
  color: var(--text-muted); border-bottom: 1px solid var(--color-border-strong);
  white-space: nowrap;
}
.list-table td {
  padding: var(--space-1) var(--space-2);
  border-bottom: 1px solid var(--color-border); white-space: nowrap;
}
.list-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.list-row--cpo { cursor: pointer; }
.list-row--cpo:hover { background: var(--color-surface-subtle); }
.list-row__chev {
  display: inline-block; margin-right: var(--space-1);
  color: var(--text-muted); font-size: var(--text-xs);
  transition: transform var(--dur-fast) var(--ease-out);
}
.list-group--open .list-row__chev { transform: rotate(90deg); }
.list-row__name { font-weight: var(--fw-medium); }
.list-group .list-row--loc { display: none; }
.list-group--open .list-row--loc { display: table-row; }
.list-row--loc { cursor: pointer; }
.list-row--loc:hover { background: var(--color-surface-subtle); }
.list-row__loc-name { padding-left: 28px; }
.share-col { min-width: 180px; }
.share-bar {
  display: inline-block; width: 120px; height: 9px;
  background: var(--color-surface-subtle); border-radius: var(--radius-full);
  overflow: hidden; vertical-align: middle; margin-right: var(--space-2);
}
.share-bar__fill { display: block; height: 100%; border-radius: var(--radius-full); }
.share-bar__value {
  font-size: var(--text-xs); font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
}
.share-bar--mini {
  display: block; width: 100%; height: 4px; margin: 0; flex: none;
}
.rail-row__share .share-bar__value { text-align: right; font-size: 11px; }
.rail-head .rail-row__share { text-align: right; font-size: 9px; }
.rail-list {
  flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column;
  margin-top: var(--space-3); padding: var(--space-4);
}
.rail-list { flex: 1 1 auto; }
.rail-list .card__header { flex: none; margin-bottom: var(--space-2); }
#rail-list-panel {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
}
.rail-head { position: sticky; top: 0; z-index: 1; background: var(--color-surface); }
.rail-head, .rail-row {
  display: flex; align-items: center; gap: 3px;
  font-variant-numeric: tabular-nums;
}
.rail-head {
  align-items: flex-end; padding: 0 0 var(--space-1);
  font-size: 9px; line-height: 1.15;
  font-weight: var(--fw-semibold); color: var(--text-muted);
  border-bottom: 1px solid var(--color-border-strong);
}
.rail-head .rail-row__n,
.rail-head .rail-row__share,
.rail-head .rail-row__cpo,
.rail-head .rail-row__name { font-size: 9px; }
.rail-head .rail-row__n { white-space: normal; }
.rail-head .rail-row__name { padding-left: 24px; }
.rail-row { padding: var(--space-2) 0; border-top: 1px solid var(--color-border); }
.rail-row:first-of-type, .rail-head + .rail-row,
.rail-head + .cpo-row > .rail-row { border-top: none; }
.rail-row__name {
  flex: 6 1 0; min-width: 0;
  font-size: 8.5px; font-weight: var(--fw-medium); color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rail-row__cpo {
  flex: 4 1 0; min-width: 0;
  font-size: 9px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rail-row__n {
  flex: 0 0 42px; text-align: right;
  font-size: 11px; color: var(--text-secondary);
}
.rail-row__n--cp { flex-basis: 28px; }
.rail-head--wide .rail-row__n, .rail-row--wide .rail-row__n { flex-basis: 52px; }
.rail-head--wide .rail-row__n--cp,
.rail-row--wide .rail-row__n--cp { flex-basis: 34px; }
.rail-row--wide .rail-row__n { font-size: var(--text-xs); }
.rail-head--wide .rail-row__n,
.rail-head--wide .rail-row__share,
.rail-head--wide .rail-row__name { font-size: .625rem; }
.rail-row--wide .rail-row__name { font-size: .625rem; }
.rail-row--sub .rail-row__name { font-size: 8.5px; }
.rail-row--wide .share-bar__value { font-size: var(--text-xs); }
.rail-head--wide .rail-row__share, .rail-row--wide .rail-row__share {
  flex-basis: 56px;
}
.rail-row__share {
  flex: 0 0 52px; display: flex; flex-direction: column; align-items: stretch;
  gap: 2px;
}
.rail-row__chev {
  display: inline-block; width: 10px; margin-right: 2px;
  color: var(--text-muted); font-size: var(--text-xs);
  transition: transform var(--dur-fast) var(--ease-out);
}
.rail-row--pick { cursor: pointer; }
.rail-row:hover { background: var(--color-surface-subtle); }
.rail-row--sub .rail-row__name { padding-left: var(--space-4); }
.rail-evolution {
  flex: none; margin-top: var(--space-3);
  padding: 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.rail-evolution__head {
  display: flex; align-items: center; gap: var(--space-2); min-width: 0;
}
.rail-evolution__head .select--sm { flex: 0 1 auto; min-width: 0; }
.rail-evolution__sub {
  flex: 1 1 auto; min-width: 0;
  font-size: .625rem; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rail-evolution #evolution-chart { height: 140px; }
.dot-tip, .geo-tip { z-index: var(--z-dropdown); pointer-events: none; }
.dot-tip .maplibregl-popup-content,
.geo-tip .maplibregl-popup-content {
  padding: 0;
  width: 250px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}
.dot-tip .maplibregl-popup-tip,
.geo-tip .maplibregl-popup-tip { border-top-color: var(--color-surface); border-bottom-color: var(--color-surface); }
.geo-tip .maplibregl-popup-content { width: auto; max-width: 220px; }
.geo-tip__head { padding: var(--space-2) var(--space-3); }
.geo-tip__name {
  font-size: var(--text-sm); font-weight: var(--fw-semibold);
  color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.geo-tip__group {
  padding: var(--space-2) var(--space-3);
  border-top: 1px solid var(--color-border);
}
.geo-tip__row {
  display: flex; justify-content: space-between; gap: var(--space-4);
}
.geo-tip__k { color: var(--text-secondary); }
.geo-tip__v { font-weight: var(--fw-semibold); color: var(--text-primary); }
.geo-tip__v--none { font-weight: var(--fw-regular); color: var(--text-muted); }
.dot-tip__head { padding: var(--space-3); }
.dot-tip__op {
  display: flex; align-items: center; gap: var(--space-1);
  color: var(--text-muted); font-weight: var(--fw-medium);
}
.dot-tip__swatch {
  width: 8px; height: 8px; border-radius: var(--radius-full); flex: none;
}
.dot-tip__name {
  font-size: var(--text-sm); font-weight: var(--fw-semibold);
  color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dot-tip__pills {
  display: flex; align-items: center; gap: var(--space-1);
  margin-top: var(--space-2);
}
.dot-tip__pill {
  font-weight: var(--fw-medium); color: var(--text-link);
  background: var(--color-accent-soft);
  border: 1px solid color-mix(in srgb, var(--color-accent) 25%, transparent);
  border-radius: var(--radius-full); padding: 1px var(--space-2);
  white-space: nowrap;
}
.dot-tip__rankwrap {
  margin-left: auto; display: inline-flex; align-items: baseline;
  gap: var(--space-1); white-space: nowrap;
}
.dot-tip__rank {
  background: var(--color-primary); color: var(--color-primary-text);
  border-radius: var(--radius-full); padding: 1px var(--space-2);
  font-weight: var(--fw-semibold);
}
.dot-tip__of { color: var(--text-muted); }
.dot-tip__group {
  padding: var(--space-2) var(--space-3);
  border-top: 1px solid var(--color-border);
}
.dot-tip__row { display: flex; justify-content: space-between; gap: var(--space-4); }
.dot-tip__k { color: var(--text-secondary); }
.dot-tip__v { font-weight: var(--fw-semibold); color: var(--text-primary); }
.dot-tip__mix {
  padding: var(--space-2) var(--space-3) var(--space-3);
  border-top: 1px solid var(--color-border);
}
.dot-tip__mix-k {
  color: var(--text-muted); font-weight: var(--fw-medium);
  margin-bottom: var(--space-1);
}
.dot-tip__pm {
  display: grid; grid-template-columns: 46px 1fr 40px;
  align-items: center; gap: var(--space-2); margin-top: var(--space-1);
}
.dot-tip__pw { font-weight: var(--fw-semibold); text-align: right; }
.dot-tip__track {
  height: 6px; border-radius: var(--radius-full);
  background: var(--color-surface-sunken); overflow: hidden;
}
.dot-tip__fill {
  display: block; height: 100%; border-radius: var(--radius-full);
  background: var(--color-primary);
}
.dot-tip__pm--alt .dot-tip__fill { background: var(--text-disabled); }
.dot-tip__ct { color: var(--text-muted); }
.dot-tip__ct b { color: var(--text-primary); font-weight: var(--fw-semibold); }
.cpo-row > summary { cursor: pointer; list-style: none; }
.cpo-row > summary::-webkit-details-marker { display: none; }
.cpo-row[open] > summary .rail-row__chev { transform: rotate(90deg); }
.list-more {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-2); width: 100%; margin-top: var(--space-2);
  padding: var(--space-2); background: none; border: 0;
  border-top: 1px solid var(--color-border); border-radius: var(--radius-sm);
  cursor: pointer; text-align: left;
  font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--text-link);
}
.list-more:hover { background: var(--color-surface-subtle); }
.list-more:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.list-more--sub { margin-left: var(--space-4); width: auto; }
.list-more__count {
  font-size: var(--text-xs); font-weight: var(--fw-regular);
  color: var(--text-muted); font-variant-numeric: tabular-nums;
}
.trends { margin-top: var(--space-3); border-top: 1px solid var(--color-border); }
.trend { margin-bottom: var(--space-2); }
.trend__title {
  font-size: var(--text-xs); font-weight: var(--fw-semibold);
  color: var(--text-muted); margin: var(--space-2) 0 0;
}
.trend__title--plain { font-weight: var(--fw-regular); }
.js-price-type { font-weight: var(--fw-regular); }
.trend__note {
  font-size: var(--text-xs); color: var(--text-muted); font-weight: var(--fw-regular);
}
.cvz-chart { min-height: 40px; }
.detail__split {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8);
  align-items: stretch;
}
.detail__col.trends {
  display: flex; flex-direction: column;
  margin-top: 0; border-top: none;
}
.trend-group { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; }
.trend-group + .trend-group {
  margin-top: var(--space-5); padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}
.trend-group > .trends__charts { flex: 1 1 auto; min-height: 0; }
@media (max-width: 940px) { .detail__split { grid-template-columns: 1fr; gap: var(--space-6); } }
.detail__col { min-width: 0; }
.trend-tabs {
  display: flex; flex-wrap: wrap; gap: var(--space-1);
  margin-bottom: var(--space-3);
}
.trend-tab {
  border: 1px solid transparent; background: transparent; font: inherit;
  font-size: var(--text-xs); font-weight: var(--fw-medium);
  color: var(--text-muted); padding: 4px var(--space-3);
  border-radius: var(--radius-full); cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}
.trend-tab:hover { color: var(--text-primary); background: var(--color-surface-subtle); }
.trend-tab--on {
  background: var(--color-accent-soft); color: var(--text-link);
  border-color: transparent;
}
.trend-tab:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.powermix__avg {
  font-weight: var(--fw-regular); color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.powermix__avg::before { content: " · "; }
.detail__head-main { min-width: 0; }
.detail__pills {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-3);
}
.pill {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font-size: var(--text-xs); font-weight: var(--fw-medium);
  color: var(--text-secondary);
  background: var(--color-surface-subtle); border: 1px solid var(--color-border);
  border-radius: var(--radius-full); padding: 2px var(--space-3);
}
.pill--brand {
  background: var(--color-accent-soft); border-color: transparent;
  color: var(--text-link);
}
.detail__band {
  padding: var(--space-6) var(--modal-pad) ;
  margin: 0 calc(-1 * var(--modal-pad));
  border-bottom: 1px solid var(--color-border);
}
.detail__band:first-child { padding-top: 0; }
.detail__band + .detail__band { padding-top: var(--space-4); }
.detail__band:last-child { border-bottom: none; padding-bottom: 0; }
.detail__section { margin-bottom: 0; }
.detail__sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3);
}
.detail__sec-head--control { align-items: center; }
.daypick__hint {
  font-size: var(--text-xs); color: var(--text-muted); white-space: nowrap;
}
.daypick { position: relative; display: inline-flex; }
.daypick__label {
  position: absolute; top: 1px; bottom: 1px; left: 1px;
  right: 26px;
  display: flex; align-items: center; padding-left: var(--space-3);
  background: var(--color-surface); border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: var(--text-base);
  pointer-events: none;
}
.daypick__label[hidden] { display: none; }
.detail__sec-title {
  font-size: var(--text-base); font-weight: var(--fw-semibold);
  color: var(--text-primary); margin: 0;
}
.detail__sec-sub {
  font-size: var(--text-xs); color: var(--text-muted);
  font-weight: var(--fw-regular);
}
.ctx-row {
  display: grid; grid-template-columns: 1fr 290px; gap: var(--space-3);
  align-items: stretch;
}
@media (max-width: 940px) { .ctx-row { grid-template-columns: 1fr; } }
.context {
  display: flex; flex-wrap: wrap;
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface);
}
.context__cell {
  flex: 1 1 0; min-width: 0; padding: var(--space-5) var(--space-4);
  display: flex; flex-direction: column; gap: 2px; position: relative;
}
.context__cell + .context__cell::before {
  content: ""; position: absolute; left: 0; top: var(--space-3);
  bottom: var(--space-3); width: 1px; background: var(--color-border);
}
.apexcharts-canvas .apexcharts-tooltip.apexcharts-theme-light {
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  font-size: var(--text-xs);
}
.apexcharts-canvas .apexcharts-tooltip.apexcharts-theme-light
  .apexcharts-tooltip-title {
  background: transparent; border: none; margin: 0;
  padding: 6px 10px 0;
  font-weight: var(--fw-semibold); color: var(--text-primary);
}
.apexcharts-canvas .apexcharts-tooltip.apexcharts-theme-light
  .apexcharts-tooltip-series-group { padding: 1px 10px 4px; }
.apexcharts-canvas .apexcharts-tooltip.apexcharts-theme-light
  .apexcharts-tooltip-y-group { padding: 1px 0; }
.apexcharts-canvas .apexcharts-tooltip.apexcharts-theme-light
  .apexcharts-tooltip-text { font-size: var(--text-xs); }
.apexcharts-canvas .apexcharts-tooltip.apexcharts-theme-light
  .apexcharts-tooltip-text-y-label { color: var(--text-muted); }
.apexcharts-canvas .apexcharts-tooltip.apexcharts-theme-light
  .apexcharts-tooltip-text-y-value {
  font-size: 13px; font-weight: var(--fw-semibold); color: var(--text-primary);
}
.apexcharts-canvas .apexcharts-tooltip.apexcharts-theme-light
  .apexcharts-tooltip-marker {
  width: auto; height: auto; flex: none;
  font-size: inherit; line-height: 1; align-self: center;
  margin-right: 6px;
}
.apexcharts-canvas .apexcharts-tooltip.apexcharts-theme-light
  .apexcharts-tooltip-marker::before {
  font-size: 14px; line-height: 1;
}
.apexcharts-canvas .apexcharts-legend-marker { margin-right: 6px; }
.apexcharts-canvas .apexcharts-legend-series { align-items: center; }
.cvz-heat-tip { padding: 6px 10px; }
.cvz-heat-tip__t {
  font-size: var(--text-xs); font-weight: var(--fw-semibold);
  color: var(--text-primary);
}
.cvz-heat-tip__v {
  font-size: 13px; font-weight: var(--fw-semibold);
  color: var(--text-primary); margin-top: 1px;
}
.ctx-spark {
  display: block; margin-top: auto; padding-top: var(--space-2);
  min-height: 32px; line-height: 0;
  align-self: stretch; min-width: 0;
}
.context__cell--rank { align-items: center; text-align: center; }
.context__cell--rank .context__k { align-self: stretch; text-align: left; }
.context__cell--rank .context__v { margin-top: auto; }
.context__cell--rank .context__of { margin-bottom: auto; margin-top: 2px; }
.context__k { font-size: var(--text-xs); color: var(--text-muted); font-weight: var(--fw-medium); }
.context__v {
  font-size: var(--text-lg); font-weight: var(--fw-semibold); color: var(--text-primary);
  display: flex; align-items: baseline; gap: var(--space-1); flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
}
.context__unit { font-size: var(--text-sm); color: var(--text-muted); font-weight: var(--fw-regular); }
.context__of { font-size: var(--text-xs); color: var(--text-muted); font-weight: var(--fw-regular); }
.rank-badge {
  display: inline-flex; align-items: center; flex: none;
  color: var(--text-primary);
  font-size: var(--text-xl); font-weight: var(--fw-bold);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.powermix {
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface);
  padding: var(--space-5) var(--space-4) var(--space-3);
  display: flex; flex-direction: column; gap: var(--space-2);
}
.pm-row {
  display: grid; grid-template-columns: 92px 1fr 44px;
  align-items: center; gap: var(--space-2);
}
.pm-row__pw {
  font-size: var(--text-xs); font-weight: var(--fw-medium); color: var(--text-primary);
  display: inline-flex; align-items: center; gap: var(--space-1); white-space: nowrap;
}
.pm-dot {
  width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: var(--text-disabled);
}
.pm-row__track {
  height: 8px; border-radius: var(--radius-full);
  background: var(--color-surface-sunken); overflow: hidden;
}
.pm-row__fill { display: block; height: 100%; border-radius: var(--radius-full); background: var(--color-primary); }
.pm-row__ct {
  font-size: var(--text-xs); color: var(--text-muted); text-align: right;
  font-variant-numeric: tabular-nums;
}
.pm-row__ct b { color: var(--text-primary); font-weight: var(--fw-semibold); }
.detail__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-4);
  padding-right: var(--space-8);
  margin-bottom: var(--space-2);
}
.detail__title {
  font-size: var(--text-xl); font-weight: var(--fw-semibold);
  color: var(--text-primary); letter-spacing: -.01em;
}
.info {
  position: relative; display: inline-flex; align-items: center;
  justify-content: center; width: 14px; height: 14px; flex: none;
  border-radius: var(--radius-full); border: 1px solid var(--color-border-strong);
  color: var(--text-disabled); font-size: 9.5px; font-weight: var(--fw-semibold);
  line-height: 1; cursor: help; margin-left: 5px;
}
.info:hover { color: var(--text-muted); border-color: var(--text-disabled); }
.info__tip {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%); width: 230px; white-space: normal;
  background: var(--chart-tooltip-bg); color: var(--gray-0);
  font-size: var(--text-xs); font-weight: var(--fw-regular); line-height: 1.45;
  text-align: left; padding: var(--space-2) 10px; border-radius: var(--radius-md);
  opacity: 0; pointer-events: none; z-index: 30;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.info__tip::after {
  content: ""; position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%); border: 5px solid transparent;
  border-bottom-color: var(--chart-tooltip-bg);
}
.info:hover .info__tip, .info:focus-visible .info__tip { opacity: 1; }
.info:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.info { vertical-align: 1px; }
.detail__sub { font-size: var(--text-sm); color: var(--text-secondary); margin-top: 2px; }
.hours-head__pick { display: flex; align-items: center; gap: var(--space-2); flex: none; }
.cvz-heat { min-height: 220px; margin-bottom: var(--space-2); }
.trends--split .detail__split {
  align-items: start; grid-template-columns: 1.35fr 1fr;
}
.trends__charts--2x3 {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--space-3) var(--space-5);
}
.trends__charts--2x3 > .trend { min-width: 0; overflow: hidden; }
.trends__head {
  display: flex; align-items: center; justify-content: flex-start;
  gap: var(--space-4); flex-wrap: wrap;
  margin-top: var(--space-6); margin-bottom: var(--space-3);
}
.opspick { position: relative; }
.opspick__btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  height: 30px; padding: 0 var(--space-3);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-full); cursor: pointer;
  font: inherit; font-size: var(--text-xs); color: var(--text-primary);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.opspick__btn:hover { border-color: var(--color-primary); }
.opspick__btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.opspick__field { color: var(--text-muted); }
.opspick__value {
  max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.opspick__panel { left: 0; right: auto; min-width: 220px; max-height: 320px; }
.opspick__reset {
  display: block; width: 100%; text-align: left;
  padding: var(--space-1) var(--space-2); margin-bottom: var(--space-1);
  background: none; border: none; border-bottom: 1px solid var(--color-border);
  font: inherit; font-size: var(--text-xs); color: var(--text-secondary);
  cursor: pointer;
}
.opspick__reset:hover { color: var(--color-primary); }
@media (max-width: 940px) {
  .trends__charts--2x3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .detail__cols { grid-template-columns: 1fr; gap: var(--space-5); }
  .kpi-grid--3, .kpi-grid--4 { grid-template-columns: 1fr 1fr; }
  .modal-layer { padding: var(--space-4); }
  .modal__body { --modal-pad: var(--space-5); padding: var(--modal-pad); }
}
.legal-links {
  display: flex;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.legal-links a { color: var(--text-muted); }
.legal-links a:hover { color: var(--text-link); }
.sidebar__footer {
  margin-top: auto;
  padding: var(--space-4) var(--space-3) var(--space-1);
  border-top: 1px solid var(--color-border);
}
.nav-item--disabled {
  color: var(--text-disabled);
  cursor: default;
}
.nav-item--disabled:hover { background: transparent; }
.account-menu { position: relative; }
.account-menu__trigger {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
  color: var(--text-primary);
  text-align: left;
}
.account-menu__trigger:hover { background: var(--color-surface-subtle); }
.account-menu__trigger:focus-visible { box-shadow: var(--focus-ring); outline: none; }
.account-menu__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: var(--text-on-cyan);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  flex: none;
}
.account-menu__labels { display: flex; flex-direction: column; line-height: var(--lh-tight); }
.account-menu__name { font-size: var(--text-sm); font-weight: var(--fw-medium); }
.account-menu__org { font-size: var(--text-xs); color: var(--text-muted); }
.account-menu__role { font-size: var(--text-xs); color: var(--text-muted); }
.account-menu__panel {
  position: absolute;
  top: calc(100% + var(--space-1));
  right: 0;
  min-width: 220px;
  padding: var(--space-1);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: var(--z-dropdown);
}
.account-menu__header {
  padding: var(--space-2);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-1);
}
.account-menu__header .account-menu__name { word-break: break-all; }
.account-menu__item,
.account-menu__signout button {
  display: flex;
  align-items: center;
  width: 100%;
  height: 32px;
  padding: 0 var(--space-2);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  font: inherit;
  font-size: var(--text-sm);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}
.account-menu__item:hover,
.account-menu__signout button:hover {
  background: var(--color-surface-subtle);
  text-decoration: none;
}
.account-menu__item:focus-visible,
.account-menu__signout button:focus-visible { box-shadow: var(--focus-ring); outline: none; }
.account-menu__signout { margin-top: var(--space-1); border-top: 1px solid var(--color-border); padding-top: var(--space-1); }
.notice-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  background: var(--color-bg);
}
.notice-card {
  width: 100%;
  max-width: 520px;
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.notice-card__eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-warning);
}
.notice-card__title {
  margin: var(--space-2) 0 var(--space-4);
  font-size: var(--text-2xl);
  font-weight: var(--fw-semibold);
  letter-spacing: -.015em;
  line-height: var(--lh-tight);
}
.notice-card__body {
  margin: 0 0 var(--space-4);
  font-size: var(--text-base);
  color: var(--text-secondary);
}
.notice-card__actions { margin-top: var(--space-6); }
.notice-card__footer {
  margin-top: var(--space-8);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}
.page { height: 100%; overflow-y: auto; }
.page__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--content-pad);
}
.page__inner--full { max-width: none; }
.page__header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-4); margin-bottom: var(--space-6);
}
.page__title { font-size: var(--text-2xl); font-weight: var(--fw-semibold); letter-spacing: -.015em; }
.page__sub { margin-top: var(--space-1); font-size: var(--text-sm); color: var(--text-muted); }
.page__actions { display: flex; gap: var(--space-2); flex-shrink: 0; }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn--danger { background: var(--rose-600); color: #fff; }
.btn--danger:hover { background: var(--rose-700); }
.btn--ghost { background: transparent; color: var(--text-secondary); }
.btn--ghost:hover { background: var(--color-surface-subtle); color: var(--text-primary); }
.btn--sm { height: 28px; padding: 0 var(--space-3); }
.select {
  height: 36px; padding: 0 var(--space-3);
  background: var(--color-surface); color: var(--text-primary);
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font-size: var(--text-base);
}
.select--sm { height: 22px; padding: 0 var(--space-2); font-size: 11px; }
.select:focus { outline: none; border-color: var(--color-border-focus); box-shadow: var(--focus-ring); }
.input--error, .select--error { border-color: var(--rose-500); }
.row--invalid > td { background: var(--color-negative-bg); }
.row--invalid > td:first-child { box-shadow: inset 3px 0 0 var(--color-negative-dot); }
.field__error { font-size: var(--text-sm); color: var(--color-negative); }
.badge--positive { background: var(--color-positive-bg); color: var(--color-positive); }
.badge--warning  { background: var(--color-warning-bg);  color: var(--color-warning); }
.badge--negative { background: var(--color-negative-bg); color: var(--color-negative); }
.badge--neutral  { background: var(--color-neutral-bg);  color: var(--color-neutral); }
.badge__dot { width: 6px; height: 6px; border-radius: var(--radius-full); background: currentColor; }
.modal-scrim--flat { background: rgba(10, 37, 64, .45); backdrop-filter: none; -webkit-backdrop-filter: none; }
.modal--content { width: min(560px, 100%); }
.modal__header {
  padding: var(--space-6) var(--space-8) 0;
}
.modal__title { font-size: var(--text-xl); font-weight: var(--fw-semibold); letter-spacing: -.01em; }
.modal__footer {
  display: flex; justify-content: flex-end; gap: var(--space-2);
  padding: 0 var(--space-8) var(--space-6);
}
.toast-host {
  position: fixed; right: var(--space-6); bottom: var(--space-6);
  z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: var(--space-2);
  max-width: min(420px, calc(100vw - var(--space-12)));
}
.toast {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  animation: toast-in var(--dur) var(--ease-out);
}
.toast__dot {
  flex-shrink: 0; width: 8px; height: 8px; margin-top: 5px;
  border-radius: var(--radius-full); background: var(--color-neutral-dot);
}
.toast--success .toast__dot { background: var(--color-positive-dot); }
.toast--warning .toast__dot { background: var(--color-warning-dot); }
.toast--error   .toast__dot { background: var(--color-negative-dot); }
.toast__body { flex: 1 1 auto; }
.toast__close {
  flex-shrink: 0; padding: 0; border: none; background: none;
  color: var(--text-muted); cursor: pointer; line-height: 1;
}
.toast__close:hover { color: var(--text-primary); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(var(--space-3)); }
  to   { opacity: 1; transform: none; }
}
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table th {
  text-align: left; padding: var(--space-2) var(--space-3);
  background: var(--color-surface-subtle);
  font-size: var(--text-xs); font-weight: var(--fw-semibold);
  color: var(--text-muted); white-space: nowrap;
  border-bottom: 1px solid var(--color-border);
}
.table td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.table tbody tr { height: 52px; }
.table tbody tr:hover { background: var(--color-surface-subtle); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table__actions { opacity: 0; transition: opacity var(--dur-fast) var(--ease-out); text-align: right; }
.table tbody tr:hover .table__actions,
.table__actions:focus-within { opacity: 1; }
.table__footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); padding-top: var(--space-3);
  font-size: var(--text-sm); color: var(--text-muted);
}
.table__empty {
  padding: var(--space-10); text-align: center;
  color: var(--text-muted); font-size: var(--text-sm);
  border: 1px dashed var(--color-border); border-radius: var(--radius-lg);
}
.topbar__menu {
  display: none; width: 36px; height: 36px; align-items: center; justify-content: center;
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-surface); color: var(--text-secondary); cursor: pointer;
  margin-right: var(--space-3);
}
@media (max-width: 1024px) {
  .app { --nav-w: 0px; }
  .sidebar {
    position: fixed; left: 0; top: calc(var(--banner-h) + var(--topbar-h)); bottom: 0;
    width: var(--sidebar-w); z-index: var(--z-modal);
    transform: translateX(-100%); transition: transform var(--dur) var(--ease-out);
    box-shadow: var(--shadow-md);
  }
  .app--nav-open .sidebar { transform: none; }
  .app--nav-collapsed .nav-item__label,
  .app--nav-collapsed .sidebar__brand-text,
  .app--nav-collapsed .sidebar__group-header,
  .app--nav-collapsed .sidebar__footer { display: initial; }
  .nav-collapse { display: none; }
  .topbar__menu { display: inline-flex; }
  .topbar { padding-left: var(--space-3); }
}
@media (max-width: 760px) {
  .kpi-grid--3, .kpi-grid--4 { grid-template-columns: 1fr 1fr; }
  .topbar__title { font-size: var(--text-base); }
  .card { overflow-x: auto; }
  .card > table, .table { display: block; overflow-x: auto; max-width: 100%; }
}
.market { display: flex; flex-direction: column; gap: var(--space-6); }
.market__bar {
  display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap;
}
.market__bar__spacer { flex: 1 1 auto; }
.market__bar .chip-bar { flex: 0 1 auto; padding-top: 0; }
.market__bar .breadcrumb { margin-right: var(--space-2); }
.dd__opt-sub { margin-left: auto; flex: none; font-size: var(--text-xs); color: var(--text-muted); }
.period-pair { display: flex; align-items: center; gap: var(--space-2); }
.period-pair__field {
  display: inline-flex; align-items: center; gap: var(--space-2);
  border: 1px solid var(--color-border); background: var(--color-surface);
  border-radius: var(--radius-md); padding: 0 var(--space-2) 0 var(--space-3);
  height: 32px;
}
.period-pair__label {
  font-size: var(--text-xs); color: var(--text-muted); white-space: nowrap;
}
.period-pair__field select {
  border: none; background: none; padding: 0 var(--space-1) 0 0;
  font-size: var(--text-sm); font-weight: var(--fw-semibold);
  color: var(--text-primary); height: 30px;
}
.period-pair__field select:focus-visible { outline: 2px solid var(--color-accent); }
.dd__opt--action {
  width: 100%; text-align: left; border: none; background: none;
  font: inherit; color: var(--text-primary); cursor: pointer;
}
.period-pair__field { display: flex; align-items: center; gap: var(--space-2); }
.period-pair__label {
  font-size: var(--text-xs); color: var(--text-muted);
  white-space: nowrap;
}
.breadcrumb {
  display: flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-sm); color: var(--text-secondary);
}
.breadcrumb a { color: var(--text-link); text-decoration: none; }
.breadcrumb a:hover { color: var(--text-link-hover); text-decoration: underline; }
.breadcrumb__sep { color: var(--text-disabled); }
.breadcrumb__current { color: var(--text-primary); font-weight: var(--fw-semibold); }
.kpi-board {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.3fr 1fr 1fr 1fr 1.35fr;
  background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
}
.kpi-board .kpi {
  position: relative; padding: var(--space-4);
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  height: 104px;
}
.kpi-board .kpi + .kpi::before {
  content: ""; position: absolute; left: 0; top: var(--space-3);
  bottom: var(--space-3); width: 1px; background: var(--color-border);
}
.kpi__label {
  font-size: var(--text-xs); color: var(--text-muted);
  font-weight: var(--fw-medium); display: flex; align-items: center;
}
.kpi-board .kpi__label { white-space: nowrap; font-size: 11px; }
.kpi-board .kpi__unit { font-size: 11px; }
.kpi-board .kpi__row { gap: 2px; }
.kpi__row {
  display: flex; align-items: baseline; gap: var(--space-1);
  margin-top: 2px; flex-wrap: wrap; min-width: 0; overflow: hidden;
  flex: none;
}
.kpi__value {
  font-size: var(--text-2xl); font-weight: var(--fw-semibold);
  letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
.kpi__value--na { color: var(--text-disabled); font-weight: var(--fw-medium); }
.kpi__unit {
  font-size: var(--text-sm); color: var(--text-muted);
  font-weight: var(--fw-medium);
}
.kpi__delta {
  font-size: 10px; font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums; white-space: nowrap;
  border-radius: var(--radius-full); padding: 1px 5px;
  flex: 0 0 auto;
}
.kpi__value, .kpi__unit { flex: 0 0 auto; }
.kpi--pair .kpi__value { font-size: var(--text-lg); }
.kpi__row--pair { margin-top: 0; gap: var(--space-1); }
.kpi__row--pair + .kpi__row--pair { margin-top: 2px; }
.kpi--pair .kpi__unit { min-width: 26px; }
.kpi__delta.is-up { color: var(--color-positive); background: var(--color-positive-bg); }
.kpi__delta.is-down { color: var(--color-negative); background: var(--color-negative-bg); }
.kpi__delta.is-flat { color: var(--text-muted); background: var(--color-surface-subtle); }
.kpi__note {
  margin: var(--space-1) 0 0; font-size: 10px;
  color: var(--text-disabled); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-width: 0;
}
.kpi-board__note {
  margin: var(--space-2) 0 0; font-size: var(--text-xs);
  color: var(--text-muted);
}
.info {
  position: relative; display: inline-flex; align-items: center;
  justify-content: center; width: 14px; height: 14px;
  border-radius: var(--radius-full); border: 1px solid var(--color-border-strong);
  color: var(--text-muted); font-size: 9.5px; font-weight: var(--fw-semibold);
  cursor: help; margin-left: var(--space-1);
}
.info__tip {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%); width: 230px; white-space: normal;
  background: var(--navy-800); color: var(--text-on-navy);
  font-size: var(--text-xs); font-weight: var(--fw-regular); line-height: 1.45;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-md);
  opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease-out);
  z-index: var(--z-sticky);
}
.info__tip::after {
  content: ""; position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent; border-bottom-color: var(--navy-800);
}
.info:hover .info__tip, .info:focus-visible .info__tip { opacity: 1; }
.market__grid {
  display: grid; gap: var(--space-6);
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas:
    "map   map   map   map   map   series series series series series series series"
    "top   top   top   top   hours hours hours hours mix    mix    mix    mix";
}
.market__map { grid-area: map; }
.market__series { grid-area: series; }
.market__top { grid-area: top; }
.market__hours { grid-area: hours; }
.market__mix { grid-area: mix; }
.market .card {
  display: flex; flex-direction: column;
  padding-top: var(--space-4);
}
.market__map .breadcrumb { margin: 0 0 var(--space-2); }
.market__chart { flex: 1 1 0; min-height: 200px; }
#market-mix-chart .apexcharts-tooltip-text-y-label {
  display: block; margin-right: 0; font-weight: var(--fw-semibold);
}
#market-mix-chart .apexcharts-tooltip-y-group { padding: 0; }
.market__map-canvas {
  height: 340px; border-radius: var(--radius-md); overflow: hidden;
  background: var(--color-surface-subtle);
}
.card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); margin-bottom: var(--space-2);
}
.market .card__head { min-height: 32px; }
.card__title { white-space: nowrap; }
.card__note { min-width: 0; }
.card__hint {
  margin-left: auto; font-size: var(--text-xs); color: var(--text-muted);
}
.card__note { font-size: var(--text-xs); color: var(--text-muted); }
.card__title + .card__note { margin-right: auto; }
.card__controls { display: flex; align-items: center; gap: var(--space-2); }
.card__head .card__lookback {
  margin-right: auto; font-size: 11px; padding: 0 var(--space-1) 0 var(--space-2);
}
.market__series .card__head { flex-wrap: nowrap; gap: var(--space-2); }
.market__series .card__head select { field-sizing: content; }
.market__series .card__controls { flex: 0 1 auto; min-width: 0; }
.market__series .card__controls > select:first-child { min-width: 72px; }
.market__series .card__topn { flex: none; }
@media (max-width: 1420px) {
  .market__series .card__head select { min-width: 64px; }
}
.card__topn {
  display: flex; align-items: center; gap: var(--space-1);
  font-size: var(--text-xs); color: var(--text-muted);
}
.card__topn .input { width: 48px; padding: 0 2px 0 var(--space-2); }
.card__blocked {
  margin: 0 0 var(--space-3); font-size: var(--text-sm);
  color: var(--text-muted); background: var(--color-surface-subtle);
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
}
.input--sm {
  height: 28px; padding: 0 var(--space-2); font-size: var(--text-xs);
}
.card__expand {
  width: 28px; height: 28px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-surface); color: var(--text-secondary);
  font-size: var(--text-sm); line-height: 1; cursor: pointer;
}
.card__expand:hover {
  background: var(--color-surface-subtle); color: var(--text-primary);
}
.card__expand:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.breadcrumb__focus {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: 1px var(--space-2); border-radius: var(--radius-full);
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border-strong);
  color: var(--text-primary); font-weight: var(--fw-semibold);
  font-size: var(--text-xs);
}
.breadcrumb__focus-clear {
  color: var(--text-muted); text-decoration: none; font-size: var(--text-sm);
  line-height: 1;
}
.breadcrumb__focus-clear:hover { color: var(--text-primary); }
.modal--chart { max-width: 1280px; width: 100%; height: 88vh; }
.market-modal { display: flex; flex-direction: column; }
.market-modal__chart { flex: 1 1 0; min-height: 320px; }
.empty-state {
  margin: 0; padding: var(--space-6); text-align: center;
  font-size: var(--text-sm); color: var(--text-muted);
  border: 1px dashed var(--color-border); border-radius: var(--radius-sm);
}
@media (max-width: 1280px) {
  .market__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "map" "series" "top" "hours" "mix";
  }
  .kpi-board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-board .kpi:nth-child(3n+1)::before { display: none; }
  .kpi-board .kpi:nth-child(n+4) { border-top: 1px solid var(--color-border); }
}
@media (max-width: 760px) {
  .kpi-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-board .kpi { height: auto; min-height: 104px; }
  .kpi-board .kpi:nth-child(3n+1)::before { display: revert; }
  .kpi-board .kpi:nth-child(2n+1)::before { display: none; }
  .kpi-board .kpi:nth-child(n+3) { border-top: 1px solid var(--color-border); }
}
.dd__search { width: 100%; margin-bottom: var(--space-2); }
.dd__list { max-height: 260px; overflow-y: auto; }
.dd__opt {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-1) var(--space-2); font-size: var(--text-sm);
  cursor: pointer; border-radius: var(--radius-xs);
}
.dd__opt:hover { background: var(--color-surface-subtle); }
.dd__empty {
  margin: 0; padding: var(--space-2); font-size: var(--text-sm);
  color: var(--text-muted);
}
.dd__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-2); padding: 0 var(--space-2) var(--space-2);
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-xs); color: var(--text-muted);
}
.dd__head-actions { display: inline-flex; gap: var(--space-3); }
.dd__clear {
  border: none; background: none; padding: 0; font: inherit; cursor: pointer;
  color: var(--text-link);
}
.dd__clear:hover { text-decoration: underline; }
.dd__foot {
  display: flex; align-items: center; justify-content: flex-end;
  gap: var(--space-2); padding-top: var(--space-2); margin-top: var(--space-2);
  border-top: 1px solid var(--color-border);
}
.dd__foot .btn {
  height: 24px; padding: 0 var(--space-2); font-size: var(--text-xs);
}
.dd__panel--chip {
  display: flex; flex-direction: column;
  max-height: min(420px, 60vh); overflow: hidden;
}
.dd__panel[hidden] { display: none; }
.dd__panel--chip .dd__head,
.dd__panel--chip .dd__search,
.dd__panel--chip .dd__note,
.dd__panel--chip .dd__foot { flex: none; }
.dd__panel--chip .dd__list {
  flex: 1 1 auto; min-height: 0; max-height: none;
}
.opspick__panel .dd__opt { align-items: flex-start; }
.opspick__panel .dd__opt input { margin-top: 3px; flex: none; }
.opspick__panel .dd__opt > span { min-width: 0; }
.dl-trigger {
  display: inline-flex; align-items: center; gap: var(--space-2);
  height: 32px; padding: 0 var(--space-3);
  background: transparent; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); cursor: pointer;
  font: inherit; font-size: var(--text-sm); font-weight: var(--fw-medium);
  color: var(--text-primary);
}
.dl-trigger:hover { background: var(--color-surface-subtle); }
.dl-trigger:focus-visible { box-shadow: var(--focus-ring); outline: none; }
.dl-trigger__icon { width: 16px; height: 16px; flex: none; }
.dl-layer { align-items: flex-start; }
.dl-modal { width: min(600px, 100%); }
.dl-modal__head {
  position: relative; flex: none;
  padding: var(--space-6) var(--space-16) var(--space-4) var(--space-8);
  border-bottom: 1px solid var(--color-border);
}
.dl-modal__meta { margin: var(--space-1) 0 0; color: var(--text-muted); font-size: var(--text-sm); }
.dl-modal__body { padding: var(--space-4) var(--space-8); }
.dl-modal__foot {
  flex: none; align-items: center;
  padding: var(--space-4) var(--space-8) var(--space-6);
  border-top: 1px solid var(--color-border);
}
.dl-sections { display: flex; flex-direction: column; gap: var(--space-5); }
.dl-section { display: flex; flex-direction: column; gap: var(--space-2); }
.dl-section__bar { display: flex; align-items: baseline; gap: var(--space-3); }
.dl-section__bar .dl-section__title { margin-right: auto; }
.dl-section__title {
  margin: 0; font-size: var(--text-xs); font-weight: var(--fw-semibold);
  letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted);
}
.dl-sub { margin: var(--space-2) 0 0; font-size: var(--text-sm); font-weight: var(--fw-semibold); }
.dl-note { margin: 0; color: var(--text-muted); font-size: var(--text-xs); line-height: var(--lh-snug); }
.dl-note--indent { margin-left: 24px; }
.dl-status { margin: 0; color: var(--text-muted); font-size: var(--text-sm); }
.dl-fact {
  display: flex; gap: var(--space-3); font-size: var(--text-sm);
  padding: 4px 0; border-bottom: 1px solid var(--color-border);
}
.dl-fact__label { flex: 0 0 150px; color: var(--text-secondary); }
.dl-fact__value { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dl-link {
  align-self: flex-start; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--text-link); font: inherit; font-size: var(--text-sm);
}
.dl-link:hover { color: var(--text-link-hover); text-decoration: underline; }
.dl-link:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.dl-row { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.dl-field { display: flex; flex-direction: column; gap: 4px; font-size: var(--text-sm); }
.dl-field__label { color: var(--text-secondary); font-size: var(--text-xs); }
.dl-num { width: 88px; }
.dl-choices { display: flex; flex-direction: column; gap: 2px; }
.dl-check {
  display: flex; align-items: flex-start; gap: var(--space-2);
  padding: 4px 0; cursor: pointer; font-size: var(--text-sm);
}
.dl-check input { flex: none; margin: 3px 0 0; accent-color: var(--color-primary); }
.dl-check.is-disabled { color: var(--text-disabled); cursor: default; }
.dl-group { display: flex; flex-direction: column; }
.dl-estimate { margin: 0; font-size: var(--text-sm); color: var(--text-secondary); }
.dl-progress { flex: none; padding: 0 var(--space-8) var(--space-3); }
.dl-progress__bar {
  height: 6px; border-radius: var(--radius-full); overflow: hidden;
  background: var(--color-surface-sunken);
}
.dl-progress__bar > span {
  display: block; height: 100%; background: var(--color-primary);
  transition: width var(--dur) var(--ease-out);
}
.dl-progress__text { margin: var(--space-1) 0 0; font-size: var(--text-xs); color: var(--text-muted); }
.dl-hint {
  flex: none; margin: 0 var(--space-8) var(--space-3);
  font-size: var(--text-sm); color: var(--text-secondary);
}
.dl-error {
  flex: none; margin: 0 var(--space-8) var(--space-3); padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm); background: var(--color-negative-bg);
  color: var(--color-negative); font-size: var(--text-sm);
}
@media (max-width: 640px) {
  .dl-modal__head { padding: var(--space-4) var(--space-12) var(--space-3) var(--space-4); }
  .dl-modal__body { padding: var(--space-3) var(--space-4); }
  .dl-modal__foot, .dl-progress { padding-left: var(--space-4); padding-right: var(--space-4); }
  .dl-fact__label { flex-basis: 110px; }
  .dl-trigger > span { display: none; }
}
