:root {
  /* light theme: paper-white + deep navy ink */
  --bg-0: #fafbfc;
  --bg-1: #f3f5f8;
  --bg-2: #e7eaf1;
  --surface: #ffffff;

  --ink-0: #101428;
  --ink-1: #2c3447;
  --ink-2: #5b6480;
  --line: rgba(16, 20, 40, 0.08);
  --line-strong: rgba(16, 20, 40, 0.14);

  /* 装飾用 (chip / dot / 1px line) と テキスト用 (AA 通過) を分離 */
  --c-success: #0fa97d;
  --c-success-text: #0a8a64;
  --c-success-glow: rgba(15, 169, 125, 0.32);
  --c-failure: #d63b3b;
  --c-failure-text: #b22222;
  --c-failure-glow: rgba(214, 59, 59, 0.32);
  --c-new: #c98700;
  --c-new-text: #8c5e00;
  --c-new-glow: rgba(201, 135, 0, 0.32);
  --c-pending: #d97a1c;
  --c-pending-text: #9c5610;
  --c-pending-glow: rgba(217, 122, 28, 0.32);
  --c-cancel: #6e7689;
  --c-cancel-text: #4f5666;
  --c-cancel-glow: rgba(110, 118, 137, 0.28);

  /* 二段ドロップシャドウ — Linear / Stripe / Vercel が使う「紙の浮き」 */
  --shadow-sm: 0 1px 2px rgba(16, 20, 40, 0.04), 0 1px 3px rgba(16, 20, 40, 0.06);
  --shadow-md: 0 1px 2px rgba(16, 20, 40, 0.04), 0 4px 12px rgba(16, 20, 40, 0.06);
  --shadow-lg: 0 1px 2px rgba(16, 20, 40, 0.04), 0 12px 32px -16px rgba(16, 20, 40, 0.18);

  --mono: "JetBrains Mono", "Menlo", ui-monospace, monospace;
  --sans: -apple-system, "Helvetica Neue", "Hiragino Sans", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-0);
  color: var(--ink-0);
  font-family: var(--sans);
  overflow: hidden;
}

#bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.4;
}

.flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 5;
  background: radial-gradient(ellipse at center, var(--flash-color, transparent) 0%, transparent 60%);
  transition: opacity 0.6s ease-out;
}

.flash.is-firing {
  opacity: 0.18;
  transition: opacity 80ms ease-out;
}

/* replay / live control (intentionally plain) */
.controls {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.replay {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.replay__label { color: var(--ink-2); }

.replay__status {
  color: var(--ink-1);
  min-width: 92px;
  text-align: center;
  margin-right: 4px;
}

.replay__status.is-running {
  color: var(--c-success-text);
}

.replay__status.is-live {
  color: var(--c-failure-text);
  letter-spacing: 0.12em;
  font-weight: 700;
}

.replay__date {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink-1);
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 6px;
  color-scheme: light;
  box-shadow: var(--shadow-sm);
}

.replay button.is-live-btn {
  border-color: rgba(214, 59, 59, 0.4);
  color: var(--c-failure-text);
}

.replay button.is-live-btn.is-active {
  background: rgba(214, 59, 59, 0.10);
  border-color: rgba(214, 59, 59, 0.55);
  color: var(--c-failure-text);
  box-shadow: 0 0 0 3px rgba(214, 59, 59, 0.12);
}

.replay button {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink-1);
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.06em;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.replay button:hover {
  background: var(--bg-1);
  color: var(--ink-0);
  border-color: rgba(16, 20, 40, 0.22);
}

.replay button.is-active {
  background: rgba(15, 169, 125, 0.10);
  border-color: rgba(15, 169, 125, 0.45);
  color: var(--c-success-text);
}

.seek-wrap {
  position: relative;
  flex: 0 0 220px;
  height: 16px;
  margin-left: 8px;
  display: flex;
  align-items: center;
}

.seek__track,
.seek__buffered,
.seek__progress {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 3px;
  border-radius: 2px;
  pointer-events: none;
}

.seek__track {
  width: 100%;
  background: rgba(16, 20, 40, 0.10);
}

.seek__buffered {
  width: 0;
  background: rgba(16, 20, 40, 0.22);
}

.seek__progress {
  width: 0;
  background: var(--c-success);
}

.replay__seek {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 16px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  accent-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.replay__seek::-webkit-slider-runnable-track {
  height: 3px;
  background: transparent;
  border-radius: 2px;
}

.replay__seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-success);
  box-shadow: 0 0 0 3px rgba(15, 169, 125, 0.18), var(--shadow-sm);
  margin-top: -4.5px;
  border: none;
  cursor: pointer;
}

