/*
Theme Name: 丹生川漁業組合
Theme URI: https://nyu-gyokyo.com/
Description: 丹生川漁業組合のサイト用テーマ。解禁カレンダー、遊漁料金、漁場マップ、釣果の一覧を備える。
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: nyu-gyokyo
*/

/* 川の深緑を基調に、差し色は鮎の追星(エラ後ろの黄色)だけ。 */
:root {
  color-scheme: light;
  --bg: #f2f6f5;
  --surface: #ffffff;
  --ink: #12262a;
  --muted: #4f6468;
  --line: #d3e0df;
  --river: #0e5560;
  --on-river: #ffffff;
  --hero-bg: #0a3a43;
  --hero-ink: #eaf5f4;
  --hero-muted: #a9c9cb;
  --ayu: #e9b824;
  --on-ayu: #2b2100;
  --alert: #b3361b;
  --alert-bg: #fbe9e4;
  --font-display: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0c1b1e; --surface: #13272b; --ink: #e6f0ef; --muted: #9db4b6; --line: #234045;
    --river: #5cc3c9; --on-river: #06262b; --hero-bg: #082a30; --ayu: #f0c94a;
    --alert: #ff9a82; --alert-bg: #3a1d17;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.8 var(--font-body); -webkit-text-size-adjust: 100%; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ayu); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ayu); color: var(--on-ayu); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
.wrap.narrow { max-width: 760px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.4; text-wrap: balance; margin: 0; }
p { margin: 0; }
.label { font-size: 12px; letter-spacing: .14em; color: var(--muted); font-weight: 500; }

/* ヘッダー */
.site-head { background: var(--hero-bg); color: var(--hero-ink); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; flex-wrap: wrap; padding-block: 14px; }
.brand { font: 700 20px/1.3 var(--font-display); letter-spacing: .08em; text-decoration: none; }
.brand small { display: block; font: 400 11px/1.4 var(--font-body); letter-spacing: .12em; color: var(--hero-muted); }
.nav { display: flex; gap: 4px 20px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; font-size: 14px; font-weight: 500; }
.nav a { text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; display: inline-block; }
.nav a:hover, .nav .current-menu-item a { border-bottom-color: var(--ayu); }

/* ヒーロー(トップ) */
.hero { background: linear-gradient(90deg, rgba(8,42,48,.94) 0%, rgba(8,42,48,.78) 42%, rgba(8,42,48,.38) 100%), url("assets/images/hero.jpg") center / cover var(--hero-bg); color: var(--hero-ink); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 36px; padding-block: 56px 64px; align-items: start; }
.hero-label { color: var(--hero-muted); }
.hero h1 { margin-top: 10px; font-size: clamp(34px, 6vw, 56px); font-weight: 800; letter-spacing: .06em; }
.hero .lead { margin-top: 16px; color: var(--hero-muted); max-width: 30em; }
.hero .place { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; font-size: 13px; }
.hero .place span { border: 1px solid rgba(234,245,244,.35); border-radius: 999px; padding: 2px 12px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; border-radius: 6px; font-weight: 700; text-decoration: none; font-size: 15px; }
.btn.primary { background: var(--ayu); color: var(--on-ayu); }
.btn.ghost { border: 1px solid rgba(234,245,244,.5); }
.btn:hover { filter: brightness(1.08); }

/* 下層ページの見出し帯 */
.page-head { background: var(--hero-bg); color: var(--hero-ink); }
.page-head .wrap { padding-block: 36px 40px; }
.page-head h1 { font-size: clamp(26px, 4.5vw, 38px); font-weight: 700; letter-spacing: .04em; }
.page-head .meta-line { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--hero-muted); margin-bottom: 8px; }
.page-head .cat { border-color: var(--hero-muted); color: var(--hero-ink); }

