@charset "UTF-8";
/* ============================================================
   AVNOTA — スタイルシート
   デザイン方向: A案「ノート／文具」
     ・紙（オフホワイト）＋墨インク。夜は墨黒の和紙。
     ・見出しは明朝、本文はゴシック。
     ・写真は角丸なしの四角。UI部品だけ丸くする。
     ・価格は一覧に出さない（比較サイトに見せないため）。
   設計方針: モバイルファースト（既定＝スマホ、@media (min-width) で拡張）
   ============================================================ */

/* ---------- 配色（昼＝紙） ---------- */
:root {
  --paper:    #faf8f4;   /* 背景（紙） */
  --paper-2:  #f4f0e8;   /* 面（カード・囲み） */
  --paper-3:  #ebe5d9;   /* さらに沈む面 */
  --ink:      #1c1a17;   /* 本文（墨） */
  --ink-2:    #4d4841;   /* 副文 */
  --ink-3:    #8b847a;   /* 注釈 */
  --rule:     #ddd5c5;   /* 罫線 */
  --rule-2:   #c9bfaa;   /* 濃い罫線 */
  --indigo:   #3a4a8f;   /* アクセント（リンク・選択） */
  --indigo-2: #2a3870;
  --indigo-w: rgba(58,74,143,.08);
  --sticky:   #e8c86a;   /* 付箋の黄（差し色。少量だけ使う） */
  --sticky-w: rgba(232,200,106,.22);
  --red:      #b3402f;   /* 朱（セール・18禁） */
  --green:    #3f7d5c;

  --shadow:   0 1px 2px rgba(28,26,23,.06), 0 8px 24px rgba(28,26,23,.06);
  --shadow-up:0 -2px 16px rgba(28,26,23,.10);
  --radius:   6px;       /* UI部品の丸み（写真には使わない） */
  --radius-lg:10px;
  --max:      1120px;
  --tapmin:   44px;      /* タップ領域の最小 */
  --bar-h:    58px;      /* スマホ下部バーの高さ */
  --safe-b:   env(safe-area-inset-bottom, 0px);

  --font-sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP",
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP",
                "Songti SC", "Source Han Serif", Georgia, "Times New Roman", serif;

  /* 背景の地紋（テーマごとに差し替える）。昼は紙の横罫 */
  --texture: repeating-linear-gradient(
    to bottom, transparent 0, transparent 31px, rgba(0,0,0,.012) 31px, rgba(0,0,0,.012) 32px);
  --texture-size: auto;

  color-scheme: light;
}

/* ---------- 配色（夕方＝日暮れの茜） ---------- */
:root[data-theme="dusk"] {
  --paper:    #241a18;
  --paper-2:  #2e2320;
  --paper-3:  #3a2c28;
  --ink:      #f5e6d8;
  --ink-2:    #cdae99;
  --ink-3:    #9c8171;
  --rule:     #43312c;
  --rule-2:   #5e453d;
  --indigo:   #f2a365;   /* 夕陽のアクセント */
  --indigo-2: #ffbb84;
  --indigo-w: rgba(242,163,101,.12);
  --sticky:   #e8823f;
  --sticky-w: rgba(232,130,63,.16);
  --red:      #e0705a;
  --green:    #86b48c;

  --shadow:   0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --shadow-up:0 -2px 16px rgba(0,0,0,.45);
  --texture: none;
  color-scheme: dark;
}

/* ---------- 配色（星空） ---------- */
:root[data-theme="stars"] {
  --paper:    #0b1024;
  /* 面を半透明にして、カードや囲みの向こうにも星が見えるようにする */
  --paper-2:  rgba(20, 29, 60, .66);
  --paper-3:  rgba(30, 41, 79, .62);
  --ink:      #e8edff;
  --ink-2:    #aab5d9;
  --ink-3:    #7580a8;
  --rule:     #232e52;
  --rule-2:   #36436e;
  --indigo:   #93baff;
  --indigo-2: #b3cfff;
  --indigo-w: rgba(147,186,255,.12);
  --sticky:   #ffd97a;   /* 星の金 */
  --sticky-w: rgba(255,217,122,.14);
  --red:      #ff8f83;
  --green:    #76d7b1;

  --shadow:   0 1px 2px rgba(0,0,0,.45), 0 8px 24px rgba(0,0,0,.4);
  --shadow-up:0 -2px 16px rgba(0,0,0,.5);
  /* 星は body::before / ::after に敷くので、地紋そのものは無し。
     背景は上ほど深く、下ほど地平線に近い色にする */
  --texture: linear-gradient(180deg, #070b1c 0%, #0b1024 55%, #131a38 100%);
  --texture-size: 100% 100%;
  --texture-attach: fixed;   /* 画面いっぱいに空を張る（スクロールしても空は動かない） */
  color-scheme: dark;
}

/* ---------- 星空テーマの星 ---------- */
/* 本文の読みやすさを落とさないよう、星は本文の背面（z-index:-1）にだけ置く */
:root[data-theme="stars"] body::before,
:root[data-theme="stars"] body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none;
}

