/* ==========================================================
   Mizuna.info  top page
   ========================================================== */

:root {
  --teal: #1b7fb0;
  --teal-edge: #8cc4d8;
  --link: #0a63a0;
  --teal-text: #13617f; /* タブ・ボタン等の青い文字 */
  --text: #111;
  --pink-1: #ffc7d3;
  --pink-2: #ff9fb4;
  --red: #d11a2a;
  --line: #ddd;
  --line-strong: #9fb3bd; /* 書籍・メディアミックス一覧の行罫線 */
  --shop: #a8d4f2;
  --max: 1100px;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--text);
  background: #f3f3f3; /* 白い本文エリアの外側 */
  display: flex;               /* 本文が短くてもフッターを下端に */
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, dl, dd, p { margin: 0; padding: 0; }
ul { list-style: none; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Header ---------- */
.site-header {
  background: #14506f url("../images/bg_ao2.jpg") repeat; /* 外側: 濃い青 */
  background-size: 512px 512px;
  overflow: hidden;
}
.site-header__inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  height: 84px;
  background: #1b7fb0 url("../images/bg_ao.jpg") repeat; /* 中央: 明るい青 */
  background-size: 512px 512px;
}
.site-header__logo { margin: 0; }
/* スマホ: 縦長用ロゴ(_s)を固定幅で表示し、拡大しすぎない */
.site-header__logo img {
  position: absolute;
  bottom: 10px;
  left: 10px;   /* 画像左の透明余白(約18px)込みで、文字の左余白は約28px */
  width: 219px;  /* 730x200の画像を高さ60pxで表示 */
  max-width: calc(100% - 16px);
  height: auto;
}
.site-header__bird {
  display: none;
  position: absolute;
  right: 0;
  bottom: -14px;
  width: 52px;
  height: auto;
}

/* ---------- Global nav ---------- */
.gnav {
  background: #000; /* メニュー外(両端)は黒ベタ */
}
.gnav ul {
  max-width: var(--max);
  margin: 0 auto;
}
.gnav li { border-top: 1px solid rgba(255, 255, 255, .22); }
.gnav a {
  display: block;
  padding: 12px 16px;
  color: #fff;
  font-size: .95rem;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
}
.gnav a:hover { background: rgba(255, 255, 255, .15); }

/* ハンバーガーボタン(スマホ: ヘッダー内右端) */
.gnav__toggle {
  display: none;
  position: absolute;
  top: 50%;
  right: 6px;
  z-index: 2;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  transform: translateY(-50%);
}
.js .gnav__toggle { display: flex; }
.gnav__bars,
.gnav__bars::before,
.gnav__bars::after {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  transition: transform .2s, background .2s;
}
.gnav__bars { position: relative; }
.gnav__bars::before,
.gnav__bars::after { content: ""; position: absolute; left: 0; }
.gnav__bars::before { top: -8px; }
.gnav__bars::after { top: 8px; }
.gnav__toggle[aria-expanded="true"] .gnav__bars { background: transparent; box-shadow: none; }
.gnav__toggle[aria-expanded="true"] .gnav__bars::before { transform: translateY(8px) rotate(45deg); }
.gnav__toggle[aria-expanded="true"] .gnav__bars::after { transform: translateY(-8px) rotate(-45deg); }

/* JS有効時、スマホではメニューを閉じた状態から開始 */
/* スマホ: ヘッダー直下に半透明(濃いめ)で重ねて開く */
.js .gnav {
  display: none;
  position: absolute;
  top: 84px; /* ヘッダーの高さ */
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(0, 0, 0, .86);
}
.js .gnav.is-open { display: block; }

/* ---------- Layout ---------- */
.layout {
  display: block;
  flex: 1 0 auto;      /* 余った高さを本文エリアが埋める */
  background: #fff;
  padding-top: 20px;
  padding-bottom: 20px;
}
.main { min-width: 0; }
.side { margin-top: 36px; }

