/* =============================================================
   勝さんのAIニュース 生成ログビュー
   melta-ui トークン準拠 / 和テイスト + プロフェッショナル
   ============================================================= */

:root {
  /* --- 3層カラー (Background → Surface → Object) --- */
  --bg-page: #f5ecd9;
  --bg-page-2: #faf3e4;
  --bg-surface: #fffdf7;
  --bg-elevated: #ffffff;

  /* --- ブランド (TANREN レッド) --- */
  --brand: #c5171e;
  --brand-ink: #8a0e14;
  --brand-tint: #f7d9da;

  /* --- テキスト --- */
  --text-strong: #1d1410;
  --text-body: #2d211b;
  --text-mute: #74655b;
  --text-faint: #a89a8d;
  --text-on-brand: #fff8ed;

  /* --- 境界 --- */
  --line: rgba(29, 20, 16, 0.10);
  --line-strong: rgba(29, 20, 16, 0.18);

  /* --- 状態色 --- */
  --status-posted: #2f7a47;
  --status-posted-bg: #d7ebd9;
  --status-ready: #b97a16;
  --status-ready-bg: #f3e1c2;
  --status-stopped: #b53b3b;
  --status-stopped-bg: #f0d4d4;
  --status-empty-bg: rgba(29, 20, 16, 0.04);

  /* --- スペーシング (4px grid) --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* --- 角丸 --- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* --- シャドウ --- */
  --shadow-sm: 0 2px 6px rgba(29, 20, 16, 0.06);
  --shadow-md: 0 8px 24px rgba(29, 20, 16, 0.08);
  --shadow-lg: 0 24px 64px rgba(29, 20, 16, 0.12);
  --shadow-brand: 0 12px 32px rgba(197, 23, 30, 0.18);

  /* --- フォント --- */
  --font-jp: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  --font-serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --font-num: "Cormorant Garamond", "Hiragino Mincho ProN", "Yu Mincho", serif;

  /* --- モーション --- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 0% -10%, rgba(197, 23, 30, 0.04), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, rgba(185, 122, 22, 0.06), transparent 55%),
    linear-gradient(180deg, var(--bg-page-2) 0%, var(--bg-page) 100%);
  background-attachment: fixed;
  color: var(--text-body);
  font-family: var(--font-jp);
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

button, input { font: inherit; }
a { color: var(--brand-ink); }

/* =============================================================
   レイアウトシェル
   ============================================================= */

.shell {
  width: min(1440px, calc(100vw - 48px));
  margin: 0 auto;
  padding: var(--space-10) 0 var(--space-12);
}

/* =============================================================
   Masthead
   ============================================================= */

.masthead {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-8);
  align-items: end;
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--text-strong);
}

h1 .brand-mark {
  color: var(--brand);
}

.range-card {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  min-width: 260px;
}