/* いまのお知らせ */
.notice { background: var(--surface); color: var(--ink); border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.notice header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 14px 20px 10px; border-bottom: 1px solid var(--line); }
.notice h2 { font-size: 18px; }
.notice header span { font-size: 12px; color: var(--muted); }
.notice .item { padding: 16px 20px; display: grid; gap: 6px; }
.notice .item + .item { border-top: 1px solid var(--line); }
.notice .item.alert-item { background: var(--alert-bg); }
.notice .big { font: 700 20px/1.5 var(--font-display); }
.notice .big a { text-decoration: none; }
.fb-embed { background: var(--surface); max-width: 500px; border-radius: 8px; overflow: hidden; }
.notice .fb-embed { max-width: none; border-radius: 0; }
.fb-embed iframe { display: block; width: 100%; max-width: 500px; border: 0; }
.fb-fallback { padding: 10px 20px; font-size: 13px; color: var(--muted); }
.fb-fallback a { color: var(--river); font-weight: 700; text-decoration: none; }
.fb-fallback a:hover { text-decoration: underline; }
.notice .fb-embed { border-top: 1px solid var(--line); padding-top: 8px; }
.notice-links { display: grid; }
.notice-links .notice-more + .notice-more { border-top: 1px solid var(--line); }
.notice-more { display: block; padding: 12px 20px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--river); text-decoration: none; }
.notice-more:hover { text-decoration: underline; }
.notice-body { font-size: 15px; }
.notice-body p + p { margin-top: .4em; }
.meta { font-size: 12px; color: var(--muted); }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 0 10px; border-radius: 3px; background: var(--river); color: var(--on-river); letter-spacing: .06em; }
.tag.alert { background: var(--alert); color: #fff; }
@media (prefers-color-scheme: dark) { .tag.alert { color: #2a0d06; } }

/* セクション共通 */
section.block { padding-block: 64px 0; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.head h2 { font-size: clamp(24px, 4vw, 32px); font-weight: 700; }
.head p { color: var(--muted); font-size: 14px; max-width: 32em; }
.wrap > section.block:last-child { padding-bottom: 0; }

/* 解禁カレンダー */
.season { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 22px 24px 20px; }
.scroll-x { overflow-x: auto; }
.cal { min-width: 700px; position: relative; display: grid; grid-template-columns: 148px 1fr 164px; row-gap: 12px; align-items: center; }
.cal .months { grid-column: 2; display: grid; grid-template-columns: repeat(9, 1fr); font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.cal .months span { padding-bottom: 6px; border-left: 1px solid var(--line); padding-left: 6px; }
.cal .name { font-weight: 700; font-size: 15px; line-height: 1.4; }
.cal .name small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.track { position: relative; height: 26px; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 9 - 1px), var(--line) calc(100% / 9 - 1px) calc(100% / 9)); border-radius: 3px; }
.bar { position: absolute; top: 3px; bottom: 3px; border-radius: 3px; background: var(--river); color: var(--on-river); font-size: 11px; line-height: 20px; font-weight: 700; padding-inline: 8px; overflow: hidden; white-space: nowrap; }
.bar.ayu { background: var(--ayu); color: var(--on-ayu); }
.bar.fade { background: linear-gradient(90deg, transparent, var(--river) 45%); }
.bar.ended { background: var(--line); color: var(--muted); }
.state { justify-self: end; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-align: center; line-height: 1.5; }
.state.on { background: var(--river); color: var(--on-river); border-color: var(--river); }
.state.ended { background: var(--bg); color: var(--ink); border-style: dashed; border-color: var(--muted); }
.today { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--alert); pointer-events: none; }
.today i { position: absolute; bottom: -2px; left: 4px; font: 700 11px/1 var(--font-body); color: var(--alert); white-space: nowrap; background: var(--surface); padding: 2px 4px; }
.season .foot { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* 入口 */
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.quick a { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px 20px 18px; text-decoration: none; display: grid; gap: 6px; align-content: start; transition: border-color .15s, transform .15s; }
.quick a:hover { border-color: var(--river); transform: translateY(-2px); }
.quick b { font: 700 19px/1.4 var(--font-display); }
.quick span { font-size: 13px; color: var(--muted); line-height: 1.6; }
.quick em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--river); margin-top: 4px; }

/* 釣果・川の状況 */
.reports { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.feed { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 4px 16px; padding: 18px 22px; }
.feed li + li { border-top: 1px solid var(--line); }
.feed time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.9; }
.feed h3 { font: 700 17px/1.5 var(--font-body); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.feed h3 a { text-decoration: none; }
.feed h3 a:hover { text-decoration: underline; }
.feed p { grid-column: 2; font-size: 14px; color: var(--muted); }
.feed li.more-row { display: block; padding: 0; }
.feed .more { display: block; padding: 14px 22px; font-weight: 700; font-size: 14px; color: var(--river); text-decoration: none; }
.cat { font-size: 11px; font-weight: 700; padding: 0 8px; border-radius: 3px; border: 1px solid var(--river); color: var(--river); letter-spacing: .06em; }
.cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.cats a { font-size: 13px; padding: 2px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; }
.cats a[aria-current="page"] { background: var(--river); color: var(--on-river); border-color: var(--river); }
.stock { background: var(--hero-bg); color: var(--hero-ink); border-radius: 8px; padding: 24px; }
.stock h3 { font-size: 18px; }
.stock .sub { color: var(--hero-muted); font-size: 13px; margin-top: 10px; }
.stock ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.stock li { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 12px; border-top: 1px solid rgba(234,245,244,.2); padding-top: 8px; }
.stock time { color: var(--hero-muted); font-variant-numeric: tabular-nums; }
.stock a { text-decoration: none; }
.stock a:hover { text-decoration: underline; }

/* 遊漁料金 */
.fish-group + .fish-group { margin-top: 36px; }
.fish-head { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; margin-bottom: 12px; }
.fish-head h3 { font-size: 26px; }
.fish-meta { font-size: 13px; color: var(--muted); }
.badge { font-size: 12px; font-weight: 700; padding: 1px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge.on { background: var(--river); color: var(--on-river); border-color: var(--river); }
.badge.ended { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.fish-group.is-ended .prices { opacity: .6; }
.empty-note { background: var(--surface); border: 1px dashed var(--line); border-radius: 8px; padding: 28px; text-align: center; color: var(--muted); }
.prices { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.price { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 22px; display: grid; gap: 14px; align-content: start; }
.price h4 { font: 700 20px/1.4 var(--font-display); margin: 0; }
.price .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.price > .row:first-child { border-top: 0; padding-top: 0; }
.price .row small { color: var(--muted); display: block; font-size: 12px; line-height: 1.5; }
.price .yen { font: 700 22px/1.3 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.price .yen small { font: 400 12px var(--font-body); display: inline; margin-left: 2px; }
.price .year { background: var(--bg); border-radius: 6px; padding: 10px 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; font-weight: 700; }
.ayu-card { border-top: 4px solid var(--ayu); }

/* 漁場マップ */
.spots { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.mapbox { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 12px 16px; }
.mapbox svg { display: block; width: 100%; max-width: 440px; height: auto; margin: 0 auto; }
.mapbox svg text { font-family: var(--font-body); fill: var(--ink); }
.mapbox .legend { list-style: none; margin: 10px 8px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--muted); }
.mapbox .legend li { display: flex; align-items: center; gap: 6px; }
.mapbox .legend i { display: inline-block; width: 22px; height: 6px; border-radius: 3px; }
.mapbox .legend .legend-ban { background: transparent; border-top: 3px dotted var(--alert); height: 0; border-radius: 0; }
.mapbox figcaption { margin: 8px 8px 0; font-size: 12px; color: var(--muted); }
.spotlist { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
.spotlist h3 { font-size: 18px; }
.spotlist dl { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 0 14px; margin: 14px 0 0; font-size: 15px; }
.spotlist dt, .spotlist dd { border-top: 1px solid var(--line); padding: 10px 0; margin: 0; }
.spotlist dt { font-weight: 700; font-size: 14px; }
.spotlist dd small { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; margin-bottom: 6px; }
.spotlist dd.warn { color: var(--alert); font-weight: 700; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; color: #fff; padding: 0 9px; border-radius: 3px; margin-right: 4px; line-height: 1.7; }
.chip.ticket { background: #c85a1c; }
.chip.decoy { background: #3f8a22; }

/* アクセス */
.access { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; align-items: stretch; }
.access-info { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.access-info h2 { font-size: 22px; }
.access-info dl { display: grid; grid-template-columns: 5em minmax(0, 1fr); gap: 0 14px; margin: 14px 0 0; font-size: 15px; }
.access-info dt, .access-info dd { border-top: 1px solid var(--line); padding: 10px 0; margin: 0; overflow-wrap: anywhere; }
.access-info dt { font-weight: 700; font-size: 14px; }
.access-info .cta { margin-top: 16px; }
.btn.outline { border: 1px solid var(--river); color: var(--river); }
.access-map { min-height: 380px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.access-map iframe { display: block; width: 100%; height: 100%; min-height: 380px; border: 0; }

/* 遊漁券の買い方 */
.ticket-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ticket-grid .access-info h3 { font-size: 18px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.place-list { list-style: none; margin: 14px 0 0; padding: 0; font: 700 20px/1.5 var(--font-display); }
.place-list li { border-top: 1px solid var(--line); padding: 10px 0; }
.ticket-text { margin-top: 12px; font-size: 15px; }
.ticket-tel { margin-top: 28px; font-size: 15px; }

/* 連絡先(フッター) */
.contact { background: var(--hero-bg); color: var(--hero-ink); margin-top: 72px; }
.contact .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 48px; padding-block: 48px; }
.contact h2 { font-size: 26px; }
.contact-lead { margin-top: 12px; color: var(--hero-muted); font-size: 15px; }
.contact dl { display: grid; grid-template-columns: 7em 1fr; gap: 10px 16px; margin: 0; font-size: 15px; }
.contact dt { color: var(--hero-muted); }
.contact dd { margin: 0; overflow-wrap: anywhere; }
.contact dd a { color: var(--ayu); }
.copyright { background: var(--hero-bg); color: var(--hero-muted); border-top: 1px solid rgba(234,245,244,.15); font-size: 12px; padding-block: 20px; }
.copyright .wrap { display: grid; gap: 12px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; }
.footer-nav a { color: var(--hero-ink); text-decoration: none; padding-block: 4px; }
.footer-nav a:hover { text-decoration: underline; }

/* 記事・固定ページの本文 */
.entry-content { padding-block: 40px 8px; font-size: 16px; line-height: 1.95; overflow-wrap: anywhere; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { font-size: 24px; margin-top: 1.8em; }
.entry-content h3 { font-size: 19px; margin-top: 1.5em; }
.entry-content a { color: var(--river); }
.entry-content iframe { width: 100%; max-width: 100%; border: 0; }
.entry-content table { border-collapse: collapse; display: block; overflow-x: auto; max-width: 100%; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 12px; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; }
.post-nav a, .more-link { color: var(--river); font-weight: 700; text-decoration: none; }
.more-link { display: inline-block; margin-top: 20px; font-size: 14px; }
.navigation.pagination { margin-top: 24px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nav-links a, .nav-links span { padding: 4px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); text-decoration: none; font-size: 14px; }
.nav-links .current { background: var(--river); color: var(--on-river); border-color: var(--river); }
.comments { margin-top: 48px; padding-bottom: 8px; }
.comments h2 { font-size: 20px; }
.comments h2 span { font: 400 14px var(--font-body); color: var(--muted); }
.comment-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.comment-list .children { list-style: none; padding-left: 20px; }
.comment-body { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; font-size: 14px; }
.comment-meta { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.comment-form input[type="submit"] { font: 700 15px var(--font-body); min-height: 44px; padding: 0 22px; border: 0; border-radius: 6px; background: var(--river); color: var(--on-river); cursor: pointer; }
.search-form { display: flex; gap: 8px; margin-top: 16px; }
.search-form input[type="search"] { flex: 1; min-width: 0; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.search-form input[type="submit"] { font: 700 15px var(--font-body); padding: 0 18px; border: 0; border-radius: 6px; background: var(--river); color: var(--on-river); }

@media (max-width: 900px) {
  .hero .wrap, .reports, .spots, .contact .wrap, .access, .ticket-grid { grid-template-columns: minmax(0, 1fr); }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero .wrap { padding-block: 40px 44px; }
  section.block { padding-block-start: 48px; }
}
@media (max-width: 480px) {
  .quick { grid-template-columns: minmax(0, 1fr); }
  .feed li { grid-template-columns: minmax(0, 1fr); padding: 16px 18px; }
  .feed p { grid-column: 1; }
  .season { padding: 18px 16px; }
  .contact dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .contact dd { margin-bottom: 12px; }
  .spotlist dl { grid-template-columns: minmax(0, 1fr); }
  .spotlist dt { border-bottom: 0; padding-bottom: 0; }
  .spotlist dd { border-top: 0; padding-top: 2px; }
}
