/* 凪 ― ボートレース情報を、軽やかに読みやすく。
   色は「凪いだ水面」から：空色の地、濃紺の文字、澄んだ青緑、合図の珊瑚色。
   枠番の色は公式と同じ（1白・2黒・3赤・4青・5黄・6緑）。 */
:root {
  --ground: #f2f8fa;
  --panel: #ffffff;
  --panel-2: #eaf5f7;
  --ink: #123142;
  --ink-2: #557180;
  --line: #cfe1e7;
  --accent: #087f9c;
  --accent-strong: #075f75;
  --accent-soft: #dff3f6;
  --signal: #cb4638;
  --signal-soft: #fff0ec;
  --hit: #087a55;
  --miss: #b83c33;
  --bar: #0b92aa;
  --shadow: 0 2px 4px rgba(17, 61, 78, .05), 0 12px 32px rgba(17, 61, 78, .07);
  --shadow-hover: 0 6px 18px rgba(17, 61, 78, .12);
  --r: 18px;
  --font: 'Noto Sans JP', system-ui, -apple-system, 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
  --font-brand: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #071b24; --panel: #0e2934; --panel-2: #143642; --ink: #eef9fb; --ink-2: #abc4cc;
    --line: #28505d; --accent: #65d4df; --accent-strong: #a0eef2; --accent-soft: #123f49; --signal: #ff9a86;
    --signal-soft: #452b2a; --hit: #6ed8a9; --miss: #ff968c; --bar: #65d4df; --shadow: none; --shadow-hover: none;
  }
}
:root[data-theme="dark"] {
  --ground: #071b24; --panel: #0e2934; --panel-2: #143642; --ink: #eef9fb; --ink-2: #abc4cc;
  --line: #28505d; --accent: #65d4df; --accent-strong: #a0eef2; --accent-soft: #123f49; --signal: #ff9a86;
  --signal-soft: #452b2a; --hit: #6ed8a9; --miss: #ff968c; --bar: #65d4df; --shadow: none; --shadow-hover: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font); line-height: 1.65; font-size: 15px; }
a { color: var(--accent); }
.num, table { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 4px; }

/* ヘッダー */
.top { position: sticky; top: 0; z-index: 10; background: var(--panel); border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 10px 16px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background:
  radial-gradient(circle at 50% 120%, transparent 55%, var(--panel) 56% 62%, transparent 63%), var(--accent); }
.brand-name { font-family: var(--font-brand); font-weight: 700; font-size: 19px; letter-spacing: .04em; }
.nav { display: flex; gap: 4px; overflow-x: auto; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.nav a.on { background: var(--accent); color: #fff; }

main { max-width: 980px; margin: 0 auto; padding: 16px; outline: none; }
.loading, .empty { color: var(--ink-2); padding: 28px 4px; }
h1 { font-size: 21px; margin: 4px 0 2px; text-wrap: balance; }
h2 { font-size: 16px; margin: 22px 0 10px; }
.sub { color: var(--ink-2); font-size: 13px; }

/* 日付の切り替え */
.days { display: flex; gap: 6px; margin: 12px 0 4px; flex-wrap: wrap; }
.days a { text-decoration: none; padding: 6px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line);
  color: var(--ink); font-size: 14px; font-weight: 700; }
.days a.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* パネル */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; }
.grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .grid.two { grid-template-columns: 1fr 1fr; } }

/* 本日の場状況 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.stat b { display: block; font-size: 22px; line-height: 1.2; }
.stat span { font-size: 12px; color: var(--ink-2); }
.rank { margin: 0; padding: 0; list-style: none; font-size: 14px; }
.rank li { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.rank li:last-child { border-bottom: 0; }

/* 場ごとのレース一覧 */
.venue { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); }
.venue-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.venue-name { font-weight: 700; font-size: 17px; }
.venue-series { font-size: 12.5px; color: var(--ink-2); }
.races { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
@media (min-width: 560px) { .races { grid-template-columns: repeat(12, 1fr); } }
.rc { display: block; text-align: center; text-decoration: none; color: var(--ink); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 4px 0 3px; line-height: 1.25; }
.rc b { display: block; font-size: 14px; }
.rc small { font-size: 10.5px; color: var(--ink-2); }
.rc.done { opacity: .55; }
.rc.next { border-color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); }
.rc.free::after { content: '無料'; display: block; font-size: 9.5px; font-weight: 700; color: var(--accent); }

