/* =====================================================
   KAZUKIN LAB - 共通スタイルシート
   デザインはこの1枚だけで管理します。
   -----------------------------------------------------
   目次:
   1. カラー・フォント変数
   2. リセットと基本
   3. ヘッダー / ナビ
   4. ヒーロー
   5. セクション共通 / 見出し
   6. カテゴリカード
   7. 記事カード / 一覧
   8. カテゴリページ（8-2. MUSICページ：楽曲プレイヤー）
   9. 記事ページ
   10. ABOUT / フッター / 404
   11. スマホ対応（メディアクエリ）
   ===================================================== */

/* ---- 1. カラー・フォント変数 ---- */
:root {
  /* KAZUKIN本体からサンプリングした公式パレット */
  --purple: #733F98;
  --orange: #FD956B;
  --yellow: #FDE337;
  --green:  #93C65F;
  --blue:   #2E89FD;
  --red:    #DD350E;

  --ink:    #1E1B22;        /* 文字色 */
  --ink-soft: #5C5563;      /* 補助文字 */
  --paper:  #FDFDFD;        /* キャラ画像の背景と同じ白 */
  --paper-warm: #F6F4EF;    /* セクション差し色の生成り */
  --line:   #E8E4DE;

  --font-display: "Archivo Black", "Zen Kaku Gothic New", sans-serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-hand: "Yomogi", "Zen Kaku Gothic New", cursive; /* KAZUKINのセリフ用 */

  --maxw: 1080px;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(30, 27, 34, 0.08);
}

/* ---- 2. リセットと基本 ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.9;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
/* 本文の地の文の中に混ざるリンク（about.html「こちらからどうぞ」等）は、
   デフォルトのa（下線なし・文字色そのまま）だと見た目が地の文と区別つかず
   リンクだと気づかれないため、下線をつけて分かるようにする */
main p a { text-decoration: underline; text-underline-offset: 3px; }
ul { list-style: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---- 3. ヘッダー / ナビ ----
   最上部にいる間は不透明な紙色のまま、少しスクロールすると
   main.jsのsetupHeaderScrollStateが付ける.is-scrolledで薄い透明色＋軽いぼかしに
   切り替わる（scrollイベントは使わずIntersectionObserverで判定） */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(253, 253, 253, 0.88);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(30, 27, 34, 0.06);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-logo img { height: 60px; width: auto; }

.global-nav ul { display: flex; gap: 26px; align-items: center; }
.global-nav a {
  font-family: var(--font-display);
  font-size: 13px; letter-spacing: 0.08em;
  padding: 6px 2px; border-bottom: 3px solid transparent;
  transition: border-color 0.2s;
}
.global-nav a:hover { border-bottom-color: var(--yellow); }

/* ハンバーガー（スマホのみ表示） */
.nav-toggle {
  display: none;
  background: none; border: 2px solid var(--ink); border-radius: 8px;
  width: 44px; height: 40px; cursor: pointer; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; position: absolute;
  left: 9px; width: 22px; height: 2.5px; background: var(--ink);
  transition: transform 0.25s, opacity 0.2s;
}
.nav-toggle span { top: 18px; }
.nav-toggle span::before { left: 0; top: -7px; }
.nav-toggle span::after { left: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* ---- 4. ヒーロー ---- */
.hero {
  border-bottom: 2px solid var(--ink);
  background:
    radial-gradient(circle at 85% 20%, rgba(253, 227, 55, 0.25), transparent 40%),
    var(--paper);
}
.hero-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 56px 20px 0;
  display: grid; grid-template-columns: 1.2fr 1fr; align-items: end; gap: 20px;
}
.hero-copy { padding-bottom: 64px; }
.hero-lab-label {
  font-family: var(--font-display); font-size: 13px; letter-spacing: 0.3em;
  color: var(--paper); background: var(--purple);
  display: inline-block; padding: 4px 14px; margin-bottom: 20px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1.02; letter-spacing: 0.01em;
}
.hero-title .accent { color: var(--purple); }
.hero-catch {
  margin-top: 26px;
  font-family: var(--font-display);
  font-size: clamp(15px, 2vw, 20px);
  letter-spacing: 0.14em; color: var(--ink);
}
.hero-catch .tick { color: var(--red); }
.hero-message {
  margin-top: 14px;
  font-size: clamp(17px, 2.4vw, 22px);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.hero-sub { margin-top: 14px; color: var(--ink-soft); font-size: 15px; max-width: 34em; }

.hero-kazukin { text-align: center; position: relative; }
.hero-kazukin img {
  width: min(320px, 78%); margin: 0 auto;
  cursor: pointer;
}
.hero-serif {
  font-family: var(--font-hand); font-size: 19px; color: var(--purple);
  position: absolute; top: 6%; left: 4%;
  transform: rotate(-6deg);
}
.hero-hint {
  display: block; margin-top: 6px;
  font-family: var(--font-hand); font-size: 14px; color: var(--ink-soft);
}

/* クリックでKAZUKINがぴょこっと動く（トップページの遊び心枠） */
.hero-kazukin img.kazukin-hop { animation: kazukin-hop 0.55s ease; }
@keyframes kazukin-hop {
  0%   { transform: scale(1) rotate(0deg); }
  30%  { transform: scale(0.95) rotate(-3deg) translateY(4px); }
  60%  { transform: scale(1.04) rotate(2deg) translateY(-8px); }
  100% { transform: scale(1) rotate(0deg); }
}
.hero-serif.serif-pop { animation: serif-pop 0.45s ease; }
@keyframes serif-pop {
  0%   { opacity: 0; transform: rotate(-6deg) scale(0.6); }
  100% { opacity: 1; transform: rotate(-6deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-kazukin img.kazukin-hop, .hero-serif.serif-pop { animation: none; }
}

/* ---- 隠しコマンド（トップでKAZUKINを10連打すると発動。index.html側にJSあり） ---- */
.egg-serif {
  position: fixed; z-index: 999; pointer-events: none;
  font-family: var(--font-hand); font-weight: 700; white-space: nowrap;
  opacity: 0;
  animation: egg-serif-float 2.6s ease forwards;
}
@keyframes egg-serif-float {
  0%   { opacity: 0; transform: translateY(14px) rotate(var(--egg-rot, -4deg)); }
  20%  { opacity: 1; }
  75%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-40px) rotate(var(--egg-rot, -4deg)); }
}
.egg-runner {
  position: fixed; z-index: 999;
  bottom: 4vh; left: 0; width: 90px;
  cursor: pointer; /* クリックで捕まえられる */
  animation: egg-run 4s linear forwards;
}
@keyframes egg-run {
  from { transform: translateX(-120px); }
  to   { transform: translateX(calc(100vw + 120px)); }
}
.egg-runner img {
  width: 100%; height: auto;
  animation: egg-bob 0.35s ease-in-out infinite alternate;
}
@keyframes egg-bob {
  from { transform: translateY(0) rotate(-5deg); }
  to   { transform: translateY(-10px) rotate(5deg); }
}

/* 捕まえた！：びくっと大きくなったあと、照れて縮こまってから落ち着く。
   最後は従来と同じ 1.9 倍で止まるので、このあとの「逃げる」演出は変わらない */
.egg-runner.caught img {
  transform-origin: bottom center;
  animation: egg-shy 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes egg-shy {
  0%   { transform: scale(1)    rotate(0deg); }
  25%  { transform: scale(2.15) rotate(-7deg); }  /* びくっ */
  50%  { transform: scale(1.65) rotate(5deg); }   /* 照れて縮こまる */
  75%  { transform: scale(1.98) rotate(-3deg); }
  100% { transform: scale(1.9)  rotate(0deg); }
}
.egg-runner .egg-catch-msg {
  position: absolute; bottom: 105%; left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  font-family: var(--font-hand); font-weight: 700; font-size: 16px;
  color: var(--purple); white-space: nowrap;
  animation: serif-pop 0.3s ease;
}
/* 逃げる間、セリフ本体は親（KAZUKIN）と一緒に回転するが、
   吹き出しの向きだけ逆回転させて文字を読みやすいまま飛ばす */
.egg-runner .egg-catch-msg.escaping {
  animation: egg-msg-counter-rotate 1.1s ease-in forwards;
}
@keyframes egg-msg-counter-rotate {
  from { transform: translateX(-50%) rotate(-4deg); }
  to   { transform: translateX(-50%) rotate(calc(-4deg - var(--esc-rot, 0deg))); }
}

/* くるくる回りながら別方向へ逃げる（行き先はJSが--esc-x等で指定） */
@keyframes egg-escape {
  0%   { opacity: 1; }
  100% {
    transform: translate(var(--esc-x, -60vw), var(--esc-y, -80vh)) rotate(var(--esc-rot, -1080deg));
    opacity: 0;
  }
}

/* ごくたまに現れるレア衣装（赤ちゃん）の走者は、うっすら光らせて特別感を出す */
.egg-runner.rare img { filter: drop-shadow(0 0 10px var(--yellow)); }

/* ===== 捕まえた瞬間のごほうび演出（index.htmlの onKazukinCaught が出す） ===== */

/* 1) 画面全体が一瞬白く光る */
.catch-flash {
  position: fixed; inset: 0; z-index: 1000; pointer-events: none;
  background: #fff; opacity: 0;
  animation: catch-flash 0.4s ease-out forwards;
}
@keyframes catch-flash {
  0%   { opacity: 0; }
  12%  { opacity: 0.85; }
  100% { opacity: 0; }
}

/* 1) 画面が軽く横に揺れる。
   ヘッダー（position:sticky）と走者・パーティクル（position:fixed）は
   transformをかけると位置がおかしくなるので、揺らす相手を明示的に選んでいる */
body.catch-shake > .hero,
body.catch-shake > .section,
body.catch-shake > .ticker,
body.catch-shake > .site-footer {
  animation: catch-shake 0.32s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes catch-shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-7px); }
  30% { transform: translateX(6px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(3px); }
  80% { transform: translateX(-1px); }
}

/* 2) 星とハートが放射状に飛び散る（行き先はJSが--px/--py/--prで指定） */
.catch-particle {
  position: fixed; z-index: 1002; pointer-events: none;
  font-weight: 700; line-height: 1;
  text-shadow: 0 1px 3px rgba(30, 27, 34, 0.3);
  opacity: 0;
  animation: catch-particle 0.95s ease-out forwards;
}
@keyframes catch-particle {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(0deg); }
  15%  { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--px, 0px)), calc(-50% + var(--py, 0px)))
               scale(1.1) rotate(var(--pr, 180deg));
  }
}

