/* 有明海再生研究会 新規サイト
   レイアウトの考え方: 海の写真と「記録の帯（日ごとの記録の有無）」を背骨にした、野帳のような縦の流れ。
   カードを並べない。罫線と余白と数字の組版で区切る。スマホ375pxが基準。 */
:root {
  --paper: #FFFFFF;
  --paper-2: #EEF5FB;
  --ink: #102A43;
  --ink-2: #3E5568;
  --ink-3: #5F7487;
  --rule: #D5E2EC;
  --sea: #1565C0;
  --sea-soft: #E3EFFB;
  --mud: #7A5F44;        /* 干潟の泥 */
  --mud-soft: #ECE4DA;
  --gold: #9E7420;       /* 「最新」の印だけに使う */
  --missing: #BFCCD6;
  --on-photo: #FFFFFF;

  --f-display: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --f-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --f-num: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: clamp(2.1rem, 7.4vw, 3.6rem);
  --gutter: 18px;
  --measure: 36em;
  --wide: 1180px;
}
/* white-and-blue: 携帯がダークモードでも白と青で出す */
:root { color-scheme: light; }


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: var(--step-0); line-height: 1.8;
  font-feature-settings: "palt" 0;
}
img { max-width: 100%; display: block; }
a { color: var(--sea); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.35; text-wrap: balance; word-break: auto-phrase; margin: 0; }
p { margin: 0; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.wrap { padding-inline: var(--gutter); max-width: var(--wide); margin-inline: auto; }
.measure { max-width: var(--measure); }
.label { font-size: var(--step--1); letter-spacing: 0.08em; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.small { font-size: var(--step--1); line-height: 1.7; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 1rem); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- ヘッダー ---------- */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1.5px solid var(--rule);
}
.site-head .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.mark { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); min-width: 0; }
.mark b { font-family: var(--f-display); font-size: 1.02rem; font-weight: 600; white-space: nowrap; }
.mark span { font-size: 0.72rem; color: var(--ink-3); white-space: nowrap; }
/* ハンバーガー（全画面幅で上に固定） */
.burger { width: 44px; height: 44px; margin-right: -8px; border: 0; background: none; cursor: pointer; display: grid; place-content: center; gap: 5px; color: var(--ink); }
.burger i { display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.drawer[hidden] { display: none; }
.drawer { position: fixed; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 53px); bottom: 0; z-index: 30; background: color-mix(in srgb, var(--ink) 35%, transparent); }
.drawer-in { background: var(--paper); max-height: 100%; overflow-y: auto; overscroll-behavior: contain; padding-block: 8px 20px; border-bottom: 1.5px solid var(--rule); box-shadow: 0 12px 30px rgba(0,0,0,.15); }
.drawer-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 14px; margin: 0; }
.drawer-top a { color: var(--ink); text-decoration: none; font-size: 0.92rem; }
.drawer-top a.today { background: var(--ink); color: var(--paper); padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 0.9rem; }
.dg { padding: 12px 0; border-top: 1.5px solid var(--rule); display: grid; gap: 8px; }
.dg-name { font-weight: 700; font-size: 0.86rem; color: var(--ink-2); margin: 0; }
.dg-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.dg-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--rule); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 0.9rem; }
.dg-links a[aria-current="page"], .drawer-top a[aria-current="page"]:not(.today) { border-color: var(--sea); color: var(--sea); font-weight: 700; }
.drawer-foot { margin: 0; padding-top: 12px; border-top: 1.5px solid var(--rule); font-size: 0.8rem; }
.drawer-foot a { color: var(--ink-3); }
html.menu-open, html.menu-open body { overflow: hidden; }
@media (min-width: 900px) {
  .site-head .bar { min-height: 60px; }
  .drawer { top: calc(env(safe-area-inset-top, 0px) + 61px); }
  .drawer-in { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; padding-block: 12px 24px; align-items: start; }
  .drawer-top, .drawer-foot { grid-column: 1 / -1; }
}

