/* まとめてくらべて 水産業（入口ページ）のスタイル。
   配色「潮と浅葱」。色は下の3ブロック（白い画面・端末が黒い画面の設定で未指定・黒い画面）だけで持つ。
   変数名は配下のサイトと揃えている。theme.js の LIGHT_BG / DARK_BG は --bg と揃えること。 */

:root {
  --bg: #f4f7f7;
  --panel: #ffffff;
  --soft: #e6eeef;
  --ink: #14262c;
  --ink-weak: #4f6268;
  --line: #d2dcdd;
  --line-soft: #e2e9ea;
  --main: #16414c;
  --main-2: #1f5866;
  --accent: #7cc8d2;
  --accent-ink: #0d2a30;
  --on-main: #ffffff;
  --f-head: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  /* 本文はシステム書体。"Noto Sans JP" をここに入れると、読み込んだ見出し用（700/900だけ）が本文に効いて太字に見えるので入れない */
  --f-body: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0f1719;
    --panel: #152125;
    --soft: #1a292e;
    --ink: #e2eced;
    --ink-weak: #9db0b5;
    --line: #2a3b40;
    --line-soft: #22323a;
    --main: #1b4f5b;
    --main-2: #24636f;
    --accent: #86d0d9;
    --accent-ink: #0b2328;
    --on-main: #ffffff;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1719;
  --panel: #152125;
  --soft: #1a292e;
  --ink: #e2eced;
  --ink-weak: #9db0b5;
  --line: #2a3b40;
  --line-soft: #22323a;
  --main: #1b4f5b;
  --main-2: #24636f;
  --accent: #86d0d9;
  --accent-ink: #0b2328;
  --on-main: #ffffff;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  line-height: 1.75;
  font-size: 16px;
}

.wrap { max-width: 1000px; margin: 0 auto; padding: 24px 16px 64px; }

a { color: var(--ink); text-decoration-color: var(--main-2); text-underline-offset: 3px; }
a:hover { text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- 看板（16:9。写真の上に深い潮色を左から重ね、文字は左に置く） ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: var(--main);
  color: #ffffff;
  container-type: inline-size;
}
.hero-bg, .hero-bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 60%;
  display: block;
}
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(15,45,53,.93) 0%, rgba(15,45,53,.8) 42%, rgba(15,45,53,.2) 78%, rgba(15,45,53,.05) 100%);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: max(5px, 1.2cqi); background: var(--accent);
}
.hero-in {
  position: relative;
  aspect-ratio: 16 / 9;   /* 中身が収まらない幅では、そのぶん縦に伸びる */
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  padding: max(18px, 5.5cqi) 5% max(22px, 6.5cqi);
  font-family: var(--f-head);
}
.hero-tags { display: flex; flex-wrap: wrap; gap: max(6px, 1cqi); margin: 0; padding: 0; list-style: none; }
.hero-tags li {
  background: #ffffff; color: var(--main);
  font-weight: 700; font-size: clamp(12px, 2.2cqi, 22px); line-height: 1.5;
  padding: .2em .8em; border-radius: 3px;
}
.hero-kicker {
  margin: 0 0 max(4px, .8cqi);
  font-weight: 700; font-size: clamp(14px, 3.4cqi, 34px); letter-spacing: .06em;
  text-shadow: 0 1px 4px rgba(0,0,0,.45);
}
.hero h1 {
  margin: 0;
  font-weight: 900; font-size: clamp(34px, 8.6cqi, 88px); line-height: 1.12; letter-spacing: .01em;
  text-shadow: 0 2px 6px rgba(0,0,0,.45);
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-bar {
  align-self: flex-start;
  margin: 0;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 900; font-size: clamp(14px, 3.2cqi, 32px); line-height: 1.5;
  padding: .25em .7em; border-radius: 3px;
}
@container (max-width: 560px) {
  .hero-shade { background: linear-gradient(90deg, rgba(15,45,53,.9) 0%, rgba(15,45,53,.78) 60%, rgba(15,45,53,.45) 100%); }
}

/* ---------- 本文 ---------- */
.page-head { margin: 8px 0 22px; padding-left: 14px; border-left: 6px solid var(--main); }
.page-title { font-family: var(--f-head); font-weight: 900; font-size: 24px; line-height: 1.4; margin: 0 0 6px; }
.page-head .lead { margin: 0; }

.lead { margin: 18px 0 0; color: var(--ink-weak); font-size: 15px; }

.notice {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--main);
  border-radius: 4px;
  padding: 14px 16px;
  font-size: 14px;
  margin: 18px 0;
}

h2 {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--f-head); font-weight: 900; font-size: 20px; line-height: 1.4;
  margin: 34px 0 14px;
}
h2::before { content: ""; width: 6px; align-self: stretch; background: var(--main); border-radius: 1px; }

/* ---------- サイトのカード ---------- */
.sites { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 720px) { .sites { grid-template-columns: 1fr; } }
.site {
  position: relative;
  min-width: 0;
  display: grid; gap: 6px; align-content: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--main);
  border-radius: 4px;
  padding: 10px 12px 14px;
}
/* カードの画像は白地の上下に絵を置いたものなので、黒い画面でも写真枠は白のまま */
.site-pic { display: block; aspect-ratio: 10 / 7; border-radius: 3px; overflow: hidden; background: #ffffff; }
.site-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.site-count {
  justify-self: start;
  margin: 4px 0 0;
  font-family: var(--f-head); font-weight: 700; font-size: 13px; line-height: 1.6;
  background: var(--main); color: var(--on-main);
  padding: 1px 8px; border-radius: 3px;
}
.site-title { font-family: var(--f-head); font-weight: 900; font-size: 17px; margin: 0; line-height: 1.5; }
.site-title a { color: var(--ink); text-decoration: none; }
.site-title a::after { content: ""; position: absolute; inset: 0; }   /* カード全体を押せるように */
.site:hover { border-color: var(--main-2); }
.site:hover .site-title a { text-decoration: underline; }
.site-desc { margin: 0; font-size: 14px; color: var(--ink-weak); }
.site-host { margin: 2px 0 0; font-size: 12px; color: var(--ink-weak); }

.prose { font-size: 15px; }
.prose p { margin: 12px 0; }

/* ---------- 画面の色 ---------- */
.theme-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: flex-end; margin: 30px 0 0; font-size: 13px; color: var(--ink-weak); }
.theme-switch-label { margin-right: 4px; }
.theme-switch button {
  font: inherit; font-size: 13px; padding: 3px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink); cursor: pointer;
}
.theme-switch button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }

/* ほかの分野の入口へのリンク */
.sisters { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sisters a { display: inline-block; padding: 10px 16px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--main); border-radius: 4px; color: var(--ink); font-weight: 700; text-decoration: none; }
.sisters a:hover, .sisters a:focus-visible { text-decoration: underline; }
footer { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-weak); }
footer p { margin: 0 0 6px; }
footer a { color: var(--ink-weak); }
.credit { font-size: 12px; line-height: 1.6; }

/* ページの先頭へ戻る（右下固定。JS が動くと 400px スクロールまで隠す） */
.to-top { position: fixed; right: 16px; bottom: 16px; z-index: 50; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--main); color: var(--on-main); text-decoration: none; font-family: var(--f-head); font-weight: 900; font-size: 20px; line-height: 1; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: opacity .2s, visibility .2s; }
.to-top:hover, .to-top:focus-visible { filter: brightness(1.12); }
.to-top:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.to-top.is-hidden { opacity: 0; visibility: hidden; }
@media print { .to-top { display: none; } }