/* 3) 「GET!」がバウンドしながら出て、上に浮かんで消える */
.catch-get {
  position: fixed; z-index: 1003; pointer-events: none;
  font-family: var(--font-display); font-size: 46px; letter-spacing: 0.02em;
  color: var(--yellow); white-space: nowrap; opacity: 0;
  /* 白背景でも読めるよう、黒フチを影で作る */
  text-shadow:
    -2px -2px 0 var(--ink),  2px -2px 0 var(--ink),
    -2px  2px 0 var(--ink),  2px  2px 0 var(--ink),
     0   -3px 0 var(--ink),  0    3px 0 var(--ink),
    -3px  0   0 var(--ink),  3px  0   0 var(--ink);
  animation: catch-get 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes catch-get {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  35%  { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  50%  {              transform: translate(-50%, -50%) scale(1); }
  70%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -110%) scale(1); }
}
@media (max-width: 600px) {
  .catch-get { font-size: 34px; }
}

/* 捕まえそこねたときの一言。「GET!」の裏返しとして画面のまん中に大きく出し、
   最後はがっくり下に落ちながら消える */
.egg-miss-msg {
  position: fixed; z-index: 1003; pointer-events: none;
  left: 50%; top: 46%;
  font-family: var(--font-hand); font-weight: 700;
  font-size: clamp(24px, 6.5vw, 52px);
  color: var(--purple); white-space: nowrap; opacity: 0;
  /* 記事や画像の上に出ても読めるよう、白フチを影で作る */
  text-shadow:
    -2px -2px 0 var(--paper),  2px -2px 0 var(--paper),
    -2px  2px 0 var(--paper),  2px  2px 0 var(--paper),
     0    3px 8px rgba(30, 27, 34, 0.18);
  animation: egg-miss 2.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes egg-miss {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.6)  rotate(-6deg); }
  18%  { opacity: 1; transform: translate(-50%, -50%) scale(1.08) rotate(-4deg); }
  30%  {             transform: translate(-50%, -50%) scale(1)    rotate(-4deg); }
  70%  { opacity: 1; transform: translate(-50%, -50%) scale(1)    rotate(-4deg); }
  100% { opacity: 0; transform: translate(-50%, -30%) scale(0.95) rotate(-4deg); }
}

/* 隠しコマンドを3回発動すると出てくる、隠しページへの小さなリンク */
.secret-link {
  position: fixed; left: 16px; bottom: 16px; z-index: 40;
  font-family: var(--font-display); font-size: 11px; letter-spacing: 0.05em;
  color: var(--ink-soft); background: var(--paper); border: 1px solid var(--ink);
  border-radius: 999px; padding: 6px 14px; text-decoration: none;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.2s ease;
}
.secret-link.is-visible { opacity: 1; transform: none; }
.secret-link:hover { background: var(--yellow); }

/* ---- ページ切り替えフェード（main.jsのsetupPageTransitionとセット） ---- */
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
body { animation: page-in 0.4s ease; }
body.page-leave { opacity: 0; transition: opacity 0.22s ease; }

/* ---- スクロールでカードがふわっと登場（main.jsのsetupScrollRevealとセット）
   .reveal はJSが付けるので、JSが動かない環境ではカードは普通に表示される ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* 見出し下の黄色いライン（.section-title::after）は、見出しが画面に入ったときに
   左から右へ伸びる。土台の.reveal自体が付かない環境（JS無効／reduced-motion）では
   このscaleX(0)も適用されないので、常にちゃんと表示された状態になる */
.section-head.reveal .section-title::after { transform: scaleX(0); transform-origin: left; transition: transform 0.7s ease 0.15s; }
.section-head.reveal.is-visible .section-title::after { transform: scaleX(1); }

/* カード内のサムネイル・ジャケット画像は、カードが現れるのに合わせてごくわずかに
   拡大する（scale(1)→scale(1.025)程度。目立たない範囲にとどめる） */
.reveal .thumb img { transition: transform 0.8s ease; }
.reveal.is-visible .thumb img { transform: scale(1.025); }

/* KAZUKINLAB MUSICのトラックカードは他より少しだけ特別感を出す：
   ジャケットのズームをゆっくりめにし、既存の紫系シャドウ（--purple）を
   ふわっと足す。ネオンのような点滅はさせず、落ち着いた出方にする */
.reveal.player-card { transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.9s ease; }
.reveal.player-card.is-visible { box-shadow: var(--shadow), 0 12px 36px rgba(115, 63, 152, 0.16); }
.reveal .player-cover img { transition: transform 1.1s ease; }
.reveal.is-visible .player-cover img { transform: scale(1.02); }

/* カテゴリ・ティッカー（ヒーロー下の帯） */
.ticker {
  border-bottom: 2px solid var(--ink);
  background: var(--yellow);
  overflow: hidden; white-space: nowrap; padding: 9px 0;
}
.ticker-track {
  display: inline-block; animation: ticker 28s linear infinite;
  font-family: var(--font-display); font-size: 13px; letter-spacing: 0.22em;
}
.ticker-track span { margin: 0 18px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* 2本目のティッカー（下段・キャッチコピー） */
.ticker-alt {
  border-top: 2px solid var(--ink);
  border-bottom: none;
  background: var(--ink);
}
.ticker-alt .ticker-track {
  animation: ticker-reverse 34s linear infinite;
  color: var(--yellow);
}
@keyframes ticker-reverse { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* ---- 5. セクション共通 / 見出し ---- */
.section { padding: 72px 0; }
.section-alt { background: var(--paper-warm); }

.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 36px; flex-wrap: wrap; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 38px); letter-spacing: 0.02em;
}
.section-title::after {
  content: ""; display: block; width: 56px; height: 6px;
  background: var(--yellow); margin-top: 8px;
}
.section-note { color: var(--ink-soft); font-size: 14px; }

/* ---- 6. カテゴリカード ---- */
.category-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.category-card {
  background: var(--paper);
  border: 2px solid var(--ink); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
}
.category-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(30,27,34,0.14); }
.category-card .thumb {
  aspect-ratio: 1 / 1; overflow: hidden;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}
/* カテゴリ画像は9枚中4枚がちょうど正方形で、残りも切れる量が平均11.9%と
   小さいため中央基準のまま（記事カードと違い、上寄せにすると
   BAG・LIFESTYLEでKAZUKINの足元が切れてしまう） */
.category-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.category-card .body { padding: 14px 16px 18px; flex: 1; display: flex; flex-direction: column; }
.category-card .cat-index {
  font-family: var(--font-display); font-size: 11px; letter-spacing: 0.18em;
  color: var(--cat-color, var(--purple));
}
.category-card h3 {
  font-family: var(--font-display); font-size: 21px; letter-spacing: 0.03em;
  border-bottom: 4px solid var(--cat-color, var(--purple));
  display: inline-block; align-self: flex-start;
  line-height: 1.3; margin: 2px 0 8px;
}
.category-card p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; }

/* ---- 7. 記事カード / 一覧 ---- */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.article-card {
  background: var(--paper);
  border: 2px solid var(--ink); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.2s;
  display: flex; flex-direction: column;
}
.article-card:hover { transform: translateY(-4px); }
/* 5:4 はリード画像でいちばん多い比率（52本中21本がちょうどこの形）。
   ここに合わせると、その21本は切れも余白もなくぴったり収まる。
   従来の16:10だと52本すべてが切られ、平均27.9%・最大53.5%が失われていた */
.article-card .thumb { aspect-ratio: 5 / 4; overflow: hidden; border-bottom: 2px solid var(--ink); }
/* object-position: center top ＝ 縦長のイラストは「下」を切る。
   ポスター風のリード画像は見出し文字と手書きセリフが上にあるので、
   中央基準（初期値）だと見出しが丸ごと消えてしまうため上寄せにしている。
   横長のイラストは左右が切られるだけなので、この指定の影響は受けない */
.article-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.article-card .body { padding: 14px 16px 18px; }
.article-card .meta { display: flex; gap: 10px; align-items: center; font-size: 12px; margin-bottom: 6px; }
/* カテゴリ名の丸いラベル。記事カードと、記事ページ上部（日付の横）で
   まったく同じ見た目なので1つにまとめている。
   色は親要素の --cat-color を拾う（記事ページ側はstyle属性で指定） */
