/* ICHIROKU GUIDE CLIPS 試作 — 配色・寸法は 00_設計/02_画面構成・動き.md §2（メルマガ v11 の実測値）に合わせる */
:root {
  --white: #ffffff;
  --kinari: #faf8f2;
  --ink: #111111;
  --body: #333333;
  --sub: #6b6b6b;
  --yellow: #ffe600;
  --danger: #c62828;
  /* ピンクはいいね周辺だけで使う */
  --pink: #ff5fa2;
  --pink-light: #ffa3cb;
  --pink-deep: #e0337f;
  --font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --page-max: 1040px;
  --gap-block: 56px;
  --pad: 24px;
  --shadow: 3px;
  /* 動きの基準（動き参考の実測：決まるまで 0.1〜0.45 秒、行き過ぎて戻る） */
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --t-press: 80ms;
  --t-release: 220ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: transparent;
  color: var(--body);
  font-family: var(--font);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: .05em;
  -webkit-tap-highlight-color: transparent;
}
/* 和紙の質感：ごく薄い繊維模様（SVG ノイズ）。確認用パネルで ON/OFF 比較 */
/* v8：背景は表示画面に固定した柔らかいピンクのグラデーション（参考 3：左上 #FCEFEF → 右下 #FFDEE9）。
   background-attachment: fixed はスマートフォンで重く・ちらつくため、固定配置の層を本文の下に敷く */
html { background: #fde8ee; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(135deg, #fcefef 0%, #fde7ec 48%, #ffdee9 100%);
  transform: translateZ(0);
}
/* 和紙の質感：ごく薄く、同じく固定の層に重ねる（確認用パネルで ON/OFF） */
body.paper::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9 .06' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .5 0 0 0 0 .4 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  transform: translateZ(0);
}
button, input, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 6px var(--yellow); }

/* ---------- 試作の表示 ---------- */
.proto-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 6px 16px; background: var(--ink); color: var(--white);
  font-size: 12px; line-height: 1.5; letter-spacing: .03em;
}
.proto-tag { flex: none; background: var(--yellow); color: var(--ink); font-weight: 700; padding: 0 8px; white-space: nowrap; }
.proto-text { flex: 1 1 260px; }
.proto-open { background: none; border: 1px solid var(--white); color: var(--white); font-size: 12px; padding: 2px 10px; }
.proto-panel {
  position: fixed; right: 16px; bottom: 16px; z-index: 50; width: min(360px, calc(100vw - 32px));
  background: var(--white); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 16px;
  font-size: 14px; line-height: 1.6;
}
.proto-panel-title { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--ink); }
.proto-switch { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
.proto-switch input { margin-top: 5px; accent-color: var(--ink); }
.proto-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.proto-actions .btn { min-height: 40px; font-size: 13px; padding: 0 12px; }

/* ---------- ヘッダー ---------- */
.site-header {
  max-width: var(--page-max); margin: 0 auto; padding: 20px var(--pad) 14px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.eyebrow { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: .08em; }
.series { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: .16em; }

/* ---------- 動画 ---------- */
.page { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--pad); }
.player {
  position: relative; aspect-ratio: 16 / 9; background: var(--ink);
  border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink);
}
.player video { display: block; width: 100%; height: 100%; background: var(--ink); }
/* 再生ボタン：ポスターのタイトル文字に重ならないよう、何も描かれていない左上に置く（メルマガの「動画を見る」ボタンと同じ作り） */
.big-play {
  position: absolute; left: 5%; top: 9%; padding: 0; border: none; background: none;
}
.big-play-disc {
  display: inline-flex; align-items: center; gap: 10px; height: 60px; padding: 0 26px 0 18px;
  background: var(--yellow); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: .08em;
  transition: transform var(--t-release) var(--ease-bounce), box-shadow var(--t-release) var(--ease-out);
}
.big-play svg { width: 30px; height: 30px; fill: var(--ink); }
.big-play:hover .big-play-disc { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.big-play.is-pressed .big-play-disc,
.big-play.is-holding .big-play-disc { transform: translate(3px, 3px) scale(.95, .9); box-shadow: 0 0 0 var(--ink); transition-duration: var(--t-press); }
/* 押したあと再生が始まるまでは、へこんだまま待つ */
.big-play.is-holding { pointer-events: none; }
/* M2：押したあと、丸がふくらんで消える */
.big-play.is-leaving { pointer-events: none; }
.big-play.is-leaving .big-play-disc { animation: disc-burst 260ms var(--ease-out) forwards; }
@keyframes disc-burst {
  0% { transform: scale(.94); opacity: 1; }
  45% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}
/* M10：読み込み中（黄色い棒が上下） */
.loading { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: none; gap: 6px; }
.loading.is-on { display: flex; }
.loading i { width: 8px; height: 28px; background: var(--yellow); border: 2px solid var(--ink); animation: bar 900ms var(--ease-out) infinite; }
.loading i:nth-child(2) { animation-delay: 120ms; }
.loading i:nth-child(3) { animation-delay: 240ms; }
@keyframes bar { 0%, 100% { transform: scaleY(.45); } 40% { transform: scaleY(1); } }

/* ---------- 操作帯 ---------- */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--ink);
}
/* 再生の操作（v3）：再生状態を表す棒のボタン ＋ 速度 */
.controls { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.eq-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 12px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--white); color: var(--ink);
  font-weight: 700; font-size: 15px; box-shadow: var(--shadow) var(--shadow) 0 var(--ink);
}
.eq-btn:hover { background: var(--kinari); }
.eq-label { min-width: 4.2em; text-align: left; }
/* 棒：再生中だけ、棒ごとに高さとタイミングをずらして上下し続ける（イコライザー風。音声とは連動しない） */
.eq { display: inline-flex; align-items: center; gap: 2px; height: 24px; }
.eq i {
  display: block; width: 2.5px; height: 24px; border-radius: 2px; background: var(--ink);
  transform: scaleY(.3); transform-origin: center; transition: transform 220ms var(--ease-out);
  animation: eq var(--d) ease-in-out var(--delay) infinite alternate; animation-play-state: paused;
}
.eq i:nth-child(1) { --d: 520ms; --delay: -120ms; --lo: .25; --hi: .7; }
.eq i:nth-child(2) { --d: 380ms; --delay: -300ms; --lo: .35; --hi: 1; }
.eq i:nth-child(3) { --d: 610ms; --delay: -40ms;  --lo: .2;  --hi: .85; }
.eq i:nth-child(4) { --d: 440ms; --delay: -260ms; --lo: .4;  --hi: .95; }
.eq i:nth-child(5) { --d: 560ms; --delay: -480ms; --lo: .22; --hi: .75; }
.eq i:nth-child(6) { --d: 350ms; --delay: -90ms;  --lo: .3;  --hi: .9; }
.eq i:nth-child(7) { --d: 490ms; --delay: -210ms; --lo: .2;  --hi: .6; }
@keyframes eq {
  0% { transform: scaleY(var(--lo)); }
  55% { transform: scaleY(var(--hi)); }
  100% { transform: scaleY(calc(var(--lo) + .15)); }
}
/* 再生中：動く／読み込み待ち：その場で止まる／一時停止・再生前・終了：短い棒にそろって止まる */
.eq-btn[data-state="playing"] .eq i { animation-play-state: running; }
.eq-btn[data-state="waiting"] .eq i { animation-play-state: paused; opacity: .55; }
.eq-btn[data-state="idle"] .eq i, .eq-btn[data-state="paused"] .eq i, .eq-btn[data-state="ended"] .eq i { animation: none; transform: scaleY(.3); }
/* 静止アイコン：動きを減らす設定のときだけ棒の代わりに使う */
.eq-icon { display: none; width: 20px; height: 20px; fill: var(--ink); }

