/* ========== ローカル変数定義（base.cssのトークンを参照） ========== */
.swx-flow {
  --flow-primary: var(--swx-c-brand);
  --flow-primary-weak: var(--swx-c-brand-weak);
  --flow-surface: var(--swx-c-surface);
  --flow-on-primary: var(--swx-c-ink-on-brand);
  --flow-on-surface: var(--swx-c-text);
  --flow-muted: var(--swx-c-muted);
  --flow-border: color-mix(in oklab, var(--swx-c-surface) 65%, var(--swx-c-text));
  --flow-shadow-1: 0 1px 3px rgba(15, 23, 42, 0.12), 0 1px 2px rgba(15, 23, 42, 0.08);
  --flow-shadow-3: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
}

/* ========== カード（マテリアルデザイン風） ========== */
.swx-flow__item > .swx-flow__card,
.swx-flow__item > a.swx-flow__card,
.swx-flow__item > button.swx-flow__card,
.swx-flow__item > *:where(a, button, div) {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: 'time body';
  align-items: start;
  gap: 14px 16px;
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--flow-surface);
  border: 1px solid var(--flow-border);
  box-shadow: var(--flow-shadow-1);
  transition: box-shadow 180ms ease-out, transform 180ms ease-out, background-color 180ms ease-out, border-color 180ms ease-out;
  text-align: left;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  color: inherit;
}

/* ホバーで"浮く"（Material level 3相当） */
.swx-flow__item > *:hover {
  transform: translateY(-1px);
  box-shadow: var(--flow-shadow-3);
  background-color: color-mix(in oklab, var(--flow-surface) 90%, var(--flow-primary-weak) 10%);
  border-color: color-mix(in oklab, var(--flow-border) 80%, var(--flow-primary) 20%);
}

/* フォーカス時も同様に浮く */
.swx-flow__item > *:focus {
  transform: translateY(-1px);
  box-shadow: var(--flow-shadow-3);
}

/* クリック時の沈み込み */
.swx-flow__item > *:active {
  transform: translateY(0);
  box-shadow: var(--flow-shadow-1);
}

/* キーボードフォーカスの視認性（ブランドカラー準拠） */
.swx-flow__item > *:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--flow-surface),
    0 0 0 4px color-mix(in oklab, var(--flow-primary) 50%, transparent);
}

/* 時刻チップ（Assist chip風） */
.swx-flow__time {
  grid-area: time;
  font: 700 clamp(12px, 0.875rem, 14px) / 1.2 var(--font-sans, system-ui, -apple-system, 'Noto Sans JP');
  background: var(--flow-primary-weak);
  color: var(--flow-on-surface);
  border: 1px solid color-mix(in oklab, var(--flow-primary) 40%, transparent);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
  align-self: start;
}

/* 本文エリア */
.swx-flow__body {
  grid-area: body;
  display: grid;
  gap: 6px;
}

/* タイトル（Material title-medium相当） */
.swx-flow__title {
  font-weight: 700;
  font-size: clamp(16px, 1.125rem, 18px);
  line-height: 1.4;
  color: var(--flow-on-surface);
}

/* 説明文 */
.swx-flow__text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--flow-muted);
}

/* 画像：初期は非表示 → hover/focusでふわっと表示 */
.swx-flow__media {
  display: none;
  margin-top: 8px;
}
.swx-flow__media img {
  width: 180px;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}
.swx-flow__item > *:hover .swx-flow__media,
.swx-flow__item > *:focus-visible .swx-flow__media {
  display: block;
  animation: swxFade 0.18s ease-out both;
}
@keyframes swxFade {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* タイムライン：左の縦線（マテリアル風） */
.swx-flow {
  position: relative;
  padding-left: 48px; /* タイムライン用の余白 */
}

/* 縦線 */
.swx-flow::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--flow-primary-weak);
  border-radius: 2px;
  z-index: 0;
}

/* 各ステップのドット（ピン風） */
.swx-flow__item {
  position: relative;
  margin: 14px 0;
}

.swx-flow__item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--flow-primary);
  background: var(--flow-surface);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.1);
  z-index: 1;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .swx-flow__item > * {
    grid-template-columns: 1fr;
    grid-template-areas:
      'time'
      'body';
    padding: 14px 16px;
    gap: 10px;
  }

  .swx-flow {
    padding-left: 36px;
  }

  .swx-flow::before {
    left: 12px;
    width: 3px;
  }

  .swx-flow__item::before {
    left: -24px;
    top: 16px;
    width: 10px;
    height: 10px;
  }
}

/* ===== Hero: 1日の流れ ===== */
.swx-hero.-flow{
  position: relative;
  min-height: clamp(220px, 45vh, 420px);
  overflow: clip;
  display: grid;
}
.swx-hero.-flow .hero-bg{ position:absolute; inset:0; }
.swx-hero.-flow .hero-bg img{
  width:100%; height:100%; display:block;
  object-fit:cover; object-position:center 35%;
}
.swx-hero.-flow .overlay{
  position:absolute; inset:0;
  background: linear-gradient(
    to bottom,
    color-mix(in oklab, #000 0%, transparent) 20%,
    color-mix(in oklab, #000 30%, transparent) 70%,
    color-mix(in oklab, #000 45%, transparent) 100%
  );
  pointer-events:none;
}
.swx-hero.-flow .hero-inner{
  position:relative; z-index:1; align-self:end;
  width:min(1100px,90%); margin:0 auto clamp(18px,4vw,28px);
  color:#fff; text-shadow:0 2px 16px rgba(0,0,0,.35);
}
.swx-hero.-flow .hero-title{
  font-size:clamp(24px,4vw,40px); font-weight:800;
  color:#fff; letter-spacing:.02em; margin:0 0 .3em;
}
.swx-hero.-flow .hero-sub{ margin:0; font-size:clamp(14px,1.6vw,16px); opacity:.95; }