.range-card span {
  color: var(--text-mute);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.range-card strong {
  font-family: var(--font-num);
  font-size: 28px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.01em;
}

.range-card small {
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* =============================================================
   Stats KPI
   ============================================================= */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin: var(--space-6) 0;
}

.stat {
  padding: var(--space-4) var(--space-5);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.stat small {
  display: block;
  color: var(--text-mute);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: var(--space-1);
  color: var(--text-strong);
  font-family: var(--font-num);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0;
}

/* =============================================================
   View Switch
   ============================================================= */

.view-switch {
  display: inline-flex;
  gap: var(--space-1);
  margin: var(--space-2) 0 var(--space-6);
  padding: var(--space-1);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.view-switch button {
  border: 0;
  background: transparent;
  color: var(--text-mute);
  cursor: pointer;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}

.view-switch button:hover { color: var(--text-strong); }
.view-switch button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.view-switch button.active {
  background: var(--brand);
  color: var(--text-on-brand);
  box-shadow: var(--shadow-brand);
}

/* =============================================================
   Panel
   ============================================================= */

.panel { display: none; }
.panel.active { display: block; animation: fade-in 240ms var(--ease); }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: var(--space-6);
  margin-bottom: var(--space-5);
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: 0.02em;
}

.section-head p {
  margin: 0;
  color: var(--text-mute);
  font-size: 13px;
  font-weight: 600;
}

/* =============================================================
   CALENDAR: 1ヶ月フル幅ヒートマップ
   ============================================================= */

.calendars {
  display: grid;
  gap: var(--space-8);
}

.month {
  padding: var(--space-6) var(--space-6) var(--space-5);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.month h3 {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
  font-family: var(--font-num);
  font-size: 40px;
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: 0.02em;
}

.month h3 .month-meta {
  font-family: var(--font-jp);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.weekdays,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-2);
}

.weekdays {
  margin-bottom: var(--space-2);
  color: var(--text-mute);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
}

.weekdays span {
  padding: var(--space-1) 0;
}
.weekdays span:first-child { color: #b53b3b; }
.weekdays span:last-child  { color: #2f5ea8; }

.day-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--status-empty-bg);
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  overflow: hidden;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), border-color 160ms var(--ease);
}

.day-cell.empty {
  cursor: default;
  background: transparent;
  border-style: dashed;
  border-color: rgba(29, 20, 16, 0.06);
}

.day-cell.empty .day-num span { color: var(--text-faint); font-weight: 600; }

.day-cell.has-data:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}

.day-cell:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* 状態ヒートマップ */
.day-cell.status-posted  { background: var(--status-posted-bg);  border-color: rgba(47, 122, 71, 0.32); }
.day-cell.status-ready   { background: var(--status-ready-bg);   border-color: rgba(185, 122, 22, 0.32); }
.day-cell.status-stopped { background: var(--status-stopped-bg); border-color: rgba(181, 59, 59, 0.32); }

.day-num {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1);
}

.day-num span:first-child {
  font-family: var(--font-num);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1;
}

.day-cell .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.day-cell.status-posted  .status-dot { background: var(--status-posted); }
.day-cell.status-ready   .status-dot { background: var(--status-ready); }
.day-cell.status-stopped .status-dot { background: var(--status-stopped); }

.cell-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-mute);
  letter-spacing: 0.04em;
}

.cell-foot .cell-count {
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: 0;
}

/* 凡例 */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin: var(--space-4) 0 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mute);
}

.legend-swatch {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.legend-swatch.posted  { background: var(--status-posted-bg);  border-color: rgba(47, 122, 71, 0.32); }
.legend-swatch.ready   { background: var(--status-ready-bg);   border-color: rgba(185, 122, 22, 0.32); }
.legend-swatch.stopped { background: var(--status-stopped-bg); border-color: rgba(181, 59, 59, 0.32); }
.legend-swatch.empty   { background: var(--status-empty-bg); }

/* =============================================================
   TIMELINE: Hero画像一枚ドン型
   ============================================================= */

.timeline {
  display: grid;
  gap: var(--space-5);
}

.day-row {
  display: grid;
  grid-template-columns: 96px minmax(420px, 1.1fr) minmax(280px, 1fr);
  gap: var(--space-6);
  align-items: start;
  padding: var(--space-5) var(--space-6);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 200ms var(--ease), border-color 200ms var(--ease);
}

.day-row:hover {
  box-shadow: var(--shadow-md);
}

.day-row[data-status="stopped"] {
  border-left: 4px solid var(--status-stopped);
}
.day-row[data-status="posted"] {
  border-left: 4px solid var(--status-posted);
}
.day-row[data-status="ready"] {
  border-left: 4px solid var(--status-ready);
}

.date-block {
  display: grid;
  gap: var(--space-1);
  padding-top: var(--space-1);
}

.date-block .weekday {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-mute);
  letter-spacing: 0.06em;
}