/* 再生速度：横長の丸い枠の中を、丸い札が選んだ倍率へ滑る（動き参考 左下のトグルの応用） */
.speed { display: flex; align-items: center; gap: 12px; }
.speed-now { display: flex; align-items: center; gap: 8px; margin: 0; white-space: nowrap; }
.speed-label { font-size: 13px; font-weight: 700; color: var(--ink); }
.speed-value { display: inline-flex; align-items: baseline; min-width: 3.4em; color: var(--ink); }
.speed-value .num { font-size: 18px; }
.speed-unit { font-size: 13px; font-weight: 700; margin-left: 1px; }
.speed-track {
  position: relative; display: flex; padding: 3px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--white);
}
.speed-btn {
  position: relative; z-index: 1; min-width: 50px; height: 36px; padding: 0 8px;
  border: none; border-radius: 999px; background: none;
  font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: .02em;
  transition: transform var(--t-release) var(--ease-bounce);
}
.speed-btn:active { transform: scale(.92); }
.speed-btn[aria-pressed="true"] { cursor: default; }
/* 丸い札：進む側の端が先に動き、後ろの端が追いつく（伸びて縮む） */
.speed-ink {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; right: 100%;
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px;
  transition: left 260ms var(--ease-bounce), right 260ms var(--ease-bounce);
}