/* ① 細かい星をたくさん（ゆっくり瞬く） */
:root[data-theme="stars"] body::before {
  background-image:
    radial-gradient(1.4px 1.4px at  6%  9%, #ffffff, transparent 62%),
    radial-gradient(1.1px 1.1px at 18% 24%, #dfe7ff, transparent 62%),
    radial-gradient(1.6px 1.6px at 31%  6%, #ffffff, transparent 62%),
    radial-gradient(1px   1px   at 44% 19%, #cdd8ff, transparent 62%),
    radial-gradient(1.3px 1.3px at 57% 11%, #ffffff, transparent 62%),
    radial-gradient(1px   1px   at 69% 27%, #e6ecff, transparent 62%),
    radial-gradient(1.7px 1.7px at 82% 15%, #fff6dd, transparent 62%),
    radial-gradient(1.1px 1.1px at 94% 31%, #ffffff, transparent 62%),
    radial-gradient(1.2px 1.2px at 11% 44%, #dfe7ff, transparent 62%),
    radial-gradient(1.5px 1.5px at 26% 58%, #ffffff, transparent 62%),
    radial-gradient(1px   1px   at 38% 71%, #cdd8ff, transparent 62%),
    radial-gradient(1.8px 1.8px at 52% 63%, #fff6dd, transparent 62%),
    radial-gradient(1.1px 1.1px at 64% 79%, #ffffff, transparent 62%),
    radial-gradient(1.3px 1.3px at 77% 52%, #e6ecff, transparent 62%),
    radial-gradient(1px   1px   at 88% 68%, #ffffff, transparent 62%),
    radial-gradient(1.5px 1.5px at 97% 86%, #dfe7ff, transparent 62%),
    radial-gradient(1.1px 1.1px at  4% 82%, #ffffff, transparent 62%),
    radial-gradient(1.2px 1.2px at 21% 92%, #cdd8ff, transparent 62%),
    radial-gradient(1px   1px   at 47% 96%, #ffffff, transparent 62%),
    radial-gradient(1.4px 1.4px at 72% 38%, #fff6dd, transparent 62%);
  background-size: 340px 340px;
  background-repeat: repeat;
  opacity: 1;
  animation: avnota-twinkle-a 5.5s ease-in-out infinite;
}

/* ② 大きめの星＋天の川（別のリズムで瞬かせて、単調な繰り返しに見せない） */
:root[data-theme="stars"] body::after {
  background-image:
    radial-gradient(2.4px 2.4px at 15% 17%, #ffffff, transparent 58%),
    radial-gradient(2px   2px   at 41% 34%, #fff2cf, transparent 58%),
    radial-gradient(2.8px 2.8px at 63%  8%, #ffffff, transparent 58%),
    radial-gradient(2.1px 2.1px at 86% 46%, #d9e4ff, transparent 58%),
    radial-gradient(2.5px 2.5px at 29% 74%, #ffffff, transparent 58%),
    radial-gradient(2px   2px   at 55% 88%, #fff2cf, transparent 58%),
    radial-gradient(2.6px 2.6px at 78% 66%, #ffffff, transparent 58%),
    radial-gradient(2.2px 2.2px at  8% 55%, #d9e4ff, transparent 58%),
    /* 天の川：斜めにかかる淡い光の帯 */
    linear-gradient(197deg,
      transparent 32%,
      rgba(150,175,255,.055) 43%,
      rgba(255,255,255,.075) 50%,
      rgba(150,175,255,.05) 57%,
      transparent 68%);
  background-size:
    620px 620px, 620px 620px, 620px 620px, 620px 620px,
    620px 620px, 620px 620px, 620px 620px, 620px 620px,
    100% 100%;
  background-repeat:
    repeat, repeat, repeat, repeat,
    repeat, repeat, repeat, repeat,
    no-repeat;
  animation: avnota-twinkle-b 8s ease-in-out infinite;
}

@keyframes avnota-twinkle-a {
  0%, 100% { opacity: 1; }
  50%      { opacity: .62; }
}
@keyframes avnota-twinkle-b {
  0%, 100% { opacity: 1; }
  45%      { opacity: .68; }
}

/* ---------- 配色（森） ---------- */
:root[data-theme="forest"] {
  --paper:    #101a13;
  --paper-2:  #16241a;
  --paper-3:  #1e3023;
  --ink:      #e9f2e6;
  --ink-2:    #aac0a8;
  --ink-3:    #7c927a;
  --rule:     #24382a;
  --rule-2:   #375340;
  --indigo:   #8ed7a2;   /* 若葉のアクセント */
  --indigo-2: #aee6bd;
  --indigo-w: rgba(142,215,162,.12);
  --sticky:   #d9c26a;   /* 木漏れ日 */
  --sticky-w: rgba(217,194,106,.14);
  --red:      #e0906a;
  --green:    #7fc98f;

  --shadow:   0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --shadow-up:0 -2px 16px rgba(0,0,0,.45);
  /* 木漏れ日のような、ごく淡い斜めの光 */
  --texture: repeating-linear-gradient(
    115deg, transparent 0, transparent 52px, rgba(217,194,106,.028) 52px, rgba(217,194,106,.028) 96px);
  --texture-size: auto;
  color-scheme: dark;
}

/* ---------- 配色（夜＝墨） ---------- */
:root[data-theme="dark"] {
  --paper:    #14130f;
  --paper-2:  #1c1a16;
  --paper-3:  #26231d;
  --ink:      #ece7dc;
  --ink-2:    #b6afa1;
  --ink-3:    #857e71;
  --rule:     #332f27;
  --rule-2:   #4a443a;
  --indigo:   #94a6ec;
  --indigo-2: #b0bef3;
  --indigo-w: rgba(148,166,236,.12);
  --sticky:   #d7b559;
  --sticky-w: rgba(215,181,89,.18);
  --red:      #e08268;
  --green:    #6fb391;

  --shadow:   0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --shadow-up:0 -2px 16px rgba(0,0,0,.45);
  --texture: none;
  color-scheme: dark;
}

/* OS がダーク、かつユーザーがテーマを選んでいない場合は夜にする */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --paper:    #14130f;
    --paper-2:  #1c1a16;
    --paper-3:  #26231d;
    --ink:      #ece7dc;
    --ink-2:    #b6afa1;
    --ink-3:    #857e71;
    --rule:     #332f27;
    --rule-2:   #4a443a;
    --indigo:   #94a6ec;
    --indigo-2: #b0bef3;
    --indigo-w: rgba(148,166,236,.12);
    --sticky:   #d7b559;
    --sticky-w: rgba(215,181,89,.18);
    --red:      #e08268;
    --green:    #6fb391;
    --shadow:   0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    --shadow-up:0 -2px 16px rgba(0,0,0,.45);
    --texture: none;
    color-scheme: dark;
  }
}

/* ============================================================
   基本
   ============================================================ */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  /* 地紋（テーマごとに切り替わる。昼＝紙の横罫／星空＝星／森＝木漏れ日） */
  background-image: var(--texture);
  background-size: var(--texture-size);
  background-attachment: var(--texture-attach, scroll);
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

/* iOS Safari は 16px 未満の入力欄で勝手にズームするため、全ての入力を16px以上にする */
input, select, textarea { font-size: 16px; }

/* キーボード操作時だけ見えるフォーカス表示 */
:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
  border-radius: 2px;
}

/* 動きを減らす設定を尊重する */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* 本文へスキップ（スクリーンリーダー・キーボード用） */
.skiplink {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; border-radius: 0 0 var(--radius) 0;
}
.skiplink:focus { left: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============================================================
   ヘッダー（細い罫線1本だけ。装飾しない）
   ============================================================ */
.header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .header { background: var(--paper); }
}

.header__bar {
  max-width: var(--max); margin: 0 auto;
  padding: 8px 12px;
  display: flex; align-items: center; gap: 6px;
  min-height: 54px;
}

.logo { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; }
.logo__mark { display: flex; flex: none; }
.logo__text {
  font-family: var(--font-serif);
  font-size: 21px; font-weight: 600; letter-spacing: .06em; line-height: 1;
  white-space: nowrap;
}
.logo__text em { font-style: normal; color: var(--indigo); }

/* ヘッダー右のアイコンボタン群 */
.iconbtn {
  flex: none;
  min-width: var(--tapmin); min-height: var(--tapmin);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; border: 0; border-radius: var(--radius);
  color: var(--ink-2); cursor: pointer; padding: 0 8px;
  font-size: 13px;
}
.iconbtn:hover { color: var(--indigo); background: var(--indigo-w); }
.iconbtn__label { display: none; }

/* ログインは文字ボタン（PCのみラベルを出す） */
.header__login {
  flex: none; display: none;
  align-items: center; min-height: 38px; padding: 0 16px;
  border: 1px solid var(--rule-2); border-radius: 999px;
  font-size: 13px; color: var(--ink-2); white-space: nowrap;
  background: none; cursor: pointer; font-family: inherit;
  max-width: 160px; overflow: hidden; text-overflow: ellipsis;
}
.header__login:hover { border-color: var(--indigo); color: var(--indigo); }
.header__login--active { border-color: var(--indigo-w); color: var(--indigo); }

/* 言語切替 */
.langswitch { position: relative; flex: none; }
.langswitch__list {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius); box-shadow: var(--shadow);
  list-style: none; margin: 0; padding: 6px;
  display: none; grid-template-columns: repeat(2, minmax(130px, 1fr)); gap: 2px;
  max-height: 62vh; overflow: auto;
}
.langswitch.is-open .langswitch__list { display: grid; }
.langswitch__list a {
  display: flex; align-items: center; min-height: 40px; padding: 0 12px;
  border-radius: 4px; font-size: 13px; color: var(--ink-2); white-space: nowrap;
}
.langswitch__list a:hover { background: var(--paper-3); color: var(--ink); }
.langswitch__list a.is-active { color: var(--indigo); font-weight: 700; }

/* テーマ切替（押すたびに 昼→夕方→夜→星空→森）。現在のテーマ名を常に出す */
.themelabel { font-size: 12px; letter-spacing: .02em; white-space: nowrap; }
/* テーマ切替ボタンのアイコン：今のテーマの1つだけを出す。押した直後（.is-switched）だけ回りながら入れ替わる */
.themeicon { display: none; }
:root:not([data-theme]) .themeicon--light,
:root[data-theme="light"]  .themeicon--light,
:root[data-theme="dusk"]   .themeicon--dusk,
:root[data-theme="dark"]   .themeicon--dark,
:root[data-theme="stars"]  .themeicon--stars,
:root[data-theme="forest"] .themeicon--forest { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .themeicon--light { display: none; }
  :root:not([data-theme]) .themeicon--dark  { display: inline; }
}
.is-switched .themeicon { transform-box: fill-box; transform-origin: center; animation: themeIconIn .5s cubic-bezier(.3,1.5,.5,1); }
@keyframes themeIconIn { from { opacity: 0; transform: rotate(-90deg) scale(.4); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .is-switched .themeicon { animation: none; } }

/* 主ナビ（スマホでは隠して下部バーに任せる） */
.nav { display: none; border-top: 1px solid var(--rule); }
.nav ul {
  max-width: var(--max); margin: 0 auto; padding: 0 12px;
  display: flex; gap: 2px; list-style: none;
}
.nav a {
  display: flex; align-items: center; min-height: 42px; padding: 0 14px;
  font-size: 14px; color: var(--ink-2); white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a.is-active {
  color: var(--ink); border-bottom-color: var(--sticky);
  font-weight: 700; background: var(--sticky-w);
}
.nav__mypage svg { flex: none; margin-right: 5px; }

/* ============================================================
   下部タブバー（スマホ専用・片手で全機能に届く）
   ============================================================ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  box-shadow: var(--shadow-up);
  padding-bottom: var(--safe-b);
  display: flex;
}
.tabbar a, .tabbar button {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; height: var(--bar-h);
  background: transparent; border: 0; cursor: pointer;
  color: var(--ink-3); font-size: 10.5px; letter-spacing: .02em;
  position: relative;
}
.tabbar svg { width: 21px; height: 21px; }
.tabbar .is-active { color: var(--indigo); }
.tabbar .is-active::before {
  content: ""; position: absolute; top: 0; left: 22%; right: 22%;
  height: 2px; background: var(--sticky);
}
.tabbar__badge {
  position: absolute; top: 6px; left: 54%;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--red); color: #fff;
  font-size: 10px; line-height: 16px; text-align: center; font-weight: 700;
}
.tabbar__badge:empty { display: none; }

/* 下部バーぶんの余白を本文に確保する */
body:not(.is-plain) { padding-bottom: calc(var(--bar-h) + var(--safe-b)); }

/* ============================================================
   レイアウト
   ============================================================ */
.main { max-width: var(--max); margin: 0 auto; padding: 12px 12px 32px; }

.section { margin-top: 22px; }
.section:first-child { margin-top: 0; }

/* 見出しは「付箋のつまみ」＋明朝 */
.section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
  border-bottom: 1px solid var(--rule); padding-bottom: 5px;
}
.section__head h2 {
  font-family: var(--font-serif);
  font-size: 18px; font-weight: 600; margin: 0; letter-spacing: .04em;
  position: relative; padding-left: 13px; line-height: 1.5;
}
.section__head h2::before {
  content: ""; position: absolute; left: 0; top: .28em; bottom: .28em;
  width: 4px; background: var(--sticky); border-radius: 1px;
}
.section__more {
  font-size: 12.5px; color: var(--ink-3); flex: none;
  display: inline-flex; align-items: center; min-height: 32px;
}
.section__more:hover { color: var(--indigo); }
.section__count { font-size: 12.5px; color: var(--ink-3); }
.section__lead { color: var(--ink-2); font-size: 13.5px; margin: -2px 0 10px; }

/* 囲みセクション（おすすめ）は付箋を貼った紙に見せる */
.section--accent {
  background: var(--sticky-w);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--sticky);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 14px;
}

/* ============================================================
   ヒーロー（トップの導入）
   ============================================================ */
/* 作品がすぐ見えるよう、スマホでは高さを抑える */
.hero {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--sticky);
  background: var(--paper-2);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 16px 16px 14px;
}
.hero__eyebrow {
  color: var(--ink-3); font-size: 10.5px; letter-spacing: .2em;
  margin: 0 0 6px; font-weight: 700; text-transform: uppercase;
}
.hero__title {
  font-family: var(--font-serif);
  font-size: 21px; font-weight: 600; margin: 0 0 6px; line-height: 1.45;
  letter-spacing: .02em;
}
.hero__lead { color: var(--ink-2); margin: 0; font-size: 13px; line-height: 1.7; max-width: 46em; }
.hero__stats {
  display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none;
  margin: 12px 0 0; padding: 0;
}
.hero__stats li { display: flex; align-items: baseline; gap: 5px; }
.hero__stats b {
  font-family: var(--font-serif);
  font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.2;
}
.hero__stats span { font-size: 11px; color: var(--ink-3); letter-spacing: .06em; }
.hero__stats--doc { margin-top: 24px; }

/* ============================================================
   トップのおすすめスライド
   左＝パッケージ画像／右＝ノートに手書き風で書いた紹介文
   ============================================================ */
.pickup { position: relative; margin-bottom: 18px; }

.pickup__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.pickup__head h2 {
  font-family: var(--font-serif);
  font-size: 17px; font-weight: 600; margin: 0; letter-spacing: .04em;
  position: relative; padding-left: 13px; line-height: 1.5;
}
.pickup__head h2::before {
  content: ""; position: absolute; left: 0; top: .28em; bottom: .28em;
  width: 4px; background: var(--sticky); border-radius: 1px;
}

/* 横スワイプ＋スナップ。JS が無くても指で送れる */
.pickup__viewport {
  display: flex;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border: 1px solid var(--rule);
  background: var(--paper-2);
}
.pickup__viewport::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) {
  .pickup__viewport, .rail__track, .rail__strip { scroll-behavior: auto; }
}

.slide {
  flex: 0 0 100%; width: 100%;
  scroll-snap-align: start; scroll-snap-stop: always;
  display: grid; grid-template-columns: 37% 1fr;
  min-height: 238px;
}

.slide__media {
  position: relative; overflow: hidden;
  background: var(--paper-3); border-right: 1px solid var(--rule);
}
.slide__media img { width: 100%; height: 100%; object-fit: cover; }
.slide__media img.is-package { object-position: right center; }
.slide__media .badge { position: absolute; left: 6px; top: 6px; }

/* ノート面 */
.slide__note {
  position: relative;
  padding: 13px 13px 12px 20px;
  display: flex; flex-direction: column;
  min-width: 0;
}
/* ノートの余白線（左端の縦線） */
.slide__note::before {
  content: ""; position: absolute; left: 10px; top: 0; bottom: 0;
  width: 1px; background: color-mix(in srgb, var(--red) 45%, transparent);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .slide__note::before { background: var(--rule-2); }
}

.slide__code {
  font-size: 10.5px; color: var(--ink-3); letter-spacing: .1em;
  margin: 0 0 4px; font-weight: 600;
}
.slide__title {
  font-family: var(--font-hand, var(--font-serif));
  font-size: calc(16px * var(--hand-scale, 1));
  font-weight: 700; line-height: 1.45; margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  line-clamp: 2; overflow: hidden;
}
.slide__title a:hover { color: var(--indigo); }

/* 手書き本文。罫線を行の高さに合わせて敷く。
   紹介文が短いときに空の罫線だけが何行も残らないよう、高さは中身なりにする
   （余った高さは下のボタンを底に寄せて吸収する） */
.slide__text {
  font-family: var(--font-hand, var(--font-serif));
  font-size: calc(14px * var(--hand-scale, 1));
  line-height: 26px;
  color: var(--ink-2);
  margin: 0 0 8px;
  flex: 0 1 auto;
  background-image: repeating-linear-gradient(
    to bottom, transparent 0, transparent 25px, var(--rule) 25px, var(--rule) 26px);
  overflow: hidden;
}
/* 強調（出演者名・ジャンルなど） */
.slide__text strong {
  font-weight: 700; color: var(--ink);
  background: linear-gradient(transparent 62%, var(--sticky-w) 62%);
  padding: 0 1px;
}

.slide__meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 0 0 8px; font-size: 11.5px; color: var(--ink-3);
}
.slide__meta b { color: var(--ink-2); font-size: 12px; }
.slide__cast {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12em;
}

.slide__actions { display: flex; align-items: center; gap: 8px; margin-top: auto; }
/* カード用の「右寄せ」指定を、スライドの中では打ち消す */
.slide__actions .card__note { margin-left: 0; }
/* 狭い画面では「観たい」をアイコンだけにして、2行に折り返させない */
@media (max-width: 559px) {
  .slide__actions .card__note [data-save-label] { display: none; }
  .slide__actions .card__note { padding: 0 8px; }
}
.slide__more {
  display: inline-flex; align-items: center; min-height: 34px;
  padding: 0 14px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-size: 12.5px; font-weight: 700;
}
.slide__more:hover { background: var(--indigo); color: #fff; }

/* 前後ボタン（指で送れるスマホでは出さない） */
.pickup__nav {
  display: none;
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--rule-2);
  color: var(--ink-2); font-size: 22px; line-height: 1; cursor: pointer;
  align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.pickup__nav:hover { border-color: var(--indigo); color: var(--indigo); }
.pickup__nav--prev { left: -12px; }
.pickup__nav--next { right: -12px; }

.pickup__dots {
  list-style: none; display: flex; justify-content: center; gap: 7px;
  margin: 10px 0 0; padding: 0;
}
.pickup__dots button {
  width: 26px; height: 20px; padding: 0;
  background: transparent; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.pickup__dots button::before {
  content: ""; width: 100%; height: 3px; border-radius: 2px;
  background: var(--rule-2); transition: background .2s ease;
}
.pickup__dots button.is-active::before { background: var(--sticky); }

.pickup__lead {
  margin: 8px 0 0; font-size: 12.5px; color: var(--ink-3); text-align: center;
}

/* 件数の細い帯（旧ヒーローの数字だけ残したもの） */
.statbar {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  margin: 0 0 4px; padding: 0 2px;
  font-size: 11.5px; color: var(--ink-3);
}
.statbar span { display: inline-flex; align-items: baseline; gap: 4px; }
.statbar b {
  font-family: var(--font-serif); font-size: 15px; color: var(--ink-2); font-weight: 600;
}

/* ============================================================
   ページ見出し・タブ・パンくず
   ============================================================ */
.pagehead { margin-bottom: 14px; }
.pagehead h1 {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 600; margin: 0 0 6px; letter-spacing: .03em;
}
.pagehead__lead { color: var(--ink-2); margin: 0 0 4px; font-size: 14px; }
.pagehead__count { color: var(--ink-3); font-size: 12.5px; margin: 0; }
.pagehead--center { text-align: center; padding: 48px 0; }
.pagehead--center h1 { font-size: 46px; color: var(--ink-3); }

.breadcrumb {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 12px; color: var(--ink-3); margin-bottom: 14px;
}
.breadcrumb a { text-decoration: underline; text-decoration-color: var(--rule-2); }
.breadcrumb a:hover { color: var(--indigo); }
.breadcrumb em { font-style: normal; color: var(--ink-2); }

/* 横スクロールのタブ（スマホで端が切れないよう余白を持たせる） */
.tabs {
  display: flex; gap: 6px; margin-bottom: 14px;
  overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none;
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px;
  border: 1px solid var(--rule-2); border-radius: 999px;
  font-size: 13px; color: var(--ink-2); white-space: nowrap;
}
.tabs a:hover { border-color: var(--indigo); color: var(--indigo); }
.tabs a.is-active {
  background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 700;
}

/* ============================================================
   作品カード（価格は出さない。記録＝メモを主役にする）
   ============================================================ */
/* 一覧のグリッド。
   列数を「割り切れる数」に固定して、最後の行にカードが1個だけ残るのを防ぐ。
   （1ページ12件 ÷ 2列・3列・4列・6列 のどれでもぴったり埋まる） */
.grid {
  display: grid; gap: 16px 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.card, .card__body, .card__foot { min-width: 0; }
.card { position: relative; display: flex; flex-direction: column; }
/* 題名が1行の作品と2行の作品が混ざっても、星と「観たい」の行が揃うようにする
   （リンク部分も縦のフレックスにして、余った高さを本文で吸収させる） */
.card__link { display: flex; flex-direction: column; flex: 1; min-width: 0; }

/* 写真は角丸なしの四角。紙に貼った写真のように細い枠をつける */
.card__thumb {
  position: relative; flex: none;
  background: var(--paper-3);
  aspect-ratio: 5 / 7;
  border: 1px solid var(--rule);
  overflow: hidden;
}
.card__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity .25s ease;
}
/* 配信元のパッケージ画像は「左＝裏表紙／右＝表表紙」の横長1枚。右寄せで表紙だけ見せる */
.card__thumb img.is-package { object-position: right center; }
.card:hover .card__thumb img { opacity: .88; }

/* ランキング番号は紙面的に大きな明朝数字 */
.card__rank {
  position: absolute; left: 0; top: 0;
  min-width: 32px; height: 30px; padding: 0 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-weight: 600; font-size: 17px;
  background: var(--paper); color: var(--ink-2);
  border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.card__rank.rank-1 { background: var(--sticky); color: #2a2418; }
.card__rank.rank-2 { background: var(--paper-3); color: var(--ink); }
.card__rank.rank-3 { background: var(--paper-2); color: var(--ink-2); }

.card__badges {
  position: absolute; right: 5px; top: 5px;
  display: flex; flex-direction: column; gap: 4px; align-items: flex-end;
}
.badge {
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  padding: 2px 7px; border-radius: 2px;
  background: var(--paper); color: var(--ink-2); border: 1px solid var(--rule);
}
.badge--sale { background: var(--red); color: #fff; border-color: var(--red); }
.badge--new  { background: var(--sticky); color: #2a2418; border-color: var(--sticky); }
.badge--vr   { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.badge--excl { background: var(--green); color: #fff; border-color: var(--green); }

.card__body { padding: 8px 1px 0; flex: 1; }
.card__code {
  font-size: 10.5px; color: var(--ink-3); margin: 0 0 3px;
  letter-spacing: .1em; font-weight: 600;
}
.card__title {
  font-size: 13.5px; margin: 0 0 4px; line-height: 1.55; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  line-clamp: 2; overflow: hidden;
}
.card:hover .card__title { color: var(--indigo); }
.card__cast {
  font-size: 12px; color: var(--ink-2); margin: 0 0 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 言語によってはラベルが長い（例: Enregistrer）。
   カードからはみ出させず、入りきらないときだけ次の行に落とす */
.card__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 0 1px; }
.card__rating { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-3); min-width: 0; }
.card__rating b { color: var(--ink-2); font-size: 11.5px; font-weight: 600; }

/* 「観たい」＝ノート機能への入口。カード内の唯一のボタン */
.card__note {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 30px; padding: 0 9px;
  background: transparent; border: 1px solid var(--rule-2); border-radius: 999px;
  color: var(--ink-3); font-size: 11.5px; cursor: pointer; white-space: nowrap;
}
.card__note:hover { border-color: var(--indigo); color: var(--indigo); }
.card__note svg { width: 13px; height: 13px; flex: none; }
.card__note.is-on {
  background: var(--sticky); border-color: var(--sticky); color: #2a2418; font-weight: 700;
}

/* 星（2枚重ね。上の層の幅で評価を表す） */
.stars {
  position: relative; display: inline-block; white-space: nowrap;
  font-size: 11px; line-height: 1; letter-spacing: .5px; vertical-align: -1px;
}
.stars i { font-style: normal; }
.stars__off { color: var(--rule-2); }
.stars__on {
  position: absolute; left: 0; top: 0; overflow: hidden;
  color: var(--sticky); white-space: nowrap;
}
:root[data-theme="dark"] .stars__on { color: var(--sticky); }

/* ============================================================
   横スクロールの棚（レール）
   トップや作品ページの「そのセクションの一部だけ見せる」場所で使う。
   PC   … 1行に流して横スクロール（折り返しゼロ。左右の矢印で送れる）
   スマホ… 今まで通り折り返しのグリッド。先頭6件だけ見せる
   ============================================================ */
.rail { position: relative; }

/* --- スマホ（既定）--- */
.rail__track {
  display: grid; gap: 16px 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
/* 7件目以降はスマホでは出さない（縦に長くなりすぎるため）。
   表示しない画像は loading="lazy" なので通信も発生しない */
@media (max-width: 759px) {
  .rail__track > *:nth-child(n+7) { display: none; }
}
.rail__nav { display: none; }

/* チップ・人物の帯（スマホは折り返しのまま） */
.rail__strip { min-width: 0; }

/* --- 左右の矢印（PCでのみ出す） --- */
.rail__nav {
  position: absolute; top: 116px; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--rule-2);
  color: var(--ink-2); font-size: 20px; line-height: 1; cursor: pointer;
  align-items: center; justify-content: center;
  box-shadow: var(--shadow); z-index: 2;
}
.rail__nav:hover { border-color: var(--indigo); color: var(--indigo); }
.rail__nav[disabled] { opacity: 0; pointer-events: none; }
.rail__nav--prev { left: -12px; }
.rail__nav--next { right: -12px; }
/* 帯（チップ・人物）は高さが低いので中央に置く */
.rail--strip .rail__nav { top: 50%; }
/* はみ出していない＝送る必要がないときは矢印を出さない */
.rail.is-static .rail__nav { display: none; }

/* ============================================================
   作品詳細
   ============================================================ */
.detail { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.detail__media {
  position: relative; overflow: hidden;
  background: var(--paper-3); border: 1px solid var(--rule);
  max-width: 460px; margin: 0 auto;
}
.detail__badges { position: absolute; left: 8px; top: 8px; display: flex; gap: 5px; }
.detail__code {
  font-size: 11.5px; color: var(--ink-3); letter-spacing: .12em;
  margin: 0 0 6px; font-weight: 600;
}
.detail__title {
  font-family: var(--font-serif);
  font-size: 21px; font-weight: 600; line-height: 1.5; margin: 0 0 8px; letter-spacing: .02em;
}
.detail__rating {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px;
  flex-wrap: wrap;
}
.detail__rating .stars { font-size: 14px; }
.detail__rating b { font-family: var(--font-serif); font-size: 19px; font-weight: 600; }
.detail__rating a { color: var(--ink-3); text-decoration: underline; }

/* 記録（観たい）ボタン。買い場の上に置くので、間の余白は詰めておく */
.detail__save { margin-bottom: 12px; min-height: 38px; padding: 8px 20px; font-size: 13.5px; }

/* 購入エリア（価格を出すのはここだけ） */
.buybox {
  border: 1px solid var(--rule); border-top: 3px solid var(--ink);
  background: var(--paper-2);
  padding: 14px 16px; margin-bottom: 14px;
}
.detail__price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.detail__price del { color: var(--ink-3); font-size: 14px; }
.detail__price ins {
  text-decoration: none; font-family: var(--font-serif);
  font-size: 27px; font-weight: 600; color: var(--ink);
}
.detail__off {
  background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700;
  padding: 2px 8px; border-radius: 2px;
}
.buybox__pr { margin: 10px 0 0; font-size: 11px; color: var(--ink-3); }

/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tapmin); padding: 11px 24px; border-radius: 999px;
  border: 1px solid var(--rule-2); background: transparent;
  color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer;
  text-align: center;
}
.btn:hover { border-color: var(--indigo); color: var(--indigo); }
.btn--primary {
  background: var(--ink); border-color: var(--ink); color: var(--paper);
}
.btn--primary:hover {
  background: var(--indigo); border-color: var(--indigo); color: #fff;
}
.btn--block { display: flex; width: 100%; }
.btn--ghost { background: transparent; font-weight: 600; }

.spec { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13.5px; }
.spec th, .spec td {
  text-align: left; padding: 7px 0; border-bottom: 1px solid var(--rule); vertical-align: top;
}
.spec th { width: 6.5em; color: var(--ink-3); font-weight: 500; }
.spec td a { text-decoration: underline; text-decoration-color: var(--rule-2); }
.spec--inline { margin-top: 10px; }

.tag {
  display: inline-flex; align-items: center; min-height: 32px;
  margin: 0 5px 5px 0; padding: 0 12px;
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 999px;
  font-size: 12.5px; color: var(--ink-2); text-decoration: none !important;
}
.tag:hover { border-color: var(--indigo); color: var(--indigo); }
.tag--person { background: var(--indigo-w); border-color: rgba(58,74,143,.25); color: var(--indigo); }

/* 詳細ページ下部に追従する購入バー（スマホ。下部タブバーと入れ替わる）
   ページ内の購入エリアが見えている間は隠しておく（同じボタンを2つ見せないため） */
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 75;
  background: var(--paper); border-top: 1px solid var(--rule);
  box-shadow: var(--shadow-up);
  padding: 8px 12px calc(8px + var(--safe-b));
  display: flex; align-items: center; gap: 10px;
  transform: translateY(110%);
  transition: transform .22s ease;
  visibility: hidden;
}
.buybar.is-visible { transform: none; visibility: visible; }
.buybar__price { flex: none; line-height: 1.3; }
.buybar__price ins {
  display: block; text-decoration: none;
  font-family: var(--font-serif); font-size: 19px; font-weight: 600;
}
.buybar__price del { font-size: 11px; color: var(--ink-3); }
.buybar__note { flex: 1 1 auto; }
.buybar .btn { flex: 1 1 auto; padding: 11px 14px; font-size: 14px; }
.buybar__save {
  flex: none; width: var(--tapmin); height: var(--tapmin);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule-2); border-radius: 999px;
  background: transparent; color: var(--ink-2); cursor: pointer;
}
.buybar__save.is-on { background: var(--sticky); border-color: var(--sticky); color: #2a2418; }
/* 購入バーが出ている間だけ、下部タブバーと入れ替える（重ならないように） */
body.is-buybar-on .tabbar { display: none; }

/* ============================================================
   連続再生プレイヤー（会員登録なし・画面下固定）
   一覧の「連続再生」ボタン・「観たい」の連続再生ボタンから開く。
   スマホでは下部タブバーと入れ替わる（購入バーと同じ考え方）。
   ============================================================ */
.playall-group { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.playall-group .playall { margin: 0; }
.playall {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 0 16px;
  border: 1px solid var(--rule-2); border-radius: 999px;
  background: var(--paper-2); color: var(--ink); font-weight: 600; font-size: 13px;
  cursor: pointer;
}
.playall:hover { border-color: var(--indigo); color: var(--indigo); }
.playall:disabled { opacity: .5; cursor: default; }
.playall svg { width: 16px; height: 16px; }

/* プレイヤー本体は縦積み：上端の掴みハンドル／タイトル行／動画／操作行／次の作品キュー。
   高さは data-player-resize を上下にドラッグして自由に決められ、次回訪問時も覚えている
   （既定は画面の8割）。data-player-max は「ページ内いっぱい」にワンタッチで広げるボタン。 */
.playerbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 76;
  height: 80vh; min-height: 220px;
  background: var(--paper); border-top: 1px solid var(--rule);
  box-shadow: var(--shadow-up);
  display: flex; flex-direction: column;
  padding-bottom: var(--safe-b);
}
.playerbar__resize {
  flex: none; height: 14px; margin: -7px 0 -7px; cursor: ns-resize;
  display: flex; align-items: center; justify-content: center;
  touch-action: none;
}
.playerbar__resize::before {
  content: ""; width: 40px; height: 4px; border-radius: 999px; background: var(--rule-2);
}
.playerbar.is-maximized .playerbar__resize { cursor: default; }
body.is-player-resizing { cursor: ns-resize; user-select: none; }

.playerbar__top {
  flex: none; display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; padding: 6px 12px 4px;
}
.playerbar__meta { min-width: 0; }
.playerbar__code { font-size: 10.5px; color: var(--ink-3); letter-spacing: .08em; margin: 0; }
.playerbar__title {
  font-size: 13.5px; font-weight: 600; margin: 1px 0 0; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.playerbar__topctrl { flex: none; display: flex; align-items: center; gap: 2px; }
.playerbar__topctrl button {
  width: var(--tapmin); height: var(--tapmin);
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--ink-2);
  font-size: 18px; line-height: 1; cursor: pointer; border-radius: 999px;
}
.playerbar__topctrl button:hover { color: var(--indigo); }
.playerbar__topctrl [data-player-max][aria-pressed="true"] { color: var(--indigo); }

.playerbar__stage {
  position: relative; flex: 1; min-height: 0; background: #000;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.playerbar__stage video { width: 100%; height: 100%; object-fit: contain; }

/* 読み込み中（APIの応答待ち）は、開いてすぐ分かるようスピナーを出す。
   数秒かかることがあり、無反応に見えて連打されるのを防ぐため。 */
.playerbar.is-loading .playerbar__stage::after {
  content: ""; width: 34px; height: 34px; border-radius: 999px;
  border: 3px solid rgba(255,255,255,.25); border-top-color: #fff;
  animation: playerbar-spin .8s linear infinite;
}
@keyframes playerbar-spin { to { transform: rotate(360deg); } }

.playerbar__controls {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 12px;
}
.playerbar__controls button {
  width: var(--tapmin); height: var(--tapmin);
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--ink-2);
  font-size: 22px; line-height: 1; cursor: pointer; border-radius: 999px;
}
.playerbar__controls button:hover { color: var(--indigo); }
.playerbar__controls button:disabled { color: var(--rule-2); cursor: default; }
.playerbar__count { font-size: 12px; color: var(--ink-3); flex: none; min-width: 48px; text-align: center; }
.playerbar__buy {
  display: inline-flex; align-items: center; margin-left: 6px; padding: 0 18px;
  height: var(--tapmin); border-radius: 999px;
  background: var(--indigo); color: #fff; font-weight: 700; font-size: 13px;
  white-space: nowrap; text-decoration: none;
}
.playerbar__buy:hover { opacity: .9; }
.playerbar__buy[hidden] { display: none; }

/* お気に入り開始・終了（連続再生プレイヤー内）。他の操作より目立つ色つきボタンにする */
.playerbar__scene {
  flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 0 12px 10px;
}
.playerbar__scene-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font: inherit; font-size: 11.5px; font-weight: 700; line-height: 1;
  padding: 7px 11px; cursor: pointer;
  color: #fff; background: var(--indigo); border: 0; border-radius: 999px;
}
.playerbar__scene-btn:hover { opacity: .9; }
.playerbar__scene-msg { font-size: 11px; color: var(--indigo); }
.playerbar__scene-msg a { color: var(--indigo); font-weight: 700; text-decoration: underline; margin-left: 4px; }

.playerbar__queue {
  flex: none; display: flex; gap: 10px; padding: 10px 12px; overflow-x: auto; overflow-y: hidden;
  border-top: 1px solid var(--rule);
  scrollbar-width: none;
}
.playerbar__queue::-webkit-scrollbar { display: none; }
/* サムネイルは「画像＋タイトル」を縦に積んだカード。画像の上に文字を重ねない
   （重ねると黒かぶせでパッケージが読めなくなるため）。 */
.playerbar__thumb {
  position: relative; flex: none; width: 64px; display: flex; flex-direction: column; gap: 4px;
  background: none; border: 0; padding: 0; cursor: grab; opacity: .65;
  transition: opacity .15s ease;
}
.playerbar__thumb.is-dragging { opacity: .3; }
.playerbar__thumb:hover { opacity: 1; }
.playerbar__thumb.is-current { opacity: 1; }
.playerbar__thumb-media {
  position: relative; width: 64px; height: 90px; border-radius: 4px; overflow: hidden;
  background-color: var(--paper-2); background-size: cover; background-position: center top;
  border: 2px solid transparent;
}
.playerbar__thumb.is-current .playerbar__thumb-media { border-color: var(--indigo); }
.playerbar__thumb-label {
  font-size: 9.5px; line-height: 1.3; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left;
}
/* 外す（削除）ボタン。普段は控えめ、ホバーではっきり見せる */
.playerbar__thumb-remove {
  position: absolute; top: -6px; right: -6px; width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--ink); color: #fff;
  font-size: 12px; line-height: 1; opacity: 0; transition: opacity .15s ease;
}
.playerbar__thumb:hover .playerbar__thumb-remove { opacity: .85; }
.playerbar__thumb-remove:hover { opacity: 1 !important; background: var(--indigo); }

/* サムネイルをホバーした時に「音無しサンプル動画」を出す大きなプレビュー。
   動画エリア（.playerbar__stage）の大きさはそのままにし、その上に重ねて出す
   （プレビューのために本編の表示を小さくしたくないため）。 */
.playerbar__preview {
  position: absolute; z-index: 60; width: 220px; height: 123.75px; /* サンプル動画と同じ16:9 */
  border-radius: 8px; overflow: hidden; background: #000;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); pointer-events: none;
}
.playerbar__preview video { width: 100%; height: 100%; object-fit: contain; }
.playerbar__preview[hidden] { display: none; }

/* 再生中はスマホの下部タブバーと入れ替える（重ならないように） */
body.is-playerbar-on .tabbar { display: none; }

@media (min-width: 760px) {
  .playerbar__title { font-size: 15px; }
  .playerbar__controls button { width: 44px; height: 44px; font-size: 24px; }
  .playerbar__thumb { width: 80px; }
  .playerbar__thumb-media { width: 80px; height: 112px; }
  .playerbar__thumb-label { font-size: 11px; }
  .playerbar__preview { width: 320px; height: 180px; }
}

/* 一覧・観たいリストで、いま再生中の作品カードを目立たせる */
.card.is-playing .card__thumb {
  outline: 2px solid var(--indigo); outline-offset: 2px;
}

/* ============================================================
   サンプル動画
   ============================================================ */
.player {
  overflow: hidden; background: #000;
  border: 1px solid var(--rule); max-width: 900px;
}
/* 再生前は縦の高さが決まらず、読み込み後にページが飛び跳ねる。
   16:9 を先に確保しておく（実際の動画がそれより縦長でも contain で収まる） */
.player video {
  width: 100%; display: block; max-height: 70vh; background: #000;
  aspect-ratio: 16 / 9; object-fit: contain;
}

/* 画質の切り替え。中身は数字（720p など）だけなので翻訳がいらない */
.player__quality {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 8px 0 0; max-width: 900px;
}
.player__quality-label { font-size: 11.5px; color: var(--ink-3); margin-right: 2px; }
.player__q {
  font: inherit; font-size: 12px; line-height: 1;
  padding: 6px 10px; cursor: pointer;
  color: var(--ink-2); background: transparent;
  border: 1px solid var(--rule); border-radius: 999px;
}
.player__q:hover { color: var(--ink); }
.player__q.is-current {
  color: #fff; background: var(--ink); border-color: var(--ink);
}
.player__note { font-size: 11.5px; color: var(--ink-3); margin: 6px 0 0; }

/* お気に入り区間（開始・終了）。会員登録者のみDBに保存できる。
   見つけやすいよう、他の設定より目立つカード（色つき見出し＋色つきボタン）にする */
.scene {
  border: 1px solid var(--rule); border-top: 3px solid var(--indigo);
  background: var(--paper-2); border-radius: 4px;
  margin: 14px 0 0; padding: 14px 16px; max-width: 900px;
}
.scene__heading {
  display: flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: 14px; color: var(--ink); margin: 0 0 10px;
}
.scene__heading svg { flex: none; color: var(--indigo); }
.scene__hint { font-size: 12.5px; color: var(--ink-3); margin: 0 0 10px; }
.scene__controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.scene__mark {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 12.5px; font-weight: 700; line-height: 1;
  padding: 9px 14px; cursor: pointer;
  color: #fff; background: var(--indigo); border: 0; border-radius: 999px;
}
.scene__mark:hover { opacity: .9; }
.scene__loop, .scene__delete {
  font: inherit; font-size: 12px; line-height: 1;
  padding: 7px 12px; cursor: pointer;
  color: var(--ink-2); background: transparent;
  border: 1px solid var(--rule); border-radius: 999px;
}
.scene__loop:hover, .scene__delete:hover { color: var(--ink); border-color: var(--indigo); }
.scene__loop[aria-pressed="true"] { color: #fff; background: var(--indigo); border-color: var(--indigo); }
.scene__range { font-size: 12px; color: var(--ink-3); }
.scene__msg { font-size: 12px; color: var(--indigo); margin: 8px 0 0; }
.scene__msg a { color: var(--indigo); font-weight: 700; text-decoration: underline; margin-left: 4px; }

/* ============================================================
   見どころ画像
   ============================================================ */
.gallery {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}
.gallery li { min-width: 0; }
.gallery img {
  width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  background: var(--paper-3); border: 1px solid var(--rule);
  transition: opacity .2s ease;
}
.gallery a:hover img { opacity: .8; }
.gallery__more { margin: 10px 0 0; }

/* 画像の拡大表示 */
.lightbox {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(10,9,7,.94);
  display: flex; align-items: center; justify-content: center;
  padding: env(safe-area-inset-top, 0px) 12px calc(12px + var(--safe-b));
}
.lightbox img { max-width: 100%; max-height: 88vh; object-fit: contain; }
.lightbox__close {
  position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); right: 10px;
  width: var(--tapmin); height: var(--tapmin);
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.12); border: 0; border-radius: 999px;
  color: #fff; font-size: 22px; cursor: pointer;
}
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: var(--tapmin); height: 64px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.10); border: 0; border-radius: var(--radius);
  color: #fff; font-size: 22px; cursor: pointer;
}
.lightbox__nav--prev { left: 6px; }
.lightbox__nav--next { right: 6px; }
.lightbox__count {
  position: absolute; bottom: calc(14px + var(--safe-b)); left: 0; right: 0;
  text-align: center; color: rgba(255,255,255,.75); font-size: 12px;
}

/* ============================================================
   文章
   ============================================================ */
.prose { color: var(--ink-2); max-width: 40em; font-size: 14.5px; }
.prose h2 {
  font-family: var(--font-serif); color: var(--ink);
  font-size: 17px; font-weight: 600; margin: 22px 0 8px;
}
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 16px; padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--indigo); text-decoration: underline; }

.doc { margin-top: 6px; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 18px; }
.steps li { counter-increment: step; position: relative; padding-left: 40px; margin-bottom: 14px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 2px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-weight: 600; font-size: 13px;
}
.steps b { display: block; color: var(--ink); }
.steps span { font-size: 14px; color: var(--ink-2); }

/* ============================================================
   レビュー
   ============================================================ */
.reviews { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
.reviews__summary {
  background: var(--paper-2); border: 1px solid var(--rule);
  border-left: 3px solid var(--sticky);
  padding: 14px;
}
.reviews__score { text-align: center; margin-bottom: 14px; }
.reviews__score b {
  display: block; font-family: var(--font-serif);
  font-size: 36px; font-weight: 600; line-height: 1.1;
}
.reviews__score span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.reviews__score .stars { margin: 4px auto 0; font-size: 14px; }
.reviews__dist { list-style: none; margin: 0; padding: 0; }
.reviews__dist li { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; font-size: 12px; }
.reviews__star { width: 26px; color: var(--ink-3); flex: none; }
.reviews__bar { flex: 1; height: 6px; background: var(--paper-3); border-radius: 3px; overflow: hidden; }
.reviews__bar i { display: block; height: 100%; background: var(--sticky); }
.reviews__num { width: 22px; text-align: right; color: var(--ink-3); flex: none; }

.review { border-bottom: 1px solid var(--rule); padding-bottom: 12px; margin-bottom: 12px; }
.review:last-child { border-bottom: 0; }
.review__head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.review__title { font-size: 15px; margin: 0; font-weight: 700; }
.review__meta {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  font-size: 12px; color: var(--ink-3); margin: 0 0 8px;
}
.review__author { color: var(--ink-2); }
.review__untranslated { border: 1px solid var(--rule-2); border-radius: 3px; padding: 1px 6px; font-size: 11px; }
.review__body { margin: 0 0 8px; color: var(--ink-2); font-size: 14px; }
.review__helpful { margin: 0; font-size: 12px; color: var(--ink-3); }

/* ============================================================
   チップ・人物・メーカー
   ============================================================ */
.chiplist { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 38px; padding: 0 15px;
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 999px;
  font-size: 13px; color: var(--ink-2);
}
.chip:hover { border-color: var(--indigo); color: var(--indigo); }
.chip small { color: var(--ink-3); font-size: 11px; }
.chip--person { background: var(--indigo-w); border-color: rgba(58,74,143,.25); color: var(--indigo); }
.chiplist--lg .chip { min-height: 42px; padding: 0 19px; font-size: 14px; }

.people { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 8px; padding: 0; margin: 0; }
.people--grid { gap: 16px 8px; }
.people li { width: 84px; }
.people a { display: block; text-align: center; }
.people img {
  width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 7px;
  background: var(--paper-3); border: 1px solid var(--rule);
}
.people a:hover .people__name { color: var(--indigo); }
.people__name {
  display: block; font-size: 12.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.people__roman {
  display: block; font-size: 10px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.people__count { display: block; font-size: 11px; color: var(--ink-3); }

.makers {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.makers a {
  display: flex; align-items: center; gap: 12px; min-height: 56px;
  background: var(--paper-2); border: 1px solid var(--rule); padding: 12px 14px;
}
.makers a:hover { border-color: var(--indigo); }
.makers__prefix {
  font-family: var(--font-serif); font-weight: 600; color: var(--ink-3);
  font-size: 13px; letter-spacing: .1em; flex: none;
}
.makers__name { flex: 1; font-size: 14px; }
.makers__count { font-size: 11px; color: var(--ink-3); flex: none; }

/* ============================================================
   プロフィール
   ============================================================ */
.profile {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
  background: var(--paper-2); border: 1px solid var(--rule);
  border-left: 3px solid var(--sticky);
  padding: 20px 16px;
}
.profile__photo {
  width: 96px; height: 96px; border-radius: 50%; flex: none;
  background: var(--paper-3); border: 1px solid var(--rule);
}
.profile__body { flex: 1; min-width: 0; }
.profile__body h1 {
  font-family: var(--font-serif); margin: 0 0 2px; font-size: 21px; font-weight: 600;
}
.profile__roman { margin: 0 0 10px; color: var(--ink-3); font-size: 11.5px; letter-spacing: .1em; }
.profile__text { color: var(--ink-2); margin: 0 0 8px; font-size: 14px; }

/* ============================================================
   おすすめの根拠
   ============================================================ */
.reason {
  background: var(--paper-2); border: 1px solid var(--rule);
  border-left: 3px solid var(--indigo);
  padding: 12px 14px; margin-bottom: 16px;
}
.reason__label { margin: 0 0 10px; font-size: 11.5px; color: var(--ink-3); letter-spacing: .1em; }
.reason__note { margin: 12px 0 0; font-size: 11.5px; color: var(--ink-3); }
.reason__note a { color: var(--ink-2); text-decoration: underline; }

/* ============================================================
   ページャ
   ============================================================ */
.pager { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 22px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: var(--tapmin); height: var(--tapmin); padding: 0 12px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule); border-radius: var(--radius);
  font-size: 13px; color: var(--ink-2); background: var(--paper-2);
}
.pager a:hover { border-color: var(--indigo); color: var(--indigo); }
.pager .is-current { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 700; }
.pager__gap { border: 0; background: transparent; }

.empty { color: var(--ink-3); text-align: center; padding: 26px 0; }

/* ============================================================
   検索（全画面オーバーレイ）
   ============================================================ */
.search { display: flex; min-width: 0; }
.search input {
  flex: 1; min-width: 0;
  background: var(--paper-2); border: 1px solid var(--rule-2);
  border-radius: 999px 0 0 999px; border-right: 0;
  padding: 11px 18px; color: var(--ink); font-size: 16px; outline: none;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { border-color: var(--indigo); }
.search button {
  background: var(--paper-2); border: 1px solid var(--rule-2); border-left: 0;
  border-radius: 0 999px 999px 0; padding: 0 18px; min-height: var(--tapmin);
  color: var(--ink-2); cursor: pointer; display: flex; align-items: center;
}
.search button:hover { color: var(--indigo); }
.search--lg { margin: 10px 0 12px; }

.searchpanel {
  position: fixed; inset: 0; z-index: 110;
  background: var(--paper);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
}
.searchpanel__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--rule);
}
.searchpanel__bar form { flex: 1; display: flex; min-width: 0; }
.searchpanel__bar input {
  flex: 1; min-width: 0;
  background: var(--paper-2); border: 1px solid var(--rule-2); border-radius: 999px;
  padding: 11px 18px; color: var(--ink); font-size: 16px; outline: none;
}
.searchpanel__bar input:focus { border-color: var(--indigo); }
.searchpanel__cancel {
  flex: none; min-height: var(--tapmin); padding: 0 6px;
  background: transparent; border: 0; color: var(--ink-2); font-size: 14px; cursor: pointer;
}
.searchpanel__body { flex: 1; overflow: auto; padding: 16px 12px calc(24px + var(--safe-b)); }
.searchpanel__label {
  font-size: 11.5px; color: var(--ink-3); letter-spacing: .1em;
  margin: 0 0 10px; display: flex; align-items: baseline; justify-content: space-between;
}
.searchpanel__label button {
  background: transparent; border: 0; color: var(--ink-3);
  font-size: 11.5px; text-decoration: underline; cursor: pointer; padding: 4px;
}
.searchpanel__recent { list-style: none; margin: 0 0 26px; padding: 0; }
.searchpanel__recent li { border-bottom: 1px solid var(--rule); }
.searchpanel__recent a {
  display: flex; align-items: center; gap: 10px;
  min-height: var(--tapmin); padding: 4px 2px; color: var(--ink-2); font-size: 14px;
}
.searchpanel__recent a:hover { color: var(--indigo); }

/* ============================================================
   保存（観たい）リストのオーバーレイ
   ============================================================ */
.notepanel {
  position: fixed; inset: 0; z-index: 110;
  background: var(--paper);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
}
.notepanel__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--rule);
}
.notepanel__bar h2 {
  flex: 1; margin: 0; font-family: var(--font-serif);
  font-size: 17px; font-weight: 600; letter-spacing: .04em;
}
.notepanel__body { flex: 1; overflow: auto; padding: 14px 12px calc(24px + var(--safe-b)); }
.notepanel__lead { font-size: 12.5px; color: var(--ink-3); margin: 0 0 16px; }
.notelist { list-style: none; margin: 0; padding: 0; }
.notelist li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--rule);
}
.notelist img {
  width: 60px; height: 84px; object-fit: cover; object-position: right center;
  flex: none; border: 1px solid var(--rule); background: var(--paper-3);
}
.notelist__body { flex: 1; min-width: 0; }
.notelist__code { font-size: 10.5px; color: var(--ink-3); letter-spacing: .1em; margin: 0 0 2px; }
.notelist__title {
  font-size: 13.5px; font-weight: 600; margin: 0 0 6px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  line-clamp: 2; overflow: hidden;
}
.notelist__remove {
  background: transparent; border: 0; color: var(--ink-3);
  font-size: 12px; text-decoration: underline; cursor: pointer;
  min-height: 32px; padding: 0 2px;
}
.notepanel__signup {
  margin-top: 22px; padding: 16px;
  background: var(--sticky-w); border: 1px solid var(--rule); border-left: 3px solid var(--sticky);
}
.notepanel__signup p { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); }

/* プレイリスト保存モーダル（かんたん登録・ログイン・名前付け） */
.notepanel__msg { margin: 12px 0 0; font-size: 12.5px; color: var(--indigo); min-height: 1.4em; }

.playlist-code {
  margin: 0; padding: 14px 16px; text-align: center;
  font-size: 19px; font-weight: 700; letter-spacing: .06em;
  background: var(--paper); border: 1px dashed var(--rule-2); border-radius: 8px 0 0 8px;
  word-break: break-all;
}
.playlist-name-label {
  display: block; margin: 0 0 14px; font-size: 12.5px; color: var(--ink-2);
}

/* アカウント登録／ログインフォーム共通部品（renderAuthGate が使う） */
.authform__section {
  margin: 0; padding: 22px; box-sizing: border-box;
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 14px;
}
.authform__heading {
  margin: 0 0 18px; font-family: var(--font-serif);
  font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: .02em;
}
.authform__field { display: block; margin: 0 0 14px; }
.authform__label {
  display: block; margin: 0 0 6px; font-size: 11.5px; font-weight: 600;
  color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase;
}
.authform__input,
.playlist-name-label input {
  display: block; width: 100%; box-sizing: border-box;
  min-height: 46px; padding: 0 14px; margin: 0;
  border: 1px solid var(--rule-2); border-radius: 8px;
  background: var(--paper); color: var(--ink); font-size: 15px;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.playlist-name-label input { margin-top: 6px; }
.authform__input::placeholder,
.playlist-name-label input::placeholder { color: var(--ink-3); }
.authform__input:focus,
.playlist-name-label input:focus {
  outline: none; border-color: var(--indigo);
  box-shadow: 0 0 0 3px var(--indigo-w);
}
.authform__submit {
  width: 100%; justify-content: center; margin-top: 6px;
  min-height: 48px; font-size: 14.5px; font-weight: 700;
  background: var(--indigo); border-color: var(--indigo); color: var(--paper);
}
.authform__submit:hover { background: var(--indigo-2); border-color: var(--indigo-2); color: var(--paper); }
.authform__submit--ghost {
  background: transparent; border-color: var(--rule-2); color: var(--ink-2);
}
.authform__submit--ghost:hover { background: var(--indigo-w); border-color: var(--indigo); color: var(--indigo); }

.authform__toggle { margin-top: 16px; }
.authform__toggle summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 6px;
  padding: 4px 2px; font-size: 13px; color: var(--ink-2);
}
.authform__toggle summary::-webkit-details-marker { display: none; }
.authform__toggle summary::after {
  content: ''; margin-left: auto; width: 6px; height: 6px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform .15s;
}
.authform__toggle[open] summary::after { transform: rotate(-135deg); }
.authform__toggle .authform__section { margin-top: 12px; }

.authform__warning {
  margin: 0 0 16px; padding: 14px 16px;
  background: var(--sticky-w); border: 1px solid var(--rule); border-left: 3px solid var(--sticky);
  border-radius: 0 8px 8px 0;
}
.authform__warning p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.7; }

.authform__idrow { display: flex; align-items: stretch; }
.authform__idrow .playlist-code { flex: 1; min-width: 0; }
.authform__copy {
  flex: none; justify-content: center;
  margin: 0; padding: 0 18px; font-size: 12.5px;
  border-radius: 0 8px 8px 0; border-left: 0;
}

/* マイページ（かんたん登録・保存したプレイリスト一覧） */
.mypage-body { max-width: 560px; margin: 0 auto; padding: 4px 0 60px; }
.mypage-body .playall { display: inline-flex; }
.mypage-body .notelist { margin-top: 6px; }
.mypage-body .notelist li { align-items: center; }
.mypage-account { margin: 0 0 28px; }
.mypage-account__heading,
.mypage-lists__heading {
  margin: 0 0 10px; font-family: var(--font-serif);
  font-size: 16px; font-weight: 600; color: var(--ink);
}
.mypage-account__card {
  margin-top: 14px; padding: 20px;
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 14px;
}
.mypage-account__toggle { margin-top: 14px; }
.mypage-account__toggle summary {
  cursor: pointer; list-style: none; font-size: 12.5px; color: var(--ink-3);
  display: flex; align-items: center; gap: 5px;
}
.mypage-account__toggle summary::-webkit-details-marker { display: none; }
.mypage-account__toggle summary::before {
  content: '＋'; font-size: 13px; line-height: 1;
}
.mypage-account__toggle[open] summary::before { content: '－'; }
.mypage-account__toggle .authform__section { margin-top: 12px; }

/* ============================================================
   連続再生プレイヤーの使い方紹介ページ（/player-guide）
   ・SVGアニメーション＋実際の人気作品パッケージ画像で操作を見せる
   ・各項目に音声ガイド（VOICEVOX合成の案内音声）を置く
   ============================================================ */

/* ---- 共通パーツ ---- */
.pguide-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: 999px; padding: 5px 13px 5px 10px; line-height: 1.6;
}
.pguide-badge--live { position: absolute; top: 10px; left: 10px; background: var(--paper-2); z-index: 2; }
.pguide-badge--member { color: var(--indigo); border-color: var(--indigo-w); background: var(--indigo-w); }
.pguide-dot {
  width: 6px; height: 6px; border-radius: 999px; background: var(--red); flex: none;
  animation: pguidePulseDot 1.6s ease-in-out infinite;
}
@keyframes pguidePulseDot { 0%, 100% { opacity: .4; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }

/* 音声で聞くボタン（項目ごと・共通） */
.pguide-listen {
  flex: none; width: 46px; height: 46px; border-radius: 999px;
  border: 1px solid var(--rule-2); background: var(--paper);
  color: var(--ink-2); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: color .15s, border-color .15s, background .15s, transform .15s;
}
.pguide-listen:hover { color: var(--indigo); border-color: var(--indigo); transform: scale(1.05); }
.pguide-listen svg { width: 21px; height: 21px; }
.pguide-listen .pguide-listen__bars rect { transform-origin: center bottom; transform-box: fill-box; }
.pguide-listen[aria-pressed="true"] {
  color: var(--paper); background: var(--indigo); border-color: var(--indigo);
}
.pguide-listen[aria-pressed="true"] .pguide-listen__bars rect { animation: pguideBar .9s ease-in-out infinite; }
.pguide-listen .pguide-listen__bars rect:nth-child(1) { animation-delay: 0s; }
.pguide-listen .pguide-listen__bars rect:nth-child(2) { animation-delay: .15s; }
.pguide-listen .pguide-listen__bars rect:nth-child(3) { animation-delay: .3s; }
@keyframes pguideBar { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }

/* 全編まとめて聞く（ヒーロー内） */
.pguide-audio-all {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 18px auto 0; padding: 0 24px; height: 50px;
  border-radius: 999px; border: 1px solid var(--rule-2); background: var(--paper-2);
  color: var(--ink); font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.pguide-audio-all:hover { border-color: var(--indigo); color: var(--indigo); }
.pguide-audio-all svg { width: 20px; height: 20px; flex: none; }
.pguide-audio-all[aria-pressed="true"] { background: var(--indigo); border-color: var(--indigo); color: var(--paper); }

/* ---- 全デモ共通の部品（player_guide.php の <svg class="pg-defs"> と対になる） ----
   ・写真も <image> としてSVG内に置き、指カーソル・枠・動きと同じ座標系で重ねる
   ・色はすべてテーマ変数（昼・夕方・星空・森・夜のどれでも破綻しない）
   ・1つのデモの中の動きは、すべて同じ周期 --T で回して「指が押す→画面が反応する」をそろえる */
.pg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.pg-ptr__body   { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.pg-ptr__shadow { fill: rgba(0,0,0,.28); }
.pg-ptr { opacity: 0; }
.pg-edge  { fill: none; stroke: var(--rule-2); stroke-width: 1; }
.pg-chip  { fill: var(--paper); stroke: var(--rule-2); stroke-width: 1; }
.pg-chip--on { fill: var(--indigo); }
.pg-icon, .pg-icon--on, .pg-icon--accent {
  fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.pg-icon--on     { stroke: var(--paper); }
.pg-icon--accent { stroke: var(--indigo); }
.pg-icon--solid  { fill: var(--ink-2); }
.pg-icon-fill    { fill: var(--ink-2); }
.pg-icon-fill--on{ fill: var(--paper); }
.pg-track { fill: var(--paper-3); }
.pg-range { fill: var(--sticky); }
.pg-head  { fill: var(--paper); stroke: var(--indigo); stroke-width: 2.6; }
.pg-screen { fill: #0d0d10; }
.pg-rule  { stroke: var(--rule-2); stroke-width: 1; }

/* タップの波紋：押した瞬間だけ広がって消える。開始時刻は各要素の style="--d:…" */
.pg-tap {
  fill: none; stroke: var(--indigo); stroke-width: 2; opacity: 0;
  transform-box: fill-box; transform-origin: center;
  animation: pgTap var(--T) ease-out var(--d, 0s) infinite both;
}
@keyframes pgTap {
  0%   { opacity: 0;  transform: scale(.35); }
  1%   { opacity: .9; }
  9%, 100% { opacity: 0; transform: scale(1.8); }
}
/* 最後に場面ごと薄く消して、最初の状態に戻す（逆再生に見えないように） */
.pg-scene { animation: pgCycle var(--T) linear infinite; }
@keyframes pgCycle { 0% { opacity: 0; } 4%, 92% { opacity: 1; } 97%, 100% { opacity: 0; } }

/* 再生中の枠＋進捗バー（①の各パッケージ・⑦の各行で使い回す） */
.pg-hl__frame { fill: none; stroke: var(--indigo); stroke-width: 2.4; }
.pg-hl__bar   { fill: var(--indigo); transform-box: fill-box; transform-origin: left center; }

/* ---- ヒーロー：人気作品が1本ずつ切り替わる「再生中のプレイヤー」 ---- */
.pguide-hero { margin: 28px 0 12px; text-align: center; }
.pguide-hero__stage {
  position: relative; max-width: 600px; margin: 0 auto;
  aspect-ratio: 320 / 210; border-radius: var(--radius-lg);
  background: var(--paper-2); border: 1px solid var(--rule);
  overflow: hidden; box-shadow: var(--shadow);
}
.pguide-hero__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pg-hero-slide { opacity: 0; animation: pgHeroSlide 12s linear var(--d) infinite both; }
.pg-hero-slide:first-of-type { opacity: 1; }
@keyframes pgHeroSlide { 0% { opacity: 0; } 3%, 25% { opacity: 1; } 28%, 100% { opacity: 0; } }
.pg-hero-bg  { opacity: .9; }
.pg-hero-dim { fill: #000; opacity: .45; }
.pg-hero-cover {
  transform-box: fill-box; transform-origin: center;
  animation: pgHeroCover 12s ease-out var(--d) infinite both;
}
@keyframes pgHeroCover { 0% { transform: scale(.94); } 25%, 100% { transform: scale(1.03); } }
.pg-hero-cover .pg-edge { stroke: rgba(255,255,255,.35); }
.pg-eq rect { fill: #fff; opacity: .85; transform-box: fill-box; transform-origin: center bottom; animation: pguideBar .9s ease-in-out infinite; }
.pg-eq rect:nth-child(2) { animation-delay: .15s; }
.pg-eq rect:nth-child(3) { animation-delay: .3s; }
.pg-hero-prog {
  fill: var(--indigo); transform-box: fill-box; transform-origin: left center; transform: scaleX(.4);
  animation: pgProg 3s linear infinite;
}
@keyframes pgProg { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.pg-hero-qframe { fill: none; stroke: var(--indigo); stroke-width: 2; animation: pgHeroQ 12s ease-in-out infinite; }
@keyframes pgHeroQ {
  0%, 23%  { transform: translateX(0); }
  26%, 48% { transform: translateX(30px); }
  51%, 73% { transform: translateX(60px); }
  76%, 97% { transform: translateX(90px); }
  100%     { transform: translateX(0); }
}
.pg-hero-play  { fill: var(--indigo); }
.pg-hero-pause { stroke: var(--paper); stroke-width: 3.2; stroke-linecap: round; }
.pg-hero-ring  {
  fill: none; stroke: var(--indigo); stroke-width: 2; opacity: 0;
  transform-box: fill-box; transform-origin: center; animation: pgRing 2.4s ease-out infinite;
}
@keyframes pgRing { 0% { opacity: .6; transform: scale(1); } 100% { opacity: 0; transform: scale(1.7); } }

/* ---- 機能カード一覧 ---- */
.pguide-list { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 44px; }
.pguide-card {
  display: grid; gap: 20px; grid-template-columns: 1fr;
  padding-bottom: 40px; border-bottom: 1px solid var(--rule);
}
.pguide-card:last-child { border-bottom: 0; padding-bottom: 0; }
.pguide-card.is-narrating { background: var(--indigo-w); border-radius: var(--radius-lg); box-shadow: inset 3px 0 0 var(--indigo); padding: 16px 16px 40px; margin: -16px; transition: background .2s; }
.pguide-card.is-narrating:last-child { padding-bottom: 16px; }
.pguide-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.pguide-card__index {
  display: block; font-family: var(--font-serif); font-size: 36px; font-weight: 600;
  color: var(--indigo); opacity: .85; line-height: 1; letter-spacing: .01em; margin: 0 0 8px;
}
.pguide-card__title { font-family: var(--font-serif); font-size: 22px; font-weight: 600; line-height: 1.4; margin: 0 0 10px; }
.pguide-card__body { font-size: 15px; color: var(--ink-2); line-height: 1.85; margin: 0 0 10px; }
.pguide-card__meta { display: flex; flex-wrap: wrap; gap: 6px; }

/* デモ枠（SVGの舞台。写真もこの中の <image>） */
.pguide-demo {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  max-width: 480px; border-radius: var(--radius-lg);
  background: var(--paper-2); border: 1px solid var(--rule); overflow: hidden;
  box-shadow: var(--shadow);
}
.pguide-demo__label { position: absolute; top: 10px; left: 10px; z-index: 3; }
.pguide-demo svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* --- ① 連続再生・ランダム再生（8秒）：▶で左から順に → ⤮でバラバラの順に --- */
.pguide-demo--rail { --T: 8s; }
.pguide-demo--rail .pg-hl { opacity: 0; animation: pgWin var(--T) linear var(--d) infinite both; }
.pguide-demo--rail .pg-hl__bar { animation: pgWinBar var(--T) linear var(--d) infinite both; }
@keyframes pgWin    { 0% { opacity: 0; } .6%, 8.4% { opacity: 1; } 9%, 100% { opacity: 0; } }
@keyframes pgWinBar { 0% { transform: scaleX(0); } 8.4%, 100% { transform: scaleX(1); } }
.pg-on { opacity: 0; }
.pg-on--a { animation: pgOnA var(--T) linear infinite; }
.pg-on--b { animation: pgOnB var(--T) linear infinite; }
@keyframes pgOnA { 0%, 8.4% { opacity: 0; } 9%, 47% { opacity: 1; } 48%, 100% { opacity: 0; } }
@keyframes pgOnB { 0%, 51.4% { opacity: 0; } 52%, 95% { opacity: 1; } 97%, 100% { opacity: 0; } }
.pg-ptr--rail { animation: pgPtrRail var(--T) ease-in-out infinite; }
@keyframes pgPtrRail {
  0%       { transform: translate(300px,184px); opacity: 0; }
  3%       { opacity: 1; }
  8%, 9%   { transform: translate(127px,148px); }
  16%, 46% { transform: translate(140px,158px); }
  51%, 52% { transform: translate(193px,148px); }
  58%, 90% { transform: translate(206px,158px); opacity: 1; }
  95%, 100%{ transform: translate(206px,158px); opacity: 0; }
}

/* --- ② 並べ替えに連動（7秒）：並び順を切り替えると、再生順1・2・3の中身も入れ替わる --- */
.pguide-demo--sort { --T: 7s; }
.pg-knob { fill: var(--indigo-w); stroke: var(--indigo); stroke-width: 1.2; animation: pgKnob var(--T) ease-in-out infinite; }
@keyframes pgKnob { 0%, 26% { transform: translateX(0); } 32%, 70% { transform: translateX(47px); } 76%, 100% { transform: translateX(0); } }
/* 並び順が変わると、各枠が裏返って中身が入れ替わる（裏返りきった瞬間に表裏を切り替える） */
.pg-flip { transform-box: fill-box; transform-origin: center; animation: pgFlip var(--T) ease-in-out var(--d) infinite both; }
@keyframes pgFlip {
  0%, 28%   { transform: scaleX(1); }
  32%       { transform: scaleX(0); }
  36%, 72%  { transform: scaleX(1); }
  76%       { transform: scaleX(0); }
  80%, 100% { transform: scaleX(1); }
}
.pg-after  { opacity: 0; animation: pgFlipAfter  var(--T) linear var(--d) infinite both; }
.pg-before { animation: pgFlipBefore var(--T) linear var(--d) infinite both; }
@keyframes pgFlipAfter  { 0%, 31.9% { opacity: 0; } 32%, 75.9% { opacity: 1; } 76%, 100% { opacity: 0; } }
@keyframes pgFlipBefore { 0%, 31.9% { opacity: 1; } 32%, 75.9% { opacity: 0; } 76%, 100% { opacity: 1; } }
.pg-rank circle { fill: var(--indigo); stroke: var(--paper); stroke-width: 1.5; }
.pg-rank text { fill: var(--paper); font: 700 11px var(--font-sans); text-anchor: middle; }
.pg-rank { transform-box: fill-box; transform-origin: center; animation: pgRank var(--T) ease-out infinite; }
@keyframes pgRank { 0%, 38%, 46%, 82%, 90%, 100% { transform: scale(1); } 42%, 86% { transform: scale(1.25); } }
.pg-flow { fill: none; stroke: var(--ink-3); stroke-width: 1.6; stroke-dasharray: 3 5; stroke-linecap: round; animation: pgFlow 1s linear infinite; }
@keyframes pgFlow { to { stroke-dashoffset: -8; } }
.pg-ptr--sort { animation: pgPtrSort var(--T) ease-in-out infinite; }
@keyframes pgPtrSort {
  0%        { transform: translate(300px,176px); opacity: 0; }
  5%        { opacity: 1; }
  20%, 26%  { transform: translate(285px,22px); }
  34%, 62%  { transform: translate(298px,50px); }
  68%, 70%  { transform: translate(237px,22px); }
  78%, 90%  { transform: translate(250px,50px); opacity: 1; }
  96%, 100% { transform: translate(250px,50px); opacity: 0; }
}

/* --- ③ ドラッグで並べ替え（7秒）：2枚目を持ち上げて右端へ運ぶと、残りが左へ詰まる --- */
.pguide-demo--drag { --T: 7s; }
.pg-drag { transform-box: fill-box; transform-origin: center; animation: pgDrag var(--T) ease-in-out infinite; }
@keyframes pgDrag {
  0%, 14%   { transform: translate(0,0) scale(1); }
  18%       { transform: translate(0,-6px) scale(1.08); }
  44%       { transform: translate(148px,-6px) scale(1.08); }
  50%, 100% { transform: translate(148px,0) scale(1); }
}
.pg-lift-shadow { fill: #000; opacity: 0; animation: pgLiftShadow var(--T) ease-in-out infinite; }
@keyframes pgLiftShadow { 0%, 14% { opacity: 0; } 18%, 44% { opacity: .28; } 50%, 100% { opacity: 0; } }
.pg-shift { animation: pgShift var(--T) ease-in-out infinite; }
@keyframes pgShift { 0%, 26% { transform: translateX(0); } 40%, 100% { transform: translateX(-74px); } }
.pg-ghost { fill: var(--indigo-w); stroke: var(--indigo); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: 0; animation: pgGhost var(--T) ease-in-out infinite; }
@keyframes pgGhost { 0%, 36% { opacity: 0; } 40%, 46% { opacity: 1; } 50%, 100% { opacity: 0; } }
.pg-ptr--drag { animation: pgPtrDrag var(--T) ease-in-out infinite; }
@keyframes pgPtrDrag {
  0%        { transform: translate(300px,170px); opacity: 0; }
  4%        { opacity: 1; }
  12%, 14%  { transform: translate(125px,89px); }
  18%       { transform: translate(125px,83px); }
  44%       { transform: translate(273px,83px); }
  50%, 86%  { transform: translate(273px,89px); opacity: 1; }
  92%, 100% { transform: translate(273px,89px); opacity: 0; }
}

/* --- ④ いらない作品を削除（6秒）：×で1枚が縮んで消え、右の1枚が詰まる。件数も 3→2 --- */
.pguide-demo--del { --T: 6s; }
.pg-x { fill: var(--paper); stroke: var(--red); stroke-width: 1.5; }
.pg-x__mark { stroke: var(--red); stroke-width: 1.8; stroke-linecap: round; }
.pg-del { transform-box: fill-box; transform-origin: center; animation: pgDel var(--T) ease-in-out infinite; }
@keyframes pgDel {
  0%, 21%   { transform: scale(1); opacity: 1; }
  24%       { transform: scale(1.04); opacity: 1; }
  34%, 100% { transform: scale(.2); opacity: 0; }
}
.pg-close { animation: pgClose var(--T) ease-in-out infinite; }
@keyframes pgClose { 0%, 34% { transform: translateX(0); } 46%, 100% { transform: translateX(-87px); } }
.pg-num { font: 700 13px var(--font-sans); fill: var(--ink); text-anchor: middle; }
.pg-num--out { animation: pgNumOut var(--T) ease-in-out infinite; }
.pg-num--in  { opacity: 0; animation: pgNumIn var(--T) ease-in-out infinite; }
@keyframes pgNumOut { 0%, 36% { opacity: 1; transform: translateY(0); } 42%, 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes pgNumIn  { 0%, 38% { opacity: 0; transform: translateY(6px); } 44%, 100% { opacity: 1; transform: translateY(0); } }
.pg-ptr--del { animation: pgPtrDel var(--T) ease-in-out infinite; }
@keyframes pgPtrDel {
  0%        { transform: translate(300px,170px); opacity: 0; }
  4%        { opacity: 1; }
  16%, 21%  { transform: translate(191px,48px); }
  30%, 86%  { transform: translate(212px,70px); opacity: 1; }
  92%, 100% { transform: translate(212px,70px); opacity: 0; }
}

/* --- ⑤ お気に入りに保存（6秒）：ハートが弾け、リストにしおり＋「保存済み」 --- */
.pguide-demo--save { --T: 6s; }
.pg-heart {
  fill: var(--paper); stroke: var(--ink-2); stroke-width: 2; stroke-linejoin: round;
  transform-box: fill-box; transform-origin: center; animation: pgHeart var(--T) ease-in-out infinite;
}
@keyframes pgHeart {
  0%, 22%   { transform: scale(1);    fill: var(--paper); stroke: var(--ink-2); }
  27%       { transform: scale(1.32); fill: var(--red);   stroke: var(--red); }
  33%, 100% { transform: scale(1);    fill: var(--red);   stroke: var(--red); }
}
.pg-burst path { fill: none; stroke: var(--red); stroke-width: 2.2; stroke-linecap: round; }
.pg-burst { opacity: 0; transform-box: fill-box; transform-origin: center; animation: pgBurst var(--T) ease-out infinite; }
@keyframes pgBurst { 0%, 23% { opacity: 0; transform: scale(.6); } 26% { opacity: 1; } 36%, 100% { opacity: 0; transform: scale(1.3); } }
.pg-ribbon { fill: var(--indigo); opacity: 0; animation: pgRibbon var(--T) ease-out infinite; }
@keyframes pgRibbon { 0%, 30% { opacity: 0; transform: translateY(-10px); } 38%, 100% { opacity: 1; transform: translateY(0); } }
.pg-saved { opacity: 0; animation: pgSaved var(--T) ease-out infinite; }
@keyframes pgSaved { 0%, 38% { opacity: 0; transform: translateY(6px); } 46%, 100% { opacity: 1; transform: translateY(0); } }
.pg-ok { fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pg-ptr--save { animation: pgPtrSave var(--T) ease-in-out infinite; }
@keyframes pgPtrSave {
  0%        { transform: translate(300px,176px); opacity: 0; }
  4%        { opacity: 1; }
  18%, 22%  { transform: translate(252px,84px); }
  30%, 86%  { transform: translate(294px,58px); opacity: 1; }
  92%, 100% { transform: translate(294px,58px); opacity: 0; }
}

/* --- ⑥ お気に入り区間・A-Bループ（7秒）：再生中にA→Bを押すと、その間だけを繰り返す --- */
.pguide-demo--scene { --T: 7s; }
.pg-pan { transform-box: fill-box; transform-origin: center; animation: pgPan var(--T) ease-in-out infinite; }
@keyframes pgPan { from { transform: scale(1); } to { transform: scale(1.08); } }
.pguide-demo--scene .pg-range { transform-box: fill-box; transform-origin: left center; animation: pgRangeGrow var(--T) ease-out infinite; }
@keyframes pgRangeGrow { 0%, 36% { transform: scaleX(0); } 44%, 100% { transform: scaleX(1); } }
.pg-pin circle { fill: var(--indigo); }
.pg-pin text { fill: var(--paper); font: 700 9px var(--font-sans); text-anchor: middle; }
.pg-pin__stem { stroke: var(--indigo); stroke-width: 2; stroke-linecap: round; }
.pg-pin--a { animation: pgPinA var(--T) ease-out infinite; }
.pg-pin--b { animation: pgPinB var(--T) ease-out infinite; }
@keyframes pgPinA { 0%, 17% { opacity: 0; transform: translateY(-8px); } 21%, 100% { opacity: 1; transform: translateY(0); } }
@keyframes pgPinB { 0%, 33% { opacity: 0; transform: translateY(-8px); } 37%, 100% { opacity: 1; transform: translateY(0); } }
.pg-head--run { animation: pgHeadRun var(--T) linear infinite; }
@keyframes pgHeadRun {
  0%        { transform: translateX(0); opacity: 0; }
  4%        { opacity: 1; }
  34%       { transform: translateX(160px); opacity: 1; }
  35%, 100% { transform: translateX(160px); opacity: 0; }
}
.pg-loopwrap, .pg-loopicon { opacity: 0; animation: pgLoopOn var(--T) linear infinite; }
@keyframes pgLoopOn { 0%, 34% { opacity: 0; } 36%, 100% { opacity: 1; } }
/* 7秒 ÷ 1.4秒 ＝ 5周でちょうど割り切れるので、場面の周期とずれない */
.pg-head--loop { animation: pgLoopRun 1.4s linear 2.45s infinite; }
@keyframes pgLoopRun { from { transform: translateX(0); } to { transform: translateX(86px); } }
.pg-spin { transform-box: fill-box; transform-origin: center; animation: pgSpin 1.4s linear infinite; }
@keyframes pgSpin { to { transform: rotate(360deg); } }
.pg-ptr--scene { animation: pgPtrScene var(--T) ease-in-out infinite; }
@keyframes pgPtrScene {
  0%        { transform: translate(300px,176px); opacity: 0; }
  4%        { opacity: 1; }
  15%, 19%  { transform: translate(110px,147px); }
  31%, 35%  { transform: translate(196px,147px); }
  44%, 86%  { transform: translate(236px,156px); opacity: 1; }
  92%, 100% { transform: translate(236px,156px); opacity: 0; }
}

/* --- ⑦ お気に入り区間だけ連続再生（7.5秒）：3作品の区間を、再生位置が飛び移りながらつなぐ --- */
.pguide-demo--playlist { --T: 7.5s; }
.pg-rowon { opacity: 0; animation: pgRowOn var(--T) linear var(--d) infinite both; }
@keyframes pgRowOn { 0% { opacity: 0; } 1%, 27% { opacity: 1; } 29%, 100% { opacity: 0; } }
.pg-hop { fill: none; stroke: var(--ink-3); stroke-width: 1.4; stroke-dasharray: 2 4; stroke-linecap: round; opacity: .7; }
.pg-runner { transform: translate(176px,56px); animation: pgRunner var(--T) linear infinite; }
/* 飛び移る途中の点は、点線（ベジェ曲線）のちょうど中間を通るように置いている */
@keyframes pgRunner {
  0%    { transform: translate(176px,56px); }
  26%   { transform: translate(236px,56px); }
  29.5% { transform: translate(168px,79px); }
  33%   { transform: translate(100px,102px); }
  59%   { transform: translate(160px,102px); }
  62.5% { transform: translate(190px,125px); }
  66%   { transform: translate(220px,148px); }
  92%   { transform: translate(280px,148px); }
  96%   { transform: translate(228px,102px); }
  100%  { transform: translate(176px,56px); }
}

/* CTA */
.pguide-cta { margin-top: 40px; text-align: center; }
.pguide-cta .playall { min-height: 50px; padding: 0 26px; font-size: 15px; }

/* 動きは「画面内に来たら」再生する（負荷対策・演出のメリハリ）。
   1つの舞台の中はすべて同時に止まる／動くので、指と画面の反応のタイミングはずれない */
.pguide-demo:not(.is-inview) svg *,
.pguide-hero__stage:not(.is-inview) svg * {
  animation-play-state: paused !important;
}

/* 460px〜：スマホでも操作イメージが小さくなりすぎないよう、横幅いっぱいまで大きく見せる */
@media (min-width: 460px) {
  .pguide-demo { max-width: 560px; }
}

/* 720px〜：デモとテキストを横並びにする。デモは十分な大きさ（320〜440px）を必ず確保し、
   本文は読みやすい行長に収まるよう最大幅を付ける（横幅いっぱいに文字が伸びて間延びするのを防ぐ）。 */
@media (min-width: 720px) {
  .pguide-card { grid-template-columns: minmax(320px, 440px) 1fr; align-items: flex-start; gap: 36px; }
  .pguide-demo { max-width: none; }
  .pguide-card__text { max-width: 600px; padding-top: 4px; }
}

@media (min-width: 1040px) {
  .pguide-card { grid-template-columns: minmax(360px, 480px) 1fr; }
}

/* 動きを減らす設定の人には、止めた上で「操作した後の状態」を1枚絵として見せる */
@media (prefers-reduced-motion: reduce) {
  .pguide-hero__stage svg *,
  .pguide-demo svg *,
  .pguide-listen[aria-pressed="true"] .pguide-listen__bars rect {
    animation: none !important;
  }
  .pguide-demo .pg-saved, .pguide-demo .pg-ribbon,
  .pguide-demo .pg-pin, .pguide-demo .pg-loopwrap, .pguide-demo .pg-loopicon,
  .pguide-demo--rail .pg-on--a { opacity: 1; }
  .pguide-demo .pg-heart { fill: var(--red); stroke: var(--red); }
}

/* トップページの新機能バナー */
.feature-banner {
  display: block; margin-bottom: 22px;
  padding: 16px 18px; border-radius: 10px; overflow: hidden;
  background: var(--sticky-w); border: 1px solid var(--rule); border-left: 3px solid var(--sticky);
  text-decoration: none; color: inherit;
}
.feature-banner__head { display: flex; align-items: center; gap: 14px; }
.feature-banner__icon {
  flex: none; width: 40px; height: 40px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper); color: var(--indigo); font-size: 18px;
}
.feature-banner__icon svg { width: 20px; height: 20px; }
.feature-banner__body { flex: 1; min-width: 0; }
.feature-banner__title { font-weight: 700; font-size: 14px; margin: 0 0 3px; color: var(--ink); display: block; }
.feature-banner__lead { font-size: 12.5px; color: var(--ink-2); margin: 0; display: block; }
.feature-banner__arrow { flex: none; color: var(--ink-3); font-size: 18px; }
.feature-banner:hover { border-color: var(--indigo); }
.feature-banner:hover .feature-banner__arrow { color: var(--indigo); }

/* フィルムストリップ版: 人気作のパッケージが映画フィルム風に流れ続ける */
.feature-banner--strip { padding-bottom: 0; }
.feature-banner__film {
  position: relative; display: flex; overflow: hidden;
  margin: 14px -18px 0; padding: 16px 0;
  background: #211f1c;
}
/* フィルムの送り穴（上下） */
.feature-banner__film::before,
.feature-banner__film::after {
  content: ""; position: absolute; left: 0; right: 0; height: 7px; z-index: 1;
  background: repeating-linear-gradient(90deg,
    transparent 0 6px, rgba(250,248,244,.85) 6px 14px, transparent 14px 20px);
}
.feature-banner__film::before { top: 4px; }
.feature-banner__film::after  { bottom: 4px; }
.feature-banner__reel {
  flex: none; display: flex; gap: 8px; padding-right: 8px;
  animation: feature-reel 40s linear infinite;
}
.feature-banner__reel img {
  display: block; height: 76px; width: auto;
  outline: 1px solid rgba(250,248,244,.15);
}
.feature-banner--strip:hover .feature-banner__reel { animation-play-state: paused; }
@keyframes feature-reel { to { transform: translateX(-100%); } }
@media (min-width: 768px) {
  .feature-banner__reel img { height: 92px; }
}
@media (prefers-reduced-motion: reduce) {
  .feature-banner__reel { animation: none; }
}

/* ============================================================
   フッター
   ============================================================ */
.footer { border-top: 1px solid var(--rule); background: var(--paper-2); margin-top: 32px; }
.footer__inner { max-width: var(--max); margin: 0 auto; padding: 22px 12px 18px; }
.footer__brand { margin-bottom: 16px; }
.footer__brand p { color: var(--ink-3); font-size: 12.5px; margin: 8px 0 0; max-width: 40em; }
.footer__cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px 20px; margin-bottom: 16px;
}
.footer__cols h3 { font-size: 12.5px; color: var(--ink); margin: 0 0 8px; letter-spacing: .06em; }
.footer__cols ul { list-style: none; margin: 0; padding: 0; }
.footer__cols li { margin-bottom: 2px; }
.footer__cols a {
  display: inline-flex; align-items: center; min-height: 34px;
  font-size: 13px; color: var(--ink-2);
}
.footer__cols a:hover { color: var(--indigo); }
.footer__note { border-top: 1px solid var(--rule); padding-top: 12px; }
.footer__note p { font-size: 11.5px; color: var(--ink-3); margin: 0 0 8px; }
.badge-18 {
  display: inline-block; border: 1px solid var(--red); color: var(--red) !important;
  border-radius: 3px; padding: 2px 10px; font-weight: 700;
}
.footer__copy { color: var(--ink-3); }

/* 広告ポリシーの明示（信頼のための表示） */
.footer__promise {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin: 0 0 14px; padding: 0; list-style: none;
}
.footer__promise li {
  font-size: 11.5px; color: var(--ink-2);
  display: flex; align-items: center; gap: 5px;
}
.footer__promise li::before { content: "✓"; color: var(--green); font-weight: 700; }

/* ============================================================
   年齢確認
   ============================================================ */
body.is-plain {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;   /* iOS のアドレスバーで下が切れないように */
  padding: 20px 16px calc(20px + var(--safe-b));
}
.agegate { width: 100%; max-width: 460px; }
.agegate__box {
  background: var(--paper-2); border: 1px solid var(--rule);
  border-top: 4px solid var(--sticky);
  padding: 30px 22px; text-align: center; box-shadow: var(--shadow);
}
.agegate__logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 20px; }
.agegate__badge {
  display: inline-block; border: 2px solid var(--red); color: var(--red);
  border-radius: 50%; width: 50px; height: 50px; line-height: 46px;
  font-weight: 700; margin: 0 auto 14px; font-size: 15px;
}
.agegate h1,
.agegate__title { font-family: var(--font-serif); font-size: 19px; font-weight: 600; margin: 0 0 12px; }
.agegate__lead { color: var(--ink-2); font-size: 13.5px; margin: 0 0 6px; }
.agegate__note { color: var(--ink-3); font-size: 12px; margin: 0 0 20px; }
.agegate__exit { margin: 14px 0 0; }
.agegate__exit a {
  display: inline-flex; align-items: center; min-height: var(--tapmin);
  color: var(--ink-3); font-size: 13px; text-decoration: underline;
}
.agegate__langs {
  list-style: none; display: flex; flex-wrap: wrap; gap: 2px 8px; justify-content: center;
  padding: 16px 0 0; margin: 20px 0 0; border-top: 1px solid var(--rule);
}
.agegate__langs a {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 4px;
  font-size: 11.5px; color: var(--ink-3);
}
.agegate__langs a.is-active { color: var(--indigo); font-weight: 700; }

/* ============================================================
   作品の傾向（レーダーチャート）
   ============================================================ */
.axes__body { display: flex; flex-wrap: wrap; gap: 18px 26px; align-items: center; }
.radar { width: 240px; height: 240px; flex: none; overflow: visible; }
.radar__grid  { fill: none; stroke: var(--rule); stroke-width: 1; }
.radar__spoke { stroke: var(--rule); stroke-width: 1; }
.radar__area  { fill: var(--indigo); fill-opacity: .16; stroke: var(--indigo); stroke-width: 2; stroke-linejoin: round; }
.radar__dot   { fill: var(--indigo); }
.radar__label { font-size: 11px; fill: var(--ink-2); font-weight: 600; }
.radar__value { font-size: 12px; fill: var(--indigo); font-weight: 800; }

.axes__list { list-style: none; margin: 0; padding: 0; flex: 1 1 240px; min-width: 220px; }
.axes__list li { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.axes__label { flex: none; width: 6.5em; font-size: 12.5px; color: var(--ink-2); }
.axes__bar   { flex: 1; height: 7px; background: var(--rule); border-radius: 4px; overflow: hidden; }
.axes__bar i { display: block; height: 100%; background: var(--indigo); border-radius: 4px; }
.axes__num   { flex: none; width: 2.2em; text-align: right; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.axes__note  { margin: 14px 0 0; font-size: 11.5px; color: var(--ink-3); line-height: 1.7; }

/* ============================================================
   作品ページの記事 ―― 「ノート」の1ページとして組む
   ============================================================
   PC幅で本文を素の.sectionにそのまま流すと、40em程度の読み幅に対して
   コンテナが1080px近くあるため、右側だけ大きく余って中途半端に見える
   （実際に指摘を受けた）。
   ここでは「読み幅に収まらない余白」を隠すのではなく、AVNOTAのコンセプト
   である"ノート"の1ページとして見せる方向で解決する：
     ・記事全体を紙色のカードにし、罫線と赤い余白線を入れる
     （罫線の技法は .slide__text と同じ repeating-linear-gradient）
     ・PC幅ではカード自体を読みやすい幅に収めて中央に置く
       → 余白は「ページの外側の余白」として意図的に見える
     ・文字サイズ・行間を上げ、長文でも読み疲れないようにする */
.section.article {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 20px 20px 26px 34px;
  box-shadow: var(--shadow);
  position: relative;
  /* 罫線。見出し分の余白を空けてから、行の高さに合わせて引く */
  background-image: repeating-linear-gradient(
    to bottom, transparent 0, transparent 30px, var(--rule) 30px, var(--rule) 31px);
  background-position: 0 92px;
  background-repeat: repeat-y;
}
/* ノートの綴じ側にある赤い罫（マージンライン） */
.section.article::before {
  content: ''; position: absolute; top: 18px; bottom: 18px; left: 20px;
  width: 1px; background: var(--red); opacity: .35;
}
.section.article .section__head { margin-bottom: 14px; }

.article__lead {
  margin: 0 0 18px; font-size: 15.5px; line-height: 1.95; color: var(--ink);
}
/* リード文の頭文字だけ大きくする（ノートの書き出しらしい一手間） */
.article__lead:first-letter {
  font-family: var(--font-serif); font-size: 2.4em; font-weight: 700;
  color: var(--indigo); float: left; line-height: 1; margin: 2px 4px 0 0;
}
.article__points, .article__h, .article__list, .article .prose,
.article__table, .article__actress, .article__related, .article__svg {
  max-width: 42em;
}
.article__points {
  list-style: none; margin: 0 0 24px; padding: 16px 18px;
  background: var(--paper); border: 1px solid var(--rule);
  border-left: 3px solid var(--sticky);
}
.article__points li {
  position: relative; padding-left: 20px; margin: 0 0 10px;
  font-size: 14.5px; line-height: 1.85; color: var(--ink-2);
}
.article__points li:last-child { margin-bottom: 0; }
.article__points li::before {
  content: ''; position: absolute; left: 3px; top: 11px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--indigo);
}
.article__h {
  font-family: var(--font-serif); font-size: 18px; font-weight: 700;
  margin: 34px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--rule-2);
  color: var(--ink); letter-spacing: .01em;
}
.article .prose {
  margin: 0 0 16px; font-size: 15.5px; line-height: 1.95; color: var(--ink-2);
}
.article .prose strong { color: var(--ink); font-weight: 700; }
.article__list { margin: 0 0 18px; padding-left: 22px; }
.article__list li { font-size: 14.5px; line-height: 1.9; color: var(--ink-2); margin-bottom: 7px; }
/* 記事の中から他の作品へ飛ぶリンク（品番を自動でリンクにしている） */
.article__ref {
  color: var(--indigo); font-weight: 600;
  text-decoration: underline; text-underline-offset: 2px;
}

/* 蛍光ペン風のハイライト（==text== が変換される）。
   ノートに実際に線を引いたような見た目にして、拾い読みでも要点が目に入るようにする */
mark.article__mark {
  background: var(--sticky-w); color: var(--ink);
  padding: .04em .2em; border-radius: 2px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
  font-weight: 600;
}

/* --- レビュー記事（avnota-review-article スキル）が :::html で組む部品 ---
   フロートはさせず、カードの読み幅の中に上から順に積む（ノートに貼った
   付箋・写真・表という見立て。雑誌のような回り込みはここでは狙わない） */

/* レビューの星分布などを見せる表 */
.article__table {
  width: 100%; margin: 4px 0 22px;
  border-collapse: collapse; font-size: 13.5px;
  background: var(--paper); border: 1px solid var(--rule);
}
.article__table th, .article__table td {
  padding: 9px 14px; border-bottom: 1px solid var(--rule); text-align: left;
}
.article__table thead th { background: var(--paper-3); }
.article__table th { color: var(--ink-3); font-weight: 600; }
.article__table td.num, .article__table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.article__table--full th:first-child { color: var(--ink-3); font-weight: 600; width: 8em; }

/* 出演女優カード：写真＋プロフィール＋Xリンク（付箋を貼ったような見た目） */
.article__actress {
  display: flex; gap: 16px; align-items: center;
  margin: 4px 0 22px; padding: 16px 18px; background: var(--paper);
  border: 1px solid var(--rule); border-left: 3px solid var(--indigo);
}
.article__actress img {
  width: 88px; height: 88px; object-fit: cover; flex: none;
  border-radius: 50%; border: 2px solid var(--paper-2);
  box-shadow: 0 0 0 1px var(--rule);
}
.article__actress__name { font-family: var(--font-serif); font-size: 17px; font-weight: 700; margin: 0 0 5px; }
.article__actress__meta { font-size: 12.5px; color: var(--ink-3); margin: 0 0 10px; line-height: 1.8; }
.article__actress__x {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--rule-2); border-radius: 999px;
  padding: 5px 12px; text-decoration: none;
}
.article__actress__x:hover { border-color: var(--indigo); color: var(--indigo); }

/* 関連作品カード（同じ女優の他作品） */
.article__related { margin: 4px 0 24px; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.article__related li { font-size: 0; }
.article__related a { display: block; text-decoration: none; color: inherit; }
.article__related img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block;
  border: 1px solid var(--rule);
}
.article__related span {
  display: block; margin-top: 6px; font-size: 11.5px; line-height: 1.4;
  color: var(--ink-2); text-align: center;
}

/* SVGの飾り（作品タイプ・章立てなどの図解） */
/* ============================================================
   記事の図解キット（.article__svg の中のSVG）
   ・新しい図は <svg class="asvg" viewBox="0 0 360 H"> ＋ 下の a-* クラスで描く
     （作り方は .claude/skills/avnota-svg-figures/SKILL.md。Opus固定のサブエージェントが作る）
   ・色は必ずテーマ変数。直書きの #色 は使わない（暗いテーマで白い箱が浮くため）
   ・旧形式の図（色直書き）は functions/common.php の article_svg_upgrade() が
     表示時に同じクラスを付けて、この配色に寄せている
   ============================================================ */
.article__svg { margin: 8px 0 22px; }
.article__svg svg { width: 100%; height: auto; display: block; overflow: visible; }
.article__svg svg.asvg:not(.asvg--legacy) { max-width: 480px; }
.asvg { font-family: var(--font-sans); }
.asvg text { font-family: var(--font-sans); }

/* 面（箱）：既定は紙の一段沈んだ面。色味つきは強調したい箱だけに使う */
.a-box          { fill: var(--paper-2); stroke: var(--rule-2); stroke-width: 1; }
.a-box--accent  { fill: var(--indigo-w); stroke: var(--indigo); }
.a-box--hot     { fill: rgba(179,64,47,.08); fill: color-mix(in srgb, var(--red) 10%, transparent); stroke: var(--red); }
.a-box--warm    { fill: var(--sticky-w); stroke: var(--sticky); }
.a-box--green   { fill: rgba(63,125,92,.08); fill: color-mix(in srgb, var(--green) 12%, transparent); stroke: var(--green); }
.a-frame        { fill: none; stroke: var(--rule-2); stroke-width: 1; }
/* 塗り（棒・点・バッジ） */
.a-bar          { fill: var(--indigo); stroke: none; }
.a-bar--warm    { fill: var(--sticky); }
.a-bar--hot     { fill: var(--red); }
.a-bar--green   { fill: var(--green); }
.a-bar--accent  { fill: var(--indigo); }
.a-track        { fill: var(--paper-3); stroke: none; }
/* 線・矢印 */
.a-line         { fill: none; stroke: var(--rule-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.a-line--accent { stroke: var(--indigo); }
.a-line--dash   { stroke-dasharray: 3 5; }
.a-arrow        { fill: var(--indigo); stroke: none; }
/* 文字（viewBox幅360で font-size 13以上。スマホ幅でも12px相当を下回らない） */
.a-t            { fill: var(--ink); }
.a-t--head      { fill: var(--ink); font-family: var(--font-serif); font-weight: 600; }
.a-t--sub       { fill: var(--ink-2); }
.a-t--mute      { fill: var(--ink-3); }
.a-t--accent    { fill: var(--indigo); font-weight: 700; }
.a-t--on        { fill: var(--paper); font-weight: 700; }
.a-t--num       { font-variant-numeric: tabular-nums; font-weight: 700; }

/* 旧形式の横長の図（viewBox幅600前後）は、スマホで縮めず横スクロールで読ませる */
.article__svg:has(.asvg--wide) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.asvg--wide { min-width: 520px; }

/* ---- 出現アニメ ----
   JSが画面に入る直前に .is-armed を付けて隠し、入ったら .is-in で順番に出す。
   JSが動かない／動きを減らす設定の人は、最初から全部見えている（隠しっぱなしにしない）。
   順番は各要素の style="--i:0,1,2…"（0.11秒ずつ遅れる） */
.article__svg.is-armed .a-rise,
.article__svg.is-armed .a-pop,
.article__svg.is-armed .a-grow,
.article__svg.is-armed .a-growy { opacity: 0; }
.article__svg.is-armed .a-draw  { stroke-dasharray: 1; stroke-dashoffset: 1; }
.article__svg.is-in .a-rise  { animation: aRise .55s cubic-bezier(.2,.7,.2,1) calc(var(--i, 0) * .11s) both; }
.article__svg.is-in .a-pop   { transform-box: fill-box; transform-origin: center; animation: aPop .5s cubic-bezier(.3,1.5,.5,1) calc(var(--i, 0) * .11s) both; }
.article__svg.is-in .a-grow  { transform-box: fill-box; transform-origin: left center; animation: aGrow .8s cubic-bezier(.2,.7,.2,1) calc(var(--i, 0) * .11s) both; }
.article__svg.is-in .a-growy { transform-box: fill-box; transform-origin: center bottom; animation: aGrowY .8s cubic-bezier(.2,.7,.2,1) calc(var(--i, 0) * .11s) both; }
.article__svg.is-in .a-draw  { stroke-dasharray: 1; animation: aDraw .9s ease-out calc(var(--i, 0) * .11s) both; }
@keyframes aRise  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes aPop   { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes aGrow  { from { opacity: 1; transform: scaleX(0); } to { opacity: 1; transform: none; } }
@keyframes aGrowY { from { opacity: 1; transform: scaleY(0); } to { opacity: 1; transform: none; } }
@keyframes aDraw  { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
/* ずっと続く控えめな動き（1つの図に1か所まで）。流れる点線・脈打つ輪 */
.a-flow  { stroke-dasharray: 3 5; animation: aFlow 1.2s linear infinite; }
@keyframes aFlow { to { stroke-dashoffset: -8; } }
.a-pulse { transform-box: fill-box; transform-origin: center; animation: aPulse 2.4s ease-out infinite; }
@keyframes aPulse { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.6); } }
@media (prefers-reduced-motion: reduce) {
  .article__svg *, .article__svg.is-in * { animation: none !important; }
  .article__svg .a-pulse { display: none; }
}

@media (min-width: 760px) {
  /* カード自体を読みやすい幅に収めて中央へ。
     余白は「ページの外の余白」として意図的に見える形にする */
  .section.article {
    max-width: 46em; margin-left: auto; margin-right: auto;
    padding: 30px 36px 38px 52px;
  }
  .section.article::before { left: 30px; }
  .article__lead { font-size: 16.5px; }
  .article .prose, .article__list li, .article__points li { font-size: 15.5px; }
}

/* --- 年齢確認モーダル（ページ本体の上に被せる版） ---
   ページのHTMLは全員に返し、未同意の人にはこの覆いを重ねる。
   リダイレクトしないので、クローラーからは中身が読める。 */
.agegate-overlay {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center;
  padding: 20px 16px calc(20px + var(--safe-b));
  background: var(--paper);
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* 覆いが出ている間は後ろを動かさない */
body.is-agegated { overflow: hidden; }
/* 下部タブバーと購入バーは覆いより手前に来てしまうので隠す */
body.is-agegated .tabbar,
body.is-agegated .buybar { display: none; }

/* ============================================================
   画面幅による拡張（モバイルファースト）
   ============================================================ */

/* --- 小型タブレット以上 --- */
@media (min-width: 560px) {
  .main { padding: 16px 18px 40px; }
  .grid,
  .rail__track { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 12px; }
  /* 3列なので、スマホでの表示は先頭6件＝ちょうど2行 */
  .slide { grid-template-columns: 34% 1fr; min-height: 250px; }
  .slide__note { padding: 16px 18px 15px 26px; }
  .slide__note::before { left: 14px; }
  .slide__title { font-size: calc(19px * var(--hand-scale, 1)); }
  .slide__text  { font-size: calc(15px * var(--hand-scale, 1)); line-height: 28px;
    background-image: repeating-linear-gradient(
      to bottom, transparent 0, transparent 27px, var(--rule) 27px, var(--rule) 28px); }
  .hero { padding: 22px 22px 20px; }
  .hero__title { font-size: 26px; }
  .hero__stats { gap: 6px 28px; margin-top: 16px; }
  .hero__stats b { font-size: 20px; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .people li { width: 96px; }
  .people img { width: 72px; height: 72px; }
}

/* --- タブレット・PC --- */
@media (min-width: 760px) {
  body { font-size: 15.5px; }
  body:not(.is-plain) { padding-bottom: 0; }   /* 下部バーが消えるので余白も消す */

  .tabbar, .buybar { display: none !important; }
  .nav { display: block; }
  .header__bar { padding: 10px 20px; gap: 14px; }
  .header__login { display: inline-flex; }
  .iconbtn__label { display: inline; }

  .main { padding: 16px 20px 44px; }
  .section { margin-top: 28px; }
  .section__head h2 { font-size: 20px; }
  .section--accent { padding: 18px 20px 18px 18px; }

  .hero { padding: 26px 30px 24px; }
  .hero__title { font-size: 30px; }
  .hero__lead { font-size: 14.5px; }
  .hero__stats { gap: 6px 34px; }
  .hero__stats b { font-size: 22px; }

  .pagehead h1 { font-size: 26px; }
  .pagehead--center h1 { font-size: 56px; }

  /* 上段＝画像と買い場を左右に並べ、作品データの表はその下に横いっぱいで置く。
     （表を右に入れると右側だけ倍近く長くなり、画像の下が大きく空いてしまう） */
  .detail {
    grid-template-columns: 330px 1fr; gap: 22px 26px;
    grid-template-areas: "media body" "spec spec";
  }
  .detail--wide { grid-template-columns: 440px 1fr; }
  .detail__media { grid-area: media; max-width: none; margin: 0; }
  .detail__body  { grid-area: body; }
  .detail > .spec { grid-area: spec; margin-top: 0; }
  .detail > .spec th { width: 8em; }
  .detail__title { font-size: 25px; }

  .buybox { max-width: 460px; }   /* 横に間延びさせない */
  .buybox .btn--block { width: auto; min-width: 260px; }

  .reviews { grid-template-columns: 260px 1fr; gap: 26px; }

  .profile { flex-direction: row; align-items: flex-start; text-align: left; gap: 20px; padding: 18px; }
  .profile__photo { width: 108px; height: 108px; }

  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 14px; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

  /* --- 棚を1行の横スクロールに切り替える（折り返しゼロ） --- */
  .rail__track {
    display: flex; gap: 14px;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    /* 影が切れないよう、上下にわずかに逃がす */
    padding: 2px 0;
    margin: -2px 0;
  }
  .rail__track::-webkit-scrollbar { display: none; }
  .rail__track > * {
    flex: 0 0 168px; width: 168px;
    scroll-snap-align: start;
  }
  .rail__strip {
    flex-wrap: nowrap; overflow-x: auto;
    scroll-behavior: smooth; scrollbar-width: none;
  }
  .rail__strip::-webkit-scrollbar { display: none; }
  .rail__strip > li { flex: none; }
  .rail__nav { display: flex; }

  .pickup { margin-bottom: 24px; }
  .pickup__head h2 { font-size: 20px; }
  .pickup__nav { display: flex; }
  .slide { grid-template-columns: 300px 1fr; min-height: 290px; }
  .slide__note { padding: 22px 26px 20px 34px; }
  .slide__note::before { left: 18px; }
  .slide__title { font-size: calc(22px * var(--hand-scale, 1)); margin-bottom: 10px; }
  .slide__text  { font-size: calc(16.5px * var(--hand-scale, 1)); line-height: 32px;
    background-image: repeating-linear-gradient(
      to bottom, transparent 0, transparent 31px, var(--rule) 31px, var(--rule) 32px); }
  .slide__code { font-size: 11.5px; margin-bottom: 6px; }

  .footer__inner { padding: 30px 20px 22px; }
}

/* --- 広い画面 --- */
@media (min-width: 1040px) {
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  /* 端が少しだけ切れるようにして「まだ右に続く」と分かるようにする */
  .rail__track > * { flex-basis: 176px; width: 176px; }
  .rail__nav { top: 124px; }
}

/* ============================================================
   印刷
   ============================================================ */
@media print {
  .header, .tabbar, .buybar, .footer, .searchpanel, .notepanel { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
}

/* 購入ボタンの中に出す「どこで買えるか」（ビデオ／DVD通販 など） */
.btn__where {
  display: block;
  margin-top: 2px;
  font-size: .72rem;
  font-weight: 400;
  opacity: .82;
}

/* 単品では売っておらず、見放題でのみ観られる作品の表示 */
.price--sub { font-size: 1.1rem; }
.price__note {
  display: inline-block;
  margin-left: .5em;
  font-size: .8rem;
  opacity: .75;
}