.date-block .weekday.sun { color: var(--status-stopped); }
.date-block .weekday.sat { color: #2f5ea8; }

.date-block strong {
  font-family: var(--font-num);
  font-size: clamp(38px, 4vw, 52px);
  font-weight: 600;
  line-height: 1;
  color: var(--text-strong);
  letter-spacing: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
  padding: 4px var(--space-2);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  width: fit-content;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-pill.posted  { background: var(--status-posted-bg);  color: var(--status-posted); }
.status-pill.posted::before { background: var(--status-posted); }
.status-pill.ready   { background: var(--status-ready-bg);   color: var(--status-ready); }
.status-pill.ready::before  { background: var(--status-ready); }
.status-pill.stopped { background: var(--status-stopped-bg); color: var(--status-stopped); }
.status-pill.stopped::before{ background: var(--status-stopped); }

/* Hero 画像 */
.hero-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.hero-cover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-cover.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: default;
}

/* 右カラム（タイトル + TOP5） */
.row-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.row-main h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-strong);
  letter-spacing: 0.01em;
}

.topic-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.topic-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--space-2);
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.topic-list li:last-child { border-bottom: 0; }

.topic-list .topic-rank {
  font-family: var(--font-num);
  font-size: 16px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0;
}

.topic-list a {
  color: var(--text-body);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 160ms var(--ease);
}

.topic-list a:hover { color: var(--brand); }
.topic-list .topic-user {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mute);
  letter-spacing: 0.04em;
}

/* 詳細アコーディオン */
.row-extra {
  grid-column: 1 / -1;
  margin-top: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px dashed var(--line-strong);
}

.row-extra[hidden] { display: none; }

.slide-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.slide-strip a {
  display: block;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elevated);
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease);
}

.slide-strip a:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.slide-strip img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* アクション */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.actions a,
.actions button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text-strong);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}

.actions a:hover,
.actions button:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--text-on-brand);
}

.actions .primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--text-on-brand);
}

.actions .primary:hover {
  background: var(--brand-ink);
  border-color: var(--brand-ink);
}

/* =============================================================
   Dialog (詳細モーダル)
   ============================================================= */

dialog {
  width: min(1200px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  color: var(--text-body);
  box-shadow: var(--shadow-lg);
}

dialog::backdrop {
  background: rgba(29, 20, 16, 0.55);
  backdrop-filter: blur(4px);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--line);
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 1;
}

.dialog-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-strong);
}

.dialog-head .eyebrow { margin: 0 0 var(--space-1); }

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--text-strong);
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}

.icon-button:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--text-on-brand);
}

.dialog-body {
  padding: var(--space-6);
  overflow: auto;
  max-height: calc(100vh - 130px);
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  margin: 0 0 var(--space-6);
  padding: 0;
}

.detail-list div {
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.detail-list dt {
  color: var(--text-mute);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 4px 0 0;
  color: var(--text-strong);
  font-family: var(--font-num);
  font-size: 20px;
  font-weight: 600;
}

.expanded-article {
  display: grid;
  gap: var(--space-5);
}

.expanded-article > h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-strong);
}

.article-lead {
  margin: 0;
  color: var(--text-mute);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
}

