/* Angla 潮見表ページ 共有スタイルシート
   web/tide/ 配下の生成ページ(tool/generate_tide_pages.dart)から参照される。
   このファイル自体は手書き・git管理対象（生成物ではない）。
   ブランド: ディープオーシャン配色 + 太字ジオメトリック書体（アプリアイコンと同一路線）。 */

:root {
  --ocean-950: #051923;
  --ocean-900: #06283a;
  --ocean-700: #0a4a5c;
  --ocean-500: #0c7b8a;
  --teal: #009688;
  --cyan: #00d4f0;
  --high: #ff8c00;
  --high-soft: #fff1e0;
  --low: #0288d1;
  --low-soft: #e3f4fd;
  --ink: #0b2430;
  --muted: #5c7c87;
  --surface: #f4fafb;
  --card: #ffffff;
  --line: #dfeaec;
  --shadow: 0 1px 2px rgba(6, 40, 58, 0.04), 0 8px 24px -12px rgba(6, 40, 58, 0.18);

  /* 潮回りごとの色分け（活性の目安を直感的に伝える） */
  --tide-oh: #ff5a4e;    /* 大潮 */
  --tide-oh-bg: #ffece9;
  --tide-chu: #ff8c00;   /* 中潮 */
  --tide-chu-bg: #fff1e0;
  --tide-ko: #2aa9b8;    /* 小潮 */
  --tide-ko-bg: #e3f6f8;
  --tide-naga: #7c93a0;  /* 長潮 */
  --tide-naga-bg: #edf2f4;
  --tide-waka: #3da88f;  /* 若潮 */
  --tide-waka-bg: #e6f5f1;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Hiragino Sans',
    'Yu Gothic', 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.wrap--wide { max-width: 1180px; }

/* ── ヒーロー ─────────────────────────────────────────────── */

.hero {
  position: relative;
  background:
    radial-gradient(120% 140% at 15% -10%, #0f5a68 0%, transparent 55%),
    linear-gradient(160deg, var(--ocean-950) 0%, var(--ocean-900) 45%, var(--ocean-700) 100%);
  color: #eaf7f9;
  padding: 28px 0 56px;
  overflow: hidden;
}

.hero-inner { position: relative; z-index: 1; }

.breadcrumb {
  font-size: 12.5px;
  color: #9fc9d1;
  margin: 0 0 18px;
  letter-spacing: 0.01em;
}
.breadcrumb a { color: #cdeaee; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 5px; opacity: 0.5; }

.hero-eyebrow {
  font-family: 'Unbounded', 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 8px;
}

.hero-title {
  font-family: 'Unbounded', 'Manrope', sans-serif;
  font-weight: 700;
  font-size: clamp(30px, 6vw, 46px);
  line-height: 1.15;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.hero-title .wave-emoji { display: inline-block; margin-right: 4px; }

.hero-sub { margin: 0; color: #bfe3e8; font-size: 15px; }
.hero-sub strong { color: #fff; }

.hero-wave {
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  width: 100%; height: 46px;
  display: block;
}

/* ── コンテンツ本体 ───────────────────────────────────────── */

.content { padding: 28px 0 60px; }

.lead { color: var(--muted); font-size: 14.5px; margin: 0 0 22px; }

/* ── 日本地図セレクター（/tide/ ハブページ） ──────────────────
   8地方の重心座標（実際の緯度経度から算出、海岸線トレースではない）に
   ピンを配置した地図。地方ピルナビの代わりに一目で選べるようにする。 */

.map-card {
  background:
    radial-gradient(120% 140% at 15% -10%, #0f5a68 0%, transparent 55%),
    linear-gradient(160deg, var(--ocean-950) 0%, var(--ocean-900) 45%, var(--ocean-700) 100%);
  border-radius: 18px;
  padding: 20px 20px 8px;
  margin-bottom: 20px;
}
.map-card-label {
  color: #9fc9d1;
  font-family: 'Unbounded', sans-serif;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  margin: 0 0 4px;
}
.region-map { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; }
.map-pin { cursor: pointer; }
.map-halo { fill: #00d4f0; opacity: 0.08; transition: opacity 0.15s ease; }
.map-dot { fill: #00d4f0; stroke: #eaf7f9; stroke-width: 1.5; transition: r 0.15s ease; }
.map-label {
  fill: #eaf7f9; font-family: 'Manrope', sans-serif;
  font-size: 11.5px; font-weight: 600;
}
.map-pin:hover .map-halo, .map-pin:focus-visible .map-halo { opacity: 0.22; }
.map-pin:hover .map-dot, .map-pin:focus-visible .map-dot { r: 7.5; fill: #ff8c00; }
.map-pin:hover .map-label, .map-pin:focus-visible .map-label { fill: #ff8c00; }

.day-jump {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 2px 2px 18px; margin: 0 0 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.day-jump::-webkit-scrollbar { display: none; }
.day-jump a {
  flex: 0 0 auto;
  font-family: 'Unbounded', sans-serif;
  font-size: 12.5px; font-weight: 600;
  text-decoration: none;
  color: var(--ocean-700);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.day-jump a:hover { background: var(--teal); color: #fff; border-color: var(--teal); }

/* ── 日別カード ───────────────────────────────────────────── */

.day {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px 22px 22px;
  margin-bottom: 18px;
  scroll-margin-top: 16px;
  opacity: 0;
  animation: rise 0.5s ease forwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .day { animation: none; opacity: 1; }
}

.day-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 2px;
}

.day-date { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.day-num {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700; font-size: 26px; color: var(--ocean-900);
  line-height: 1;
}
.day-meta { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }

.today-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--teal); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
}
.today-badge .dot {
  width: 6px; height: 6px; border-radius: 50%; background: #fff;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.tide-pill {
  font-family: 'Unbounded', sans-serif;
  font-size: 11.5px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px;
  white-space: nowrap;
}
.tide-oh   { color: var(--tide-oh);   background: var(--tide-oh-bg); }
.tide-chu  { color: var(--tide-chu);  background: var(--tide-chu-bg); }
.tide-ko   { color: var(--tide-ko);   background: var(--tide-ko-bg); }
.tide-naga { color: var(--tide-naga); background: var(--tide-naga-bg); }
.tide-waka { color: var(--tide-waka); background: var(--tide-waka-bg); }

.sun-info {
  font-size: 13px; color: var(--muted);
  margin: 6px 0 14px;
  display: flex; align-items: center; gap: 6px;
}
.sun-info .sep { color: var(--line); }

.tide-svg { display: block; width: 100%; height: auto; margin: 2px 0 14px; }

ul.events {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
ul.events li {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700;
  border-radius: 10px; padding: 8px 10px;
}
ul.events li .arrow { font-size: 11px; }
ul.events li.high { color: var(--high); background: var(--high-soft); }
ul.events li.low  { color: var(--low);  background: var(--low-soft); }
ul.events li .cm  { font-weight: 500; opacity: 0.75; margin-left: auto; }

/* ── 都道府県一覧（/tide/{pref}/ ページ用のフラットな一覧） ──────── */

ul.port-list { list-style: none; padding: 0; margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 8px; }
ul.port-list li a {
  display: inline-block;
  font-size: 13.5px; font-weight: 600;
  color: var(--ocean-700);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
ul.port-list li a:hover {
  background: var(--teal); color: #fff; border-color: var(--teal);
  transform: translateY(-1px);
}

/* ── 地方グリッド（/tide/ ハブページ） ────────────────────────
   31都道府県を単一の縦リストで並べるとページが長大になり離脱を招くため、
   8地方区分でグルーピングし複数カラムのグリッドに収める。 */

.region-jump { margin-bottom: 20px; }

.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

.region-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px 20px 20px;
  scroll-margin-top: 16px;
}
.region-card h2 {
  font-family: 'Unbounded', sans-serif;
  font-size: 15.5px;
  color: var(--ocean-900);
  margin: 0 0 12px;
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.region-count { font-size: 11px; font-weight: 500; color: var(--muted); font-family: 'Manrope', sans-serif; }

.pref-block { margin-bottom: 10px; }
.pref-block:last-child { margin-bottom: 0; }
.pref-block h3 { margin: 0 0 6px; font-size: 12.5px; font-weight: 700; }
.pref-block h3 a { color: var(--ocean-700); text-decoration: none; }
.pref-block h3 a:hover { color: var(--teal); }
.pref-block .port-list { gap: 6px; margin: 0; }
.pref-block .port-list li a { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }

/* ── CTA / フッター ───────────────────────────────────────── */

.cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ocean-900), var(--ocean-500));
  border-radius: 18px;
  padding: 26px 24px;
  margin: 28px 0 20px;
  text-align: center;
  color: #eaf7f9;
}
.cta p { margin: 0 0 14px; font-size: 14.5px; color: #cdeaee; }
.cta a.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--ocean-900);
  text-decoration: none;
  font-family: 'Unbounded', sans-serif;
  font-weight: 700; font-size: 14px;
  padding: 12px 26px; border-radius: 999px;
  box-shadow: 0 8px 20px -8px rgba(0,0,0,0.4);
  transition: transform 0.15s ease;
}
.cta a.btn:hover { transform: translateY(-2px); }

.linkout { text-align: center; font-size: 13.5px; margin: 0 0 24px; }
.linkout a { font-weight: 600; }

.disclaimer {
  font-size: 12px; color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 16px; margin-top: 8px;
}
.disclaimer a { color: var(--muted); text-decoration: underline; }

@media (max-width: 480px) {
  .hero { padding: 22px 0 46px; }
  .day { padding: 16px 16px 18px; }
  .day-num { font-size: 22px; }
}