.article-card .badge,
.article-page .badge {
  font-family: var(--font-display); font-size: 10.5px; letter-spacing: 0.1em;
  color: var(--paper); background: var(--cat-color, var(--purple));
  padding: 2px 9px; border-radius: 99px;
}
.article-card .date { color: var(--ink-soft); }
.article-card h3 { font-size: 16.5px; line-height: 1.55; }
.article-card p { font-size: 13.5px; color: var(--ink-soft); margin-top: 6px; line-height: 1.7; }

/* 記事がまだ無いときの表示 */
.empty-state {
  border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 44px 20px; text-align: center; color: var(--ink-soft);
}
.empty-state .hand { font-family: var(--font-hand); font-size: 18px; color: var(--purple); }

/* 記事一覧ページ（articles.html）：検索・カテゴリ絞り込み */
.archive-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; }
.archive-search {
  font-family: var(--font-body); font-size: 15px;
  padding: 10px 18px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--paper); min-width: 220px; flex: 1 1 220px;
}
.archive-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip {
  font-family: var(--font-display); font-size: 11.5px; letter-spacing: 0.06em;
  padding: 7px 14px; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--paper); cursor: pointer; transition: transform 0.15s ease;
}
.filter-chip:hover { transform: translateY(-2px); }
.filter-chip.is-active { background: var(--cat-color, var(--ink)); border-color: var(--cat-color, var(--ink)); color: var(--paper); }
.archive-count { color: var(--ink-soft); font-size: 13px; margin-bottom: 18px; }

/* ---- 7-2. トップページ：KAZUKIN PICK ----
   記事カード（.article-card）をベースに、少しだけ特別感を足したもの。
   派手にしすぎないよう、色数は増やさずアクセントの帯とラベルだけ追加している */
.pick-card {
  position: relative;
  border-color: var(--cat-color, var(--ink));
  box-shadow: 0 6px 0 var(--cat-color, var(--ink)), var(--shadow);
}
.pick-flag {
  position: absolute; top: 10px; left: -6px; z-index: 1;
  font-family: var(--font-display); font-size: 10px; letter-spacing: 0.08em;
  color: var(--paper); background: var(--ink);
  padding: 4px 10px 4px 12px; border-radius: 0 6px 6px 0;
  box-shadow: 0 2px 6px rgba(30,27,34,0.25);
}

/* ---- 7-3. トップページ：カテゴリ別記事セクション（タブ切替） ----
   ボタンは articles.html の絞り込みチップ（.filter-chip）をそのまま使っている。
   10カテゴリを縦に並べるとトップが長くなりすぎるため、押したカテゴリの
   3件だけを下のパネルに出す形にした（main.jsのbuildCategorySectionsとセット） */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.cat-tab-note {
  color: var(--ink-soft); font-size: 13.5px; margin-bottom: 18px;
  padding-left: 12px; border-left: 4px solid var(--cat-color, var(--purple));
}
.cat-section-more { margin-top: 18px; }

/* ---- 7-4. トップページ：サイト内検索 ----
   入力欄は記事一覧ページ（articles.html）の検索窓と同じ見た目で統一している */
.top-search { width: 100%; max-width: 480px; }
[data-top-search-results] { margin-top: 22px; }
[data-top-search-results][hidden] { display: none; }

/* ---- 7-5. トップページ：KAZUKIN'S ITEMS 入口カード ---- */
.items-teaser {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 22px 26px; box-shadow: var(--shadow); transition: transform 0.2s ease;
}
.items-teaser:hover { transform: translateY(-3px); }
.items-teaser-label {
  font-family: var(--font-display); font-size: 12px; letter-spacing: 0.12em;
  color: var(--purple);
}
.items-teaser-text p { margin-top: 6px; color: var(--ink-soft); font-size: 14px; }
.items-teaser-link {
  font-family: var(--font-display); font-size: 12.5px; letter-spacing: 0.04em;
  border: 2px solid var(--ink); border-radius: 999px; padding: 9px 18px;
  white-space: nowrap;
}

/* ---- 7-6. items.html：愛用品カード ---- */
.item-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.item-card {
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s;
  display: flex; flex-direction: column;
}
a.item-card:hover { transform: translateY(-4px); }
.item-card .thumb { aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 2px solid var(--ink); }
.item-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.item-card .body { padding: 12px 14px 16px; }
.item-card h3 { font-size: 15px; line-height: 1.5; margin-top: 8px; }
.item-card .hand { font-family: var(--font-hand); font-size: 14.5px; color: var(--purple); margin-top: 4px; }
.item-more-btn {
  display: block; margin: 24px auto 0;
  font-family: var(--font-display); font-size: 13px; letter-spacing: 0.04em;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px;
  padding: 10px 22px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.15s ease;
}
.item-more-btn:hover { transform: translate(-2px, -2px); }
.item-link { display: block; margin-top: 10px; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }

/* ---- 8. カテゴリページ ---- */
.category-hero { border-bottom: 2px solid var(--ink); }
.category-hero-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 48px 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center;
}
.category-hero .cat-label {
  font-family: var(--font-display); font-size: 12px; letter-spacing: 0.24em;
  color: var(--paper); background: var(--cat-color, var(--purple));
  display: inline-block; padding: 4px 12px; margin-bottom: 14px;
}
.category-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 64px); line-height: 1.05;
}
.category-hero .desc { margin-top: 14px; color: var(--ink-soft); }
.category-hero .serif { font-family: var(--font-hand); font-size: 20px; color: var(--cat-color, var(--purple)); margin-top: 18px; }
/* カテゴリヒーロー内から下のセクション／別ページへ飛ぶボタン（例: MUSICのTRACKS・ARTISTSへのジャンプ） */
.category-hero .hero-jump-btn { display: inline-block; margin-top: 12px; margin-right: 10px; }
/* カテゴリの主役イラスト。高さの上限(420px)とcoverを外し、元の縦横比のまま
   横幅いっぱいに出す。上限があると縦長のイラスト（BAG・LIFESTYLE）が
   PC表示で38%切れていた（contain に変えるだけだと今度は38%が白い余白になる）。
   上限を外せば切れも余白も0になる。カテゴリごとに縦の長さは変わるが、
   9ページを並べて見るものではないので支障はない */
.category-hero .visual img {
  border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow);
  width: 100%; height: auto;
}

/* ▼ MUSICページ：ARTISTS・TRACKSへの導線カード（categories/music.html）
   タイトル・補足文・リンク文言はすべて画像側に描き込み済みのビジュアル画像なので、
   カード自体は「画像をそのままリンクにする」だけのシンプルな作り。
   ARTISTS画像（1448×1086＝4:3）とTRACKS画像（1672×941＝16:9寄り）は元の縦横比が
   違うため、height:autoのままだと2枚の高さが揃わずTRACKS側に余白が出ていた。
   共通のaspect-ratioには「TRACKS画像自身の比率（1672:941）」を採用した
   （4:3にするとTRACKS側でNOILや左のKAZUKINイラストが大きく削れてしまうため。
   ARTISTS画像は上下の暗い余白だけがわずかに削れる形になり、FUU/HINA/SAN/NOILの
   顔・ギター・ボタンなど中身は全部残る）。object-fit:coverで画像をカード全体に
   敷き詰め、下に余白が出ないようにしている */