/* バッジ */
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); vertical-align: middle; }
.badge.warn { background: color-mix(in srgb, var(--signal) 18%, transparent); color: var(--signal); }
.badge.gray { background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); }
.cls { display: inline-block; min-width: 24px; text-align: center; font-size: 11px; font-weight: 700; border-radius: 4px; padding: 0 4px; }
.cls-A1 { background: #b8322a; color: #fff; } .cls-A2 { background: #d47a2a; color: #fff; }
.cls-B1 { background: #2f6fb3; color: #fff; } .cls-B2 { background: #7b8a90; color: #fff; }

/* 枠番 */
.waku { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; font-weight: 700; font-size: 14px; }
.w1 { background: #fff; color: #111; border: 1.5px solid #9aa7a6; } .w2 { background: #1b1b1b; color: #fff; }
.w3 { background: #d8322b; color: #fff; } .w4 { background: #1f5fbf; color: #fff; }
.w5 { background: #f2c500; color: #111; } .w6 { background: #179a4b; color: #fff; }

/* タブ */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 14px 0 12px; }
.tabs button { font: inherit; font-weight: 700; font-size: 14px; background: none; border: 0; padding: 9px 12px; color: var(--ink-2);
  border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }

/* 表 */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 8px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th { font-size: 11.5px; color: var(--ink-2); font-weight: 700; background: var(--panel-2); position: sticky; top: 0; }
th:first-child, td:first-child, td.l, th.l { text-align: left; }
tr:last-child td { border-bottom: 0; }
td .name { font-weight: 700; font-size: 14px; }
td .meta { display: block; font-size: 11px; color: var(--ink-2); }
.best { color: var(--signal); font-weight: 700; }
.probbar { display: inline-flex; align-items: center; gap: 6px; min-width: 110px; justify-content: flex-end; }
.probbar i { display: inline-block; height: 8px; border-radius: 4px; background: var(--bar); }
.hit { color: var(--hit); font-weight: 700; } .miss { color: var(--miss); }

/* 展開予想 */
.shape { font-size: 18px; font-weight: 700; }
.km { display: grid; grid-template-columns: 7.5em 1fr 3.5em; gap: 6px 10px; align-items: center; font-size: 14px; }
.km i { display: block; height: 10px; border-radius: 5px; background: var(--bar); }
.lines { margin: 8px 0 0; padding-left: 1.2em; }
.lines li { margin: 3px 0; }

/* レース見出し */
.race-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.conds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.conds span { font-size: 12.5px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.freepick { margin-top: 12px; border-left: 4px solid var(--accent); }
.cta { display: inline-block; margin-top: 10px; background: var(--signal); color: #fff; font-weight: 700; text-decoration: none;
  padding: 10px 18px; border-radius: 999px; }
.rnav { display: flex; gap: 4px; overflow-x: auto; margin: 12px 0 0; }
.rnav a { text-decoration: none; font-size: 13px; font-weight: 700; padding: 4px 9px; border-radius: 6px; color: var(--ink-2); border: 1px solid var(--line); background: var(--panel); }
.rnav a.on { color: #fff; background: var(--accent); border-color: var(--accent); }

.note { font-size: 12.5px; color: var(--ink-2); margin: 10px 2px; }
.foot { max-width: 980px; margin: 24px auto 0; padding: 18px 16px 40px; font-size: 12.5px; color: var(--ink-2); border-top: 1px solid var(--line); }
.foot p { margin: 4px 0; }
@media (prefers-reduced-motion: no-preference) { .probbar i, .km i { transition: width .4s ease; } }

/* ---------- 記事（ニュース・攻略） ---------- */
.news-list { display: grid; gap: 8px; }
.news-item { display: grid; gap: 2px; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); }
.news-item b { font-size: 15px; line-height: 1.5; }
.news-date { font-size: 12px; color: var(--ink-2); }
.news-sum { font-size: 12.5px; color: var(--ink-2); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 12px; }
.chips a { flex: none; text-decoration: none; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); }
.chips a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.article h1 { font-size: 22px; line-height: 1.45; margin: 8px 0 14px; }
.article-body { font-size: 15.5px; line-height: 1.85; }
.article-body h2 { font-size: 17px; margin: 24px 0 8px; padding-left: 10px; border-left: 4px solid var(--accent); }
.article-body h3 { font-size: 15.5px; margin: 18px 0 6px; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body blockquote { margin: 12px 0; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--ink-2); }
.article-body table td, .article-body table th { white-space: normal; }
.guide ul { margin: 0; padding-left: 1.2em; }
.guide li { margin: 6px 0; line-height: 1.7; }
h3 { font-size: 14px; margin: 10px 0 6px; color: var(--ink-2); }

/* ---------- スマホの下のタブバー ---------- */
.tabbar, .more { display: none; }
@media (max-width: 719px) {
  body { font-size: 15px; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .top { padding: 10px 16px; }
  .top .nav { display: none; }
  .brand-name { font-size: 18px; }
  main { padding: 12px 12px 20px; }
  h1 { font-size: 19px; }
  h2 { font-size: 15.5px; margin: 20px 0 8px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 12px rgba(20, 35, 43, .06); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 58px; font: inherit; font-size: 10.5px; font-weight: 700; color: var(--ink-2); text-decoration: none;
    background: none; border: 0; cursor: pointer; }
  .tabbar svg { width: 23px; height: 23px; }
  .nav-icon {
    display: block;
    width: 26px;
    height: 26px;
    flex: none;
    background: currentColor;
    -webkit-mask: var(--nav-icon) center / contain no-repeat;
    mask: var(--nav-icon) center / contain no-repeat;
  }
  .icon-home { --nav-icon: url('/assets/nav-home.svg'); }
  .icon-prediction { --nav-icon: url('/assets/nav-prediction.svg'); }
  .icon-news { --nav-icon: url('/assets/nav-news.svg'); }
  .icon-racer { --nav-icon: url('/assets/nav-racer.svg'); }
  .icon-more { --nav-icon: url('/assets/nav-more.svg'); }
  .tabbar .on { color: var(--accent); }
  .more:not([hidden]) { display: grid; position: fixed; right: 10px; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 21;
    background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 30px rgba(20, 35, 43, .18); min-width: 190px; overflow: hidden; }
  .more a { padding: 14px 18px; text-decoration: none; color: var(--ink); font-weight: 700; border-bottom: 1px solid var(--line); }
  .more a:last-child { border-bottom: 0; }
  .more a.on { color: var(--accent); }

  /* レース詳細：タブを上に貼り付ける（ヘッダーの下） */
  .tabs { position: sticky; top: 49px; z-index: 5; background: var(--ground); margin: 10px -12px 10px; padding: 0 12px; }
  .tabs button { padding: 11px 11px; font-size: 13.5px; }
  .rnav { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; overflow: visible; }
  .rnav a { text-align: center; padding: 7px 0; }

  /* 表：左端（枠・選手）を固定して、横に動かしても誰の数字か分かるように */
  .scroll table th:first-child, .scroll table td:first-child { position: sticky; left: 0; z-index: 2; background: var(--panel);
    box-shadow: 1px 0 0 var(--line); }
  .scroll table th:first-child { background: var(--panel-2); z-index: 3; }
  th, td { padding: 9px 7px; }
  table { font-size: 13px; }
  td .name { font-size: 13.5px; }

  /* 数字のカードは2列 */
  .stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat b { font-size: 20px; }
  .grid.two { grid-template-columns: 1fr; }

  /* レース一覧のボタンは押しやすく */
  .rc { min-height: 46px; display: flex; flex-direction: column; justify-content: center; }
  .days a { padding: 8px 14px; }
  .conds span { font-size: 12px; }
  .km { grid-template-columns: 6.5em 1fr 3.3em; }
  .foot { padding-bottom: 20px; }
}

/* ---------- トップの顔 ---------- */
.hero { background: linear-gradient(160deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 72%, #06262a) 100%);
  color: #fff; border-radius: var(--r); padding: 26px 22px 22px; margin-bottom: 14px; }
.hero-eyebrow { margin: 0 0 6px; font-size: 12.5px; letter-spacing: .06em; opacity: .82; }
.hero h1 { font-family: var(--font-brand); font-size: 30px; line-height: 1.25; margin: 0 0 10px; color: #fff; }
.hero-lead { margin: 0; font-size: 14px; line-height: 1.8; opacity: .93; max-width: 46em; }
.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin-top: 18px; }
.hero-stats > div { background: rgba(255, 255, 255, .13); border-radius: 10px; padding: 10px 12px; }
.hero-stats b { display: block; font-size: 24px; line-height: 1.1; }
.hero-stats span { display: block; font-size: 11.5px; opacity: .88; margin-top: 2px; }
.hero-stats small { display: block; font-size: 10.5px; opacity: .75; margin-top: 1px; }

/* 次に締め切るレース */
.next-race { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; text-decoration: none; color: var(--ink);
  background: var(--panel); border: 1px solid var(--signal); border-left-width: 4px; border-radius: var(--r);
  padding: 12px 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.next-label { font-size: 11.5px; font-weight: 700; color: var(--signal); }
.next-race b { font-size: 17px; }
.next-time { font-size: 14px; color: var(--ink-2); }
.next-go { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--accent); }

/* きょうの無料予想 */
.free-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
.free-card { display: grid; gap: 5px; text-decoration: none; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r); padding: 11px 13px; box-shadow: var(--shadow); }
.free-card.done { opacity: .62; }
.free-head { font-weight: 700; font-size: 14.5px; }
.free-pick { display: flex; align-items: center; gap: 7px; font-size: 15px; }
.free-p { font-size: 12.5px; color: var(--ink-2); }

/* できること */
.entry-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.entry-cards a { display: grid; gap: 4px; text-decoration: none; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); }
.entry-cards b { font-size: 15px; }
.entry-cards span { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }
.entry-cards a:hover { border-color: var(--accent); }

/* 会員の案内 */
.member-cta { margin-top: 18px; border-left: 4px solid var(--signal); }
.member-cta b { font-size: 15px; }
.member-cta p { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-2); }

@media (max-width: 719px) {
  .hero { padding: 20px 16px 18px; margin: 0 -12px 12px; border-radius: 0; }
  .hero h1 { font-size: 25px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .next-go { margin-left: 0; width: 100%; }
  .free-list { grid-template-columns: 1fr 1fr; }
  .entry-cards { grid-template-columns: 1fr; }
}

/* =========================================================
   NAGI visual system
   データ密度は保ったまま、余白・階層・押しやすさを整える。
   ========================================================= */
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.72;
  background:
    radial-gradient(circle at 8% 0%, rgba(73, 194, 215, .15), transparent 28rem),
    linear-gradient(180deg, #f8fcfd 0, var(--ground) 34rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body { background: var(--ground); }
}
:root[data-theme="dark"] body { background: var(--ground); }
a, button { -webkit-tap-highlight-color: transparent; }
a { text-underline-offset: .16em; text-decoration-thickness: .08em; }
:focus-visible { outline: 3px solid #f1a93b; outline-offset: 3px; }

.top {
  min-height: 72px;
  padding: 10px max(18px, calc((100vw - 1180px) / 2));
  gap: 10px 24px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border-bottom-color: color-mix(in srgb, var(--line) 78%, transparent);
  box-shadow: 0 5px 22px rgba(17, 61, 78, .06);
  backdrop-filter: blur(16px) saturate(1.15);
}
.brand { gap: 10px; flex: none; }
.brand-mark {
  position: relative;
  width: 50px;
  height: 50px;
  flex: none;
  border-radius: 0;
  background: url('/assets/nagi-logo-mark.webp') center / contain no-repeat;
  filter: drop-shadow(0 5px 8px rgba(8, 127, 156, .2));
  overflow: visible;
}
.brand-mark::before,
.brand-mark::after {
  content: '';
  position: absolute;
  left: 7px;
  width: 28px;
  height: 10px;
  border: 3px solid rgba(255,255,255,.96);
  border-color: rgba(255,255,255,.96) transparent transparent transparent;
  border-radius: 50%;
}
.brand-mark::before, .brand-mark::after { display: none; }
.brand-copy { display: grid; line-height: 1; gap: 3px; }
.brand-name {
  font-family: var(--font-brand);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: .035em;
}
.brand-sub { font-size: 10px; font-weight: 700; letter-spacing: .05em; color: var(--ink-2); }
.nav { gap: 2px; padding: 2px; }
.nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}
.nav a:hover { color: var(--accent-strong); background: var(--accent-soft); }
.nav a.on {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #0b98aa);
  box-shadow: 0 5px 13px rgba(8, 127, 156, .2);
}

main { max-width: 1180px; padding: 26px 22px 36px; }
h1, h2 { font-family: var(--font-brand); letter-spacing: .015em; }
h1 { font-size: clamp(24px, 3vw, 34px); line-height: 1.35; margin-top: 6px; }
h2 { font-size: 19px; margin: 28px 0 12px; }
h3 { font-size: 15px; }
.sub { font-size: 14px; }

.panel, .venue, .stat, .news-item, .free-card, .entry-cards a {
  border-color: color-mix(in srgb, var(--line) 84%, transparent);
}
.panel { padding: 18px; }
.stat { padding: 14px 16px; }
.stat b { color: var(--accent-strong); font-size: 25px; }
.stat span { font-size: 12.5px; font-weight: 700; }
.venue { padding: 15px 16px; }
.venue-name { font-family: var(--font-brand); font-size: 18px; }
.venue-series { font-size: 13px; }
.panel:hover, .venue:hover, .news-item:hover, .free-card:hover, .entry-cards a:hover {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
}
@media (hover: hover) {
  .news-item, .free-card, .entry-cards a, .rc, .next-race { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
  .news-item:hover, .free-card:hover, .entry-cards a:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
  .rc:hover { transform: translateY(-1px); border-color: var(--accent); }
}

.days { gap: 8px; margin-top: 16px; }
.days a, .chips a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: var(--line);
  box-shadow: 0 2px 8px rgba(17, 61, 78, .035);
}
.days a.on, .chips a.on { background: var(--accent); color: #fff; border-color: var(--accent); }

.races { gap: 7px; }
.rc { min-height: 48px; padding: 5px 2px; border-radius: 12px; background: var(--panel-2); }
.rc b { font-size: 15px; }
.rc small { font-size: 11px; }
.rc.next { background: var(--signal-soft); border-color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); }
.rc.free::after, .rc.member::after { font-size: 10px; }

.badge { padding: 2px 9px; font-size: 12px; }
.badge.warn { background: var(--signal-soft); }
.waku { width: 30px; height: 30px; border-radius: 9px; }

.tabs {
  gap: 7px;
  margin: 18px 0 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
}
.tabs button {
  min-height: 42px;
  padding: 8px 13px;
  border-radius: 11px;
  border-bottom: 0;
}
.tabs button:hover { color: var(--accent-strong); background: var(--accent-soft); }
.tabs button[aria-selected="true"] { color: #fff; background: var(--accent); border-bottom-color: transparent; }

.scroll { box-shadow: var(--shadow); }
table { font-size: 14px; }
th, td { padding: 10px 9px; }
th { font-size: 12px; letter-spacing: .02em; }
tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--panel-2) 44%, transparent); }
td .name { font-size: 14.5px; }
td .meta { font-size: 11.5px; }

.cta {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--signal);
  box-shadow: 0 7px 16px color-mix(in srgb, var(--signal) 25%, transparent);
}
.cta:hover { filter: brightness(.95); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cta { color: #102a34; box-shadow: none; }
}
:root[data-theme="dark"] .cta { color: #102a34; box-shadow: none; }
.rnav { gap: 6px; }
.rnav a { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }

.hero {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  isolation: isolate;
  padding: 38px min(34vw, 390px) 30px 34px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 28px;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.26), transparent 23%),
    linear-gradient(135deg, #0b8fa8 0%, #08738d 50%, #075568 100%);
  box-shadow: 0 18px 44px rgba(7, 95, 117, .19);
}
.hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: -8%;
  right: -8%;
  bottom: -42px;
  height: 118px;
  background:
    radial-gradient(72px 35px at 72px 0, transparent 94%, rgba(255,255,255,.18) 96% 100%, transparent 102%) 0 0 / 144px 70px repeat-x;
  opacity: .9;
}
.hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  right: clamp(8px, 4vw, 44px);
  bottom: -8px;
  width: min(33vw, 350px);
  height: min(31vw, 330px);
  background: url('/assets/nagi-mascot.webp') center bottom / contain no-repeat;
  filter: drop-shadow(0 12px 16px rgba(1, 40, 54, .18));
}
.hero-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; }
.hero h1 { max-width: 15em; font-size: clamp(31px, 4vw, 48px); font-weight: 900; letter-spacing: .04em; }
.hero-lead { max-width: 38em; font-size: 15px; font-weight: 400; }
.hero-stats { position: relative; z-index: 1; grid-template-columns: repeat(3, minmax(110px, 1fr)); max-width: 580px; }
.hero-stats > div { border: 1px solid rgba(255,255,255,.18); border-radius: 14px; backdrop-filter: blur(5px); }
.hero-stats b { font-size: 27px; }
.hero-stats span { font-size: 12px; }