/* ---------- セクション共通 ---------- */
.sec { padding-block: 56px; border-top: 1.5px solid var(--rule); }
.sec-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.sec-head h2 { font-size: var(--step-3); }
.sec-head p { color: var(--ink-2); max-width: var(--measure); }
.kicker { font-size: var(--step--1); letter-spacing: 0.14em; color: var(--sea); font-weight: 700; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; padding: 10px 0; border-bottom: 1px solid currentColor; }
.more::after { content: "→"; }
.page-title { padding-block: 40px 28px; display: flex; flex-direction: column; gap: 12px; }
.page-title h1 { font-size: var(--step-4); letter-spacing: 0.02em; }
.page-title p { color: var(--ink-2); max-width: var(--measure); }

/* ---------- ヒーロー（TOP） ---------- */
.hero { position: relative; color: #F3F7F9; background: #18303C; }
.hero-photo { position: relative; aspect-ratio: 4 / 3; width: 100%; overflow: hidden; margin: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo .credit { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px var(--gutter) 6px; margin: 0; background: linear-gradient(transparent, rgba(8,20,26,.6)); }
.hero-copy { padding: 22px var(--gutter) 28px; display: flex; flex-direction: column; gap: 14px; }
.hero-copy .kicker { color: #9FD0EA; letter-spacing: .08em; }
.hero-copy h1 { font-size: clamp(1.85rem, 8.4vw, 3.4rem); line-height: 1.32; letter-spacing: 0.02em; }
.hero-copy h1 span { display: inline-block; }
.hero-copy p { font-size: 0.97rem; line-height: 1.9; max-width: 30em; color: #D5E2E8; }
.credit { font-size: 0.68rem; color: rgba(255,255,255,.85); }
.credit-dark { font-size: 0.7rem; color: var(--ink-3); }
.ref-tag { display: inline-block; font-size: 0.66rem; padding: 0 7px; border: 1px solid currentColor; border-radius: 999px; letter-spacing: .06em; margin-right: 4px; }
@media (min-width: 900px) {
  .hero { display: grid; grid-template-columns: 1.4fr 1fr; }
  .hero-photo { aspect-ratio: auto; height: min(74vh, 680px); }
  .hero-copy { padding: 48px 44px; justify-content: flex-end; gap: 20px; }
}

/* ---------- 最新の記録（数字の行） ---------- */
.latest { background: var(--ink); color: var(--paper); }
.latest .wrap { padding-block: 18px; display: flex; flex-direction: column; gap: 10px; }
.latest-when { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 0.86rem; }
.latest-when b { font-weight: 700; }
.latest-age { color: var(--gold); font-weight: 700; }
.latest-vals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid color-mix(in srgb, var(--paper) 22%, transparent); }
.latest-vals div { padding: 10px 0 2px; display: flex; flex-direction: column; }
.latest-vals dt { font-size: 0.72rem; opacity: .75; letter-spacing: .06em; }
.latest-vals dd { margin: 0; font-family: var(--f-num); font-size: 1.45rem; line-height: 1.3; }
.latest-vals dd small { font-size: 0.75rem; margin-left: 2px; opacity: .8; }
.latest a { color: var(--paper); }
@media (min-width: 900px) {
  .latest .wrap { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; }
  .latest-vals { border: 0; grid-template-columns: repeat(3, 8.5em); }
}

/* ---------- 記録の帯 ---------- */
.strip-wrap { overflow-x: auto; scrollbar-width: thin; padding-bottom: 6px; }
.strip { display: flex; align-items: flex-end; gap: 2px; min-width: max-content; padding-top: 18px; position: relative; }
.strip .day { width: 9px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; position: relative; }
.strip .bar { width: 100%; height: 34px; border-radius: 2px; background: var(--paper-2); border: 1px dashed var(--missing); }
.strip .day.has .bar { background: var(--sea); border: 0; }
.strip .day.has.multi .bar { background: linear-gradient(var(--sea) 0 0) bottom/100% 100% no-repeat; box-shadow: inset 0 3px 0 var(--paper); }
.strip .day.latest .bar { background: var(--gold); }
.strip .day.today .bar { border: 1px solid var(--ink-3); background: transparent; }
.strip .m { position: absolute; top: -18px; left: 0; font-size: 0.68rem; color: var(--ink-3); white-space: nowrap; }
.strip .day[aria-current="true"] .bar { outline: 2px solid var(--ink); outline-offset: 1px; }
.strip-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.75rem; color: var(--ink-3); margin-top: 8px; }
.strip-legend i { display: inline-block; width: 9px; height: 12px; border-radius: 2px; vertical-align: -1px; margin-right: 5px; }
.lg-has { background: var(--sea); } .lg-none { background: var(--paper-2); border: 1px dashed var(--missing); }
.lg-latest { background: var(--gold); } .lg-today { border: 1px solid var(--ink-3); }

/* ---------- 1日の記録（今日の海） ---------- */
.entry { display: grid; gap: 22px; }
.entry-photos { display: grid; gap: 6px; grid-template-columns: 1fr; }
.entry-photos.two { grid-template-columns: 1fr 1fr; }
.photo { position: relative; background: var(--paper-2); aspect-ratio: 4 / 3; overflow: hidden; border-radius: 3px; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .fallback { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 14px; font-size: 0.78rem; color: var(--ink-2);
  background: repeating-linear-gradient(135deg, var(--paper-2) 0 10px, var(--paper) 10px 20px); }
.photo .fallback b { color: var(--ink); font-size: 0.86rem; }
.photo-none { aspect-ratio: auto; padding: 18px; font-size: 0.85rem; color: var(--ink-3); border: 1px dashed var(--missing); background: transparent; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.86rem; color: var(--ink-2); }
.entry-date { font-family: var(--f-display); font-size: var(--step-3); line-height: 1.2; }
.vals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1.5px solid var(--rule); }
.vals > div { padding: 12px 0; border-bottom: 1.5px solid var(--rule); display: flex; flex-direction: column; gap: 2px; }
.vals > div:nth-child(odd) { padding-right: 12px; }
.vals > div:nth-child(even) { padding-left: 12px; border-left: 1.5px solid var(--rule); }
.vals dt { font-size: 0.78rem; color: var(--ink-3); }
.vals dd { margin: 0; font-family: var(--f-num); font-size: 1.3rem; }
.vals dd small { font-size: 0.78rem; color: var(--ink-3); margin-left: 3px; }
.vals .delta { font-size: 0.75rem; color: var(--ink-3); font-family: var(--f-body); }
.vals .miss { color: var(--ink-3); font-family: var(--f-body); font-size: 0.95rem; }
.voice { border-left: 3px solid var(--mud); padding: 4px 0 4px 16px; display: flex; flex-direction: column; gap: 8px; }
.voice p { white-space: pre-line; font-size: 0.98rem; }
.voice .who { font-size: 0.75rem; color: var(--ink-3); }
.note-flag { font-size: 0.8rem; color: var(--mud); background: var(--mud-soft); padding: 8px 12px; border-radius: 3px; }
@media (min-width: 900px) {
  .entry { grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: start; }
  .vals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vals > div:nth-child(odd), .vals > div:nth-child(even) { padding: 12px 12px 12px 0; border-left: 0; }
  .vals > div:not(:nth-child(3n+1)) { padding-left: 12px; border-left: 1.5px solid var(--rule); }
}

/* ---------- 物語（雨のあと） ---------- */
.story { display: grid; gap: 24px; }
.story-chart { background: var(--paper); }
.quotes { display: grid; gap: 14px; counter-reset: q; }
.quotes li { list-style: none; display: grid; grid-template-columns: 4.8em 1fr; gap: 10px; font-size: 0.92rem; align-items: baseline; }
.quotes li time { font-family: var(--f-num); font-size: 0.8rem; color: var(--ink-3); }
.quotes li .v { font-family: var(--f-num); color: var(--sea); font-size: 0.82rem; margin-left: 6px; white-space: nowrap; }
.quotes ul, ul.quotes { margin: 0; padding: 0; }
.answer { font-family: var(--f-display); font-size: var(--step-2); line-height: 1.6; }
@media (min-width: 900px) { .story { grid-template-columns: 1.4fr 1fr; gap: 48px; } }

/* ---------- 小さいところから（流れ） ---------- */
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: f; }
.flow li { display: grid; grid-template-columns: 2.4em 1fr; gap: 4px 12px; padding: 16px 0; border-top: 1.5px solid var(--rule); counter-increment: f; }
.flow li::before { content: counter(f); font-family: var(--f-num); color: var(--sea); font-size: 1.1rem; grid-row: 1 / span 4; grid-column: 1; }
.flow li > * { grid-column: 2; }
.flow h3 { font-size: var(--step-1); }
.flow p { color: var(--ink-2); font-size: 0.92rem; }
.flow .status { font-size: 0.8rem; color: var(--ink-3); }
.flow .status b { color: var(--ink); font-family: var(--f-num); font-weight: 500; }
.flow a { font-size: 0.88rem; }
@media (min-width: 900px) {
  .flow { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 20px; }
  .flow li { grid-template-columns: 1fr; border-top: 2px solid var(--ink); }
  .flow li::before { grid-row: auto; }
  .flow li > * { grid-column: auto; }
}

/* ---------- 一覧（表・リスト） ---------- */
.ledger { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ledger th, .ledger td { text-align: left; padding: 10px 10px 10px 0; border-bottom: 1.5px solid var(--rule); vertical-align: top; }
.ledger th { font-size: 0.75rem; color: var(--ink-3); font-weight: 500; letter-spacing: .05em; }
.ledger td.n { font-family: var(--f-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-scroll { overflow-x: auto; }

.facts { display: grid; grid-template-columns: 7.5em 1fr; border-top: 1.5px solid var(--rule); margin: 0; }
.facts dt, .facts dd { margin: 0; padding: 12px 0; border-bottom: 1.5px solid var(--rule); }
.facts dt { color: var(--ink-3); font-size: 0.86rem; }
.facts dd { min-width: 0; }

.sighting { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 16px 0; border-top: 1.5px solid var(--rule); }
.sighting h3 { font-size: var(--step-1); }
.sighting .meta { font-size: 0.8rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 2px 12px; }
.sighting blockquote { margin: 0; font-size: 0.92rem; color: var(--ink-2); }
.sighting .photo { max-width: 260px; }
.tag { font-size: 0.7rem; padding: 1px 8px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.tag.unk { background: var(--mud-soft); color: var(--mud); }

.state { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.state.prep { color: var(--mud); background: var(--mud-soft); }
.state.live { color: var(--sea); background: var(--sea-soft); }
.state.none { color: var(--ink-3); background: var(--paper-2); }

.qa { display: grid; gap: 0; }
.qa > div { display: grid; gap: 6px; padding: 20px 0; border-top: 1.5px solid var(--rule); }
.qa h3 { font-size: var(--step-1); }
.qa p { color: var(--ink-2); max-width: var(--measure); }
@media (min-width: 900px) { .qa > div { grid-template-columns: 16em 1fr; gap: 32px; } }

/* ---------- チャート ---------- */
.controls { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 14px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1.5px solid var(--rule); border-radius: 18px; overflow: hidden; max-width: 100%; }
.seg button { font: inherit; font-size: 0.82rem; border: 0; background: transparent; color: var(--ink-2); padding: 6px 12px; cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.seg button:disabled { color: var(--missing); cursor: not-allowed; text-decoration: line-through; }
.btn { font: inherit; font-size: 0.82rem; border: 1.5px solid var(--rule); background: var(--paper); color: var(--ink); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.btn:disabled { opacity: .4; cursor: default; }
.chart { display: grid; grid-template-columns: 46px minmax(0, 1fr); position: relative; }
.chart-axis svg, .chart-scroll svg { display: block; overflow: visible; }
.chart-scroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; position: relative; overscroll-behavior-x: contain; }
.chart-scroll::-webkit-scrollbar { height: 6px; }
.chart-scroll::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 3px; }
.chart text { fill: var(--ink-3); font-family: var(--f-num); font-size: 10.5px; }
.chart .ptitle { fill: var(--ink); font-family: var(--f-body); font-size: 12px; font-weight: 700; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .month { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .gap { fill: url(#hatch); }
.chart .gap-label { fill: var(--ink-3); font-family: var(--f-body); font-size: 10px; }
.chart .miss-label { fill: var(--mud); font-family: var(--f-body); font-size: 10px; }
.chart .miss-band { fill: var(--mud-soft); }
.chart .xhair { stroke: var(--ink); stroke-width: 1; }
.tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: var(--paper); font-size: 0.75rem; line-height: 1.55; padding: 8px 10px; border-radius: 4px; min-width: 150px; box-shadow: 0 4px 18px rgba(0,0,0,.18); }
.tip b { font-weight: 700; display: block; margin-bottom: 2px; }
.tip .r { display: flex; justify-content: space-between; gap: 12px; }
.tip .r span:last-child { font-family: var(--f-num); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.78rem; color: var(--ink-2); margin-top: 10px; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.legend i.hatch { height: 10px; width: 14px; background: repeating-linear-gradient(135deg, var(--missing) 0 2px, transparent 2px 5px); border: 1px solid var(--missing); }
.legend i.mband { height: 10px; background: var(--mud-soft); border: 1px solid var(--mud); }
.source { font-size: 0.78rem; color: var(--ink-3); border-top: 1.5px solid var(--rule); padding-top: 10px; margin-top: 14px; line-height: 1.7; }

/* ---------- 潮 ---------- */
.moon-row { display: flex; align-items: center; gap: 18px; }
.moon { width: 76px; height: 76px; flex: none; }
.tide-now { font-family: var(--f-display); font-size: var(--step-4); line-height: 1.1; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; font-size: 0.72rem; }
.cal .h { text-align: center; color: var(--ink-3); padding: 4px 0; }
.cal .c { min-height: 52px; padding: 4px; background: var(--paper-2); display: flex; flex-direction: column; justify-content: space-between; border-radius: 2px; }
.cal .c .d { font-family: var(--f-num); color: var(--ink-2); }
.cal .c .t { font-weight: 700; font-size: 0.72rem; }
.cal .c.o { background: var(--sea); color: var(--paper); }
.cal .c.o .d { color: var(--paper); }
.cal .c.n { background: var(--paper-2); }
.cal .c.k { background: var(--sea-soft); }
.cal .c.today { outline: 2px solid var(--gold); outline-offset: -2px; }
.cal .c.blank { background: transparent; }
.cal .c.rec::after { content: "記録"; font-size: 0.6rem; color: inherit; opacity: .8; }

/* ---------- フッター ---------- */
.site-foot { border-top: 1.5px solid var(--rule); padding-block: 40px 56px; background: var(--paper-2); font-size: 0.86rem; }
.site-foot .wrap { display: grid; gap: 26px; }
.site-foot h2 { font-size: 1.1rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.site-foot a { color: var(--ink); }
.foot-credits { font-size: 0.72rem; color: var(--ink-3); line-height: 1.7; }
@media (min-width: 900px) { .site-foot .wrap { grid-template-columns: 1.2fr 1fr 1.4fr; } }

.closing { position: relative; color: var(--on-photo); background: #2a1a10; }
.closing img { width: 100%; aspect-ratio: 3 / 2; max-height: 70vh; object-fit: cover; opacity: .9; }
.closing .wrap { position: absolute; inset: auto 0 0 0; padding-bottom: 22px; display: flex; flex-direction: column; gap: 10px; }
.closing p.big { font-family: var(--f-display); font-size: var(--step-3); line-height: 1.4; text-shadow: 0 2px 16px rgba(0,0,0,.4); }

@media (prefers-reduced-motion: no-preference) {
  .fade { animation: fade .7s ease both; }
  @keyframes fade { from { opacity: .001; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}


/* ---------- TOP（スマホの量を基準にした構成） ---------- */
.pc-only { display: none !important; }
@media (min-width: 900px) { .pc-only { display: grid !important; } }
.top .sec { padding-block: 36px; }
.top .sec-head { margin-bottom: 16px; gap: 6px; }
.top .sec-head h2 { font-size: var(--step-2); }
.top .answer { font-size: var(--step-1); line-height: 1.7; margin-bottom: 6px; }
.top .hero-copy { padding-block: 18px 22px; gap: 10px; }
.top .hero-copy p { font-size: 0.93rem; line-height: 1.8; }

.latest .wrap { padding-block: 16px 18px; display: grid; gap: 14px; }
.latest-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.latest-when { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; font-size: 0.84rem; margin: 0; }
.latest-vals { margin: 0; }
.latest-voice { font-size: 0.88rem; line-height: 1.7; opacity: .92; }
.latest-voice span { font-size: 0.7rem; opacity: .7; margin-left: 6px; }
.latest-gap { font-size: 0.76rem; opacity: .75; }
.latest-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.latest-link { font-size: 0.86rem; font-weight: 700; align-self: flex-start; }
.strip-dark .strip { padding-top: 0; }
.strip-dark .strip .bar { height: 20px; background: transparent; border-color: color-mix(in srgb, var(--paper) 30%, transparent); }
.strip-dark .strip .day.has .bar { background: #7DBEDF; }
.strip-dark .strip .day.latest .bar { background: var(--gold); }
.strip-dark .strip .day.today .bar { border: 1px solid var(--paper); }
.strip-dark .strip .m { display: none; }
.strip-dark .strip-legend { color: inherit; opacity: .75; margin-top: 4px; }
.strip-dark .lg-has { background: #7DBEDF; }
.strip-dark .lg-none { background: transparent; border-color: color-mix(in srgb, var(--paper) 40%, transparent); }
@media (min-width: 900px) {
  .latest .wrap { grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: end; flex-direction: unset; }
  .strip-dark .strip .bar { height: 34px; }
}

.top .quotes { gap: 10px; }
.top .quotes li { grid-template-columns: 4.4em 1fr; font-size: 0.9rem; }

.steps { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--rule); }
.steps a { display: grid; grid-template-columns: 4.6em 1fr auto; gap: 8px; align-items: center; padding: 12px 0; border-bottom: 1.5px solid var(--rule); text-decoration: none; color: var(--ink); }
.steps b { font-family: var(--f-display); font-size: 1.05rem; }
.steps .st { font-size: 0.82rem; color: var(--ink-2); font-family: var(--f-num); min-width: 0; }
.steps .go { font-size: 0.78rem; color: var(--sea); white-space: nowrap; }
@media (min-width: 900px) {
  .steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 20px; border: 0; }
  .steps a { grid-template-columns: 1fr; border-top: 2px solid var(--ink); border-bottom: 0; align-items: start; gap: 6px; padding-top: 14px; }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { font-size: 0.86rem; padding: 4px 12px; border-radius: 999px; background: var(--sea-soft); color: var(--ink); }
.purpose-link { background: var(--paper-2); }

/* フッター：スマホでは短く */
@media (max-width: 899px) {
  .site-foot { padding-block: 28px 36px; }
  .site-foot .wrap { gap: 18px; }
  .foot-credits p:not(:first-child) { display: none; }
}

/* まとまりの頭の番号 */
.no { font-family: var(--f-num); font-weight: 500; font-size: 0.78em; color: var(--sea); margin-right: 0.6em; letter-spacing: 0.02em; }
.foot-credits a { color: inherit; text-decoration: underline; }
/* ページ下の出典 */
.foot-src { font-size: 0.74rem; color: var(--ink-3); line-height: 1.7; }
.foot-src .h { font-weight: 700; color: var(--ink-2); letter-spacing: .08em; }
.foot-src ul { display: block; margin: 2px 0 4px; padding-left: 1.1em; list-style: disc; }
.foot-src li { display: list-item; }
.foot-src a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ページ下（footer v21）：名前・出典（押すと開く）・ログインだけ */
.site-foot .wrap { display: grid; gap: 14px; grid-template-columns: 1fr; }
.foot-name { margin: 0; font-weight: 700; }
.foot-name span { display: block; font-weight: 400; font-size: 0.8rem; color: var(--ink-3); }
.foot-more summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-size: 0.86rem; color: var(--ink-2); list-style: none; border-top: 1.5px solid var(--rule); border-bottom: 1.5px solid var(--rule); }
.foot-more summary::-webkit-details-marker { display: none; }
.foot-more summary::after { content: "＋"; margin-left: auto; color: var(--ink-3); }
.foot-more[open] summary::after { content: "－"; }
.foot-more .foot-src { padding: 10px 0 4px; }
.foot-more .foot-src .h { margin: 8px 0 0; }
.foot-login { margin: 0; font-size: 0.8rem; }
@media (min-width: 900px) { .site-foot .wrap { grid-template-columns: 1fr; max-width: 760px; } }

.foot-page [data-foot] { margin: 4px 0 0; padding: 0; border: 0; }
.foot-page [data-foot], .foot-page [data-foot] * { font-size: 0.74rem !important; line-height: 1.7; color: var(--ink-3); }
.foot-page [data-foot] a { color: inherit; text-decoration: underline; }
.foot-page [data-foot] p, .foot-page [data-foot] li { margin: 0 0 2px; }
.foot-page .stack { display: block; max-width: none; }

/* white-and-blue: 濃い色の帯も青に */
.hero { background: #0D47A1; }
.latest { background: #0D47A1; }
.drawer-top a.today, .seg button[aria-pressed="true"] { background: var(--sea); color: #FFFFFF; }

/* line-v26: 線を少し濃く */
:root { --rule: #B4C6D4; }

/* menu-v27: メニュー（≡を押したあと）の文字を大きく */
.drawer-top a { font-size: 1.05rem; }
.drawer-top a.today { font-size: 1.02rem; padding: 11px 18px; }
.dg-name { font-size: 0.95rem; }
.dg-links { gap: 10px; }
.dg-links a { min-height: 46px; padding: 0 16px; font-size: 1.06rem; }
.drawer-foot { font-size: 0.92rem; }
.dg-links a { border: 2px solid #8FA6B8; }
.dg { border-top-width: 2px; }

/* src-v28: ページ下は「出典」だけ */
.site-foot { padding-block: 8px 28px; }
.site-foot .wrap { gap: 0; }
.foot-more summary { border-top: 0; }

/* src-v29 */
.site-foot { padding-block: 22px 28px; }
.site-foot .wrap { gap: 10px; }
.foot-name { font-weight: 700; font-size: 0.95rem; }
.foot-more summary { border-top: 1.5px solid var(--rule); }

/* src-v32: 出典の開け閉め（Safari では summary を flex にすると開かないことがある） */
.foot-more summary { display: block; position: relative; line-height: 44px; min-height: 44px; padding-right: 28px; -webkit-tap-highlight-color: transparent; }
.foot-more summary::after { position: absolute; right: 2px; top: 0; }