/* ---------- Headings (teal bar) ---------- */
.bar {
  margin: 0 0 14px;
  padding: 6px 20px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: bold;
  letter-spacing: .5em;
  line-height: 1.6;
  background: var(--teal) url("../images/bg_ao.jpg") repeat;
  background-size: 400px 400px;
  border: 3px solid var(--teal-edge);
  border-radius: 10px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.bar--side { text-align: center; padding-left: 0.5em; }

/* ---------- Topics banner ---------- */
.topics {
  display: block;
  margin-bottom: 28px;
  padding: 10px 8px;
  text-align: center;
  font-weight: bold;
  color: var(--link);
  background: linear-gradient(90deg, var(--pink-1), var(--pink-2) 50%, var(--pink-1));
  border: 8px solid var(--pink-1);
  border-radius: 16px;
  outline: 0;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .55);
}
.topics:hover { text-decoration: none; filter: brightness(1.04); }
/* 改行はHTMLの<br>のみ。文字が収まらない時はJSで文字を縮小(JS無効時はvw基準で縮小) */
.topics { font-size: clamp(.7rem, 3.6vw, 1rem); }
.topics__text { display: inline-block; white-space: nowrap; }

/* ---------- Feature (新刊) ---------- */
/* スマホ: 書影を中央寄せ、情報は書影の下。バッジは書影の左上に被せる */
.feature {
  --badge: 82px;
  position: relative;
  margin-bottom: 40px;
}
.feature__badge {
  position: absolute;
  top: 0;
  left: calc(50% - 105px - var(--badge) + 15px); /* 書影(210px)左端から15px被せる */
  z-index: 2;
  width: var(--badge);
  height: var(--badge);
}
.feature__title {
  margin: 0 0 14px;
  padding-left: calc(50% - 90px); /* バッジの右端から */
  font-size: clamp(.85rem, 4.4vw, 1.15rem);
  line-height: 1.5;
}
.feature__body {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 16px;
}
.feature__cover { display: block; width: 210px; }
.feature__img {
  display: block;
  width: 100%;
  box-shadow: 3px 4px 9px rgba(0, 0, 0, .6);
}
.feature__info {
  width: 100%;
  min-width: 0;
  font-size: .9rem;
  text-align: center;
}
.feature__date { font-size: 1.1rem; margin-bottom: 6px; }

/* 「購入はこちら」開閉ボタン(スマホのみ・JS有効時) */
.shops-toggle {
  display: none;
  margin-top: 14px;
  padding: 8px 30px;
  color: #fff;
  font-family: inherit;
  font-size: .95rem;
  font-weight: bold;
  line-height: 1.4;
  background: #b8200a url("../images/bg_aka.jpg") repeat;
  background-size: 400px 400px;
  border: 2px solid #f0a392;
  border-radius: 999px;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.shops-toggle::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 0 3px 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  transition: transform .2s;
}
.shops-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); margin-bottom: -2px; }
.js .shops-toggle { display: inline-block; }
.js .shops-toggle + .shops { display: none; }
.js .shops-toggle[aria-expanded="true"] + .shops { display: flex; }

.shops {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.shops a {
  display: block;
  padding: 2px 10px;
  font-size: .8rem;
  line-height: 1.6;
  color: #1a5f94;
  background: var(--shop);
  border-radius: 5px;
}
.shops a:hover { background: #8ec4ea; text-decoration: none; }

/* ---------- Sections ---------- */
.section { margin-top: 40px; }

/* ---------- Backlist (既刊案内) ---------- */
.backlist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 12px;
  padding: 0 4px;
}
.backlist li { text-align: center; }
.backlist a {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text);
  line-height: 1.45;
}
.backlist a:hover { text-decoration: none; }
.backlist a:hover img { opacity: .85; }
.backlist time { font-size: .85rem; margin-bottom: 4px; }
.backlist img {
  width: 100%;
  max-width: 110px; /* 新刊の書影(スマホ130px/PC200px以上)より常に小さく */
  margin-bottom: 8px;
  box-shadow: 3px 4px 8px rgba(0, 0, 0, .6);
}
.backlist strong { font-size: .85rem; font-style: italic; }
.backlist .sub { font-size: .75rem; color: #333; margin-top: 2px; }
.backlist .label { font-size: .8rem; margin-top: 2px; }

/* ---------- Schedule (今後の予定) ---------- */
.schedule { border-bottom: 3px solid var(--line); }
.schedule li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 12px 6px;
  border-top: 3px solid var(--line);
}
.schedule__date { font-weight: bold; font-size: 1.05rem; }
.schedule__body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.schedule__icon { width: 35px; height: 35px; flex: none; }
.schedule__new { width: 26px; height: 26px; flex: none; }
.schedule__body a { font-size: .95rem; }
.schedule__note {
  flex-basis: 100%;
  padding-left: 41px;
  color: var(--red);
  font-size: .85rem;
}

/* ---------- Sidebar ---------- */
.side__block + .side__block { margin-top: 36px; }