.next-race { min-height: 62px; border-left-width: 6px; border-radius: 16px; padding: 14px 18px; }
.next-label { font-size: 12px; }
.next-race b { font-size: 18px; }
.next-go { color: var(--accent-strong); }
.free-card { border-left-width: 5px; border-radius: 16px; padding: 14px 15px; }
.free-head { font-size: 15px; }
.entry-cards a { min-height: 112px; align-content: center; border-radius: 18px; padding: 18px; }
.entry-cards b { color: var(--accent-strong); font-size: 16px; }
.entry-cards span { font-size: 13px; }

.news-item { padding: 15px 17px; }
.news-item b { font-size: 16px; }
.article h1 { font-size: clamp(25px, 3.4vw, 36px); }
.article-body { font-size: 16px; line-height: 1.9; }
.article-body h2 { font-size: 20px; }

.mem-form input { min-height: 48px; border-radius: 13px; background: var(--panel); }
.foot { max-width: 1180px; margin-top: 34px; padding: 24px 22px 44px; font-size: 13px; }
.foot-nav a { min-height: 38px; display: inline-flex; align-items: center; }

@media (max-width: 1020px) and (min-width: 720px) {
  .top { padding-inline: 16px; }
  .nav a { padding-inline: 8px; font-size: 12.5px; }
  .hero { padding-right: 34%; }
}