.stats { display: flex; align-items: center; gap: 16px; }
.plays { margin: 0; font-size: 14px; color: var(--ink); white-space: nowrap; }
.num { display: inline-block; min-width: 1ch; font-weight: 700; font-size: 18px; color: var(--ink); text-align: center; font-variant-numeric: tabular-nums; }
/* 数字の入れ替え */
.roll.is-rolling { animation: roll-in 260ms var(--ease-bounce); }
@keyframes roll-in { 0% { transform: translateY(70%); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ---------- ボタン共通（M3：紙がへこむ） ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 2px solid var(--ink); background: var(--white);
  color: var(--ink); font-weight: 700; font-size: 16px; text-decoration: none; letter-spacing: .06em;
  box-shadow: var(--shadow) var(--shadow) 0 var(--ink);
}
.btn-primary { background: var(--yellow); }
.btn-danger { background: var(--ink); color: var(--white); }
.press {
  transition: transform var(--t-release) var(--ease-bounce), box-shadow var(--t-release) var(--ease-out), background-color 120ms;
  touch-action: manipulation;
}
.press.is-pressed {
  transform: translate(var(--shadow), var(--shadow)) scale(.98, .94);
  box-shadow: 0 0 0 var(--ink);
  transition-duration: var(--t-press);
}
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
/* 受け付けられなかったとき：小さく首を振る（入力エラー・連投制限） */
.is-shake { animation: shake 320ms var(--ease-out); }
@keyframes shake { 20% { translate: -5px 0; } 40% { translate: 4px 0; } 60% { translate: -3px 0; } 80% { translate: 2px 0; } 100% { translate: 0 0; } }

/* 投稿ボタン：成功したら一瞬チェック表示 */
.submit { position: relative; min-width: 9.5em; }
.submit-done { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 15px; opacity: 0; transform: scale(.6); pointer-events: none; }
.submit-done svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; }
.submit.is-done .submit-label { opacity: 0; }
.submit.is-done .submit-done { opacity: 1; transform: none; transition: transform 280ms var(--ease-bounce), opacity 80ms; }
.submit.is-done .submit-done svg { animation: check 300ms var(--ease-out) 80ms forwards; }
.submit-label { transition: opacity 120ms; }
@keyframes check { to { stroke-dashoffset: 0; } }

/* いいね */
.like {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 10px;
  border: 2px solid var(--ink); background: var(--white); color: var(--ink);
  font-weight: 700; font-size: 15px; box-shadow: var(--shadow) var(--shadow) 0 var(--ink); position: relative;
}
.like-icon { display: grid; place-items: center; width: 28px; height: 28px; }
.like-icon svg { width: 26px; height: 26px; fill: var(--white); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; transition: fill 120ms; }
.like.is-pop .like-icon svg { fill: var(--pink); }
/* M4：弾む */
.like.is-pop .like-icon { animation: like-pop 520ms var(--ease-out); }
@keyframes like-pop {
  0% { transform: scale(1); }
  18% { transform: scale(.78) rotate(-8deg); }
  45% { transform: scale(1.38) rotate(6deg); }
  70% { transform: scale(.94) rotate(-2deg); }
  100% { transform: scale(1) rotate(0); }
}
/* M5：取り消し（しぼんで戻る） */
.like.is-unpop .like-icon { animation: like-unpop 320ms var(--ease-out); }
@keyframes like-unpop { 0% { transform: scale(1); } 40% { transform: scale(.6) translateY(2px); } 100% { transform: scale(1); } }
/* 演出用の層：画面全体に重ねるが、クリックやタップは下へ素通しする */
.fx { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
/* いいね（v2）：押した位置から大小のハートが左右に揺れながら昇って消える */
.heart {
  position: absolute; left: 0; top: 0; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  animation: heart-rise var(--dur) cubic-bezier(.3, .7, .4, 1) var(--delay) both;
}
.heart svg { display: block; width: 100%; height: 100%; fill: var(--pink); stroke: var(--pink-deep); stroke-width: 1.6; stroke-linejoin: round; }
.heart.is-light svg { fill: var(--pink-light); stroke: var(--pink); }
/* v8：10 回ごとの大きいハート（通常の 2〜3 倍）。一度小さくためてから弾み、少し上がって消える。押しても素通し */
.heart-big {
  position: absolute; left: 0; top: 0; width: 76px; height: 76px; margin: -38px 0 0 -38px; pointer-events: none;
  animation: heart-big 1400ms cubic-bezier(.3, .7, .3, 1) both;
}
.heart-big.is-quick { animation-duration: 700ms; }
.heart-big svg { display: block; width: 100%; height: 100%; fill: var(--pink); stroke: var(--pink-deep); stroke-width: 1.4; stroke-linejoin: round; }
.heart-big-shine { position: absolute; left: 22%; top: 22%; width: 22%; height: 16%; border-radius: 50%; background: rgb(255 255 255 / .75); transform: rotate(-30deg); z-index: 1; }
@keyframes heart-big {
  0% { transform: translateY(0) scale(.2); opacity: 0; }
  14% { transform: translateY(calc(var(--rise, 86px) * -.07)) scale(.72); opacity: 1; }
  28% { transform: translateY(calc(var(--rise, 86px) * -.05)) scale(.56); }          /* ためる */
  46% { transform: translateY(calc(var(--rise, 86px) * -.21)) scale(1.28); }        /* ぽんっ */
  58% { transform: translateY(calc(var(--rise, 86px) * -.28)) scale(.94); }
  68% { transform: translateY(calc(var(--rise, 86px) * -.35)) scale(1.04); }
  80% { transform: translateY(calc(var(--rise, 86px) * -.53)) scale(1); opacity: 1; }
  100% { transform: translateY(calc(var(--rise, 86px) * -1)) scale(.96); opacity: 0; }
}
/* 動きを減らす設定：節目はボタンの色を短く変えて伝える */
.like.is-milestone { background: var(--pink-light); box-shadow: 0 0 0 4px var(--pink), var(--shadow) var(--shadow) 0 var(--ink); }
.like.is-milestone .like-icon svg { fill: var(--pink-deep); }
.heart.is-deep svg { fill: var(--pink-deep); stroke: none; }
.heart > span { display: block; width: 100%; height: 100%; animation: heart-sway var(--dur) ease-in-out var(--delay) both; }
@keyframes heart-rise {
  0% { transform: translate(0, 0) scale(.2); opacity: 0; }
  12% { transform: translate(calc(var(--dx) * .15), -14px) scale(1.15); opacity: 1; }
  24% { transform: translate(calc(var(--dx) * .3), -26px) scale(.95); }
  70% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--rise)) scale(.8); opacity: 0; }
}
@keyframes heart-sway {
  0% { transform: rotate(0); }
  30% { transform: translateX(calc(var(--sway) * 1px)) rotate(calc(var(--sway) * 1.2deg)); }
  60% { transform: translateX(calc(var(--sway) * -1px)) rotate(calc(var(--sway) * -1.2deg)); }
  100% { transform: translateX(calc(var(--sway) * .5px)) rotate(0); }
}