.diary dt { margin-top: 18px; font-weight: bold; font-size: 1.05rem; }
.diary dt:first-child { margin-top: 4px; }
.diary dd { padding-left: 1em; font-size: .9rem; line-height: 1.6; }
.diary__new { width: 24px; height: 24px; }

.sns {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 4px;
}
.sns img { width: 52px; height: 52px; }
.sns a:hover img { opacity: .8; }
.sns__note {
  margin-top: 18px;
  text-align: center;
  font-size: .75rem;
  color: #222;
}

/* X(旧Twitter)タイムライン埋め込み(platform.twitter.com/widgets.js が描画) */
.sns__timeline {
  width: 100%;
  max-width: 520px;          /* 埋め込みの最大幅(Xの仕様)。広い画面では中央寄せ */
  min-height: 120px;         /* 読み込み前後のガタつきを抑える */
  margin: 18px auto 0;
  text-align: center;
  font-size: .85rem;
}
.sns__timeline .twitter-timeline { color: var(--link); }   /* 読み込み前・失敗時のリンク */
.sns__timeline iframe { max-width: 100%; }

/* ---------- Content pages (下位ページ: プロフィール等) ---------- */
.main section + section { margin-top: 48px; }
/* ページ内リンクの移動先が、スマホの固定タブに隠れないよう余白を取る */
section[id], h4[id] { scroll-margin-top: 90px; }

/* ページタイトル画像・更新日 */
.moveup { margin: 0 0 6px; font-size: 1rem; line-height: 1.4; }
.date {
  margin-bottom: 14px;
  text-align: right;
  font-size: .8rem;
  color: #333;
}