.cover-hero {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.cover-hero:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.cover-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-hero-label {
  position: absolute;
  left: var(--space-3);
  bottom: var(--space-3);
  padding: 4px var(--space-3);
  background: var(--brand);
  color: var(--text-on-brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  border-radius: var(--radius-sm);
}

.article-slide {
  display: block;
  margin: 0 0 var(--space-4);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.article-slide:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.article-slide img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.slide-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.slide-card {
  display: block;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  color: var(--text-body);
  text-decoration: none;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.slide-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.slide-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-elevated);
}

.slide-card span {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-body);
}

.cover-card span {
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.article-item {
  padding: var(--space-5);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.article-item header {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.article-item h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-strong);
}

.article-subtitle {
  margin: 0;
  color: var(--text-mute);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}

.source-link {
  width: fit-content;
  padding: 6px var(--space-3);
  background: var(--bg-surface);
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}

.source-link:hover {
  background: var(--brand);
  color: var(--text-on-brand);
}

.article-section {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}

.article-section h3 {
  margin: 0 0 var(--space-2);
  color: var(--brand);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
}

.article-section p,
.article-section li,
.article-section blockquote {
  color: var(--text-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.75;
}

.article-section ul {
  margin: 0;
  padding-left: 1.2em;
}

.article-section p { margin: 0; }

.article-section blockquote {
  margin: var(--space-2) 0;
  padding: var(--space-3) var(--space-4);
  border-left: 3px solid var(--brand);
  background: var(--brand-tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-section blockquote .quote-original {
  margin: 0;
  color: var(--text-strong);
  font-style: italic;
  font-weight: 600;
}

/* 翻訳併記 */
.translation {
  margin: var(--space-2) 0 0;
  padding: var(--space-2) var(--space-3);
  background: rgba(255, 255, 255, 0.55);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
}

.translation::before {
  content: "和訳";
  display: inline-block;
  margin-right: var(--space-2);
  padding: 1px 6px;
  background: var(--brand);
  color: var(--text-on-brand);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  border-radius: 4px;
  vertical-align: middle;
}

.translation.translation-title {
  margin: var(--space-1) 0 0;
  padding: 0;
  background: transparent;
  border-left: 0;
  color: var(--text-body);
  font-family: var(--font-serif);
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 700;
  line-height: 1.35;
}

.translation.translation-title::before {
  content: "→";
  margin-right: var(--space-2);
  padding: 0;
  background: transparent;
  color: var(--brand);
  font-size: 16px;
  font-weight: 700;
}

.translation.translation-inline {
  display: block;
  margin-top: 2px;
  padding: 0 0 0 var(--space-3);
  background: transparent;
  border-left: 2px solid var(--line-strong);
  color: var(--text-mute);
  font-size: 12px;
  font-weight: 600;
}

.translation.translation-inline::before {
  content: "→ ";
  margin-right: 0;
  padding: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 700;
}

.article-lead.translation {
  font-size: 14px;
  margin-top: var(--space-2);
}

/* リンク化されたURL */
.article-section a,
.article-item a:not(.source-link):not(.article-slide),
.article-lead a {
  color: var(--brand-ink);
  text-decoration: underline;
  text-decoration-color: rgba(197, 23, 30, 0.4);
  text-underline-offset: 3px;
  word-break: break-all;
}

.article-section a:hover,
.article-item a:not(.source-link):not(.article-slide):hover,
.article-lead a:hover {
  color: var(--brand);
  text-decoration-color: var(--brand);
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: #1d1410;
  color: #f5ecd9;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.6;
}

/* =============================================================
   レスポンシブ
   ============================================================= */

@media (max-width: 1080px) {
  .day-row {
    grid-template-columns: 88px 1fr;
  }
  .row-main { grid-column: 1 / -1; }
  .slide-gallery { grid-template-columns: repeat(2, 1fr); }
  .detail-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  .shell {
    width: min(100vw - 24px, 1440px);
    padding: var(--space-6) 0 var(--space-10);
  }

  .masthead {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .day-row {
    grid-template-columns: 1fr;
    padding: var(--space-4);
  }

  .date-block {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
  }
  .date-block strong { font-size: 32px; }

  .slide-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .month {
    padding: var(--space-4);
  }

  .weekdays, .month-grid {
    gap: var(--space-1);
  }

  .day-cell {
    padding: 6px;
    aspect-ratio: 1 / 1.05;
  }

  .day-num span:first-child {
    font-size: 18px;
  }

  .cell-foot { display: none; }

  .slide-gallery, .detail-list {
    grid-template-columns: 1fr;
  }

  .dialog-body { padding: var(--space-4); }
  .dialog-head { padding: var(--space-4); }
}