/* ---------- タイトル ---------- */
.title-block { margin: 26px 0 0; }
.title { margin: 0; font-weight: 900; font-size: 28px; line-height: 1.4; color: var(--ink); letter-spacing: .04em; }
/* 黄色の斜線の下線（メルマガと同じ 135° の縞・高さ 7px） */
.title-text {
  background: repeating-linear-gradient(135deg, var(--yellow) 0 3px, transparent 3px 6px) no-repeat 0 100% / 100% 7px;
  padding-bottom: 6px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.sp-br { display: none; }
.meta { margin: 6px 0 0; font-size: 13px; color: var(--sub); }
/* 最後まで見たとき：プレーヤーの外、操作列の下の区切り線の上に札として小さく現れる（ほかの配置は動かさない） */
.bar { position: relative; }
.thanks {
  position: absolute; right: 0; bottom: 0; translate: 0 50%; z-index: 2; margin: 0;
  padding: 0 10px; background: var(--yellow); border: 1.5px solid var(--ink);
  color: var(--ink); font-weight: 700; font-size: 12px; line-height: 1.9; white-space: nowrap;
}
.thanks.is-in { animation: thanks-in 420ms var(--ease-bounce); }
@keyframes thanks-in { 0% { transform: translateY(6px) scale(.6) rotate(-4deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ---------- 下段 ---------- */
.lower {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 48px;
  margin-top: var(--gap-block); padding-bottom: var(--gap-block);
}
body.layout-single .lower { grid-template-columns: minmax(0, 1fr); }
body.layout-single .col-side { max-width: 560px; }

/* 見出し：黒 3px の下線（画面に入ると左から引かれる） */
.sec-title {
  position: relative; margin: 0 0 20px; padding-bottom: 10px;
  font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1.5;
}
.sec-title::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--ink);
  transform-origin: left center;
}
.sec-count { font-size: 15px; font-weight: 500; color: var(--sub); }

/* この動画でわかること */
.learn { margin-bottom: var(--gap-block); }
/* ---------- 復習ノート（v13）：POINT 01〜03 を 1 ページずつめくる。めくり・言葉の整列は js/note.js ---------- */
/* 静止時のあしらいはサイトの既存部品に合わせる（2026-11-05 調整）：
   線＝黒 2px（連絡先カード・ボタン・POINT ラベルと同じ）、影＝黒・ぼかしなし・右下へ 6px（連絡先カード .help・動画の枠と同じ）、
   角＝四角（再生操作以外の部品と同じ）、紙面＝生成り（.help-body と同じ）・余白 18px 20px 20px（.help-body と同じ）。
   紙の重なり・綴じ線・折れた角は使わない。本らしさは、めくりの陰影と言葉の整列で出す */
.note { --paper: var(--kinari); --paper-back: #f1ebdc; --note-pad: 18px 20px 20px; position: relative; }
/* 付箋のタブ：下端を紙の上辺（2px）にぴったり重ねる。
   未選択＝白・黒の下辺ありの閉じた形（下辺が紙の上辺と重なって 1 本の線）。
   選択中＝黄色・下辺なしで、紙の上辺をそのタブの直下だけ隠して紙面につながる（側辺は紙の上辺まで途切れずに下りる） */
.note-tabs { display: flex; align-items: flex-end; gap: 6px; padding-left: 14px; position: relative; z-index: 2; }
.note-tab {
  flex: 0 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 5px;
  height: 32px; margin-bottom: -2px; padding: 0 12px; white-space: nowrap;
  border: 2px solid var(--ink); border-radius: 0;
  background: var(--white); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; line-height: 1; letter-spacing: .04em;
  transition: height 200ms var(--ease-out), background-color 160ms;
}
.note-tab-no { font-size: 12px; letter-spacing: .02em; }
.note-tab[aria-selected="true"] { height: 38px; padding-bottom: 2px; border-bottom-width: 0; background: var(--yellow); }
.note-tab:focus-visible { outline-offset: 2px; }
@media (hover: hover) { .note-tab[aria-selected="false"]:hover { height: 34px; } }

/* ノートの外枠：連絡先カードと同じ、黒・ぼかしなしの 6px の影 */
.note-book { position: relative; z-index: 1; box-shadow: 6px 6px 0 var(--ink); }
/* 3 ページを同じ場所に重ねる：ノートの高さはいちばん長いページで決まり、めくっても跳ばない */
.note-pages { display: grid; position: relative; overflow: clip; touch-action: pan-y; }
.note-page {
  grid-area: 1 / 1; position: relative; padding: var(--note-pad);
  background: var(--paper); border: 2px solid var(--ink);
}
.note-page:not(.is-current) { visibility: hidden; }
.note-page:focus-visible { outline: 3px solid var(--ink); outline-offset: -6px; }
.note-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.note-head .point { box-shadow: 3px 3px 0 var(--ink); }
.note-title { margin: 0; font-size: 19px; font-weight: 700; color: var(--ink); line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
/* 見出しの罫線：言葉がそろった後に左から引かれる */
.note-rule { display: block; height: 0; margin: 8px 0 12px; border-top: 2px solid var(--ink); transform-origin: left center; }
.note-body { margin: 0; padding: 0 0 0 16px; list-style: none; }
.note-body li { position: relative; margin: 0 0 10px; font-size: 15.5px; line-height: 1.75; color: var(--ink); word-break: keep-all; overflow-wrap: anywhere; }
.note-body li:last-child { margin-bottom: 0; }
.note-body li::before { content: ""; position: absolute; left: -17px; top: .6em; width: 8px; height: 8px; background: var(--yellow); border: 1.5px solid var(--ink); border-radius: 50%; }
/* 折り返しは文節の切れ目（note.js が <wbr> を入れる）＋ keep-all。収まらない長い語だけ overflow-wrap で折る */
/* 要点（黒）と補足（灰色・少し小さく、次の行） */
.note-sub { display: block; margin-top: 2px; font-size: 14px; line-height: 1.7; color: #555; }
.note-body strong {
  color: var(--ink); font-weight: 700;
  background: linear-gradient(transparent 62%, rgb(255 230 0 / .75) 62%) no-repeat 0 0 / 100% 100%;
}
/* 言葉の整列中だけ使う区切り（終わると元の文章に戻す。インラインのまま＝折り返しは通常の文章と同じ） */
.nw { position: relative; }

/* めくり：裏面（生成りの紙）・折り目の陰影・下の紙に落ちる影 */
.note-turn-front { position: absolute; inset: 0; z-index: 3; pointer-events: none; visibility: visible !important; }
.note-turn-under { position: absolute; inset: 0; z-index: 0; pointer-events: none; visibility: visible !important; }
.note-leaf-wrap { position: absolute; inset: 0; z-index: 4; pointer-events: none; filter: drop-shadow(-3px 2px 5px rgb(60 20 30 / .18)); }
.note-leaf {
  position: absolute; left: 0; top: 0; overflow: hidden; transform-origin: 0 0;
  border: 2px solid var(--ink); background-color: var(--paper-back);
}
/* 折り目のそばは少し暗く、その先に光が当たって紙がたわんで見える */
.note-leaf-shade, .note-cast { position: absolute; left: 0; top: 0; height: 300%; transform-origin: 0 0; pointer-events: none; }
.note-leaf-shade { width: 120%; background: linear-gradient(to right, rgb(60 30 20 / .16), rgb(60 30 20 / .04) 5%, rgb(255 255 255 / .65) 13%, rgb(255 255 255 / 0) 30%, rgb(60 30 20 / .06) 100%); }
.note-cast { z-index: 2; width: 34px; background: linear-gradient(to right, rgb(60 20 30 / .22), rgb(60 20 30 / 0)); }
/* 初回の整列の前：言葉はまだ紙の上に出ていない（画面に入ると浮いた位置から集まる） */
.note.is-pre .note-page.is-current :is(.note-head, .note-title, .note-rule, .note-body) { opacity: 0; }

/* 前へ・現在位置・次へ */
.note-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
/* 前へ・次へ：既存のボタン（.btn .btn-sub。白・黒 2px・3px の影・四角・押すとへこむ）を使い、連絡先のボタンと同じ高さ・文字の大きさにそろえる */
.note-arrow { gap: 4px; min-height: 44px; padding: 0 16px; font-size: 15px; }
.note-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.note-arrow.is-prev { padding-left: 10px; }
.note-arrow.is-next { padding-right: 10px; }
/* 押せないとき：既存の .btn:disabled と同じ（薄く・影なし）。フォーカスは残す */
.note-arrow[aria-disabled="true"], .note-arrow[aria-disabled="true"].is-pressed { opacity: .45; box-shadow: none; transform: none; cursor: default; }
@media (hover: hover) { .note-arrow[aria-disabled="false"]:hover { background: var(--kinari); } }
.note-count { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.note-count b { font-size: 20px; }
.note-count-sep { margin: 0 6px; color: var(--sub); }
/* 内容のアイコン（メール・警告画面・ファイル） */
.point-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; }
.point-icon svg { width: 32px; height: 32px; fill: var(--yellow); stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; rotate: -9deg; }
.point-icon .dot { fill: var(--ink); stroke: none; }
.point { display: inline-flex; flex: none; border: 2px solid var(--ink); position: relative; background: var(--white); }
.point-tag { background: var(--yellow); padding: 3px 12px; font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: .08em; border-right: 2px solid var(--ink); }
.point-no { padding: 0 10px; font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.6; }
.title, .sec-title, .help-head { word-break: auto-phrase; }

/* コメント */
.comment-form { margin: 0 0 28px; }
.form-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.comment-form textarea {
  display: block; width: 100%; min-height: 96px; padding: 12px 14px; resize: vertical;
  border: 2px solid var(--ink); background: var(--white); line-height: 1.7; font-size: 16px;
}
.comment-form textarea:focus-visible { outline: none; }
/* 入力欄を選ぶと、黒い枠が太くなり、下に黄色の線が左からすっと描かれる。入力中は止まったまま */
.field { position: relative; }
.comment-form textarea { transition: box-shadow 240ms var(--ease-out); }
.field:focus-within textarea { box-shadow: inset 0 0 0 1px var(--ink); }
.field-line {
  position: absolute; left: 0; right: 0; bottom: -7px; height: 5px; background: var(--yellow); border: 1.5px solid var(--ink);
  transform: scaleX(0); transform-origin: left center; transition: transform 320ms var(--ease-out);
}
.field:focus-within .field-line { transform: scaleX(1); }
.form-note { margin: 8px 0 0; font-size: 13px; color: var(--sub); line-height: 1.6; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.counter { font-size: 13px; color: var(--sub); }
.counter.is-over { color: var(--danger); font-weight: 700; }
/* 残り 20 文字から黄色のマーカーで知らせる */
.counter.is-near { color: var(--ink); font-weight: 700; background: linear-gradient(transparent 55%, var(--yellow) 55%); }
.form-msg { min-height: 1.6em; margin: 8px 0 0; font-size: 14px; line-height: 1.6; }
.form-msg.is-error { color: var(--danger); font-weight: 700; }
.form-msg.is-ok { color: var(--ink); }

.comment-list { list-style: none; margin: 0; padding: 0; }
.comment {
  position: relative; padding: 14px 16px; margin-bottom: 12px;
  background: var(--white); border: 1px solid var(--ink);
}
.comment-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--body); line-height: 1.75; }
.comment-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--sub); }
.comment-admin { min-height: 34px; padding: 0 12px; font-size: 13px; box-shadow: 2px 2px 0 var(--ink); }
/* M8：新しいコメントの札が軽く弾んで置かれる */
.comment.is-new { animation: drop 460ms var(--ease-out); }
@keyframes drop {
  0% { transform: translateY(-14px) scale(.94) rotate(-1.5deg); opacity: 0; }
  45% { transform: translateY(3px) scale(1.02) rotate(.4deg); opacity: 1; }
  72% { transform: translateY(-1px) scale(.995); }
  100% { transform: none; opacity: 1; }
}
/* 削除：札が横へ外れてから詰まる／復元：同じ弾みで戻る */
.comment.is-leaving { animation: leave 240ms var(--ease-out) forwards; }
@keyframes leave { to { transform: translateX(24px) rotate(1.5deg); opacity: 0; } }
.comment-empty { color: var(--sub); font-size: 14px; }
.more { margin-top: 4px; }
.btn-sub { background: var(--white); }

.deleted { margin-top: 32px; padding: 16px; border: 2px dashed var(--ink); background: var(--white); }
.deleted-title { margin: 0 0 12px; font-size: 14px; font-weight: 700; color: var(--ink); }
.deleted-list .comment { background: var(--kinari); }
.deleted-list .comment-body { color: var(--sub); }

/* 連絡先（メルマガ「動画で詳しく紹介」枠と同じ作り） */
.help { border: 2px solid var(--ink); background: var(--white); box-shadow: 6px 6px 0 var(--ink); }
.help-head {
  margin: 0; padding: 8px 16px; background: var(--yellow); border-bottom: 2px solid var(--ink);
  font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.5;
}
.help-body { padding: 18px 20px 20px; background: var(--kinari); }
.help-who { margin: 0 0 14px; font-weight: 700; color: var(--ink); }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.btn-contact {
  width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 6px 12px; padding: 8px 14px; min-height: 52px;
  letter-spacing: .02em; text-align: left;
}
.contact-kind {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 4.9em;
  padding: 1px 8px 1px 6px; background: var(--yellow); border: 1.5px solid var(--ink); font-size: 13px;
}
/* アイコン：ホバーで小さく反応（メールはふたが開く、電話は小さく震える）、押すと縮む */
.contact-icon { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 160ms var(--ease-bounce); }
.contact-icon .flap { transform-origin: 12px 7px; transition: transform 200ms var(--ease-bounce); }
@media (hover: hover) {
  .btn-contact.is-mail:hover .contact-icon { transform: translateY(-2px); }
  .btn-contact.is-mail:hover .flap { transform: scaleY(-.55); }
  .btn-contact.is-tel:hover .contact-icon { animation: ring-shake 420ms var(--ease-out); }
}
@keyframes ring-shake { 15% { transform: rotate(-14deg); } 35% { transform: rotate(12deg); } 55% { transform: rotate(-8deg); } 75% { transform: rotate(5deg); } 100% { transform: rotate(0); } }
.btn-contact.is-pressed .contact-icon { transform: scale(.8); animation: none; }
.contact-value { font-size: 15px; line-height: 1.4; white-space: nowrap; }
/* メールアドレスはひと続きで表示。幅が足りないときはラベルの下の行へ丸ごと送る */
.contact-value.is-mail-addr { font-size: 14.5px; letter-spacing: .01em; }

.site-footer { border-top: 1px solid var(--ink); padding-bottom: 88px; } /* 左下に固定したハチローくん（高さ 約 79px＋余白）より上まで、末尾の文字をスクロールできる */
.site-footer p { max-width: var(--page-max); margin: 0 auto; padding: 16px var(--pad) 32px; font-size: 13px; color: var(--body); }
/* 管理者としてログインしているときだけ表示 */
.site-footer .admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 0; font-weight: 700; color: var(--ink); }
.site-footer .admin-bar[hidden] { display: none; }
.admin-logout { min-height: 34px; padding: 0 12px; font-size: 13px; box-shadow: 2px 2px 0 var(--ink); }

/* 削除確認（M9） */
.confirm { width: min(440px, calc(100vw - 32px)); padding: 0; border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); background: var(--white); color: var(--body); }
.confirm::backdrop { background: rgb(17 17 17 / .45); }
.confirm[open] { animation: open 180ms var(--ease-out); }
@keyframes open { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.confirm-inner { padding: 20px; }
.confirm-title { margin: 0 0 12px; font-size: 18px; font-weight: 700; color: var(--ink); }
.confirm-quote { margin: 0; padding: 10px 12px; background: var(--kinari); border-left: 4px solid var(--yellow); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 40vh; overflow: auto; }
.confirm-note { font-size: 13px; color: var(--sub); }
.confirm-actions { display: flex; justify-content: flex-end; gap: 12px; }

/* ---------- 登場の動き（M1・M7・見出し線） ---------- */
/* M1：ページを開いた直後に 1 回だけ。下から持ち上がる */
body.is-intro .rise { opacity: 0; transform: translateY(12px); }
.rise { transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-bounce); }
.stage .player { transition-delay: 60ms; }
.stage .bar { transition-delay: 120ms; }
.stage .title-block { transition-delay: 180ms; }
/* タイトルの黄色い斜線が左から伸びる */
body.is-intro .title-text { background-size: 0% 7px; }
.title-text { transition: background-size 420ms var(--ease-out) 380ms; }