@media (max-width: 719px) {
  body { font-size: 15.5px; padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .top { min-height: 60px; padding: 7px 14px; }
  .brand-mark { width: 44px; height: 44px; }
  .brand-name { font-size: 16px; }
  .brand-sub { font-size: 9px; }
  main { padding: 14px 12px 26px; }
  h1 { font-size: 24px; }
  h2 { font-size: 18px; }
  .panel { padding: 15px; }

  .hero {
    min-height: 410px;
    margin: 0 -12px 15px;
    padding: 25px 18px 190px;
    border: 0;
    border-radius: 0 0 28px 28px;
  }
  .hero::after { right: -2px; bottom: -14px; width: 210px; height: 215px; }
  .hero h1 { max-width: 12em; font-size: 30px; }
  .hero-lead { font-size: 14px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 15px; }
  .hero-stats > div { padding: 9px 8px; }
  .hero-stats b { font-size: 21px; }
  .hero-stats span { font-size: 10.5px; }
  .hero-stats small { font-size: 9.5px; }

  .tabs { top: 59px; margin: 10px -12px; padding: 5px 12px; border-left: 0; border-right: 0; border-radius: 0; }
  .tabs button { min-height: 42px; padding: 8px 11px; }
  .tabbar {
    min-height: 68px;
    border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    box-shadow: 0 -8px 24px rgba(17, 61, 78, .1);
  }
  .tabbar a, .tabbar button { min-height: 66px; font-size: 11px; border-radius: 12px; }
  .tabbar svg { width: 24px; height: 24px; }
  .tabbar .on { position: relative; color: var(--accent); }
  .tabbar .on::before { content: ''; position: absolute; top: 3px; width: 38px; height: 3px; border-radius: 99px; background: var(--accent); }
  .more:not([hidden]) { bottom: calc(76px + env(safe-area-inset-bottom)); border-radius: 18px; }
  .more a { min-height: 48px; display: flex; align-items: center; }

  .free-list { grid-template-columns: 1fr; }
  .next-race { align-items: center; }
  .rnav a { min-height: 42px; }
  th, td { padding: 10px 8px; }
}

@media (max-width: 390px) {
  .hero { min-height: 430px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); max-width: 250px; }
  .hero::after { width: 185px; height: 195px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* =========================================================
   White calm theme
   端末設定に左右されず、白を主役にした安心感のある画面にする。
   ========================================================= */
:root,
:root[data-theme="dark"] {
  color-scheme: light;
  --ground: #f5fafb;
  --panel: #ffffff;
  --panel-2: #edf7f8;
  --ink: #173544;
  --ink-2: #58727e;
  --line: #d5e5e9;
  --accent: #087f9c;
  --accent-strong: #075f75;
  --accent-soft: #e1f4f6;
  --signal: #cb4638;
  --signal-soft: #fff0ed;
  --hit: #087a55;
  --miss: #b83c33;
  --bar: #1498ad;
  --shadow: 0 2px 6px rgba(22, 68, 84, .045), 0 12px 32px rgba(22, 68, 84, .065);
  --shadow-hover: 0 8px 22px rgba(22, 68, 84, .11);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: light;
    --ground: #f5fafb; --panel: #ffffff; --panel-2: #edf7f8; --ink: #173544; --ink-2: #58727e;
    --line: #d5e5e9; --accent: #087f9c; --accent-strong: #075f75; --accent-soft: #e1f4f6;
    --signal: #cb4638; --signal-soft: #fff0ed; --hit: #087a55; --miss: #b83c33; --bar: #1498ad;
    --shadow: 0 2px 6px rgba(22, 68, 84, .045), 0 12px 32px rgba(22, 68, 84, .065);
    --shadow-hover: 0 8px 22px rgba(22, 68, 84, .11);
  }
}

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(73, 194, 215, .13), transparent 29rem),
    linear-gradient(180deg, #ffffff 0, var(--ground) 35rem);
}
.top {
  background: rgba(255, 255, 255, .94);
  border-bottom-color: rgba(204, 224, 230, .9);
  box-shadow: 0 5px 22px rgba(22, 68, 84, .055);
}
.panel, .venue, .stat, .news-item, .free-card, .entry-cards a, .scroll, .tabs {
  background-color: #ffffff;
}