.hub-link-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; }
.hub-link-card {
  display: block; border-radius: var(--radius); overflow: hidden;
  border: 2px solid var(--ink); box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  aspect-ratio: 1672 / 941; height: 100%;
}
.hub-link-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hub-link-card:hover {
  transform: translateY(-4px); box-shadow: 0 14px 30px rgba(30, 27, 34, 0.28);
}
.hub-link-card:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
@media (max-width: 640px) {
  .hub-link-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* パンくず */
.breadcrumb { font-size: 12.5px; color: var(--ink-soft); padding: 14px 0; }
.breadcrumb a { text-decoration: underline; text-underline-offset: 3px; }

/* ---- 8-2. categories/music.html：KAZUKINLAB MUSICプレイヤー（main.jsのbuildMusicTracksとセット） ----
   1曲＝1プレイヤー。ジャケット画像は加工せず、その上にCSSで歌詞レイヤーを重ねる
   （画像に歌詞を焼き込んだ別画像は作らない）。歌詞は「前・今・次」の3行を常に出し、
   今の行だけ明るく大きく。切り替わりはごく軽いフェード＋上下移動のみで、
   派手なカラオケ演出にはしていない（Night Mellow / Lo-fi の雰囲気を優先）。 */
.player-list { display: flex; flex-direction: column; gap: 28px; max-width: 640px; margin: 0 auto; }
.player-card {
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
/* ジャケット画像は加工しない＝クロップせず元の縦横比のまま出す（8のカテゴリ主役画像と同じ考え方） */
.player-cover { position: relative; cursor: pointer; transition: transform 0.25s ease; }
.player-cover img { display: block; width: 100%; height: auto; }
/* 動くジャケット（coverVideo指定曲のみ）：静止画img自体は非表示にするが、
   display:noneにはしない（widthを持ったまま.player-coverの箱の縦横比を
   決める役目はそのまま残すため）。動画はその箱にぴったり重ねてcoverで敷き詰める。
   再生ボタン・イコライザー帯・湯気・流れ星・光の演出は動画より後のDOM順のため、
   z-index指定なしでも動画より上に重なる（絶対配置要素は後勝ちの重なり順） */
.player-cover.has-video .player-cover-img { visibility: hidden; }
.player-cover-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; background: var(--paper);
}
/* 歌唱アーティストが判明している曲（MUSIC_TRACKSにartistColorがある曲）だけ、
   music-artists.htmlのそのアーティストの色をジャケットの縁取り（額縁のような帯）として
   足す。ジャケット画像そのものは無加工のまま。artistColorが無い曲（KAZUKIN本人名義の曲）は
   今までどおり画像が枠いっぱいに表示される。
   ★paddingではなくborderを使っている理由：この曲にはsteamPosition・glowRegions等の
   座標指定（%指定）が画像に対して設定されており、絶対配置される子要素の基準になる
   コンテナ（.player-coverのpadding box）は「content box＋padding」。paddingを使うと
   画像（width:100%＝content box基準）と基準コンテナのサイズが食い違ってズレるが、
   borderなら content box＝padding box＝画像の表示範囲が一致したまま縁取りだけ足せる */
.player-cover.has-artist-color {
  border: 10px solid var(--artist-color, transparent); border-radius: 10px;
  /* スクロール登場時のジャケットの軽いズーム（.reveal .player-cover img）が
     縁取りの外にはみ出さないよう、枠の内側でクリップする */
  overflow: hidden;
}
/* イコライザー：再生中だけ帯が現れ、CSSアニメーションだけでバーが上下する飾り演出
   （音声を解析しているわけではない。Web Audio APIでaudio要素を繋ぎ替えると、
   file://で直接開いたときに音声出力そのものが無音化する環境があるため、
   音声ルーティングには一切手を加えないCSSだけの実装にしている）。
   ジャケット画像上部の帯に重ねる */
.player-eq-wrap {
  position: absolute; top: 0; left: 0; right: 0; height: 40px;
  padding: 0 14px;
  background: linear-gradient(to bottom, rgba(12, 10, 16, 0.55) 0%, rgba(12, 10, 16, 0) 100%);
  display: flex; align-items: flex-end; gap: 3px;
  opacity: 0; transition: opacity 0.4s ease; pointer-events: none;
}
.player-eq-wrap.is-active { opacity: 1; }
.player-eq-wrap.is-active .player-eq-bar { animation-play-state: running; }
.player-eq-bar {
  flex: 1 1 auto; height: 6px; border-radius: 2px 2px 0 0;
  background: var(--cat-color, var(--purple));
  animation: eqBounce 0.9s ease-in-out infinite;
  animation-play-state: paused;
  animation-delay: calc(var(--eq-i, 0) * -0.07s);
}
.player-eq-bar:nth-child(5n+1) { background: #FD956B; }
.player-eq-bar:nth-child(5n+2) { background: #FDE337; }
.player-eq-bar:nth-child(5n+3) { background: #93C65F; }
.player-eq-bar:nth-child(5n+4) { background: #2E89FD; }
@keyframes eqBounce {
  0%, 100% { height: 6px; }
  25% { height: 26px; }
  50% { height: 14px; }
  75% { height: 34px; }
}
/* 湯気：ジャケット内のマグカップの上にCSSだけで漂わせる演出
   （MUSIC_TRACKSにsteamPositionがある曲だけ表示。main.jsのbuildMusicTracksが
   left/topをインラインstyleで指定する＝マグの位置は画像ごとに違うため）。
   曲を再生していないときは静止画のままにしたいので、既定は一時停止にしておき
   .player-card.is-playing のときだけ動かす（main.jsが再生/停止でクラスを付け外し） */
.player-steam { position: absolute; width: 30px; height: 60px; transform: translate(-50%, -100%); pointer-events: none; }
.player-steam span {
  position: absolute; bottom: 0; left: 50%; width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.6); filter: blur(2px);
  animation: steamRise 3.2s ease-in infinite;
  animation-play-state: paused;
}
.player-card.is-playing .player-steam span,
.hidden-track-cover.is-playing .player-steam span { animation-play-state: running; }
.player-steam span:nth-child(2) { left: 30%; animation-delay: 1.05s; }
.player-steam span:nth-child(3) { left: 70%; animation-delay: 2.1s; }
@keyframes steamRise {
  0% { transform: translate(-50%, 0) scale(0.6); opacity: 0; }
  15% { opacity: 0.55; }
  55% { transform: translate(-50%, -28px) scale(1.1) rotate(6deg); opacity: 0.35; }
  100% { transform: translate(-50%, -55px) scale(1.7) rotate(-6deg); opacity: 0; }
}
/* 流れ星：サビの間だけ、背景の夜景（窓の外の空）に流す演出。
   main.jsが再生位置とMUSIC_TRACKSのchorusTimesを見比べて、サビの間だけ
   .is-chorusを付け外しする（音声には触れないCSSアニメーションのみ） */
.player-stars { position: absolute; overflow: hidden; pointer-events: none; }
.player-star {
  position: absolute; top: 0; left: -20%; width: 70px; height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 80%, #fff 100%);
  border-radius: 999px;
  opacity: 0;
  animation: shootingStar 2.6s linear infinite;
  animation-play-state: paused;
}
.player-card.is-playing .player-stars.is-chorus .player-star { animation-play-state: running; }
.player-star:nth-child(1) { top: 6%; animation-delay: 0s; }
.player-star:nth-child(2) { top: 42%; animation-delay: 1.3s; }
.player-star:nth-child(3) { top: 74%; animation-delay: 2.6s; }
@keyframes shootingStar {
  0% { transform: translate(0, 0) rotate(35deg); opacity: 0; }
  5% { opacity: 1; }
  30% { opacity: 1; }
  42% { opacity: 0; }
  100% { transform: translate(220%, 150%) rotate(35deg); opacity: 0; }
}
/* 照明・ネオン看板の明滅：サビ（フックの繰り返し部分含む）の間だけ、
   ジャケット内の既存の光源（ネオン看板・デスクランプ等）の上に光を重ねて
   パルスさせる演出。絵そのもの（常時点灯）はそのまま、光を足すだけ。
   色は既定で紫（ネオン用）。--glow-rgbをインラインstyleで上書きすれば
   ランプの暖色など別の色にできる（main.jsのtrack.glowColorで指定） */
.player-glow {
  --glow-rgb: 216, 124, 255;
  position: absolute; border-radius: 10px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--glow-rgb), 0.65), rgba(var(--glow-rgb), 0) 70%);
  mix-blend-mode: screen;
  animation: glowPulse 1.4s ease-in-out infinite;
  animation-play-state: paused;
}
.player-card.is-playing .player-glow.is-chorus { animation-play-state: running; }
@keyframes glowPulse {
  0%, 100% { opacity: 0; filter: brightness(1); }
  50% { opacity: 0.85; filter: brightness(1.5); }
}
/* 夕陽・窓明かり向けの光演出（.player-glow--sun）。
   ネオン・ランプ向けのglowPulse（1.4秒・強いパルス）とは違い、
   「風で少し揺れている」程度のゆっくりした揺らぎにするための専用アニメーション。
   使い方はglowRegionsの要素に variant: "sun" を足すだけ（main.js側で
   player-glow--sun のクラスが付く）。点滅・フラッシュにならないよう、
   opacityの下限を0にせず、明るさとサイズだけがゆるやかに変化する */
.player-glow--sun {
  --glow-rgb: 255, 190, 120;
  animation-name: sunlightSway;
  animation-duration: 7s;
  animation-timing-function: ease-in-out;
}
@keyframes sunlightSway {
  0%, 100% { opacity: 0.32; transform: scale(1); filter: brightness(1); }
  50% { opacity: 0.6; transform: scale(1.06); filter: brightness(1.18); }
}
/* アニメーション低減設定のユーザーには、湯気・流れ星・光の演出をすべて止める
   （ジャケットは静止画のまま。歌詞同期など再生に必要な機能はそのまま動く） */
@media (prefers-reduced-motion: reduce) {
  .player-steam span,
  .player-star,
  .player-glow,
  .player-glow--sun { animation: none; }
}
/* スマホでは夕陽の光演出をさらに控えめに（湯気は据え置き）。
   小さい画面でオーバーレイの主張が強く出すぎないようにするだけで、
   画像サイズ・文字の可読性には触れない */
@media (max-width: 640px) {
  .player-glow--sun { animation-name: sunlightSwayMobile; }
  @keyframes sunlightSwayMobile {
    0%, 100% { opacity: 0.2; transform: scale(1); filter: brightness(1); }
    50% { opacity: 0.4; transform: scale(1.03); filter: brightness(1.1); }
  }
}
/* ジャケット中央の再生／一時停止ボタン。画像を一目見て「押せば聴ける」と
   伝わるようにするための追加ボタン（コントロール欄の.player-playbtnとは別）。
   半透明にしてジャケットの絵柄を邪魔しないようにしつつ、常時表示にする
   （hover前提にしない＝スマホでも最初から見えている）。クリックの受け口は
   main.js側で親の.player-coverにまとめてあるので、ここはあくまで見た目のボタン */
.player-cover-playbtn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; min-width: 44px; min-height: 44px;
  border-radius: 50%;
  background: rgba(30, 20, 40, 0.42);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 6;
  transition: transform 0.18s ease, background 0.18s ease;
}
.player-cover-playbtn:hover,
.player-cover-playbtn:focus-visible {
  background: rgba(115, 63, 152, 0.55);
  transform: translate(-50%, -50%) scale(1.05);
}
.player-cover-playbtn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.player-cover-play-icon {
  color: #fff; font-size: 22px; line-height: 1; transform: translateX(2px);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
/* 再生中だけ、ボタンの周りに薄い紫のリングを添える（弱いpulseのみ・派手にしない） */
.player-card.is-playing .player-cover-playbtn {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 6px rgba(168, 85, 247, 0.22);
  animation: coverPlayRing 2.4s ease-in-out infinite;
}
@keyframes coverPlayRing {
  0%, 100% { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 6px rgba(168, 85, 247, 0.18); }
  50% { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 9px rgba(168, 85, 247, 0.3); }
}
@media (prefers-reduced-motion: reduce) {
  .player-card.is-playing .player-cover-playbtn { animation: none; }
}
@media (max-width: 640px) {
  .player-cover-playbtn { width: 56px; height: 56px; }
  .player-cover-play-icon { font-size: 19px; }
}

.player-lyrics-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 22px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
  background: linear-gradient(to top, rgba(12, 10, 16, 0.74) 0%, rgba(12, 10, 16, 0.42) 55%, rgba(12, 10, 16, 0) 100%);
  -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px);
}
.lyric-line {
  margin: 0; color: #fff; font-family: var(--font-body);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  line-height: 1.6; opacity: 0; transform: translateY(6px);
}
.lyric-prev, .lyric-next { font-size: 12.5px; }
.lyric-current { font-size: clamp(16px, 2.6vw, 22px); font-weight: 700; letter-spacing: 0.01em; }
/* main.jsが歌詞の切り替わりごとに .lyric-anim をつけ外しする（reflowを挟んで再トリガー）。
   派手なカラオケ演出ではなく、フェード＋わずかな上下移動だけの落ち着いた切り替え */