/* 見出しの下線：画面に入ったら左から引く（動き参考の「線が描かれる」の応用） */
.reveal-line:not(.is-shown)::after { transform: scaleX(0); }
.reveal-line::after { transition: transform 380ms var(--ease-out); }
/* M7：POINT ラベルが一瞬で現れ、少し傾いてから貼られる。後ろにずらし影が出る（動き参考の「残像」の応用） */
.reveal-pop:not(.is-shown) { opacity: 0; transform: scale(.4) rotate(-6deg); box-shadow: 0 0 0 var(--ink); }
.reveal-pop { transition: opacity 120ms linear, transform 300ms var(--ease-bounce), box-shadow 220ms var(--ease-out) 200ms; box-shadow: 3px 3px 0 var(--ink); }

/* ---------- 動画再生中：自動で動く周囲の装飾だけを止める（いいね・速度など操作への反応は動かす。再生状態の棒は例外として動かす） ---------- */
body.is-playing .reveal-line::after,
body.is-playing .reveal-pop { transition: none; }

/* ---------- 動きを減らす設定 ---------- */
/* 移動・弾み・ハート放出をやめ、色と表示の変化だけで結果を伝える */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .fx { display: none; }
  .press.is-pressed, .big-play.is-holding .big-play-disc, .speed-btn:active { transform: none; }
  .press.is-pressed { background-color: var(--kinari); }
  .eq { display: none; }
  .eq-btn:not([data-state="playing"]):not([data-state="waiting"]) .eq-icon-play,
  .eq-btn[data-state="playing"] .eq-icon-pause, .eq-btn[data-state="waiting"] .eq-icon-pause { display: block; }
}
body.force-reduce *, body.force-reduce *::before, body.force-reduce *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
body.force-reduce .fx { display: none; }
body.force-reduce .press.is-pressed, body.force-reduce .big-play.is-holding .big-play-disc, body.force-reduce .speed-btn:active { transform: none; }
body.force-reduce .press.is-pressed { background-color: var(--kinari); }
body.force-reduce .eq { display: none; }
body.force-reduce .eq-btn:not([data-state="playing"]):not([data-state="waiting"]) .eq-icon-play,
body.force-reduce .eq-btn[data-state="playing"] .eq-icon-pause, body.force-reduce .eq-btn[data-state="waiting"] .eq-icon-pause { display: block; }