/* 枠番はどこに出ても同じ真円。色は公式の1〜6号艇色を保つ。 */
.waku {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(23, 53, 68, .13);
}
.w1 { border-color: #80939b; box-shadow: inset 0 0 0 1px #ffffff, 0 2px 5px rgba(23, 53, 68, .13); }

.hero {
  color: var(--ink);
  border: 1px solid #cce6ea;
  background:
    radial-gradient(circle at 84% 18%, rgba(75, 199, 216, .24), transparent 24%),
    linear-gradient(135deg, #ffffff 0%, #effafb 56%, #e0f3f5 100%);
  box-shadow: 0 18px 44px rgba(22, 98, 116, .11);
}
.hero::before {
  background: radial-gradient(72px 35px at 72px 0, transparent 94%, rgba(8, 127, 156, .14) 96% 100%, transparent 102%) 0 0 / 144px 70px repeat-x;
}
.hero-eyebrow { color: var(--accent-strong); opacity: 1; }
.hero h1 { color: var(--accent-strong); }
.hero-lead { color: var(--ink); opacity: .94; }
.hero-stats > div {
  color: var(--ink);
  background: rgba(255, 255, 255, .9);
  border-color: rgba(172, 215, 223, .82);
  box-shadow: 0 5px 14px rgba(22, 98, 116, .07);
}
.hero-stats b { color: var(--accent-strong); }
.hero-stats span, .hero-stats small { color: var(--ink-2); opacity: 1; }

:root:not([data-theme="light"]) .cta,
:root[data-theme="dark"] .cta { color: #ffffff; }

@media (max-width: 719px) {
  .tabbar { background: rgba(255, 255, 255, .97); }
  .tabs { background: rgba(245, 250, 251, .97); }
}

/* トップの余白：ねことペンギンがボートで案内 */
.hero { padding-right: min(46vw, 560px); }
.hero::after {
  right: clamp(12px, 3vw, 34px);
  bottom: 12px;
  width: min(44vw, 520px);
  height: min(29vw, 340px);
  background-image: url('/assets/hero-mascots-boat.webp');
  filter: drop-shadow(0 13px 18px rgba(8, 92, 112, .16));
}

@media (max-width: 719px) {
  .hero {
    min-height: 570px;
    padding: 25px 18px 228px;
  }
  .hero::after {
    right: 4px;
    bottom: 10px;
    width: min(92vw, 355px);
    height: 225px;
  }
}

@media (max-width: 390px) {
  .hero { min-height: 590px; }
  .hero::after { width: 340px; height: 215px; }
}

/* トップの数値：自動送り＋指で横スワイプできるカルーセル */
.hero-stats {
  display: flex;
  max-width: 540px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 34px 8px 1px;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 24px), transparent 100%);
}
.hero-stats::-webkit-scrollbar { display: none; }
.hero-stats > div {
  flex: 0 0 clamp(136px, 29%, 158px);
  min-height: 82px;
  scroll-snap-align: start;
}
.hero-stats:focus-visible {
  outline: 3px solid rgba(8, 127, 156, .28);
  outline-offset: 4px;
  border-radius: 16px;
}

@media (max-width: 719px) {
  .hero-stats {
    width: 100%;
    max-width: none;
    padding-right: 42px;
  }
  .hero-stats > div {
    flex-basis: min(44vw, 154px);
    min-height: 94px;
    padding: 12px 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-stats { scroll-behavior: auto; }
}

/* 動物キャラはページ全体の薄い透かしにし、トップは凪のキャラへ戻す */
body { position: relative; }
body::before {
  content: '';
  position: fixed;
  z-index: 0;
  inset: 70px 0 0;
  pointer-events: none;
  background: url('/assets/hero-mascots-boat.webp') calc(100% + 55px) 74% / min(54vw, 640px) auto no-repeat;
  opacity: .045;
}
main,
.foot { position: relative; z-index: 1; }

.hero {
  min-height: 300px;
  padding: 38px min(34vw, 390px) 30px 34px;
}
.hero::after {
  right: clamp(8px, 4vw, 44px);
  bottom: -8px;
  width: min(33vw, 350px);
  height: min(31vw, 330px);
  background: url('/assets/nagi-mascot.webp') center bottom / contain no-repeat;
  opacity: 1;
  filter: drop-shadow(0 12px 16px rgba(1, 40, 54, .18));
}

:root[data-theme="dark"] body::before { opacity: .025; }
:root[data-theme="dark"] .hero::after { opacity: 1; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body::before { opacity: .04; }
  :root:not([data-theme="light"]) .hero::after { opacity: 1; }
}

@media (max-width: 719px) {
  body::before {
    top: 60px;
    background-position: calc(100% + 38px) 72%;
    background-size: min(108vw, 480px) auto;
    opacity: .05;
  }
  .hero {
    min-height: 410px;
    padding: 25px 18px 190px;
  }
  .hero::after {
    right: -2px;
    bottom: -14px;
    width: 210px;
    height: 215px;
  }
}

@media (max-width: 390px) {
  .hero { min-height: 430px; padding: 25px 18px 190px; }
  .hero::after { width: 185px; height: 195px; }
}

/* タイトルはロゴ画像ではなく、文字の強弱と余白で見せる */
.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 610px;
  margin: -9px 0 4px;
  padding: 17px 20px 18px;
  border: 1px solid rgba(143, 205, 216, .48);
  border-left: 5px solid var(--accent);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(247,253,254,.7));
  box-shadow: 0 12px 30px rgba(8, 92, 112, .09), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
}
.hero-brandline { display: flex; align-items: center; margin-bottom: 7px; }
.hero-copy .hero-eyebrow {
  width: fit-content;
  margin: 0;
  padding: 4px 12px;
  border: 1px solid rgba(8, 127, 156, .19);
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(223, 243, 246, .78);
  font-size: 12px;
  letter-spacing: .14em;
}
.hero-copy h1 {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 .13em;
  max-width: none;
  margin: 0 0 11px;
  color: var(--accent-strong);
  font-size: clamp(31px, 4vw, 48px);
  line-height: 1.16;
  letter-spacing: .025em;
}
.hero-title-boat { font-weight: 900; }
.hero-title-lab {
  position: relative;
  color: var(--accent-strong);
  font-weight: 900;
  white-space: nowrap;
}
.hero-title-lab::after {
  content: '';
  position: absolute;
  z-index: -1;
  left: -.04em;
  right: -.08em;
  bottom: .05em;
  height: .3em;
  border-radius: 99px;
  background: rgba(92, 204, 214, .22);
}
.hero-copy .hero-lead {
  max-width: 42em;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.75;
}
.hero-copy .hero-lead span { display: block; }

