/* ============================================
   ★ 技術解説：色の書き方で補間色空間が自動で切り替わる
   どちらの行も `in <色空間>` を一切書いていない。
   - legacy 形式（named color / hex / rgb()）→ 補間は sRGB（Web 互換のため例外）
   - modern 形式（color() / oklch() / oklab() 等）→ 補間は Oklab（CSS Color L4 の既定）
   同じ色値でも書き方を変えるだけで結果が変わる。
   ============================================ */

/* ========== blue → red ========== */
.bar--blue-red-legacy {
  background: linear-gradient(90deg, blue, red);
}

.bar--blue-red-color {
  background: linear-gradient(
    90deg,
    color(srgb 0 0 1),
    color(srgb 1 0 0)
  );
}

/* ========== green → magenta ========== */
.bar--green-magenta-legacy {
  background: linear-gradient(90deg, #00ff00, #ff00ff);
}

.bar--green-magenta-color {
  background: linear-gradient(
    90deg,
    color(srgb 0 1 0),
    color(srgb 1 0 1)
  );
}

/* ========== yellow → blue ========== */
.bar--yellow-blue-legacy {
  background: linear-gradient(90deg, yellow, blue);
}

.bar--yellow-blue-color {
  background: linear-gradient(
    90deg,
    color(srgb 1 1 0),
    color(srgb 0 0 1)
  );
}

/* ========== red → cyan ========== */
.bar--red-cyan-legacy {
  background: linear-gradient(90deg, red, cyan);
}

.bar--red-cyan-color {
  background: linear-gradient(
    90deg,
    color(srgb 1 0 0),
    color(srgb 0 1 1)
  );
}

/* ========== 装飾スタイル ========== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: light;

  --text-primary: oklch(0.267 0.029 256);
  --text-secondary: oklch(0.406 0.013 255);
  --text-tertiary: oklch(0.461 0.014 254);
  --bg-primary: oklch(0.954 0.008 240);

  --glass-card-bg: rgba(255, 255, 255, 0.5);
  --glass-card-border: rgba(255, 255, 255, 0.7);

  --shadow-rest: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-elevated:
    0 10px 30px -5px rgba(0, 0, 0, 0.1), 0 4px 8px -2px rgba(0, 0, 0, 0.04);
  --inner-highlight:
    inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(0, 0, 0, 0.05);

  --focus-ring: oklch(0.15 0 0);
  --ease-liquid: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family:
    "Noto Sans JP", "Inter", "Hiragino Kaku Gothic ProN", "游ゴシック Medium",
    YuGothic, Meiryo, system-ui, sans-serif;
  min-height: 100vh;
  padding: 28px 24px 48px;
  color: var(--text-primary);
  line-height: 1.6;

  background:
    radial-gradient(
      circle at 20% 20%,
      oklch(0.95 0.035 240 / 0.6),
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 10%,
      oklch(0.787 0.158 79 / 0.14),
      transparent 50%
    ),
    radial-gradient(
      circle at 90% 80%,
      oklch(0.95 0.055 160 / 0.3),
      transparent 50%
    ),
    radial-gradient(
      circle at 10% 90%,
      oklch(0.93 0.04 290 / 0.3),
      transparent 50%
    ),
    var(--bg-primary);
  background-attachment: fixed;
}

.header {
  max-width: 1100px;
  margin: 0 auto 28px;
  text-align: center;
}

.header h1 {
  font-family: "Inter", "Noto Sans JP", system-ui, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--text-primary);
  text-wrap: balance;
}

.header code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.92em;
}

.lead {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 720px;
  margin: 0 auto;
  text-wrap: pretty;
}

.lead code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.92em;
}

.stage {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.pair {
  padding: 24px;
  border-radius: 28px;
  background: var(--glass-card-bg);
  border: 1px solid var(--glass-card-border);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-rest), var(--inner-highlight);
}

.pair-title {
  font-family: "Inter", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.row {
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: center;
  gap: 16px;
}

.row + .row {
  margin-top: 12px;
}

.row-label {
  font-family: "Inter", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.row-sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: none;
  letter-spacing: 0;
}

.bar {
  height: 56px;
  border-radius: 16px;
  overflow: hidden;
}

.bar-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-caption {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  letter-spacing: 0.02em;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