.replay__seek::-moz-range-track {
  height: 3px;
  background: transparent;
  border-radius: 2px;
}

.replay__seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-success);
  box-shadow: 0 0 0 3px rgba(15, 169, 125, 0.18), var(--shadow-sm);
  border: none;
  cursor: pointer;
}

.seek__tooltip {
  position: absolute;
  bottom: 22px;
  transform: translateX(-50%);
  background: var(--ink-0);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid var(--ink-0);
  white-space: nowrap;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.1s ease;
  box-shadow: var(--shadow-md);
}

.seek__tooltip.is-hidden {
  opacity: 0;
}

/* top */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 42px 10px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.brand__mark {
  width: 10px;
  height: 10px;
  background: var(--c-success);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(15, 169, 125, 0.16);
  animation: breathe 3.4s ease-in-out infinite;
}

.brand__title {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: 22px;
  color: var(--ink-0);
}

.brand__sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-2);
  transition: background 0.3s, box-shadow 0.3s;
}

.status.is-online .status__dot {
  background: var(--c-success);
  box-shadow: 0 0 0 4px rgba(15, 169, 125, 0.16);
}

.status.is-offline .status__dot {
  background: var(--c-failure);
  box-shadow: 0 0 0 4px rgba(214, 59, 59, 0.16);
}

/* grid */
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  grid-template-rows: minmax(0, 1fr) 190px;
  gap: 20px;
  padding: 12px 42px 44px;
  height: calc(100% - 92px);
  min-height: 0;
}

.board { grid-column: 1; grid-row: 1; }
.side { grid-column: 2; grid-row: 1; }
.chart { grid-column: 1 / -1; grid-row: 2; }

/* board (left, main) */
.board {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  /* 中身の白いカード行を引き立てるため、ボード自体は微グレーで「テーブルクロス」役 */
  background: var(--bg-1);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
}

.board__header {
  background: var(--surface);
}

.board__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px 26px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.board__title {
  font-size: 12px;
  color: var(--ink-0);
  font-weight: 600;
}

.board__hint {
  font-size: 11px;
  color: var(--ink-2);
}

.board__hint #uniqueCount {
  color: var(--c-success-text);
  font-weight: 600;
}

.board__sort {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink-1);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  padding: 1px 6px 1px 4px;
  margin-left: 2px;
  border-radius: 5px;
  cursor: pointer;
  text-transform: lowercase;
  color-scheme: light;
}

.board__sort:hover {
  border-color: rgba(16, 20, 40, 0.22);
  color: var(--ink-0);
}

.roster {
  list-style: none;
  margin: 0;
  padding: 12px 18px 22px;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
}

.roster::-webkit-scrollbar { width: 6px; }
.roster::-webkit-scrollbar-thumb { background: rgba(16, 20, 40, 0.18); border-radius: 3px; }
.roster::-webkit-scrollbar-thumb:hover { background: rgba(16, 20, 40, 0.32); }