.lyric-prev.lyric-anim, .lyric-next.lyric-anim {
  animation: lyricSettleSide 0.6s ease both;
}
.lyric-current.lyric-anim {
  animation: lyricSettleCurrent 0.6s ease both;
}
@keyframes lyricSettleCurrent { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes lyricSettleSide    { from { opacity: 0; transform: translateY(6px); } to { opacity: 0.5; transform: translateY(0); } }

.player-body { padding: 18px 22px 22px; }
.player-meta h3 { font-size: 19px; line-height: 1.4; }
.player-version { font-family: var(--font-hand); font-size: 15px; color: var(--cat-color, var(--purple)); margin-top: 2px; }
.player-genre { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.player-genre-tag {
  font-family: var(--font-display); font-size: 10.5px; letter-spacing: 0.06em;
  color: var(--paper); background: var(--cat-color, var(--purple));
  padding: 2px 9px; border-radius: 99px;
}
.player-controls { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.player-playbtn {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform 0.15s ease;
}
.player-playbtn:hover { transform: translate(-2px, -2px); }
.player-play-icon { font-size: 15px; line-height: 1; transform: translateX(1px); }
.player-time { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; flex: none; }
.player-seek {
  flex: 1 1 auto; -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 999px; background: var(--line); outline: none; cursor: pointer;
}
.player-seek::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: var(--cat-color, var(--purple)); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--ink);
  cursor: pointer;
}
.player-seek::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--paper);
  background: var(--cat-color, var(--purple)); box-shadow: 0 0 0 1px var(--ink); cursor: pointer;
}
.player-lyrics-toggle {
  display: block; margin-top: 16px;
  font-family: var(--font-display); font-size: 12.5px; letter-spacing: 0.04em;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px;
  padding: 8px 16px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.15s ease;
}
.player-lyrics-toggle:hover { transform: translate(-2px, -2px); }
.player-lyrics-full {
  margin-top: 12px; padding: 14px 16px;
  background: var(--paper-warm); border-left: 4px solid var(--cat-color, var(--purple));
  font-size: 13.5px; line-height: 1.9; color: var(--ink);
}
.player-lyrics-full[hidden] { display: none; }

/* ---- 8-3. music-artists.html：KAZUKINLAB MUSIC所属アーティスト紹介 ----
   このページだけ「少し夜っぽく」する指定のため、:root は触らずページ内だけの
   ローカル変数（--artists-*）でダーク配色にしている。ヘッダー・フッターは
   他ページと同じ白基調のまま（.artists-hero より下だけが暗くなる）。 */
.artists-hero, .artist-section, .artists-outro, .artists-credit, .tracks-body {
  --artists-bg: #14121C;
  --artists-bg-alt: #1B1826;
  --artists-ink: #F4F1F8;
  --artists-ink-soft: #B7AFC6;
  --artists-line: rgba(244, 241, 248, 0.14);
  background: var(--artists-bg);
  color: var(--artists-ink);
}
.artists-hero { padding: 56px 0 40px; text-align: center; }
.artists-hero .cat-label {
  font-family: var(--font-display); font-size: 12px; letter-spacing: 0.24em;
  color: var(--artists-bg); background: var(--artists-ink);
  display: inline-block; padding: 4px 12px; margin-bottom: 16px;
}
.artists-hero h1 {
  font-family: var(--font-display); font-size: clamp(38px, 7vw, 64px); line-height: 1.05;
}
.artists-hero-sub {
  font-family: var(--font-hand); font-size: 20px; color: #C9A8FF; margin-top: 16px;
}
.artists-hero-lead { color: var(--artists-ink-soft); margin-top: 18px; line-height: 1.9; }

.artist-section { padding: 64px 0; border-top: 1px solid var(--artists-line); }
.artist-section:nth-child(even) { background: var(--artists-bg-alt); }
.artist-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
}
/* HINA・NOILは「テキスト左／画像右」。画像を後ろに置くだけで、
   HTML上の並び（画像→名前→ジャンル→プロフィール）はスマホでもそのまま活きる */