/* 猫・ペンギンは凪の左側に配置 */
.hero-crew {
  position: absolute;
  z-index: 1;
  left: auto;
  right: min(26vw, 300px);
  bottom: -6px;
  width: min(22vw, 250px);
  height: min(14vw, 160px);
  background: url('/assets/hero-mascots-boat.webp') left bottom / contain no-repeat;
  filter: drop-shadow(0 10px 14px rgba(1, 40, 54, .14));
  transform-origin: 58% 82%;
  will-change: transform;
  animation: hero-boat-ride 7.6s ease-in-out infinite;
  pointer-events: none;
}

/* キャラクターの背後をゆっくり流れる二層の波 */
.hero::before {
  z-index: 0;
  left: -16%;
  right: -16%;
  bottom: -54px;
  height: 178px;
  background:
    radial-gradient(70px 34px at 70px 0, transparent 94%, rgba(8,127,156,.19) 96% 100%, transparent 102%) 0 20px / 140px 70px repeat-x,
    radial-gradient(92px 41px at 92px 0, transparent 95%, rgba(255,255,255,.82) 97% 100%, transparent 102%) 38px 0 / 184px 84px repeat-x;
  opacity: .82;
  pointer-events: none;
  animation: hero-wave-flow 11s linear infinite, hero-wave-breathe 3.8s ease-in-out infinite alternate;
}
.hero::after { z-index: 1; }
.hero-stats { position: relative; z-index: 2; }