/* 本文 */
.text { line-height: 1.8; }
.text p { margin-bottom: 1em; }
.text em { font-style: normal; font-weight: bold; }
.text h4 {
  margin: 32px 0 14px;
  padding: 5px 16px;
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: .3em;
  line-height: 1.6;
  background: var(--teal) url("../images/bg_ao.jpg") repeat;
  background-size: 400px 400px;
  border: 3px solid var(--teal-edge);
  border-radius: 10px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.text > h4:first-child { margin-top: 0; }
.text dt {
  margin-top: 16px;
  padding-left: .7em;
  font-weight: bold;
  border-left: 4px solid var(--teal);
}
.text dt:first-child { margin-top: 0; }
.text dd { padding-left: 1.2em; font-size: .95rem; }

/* ---------- ページ切り換え(書籍リスト / メディアミックス) ---------- */
.pageswitch { margin: 0 0 24px; }
.pageswitch ul { display: flex; gap: 8px; }
.pageswitch li { flex: 1 1 0; }
.pageswitch a {
  display: block;
  padding: 10px 6px;
  color: var(--teal-text, var(--teal));
  font-weight: bold;
  line-height: 1.4;
  text-align: center;
  background: #fff;
  border: 3px solid var(--teal-edge);
  border-radius: 10px;
}
.pageswitch a:hover { text-decoration: none; background: #eef7fb; }
.pageswitch a.is-current {
  color: #fff;
  background: var(--teal) url("../images/bg_ao.jpg") repeat;
  background-size: 400px 400px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
@media (max-width: 640px) {
  .pageswitch a { padding: 8px 4px; font-size: .85rem; }
}
.only-sp { display: none; }   /* レーベルが空の行で、スマホだけ出版社を表示 */

/* ---------- 書籍一覧(BOOKS) ---------- */
.tabpanel .bar,
.accordion .bar { letter-spacing: .3em; }
.bar .n { margin-left: 1em; font-size: .8rem; font-weight: normal; letter-spacing: 0; }

.booksearch { margin-bottom: 20px; }
.booksearch input {
  width: 100%;
  max-width: 420px;
  padding: 7px 10px;
  color: var(--text);
  font: inherit;
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 8px;
}
.booksearch__count { margin-top: 4px; color: #333; font-size: .8rem; }

/* 表の幅は中身に合わせる(カテゴリごとに変わる)。収まらないときだけタイトルが折り返す */
.booktable {
  width: auto;
  max-width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  line-height: 1.5;
}
.booktable td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 2px solid var(--line-strong);
}
.booktable td.d { white-space: nowrap; font-variant-numeric: tabular-nums; }
.booktable td.l,
.booktable td.p { font-size: .8rem; color: #333; }
.booktable .sub { display: block; font-size: .8rem; color: #333; }
.booktable .soon {
  margin-left: 6px;
  padding: 0 5px;
  font-size: .7rem;
  color: var(--red);
  border: 1px solid var(--red);
  border-radius: 4px;
}
.booktable tr.hide { display: none; }
/* PC: 日付・レーベル・出版社は折り返さない(スマホは下のメディアクエリで折り返し可) */
@media (min-width: 641px) {
  .booktable td.d,
  .booktable td.l,
  .booktable td.p { white-space: nowrap; }
}
/* スマホ: 1冊を横1行(タイトル | 発売 | レーベル)で表示。出版社は非表示
   (同じタイトルでもレーベルが違う本があるため、レーベルは表示。長いタイトル・レーベル名は折り返す) */
@media (max-width: 640px) {
  .booktable { width: 100%; font-size: .88rem; }
  .booktable td { padding: 6px 5px; }
  .booktable td.p { display: none; }
  .booktable td.d,
  .booktable td.l { font-size: .72rem; line-height: 1.45; }
  .booktable td.l { width: 6.8em; }
  .only-sp { display: inline; }
  .booktable .sub { font-size: .72rem; }
}

/* ---------- 書籍一覧: アコーディオン版 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; }
.chip {
  display: inline-block;
  padding: 3px 12px;
  color: var(--text);
  font-size: .85rem;
  background: #eef7fb;
  border: 1px solid var(--teal-edge);
  border-radius: 999px;
}
.chip:hover { text-decoration: none; background: #dff0f8; }
.chip .pagetabs__n { margin-left: .4em; font-weight: bold; color: var(--teal-text, var(--teal)); opacity: 1; }
.chip.is-zero { opacity: .4; }

/* すべて開く/閉じる(JSが動く時だけ表示) */
.booktools { display: none; gap: 8px; margin: 0 0 16px; }
.js .booktools { display: flex; }
.btn {
  padding: 5px 16px;
  color: var(--teal-text, var(--teal));
  font: inherit;
  font-size: .85rem;
  font-weight: bold;
  background: #fff;
  border: 2px solid var(--teal-edge);
  border-radius: 999px;
  cursor: pointer;
}
.btn:hover { background: #eef7fb; }
.btn:active { background: #dff0f8; }

.main section.accordion + section.accordion { margin-top: 16px; }
.accordion.is-empty { display: none; }
section.accordion[id] { scroll-margin-top: 12px; }
.accordion summary { list-style: none; cursor: pointer; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary h2.bar { display: flex; align-items: baseline; margin-bottom: 0; }
.accordion summary h2::before {
  content: "\25B8"; /* ▸ */
  display: inline-block;
  margin-right: .6em;
  letter-spacing: 0;
  transition: transform .15s;
}
.accordion details[open] summary h2::before { transform: rotate(90deg); }
.accordion details[open] summary h2.bar { margin-bottom: 14px; }
.accordion summary h2 .n { margin-left: auto; }

/* ---------- 404(簡易表示) ---------- */
a.btn { display: inline-block; text-decoration: none; }
a.btn:hover { text-decoration: none; }
.notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 24px 0;
  text-align: center;
}
.notfound__code {
  margin: 0;
  color: var(--teal);
  font-size: 4.5rem;
  font-weight: bold;
  line-height: 1.1;
  letter-spacing: .05em;
}
.notfound__title { margin: 8px 0 4px; font-size: 1.15rem; font-weight: bold; }
.notfound__text { margin-bottom: 24px; font-size: .95rem; }
.notfound__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.notfound .btn { padding: 8px 22px; font-size: .95rem; }
.notfound__back { display: none; }       /* 「戻る」はJSが動く時だけ表示 */
.js .notfound__back { display: inline-block; }

/* ---------- DIARY(日記) ---------- */
.layout--diary { padding-bottom: 56px; }   /* フッターとの間隔(.layout--singleと同じ) */
.layout--diary .moveup { margin-bottom: 28px; }   /* 「Diary」画像と記事タイトルの間 */
.entry { margin-bottom: 40px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.entry__title {
  margin: 0;
  padding: 6px 12px;
  font-size: 1.1rem;
  line-height: 1.5;
  background: #eef7fb;
  border-left: 6px solid var(--teal);
}
.entry__date { margin: 6px 0 14px; text-align: right; font-size: .8rem; }
.entry__body { line-height: 1.9; }
.entry__body p { margin-bottom: 1.2em; }
.entry__body img { max-width: 100%; height: auto; box-shadow: 2px 3px 6px rgba(0, 0, 0, .35); }
.entry__body::after { content: ""; display: block; clear: both; }   /* 回り込みの解除 */
/* 画像だけの段落は余白を付けない(文章の先頭を画像の上端に揃える) */
.entry__body p:has(> a:only-child > img:only-child) { margin: 0; }
/* 画像は左に寄せて、文章を右側に回り込ませる(スマホは幅が足りないので回り込みなし) */
@media (min-width: 600px) {
  .entry__body img { float: left; margin: 4px 20px 12px 0; }
}
.entry__links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .85rem; }
/* 各記事末尾の「▲ ページTOPへ」(右寄せ。回り込みはここで解除済み) */
.entry__top { margin: 0; text-align: right; font-size: .85rem; font-weight: bold; }

/* ページ移動 */
.pager ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pager li {
  min-width: 2.4em;
  padding: 4px 10px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--teal-edge);
  border-radius: 6px;
}
.pager li a { display: block; margin: -4px -10px; padding: 4px 10px; }
.pager li a:hover { text-decoration: none; background: #eef7fb; }
.pager .is-current { color: #fff; font-weight: bold; background: var(--teal); border-color: var(--teal); }
.pager .is-disabled { opacity: .45; }

/* サイドバー(日記) */
.side.side--diary { padding-top: 0; }
@media (min-width: 900px) {
  .side.side--diary { padding-top: 40px; }   /* 注意事項の上の余白 */
}
/* 注意事項(過去ログの上) */
.side__notice {
  margin-bottom: 36px;
  padding: 12px 14px;
  font-size: .85rem;
  line-height: 1.7;
  background: #fffbe8;
  border: 1px solid #e3d9a0;
  border-radius: 8px;
}
.sidesearch { display: flex; gap: 6px; }
.sidesearch input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  color: var(--text);
  font: inherit;
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 8px;
}
.sidegallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sidegallery img { width: 100%; aspect-ratio: 1; object-fit: cover; box-shadow: 2px 3px 6px rgba(0, 0, 0, .35); }
.archive details { border-bottom: 1px solid var(--line); }
.archive summary { padding: 6px 4px; font-weight: bold; list-style: none; cursor: pointer; }
.archive summary::-webkit-details-marker { display: none; }
.archive summary::before {
  content: "\25B8"; /* ▸ */
  display: inline-block;
  margin-right: .5em;
  color: var(--teal-text);
  transition: transform .15s;
}
.archive details[open] summary::before { transform: rotate(90deg); }
.archive .n { margin-left: .3em; font-size: .8em; font-weight: normal; }
.archive ul { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0 4px 10px 1.5em; font-size: .9rem; }
.feeds { display: flex; gap: 18px; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer {
  background: #14506f url("../images/bg_ao2.jpg") repeat; /* ヘッダーと同じ構成 */
  background-size: 512px 512px;
  flex: none;
}
.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 16px;
  text-align: center;
  font-size: .8rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  background: #1b7fb0 url("../images/bg_ao.jpg") repeat;
  background-size: 512px 512px;
}

/* ==========================================================
   Tablet and up
   ========================================================== */
@media (min-width: 600px) {
  .site-header__bird { display: block; width: 56px; right: 0; bottom: -12px; }

  /* 600px以上: 1250x200の画像を高さ75pxで表示。文字の左余白は約56px */
  .site-header__logo img { left: 40px; width: 469px; max-width: none; }

  .gnav__toggle,
  .js .gnav__toggle { display: none; }
  .gnav,
  .js .gnav {
    display: block;
    position: static;
    background: #000;
  }
  .gnav ul {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    background: linear-gradient(#555 0, #151515 48%, #000 52%, #111 100%);
    border-top: 1px solid #777;
    border-bottom: 1px solid #000;
  }
  .gnav li { border-top: 0; border-left: 1px solid #555; }
  .gnav ul { border-left: 1px solid #555; border-right: 1px solid #555; }
  .gnav li:first-child { border-left: 0; }
  .gnav a { padding: 7px 4px; font-size: .8rem; }

  /* 書影を左、情報を右に並べ、バッジは左の余白に置く */
  .feature { --indent: 72px; }
  .feature__badge { left: calc(var(--indent) - var(--badge) + 15px); }
  .feature__title { padding-left: calc(var(--indent) + 15px); font-size: 1.35rem; }
  .feature__body {
    grid-template-columns: 210px minmax(0, 1fr);
    justify-items: stretch;
    gap: 24px;
    align-items: start;
    padding-left: var(--indent);
  }
  .feature__cover { width: auto; }
  .feature__info { font-size: .9rem; text-align: left; }
  .feature__date { margin-bottom: 8px; }
  .shops-toggle,
  .js .shops-toggle { display: none; }
  .shops,
  .js .shops-toggle + .shops { display: flex; justify-content: flex-start; }

  .backlist { grid-template-columns: repeat(4, 1fr); }

  .schedule li {
    grid-template-columns: 8em 1fr;
    align-items: start;
    gap: 12px;
    padding: 14px 8px;
  }
  .schedule__date { font-size: 1.1rem; padding-top: 3px; }
}

/* ==========================================================
   Desktop: two columns
   ========================================================== */
@media (min-width: 900px) {

  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 48px;
    align-items: start;
    padding-top: 28px;
  }
  .side { margin-top: 0; padding-top: 80px; }
}

/* 下位ページ: 1カラム(.layoutと併用。2カラムのページは付けない) */
.layout--single {
  display: block;
  padding-bottom: 56px;      /* フッターとの間隔 */
}
/* PCで横に広がりすぎないよう、本文幅を絞って中央寄せ */
.layout--single .main { max-width: 920px; margin: 0 auto; }

/* ---------- タブ切り換え(左メニュー + 本文) ----------
   .main.page > nav.pagetabs + .page__body > section.tabpanel
   JS無効時は全セクションを縦に並べ、メニューはページ内リンクとして動く */
/* スマホ: タブを画面上端から20pxの位置で固定(ハンバーガーメニューz-index:10より下) */
.pagetabs {
  position: sticky;
  top: 20px;
  z-index: 5;
  margin-bottom: 16px;
  padding: 8px 0;
}
.pagetabs ul { display: flex; gap: 8px; }
.pagetabs li { flex: 1 1 0; }
.pagetabs a {
  display: block;
  padding: 8px 6px;
  color: var(--teal-text, var(--teal));
  font-size: .9rem;
  font-weight: bold;
  line-height: 1.4;
  text-align: center;
  background: #fff;
  border: 3px solid var(--teal-edge);
  border-radius: 10px;
}
.pagetabs a:hover { text-decoration: none; background: #eef7fb; }
.pagetabs a.is-active {
  color: #fff;
  background: var(--teal) url("../images/bg_ao.jpg") repeat;
  background-size: 400px 400px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
/* JSが動いた時だけ、選択中のパネルのみ表示 */
.page.tabs-ready .tabpanel { display: none; }
.page.tabs-ready .tabpanel.is-active { display: block; }
.page.tabs-ready .tabpanel + .tabpanel { margin-top: 0; }

.pagetabs__n { margin-left: .5em; font-size: .8em; font-weight: normal; opacity: .9; }
.pagetabs a.is-zero { opacity: .4; }
/* タブが多いページ(.pagetabs--scroll): スマホは横スクロール */
.pagetabs--scroll ul { position: relative; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pagetabs--scroll ul::-webkit-scrollbar { display: none; }
.pagetabs--scroll li { flex: 0 0 auto; }
.pagetabs--scroll a { padding: 8px 12px; white-space: nowrap; }
/* 絞り込み中は全パネルを表示(ヒット0のパネルは隠す) */
.page.tabs-ready.is-searching .tabpanel { display: block; }
.page.tabs-ready.is-searching .tabpanel.is-empty { display: none; }
.page.tabs-ready.is-searching .tabpanel + .tabpanel { margin-top: 40px; }

@media (min-width: 900px) {
  .page {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
  }
  /* PC: 左カラムに追従(上端から16px) */
  .pagetabs { top: 16px; z-index: auto; margin-bottom: 0; padding: 0; }
  section[id], h4[id] { scroll-margin-top: 12px; }
  .pagetabs ul { display: block; }
  .pagetabs li + li { margin-top: 10px; }
  .pagetabs { max-height: calc(100vh - 32px); overflow-y: auto; }
  .pagetabs--scroll ul { overflow: visible; }
  .pagetabs--scroll a { display: flex; justify-content: space-between; align-items: baseline; white-space: normal; }
  .pagetabs__n { flex: none; }
  .pagetabs a { padding: 10px 12px; font-size: .95rem; text-align: left; }
}

/* ==========================================================
   1222px以上: サイト幅は画面の90%(最大1100px)。1222px ≒ 1100 ÷ 0.9 で、切り替え時に幅が変わらない
   ========================================================== */
@media (min-width: 1222px) {
  .wrap,
  .site-header__inner,
  .gnav ul,
  .site-footer__inner { width: 90%; }
}

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
