/* 海域別ページ（/area/*.html）の共通スタイル。
 *
 * guide.html は1枚ものなのでCSSを内側に持っているが、海域ページは30枚以上あるので
 * 外部化してキャッシュを効かせる。配色・字面は guide.html に揃えてある。 */

:root {
  color-scheme: light;
  --paper: #fffaf2;
  --surface: #ffffff;
  --ink: #14233b;
  --muted: #59677a;
  --line: #dce4e8;
  --orange: #e85d2a;
  --orange-dark: #bb3f16;
  --teal: #087c7a;
  --teal-soft: #e5f5f3;
  --yellow: #ffca58;
  --navy: #183153;
  --shadow: 0 18px 55px rgba(27, 50, 70, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 4%, rgba(255, 202, 88, .25), transparent 25rem),
    radial-gradient(circle at 8% 24%, rgba(8, 124, 122, .08), transparent 23rem),
    var(--paper);
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  line-height: 1.75;
}
a { color: inherit; }
img { max-width: 100%; }

.sitebar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 8px max(20px, calc((100vw - 1080px) / 2));
  border-bottom: 1px solid rgba(20, 35, 59, .1);
  background: rgba(255, 250, 242, .92);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 850; }
.brand img { width: 32px; height: 32px; }
.back-link { color: var(--navy); font-size: 14px; font-weight: 800; text-underline-offset: 4px; }

main { width: min(1080px, calc(100% - 36px)); margin: 0 auto; }

.crumbs { margin: 22px 0 0; font-size: 13px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.head { padding: 18px 0 8px; }
.eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--teal);
}
h1 { margin: 0; font-size: clamp(28px, 5vw, 44px); line-height: 1.25; letter-spacing: .01em; }
.reading { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.lead { margin: 18px 0 0; font-size: 17px; max-width: 44em; }
.lead strong { color: var(--orange-dark); }

.keyfacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 26px 0 0;
}
.keyfact {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.keyfact strong { display: block; font-size: 22px; line-height: 1.3; }
.keyfact span { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }

section { padding: clamp(44px, 6vw, 68px) 0; }
section + section { border-top: 1px solid rgba(20, 35, 59, .08); }
.kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--teal);
}
h2 { margin: 0; font-size: clamp(21px, 3.2vw, 29px); line-height: 1.35; }
h3 { margin: 26px 0 8px; font-size: 17px; }
p { margin: 14px 0 0; }
.muted { color: var(--muted); font-size: 14px; }

/* 月別グラフ。ライブラリは使わずインラインSVGで描く（読み込みを増やさない）。 */
.chart {
  margin: 24px 0 0;
  padding: 20px 18px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow-x: auto;
}
.chart svg { display: block; width: 100%; min-width: 480px; height: auto; }
.bar { fill: var(--teal); opacity: .28; }
.bar--strong { fill: var(--orange); opacity: .85; }
.bar--peak { fill: var(--orange-dark); opacity: 1; }
.bar-label { font-size: 11px; fill: var(--muted); }
.bar-value { font-size: 10px; fill: var(--muted); }
.chart-note { margin: 10px 2px 0; font-size: 12.5px; color: var(--muted); }

table.months {
  width: 100%;
  margin: 20px 0 0;
  border-collapse: collapse;
  font-size: 14px;
}
table.months th, table.months td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}
table.months th:first-child, table.months td:first-child { text-align: left; }
table.months thead th { color: var(--muted); font-size: 12.5px; font-weight: 700; }
table.months tr.is-peak td { background: rgba(255, 202, 88, .18); font-weight: 700; }

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 22px 0 0;
}
.card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 6px 0 0; font-size: 14.5px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.chip {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
}
.chip b { font-weight: 800; }

.species { margin: 18px 0 0; padding: 0; list-style: none; }
.species li { margin: 0 0 12px; }
.species__name { display: flex; justify-content: space-between; font-size: 14.5px; font-weight: 700; }
.species__bar { height: 8px; margin-top: 5px; border-radius: 999px; background: var(--teal-soft); overflow: hidden; }
.species__fill { display: block; height: 100%; border-radius: 999px; background: var(--yellow); }

.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }
.button {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 12px;
  background: var(--orange);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}
.button--sub { background: transparent; border: 1px solid var(--line); color: var(--navy); }

.callout {
  margin: 24px 0 0;
  padding: 18px 20px;
  border-left: 4px solid var(--yellow);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 202, 88, .14);
  font-size: 14.5px;
}
.callout strong { display: block; margin-bottom: 4px; }

.neighbors { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.neighbors a {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

/* 一覧ページ（/area/） */
.arealist { width: 100%; margin: 26px 0 0; border-collapse: collapse; font-size: 14.5px; }
.arealist th, .arealist td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.arealist thead th { color: var(--muted); font-size: 12.5px; }
.arealist td.num { text-align: right; font-variant-numeric: tabular-nums; }
.arealist a { font-weight: 700; text-decoration: none; }
.arealist a:hover { text-decoration: underline; }
.peak-pill {
  display: inline-block;
  min-width: 46px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(232, 93, 42, .12);
  color: var(--orange-dark);
  font-weight: 800;
  text-align: center;
}

footer.foot {
  margin-top: 40px;
  padding: 30px 0 50px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
footer.foot a { text-decoration: none; }
footer.foot p { margin: 8px 0 0; }

/* ---- 月別の濃さを横一列で見せる（漁火を見るページ） ---- */
.mstrip { display: inline-flex; gap: 2px; margin: 14px 0 0; }
.mv {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 26px;
  min-width: 22px;
  padding: 5px 0 3px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  font-size: 11px;
  line-height: 1.1;
  color: var(--muted);
}
.mv b { font-weight: 700; }
.mv i { font-style: normal; font-size: 9px; height: 10px; }
.mv--1 { background: rgba(8, 124, 122, .12); color: var(--ink); }
.mv--2 { background: rgba(255, 202, 88, .45); color: var(--ink); }
.mv--3 { background: rgba(232, 93, 42, .85); border-color: var(--orange-dark); color: #fff; }
.card h3 .pref {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.arealist td .mstrip { margin: 0; }
@media (max-width: 560px) {
  .mv { width: 21px; min-width: 18px; font-size: 10px; }
  .mstrip { gap: 1px; }
}

/* 狭い画面では表を積む。12か月のストリップが幅を食うので、
   横並びのままだと海域名が1文字ずつ折り返して読めなくなる。 */
@media (max-width: 620px) {
  .arealist.calendar,
  .arealist.calendar thead,
  .arealist.calendar tbody,
  .arealist.calendar tr,
  .arealist.calendar td { display: block; width: 100%; }
  .arealist.calendar thead { display: none; }
  .arealist.calendar tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .arealist.calendar td { padding: 0; border: none; }
  .arealist.calendar td.num { text-align: left; }
  .arealist.calendar td.num::before { content: "ピーク "; color: var(--muted); }
  .arealist.calendar td + td { margin-top: 6px; }
}