.artist-section.is-reverse .artist-image { order: 2; }
.artist-image-btn {
  display: block; width: 100%; padding: 0; border: none; background: none; cursor: zoom-in;
}
.artist-image-btn img {
  display: block; width: 100%; max-width: 640px; height: auto; margin: 0 auto;
  border: 2px solid var(--artist-color, #A855F7); border-radius: var(--radius);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
  box-shadow:
    0 10px 34px rgba(0, 0, 0, 0.45),
    0 0 0 1px color-mix(in srgb, var(--artist-color, #A855F7) 55%, transparent),
    0 0 16px 2px color-mix(in srgb, var(--artist-color, #A855F7) 45%, transparent),
    0 0 32px 6px color-mix(in srgb, var(--artist-color, #A855F7) 25%, transparent);
  animation: artist-neon-breathe 3.2s ease-in-out infinite;
}
.artist-image-btn:hover img,
.artist-image-btn:focus-visible img {
  transform: scale(1.035) translateY(-4px);
  animation-play-state: paused;
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1.5px color-mix(in srgb, var(--artist-color, #A855F7) 80%, transparent),
    0 0 26px 4px color-mix(in srgb, var(--artist-color, #A855F7) 70%, transparent),
    0 0 48px 12px color-mix(in srgb, var(--artist-color, #A855F7) 45%, transparent);
}
.artist-image-btn:active img { transform: scale(0.985); }

@keyframes artist-neon-breathe {
  0%, 100% {
    box-shadow:
      0 10px 34px rgba(0, 0, 0, 0.45),
      0 0 0 1px color-mix(in srgb, var(--artist-color, #A855F7) 55%, transparent),
      0 0 16px 2px color-mix(in srgb, var(--artist-color, #A855F7) 45%, transparent),
      0 0 32px 6px color-mix(in srgb, var(--artist-color, #A855F7) 25%, transparent);
  }
  50% {
    box-shadow:
      0 10px 34px rgba(0, 0, 0, 0.45),
      0 0 0 1px color-mix(in srgb, var(--artist-color, #A855F7) 72%, transparent),
      0 0 22px 4px color-mix(in srgb, var(--artist-color, #A855F7) 62%, transparent),
      0 0 44px 10px color-mix(in srgb, var(--artist-color, #A855F7) 36%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .artist-image-btn img { animation: none; transition: box-shadow 0.4s ease; }
  .artist-image-btn:hover img, .artist-image-btn:focus-visible img { transform: none; }
}
.artist-eyebrow {
  font-family: var(--font-display); font-size: 11px; letter-spacing: 0.16em;
  color: var(--artist-color, #A855F7);
}
.artist-name {
  font-family: var(--font-display); font-size: clamp(34px, 5vw, 52px);
  margin-top: 6px; line-height: 1;
}
.artist-genres { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.artist-genre-tag {
  font-family: var(--font-display); font-size: 10.5px; letter-spacing: 0.05em;
  color: var(--artists-bg); background: var(--artist-color, #A855F7);
  padding: 3px 10px; border-radius: 99px;
}
.artist-profile { margin-top: 18px; color: var(--artists-ink-soft); line-height: 1.95; }
.artist-keywords {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; list-style: none;
}
.artist-keywords li {
  font-size: 11.5px; letter-spacing: 0.03em; color: var(--artists-ink-soft);
  border: 1px solid var(--artists-line); border-radius: 99px; padding: 4px 12px;
}

.artists-outro { padding: 48px 0 8px; text-align: center; }
/* 黄色い.article-cta-btnはダーク配色のこのページには浮くため、
   同じ形（ピル型・太い枠・ハードシャドウ）を保ちつつ配色だけ紫トーンに変えた専用ボタン */
.artists-cta-btn {
  display: inline-block; font-family: var(--font-display); font-size: 14px; letter-spacing: 0.03em;
  background: #C9A8FF; border: 2px solid var(--artists-ink); border-radius: 999px; color: #14121C;
  padding: 12px 24px; box-shadow: 3px 3px 0 rgba(244, 241, 248, 0.5); text-decoration: none;
  transition: transform 0.15s ease;
}
.artists-cta-btn:hover { transform: translate(-2px, -2px); }

.artists-credit { padding: 48px 0; text-align: center; border-top: 1px solid var(--artists-line); }
.artists-credit-text { color: var(--artists-ink-soft); font-size: 13px; line-height: 1.9; }
.artists-credit-text strong { display: block; color: var(--artists-ink); font-size: 15px; margin-bottom: 4px; }

/* ---- 8-4. music-tracks.html：KAZUKINLAB MUSIC 全曲一覧 ----
   .tracks-bodyは.artists-hero等と同じダーク配色（8-3の--artists-*をそのまま継承）。
   曲カード自体は白いpaperカード（.player-card / .player-cover を無加工で流用）を
   暗い舞台の上に並べる構成。フィルタチップだけダーク用に上書きしている */
.tracks-body { padding: 8px 0 56px; }
.tracks-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 32px; }
.tracks-filters .filter-chip { background: transparent; border-color: var(--artists-ink-soft); color: var(--artists-ink); }
.tracks-filters .filter-chip.is-active {
  background: var(--cat-color, #A855F7); border-color: var(--cat-color, #A855F7); color: #14121C;
}
.tracks-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.track-list-card { position: relative; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.track-list-card:hover, .track-list-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(168, 85, 247, 0.3), var(--shadow);
  border-color: #A855F7;
}
.track-list-card:hover .player-cover, .track-list-card:focus-within .player-cover { transform: scale(1.04); }
.track-list-body { padding: 16px 18px 20px; }
/* .tracks-bodyはダーク配色（8-3の--artists-inkをそのまま継承）だが、
   カード自体は白背景（.player-card { background: var(--paper) }）のため、
   曲名がcolor未指定のままだと--artists-ink（ほぼ白 #F4F1F8）が白いカードに
   継承されて薄く読めなくなってしまう。ここで明示的に濃い紫系の色を指定し、
   アーティスト名（.player-versionのcolor: var(--cat-color)）より太く大きくして
   曲名の方が目立つようにする */
.track-list-card .player-meta h3 {
  color: #3B1B57; font-weight: 800; font-size: 20px; line-height: 1.35;
}
/* button要素化（歌詞を見る＝ページ遷移させない）に伴い、リンクだった頃の見た目を維持する
   ためのリセット。border/background/paddingをすべて打ち消し、フォント周りだけ引き継ぐ */
.track-list-cta {
  display: inline-block; margin-top: 12px; font-family: var(--font-display); font-size: 12px;
  letter-spacing: 0.03em; color: var(--cat-color, var(--purple)); text-decoration: none;
  background: none; border: none; padding: 0; cursor: pointer;
}
.track-list-cta:hover { text-decoration: underline; }
.tracks-grid .empty-state { border-color: var(--artists-line); color: var(--artists-ink-soft); }
@media (max-width: 900px) {
  .tracks-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .tracks-grid { grid-template-columns: 1fr; gap: 16px; }
  .tracks-filters { gap: 6px; margin-bottom: 24px; }
}

/* ---- 8-5. music-tracks.html：ジャケット拡大ビュー ----
   一覧の再生ボタンを押すと、そのジャケットを画面中央に大きく表示して1曲に
   集中できるようにする。曲の再生はTRACKS一覧と同じ<audio>・同じ再生ロジックを
   共有し、新しいaudio要素は作らない。開閉はopacity/scale/translateYの
   CSSトランジションのみで表現し、hidden属性の付け外しはmain.js側で行う。 */
.tracks-lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.tracks-lightbox[hidden] { display: none; }
.tracks-lightbox-backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 4, 12, 0.88);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.5s ease;
}
.tracks-lightbox.is-open .tracks-lightbox-backdrop { opacity: 1; }
.tracks-lightbox-close {
  position: fixed; top: 20px; right: 20px; z-index: 2;
  width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.55);
  background: rgba(20, 18, 28, 0.6); color: #F4F1F8; font-size: 18px;
  cursor: pointer; transition: transform 0.15s ease, background 0.15s ease;
}
.tracks-lightbox-close:hover, .tracks-lightbox-close:focus-visible {
  background: rgba(168, 85, 247, 0.55); transform: scale(1.06);
}
.tracks-lightbox-stage {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  max-width: 100%; max-height: 100%;
  opacity: 0; transform: translateY(14px) scale(0.9);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.tracks-lightbox.is-open .tracks-lightbox-stage { opacity: 1; transform: translateY(0) scale(1); }
.tracks-lightbox-jacket {
  position: relative; display: inline-flex;
  max-width: min(78vw, 780px); max-height: 82vh;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.tracks-lightbox-jacket img, .tracks-lightbox-jacket video {
  display: block; width: auto; height: auto;
  max-width: min(78vw, 780px); max-height: 82vh;
}
/* jacketはinline-flexで横並びのため、hidden属性そのものではなく
   display:blockを上書きするこのルールが優先されてしまい、img/videoの
   どちらか一方をhiddenにしても横に並んで両方表示される事故が起きていた。
   [hidden]をここで明示的に上書きして正しく隠す（2026-09-06修正） */
.tracks-lightbox-jacket img[hidden], .tracks-lightbox-jacket video[hidden] {
  display: none;
}
/* 再生中だけ、ごくゆっくりKen Burns風にわずかにズームする（気づかない程度）。
   一時停止中はanimation-play-stateで止め、reduced-motionでは丸ごと無効化 */
@media (prefers-reduced-motion: no-preference) {
  .tracks-lightbox-jacket img, .tracks-lightbox-jacket video {
    animation: tracksLightboxKenBurns 14s ease-in-out infinite alternate;
    animation-play-state: paused;
  }
  .tracks-lightbox.is-playing .tracks-lightbox-jacket img,
  .tracks-lightbox.is-playing .tracks-lightbox-jacket video {
    animation-play-state: running;
  }
  @keyframes tracksLightboxKenBurns {
    from { transform: scale(1); }
    to { transform: scale(1.015); }
  }
}
.tracks-lightbox-meta { text-align: center; color: var(--artists-ink); }
.tracks-lightbox-meta h3 { font-family: var(--font-display); font-size: 16px; }
.tracks-lightbox-meta p { font-family: var(--font-hand); font-size: 14px; color: var(--artists-ink-soft); margin-top: 2px; }
.tracks-lightbox-meta .track-list-cta { color: var(--cat-color, #C9A8FF); margin-top: 10px; }
@media (max-width: 640px) {
  .tracks-lightbox-jacket, .tracks-lightbox-jacket img, .tracks-lightbox-jacket video {
    max-width: calc(100vw - 32px); max-height: 62vh;
  }
  .tracks-lightbox-close { top: 12px; right: 12px; }
}

/* ---- 8-5b. music-tracks.html：歌詞パネル ----
   「歌詞を見る」を押してもページ遷移させず、同じページ上に歌詞を表示するための
   オーバーレイ。ジャケット拡大ビュー（.tracks-lightbox）とは独立した別要素で、
   曲の再生・停止・currentTimeには一切関与しない（表示のON/OFFだけを行う）。
   表示中の曲のジャケットを画面いっぱいの背景として敷き（新しい画像は作らず
   coverImageのURLをそのまま流用）、blur＋暗さで沈めた上に、KAZUKINLAB MUSICらしい
   黒〜紫系の半透明ダークパネルを浮かせる構成 */
.lyrics-panel {
  position: fixed; inset: 0; z-index: 320;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: #0a0612; /* 背景imgの読み込み前・デコード前の隙間が黒で埋まるように */
}
.lyrics-panel[hidden] { display: none; }
.lyrics-panel-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  /* 「何の曲か分かる程度に見えるが、歌詞の邪魔はしない」の狙いでぼかし・減光・減彩。
     scale(1.05)はblurで生じる縁の透け（ぼかしで画像端が透明ににじむ）を隠すため */
  filter: blur(18px) brightness(0.35) saturate(0.7);
  transform: scale(1.05);
  opacity: 0; transition: opacity 0.35s ease;
}
.lyrics-panel.is-open .lyrics-panel-bg { opacity: 1; }
.lyrics-panel-backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 4, 12, 0.62);
  opacity: 0; transition: opacity 0.3s ease;
}
.lyrics-panel.is-open .lyrics-panel-backdrop { opacity: 1; }
.lyrics-panel-stage {
  position: relative; z-index: 1;
  width: min(680px, 100%); max-height: 82vh;
  background: rgba(18, 16, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 22px;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(16px) scale(0.97);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.lyrics-panel.is-open .lyrics-panel-stage { opacity: 1; transform: translateY(0) scale(1); }
.lyrics-panel-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 15px; line-height: 1;
  cursor: pointer; transition: background-color 0.2s;
}
.lyrics-panel-close:hover, .lyrics-panel-close:focus-visible { background: rgba(255, 255, 255, 0.16); }
.lyrics-panel-head {
  display: flex; gap: 14px; align-items: center;
  padding: 20px 52px 16px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.lyrics-panel-cover { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.lyrics-panel-headtext h3 { font-family: var(--font-display); font-size: 16px; color: #fff; line-height: 1.4; }
.lyrics-panel-headtext p { font-family: var(--font-hand); font-size: 13px; color: var(--cat-color, #C9A8FF); margin-top: 2px; }
.lyrics-panel-body {
  padding: 20px 24px 32px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  flex: 1; scroll-behavior: smooth;
  scrollbar-color: rgba(180, 100, 255, 0.45) rgba(255, 255, 255, 0.05); /* Firefox */
}
.lyrics-panel-body::-webkit-scrollbar { width: 8px; }
.lyrics-panel-body::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); }
.lyrics-panel-body::-webkit-scrollbar-thumb { background: rgba(180, 100, 255, 0.45); border-radius: 999px; }
.lyrics-panel-line {
  font-family: var(--font-body); font-size: 15px; line-height: 1.9;
  color: rgba(255, 255, 255, 0.72); opacity: 0.4;
  padding: 4px 0; transition: color 0.25s ease, font-weight 0.25s ease, opacity 0.25s ease;
}
/* 現在行を中心に、過去行・次行は少し透明度を落として自然な流れに見せる */
.lyrics-panel-line.is-current ~ .lyrics-panel-line { opacity: 0.65; }
.lyrics-panel-line.is-current {
  color: #fff; font-weight: 600; font-size: 16.5px; opacity: 1;
  text-shadow: 0 0 18px color-mix(in srgb, var(--cat-color, #A855F7) 55%, transparent);
}
.lyrics-panel-line.is-current + .lyrics-panel-line { opacity: 0.72; }
.lyrics-panel-line--plain { color: rgba(255, 255, 255, 0.85); white-space: normal; opacity: 1; }
@media (max-width: 640px) {
  .lyrics-panel { padding: 0 16px; align-items: flex-end; }
  .lyrics-panel-stage {
    width: 100%; max-height: 86vh; border-radius: 22px 22px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .lyrics-panel-body { padding: 16px 18px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .tracks-lightbox-backdrop, .tracks-lightbox-stage { transition-duration: 0.15s; }
  .tracks-lightbox-stage { transform: none; }
  .tracks-lightbox.is-open .tracks-lightbox-stage { transform: none; }
}

/* 画像クリックで拡大表示するだけの簡易ライトボックス（外部ライブラリ不使用）。
   --lightbox-glow はJS側でクリックしたアーティストの --artist-color を読み取って設定する */
.artist-lightbox {
  position: fixed; inset: 0; z-index: 200;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--lightbox-glow, #A855F7) 40%, transparent), transparent 72%),
    rgba(10, 8, 14, 0.92);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 1; transition: opacity 0.35s ease, background 0.5s ease;
}
.artist-lightbox[hidden] { display: none; }
.artist-lightbox img {
  max-width: min(90vw, 720px); max-height: 88vh; width: 100%; height: auto;
  aspect-ratio: 1 / 1; border-radius: 8px;
  box-shadow: 0 0 60px 14px color-mix(in srgb, var(--lightbox-glow, #A855F7) 45%, transparent);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}
@media (prefers-reduced-motion: reduce) {
  .artist-lightbox, .artist-lightbox img { transition: none; }
}
.artist-lightbox-close {
  position: absolute; top: 18px; right: 18px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--artists-ink); color: var(--artists-bg); border: none;
  font-size: 18px; cursor: pointer;
}

/* ---- 9. 記事ページ ---- */
.article-page { max-width: 760px; margin: 0 auto; padding: 40px 20px 80px; }
.article-page .meta { display: flex; gap: 12px; align-items: center; font-size: 13px; margin-bottom: 14px; }
.article-page h1 {
  font-size: clamp(26px, 4.5vw, 36px); line-height: 1.45; margin-bottom: 20px;
  border-bottom: 4px solid var(--yellow); padding-bottom: 16px;
}
.article-page .lead-image img {
  border: 2px solid var(--ink); border-radius: var(--radius); margin: 8px 0 28px;
}
.article-body h2 {
  font-size: 22px; margin: 44px 0 16px; padding-left: 14px;
  border-left: 6px solid var(--cat-color, var(--purple)); line-height: 1.5;
}
.article-body h3 { font-size: 18px; margin: 32px 0 12px; }
.article-body p { margin: 0 0 1.4em; }
.article-body ul { list-style: disc; padding-left: 1.4em; margin: 0 0 1.4em; }
.article-body li { margin-bottom: 0.4em; }
.article-body strong { background: linear-gradient(transparent 62%, var(--yellow) 62%); }
.article-body img { border: 2px solid var(--ink); border-radius: var(--radius); margin: 10px 0 24px; }
.article-body figure { margin: 10px 0 24px; }
.article-body figure img { margin: 0; }
.article-body figcaption { font-family: var(--font-hand); font-size: 15px; color: var(--ink-soft); margin-top: 6px; }

/* KAZUKINのひとこと（記事内アクセント） */
.kazukin-note {
  display: flex; gap: 14px; align-items: center;
  border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--paper-warm); padding: 14px 18px; margin: 30px 0;
}
.kazukin-note img { width: 56px; border: none; margin: 0; border-radius: 0; }
.kazukin-note .hand { font-family: var(--font-hand); font-size: 17px; color: var(--purple); }

/* 記事末尾の免責ひとこと（INVEST記事で使用） */
.article-body p.article-disclaimer { font-size: 13px; color: var(--ink-soft); margin: 2.4em 0 0; }

/* 記事末尾から別ページへ誘導するボタン（例: MUSIC記事→楽曲プレイヤーのあるカテゴリページ） */
.article-body p.article-cta { margin: 2.4em 0 0; }
.article-cta-btn {
  display: inline-block; font-family: var(--font-display); font-size: 14px; letter-spacing: 0.03em;
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px; color: var(--ink);
  padding: 12px 24px; box-shadow: 3px 3px 0 var(--ink); text-decoration: none;
  transition: transform 0.15s ease;
}
.article-cta-btn:hover { transform: translate(-2px, -2px); }

/* 記事を最後まで読むとふわっと出る、小さなごほうび（main.jsのsetupArticleEndRewardとセット） */
.read-reward {
  position: fixed; right: 20px; bottom: -80px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 8px 16px 8px 8px; box-shadow: 4px 4px 0 var(--ink);
  opacity: 0; transition: bottom 0.4s ease, opacity 0.4s ease;
}
.read-reward.is-visible { bottom: 20px; opacity: 1; }
.read-reward img { width: 46px; height: auto; border: none; margin: 0; border-radius: 0; }
.read-reward .hand { font-family: var(--font-hand); font-size: 15px; color: var(--ink); white-space: nowrap; }
@media (max-width: 640px) {
  .read-reward { right: 12px; left: 12px; justify-content: center; }
  .read-reward .hand { white-space: normal; font-size: 14px; }
}

/* お問い合わせフォームの埋め込み（contact.htmlで使用）
   高さはiframeのheight属性（1200px）で指定。ここでは枠のデザインのみ */
.contact-form-embed {
  border: 2px solid var(--ink); border-radius: var(--radius);
  background: #FFFFFF; overflow: hidden;
}

/* ---- 10. ABOUT / フッター / 404 ---- */
.about-block {
  display: grid; grid-template-columns: 1fr 2fr; gap: 36px; align-items: center;
}
.about-block .face img { width: min(220px, 100%); margin: 0 auto; border: 2px solid var(--ink); border-radius: var(--radius); }
.about-block h2 { font-family: var(--font-display); font-size: 26px; margin-bottom: 12px; }
.about-block p { color: var(--ink-soft); }
.text-link {
  display: inline-block; margin-top: 16px;
  font-family: var(--font-display); font-size: 13px; letter-spacing: 0.1em;
  border-bottom: 3px solid var(--yellow); padding-bottom: 2px;
}

/* about.html内の小見出し（KAZUKIN LABの遊び／今日のKAZUKIN占い）。
   本文と同じ雰囲気を保ちつつ、セクションの切り替わりを分かりやすくするための小さな見出し */
.about-subhead {
  font-family: var(--font-display); font-size: 15px; letter-spacing: 0.04em;
  color: var(--ink); margin: 30px 0 8px;
}
/* 占いセクションを、直前の録音テープ企画と別コンテンツに見せるための区切り */
.about-fortune { margin-top: 28px; padding-top: 20px; border-top: 1px dashed #D8D2DE; }
.about-fortune .about-subhead { margin-top: 0; }
/* ページ下部の注釈・運営情報エリア。本文より控えめな見た目にするための区切り */
.about-notes { margin-top: 32px; padding-top: 18px; border-top: 1px solid #E4DFE8; }
.about-notes .page-disclaimer { margin-top: 0; }
.about-notes .page-disclaimer + .page-disclaimer { margin-top: 10px; }

/* 今日のKAZUKIN占い（about.html。main.jsのsetupFortuneとセット） */
.fortune-box { margin-top: 20px; }
.fortune-btn {
  font-family: var(--font-display); font-size: 13px; letter-spacing: 0.04em;
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px;
  padding: 10px 22px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.15s ease;
}
.fortune-btn:hover { transform: translate(-2px, -2px); }
.fortune-btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.fortune-result { font-family: var(--font-hand); font-size: 19px; color: var(--purple); margin-top: 14px; animation: serif-pop 0.4s ease; }

/* ボタンを押すと音楽が流れる仕掛け（about.html。main.jsのsetupMusicButtonとセット） */
.music-player { margin-top: 14px; }
.music-lead { font-size: 14px; color: var(--ink-soft); }
.music-tracks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.music-btn {
  font-family: var(--font-display); font-size: 13px; letter-spacing: 0.04em;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px;
  padding: 10px 18px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.15s ease;
}
.music-btn:hover { transform: translate(-2px, -2px); }
.music-btn[aria-pressed="true"] { background: var(--yellow); }
.music-len { font-family: var(--font-body); font-size: 12px; color: var(--ink-soft); margin-left: 8px; }
.music-note { font-family: var(--font-hand); font-size: 16px; color: var(--purple); margin-top: 12px; }
.music-disclaimer { font-size: 13px; color: var(--ink-soft); margin-top: 14px; }

/* 記事以外のページに置く免責文（記事の .article-disclaimer は .article-body の中でしか効かないため、
   同じ見た目の別クラスを用意してある。items.html などで使用） */
.page-disclaimer { font-size: 13px; color: var(--ink-soft); margin-top: 32px; max-width: 44em; }

.site-footer {
  border-top: 2px solid var(--ink); background: var(--ink); color: var(--paper);
  padding: 44px 0 26px; margin-top: 0;
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: 1fr auto; column-gap: 40px; align-items: center;
}
.footer-logo { grid-column: 1; font-family: var(--font-display); font-size: 22px; letter-spacing: 0.06em; }
.footer-nav { grid-column: 1; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 26px; }
/* ロゴ画像が白背景のため、ステッカー風の白カードに載せる（main.jsが自動生成） */
.footer-brand {
  grid-column: 2; grid-row: 1 / 3;
  display: block; background: var(--paper); border-radius: 10px;
  padding: 9px 14px; transform: rotate(-2deg);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}
.footer-brand:hover { transform: rotate(0deg) scale(1.03); }
.footer-brand img { display: block; width: 115px; height: auto; }
.footer-nav a { font-size: 13px; color: #CFC9D6; }
.footer-nav a:hover { color: var(--yellow); }
.footer-nav .footer-sub-link { color: #8E8798; font-size: 12px; } /* 免責事項などの補助リンク */
.copyright { grid-column: 1 / -1; font-size: 12px; color: #8F8799; border-top: 1px solid #3B3641; padding-top: 18px; position: relative; cursor: pointer; }

/* コピーライトをクリックすると一言浮かぶ（隠しコマンド系の小ネタ。main.jsのsetupFooterEggとセット） */
.footer-egg-msg {
  position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%);
  margin-bottom: 8px; white-space: nowrap; pointer-events: none;
  font-family: var(--font-hand); font-size: 15px; color: var(--yellow);
  animation: serif-pop 0.3s ease;
}

/* ---- 隠しページ「LAB FILE 00」（secret.html。ヘッダー・フッターは通常ページと共通） ---- */
.secret-page { padding: 60px 0 90px; }
.secret-page .file-label {
  font-family: var(--font-display); font-size: 12px; letter-spacing: 0.24em;
  color: var(--paper); background: var(--purple);
  display: inline-block; padding: 4px 12px; margin-bottom: 18px;
}
.secret-page h1 { font-family: var(--font-display); font-size: clamp(26px, 4.5vw, 38px); line-height: 1.3; }
.secret-page > .container > p.hand { font-family: var(--font-hand); font-size: 18px; color: var(--purple); margin-top: 10px; }
.secret-list { margin-top: 6px; color: var(--ink-soft); line-height: 1.9; }
.secret-list li { margin-bottom: 6px; }

/* LAB FILE 00 限定の隠しトラック（KAZUKINLAB MUSICの共通プレイヤーとは別実装） */
.hidden-track-lead { font-family: var(--font-hand); font-size: 16px; color: var(--purple); margin-bottom: 14px; }
.hidden-track-player { max-width: 480px; }
.hidden-track-cover {
  position: relative; width: 100%; border-radius: var(--radius);
  overflow: hidden; border: 2px solid var(--ink); background: var(--ink);
}
.hidden-track-cover img { display: block; width: 100%; height: auto; }
.hidden-track-telop {
  position: absolute; left: 6%; right: 6%; top: 62%;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-align: center; pointer-events: none;
  opacity: 0; transition: opacity 0.16s ease;
}
.hidden-track-telop.is-visible { opacity: 1; }
.hidden-track-telop-line {
  font-family: var(--font-display); color: #fff;
  font-size: clamp(20px, 5.4vw, 34px); line-height: 1.35;
  text-shadow: 0 0 6px rgba(0,0,0,0.55), 0 0 14px rgba(0,0,0,0.55), 2px 2px 0 rgba(0,0,0,0.35);
  padding: 2px 14px; background: rgba(0,0,0,0.28); border-radius: 10px;
  /* 文言内の\nで明示的に改行しているので、それ以外の場所での自動折り返しは
     基本させない（1文字だけ次行に落ちる不自然な折り返しを防ぐ）。
     どうしても収まらない場合だけ最終手段として折り返す。 */
  max-width: 100%; word-break: keep-all; overflow-wrap: break-word;
  text-wrap: balance;
}
.hidden-track-telop--big .hidden-track-telop-line {
  font-size: clamp(24px, 6.6vw, 42px);
}
.hidden-track-controls {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
}
.hidden-track-play {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid var(--ink); background: var(--yellow);
  font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.hidden-track-play:hover { background: var(--paper); }
.hidden-track-time { font-family: var(--font-display); font-size: 12px; color: var(--ink-soft); flex: none; }
.hidden-track-seek { flex: 1; accent-color: var(--purple); }

@media (max-width: 640px) {
  .hidden-track-telop-line { font-size: clamp(18px, 6.8vw, 28px); }
  .hidden-track-telop--big .hidden-track-telop-line { font-size: clamp(20px, 8vw, 32px); }
}

.notfound { text-align: center; padding: 90px 20px; }
.notfound .code { font-family: var(--font-display); font-size: 96px; color: var(--purple); line-height: 1; }
.notfound .hand { font-family: var(--font-hand); font-size: 20px; color: var(--ink-soft); margin: 14px 0 26px; }
.notfound img { width: min(420px, 90%); margin: 26px auto 0; border: 2px solid var(--ink); border-radius: var(--radius); transition: transform 0.2s ease; }
.notfound a.notfound-kazukin { display: block; }
.notfound a.notfound-kazukin:hover img,
.notfound a.notfound-kazukin:focus-visible img { transform: rotate(-3deg) scale(1.03); }
.notfound .tap-hint { display: block; margin-top: 10px; font-family: var(--font-hand); font-size: 15px; color: var(--ink-soft); }

/* ---- 11. スマホ対応 ---- */
@media (max-width: 900px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .item-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 15px; }

  /* ロゴはスマホでは少し控えめに（ヘッダーが縦に太りすぎないように） */
  .site-logo img { height: 50px; }

  /* ナビ → ハンバーガー化（inset上端はヘッダーの高さと連動）
     72px = ロゴ50px + 上下padding 10px×2 + 下線2px。
     visibility は「閉じている間はキーボードでも選べない」ようにするため。
     transformだけだと画面外に動くだけで、Tabキーで選べてしまう */
  .nav-toggle { display: block; }
  .global-nav {
    position: fixed; inset: 72px 0 auto 0;
    background: var(--paper); border-bottom: 2px solid var(--ink);
    transform: translateY(-130%); visibility: hidden;
    transition: transform 0.28s ease, visibility 0.28s ease;
    box-shadow: var(--shadow);
  }
  .global-nav.open { transform: translateY(0); visibility: visible; }
  .global-nav ul { flex-direction: column; gap: 0; padding: 8px 0; }
  .global-nav li { border-top: 1px solid var(--line); }
  .global-nav a { display: block; padding: 14px 24px; font-size: 14px; }

  /* ヒーロー：縦積み。キャラ全身が切れないサイズ */
  .hero-inner { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-copy { padding-bottom: 8px; }
  .hero-kazukin img { width: min(58vw, 260px); }
  .hero-serif { top: 0; left: 8%; }

  .section { padding: 52px 0; }
  .category-grid { gap: 14px; }
  .category-card h3 { font-size: 18px; }
  .article-grid { grid-template-columns: 1fr; }
  .item-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .pick-flag { font-size: 9px; padding: 3px 8px 3px 10px; }
  /* カテゴリ切替のボタンは指で押す前提なので、スマホでは当たり判定を広げる
     （文字の大きさは変えず、上下の余白だけ足して38px→約44pxにする）。
     フッターリンクを45pxにしたのと同じ考え方 */
  .cat-tabs { gap: 6px; }
  .cat-tabs .filter-chip { padding: 13px 14px; }
  .items-teaser { padding: 20px; flex-direction: column; align-items: flex-start; }
  .items-teaser-link { align-self: flex-start; }
  .player-body { padding: 16px 16px 18px; }
  .player-lyrics-overlay { padding: 16px 14px 16px; }
  .player-controls { gap: 8px; }
  .player-time { font-size: 11px; }

  .category-hero-inner { grid-template-columns: 1fr; padding: 34px 20px; }
  .about-block { grid-template-columns: 1fr; text-align: center; }
  .about-block h2 { margin-top: 6px; }

  /* フッターのリンクは指で押す前提なので、文字の大きさは変えずに
     上下の余白だけ足して当たり判定を広げる（25px → 45px）。
     min-width は「AI」のように短い名前でも押しやすくするため */
  .footer-nav { gap: 0 22px; }
  .footer-nav a { padding: 10px 0; min-width: 24px; }

  /* フッター：1カラムにしてロゴカードは中央寄せ */
  .footer-inner { grid-template-columns: 1fr; }
  .footer-brand { grid-column: 1; grid-row: auto; justify-self: center; margin: 4px 0 24px; }
  .footer-brand img { width: 95px; }

  /* music-artists.html：1カラムに積む（画像→名前→ジャンル→プロフィールの順はHTML順のまま） */
  .artists-hero { padding: 40px 0 30px; }
  .artist-section { padding: 44px 0; }
  .artist-layout { grid-template-columns: 1fr; gap: 24px; }
  .artist-section.is-reverse .artist-image { order: 0; }
}