.roster__empty {
  position: absolute;
  inset: 56px 0 0 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.roster__empty.is-hidden {
  opacity: 0;
}

/* roster row */
.row {
  display: grid;
  /* count | info (fix, ellipsis) | dots (fix, 多ければ wrap) | spark (残り 1fr) | time
     dots を固定幅にすることで spark の横幅が dot 数に応じて動かない */
  grid-template-columns: 84px 280px 136px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  margin: 6px 0;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
}

.row.has-pending {
  border-color: rgba(217, 122, 28, 0.32);
  box-shadow: inset 3px 0 0 var(--c-pending);
}

.row__dots {
  display: flex;
  align-items: center;
  align-content: center;
  gap: 4px 4px;
  width: 136px;
  /* halo (box-shadow の外輪) が container 端で切れないよう四方に逃げ場を確保。
     overflow: visible にして dot--big の halo がはみ出ても表示する */
  padding: 6px;
  flex-wrap: wrap;
  overflow: visible;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 9px;
  background: var(--c-pending);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 3px rgba(217, 122, 28, 0.45);
  transition: background 0.35s ease, box-shadow 0.35s ease, opacity 0.5s ease, transform 0.5s ease;
}

.dot.is-processed {
  background: var(--c-success);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 3px rgba(15, 169, 125, 0.45);
}

.dot.is-failed {
  background: var(--c-failure);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 3px rgba(214, 59, 59, 0.45);
}

.dot.is-cancelled {
  background: var(--c-cancel);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 3px rgba(110, 118, 137, 0.4);
}

.dot.dot--big {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 1px solid rgba(16, 20, 40, 0.10);
}

.dot.is-leaving {
  opacity: 0;
  transform: scale(0.4);
}

.row__spark {
  display: flex;
  align-items: flex-end;
  gap: 1px;
  height: 60px;
  min-width: 0;
  overflow: hidden;
  opacity: 1;
  filter: saturate(1.08);
}

.row__spark .spark__bar {
  flex: 1 1 0;
  min-width: 0;
  height: 0%;
  display: flex;
  flex-direction: column-reverse; /* DOM 先頭が下 */
  overflow: hidden;
  border-radius: 2px 2px 0 0;
  transition: height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.row__spark .spark__seg {
  width: 100%;
  flex-grow: 0;
  flex-shrink: 0;
  flex-basis: 0%;
  min-height: 0;
  transition: flex-basis 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.row__spark .spark__seg--processed { background: var(--c-success); }
.row__spark .spark__seg--pending   { background: var(--c-pending); }
.row__spark .spark__seg--failed    { background: var(--c-failure); }
.row__spark .spark__seg--cancelled { background: var(--c-cancel); }

.row.is-pulsing {
  background: rgba(15, 169, 125, 0.08);
  border-color: rgba(15, 169, 125, 0.45);
  box-shadow: var(--shadow-sm), 0 0 0 3px rgba(15, 169, 125, 0.10);
}

.row.is-entering {
  animation: rowEnter 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.row.is-new {
  background: linear-gradient(90deg, rgba(201, 135, 0, 0.10), var(--surface) 45%);
  border-color: rgba(201, 135, 0, 0.30);
  box-shadow: inset 3px 0 0 var(--c-new), var(--shadow-sm);
}

.row__count {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-0);
  line-height: 1;
  text-align: right;
  /* 4 桁 (9999) まで折り返さずに見える幅。等幅 32px の数字幅 ≒ 19px × 4 + 余白 */
  min-width: 84px;
  flex: 0 0 auto;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease;
}

.row__count.is-bumping {
  transform: scale(1.28) translateY(-1px);
  color: var(--c-success-text);
}

.row__info {
  min-width: 0;
}

.row__name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-family: var(--sans);
  font-size: 17px;
  color: var(--ink-0);
  font-weight: 500;
}

.row__name-text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row__color-chip {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(16, 20, 40, 0.12);
}

/* NEW バッジは出さない (左の 3px アクセント帯と is-new の背景で十分主張する) */
.row__badge {
  display: none;
}

.row__sub {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row__sub em {
  font-style: normal;
  color: var(--ink-1);
  font-weight: 600;
}

.row__time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.05em;
  text-align: right;
  white-space: nowrap;
}

/* side (right column) */
.side {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 20px;
  min-height: 0;
}

.card {
  position: relative;
  padding: 24px 26px 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--card-accent, var(--ink-2));
  opacity: 0.85;
}

.card--success { --card-accent: var(--c-success); --card-glow: var(--c-success-glow); }
.card--failure { --card-accent: var(--c-failure); --card-glow: var(--c-failure-glow); }

.card.is-firing {
  transform: scale(1.012);
  box-shadow: 0 0 0 1px var(--card-accent), var(--shadow-lg);
}

.card__label {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.22em;
  color: var(--card-accent, var(--ink-2));
  text-transform: uppercase;
  font-weight: 700;
}

.card__value {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 72px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink-0);
  font-variant-numeric: tabular-nums;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.card--compact .card__value {
  font-size: 54px;
}

.card__value.is-bumping {
  transform: translateY(-3px);
}

.card__meta {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  text-transform: uppercase;
}

.card__pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 1px;
  border-radius: 50%;
  border: 1px solid var(--card-accent);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.card.is-firing .card__pulse {
  animation: pulseRing 1.1s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}

/* stream card */
.card--stream {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: 14px;
}

.feed {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
}

.feed::-webkit-scrollbar { width: 6px; }
.feed::-webkit-scrollbar-thumb { background: rgba(16, 20, 40, 0.18); border-radius: 3px; }
.feed::-webkit-scrollbar-thumb:hover { background: rgba(16, 20, 40, 0.32); }

.feed__item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 6px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-1);
  animation: slideIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.feed__item[data-kind="received"]  { --row-accent: var(--c-pending); }