@keyframes hero-wave-flow {
  from { background-position: 0 20px, 38px 0; }
  to { background-position: 280px 20px, -330px 0; }
}
@keyframes hero-wave-breathe {
  from { transform: translateY(0); }
  to { transform: translateY(8px); }
}

/* 波の3.8秒往復に合わせ、ボートが静かに浮き沈みする */
@keyframes hero-boat-ride {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-.6deg); }
  25% { transform: translate3d(2px, -6px, 0) rotate(.8deg); }
  50% { transform: translate3d(0, 2px, 0) rotate(-.8deg); }
  75% { transform: translate3d(-2px, -5px, 0) rotate(.6deg); }
}

@media (max-width: 719px) {
  .hero-copy {
    margin: -7px 0 3px;
    padding: 14px 15px 16px;
    border-radius: 18px;
  }
  .hero-copy .hero-eyebrow { padding: 4px 9px; font-size: 11.5px; letter-spacing: .08em; }
  .hero-copy h1 { display: block; margin: 5px 0 9px; font-size: 27px; }
  .hero-title-boat { margin-right: .13em; }
  .hero-copy .hero-lead { font-size: 13.5px; line-height: 1.7; }
  .hero-copy .hero-lead span { display: inline; }
  .hero-copy .hero-lead span + span::before { content: ' '; }
  .hero-crew { left: 4px; right: auto; bottom: 2px; width: 182px; height: 112px; }
  .hero::after { right: -6px; width: 188px; height: 196px; }
  .hero::before { bottom: -48px; height: 154px; opacity: .76; }
}

@media (max-width: 390px) {
  .hero-copy h1 { font-size: 25px; }
  .hero-crew { left: 0; width: 162px; height: 100px; }
  .hero::after { width: 170px; height: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none !important; }
  .hero-crew { animation: none !important; transform: none !important; }
}

/* キーボード利用時だけ現れる本文スキップ */
.skip {
  position: fixed;
  z-index: 100;
  top: -80px;
  left: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  color: #fff;
  background: var(--accent-strong);
}
.skip:focus { top: 8px; }

/* LINEの友だち追加ボタン。LINEの指定色（#06C755）。
   ⚠ 上の :root[data-theme=...] .cta は (0,2,0) で .cta.line と同じ強さなので、
      必ずこの位置（ファイル末尾）に置く。前に出すと色が戻る。 */
.cta.line,
:root:not([data-theme="light"]) .cta.line,
:root[data-theme="dark"] .cta.line {
  background: #06c755;
  color: #ffffff;
  box-shadow: 0 7px 16px rgba(6, 199, 85, .25);
}

/* 表が画面より広いときは、その表の中だけ横に動かす（ページ全体を横に動かさない） */
.tw { overflow-x: auto; }