/* ---------- スマートフォン ---------- */
@media (max-width: 767px) {
  :root { --gap-block: 40px; --pad: 16px; }
  .site-header { padding: 14px var(--pad) 10px; }
  .eyebrow, .series { font-size: 12px; }
  .page { padding: 0; }
  .player { border-left: none; border-right: none; box-shadow: 0 6px 0 var(--ink); }
  .bar, .title-block, .lower { padding-left: var(--pad); padding-right: var(--pad); }
  .bar { flex-direction: column-reverse; align-items: stretch; gap: 14px; margin-top: 20px; }
  .stats { justify-content: space-between; }
  /* 再生ボタンと「速度・倍率」を 1 段目に、速度の選択肢を 2 段目に横幅いっぱい（指で押しやすく） */
  .controls { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: center; }
  .speed { display: contents; }
  .speed-now { justify-self: end; }
  .speed-track { grid-column: 1 / -1; }
  .thanks { right: var(--pad); }
  .speed-track { width: 100%; }
  .speed-btn { flex: 1; min-width: 0; height: 40px; padding: 0 2px; font-size: 15px; }
  .title { font-size: 22px; }
  .sp-br { display: inline; }
  .lower { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .col-side { margin-top: 8px; }
  .help { box-shadow: 4px 4px 0 var(--ink); }
  .help-body { padding: 16px; }
  .sec-title { font-size: 18px; }
  .note { --note-pad: 16px; }
  .note-book { box-shadow: 4px 4px 0 var(--ink); }
  .note-tabs { padding-left: 8px; gap: 5px; }
  .note-tab { padding: 0 10px; font-size: 13.5px; }
  .note-title { font-size: 17px; }
  .note-body { padding-left: 14px; }
  .note-body li { font-size: 15px; }
  .note-sub { font-size: 13.5px; }
  .point-icon { width: 30px; height: 30px; }
  .point-icon svg { width: 27px; height: 27px; }
  .big-play { left: 4%; top: 8%; }
  .big-play-disc { height: 44px; padding: 0 16px 0 10px; gap: 6px; font-size: 15px; border-width: 2px; box-shadow: 3px 3px 0 var(--ink); }
  .big-play svg { width: 22px; height: 22px; }
  .proto-bar { padding: 5px 12px; gap: 8px; flex-wrap: nowrap; }
  .proto-long { display: none; }
  .proto-text { flex: 1 1 auto; }
  .proto-open { flex: none; }
  .site-header { flex-wrap: nowrap; }
  .series { letter-spacing: .1em; }
}
/* 狭い画面のノート：タブ 3 つが 1 行に収まるよう詰める（文字は 13px 未満にしない） */
@media (max-width: 400px) {
  .note-tabs { padding-left: 4px; gap: 4px; }
  .note-tab { padding: 0 7px; font-size: 13px; gap: 3px; }
  .note-tab-no { font-size: 11px; }
}
@media (max-width: 360px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 0; }
  .eyebrow, .series { font-size: 11px; line-height: 1.7; }
  .speed-btn { font-size: 14px; }
  .point-tag { padding: 3px 8px; font-size: 12px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .lower { grid-template-columns: minmax(0, 1fr); }
  .col-side { max-width: 560px; }
}