.feed__item[data-kind="processed"] { --row-accent: var(--c-success); }
.feed__item[data-kind="failed"]    { --row-accent: var(--c-failure); }
.feed__item[data-kind="cancelled"] { --row-accent: var(--c-cancel); }

.feed__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--row-accent);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 3px var(--row-accent);
}

.feed__body {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--ink-1);
}

.feed__body em {
  font-style: normal;
  color: var(--ink-0);
  font-weight: 600;
}

.feed__time {
  color: var(--ink-2);
  text-align: right;
  font-size: 11px;
}

.feed__item.is-fading {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* chart */
.chart {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
}

.chart::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--c-success);
  opacity: 0.55;
}

.chart__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.chart__title {
  color: var(--ink-0);
  font-weight: 600;
}

.chart__legend {
  display: flex;
  gap: 18px;
  color: var(--ink-2);
  align-items: center;
}

.chart__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart__swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.chart__swatch--success { background: var(--c-success); }
.chart__swatch--failure { background: var(--c-failure); }

.chart__max em { font-style: normal; color: var(--ink-0); margin-left: 4px; font-weight: 600; }

.chart__viewport {
  flex: 1;
  padding: 14px 18px 30px;
  overflow: hidden;
  position: relative;
  min-height: 0;
}

.chart__bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 100%;
  width: max-content;
  will-change: transform;
  transform: translateX(0);
}

.chart__bar {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  min-width: 0;
  /* JS が flex-basis を pixel で設定する */
}

.chart__bar .seg-stack {
  width: 100%;
  height: 0%;
  display: flex;
  flex-direction: column-reverse; /* DOM 順の先頭を下に積む */
  overflow: hidden;
  transition: height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.chart__bar .seg-stack > .seg-company {
  width: 100%;
  flex-basis: 0%;
  flex-grow: 0;
  flex-shrink: 0;
  min-height: 0;
  transition: flex-basis 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  /* セグメント境界をうっすら可視化 (薄い白線で会社単位の段差を出す) */
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.5);
}

.chart__bar > .seg-stack {
  border-radius: 2px 2px 0 0;
}

.chart__bar .seg--failure {
  width: 100%;
  height: 0%;
  background: var(--c-failure);
  border-radius: 2px 2px 0 0;
  transition: height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.chart__bar.is-current .seg-stack,
.chart__bar.is-current .seg--failure {
  filter: brightness(0.92) saturate(1.08);
}

.chart__now {
  color: var(--ink-2);
}

.chart__now em {
  font-style: normal;
  color: var(--ink-0);
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.chart__bar-label {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-2);
  letter-spacing: 0.03em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  font-variant-numeric: tabular-nums;
}

.chart__bar::after {
  /* 全バーに薄い 10 分刻み tick */
  content: "";
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 1px;
  height: 3px;
  background: rgba(16, 20, 40, 0.10);
  transform: translateX(-50%);
}

.chart__bar.has-label .chart__bar-label {
  opacity: 1;
}

.chart__bar.has-label::after {
  /* 毎正時 tick は強調 */
  height: 6px;
  background: rgba(16, 20, 40, 0.32);
}

.chart__bar.is-current::before {
  content: "";
  position: absolute;
  inset: -4px -1px 0 -1px;
  border-radius: 4px;
  border: 1px solid rgba(16, 20, 40, 0.18);
  pointer-events: none;
}

.chart__bar.is-pop .seg--success {
  animation: segPop 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.chart__bar.is-pop .seg--failure {
  animation: segPop 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes segPop {
  0% { filter: brightness(0.85) saturate(1.25); }
  100% { filter: brightness(1); }
}

/* foot */
.foot {
  position: fixed;
  bottom: 12px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.foot__sep { margin: 0 10px; opacity: 0.5; }

/* keyframes */
@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes pulseRing {
  0% { width: 1px; height: 1px; opacity: 0.6; border-width: 2px; }
  100% { width: 520px; height: 520px; opacity: 0; border-width: 1px; }
}

@keyframes slideIn {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes rowEnter {
  0% { opacity: 0; transform: translateY(-14px) scale(0.99); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
