/* ==========================================================
   孤月ユキ。 Profile Site
   ロゴ・キービジュアルに合わせた「黒 × 赤 × 白ふち」のゴシック調
   モチーフ: ベルト / チェーン / 南京錠 / 赤黒ボーダー
   ========================================================== */

:root {
  --bg: #0b090a;
  --bg-2: #141012;
  --ink: #f1eaec;
  --muted: #a99da2;
  --crimson: #a3153f;
  /* 文字色として使うので、--bg / --bg-2 の上で WCAG AA (4.5:1) を満たす明るさにしてある。
     これ以上暗くすると、--bg-2 の上に置く活動履歴の日付が基準を下回る */
  --crimson-hi: #dd4266;
  --rose: #b9506e;
  --white: #f6f0f2;
  --font-jp: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-mincho: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-en: "Cormorant Garamond", "Times New Roman", serif;
  --stripe: repeating-linear-gradient(0deg, var(--crimson) 0 3px, #6d0f2b 3px 6px);
  /* Why not: 細い帯(10px 未満)に --stripe を敷くと 6px 周期が1周期に満たず単色に潰れる。
     見出しの下線やタグラインの下線など、薄い箇所にはこちらを使う */
  --stripe-fine: repeating-linear-gradient(0deg, var(--crimson) 0 2px, #6d0f2b 2px 4px);
  --maxw: 1080px;
  /* テンプレートの土台(style.css)が使う変数を、孤月ユキの深紅と暗い地に合わせる。
     書かないと、拡大表示の前後のボタンなどが、style.css の既定の青になる */
  --accent: var(--crimson);
  --accent-hover: #8a1135;
  --accent-soft: #2a1519;
  --on-accent: #ffffff;
  --surface: var(--bg-2);
  --line: #3a2e33;
  /* KV の地の方眼紙。ヒーローの斜めの面・プロフィールのカード・配信時間の帯に使う。
     文字色は --paper-ink / --paper-muted / --crimson(方眼紙の上で AA を満たす組み合わせ) */
  --paper: #dcd8d9;
  --paper-2: #ebe7e8;
  --paper-ink: #141012;
  --paper-muted: #4f4549;
  --paper-grid: linear-gradient(rgba(20,16,18,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(20,16,18,.1) 1px, transparent 1px);
  --stripe-fine-v: repeating-linear-gradient(90deg, var(--crimson) 0 2px, #6d0f2b 2px 4px);
  --barcode: repeating-linear-gradient(90deg, currentColor 0 3px, transparent 3px 5px, currentColor 5px 6px, transparent 6px 10px, currentColor 10px 14px, transparent 14px 16px, currentColor 16px 17px, transparent 17px 21px, currentColor 21px 23px, transparent 23px 26px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
/* JS があるときはメニューが右下に移り、上に貼り付くものが無いので、節の先頭を画面の上端近くに止める */
html.js { scroll-padding-top: 24px; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: var(--font-jp);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--crimson); color: #fff; }
:focus-visible { outline: 3px solid var(--crimson-hi); outline-offset: 3px; }


/* ---------- メニュー: 右下の南京錠 ---------- */
/* JS が無いときは、開閉の仕掛けが動かないので、上部に貼り付く横並びのメニューにする */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px clamp(14px, 4vw, 32px);
  background: rgba(8,6,7,.92);
  border-bottom: 2px solid #000;
}
.brand {
  font-family: var(--font-en); font-style: italic; font-weight: 600;
  font-size: 1.25rem; text-decoration: none; letter-spacing: .02em; white-space: nowrap;
}
.topbar nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.topbar nav::-webkit-scrollbar { display: none; }
.topbar nav a {
  font-size: .82rem; font-weight: 700; text-decoration: none; white-space: nowrap;
  padding: 4px 12px; border: 2px solid transparent; color: var(--muted);
  transition: color .2s, border-color .2s, background .2s;
}
.topbar nav a:hover { color: #fff; background: #000; border-color: var(--crimson); }
.nav-toggle { display: none; }

/* JS があるときは、右下に南京錠のボタンだけを置く。押すと鍵のツルが外れ、上へ項目が開く(広い画面でも同じ)。
   開閉の仕掛け(.is-open と visibility)は script.js と style.css のまま。style.css は狭い画面でだけ隠すので、
   広い画面でも隠す指定をここに書く */
.js .topbar {
  position: fixed; top: auto; left: auto;
  /* 下は、左下に下げた「menu」の札(12px はみ出す)の下にも、右と同じくらいの余白が残る高さにする */
  right: calc(14px + env(safe-area-inset-right)); bottom: calc(26px + env(safe-area-inset-bottom));
  gap: 12px; padding: 0; background: none; border: 0;
  /* 入れ物は、閉じている間も見えない名前の札の場所を取り、南京錠の左へ広がる。透明でも押下を受け止め、
     下のリンクが押せなくなるので、入れ物の当たり判定は切り、押せるもの(南京錠・名前の札・項目)にだけ戻す。
     項目(nav)は、閉じている間は pointer-events: none、開くと auto(下の .js .topbar nav の指定) */
  pointer-events: none;
}
/* 名前は、開いている間だけ鍵に下げた札として出す。閉じている間は visibility: hidden なので、押下は受け取らない */
.js .topbar .brand {
  padding: 2px 12px; color: #fff; background: #000; border: 2px solid var(--white);
  transform: rotate(-4deg); visibility: hidden; opacity: 0; transition: opacity .2s, visibility .2s;
  pointer-events: auto;
}
.js .topbar.is-open .brand { visibility: visible; opacity: 1; }
.js .nav-toggle {
  display: grid; place-items: center; width: 58px; height: 58px; padding: 0; cursor: pointer;
  color: #d9d9d9; background: #000; border: 2px solid var(--white);
  box-shadow: 4px 4px 0 var(--crimson); transform: rotate(-8deg); transition: background .2s, color .2s;
  pointer-events: auto;
}
.js .topbar.is-open .nav-toggle { color: #fff; background: var(--crimson); }
@media (hover: hover) { .js .nav-toggle:hover { color: #fff; } }
/* 「menu」の札を、左下の角に下げる。ヒーローの南京錠(押すと隠しメッセージが出る)と同じ形なので、
   札が無いと、どちらがメニューか見分けがつかない。開いている間は、名前の札が代わりに出るので隠す */
.js .nav-toggle { position: relative; }
.js .nav-toggle::after {
  content: "menu" / ""; position: absolute; left: -16px; bottom: -12px;
  padding: 0 8px; color: #fff; background: #000; border: 1px solid var(--white);
  font: italic 600 .9rem/1.4 var(--font-en); letter-spacing: .06em; rotate: 12deg;
  transition: opacity .2s;
}
.js .topbar.is-open .nav-toggle::after { opacity: 0; }
/* 南京錠は、棒(本体)と疑似要素(ツルと鍵穴)で描く。ツルは右の根元を軸に、持ち上がって開く */
.nav-toggle-bar {
  position: relative; display: block; width: 26px; height: 20px; margin-top: 10px;
  background: currentColor; border-radius: 3px;
}
.nav-toggle-bar::before {
  content: ""; position: absolute; left: 4px; bottom: 100%; width: 18px; height: 13px; margin-bottom: -2px;
  border: 3.5px solid currentColor; border-bottom: 0; border-radius: 10px 10px 0 0;
  transform-origin: right bottom; transition: transform .25s ease;
}
.nav-toggle-bar::after {
  content: ""; position: absolute; left: 50%; top: 5px; width: 5px; height: 9px; translate: -50% 0;
  background: #000; border-radius: 3px 3px 1px 1px;
}
.topbar.is-open .nav-toggle-bar::before { transform: rotate(30deg); }
.js .topbar.is-open .nav-toggle-bar::after { background: var(--crimson); }

.js .topbar nav {
  position: absolute; top: auto; left: auto; right: 0; bottom: calc(100% + 14px);
  flex-direction: column; gap: 0; min-width: 220px; max-height: calc(100dvh - 120px); overflow-y: auto;
  padding: 6px 16px 10px; background: rgba(8,6,7,.97);
  border: 2px solid var(--white); box-shadow: 6px 6px 0 var(--crimson);
  visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .2s, visibility .2s;
}
.js .topbar.is-open nav { visibility: visible; opacity: 1; pointer-events: auto; }
.js .topbar nav a {
  padding: 12px 4px; font-size: 1rem; color: var(--ink);
  border: 0; border-bottom: 1px solid rgba(255,255,255,.12);
}
.js .topbar nav a:last-child { border-bottom: 0; }
.js .topbar nav a:hover { color: var(--crimson-hi); background: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .topbar nav { transform: translateY(8px); transition: opacity .2s, visibility .2s, transform .25s ease; }
  .js .topbar.is-open nav { transform: none; }
}

/* ---------- hero ---------- */
/* 画面を斜めに、黒い地(名前)と方眼紙(KV の地)に分ける。切り口には赤黒ボーダーの細い帯 */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(40px, 6vw, 72px) 20px clamp(64px, 8vw, 104px);
  --cut: polygon(60% 0, 100% 0, 100% 100%, 44% 100%);
  --cut-edge: polygon(59.2% 0, 60% 0, 44% 100%, 43.2% 100%);
}
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; z-index: -2; }
.hero::before {
  background-color: var(--paper); background-image: var(--paper-grid); background-size: 22px 22px;
  clip-path: var(--cut);
}
.hero::after { background: var(--stripe-fine); clip-path: var(--cut-edge); }
/* 本文(--maxw)より広く取り、名前の側にロゴを大きく置く場所を作る */
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: clamp(28px, 6vw, 72px);
  align-items: center;
}
/* ロゴの右に、キャッチコピーを縦書きの黒い帯で立てる。配信予定の時間帯の札は、ロゴの下に出す */
.hero-text { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 24px clamp(16px, 2.4vw, 28px); }
.logo { margin: 0; }
.tagline { grid-column: 2; grid-row: 1 / span 2; }
/* 画像は絵柄ぴったりに切ってあるので、左端が上下の文字と揃う(margin での補正は不要)。
   原本は _src/fanart/蝶野マヒロ@130_si2/ネームロゴ.png */
.logo img { width: min(100%, 560px); filter: drop-shadow(0 6px 0 rgba(0,0,0,.6)); }
/* ネームロゴを包むボタン(assets/js/play.js が差し込む)。押すと揺れ、5回目でロゴの直後に一言の札が出る。
   幅を .logo いっぱいにして、中の画像の幅(% 指定)が、包む前と同じ基準で決まるようにする。
   スマホで押したときに、ロゴ全体に灰色の四角が重なって見えないよう、タップの強調を消す */
.logo-touch {
  display: block; width: 100%; padding: 0; cursor: pointer; font: inherit; color: inherit;
  background: none; border: 0; -webkit-tap-highlight-color: transparent;
}
/* 鎖で上から吊られている見立てで、上辺の中央を軸に揺らす */
.logo-touch img { transform-origin: 50% 0; }
.logo-reply {
  justify-self: start; margin: 0; padding: 4px 16px;
  color: #fff; background: #000; border: 2px solid var(--white); box-shadow: 4px 4px 0 var(--crimson);
  font: 800 1.15rem/1.5 var(--font-mincho); letter-spacing: .08em; rotate: -2deg;
}
@media (prefers-reduced-motion: no-preference) {
  .logo-touch.is-rattle img { animation: logo-rattle .45s ease; }
  /* 理由はファンマークの一言と同じ(tag-in を並べて残さないと、グリッチの後に札の出る動きがもう一度始まる) */
  .logo-reply { animation: tag-in .4s steps(6) both; }
  .logo-reply.is-glitch { animation: tag-in .4s steps(6) both, head-glitch .5s steps(1); }
}
@keyframes logo-rattle {
  20% { transform: rotate(-2.5deg) translateX(-5px); } 40% { transform: rotate(2deg) translateX(4px); }
  60% { transform: rotate(-1.2deg) translateX(-2px); } 80% { transform: rotate(.5deg); }
}
.tagline { margin: 0; }
.tagline span {
  display: inline-block; background: #000; color: #fff;
  font-family: var(--font-mincho); font-weight: 800;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem); letter-spacing: .2em;
  writing-mode: vertical-rl; padding: .9em .35em;
  border-left: 8px solid transparent; border-image: var(--stripe-fine-v) 1;
}

/* 配信予定の時間帯の札(assets/js/play.js が、枠に入っている間だけ出す)。配信は確定ではないので、
   「LIVE」とは書かず、点滅する点と「会えるかも？」で気配だけ出す */
.maybe-live {
  justify-self: start; display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 18px; text-decoration: none; color: #fff; background: #000;
  border: 2px solid var(--crimson-hi); box-shadow: 5px 5px 0 var(--crimson); transform: rotate(-1.5deg);
  transition: transform .15s, box-shadow .15s;
}
.maybe-live[hidden] { display: none; }
.maybe-live-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--crimson-hi); box-shadow: 0 0 0 4px rgba(221,66,102,.25); }
.maybe-live-text { font-family: var(--font-mincho); font-weight: 800; font-size: 1.2rem; letter-spacing: .06em; }
@media (hover: hover) { .maybe-live:hover { transform: rotate(0deg) translate(-2px, -2px); box-shadow: 7px 7px 0 var(--crimson); } }
@media (prefers-reduced-motion: no-preference) {
  .maybe-live-dot { animation: live-pulse 1.4s ease-in-out infinite; }
}
@keyframes live-pulse { 50% { opacity: .35; box-shadow: 0 0 0 8px rgba(221,66,102,0); } }

/* KV の絵から取った飾り(+++・バーコード・✦)。大きさと位置を揃えず、斜めの両側に散らす */
.deco { position: absolute; z-index: -1; pointer-events: none; user-select: none; line-height: 1; }
.deco-plus { font: 400 clamp(1.4rem, 3vw, 2.2rem) var(--font-en); letter-spacing: .25em; }
.deco-plus-a { top: 9%; left: 5%; color: var(--white); }
.deco-plus-b { bottom: 7%; right: 4%; color: var(--paper-ink); }
.deco-code { height: 34px; background: var(--barcode); }
.deco-code-a { top: 13%; right: 3%; width: 150px; color: var(--paper-ink); }
.deco-code-b { bottom: 11%; left: 6%; width: 110px; height: 26px; color: rgba(246,240,242,.55); }
.deco-star { color: var(--paper-ink); }
/* 三日月は、細い線だけで描く(塗ると KV の絵と競り合う)。外の円と、右上にずらした内の円の交点で切った形 */
.deco-moon {
  top: 5%; left: 17%; width: clamp(150px, 17vw, 240px); aspect-ratio: 1; opacity: .6;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M45.8 10.2A40 40 0 1 0 83.9 71.2 36 36 0 0 1 45.8 10.2Z' fill='none' stroke='%23f6f0f2' stroke-width='1.1' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.deco-star-a { bottom: 14%; right: 9%; font-size: 3.4rem; }
.deco-star-b { top: 5%; right: 30%; font-size: 1.5rem; }
.deco-star-c { top: 20%; left: 40%; font-size: 2rem; color: var(--crimson-hi); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 24px; font: 700 .95rem var(--font-jp); letter-spacing: .05em;
  text-decoration: none; color: var(--white); background: transparent;
  border: 2px solid var(--white);
  /* 黒い影だと黒背景に沈んで見えないので、薄い赤にする。ホバーで濃くなる */
  box-shadow: 4px 4px 0 rgba(163,21,63,.5);
  transition: transform .15s, box-shadow .15s, background .2s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--crimson); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--crimson); }
.btn-primary, .link-primary { background: var(--crimson); border-color: var(--white); }
.btn-primary:hover, .link-primary:hover { background: #b81a48; }

.hero-visual { position: relative; margin: 0; justify-self: center; width: min(100%, 520px); }
/* 額縁(枠・影・傾き)は .kv に付ける。中の .kv-track は横スクロールで、1枚ずつ止まる */
.kv {
  position: relative; aspect-ratio: 1000 / 1200;
  border: 3px solid var(--white);
  outline: 3px solid #000; outline-offset: 0;
  box-shadow: 12px 12px 0 var(--crimson);
  transform: rotate(1.2deg);
  background: var(--bg-2); /* 画像の読み込み前と、透過部分の下地 */
}
.kv-track {
  position: absolute; inset: 0; display: flex; margin: 0; padding: 0; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
}
.kv-track::-webkit-scrollbar { display: none; }
.kv-slide { position: relative; flex: 0 0 100%; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; }
/* 縦横比が違う画像は、切り抜かず全体を見せる。余白は、下に敷いたぼかし画像(.kv-bg)が埋める */
.kv-slide img { position: relative; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.kv-slide .kv-bg {
  position: absolute; inset: 0; object-fit: cover;
  filter: blur(22px) brightness(.6) saturate(1.15);
  transform: scale(1.2); /* ぼかしで縁が薄くなる分を、枠の外へ追い出す */
}
/* 2枚以上のときだけ JS が付ける。カーソルを「つかめる」形にする。
   touch-action は指定しない(pan-y にすると、タッチの横スワイプがブラウザに処理されなくなる) */
.kv-track.is-carousel { cursor: grab; }
.kv-track.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }

/* 操作は、KV の絵の中の札(pick up / Look at me)とバーコードに見立てる。2枚以上のときだけ JS が中身を作る。
   前後の札は絵の下の左右の角(data-kv-slot)に重ねる。ドットは #kvControls に入るので、
   #kvControls ごと右上に貼ったバーコードの札にし、ドットをその棒にする */
.kv-side { position: absolute; z-index: 3; bottom: -18px; }
.kv-side-prev { left: -14px; }
.kv-side-next { right: -14px; }
.kv-nav { display: block; padding: 0; cursor: pointer; color: #fff; background: none; border: 0; }
.kv-tag {
  display: inline-block; padding: 4px 14px; background: #000; border: 2px solid var(--white);
  font: italic 600 1.2rem/1.3 var(--font-en); letter-spacing: .06em; white-space: nowrap;
  transition: background .15s;
}
.kv-nav:hover .kv-tag, .kv-nav:focus-visible .kv-tag { background: var(--crimson); }
.kv-controls {
  position: absolute; z-index: 3; top: -20px; right: 22px;
  display: flex; align-items: flex-end; gap: 10px; padding: 6px 10px 5px;
  background: #fff; border: 2px solid #000; box-shadow: 3px 3px 0 rgba(0,0,0,.5);
  --kv-hit-x: 2.5px;
}
.kv-dots { display: flex; align-items: flex-end; gap: 5px; }
.kv-dot { display: block; width: 6px; height: 28px; padding: 0; cursor: pointer; background: none; border: 0; }
.kv-dot[aria-current="true"] { width: 12px; }
.kv-bar { display: block; width: 100%; height: 100%; background: var(--paper-ink); transition: background .15s; }
.kv-dot[aria-current="true"] .kv-bar, .kv-dot:hover .kv-bar { background: var(--crimson); }

/* 南京錠のボタン。押すと鍵がかかって赤くなり、隠しメッセージが出る(assets/js/play.js) */
.hero-lock {
  position: absolute; z-index: 4; top: -22px; left: -20px;
  display: grid; place-items: center; width: 56px; height: 56px; padding: 8px; cursor: pointer;
  color: #d9d9d9; background: #000; border: 2px solid var(--white);
  box-shadow: 4px 4px 0 var(--crimson); transform: rotate(-8deg); transition: background .2s, color .2s;
}
.hero-lock svg { width: 100%; height: 100%; overflow: visible; }
/* ツルは、右の足を本体の中まで伸ばして描き(はみ出しは本体の絵が隠す)、その根元を軸に回して開く。
   Why not: 持ち上げてから回すと、両方の足が本体から抜け、錠が外れて壊れたように見える */
.lock-shackle { transform-box: fill-box; transform-origin: right bottom; transition: transform .3s ease; }
/* ヒーローの南京錠は、開いた状態から始まり、押すとツルが下りて鍵がかかり、赤くなる */
.hero-lock .lock-shackle { transform: rotate(28deg); }
.hero-lock[aria-pressed="true"] { color: #fff; background: var(--crimson); }
.hero-lock[aria-pressed="true"] .lock-shackle { transform: none; }
/* 隠しメッセージの絵。KV の上に、傾けた1枚の写真のように重ねる。横長の絵は、KV の枠から少しはみ出させる */
.lock-secret {
  position: absolute; z-index: 3; left: 50%; top: 50%; width: 80%; translate: -50% -50%;
  padding: 0; cursor: pointer; background: #000;
  border: 3px solid var(--white); box-shadow: 8px 8px 0 var(--crimson);
  transform: rotate(-3deg); transition: transform .2s;
}
.lock-secret.is-wide { width: 106%; transform: rotate(2deg); }
.lock-secret img { display: block; width: 100%; height: auto; }
@media (hover: hover) { .lock-secret:hover { transform: rotate(0deg); } }
/* 鍵をかけている間は、ヒーローを「裏側」にする。KV は暗く沈めて赤みを乗せ、方眼紙の面は黒赤の方眼に反転する。
   カード(隠しメッセージ)だけが浮いて見えるように */
.hero::before { transition: background-color .4s; }
.hero.is-locked::before {
  background-color: #1a080e;
  background-image: linear-gradient(rgba(221,66,102,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(221,66,102,.2) 1px, transparent 1px);
}
.hero.is-locked .deco-star, .hero.is-locked .deco-plus-b, .hero.is-locked .deco-code-a { color: var(--crimson-hi); }
.kv-track { transition: filter .4s; }
.hero.is-locked .kv-track { filter: grayscale(1) brightness(.3) blur(2px); }
.kv::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(circle at 50% 45%, rgba(163,21,63,.35), rgba(0,0,0,.55) 75%);
}
.hero.is-locked .kv::before { opacity: 1; }
/* 裏側の間は、めくる操作を出さない(後ろの KV は背景でしかないため。自動の切り替えは play.js が止める) */
.kv-side, .kv-controls { transition: opacity .3s, visibility .3s; }
.hero.is-locked .kv-side, .hero.is-locked .kv-controls { visibility: hidden; opacity: 0; }

/* 誕生日の札(assets/js/play.js が当日だけ出す) */
.bday-tag {
  position: absolute; z-index: 3; top: 9%; left: -26px; margin: 0; padding: 2px 16px;
  color: #fff; background: var(--crimson); border: 2px solid var(--white);
  font: italic 600 1.6rem/1.4 var(--font-en); letter-spacing: .04em; transform: rotate(-6deg);
}
.lock-secret[hidden], .bday-tag[hidden] { display: none; }

/* ---------- 遊び: グリッチ・まばたく星(動きを減らす設定では出さない) ---------- */
/* KV のグリッチ: 絵を横にずらしながら帯状に切り、上に赤と白の走査線を重ねる。どの1枚を表示していても同じに効く */
.kv::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
  background: repeating-linear-gradient(0deg, transparent 0 14px, rgba(221,66,102,.55) 14px 17px, transparent 17px 31px, rgba(255,255,255,.4) 31px 33px);
  mix-blend-mode: screen;
}
@media (prefers-reduced-motion: no-preference) {
  .kv.is-glitch .kv-track { animation: glitch-shift .6s steps(1); }
  .kv.is-glitch::after { animation: glitch-bars .6s steps(1); }
  .lock-secret:not([hidden]) { animation: tag-in .35s steps(4) both; }
  .lock-secret.is-glitch img { animation: glitch-shift .6s steps(1); }
  .bday-tag:not([hidden]) { animation: tag-in .5s steps(5) .3s both; }
  .is-birthday .deco-star { color: var(--crimson); animation: twinkle 1.8s ease-in-out infinite; }
  .is-birthday .deco-star-b { animation-delay: .6s; }
  .is-birthday .deco-star-c { animation-delay: 1.1s; }
  @media (hover: hover) {
    .hero-lock:hover { animation: lock-wiggle .5s ease; }
  }
}
@keyframes glitch-shift {
  0%   { transform: translateX(-7px); clip-path: inset(8% 0 58% 0); filter: drop-shadow(5px 0 rgba(221,66,102,.9)) drop-shadow(-5px 0 rgba(120,200,220,.6)); }
  15%  { transform: translateX(9px);  clip-path: inset(42% 0 18% 0); }
  30%  { transform: translateX(-3px); clip-path: inset(0 0 72% 0); }
  45%  { transform: translateX(5px);  clip-path: inset(62% 0 4% 0); }
  60%  { transform: none; clip-path: inset(0); filter: drop-shadow(3px 0 rgba(221,66,102,.8)); }
  100% { transform: none; clip-path: none; filter: none; }
}
@keyframes glitch-bars {
  0%   { opacity: 1; background-position: 0 0; }
  20%  { background-position: 0 40px; }
  40%  { opacity: .6; background-position: 0 -26px; }
  60%  { opacity: 1; background-position: 0 70px; }
  80%, 100% { opacity: 0; }
}
@keyframes tag-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1) rotate(0); } 50% { opacity: .35; transform: scale(.7) rotate(20deg); } }
@keyframes lock-wiggle { 0%, 100% { transform: rotate(-8deg); } 25% { transform: rotate(-16deg); } 60% { transform: rotate(-2deg); } }

/* ---------- decorative dividers ---------- */
/* 区切り線の前後を広く取り、節どうしの間(.sec の padding)より離す。
   これで、同じ章の中か、章をまたいだかが、線を見なくても余白で分かる */
.belt, .chain { margin-block: clamp(20px, 3vw, 32px); }
/* ベルト。KV の首のチョーカーに見立てる(黒い帯の正面に、細い縦長の金具の環があり、その下に丸い輪が下がる) */
.belt {
  position: relative; height: 34px; background: #000;
  border-block: 3px solid #26201f;
  background-image: radial-gradient(circle at center, #3a3132 0 3.5px, transparent 4px);
  background-size: 34px 100%;
}
/* .buckle は、縦の環と輪を置く入れ物(大きさは縦の環と同じ)。縦の環は、帯の上端の少し下から、帯の下端より少し下まで伸ばす。
   輪(::before)を先に描き、縦の環(::after)を上に重ねて、輪の上端が環の下端に通って見えるようにする。
   輪が帯の下へ下がる分(37px)は、.belt の下の margin と、次の節の上の余白に収まる。
   Why not: 環を .buckle 自体に描いて輪を z-index: -1 で裏に回さない。translate で .buckle が重なりの基準になり、
            輪は環の背景より手前に描かれてしまう。
   Why not: 金具を四角い枠にしない。枠と中の棒が、窓や一時停止の記号に見え、KV の近くで操作ボタンと紛れる */
.belt .buckle {
  position: absolute; left: 50%; top: 3px; translate: -50% 0;
  width: 9px; height: 32px;
}
.belt .buckle::before, .belt .buckle::after { content: ""; position: absolute; }
.belt .buckle::before {
  left: 50%; top: 25px; width: 40px; height: 40px; translate: -50% 0;
  border: 4px solid #c9c4c6; border-radius: 50%;
  box-shadow: 0 0 0 1.5px #000, inset 0 0 0 1.5px #000;
}
.belt .buckle::after {
  inset: 0; background: #111;
  border: 2.5px solid #c9c4c6; border-radius: 4px;
  box-shadow: 0 0 0 1.5px #000;
}
/* チェーン。注意事項(南京錠をかける節)の手前と後ろにだけ置き、節を上下から鎖で閉じる */
.chain {
  height: 22px; max-width: var(--maxw); margin-inline: auto; opacity: .85;
  background-repeat: repeat-x; background-position: center; background-size: 60px 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='22' viewBox='0 0 60 22'%3E%3Crect x='10' y='3' width='40' height='16' rx='8' fill='none' stroke='%23cfcaca' stroke-width='3'/%3E%3Crect x='46' y='7' width='28' height='8' rx='4' fill='none' stroke='%239a9494' stroke-width='3'/%3E%3Crect x='-14' y='7' width='28' height='8' rx='4' fill='none' stroke='%239a9494' stroke-width='3'/%3E%3C/svg%3E");
}

/* ---------- sections ---------- */
/* 節どうしの間は狭く、章の切れ目(区切り線の前後)は広く。
   同じ章に入っている節が「ひとまとまり」に見えるよう、余白でも差を付ける
   (区切り線の位置と同じことを、余白でも言う)。章の切れ目の広さは .belt / .chain の margin 側 */
.sec { max-width: var(--maxw); margin: 0 auto; padding: clamp(32px, 4vw, 48px) 20px; }
.sec-head { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 32px; }
/* 見出しは、赤とグレーの色ずれ(グリッチ)を静かに残し、画面に入ったときだけ一度大きくずらす */
.sec-head h2 {
  margin: 0; font-family: var(--font-mincho); font-weight: 800;
  font-size: clamp(1.9rem, 6vw, 3rem); line-height: 1.3; letter-spacing: .06em;
  text-shadow: -2px 0 rgba(221,66,102,.6), 2px 0 rgba(170,200,210,.25);
}
@media (prefers-reduced-motion: no-preference) {
  .sec-head.reveal.in h2 { animation: head-glitch .5s steps(1) .15s; }
}
@keyframes head-glitch {
  0%   { transform: translateX(-4px) skewX(-8deg); clip-path: inset(0 0 45% 0); text-shadow: 6px 0 var(--crimson-hi), -6px 0 rgba(170,210,220,.7); }
  25%  { transform: translateX(3px); clip-path: inset(50% 0 0 0); }
  50%  { transform: translateX(-2px) skewX(6deg); clip-path: none; }
  75%  { transform: none; text-shadow: 3px 0 var(--crimson-hi), -3px 0 rgba(170,210,220,.6); }
}
.sec-head h2::after {
  content: ""; display: block; width: 84px; height: 12px; margin-top: 8px;
  background: var(--stripe-fine); border: 2px solid #000; outline: 2px solid var(--white); outline-offset: -1px;
}
.lead { margin: 0 0 24px; color: var(--ink); }
.note { margin: 20px 0 0; color: var(--muted); font-size: .92rem; }

/* ---------- 01 profile ---------- */
/* 立ち絵(左)とプロフィール情報(右)の2列。狭い画面(860px 以下)では、立ち絵 → 情報の順に縦に積む */
/* 右の欄(カード)は、立ち絵より低いときに上へ寄って下が空かないよう、縦方向に中央揃えにする */
.profile-body { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 44px 64px; align-items: center; }
/* 立ち絵が0件で欄が隠れたら、情報だけの1列にする(左に空の列を残さない) */
.profile-body:has(> .tachie[hidden]) { grid-template-columns: 1fr; }
/* 2枚ずつ横に並べ、同じ行のカードは高さをそろえる(読み仮名のある NAME だけ高くならないように)。
   ファンマーク・ハッシュタグ(wide)は、絵文字やタグとコピーボタンを1行に収めるため全幅を取る */
.facts { display: grid; grid-template-columns: repeat(2, 1fr); align-items: stretch; gap: 38px 22px; margin: 22px 0 0; }
.fact-wide { grid-column: 1 / -1; }
/* 520px 以上では、ファンマークとファンアートタグも2列に並べる(2枚とも1行に収まる幅があるため)。
   それより狭いと、ファンマークの絵文字が半分の幅に収まらない(390px で 26px はみ出し、481px でも余白が 3px しか残らない)ので、全幅のまま。
   2枚が同じ行に並ぶのは、手前に見えているカードが偶数枚(今は6枚)だから。ファンネームを表示すると並びがずれる */
@media (min-width: 520px) {
  .fact-wide { grid-column: auto; }
  /* 横に並べた2枚で、コピーボタンの高さを揃える。値の幅しだいでボタンが横に並んだり折り返したりしないよう、
     どちらも値の下に置き、値の行の高さをファンマークの絵文字(.copy-text-large)の高さに合わせる */
  .fact-wide .copy-row { flex-direction: column; align-items: flex-start; }
  .fact-wide .copy-text { display: flex; align-items: center; min-height: calc(2.6rem * 1.2); }
}
/* 方眼紙のカード(KV の地)に、KV の「pick up」と同じ黒い札のラベルを、傾けて上辺に貼る */
.fact {
  background-color: var(--paper-2); background-image: var(--paper-grid); background-size: 18px 18px;
  color: var(--paper-ink); border: 2px solid #000; padding: 20px 20px 18px;
  box-shadow: 6px 6px 0 rgba(163,21,63,.9);
}
/* Why not: display: inline-block では負の margin-top が効かない
   (インラインレベルの縦マージンは行内のベースライン配置に影響しないため)。
   ラベルを枠の上辺に跨がらせるには block + fit-content にする必要がある */
.fact dt { display: block; width: fit-content; margin: -36px 0 10px -10px; line-height: 1.4; }
.card-tag {
  display: inline-block; padding: 2px 12px; color: #fff; background: #000; border: 2px solid var(--white);
  font: 700 .9rem var(--font-jp); letter-spacing: .12em; transform: rotate(-2deg);
}
.fact:nth-child(even) .card-tag { transform: rotate(1.5deg); }
.fact dd { margin: 0; font-family: var(--font-mincho); font-weight: 800; font-size: 1.45rem; line-height: 1.5; }
.fact dd small { display: block; margin-top: 2px; font: 400 .85rem var(--font-jp); color: var(--paper-muted); letter-spacing: .04em; }
.fact dd a { color: inherit; text-decoration: underline; text-decoration-color: var(--crimson); text-underline-offset: 5px; }
@media (hover: hover) { .fact dd a:hover { color: var(--crimson); } }
.fact .btn { color: #fff; background: #000; border-color: #000; box-shadow: 3px 3px 0 var(--crimson); }

/* 立ち絵: 衣装名のタブ → 絵 → クレジット(中身は script.js が assets/data/tachie.js から作る) */
/* タブ・絵・クレジットを同じ幅(絵の枠の幅)の中で中央にそろえる。タブが収まらない幅では折り返す */
.tachie { display: grid; gap: 18px; justify-items: center; width: min(100%, 280px); justify-self: center; }
/* 上の display: grid は、hidden(0件のとき JS が付ける)より強い。消さないと、空の欄が情報の上に余白として残る */
.tachie[hidden] { display: none; }
.tachie-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tachie-tab {
  padding: 6px 10px; cursor: pointer; font: 700 .85rem var(--font-jp); letter-spacing: .04em;
  color: var(--muted); background: transparent; border: 2px solid rgba(246,240,242,.35);
  transition: color .15s, background .15s, border-color .15s;
}
.tachie-tab[aria-selected="true"] { color: #fff; background: var(--crimson); border-color: var(--white); }
@media (hover: hover) { .tachie-tab:hover { color: var(--white); border-color: var(--white); } }
/* 枠(ボタン)の縦横比を固定し、赤い影は枠に付ける。絵は枠の中央に contain で収める。
   縦横比の違う絵(ちびキャラなど)に切り替えても、枠と影と周りの要素は動かない */
.tachie-item { margin: 0; width: 100%; }
.tachie-item[hidden] { display: none; }
.tachie-zoom {
  display: block; width: 100%; aspect-ratio: 1 / 2; padding: 0; cursor: zoom-in;
  /* 立ち絵は背景が透明。黒い地では黒い髪と服が溶けるので、明るい地に置く(拡大表示も、立ち絵のときだけ同じ地) */
  background: #eeeaeb;
  border: 2px solid var(--white); box-shadow: 8px 8px 0 rgba(163,21,63,.9);
  transition: transform .18s, box-shadow .18s;
}
@media (hover: hover) {
  .tachie-zoom:hover { transform: translate(-3px, -3px); box-shadow: 11px 11px 0 var(--crimson); }
}
.tachie-zoom img { display: block; width: 100%; height: 100%; object-fit: contain; }
.tachie-credit { margin-top: 14px; font-size: .82rem; color: var(--muted); letter-spacing: .04em; text-align: center; }
.tachie-credit a { color: var(--crimson-hi); }
/* 顔の差分(tachie.js で face に元の衣装を書いた絵): 絵の下に顔のサムネイルを並べ、選ぶと枠の中を上半身のアップにする。
   切り出しは、絵を枠より大きく置いて、はみ出しを隠す。数値は、幅627pxの立ち絵(通常と同じ構図)のうち、
   サムネイルは左230px・上0から300px四方(627/300=209%、-230/300=-76.7%)、
   枠は左240px・上0から幅300px(627/300=209%、-240/300=-80%)を見せる指定。
   Why not: object-fit: cover + object-position では、幅いっぱいまでしか寄れず、顔が小さいまま */
.tachie-faces { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
/* ほかの衣装を見ている間は、場所を空けたまま見えなくする。
   Why not: display: none で詰めると、衣装を切り替えるたびに欄の高さが変わり、横のカードと下の節が上下に動く */
.tachie-faces.is-idle { visibility: hidden; }
/* 差分やアップを見ている間の、元の衣装のタブ(塗らずに枠だけ白くし、「いま出している絵」のタブと区別する) */
.tachie-tab.is-parent { color: var(--white); border-color: var(--white); }
.tachie-face {
  display: grid; gap: 6px; justify-items: center; padding: 0; cursor: pointer;
  color: var(--muted); background: transparent; border: 0; font: 700 .72rem var(--font-jp); letter-spacing: .04em;
}
.tachie-face-thumb {
  display: block; position: relative; overflow: hidden; width: 62px; aspect-ratio: 1;
  background: #eeeaeb; border: 2px solid rgba(246,240,242,.35); transition: border-color .15s, box-shadow .15s;
}
.tachie-face-thumb img { position: absolute; left: -76.7%; top: 0; width: 209%; max-width: none; height: auto; }
.tachie-face[aria-selected="true"] { color: var(--white); }
.tachie-face[aria-selected="true"] .tachie-face-thumb { border-color: var(--white); box-shadow: 4px 4px 0 var(--crimson); }
@media (hover: hover) {
  .tachie-face:hover { color: var(--white); }
  .tachie-face:hover .tachie-face-thumb { border-color: var(--white); }
}
.tachie-item.is-face .tachie-zoom { position: relative; overflow: hidden; }
.tachie-item.is-face .tachie-zoom img { position: absolute; left: -80%; top: 0; width: 209%; max-width: none; height: auto; }
/* 衣装の切り替えは、控えめなフェードだけ。動きを減らす設定では付けない */
@media (prefers-reduced-motion: no-preference) {
  .tachie-item:not([hidden]) { animation: tachie-fade .3s ease; }
}
@keyframes tachie-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 02 links ---------- */
.links-main, .links-sub { list-style: none; margin: 0; padding: 0; }
/* 主要な2件は、KV の「DROP」「Look at me」と同じ黒い札にし、右端にバーコードを刷る。札どうしは逆向きに少し傾ける */
.links-main { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 30px 26px; padding-top: 14px; }
.links-main .btn {
  position: relative; display: flex; justify-content: flex-start; width: 100%;
  padding: 18px 96px 18px 26px; background: #000; transform: rotate(-1deg);
}
.links-main li:nth-child(even) .btn { transform: rotate(1.2deg); }
.links-main .btn-primary, .links-main .link-primary { background: var(--crimson); }
.links-main .btn::before {
  content: ""; position: absolute; right: 18px; top: 50%; translate: 0 -50%;
  width: 60px; height: 34px; background: var(--barcode); opacity: .55;
}
.links-main .btn:hover { transform: rotate(0deg) translate(-2px, -2px); }
.links-main .btn:active { transform: rotate(0deg) translate(2px, 2px); }
/* 配信の札にだけ、KV の「Look at me」の小札を添える。読み上げでは、リンクの名前に混ぜない */
.links-main .btn-primary::after, .links-main .link-primary::after {
  content: "Look at me" / ""; position: absolute; top: -18px; right: 22px;
  padding: 0 10px; color: #fff; background: #000; border: 2px solid var(--white);
  font: italic 600 1rem/1.5 var(--font-en); letter-spacing: .04em; transform: rotate(4deg);
}
.link-name { display: grid; justify-items: start; font-size: 1.3rem; line-height: 1.4; }
.link-name small { font-size: .8rem; font-weight: 400; letter-spacing: .06em; opacity: .85; }

/* その他のリンクは、小さな黒い札を不揃いに傾けて並べる。札は上辺の中央を軸に傾け、揺らす */
.links-sub { display: flex; flex-wrap: wrap; gap: 18px 20px; margin-top: 34px; padding-inline: 4px; }
.links-sub .btn {
  --tilt: -3deg;
  padding: 7px 16px 8px; font-size: .9rem; background: #000;
  transform-origin: 50% 0; transform: rotate(var(--tilt));
}
.links-sub li:nth-child(5n+2) .btn { --tilt: 2.5deg; }
.links-sub li:nth-child(5n+3) .btn { --tilt: -1deg; }
.links-sub li:nth-child(5n+4) .btn { --tilt: 4deg; }
.links-sub li:nth-child(5n) .btn { --tilt: -2deg; }
.links-sub .btn:hover, .links-sub .btn:active { transform: rotate(var(--tilt)); box-shadow: 4px 4px 0 var(--crimson); }
@media (prefers-reduced-motion: no-preference) {
  /* 画面に入ったときに一度だけ揺らし、ホバーでも揺らす(押しても位置がずれないよう、平行移動はしない) */
  .links-sub li.reveal.in .btn { animation: tag-swing 1.4s ease-out .2s; }
  .links-sub .btn:hover { animation: tag-swing 1.1s ease-out; }
}
@keyframes tag-swing {
  0%   { transform: rotate(var(--tilt)); }
  20%  { transform: rotate(calc(var(--tilt) + 12deg)); }
  45%  { transform: rotate(calc(var(--tilt) - 8deg)); }
  70%  { transform: rotate(calc(var(--tilt) + 4deg)); }
  100% { transform: rotate(var(--tilt)); }
}

/* ---------- 03 schedule ---------- */
/* 方眼紙の帯を、上下を斜めに切って敷く(黒い地の中で、明るい節を1つ挟んで区切る) */
.sec-paper {
  position: relative; isolation: isolate; max-width: none; color: var(--paper-ink);
  padding-block: clamp(64px, 8vw, 96px);
}
.sec-paper::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-color: var(--paper); background-image: var(--paper-grid); background-size: 22px 22px;
  clip-path: polygon(0 6%, 100% 0, 100% 94%, 0 100%);
}
.sec-paper > * { max-width: calc(var(--maxw) - 40px); margin-left: auto; margin-right: auto; }
.sec-paper .sec-head h2 { text-shadow: -2px 0 rgba(163,21,63,.45); }
.sec-paper .lead { color: var(--paper-ink); }
.slots { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 26px; }
/* flex-wrap: タブレット幅の2列では、札と時間が1行に収まらず、時間が枠の外へはみ出していた。収まらない幅でだけ、時間を次の行に送る */
.slot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 26px; background: var(--paper-2);
  border: 3px solid #000; box-shadow: 7px 7px 0 var(--crimson);
}
.slot-label {
  font: italic 600 1.1rem var(--font-en); letter-spacing: .14em; text-transform: uppercase;
  color: #fff; background: #000; padding: 2px 14px; transform: rotate(-3deg);
}
.slot-time {
  font: italic 600 clamp(2rem, 6vw, 2.7rem)/1 var(--font-en);
  font-variant-numeric: lining-nums tabular-nums; /* 理由は .hist-date と同じ */
  letter-spacing: .04em; white-space: nowrap;
}
.slot-time em { font-style: normal; color: var(--crimson); margin: 0 .2em; }
/* 今この時間帯 / もうすぐ の札(assets/js/play.js)。枠の右上に貼る */
.slot { position: relative; }
.slot-now {
  position: absolute; top: -16px; right: 14px; padding: 1px 12px;
  font-size: .85rem; font-weight: 700; letter-spacing: .1em; color: #fff; background: var(--crimson);
  border: 2px solid #000; transform: rotate(2deg);
}
.slot-now[hidden] { display: none; }
.slot.is-soon .slot-now { color: var(--paper-ink); background: var(--paper-2); }
.slot.is-now { background: #000; color: #fff; }
.slot.is-now .slot-label { background: var(--crimson); }
.slot.is-now .slot-time em { color: var(--crimson-hi); }

/* ---------- 04 history ---------- */
/* 日付の黒い札と出来事を並べるだけの年表。
   Why not: 縦の鎖と、出来事の目印(南京錠・丸い輪)を付けない。この節の鎖には役目が無く、明るい灰色が日付の赤い文字より
            目立って、目線を左の余白に引っ張っていた。鎖を細い線に替えて丸い点を残すと、量産された年表の定番の形になる。
            南京錠は、押せる南京錠(ヒーロー・注意事項・メニュー)と同じ形なのに、押しても何も起きなかった */
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 30px; }
.history li { display: flex; align-items: baseline; gap: 20px; }
/* Cormorant Garamond は既定でオールドスタイル数字(高さも字幅も不揃い)になり、
   日付・時刻のように読み取り精度が要る箇所では読みにくい。lining + tabular で揃える。
   italic は必須。読み込んでいるのがイタリック体だけなので、
   指定しないとブラウザ任せの代用になり見た目が環境で変わる */
.hist-date {
  flex: none; min-width: 9.5em; padding: 0 12px; font: italic 600 1.2rem var(--font-en);
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: .06em; color: var(--crimson-hi); background: #000; border-left: 4px solid var(--crimson);
}
.history p { margin: 0; font-family: var(--font-mincho); font-weight: 800; font-size: 1.35rem; line-height: 1.5; }
/* 初配信からの日数(assets/js/play.js が活動履歴の下に差し込む)。KV の黒い札に、数字だけ深紅の欧文で */
.hist-days {
  display: inline-block; margin: 30px 0 0; padding: 4px 16px; color: #fff; background: #000;
  border: 2px solid var(--white); box-shadow: 4px 4px 0 var(--crimson); transform: rotate(-2deg);
  font-weight: 700; letter-spacing: .08em;
}
.hist-days strong {
  font: italic 600 1.8rem/1 var(--font-en); font-variant-numeric: lining-nums; color: var(--crimson-hi); letter-spacing: .02em;
}

/* ---------- ファンマーク(プロフィール内) ---------- */
/* 絵文字とコピーボタンを横に並べてカードの背を詰める。
   grid ではなく flex なのは、狭い画面で折り返させるため */
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.copy-text { font-size: 1.2rem; }
.copy-text-large { font-size: 2.6rem; line-height: 1.2; letter-spacing: .12em; white-space: nowrap; }
.copy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fact-note { margin: 12px 0 0; font: 400 .85rem/1.7 var(--font-jp); color: var(--paper-muted); }
/* inline-block にしないと、行末でこの語が割れて赤いマーカーが2行に分断される */
.fact-note strong { display: inline-block; font-weight: 700; color: var(--paper-ink); background: linear-gradient(transparent 62%, rgba(163,21,63,.4) 62%); }
.copy-btn { cursor: pointer; padding: 8px 18px; font-size: .88rem; }
/* ファンマークをコピーしたときの一言(assets/js/play.js)。カードの下辺に、黒い札を傾けて貼る。
   下辺にするのは、上辺の左に「ファンマーク」の札があり、狭い画面で右に並べると重なるため。
   傾きは rotate で付ける(グリッチの head-glitch が transform を使うので、transform に書くと揺れの間だけ傾きが消える) */
.fact { position: relative; }
.fanmark-reply {
  position: absolute; right: 18px; bottom: -17px; margin: 0; padding: 2px 12px;
  color: #fff; background: #000; border: 2px solid var(--white); box-shadow: 3px 3px 0 var(--crimson);
  font: 800 .95rem/1.5 var(--font-mincho); letter-spacing: .08em; white-space: nowrap; rotate: -3deg;
}
@media (prefers-reduced-motion: no-preference) {
  .fanmark-reply { animation: tag-in .4s steps(6) both; }
  /* tag-in を並べて残す。消すと、グリッチが終わって class が外れたときに、札の出る動きがもう一度始まる */
  .fanmark-reply.is-glitch { animation: tag-in .4s steps(6) both, head-glitch .5s steps(1); }
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* ---------- 05 gallery ---------- */
/* 活動履歴とは同じ黒い地で続くので、線を引かずに、章の切れ目の余白(区切り線の上下の margin と同じ)を空けて分ける */
#gallery { margin-top: clamp(40px, 6vw, 64px); }
/* ギャラリーの中の小見出し(ファンアート・配信ハイライト・ロゴ)。節の見出しより一段小さく、赤い縦線だけで区切る */
.gallery-section + .gallery-section { margin-top: clamp(36px, 5vw, 56px); }
.gallery-section h3 {
  margin: 0 0 18px; padding-left: 12px; border-left: 4px solid var(--crimson);
  font-family: var(--font-mincho); font-weight: 800; font-size: clamp(1.1rem, 3.4vw, 1.35rem);
  line-height: 1.4; letter-spacing: .08em;
}
.gallery-tag { margin: -6px 0 20px; color: var(--muted); font-size: .92rem; }
.gallery-tag .tag-link { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--crimson); text-underline-offset: 4px; }
@media (hover: hover) { .gallery-tag .tag-link:hover { color: var(--crimson-hi); } }
/* 文字が小さく押しにくいので、フッターのリンク(style.css の .footer-note a::after)と同じく、見えない ::after で縦の押せる範囲を広げる */
.gallery-tag .tag-link { position: relative; }
.gallery-tag .tag-link::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 32px; height: min(44px, 1lh + 1em); translate: 0 -50%; }
/* columns(段組み)だと中身が縦に流れ、新しい順に並べても「左を上から下、次に真ん中」と読まれる。
   grid にして左から右へ並べ、段の高さが揃わない分は script.js が
   各作品の高さから grid-row-end: span を計算して詰める(1行 = 1px として数える) */
.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-auto-rows: 1px; column-gap: 22px; row-gap: 0;
  align-items: start; /* 高さを測る前に、行の高さへ引き伸ばされないように */
}
.art { position: relative; margin: 0; }
.art button {
  display: block; width: 100%; padding: 0; cursor: zoom-in; background: #000;
  border: 2px solid var(--white); box-shadow: 6px 6px 0 rgba(163,21,63,.9);
  transition: transform .18s, box-shadow .18s;
  position: relative; overflow: hidden;
}
.art button:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--crimson); }
.art img { width: 100%; height: auto; }
.art-logo button { background: linear-gradient(160deg, #1c1517, #0b090a); }
.art figcaption { margin-top: 10px; font-size: .82rem; color: var(--muted); letter-spacing: .04em; }

/* ---------- 06 rules ---------- */
/* 誓約書に見立てる。見出しの上に立入禁止のテープ、項目は罫線で区切った1枚の書面、
   右端の南京錠を全部かけると「誓約済」の判子が押される(南京錠と判子は assets/js/play.js) */
#rules { position: relative; overflow-x: clip; padding-top: clamp(56px, 7vw, 80px); }
.caution-tape {
  position: absolute; top: 10px; left: -10%; right: -10%; height: 34px; pointer-events: none;
  background: repeating-linear-gradient(-45deg, #000 0 16px, var(--crimson) 16px 32px);
  border-block: 3px solid var(--white); transform: rotate(-2.5deg); opacity: .9;
}
/* JS が無いと鍵のボタンが出ないので、案内の一文も出さない */
html:not(.js) .rules-hint { display: none; }
.rules-hint { color: var(--muted); font-size: .92rem; }
.rules {
  list-style: none; margin: 0; padding: 8px clamp(16px, 3vw, 32px);
  counter-reset: rule; background: var(--bg-2);
  border: 2px solid var(--white); outline: 2px solid var(--white); outline-offset: 5px;
  box-shadow: 12px 12px 0 var(--crimson);
}
.rules li {
  counter-increment: rule;
  display: flex; align-items: center; gap: 20px; padding: 16px 0;
}
.rules li + li { border-top: 1px dashed var(--line); }
.rules li::before {
  content: counter(rule, decimal-leading-zero);
  flex: none; min-width: 2.2em;
  font: italic 600 1.3rem var(--font-en);
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: .06em; color: var(--crimson-hi);
}
.rules p { flex: 1; min-width: 0; margin: 0; font-weight: 400; font-size: 1.05rem; line-height: 1.8; transition: color .2s; }
/* 鍵をかけた項目は、本文に赤い線を引いて「誓った」印にする */
.rules li.is-sworn p { text-decoration: underline; text-decoration-color: var(--crimson-hi); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.rule-lock {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 7px; cursor: pointer;
  color: var(--muted); background: #000; border: 2px solid rgba(246,240,242,.4);
  transform: rotate(-6deg); transition: color .2s, background .2s, border-color .2s;
}
.rule-lock svg { width: 100%; height: 100%; overflow: visible; }
.rule-lock .lock-shackle { transform-box: fill-box; transform-origin: right bottom; transform: rotate(28deg); transition: transform .25s ease; }
.rule-lock[aria-pressed="true"] { color: #fff; background: var(--crimson); border-color: var(--white); cursor: default; }
.rule-lock[aria-pressed="true"] .lock-shackle { transform: none; }
@media (hover: hover) { .rule-lock:hover { color: #fff; border-color: var(--white); } }
/* 判子: 書面の右下に、傾けて押す */
.rules-stamp {
  /* 右端の鍵の列に重ねないよう、鍵より内側に寄せ、書面の下辺からはみ出させる。
     はみ出した先にフッターのベルトが来るので、z-index でベルトより手前に出す(ベルトは後に書かれていて、そのままだと上に重なる) */
  position: absolute; z-index: 1; right: clamp(92px, 14vw, 180px); bottom: -34px; margin: 0;
  display: grid; place-items: center; width: 132px; height: 132px; border-radius: 50%;
  color: var(--crimson-hi); border: 5px double var(--crimson-hi);
  font-family: var(--font-mincho); font-weight: 800; font-size: 1.7rem; letter-spacing: .08em;
  background: rgba(11,9,10,.55); transform: rotate(-14deg); pointer-events: none;
}
.rules-stamp[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .rules-stamp:not([hidden]) { animation: stamp-in .35s cubic-bezier(.3, 1.6, .5, 1) both; }
  .rule-lock[aria-pressed="true"] { animation: lock-snap .25s ease; }
}
@keyframes stamp-in { from { opacity: 0; transform: rotate(-24deg) scale(2.2); } to { opacity: 1; transform: rotate(-14deg) scale(1); } }
@keyframes lock-snap { 50% { transform: rotate(-6deg) translateY(3px) scale(.92); } }
/* かけた鍵を押したとき(外れない)。ガチャっと左右に揺らす。play.js が動きを減らす設定では付けない */
.rule-lock[aria-pressed="true"].is-rattle { animation: lock-rattle .4s ease; }
@keyframes lock-rattle {
  20% { transform: rotate(-14deg) translateX(-2px); } 40% { transform: rotate(3deg) translateX(2px); }
  60% { transform: rotate(-11deg) translateX(-1px); } 80% { transform: rotate(-3deg); }
}

/* ---------- lightbox ---------- */
.lightbox {
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0;
  border: 0; background: rgba(6,4,5,.94); color: var(--ink);
}
.lightbox[open] { display: grid; place-items: center; }
/* 拡大表示の間は、後ろのページをスクロールさせない */
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox[data-group="tachie"] img { background: #eeeaeb; }
.lightbox::backdrop { background: rgba(0,0,0,.8); }
.lightbox figure { margin: 0; max-width: min(92vw, 1100px); display: grid; justify-items: center; gap: 12px; }
.lightbox img { max-height: 80dvh; width: auto; max-width: 100%; border: 3px solid var(--white); box-shadow: 10px 10px 0 var(--crimson); background: #000; }
.lightbox figcaption { font-size: .95rem; text-align: center; }
.lightbox figcaption a { color: var(--crimson-hi); }
/* Why not: 地を黒にすると、広い画面で作品の外に出たとき、拡大画面の黒い背景に溶けて白い縁だけが浮く。
   背景の黒とも作品の白とも違う赤の地にする */
.lb-close, .lb-nav {
  position: absolute; display: grid; place-items: center; cursor: pointer;
  width: 48px; height: 48px; color: #fff; background: var(--crimson); border: 2px solid var(--white);
  font: 400 1.9rem/1 var(--font-jp); transition: background .15s;
}
.lb-close:active, .lb-nav:active { background: #000; }
@media (hover: hover) { .lb-close:hover, .lb-nav:hover { background: #000; } }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lb-next { right: 16px; top: 50%; translate: 0 -50%; }
/* 狭い画面では、前後のボタンを下端の中央に並べる。左右の中央に置くと、画面いっぱいの作品に重なって絵を隠すため */
@media (max-width: 720px) {
  .lightbox img { max-height: calc(100dvh - 190px); }
  .lb-prev, .lb-next { top: auto; bottom: calc(16px + env(safe-area-inset-bottom)); translate: none; }
  .lb-prev { left: calc(50% - 64px); }
  .lb-next { right: calc(50% - 64px); }
}
/* 1枚しか無いまとまりを開いたとき、JS が hidden を付ける。上の display: grid に負けないよう、属性つきで消す */
.lb-nav[hidden] { display: none; }

/* ---------- footer ---------- */
/* 下端は、右下に固定した南京錠のメニューに、コピーライトが隠れない高さを空ける */
.footer { text-align: center; padding: 24px 20px 110px; }
/* バーコード: 押すと赤い読み取り線が走り、キャッチコピーが出る(assets/js/play.js) */
.barcode {
  position: relative; display: block; width: 200px; height: 56px; margin: 26px auto 10px; padding: 7px 12px;
  color: var(--paper-ink); background: #fff; border: 2px solid #000; cursor: pointer; overflow: hidden;
  box-shadow: 4px 4px 0 var(--crimson); transition: box-shadow .15s;
}
.barcode-bars { display: block; height: 100%; background: var(--barcode); }
.barcode::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -6%; width: 3px; opacity: 0;
  background: var(--crimson-hi); box-shadow: 0 0 10px 2px rgba(221,66,102,.8);
}
@media (hover: hover) { .barcode:hover { box-shadow: 6px 6px 0 var(--crimson); } }
/* 捕まった画面から離れたあとに残る一言(assets/js/play.js)。ノイズのときは、赤と青の複製(data-text)が帯状にずれる */
.barcode-note-text { position: relative; display: inline-block; }
.barcode-note-text::before, .barcode-note-text::after {
  content: attr(data-text); position: absolute; inset: 0; opacity: 0; pointer-events: none;
}
.barcode-note-text::before { color: #ff2a6d; }
.barcode-note-text::after { color: #3ad7e6; }
.barcode-note { margin: 6px 0 16px; font-family: var(--font-mincho); font-weight: 800; font-size: 1.2rem; letter-spacing: .2em; color: var(--crimson-hi); }
@media (prefers-reduced-motion: no-preference) {
  .barcode.is-scanning::before { opacity: 1; animation: scan .8s ease-in-out; }
  .barcode-note:not([hidden]) { animation: tag-in .6s steps(9) both, head-glitch .5s steps(1) .6s; }
  .barcode-note.is-glitch .barcode-note-text { animation: note-shake .6s steps(1); }
  .barcode-note.is-glitch .barcode-note-text::before { animation: note-slice-a .6s steps(1); }
  .barcode-note.is-glitch .barcode-note-text::after { animation: note-slice-b .6s steps(1); }
}
@keyframes scan { from { left: -4%; } to { left: 102%; } }
@keyframes note-shake { 0% { transform: translateX(-3px) skewX(-12deg); } 30% { transform: translateX(4px); } 60% { transform: translateX(-2px) skewX(8deg); } 100% { transform: none; } }
@keyframes note-slice-a {
  0%   { opacity: .9; clip-path: inset(10% 0 55% 0); transform: translateX(-9px); }
  20%  { clip-path: inset(60% 0 8% 0); transform: translateX(7px); }
  40%  { clip-path: inset(30% 0 40% 0); transform: translateX(-12px); }
  60%  { clip-path: inset(0 0 75% 0); transform: translateX(5px); }
  80%  { clip-path: inset(70% 0 0 0); transform: translateX(-4px); }
  100% { opacity: 0; }
}
@keyframes note-slice-b {
  0%   { opacity: .8; clip-path: inset(55% 0 12% 0); transform: translateX(8px); }
  20%  { clip-path: inset(5% 0 70% 0); transform: translateX(-6px); }
  40%  { clip-path: inset(45% 0 25% 0); transform: translateX(11px); }
  60%  { clip-path: inset(80% 0 0 0); transform: translateX(-7px); }
  80%  { clip-path: inset(20% 0 55% 0); transform: translateX(3px); }
  100% { opacity: 0; }
}

/* 捕まえた画面: 暗転した画面に、2本のチェーンを X 字に渡し、交点に南京錠と「逃がさないよ？」 */
.caught {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; overflow: hidden; cursor: pointer;
  background-color: rgba(8,6,7,.93);
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(221,66,102,.07) 3px 4px);
}
.caught[hidden] { display: none; }
.caught-chain {
  position: absolute; left: 50%; top: 50%; width: 160vmax; height: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='22' viewBox='0 0 60 22'%3E%3Crect x='10' y='3' width='40' height='16' rx='8' fill='none' stroke='%23cfcaca' stroke-width='3'/%3E%3Crect x='46' y='7' width='28' height='8' rx='4' fill='none' stroke='%239a9494' stroke-width='3'/%3E%3Crect x='-14' y='7' width='28' height='8' rx='4' fill='none' stroke='%239a9494' stroke-width='3'/%3E%3C/svg%3E") repeat-x center / 76px 28px;
  filter: drop-shadow(0 5px 0 #000);
}
.caught-chain-a { transform: translate(-50%, -50%) rotate(32deg); }
.caught-chain-b { transform: translate(-50%, -50%) rotate(-32deg); }
.caught-body { position: relative; display: grid; justify-items: center; gap: 22px; padding: 0 16px; }
.caught-lock {
  width: 92px; height: 92px; padding: 14px; overflow: visible;
  color: #fff; background: var(--crimson); border: 3px solid var(--white); box-shadow: 6px 6px 0 #000;
  transform: rotate(-8deg);
}
.caught-text {
  margin: 0; padding: .15em .6em .2em; color: #fff; background: #000;
  border: 2px solid var(--white); box-shadow: 8px 8px 0 var(--crimson);
  font-family: var(--font-mincho); font-weight: 800; font-size: clamp(2rem, 8vw, 4.2rem); letter-spacing: .1em; line-height: 1.4;
  text-shadow: -3px 0 rgba(221,66,102,.8), 3px 0 rgba(170,210,220,.4);
}
@media (prefers-reduced-motion: no-preference) {
  .caught:not([hidden]) { animation: caught-fade .25s ease both; }
  .caught:not([hidden]) .caught-chain-a { animation: chain-in-a .45s cubic-bezier(.2, .9, .3, 1.15) .1s both; }
  .caught:not([hidden]) .caught-chain-b { animation: chain-in-b .45s cubic-bezier(.2, .9, .3, 1.15) .2s both; }
  .caught:not([hidden]) .caught-lock { animation: lock-drop .35s cubic-bezier(.3, 1.6, .5, 1) .55s both; }
  .caught:not([hidden]) .caught-text { animation: tag-in .4s steps(6) .75s both, head-glitch .5s steps(1) 1.2s; }
  /* もがくと、チェーンが軋んで揺れる。transform は位置と角度に使っているので、揺れは translate で足す */
  .caught.is-struggling .caught-chain { animation: rattle .4s ease; }
  .caught.is-struggling .caught-body { animation: rattle .4s ease; }
}
/* 離すとき(assets/js/play.js が 0.9 秒だけ is-releasing を付ける)。捕まえるときの動きより後に書き、上書きする */
@media (prefers-reduced-motion: no-preference) {
  .caught.is-releasing { animation: caught-out .45s ease .45s forwards; }
  .caught.is-releasing .caught-chain-a { animation: chain-out-a .6s cubic-bezier(.5, 0, .75, 0) .1s forwards; }
  .caught.is-releasing .caught-chain-b { animation: chain-out-b .6s cubic-bezier(.5, 0, .75, 0) .15s forwards; }
  .caught.is-releasing .caught-body { animation: none; }
  .caught.is-releasing .caught-lock { animation: lock-fall .7s cubic-bezier(.5, 0, .9, .4) forwards; }
  .caught.is-releasing .caught-lock .lock-shackle { transform: rotate(28deg); }
  .caught.is-releasing .caught-text { animation: text-out .45s steps(5) .2s forwards; }
}
.caught-lock .lock-shackle { transform-box: fill-box; transform-origin: right bottom; transition: transform .15s ease; }
@keyframes caught-out { to { opacity: 0; } }
/* 鎖は、一瞬きしんで(逆へ少し引かれて)から、それぞれ反対の向きへ弾け飛ぶ */
@keyframes chain-out-a {
  0%   { transform: translate(-50%, -50%) rotate(32deg); }
  20%  { transform: translate(-50%, -50%) rotate(32deg) translateX(-24px); }
  100% { transform: translate(-50%, -50%) rotate(40deg) translateX(110%); opacity: 0; }
}
@keyframes chain-out-b {
  0%   { transform: translate(-50%, -50%) rotate(-32deg); }
  20%  { transform: translate(-50%, -50%) rotate(-32deg) translateX(24px); }
  100% { transform: translate(-50%, -50%) rotate(-40deg) translateX(-110%); opacity: 0; }
}
@keyframes lock-fall {
  0%   { transform: rotate(-8deg); }
  25%  { transform: translateY(-14px) rotate(-24deg); }
  100% { transform: translateY(110vh) rotate(160deg); }
}
@keyframes text-out {
  0%   { clip-path: inset(0); transform: none; }
  40%  { clip-path: inset(30% 0 30% 0); transform: translateX(-8px) skewX(-10deg); }
  70%  { clip-path: inset(46% 0 46% 0); transform: translateX(6px); }
  100% { clip-path: inset(50% 0 50% 0); opacity: 0; }
}
@keyframes caught-fade { from { opacity: 0; } }
@keyframes chain-in-a { from { transform: translate(-50%, -50%) rotate(32deg) translateX(-100%); } }
@keyframes chain-in-b { from { transform: translate(-50%, -50%) rotate(-32deg) translateX(100%); } }
@keyframes lock-drop { from { opacity: 0; transform: translateY(-60px) rotate(-40deg); } }
@keyframes rattle { 20% { translate: -8px 3px; } 40% { translate: 7px -4px; } 60% { translate: -5px 2px; } 80% { translate: 3px -1px; } }
.footer-link { display: inline-block; margin: 16px 0 12px; font: italic 600 1.2rem var(--font-en); letter-spacing: .06em; }
.footer-note { margin: 0 0 6px; color: var(--muted); font-size: .82rem; }
.copy { margin: 0; color: var(--muted); font-size: .8rem; letter-spacing: .06em; }

/* ---------- reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .topbar nav, .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .profile-body { grid-template-columns: 1fr; }
}
/* スマホ幅でも、カードは2列のまま(誕生日・身長のような短い値で、1枚ずつ縦に積むと長くなるため)。
   列の幅が半分になる分、余白と値の文字を詰める。1列にするのは、テンプレートと同じく 359px 以下だけ
   Why not: style.css の 359px 以下の指定は、上の .facts の指定(後から読み込む custom.css)に負けるので、ここにも書く */
@media (max-width: 768px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
  .fact { padding: 18px 14px 16px; }
  .fact dd { font-size: 1.2rem; }
}
@media (max-width: 359px) {
  .facts { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  /* 縦に積むので、斜めの切り口を横向きにし、KV の上端あたりから下を方眼紙にする */
  .hero { --cut: polygon(0 40%, 100% 31%, 100% 100%, 0 100%); --cut-edge: polygon(0 39.2%, 100% 30.2%, 100% 31%, 0 40%); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: 2; width: min(86%, 400px); margin-top: 18px; }
  .hero-text { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
  /* 余白を切った分、幅いっぱいでは絵柄が大きくなりすぎるので、少し絞る */
  .logo { flex: none; width: 100%; }
  .logo img { width: min(78%, 480px); margin-inline: auto; }
  .tagline span { writing-mode: horizontal-tb; padding: .3em .9em .35em; border-left: 0; border-bottom: 8px solid transparent; border-image: var(--stripe-fine) 1; }
  .deco-plus-a { top: 3%; left: 4%; }
  /* ロゴと重ならないよう、キャッチコピーの右の空いた場所に小さく置く */
  .deco-moon { top: 148px; left: auto; right: 6px; width: 58px; }
  .deco-code-a { top: 34%; right: 4%; width: 96px; height: 24px; }
  .deco-code-b, .deco-star-c { display: none; }
  .deco-star-b { top: auto; bottom: 4%; right: auto; left: 6%; }
  .deco-star-a { bottom: 3%; right: 5%; font-size: 2.4rem; }
  .deco-plus-b { bottom: 4%; right: 22%; }
}
@media (max-width: 560px) {
  .sec-head { gap: 12px; }
  .rules li { gap: 12px; }
  .rules-stamp { right: 64px; bottom: -58px; width: 104px; height: 104px; font-size: 1.35rem; }
  .history li { flex-direction: column; gap: 6px; }
  .kv-side-prev { left: -8px; } .kv-side-next { right: -8px; }
  .hero-lock { left: -10px; }
  .bday-tag { left: -10px; font-size: 1.3rem; }
  .slot { padding: 18px 20px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); column-gap: 14px; }
  .lb-nav, .lb-close { width: 42px; height: 42px; }
}

/* ==========================================================
   依頼ページ(commission/index.html)
   トップページと同じ「黒 × 深紅 × 白ふち」で、枠線の四角と赤い影をそろえる
   ========================================================== */
.sp-only { display: none; }
.commission-head { max-width: var(--maxw); margin: 0 auto; padding: clamp(40px, 7vw, 88px) 20px clamp(24px, 4vw, 40px); }
.commission-title {
  margin: 8px 0 20px; font-family: var(--font-mincho); font-weight: 800;
  font-size: clamp(2rem, 6.4vw, 3.4rem); line-height: 1.3; letter-spacing: .06em;
}
.commission-lead { margin: 0 0 28px; color: var(--ink); }

/* 受付状況: 黒い札を並べ、状態を深紅の文字で示す。札は中身の幅にする */
.commission-status-list { justify-items: start; }
.commission-status-list .status {
  display: inline-flex; background: #000; border: 2px solid var(--white); padding: 10px 16px;
  box-shadow: 4px 4px 0 rgba(163,21,63,.9);
}
.status-audience { color: var(--muted); font-size: .85rem; }
.status-label { font-family: var(--font-mincho); font-weight: 800; font-size: 1.15rem; letter-spacing: .1em; }
.status[data-status="open"] .status-label { color: var(--crimson-hi); }
.status[data-status="closed"] .status-label { color: var(--muted); }
.status-note { color: var(--muted); font-size: .85rem; }
.commission-updated { margin: 12px 0 0; color: var(--muted); font-size: .82rem; letter-spacing: .06em; }

/* 制作実績: 2列のカード。「サイトを開く」の当たり判定(::after)をカード全体に広げ、画像を押しても開くようにする */
.portfolio { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 26px; }
.pf-card {
  position: relative; display: flex; flex-direction: column; background: var(--bg-2);
  border: 2px solid var(--white); box-shadow: 8px 8px 0 rgba(163,21,63,.9);
}
.pf-media { aspect-ratio: 16 / 10; overflow: hidden; background: #000; border-bottom: 2px solid var(--white); }
.pf-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pf-body { display: grid; gap: 6px; padding: 16px 20px 20px; }
.pf-name { margin: 0; font-family: var(--font-mincho); font-weight: 800; font-size: 1.3rem; letter-spacing: .06em; }
.pf-note { margin: 0; color: var(--muted); font-size: .88rem; }
.pf-link { justify-self: start; margin-top: 10px; padding: 8px 18px; font-size: .88rem; }
.pf-link::after { content: ""; position: absolute; inset: 0; }
/* Why not: ホバーでボタンやカードを動かさない。ボタンを動かすとカード全体に広げた当たり判定もずれ、
   カードの transform はスクロール演出(.js .reveal.in)の指定に負けて効かないため。枠と影の色だけを変える */
.pf-card .pf-link:hover, .pf-card .pf-link:active { transform: none; }
@media (hover: hover) {
  .pf-card:hover { border-color: var(--crimson-hi); box-shadow: 8px 8px 0 var(--crimson); }
}

/* 料金表 */
.commission-category {
  background: var(--bg-2); border: 2px solid var(--white); padding: 20px clamp(16px, 3vw, 28px) 24px;
  box-shadow: 8px 8px 0 rgba(163,21,63,.9);
}
.category-title { margin: 0 0 12px; font-family: var(--font-mincho); font-weight: 800; font-size: 1.3rem; letter-spacing: .06em; }
.commission-category .price-table thead th { color: var(--crimson-hi); font: italic 500 1rem var(--font-en); letter-spacing: .1em; border-bottom: 2px solid var(--white); }
.commission-category .price-table tbody tr + tr { border-top: 1px dashed var(--line); }
.commission-category .price-table th, .commission-category .price-table td { padding: 12px 6px; }
.price-name { font-weight: 700; }
.price-description { color: var(--muted); font-size: .85rem; }
.price-value { font-family: var(--font-mincho); font-weight: 800; font-size: 1.1rem; }
.commission-delivery { margin: 16px 0 0; color: var(--muted); font-size: .9rem; }

/* 流れ: 番号は大きい斜体(節の番号と同じ書体)で左に置く */
.commission-flow-list { list-style: none; counter-reset: flow; margin: 0; padding: 0; display: grid; gap: 14px; }
.commission-flow-list li { counter-increment: flow; display: grid; grid-template-columns: 48px 1fr; align-items: baseline; }
.commission-flow-list li::before {
  content: counter(flow, decimal-leading-zero);
  font: italic 600 1.6rem/1 var(--font-en); color: var(--crimson-hi);
}

/* 注意事項・規約 */
.commission-sub { margin: 36px 0 12px; font-family: var(--font-mincho); font-weight: 800; font-size: 1.2rem; letter-spacing: .06em; }
.commission-notes-list, .commission-terms-list { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.commission-notes-list li::marker, .commission-terms-list li::marker { color: var(--crimson-hi); }

/* ご依頼方法 */
.commission-contacts-list .contact-link {
  justify-self: start; display: inline-block; padding: 12px 28px; font-weight: 700; text-decoration: none;
  color: var(--white); background: var(--crimson); border: 2px solid var(--white);
  box-shadow: 4px 4px 0 rgba(163,21,63,.5); transition: transform .15s, box-shadow .15s;
}
.commission-contacts-list a.contact-link:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--crimson); }
.contact-note { color: var(--muted); font-size: .85rem; margin-top: 6px; }

/* トップページからの入口 */
.commission-entry { margin-top: 20px; }

@media (max-width: 720px) {
  .sp-only { display: inline; }
  .portfolio { grid-template-columns: 1fr; }
}

/* ==========================================================
   クレジットページ(credits/index.html)
   依頼して作っていただいたもの。ギャラリーと同じ「白ふちの枠と赤い影」で見せる
   ========================================================== */
#credits { padding-top: clamp(40px, 7vw, 88px); }
.sec-title {
  margin: 8px 0 20px; font-family: var(--font-mincho); font-weight: 800;
  font-size: clamp(2rem, 6.4vw, 3.4rem); line-height: 1.3; letter-spacing: .06em;
}
.credits-lead { margin: 0; color: var(--ink); }
.credit { margin-top: clamp(36px, 5vw, 56px); }
.credit-heading {
  margin: 0 0 14px; padding-left: 12px; border-left: 4px solid var(--crimson);
  font-family: var(--font-mincho); font-weight: 800; font-size: clamp(1.1rem, 3.4vw, 1.35rem);
  line-height: 1.4; letter-spacing: .08em;
}
.credit-creator { margin: 0; font-family: var(--font-mincho); font-weight: 800; font-size: 1.05rem; letter-spacing: .04em; }
.credit-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 0; padding: 0; list-style: none; font-size: .9rem; }
.credit-link, .credit-title a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--crimson); text-underline-offset: 4px; }
@media (hover: hover) { .credit-link:hover, .credit-title a:hover { color: var(--crimson-hi); } }
.credit-works {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px 22px; align-items: start; margin-top: 22px;
}
.credit-work { margin: 0; }
/* 透過のロゴが、ページの黒い地に溶けないよう、ギャラリーのロゴと同じ地を敷く */
.credit-zoom {
  display: block; width: 100%; padding: 0; cursor: zoom-in;
  background: linear-gradient(160deg, #1c1517, #0b090a);
  border: 2px solid var(--white); box-shadow: 6px 6px 0 var(--crimson);
  transition: transform .15s ease, box-shadow .15s ease;
}
@media (hover: hover) { .credit-zoom:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--crimson); } }
.credit-zoom img { display: block; width: 100%; height: auto; }
.credit-title { margin-top: 12px; font-size: .86rem; color: var(--muted); letter-spacing: .04em; }
/* トップページへの戻り道。右下に固定する(parts.md の決まり。素材が増えてページが長くなっても、戻れるように) */
.back-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 15;
  padding: 10px 16px; font-size: .86rem; font-weight: 700; letter-spacing: .08em; text-decoration: none;
  color: #fff; background: #000; border: 2px solid var(--white); box-shadow: 4px 4px 0 var(--crimson);
}
@media (hover: hover) { .back-top:hover { background: var(--crimson); } }
