/* サマーリプライ 特設サイト
   見た目はゲームの「ノート・手帳」風（紺のインク・罫線・付せん・チェキ）に合わせている */

:root {
  --ink: #2b3a5c;
  --ink-2: #4b5b7e;
  --ink-soft: #6f7c99;
  --paper: #fffdf6;
  --desk: #f6f1e6;
  --sky: #eaf3fb;
  --rule: #d9e0ee;
  --margin: #eba3a3;
  --red: #d9534f;
  --orange: #f0843c;
  --cta: #e8613c;
  --cta-2: #ff8a5c;
  --marker: #ffe57a;
  --mizuki: #8db8e8;
  --miyako: #f29bb6;
  --reika: #b9a0e8;
  --takumi: #93c98a;
  --note-y: #fff3a8;
  --note-b: #dbe9fb;
  --note-p: #ffdbe4;
  --note-g: #def2d5;
  --shadow: 0 10px 28px rgba(43, 58, 92, .14), 0 2px 6px rgba(43, 58, 92, .08);
  --hand: "Klee One", "UD デジタル 教科書体 N-R", "UD Digi Kyokasho N-R", "Hiragino Mincho ProN", serif;
  --gothic: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --en: "Cormorant Garamond", "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--hand);
  font-size: 17px;
  line-height: 1.9;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
/* 見出しは文節で折り返す（対応していないブラウザでは今までどおり） */
h1, h2, h3, .hero-lead, .feat-lead, .cp-catch, .flow b, .flow-end, .stream-big { word-break: auto-phrase; }
/* 英字の書体の数字は、高さのそろった形に */
.band-en, .cal b, .stamps b, .flow li::before, .dl-title span { font-variant-numeric: lining-nums; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- 上のバー ---------- */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  height: 60px; padding: 0 20px;
  transition: background .3s, box-shadow .3s;
}
.bar.is-solid { background: rgba(43, 58, 92, .95); box-shadow: 0 2px 14px rgba(20, 28, 46, .25); backdrop-filter: blur(6px); color: #fff; }
.bar-logo { opacity: 0; pointer-events: none; transition: opacity .3s; }
.bar.is-solid .bar-logo { opacity: 1; pointer-events: auto; }
.bar-logo img { height: 34px; width: auto; }
.bar.is-solid .bar-dl { background: var(--cta); }
.bar-nav { display: flex; gap: 22px; margin-left: auto; font-family: var(--gothic); font-weight: 700; font-size: 14px; letter-spacing: .08em; }
.bar-nav a { text-decoration: none; padding: 6px 0; position: relative; }
.bar-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 2px; height: 2px; background: var(--orange); transition: right .25s; }
.bar-nav a:hover::after { right: 0; }
.bar-dl {
  font-family: var(--gothic); font-weight: 700; font-size: 14px; text-decoration: none;
  color: #fff; background: var(--ink); padding: 8px 16px; border-radius: 4px;
}
.bar-dl:hover { background: var(--cta); }

/* ---------- トップ ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; background: #fff; }
/* トップの絵：3人の絵（背景が透明）を右下に置き、うしろは夏の空の色 */
.hero-bg {
  position: absolute; inset: 0; overflow: hidden;
  background:
    radial-gradient(60% 70% at 72% 55%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #a9d3f2 0%, #d8ecfa 45%, #fffdf6 100%);
}
/* 教室の窓（ゲームの昼の教室の絵を反転してぼかしたもの）。文字のある左と下はうすく消す */
.hero-window {
  position: absolute; top: 0; right: 0; width: 66%; height: 100%;
  background: url(img/hero_window.webp) left center / cover no-repeat; opacity: .5;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 40%), linear-gradient(180deg, #000 45%, transparent 92%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, #000 40%), linear-gradient(180deg, #000 45%, transparent 92%);
  mask-composite: intersect;
}
/* 光の粒（main.js が作る） */
.hero-sparkles { position: absolute; inset: 0; pointer-events: none; }
.hero-sparkles i {
  position: absolute; width: var(--s); height: var(--s); border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(255, 255, 255, .85) 30%, rgba(255, 255, 255, 0) 70%);
  box-shadow: 0 0 calc(var(--s) * 2) rgba(255, 255, 255, .8);
  opacity: 0; animation: twinkle var(--d) ease-in-out var(--dl) infinite;
}
@keyframes twinkle { 0%, 100% { opacity: 0; transform: translateY(0) scale(.6); } 45% { opacity: 1; transform: translateY(-14px) scale(1); } 70% { opacity: .7; } }
/* 3人の絵：上のバーの下から、画面より少し大きく（下の白いもやの所は画面の外へ） */
.hero-chara {
  position: absolute; right: max(1vw, calc(50% - 680px));
  height: min(calc((100% - 56px) * 1.15), 1300px); bottom: max(calc((100% - 56px) * -.15), -170px);
  aspect-ratio: 1150 / 1516;
  filter: drop-shadow(0 10px 24px rgba(43, 58, 92, .18));
}
.hero-chara img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
/* 読みこみがすんだら（main.js が is-ready を付ける）、瑞希→麗華→美也子の順にふわっと出す */
.js .hero-chara img { opacity: 0; }
.hero-chara.is-ready img { animation: charaIn 1.4s cubic-bezier(.2, .7, .2, 1) both; }
.hero-chara.is-ready .hc-mizuki { animation-delay: .2s; }
.hero-chara.is-ready .hc-reika { animation-delay: 1.1s; }
.hero-chara.is-ready .hc-miyako { animation-delay: 2s; }
@keyframes charaIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
/* いちばん下は紙の色へなじませる（3人の絵が画面の下で切れて見えないように） */
.hero-bg::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 110px; background: linear-gradient(180deg, rgba(255, 253, 246, 0), var(--paper) 88%); }
.hero-in { position: relative; z-index: 1; width: min(700px, 100%); padding: 96px 0 96px clamp(20px, 5vw, 72px); }
.hero-logo { position: relative; margin: 0 0 28px; width: min(600px, 100%); animation: fadeUp 1s .5s both; }
.hero-logo img { position: relative; z-index: 1; filter: drop-shadow(0 0 1.5px rgba(29, 43, 74, .8)) drop-shadow(0 3px 10px rgba(29, 43, 74, .55)); }
/* ロゴのうしろの大きな英字（うすい白）。ロゴの真ん中に重ねる。
   広い画面でも左はしが画面の外へ出ないように、真ん中の位置を右へずらす（「SUMMER」のはばは文字の大きさの約4.45倍） */
.hero-word {
  --fs: clamp(84px, 11.5vw, 170px);
  position: absolute; top: 50%; z-index: 0; transform: translate(-50%, -50%);
  left: max(50%, calc(var(--fs) * 2.23 + 16px - clamp(20px, 5vw, 72px)));
  white-space: nowrap; text-align: center; pointer-events: none;
  font-family: var(--en); font-weight: 600; font-size: var(--fs); line-height: .88; letter-spacing: .05em;
  color: rgba(255, 255, 255, .62); text-shadow: 0 4px 36px rgba(110, 160, 215, .35);
}
/* 英字より前に出す */
.hero-catch, .hero-lead, .hero-cta { position: relative; z-index: 1; }
.hero-catch {
  margin: 0 0 18px; font-family: var(--gothic); font-weight: 900; font-size: clamp(24px, 2.9vw, 36px); line-height: 1.55; letter-spacing: .02em;
  text-shadow: 0 0 18px rgba(255, 255, 255, .9), 0 0 4px rgba(255, 255, 255, .9);
  animation: fadeUp 1s .9s both;
}
.hero-catch span { display: inline-block; }
.hero-catch em { font-style: normal; background: linear-gradient(transparent 62%, var(--marker) 62%); }
.hero-lead { margin: 0 0 30px; font-size: clamp(15px, 1.5vw, 18px); font-weight: 600; text-shadow: 0 0 12px #fff, 0 0 4px #fff; animation: fadeUp 1s 1.2s both; }
.hero-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; animation: fadeUp 1s 1.5s both; }
.hero-spec { margin: 0; font-family: var(--gothic); font-weight: 700; font-size: 14px; text-shadow: 0 0 8px #fff; }
.hero-scroll {
  position: absolute; left: clamp(20px, 5vw, 72px); bottom: 18px; z-index: 1;
  font-family: var(--en); font-weight: 600; letter-spacing: .3em; font-size: 13px; text-decoration: none; color: var(--ink-soft);
  padding-bottom: 30px;
}
.hero-scroll::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 24px; background: var(--ink-soft); animation: drip 1.8s infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ダウンロードのボタン（付せん風） */
.btn-dl {
  display: inline-flex; align-items: center; gap: 12px; position: relative;
  font-family: var(--gothic); font-weight: 900; font-size: 19px; letter-spacing: .06em; text-decoration: none;
  color: #fff; background: var(--cta); padding: 14px 34px 14px 30px;
  border-left: 10px solid #c9452a; border-radius: 2px;
  box-shadow: 0 8px 18px rgba(232, 97, 60, .35); transform: rotate(-1.2deg);
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-dl::after { content: "→"; font-weight: 700; transition: transform .2s; }
.btn-dl:hover { transform: rotate(0) translateY(-2px); box-shadow: 0 12px 22px rgba(232, 97, 60, .42); background: var(--cta-2); }
.btn-dl:hover::after { transform: translateX(4px); }
.btn-dl[aria-disabled="true"] { background: #a7aec0; border-left-color: #8890a6; box-shadow: none; cursor: default; transform: none; }
.btn-dl[aria-disabled="true"]::after { content: none; }

/* ---------- 見出し・共通 ---------- */
/* section の色は、見出しの帯の下からだけぬる（帯の中は、いちばん奥の背景が見えるように透明） */
.sec {
  --band-h: clamp(210px, 24vw, 320px); --slant: calc(var(--band-h) * .3);
  padding: 0 0 96px; position: relative;
  background: linear-gradient(var(--sec-bg), var(--sec-bg)) 0 var(--band-h) / 100% 100% no-repeat;
}
.band + .wrap { padding-top: 64px; }

/* ---------- いちばん奥に固定した背景（見出しの帯からだけ見える） ---------- */
.scene-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100lvh; z-index: -1; background: var(--ink); }
.scene { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transition: opacity .9s ease; }
.scene.is-on { opacity: 1; }
.scene::after { content: ""; position: absolute; inset: 0; background: rgba(25, 36, 66, .3); }

/* ---------- 見出しの斜めの帯 ---------- */
/* 帯のまわりの三角を、上は前の section の色・下はこの section の色でぬり、まん中の平行四辺形だけ透明にする */
.band { position: relative; height: var(--band-h); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.band::before, .band::after { content: ""; position: absolute; inset: -1px 0; }
.band::before { background: var(--prev); clip-path: polygon(0 0, 100% 0, 0 calc(var(--slant) + 1px)); }
.band::after { background: var(--sec-bg); clip-path: polygon(0 100%, 100% calc(100% - var(--slant) - 1px), 100% 100%); }
.band > * { position: relative; z-index: 1; }
/* 英字は、文字数（--len）に合わせて、画面のはばに収まる大きさまで小さくする（--k は1文字のはば。文字の間かくで変わる） */
.band-en {
  --k: .95;
  font-family: var(--en); font-weight: 600; font-size: min(clamp(54px, 8.5vw, 124px), calc((100vw - 32px) / (var(--len, 8) * var(--k))));
  line-height: 1; letter-spacing: .22em; padding-left: .22em;
  color: rgba(255, 255, 255, .32); white-space: nowrap;
}
.band-ja {
  margin: -.55em 0 0; font-family: var(--gothic); font-weight: 900; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.4; color: #fff;
  text-shadow: 0 2px 14px rgba(15, 24, 48, .65), 0 0 2px rgba(15, 24, 48, .5);
}
.band-ja::after { content: ""; display: block; width: 2.2em; height: 4px; margin: 10px auto 0; background: var(--marker); border-radius: 2px; }
.sub { font-family: var(--gothic); font-weight: 700; font-size: 20px; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.sub::before { content: ""; width: 6px; height: 1.1em; background: var(--ink); border-radius: 1px; }

/* ノートの紙（罫線と赤い余白線） */
/* 1行の高さ --lh を罫線の間かくにそろえ、文字が罫線の上に乗るように少し上へずらす */
.paper {
  --lh: 40px;
  position: relative; background-color: var(--paper);
  background-image: linear-gradient(transparent calc(100% - 1px), var(--rule) calc(100% - 1px));
  background-size: 100% var(--lh); background-position: 0 calc(var(--lh) * -.22);
  box-shadow: var(--shadow); border-radius: 3px;
  padding: var(--lh) 2em var(--lh) 4.2em; line-height: var(--lh);
}
.paper::before { content: ""; position: absolute; top: 0; bottom: 0; left: 2.8em; width: 1.5px; background: var(--margin); }
.paper p, .paper li { line-height: var(--lh); margin: 0; }
.paper .gap { margin-top: var(--lh); }

/* ---------- あらすじ ---------- */
.story { --sec-bg: var(--desk); --prev: var(--paper); }
.story-grid { display: grid; grid-template-columns: 1fr 220px; gap: 48px; align-items: center; max-width: 960px; margin: 0 auto; }
.story-paper { --lh: 44px; font-size: 18px; transform: rotate(-.4deg); }
.story-date mark { background: linear-gradient(transparent 55%, var(--marker) 55%); color: inherit; font-weight: 600; }
.story-quote { font-weight: 600; font-size: 1.12em; color: var(--ink); }
.story-big { font-family: var(--gothic); font-weight: 900; font-size: 1.5em; color: var(--red); letter-spacing: .04em; }
.cal { list-style: none; margin: 0; padding: 18px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; background: #fff; box-shadow: var(--shadow); transform: rotate(1.8deg); position: relative; }
.cal::before { content: "JULY"; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-family: var(--en); font-weight: 600; letter-spacing: .3em; background: #f9c784; color: #7a4a12; padding: 2px 16px 2px 20px; font-size: 13px; }
.cal li { border: 1px solid var(--rule); padding: 6px 8px; text-align: center; line-height: 1.2; position: relative; }
.cal b { display: block; font-family: var(--en); font-size: 28px; font-weight: 600; }
.cal span { font-size: 13px; color: var(--ink-soft); }
.cal li:nth-child(6) span { color: #3d6fc6; }
.cal-fes { grid-column: span 2; }
.cal-fes em { display: block; font-style: normal; font-family: var(--gothic); font-weight: 900; color: var(--red); font-size: 15px; margin-top: 2px; }
.cal-fes::after { content: ""; position: absolute; inset: -4px -2px; border: 2.5px solid var(--red); border-radius: 50% 46% 52% 48%; transform: rotate(-3deg); }

/* ---------- システム ---------- */
.system { --sec-bg: var(--sky); --prev: var(--desk); }
.feat-main { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: start; margin-bottom: 72px; }
.cheki { margin: 0; background: #fff; padding: 14px 14px 18px; box-shadow: var(--shadow); position: relative; }
.cheki::before { content: ""; position: absolute; top: -12px; left: 50%; width: 120px; height: 26px; transform: translateX(-50%) rotate(-2deg); background: repeating-linear-gradient(45deg, rgba(249, 199, 132, .85) 0 8px, rgba(252, 214, 160, .85) 8px 16px); }
.cheki figcaption { font-size: 15px; text-align: center; margin-top: 10px; color: var(--ink-2); }
.tilt-l { transform: rotate(-1.4deg); }
.feat-lead { font-family: var(--gothic); font-weight: 700; font-size: 21px; margin: 0 0 12px; line-height: 1.7; }
.feat-lead strong { background: linear-gradient(transparent 60%, var(--marker) 60%); }
.feat-text > p { margin: 0 0 24px; }

/* 会話の例（ゲームの入力欄とメッセージ枠をまねた形） */
.talk-demo { background: var(--paper); box-shadow: var(--shadow); border-radius: 4px; padding: 16px; }
.td-input { display: flex; align-items: center; gap: 8px; border: 2px solid var(--ink); border-radius: 3px; padding: 6px 6px 6px 12px; background: #fff; min-height: 50px; }
.td-typing { flex: 1; font-size: 16px; min-height: 1.4em; line-height: 1.4; }
.td-typing:empty::before { content: "美也子への返事を書こう"; color: #a5adbf; }
.td-caret { display: none; }
.td-input button { border: 0; background: var(--ink); color: #fff; font-family: var(--gothic); font-weight: 700; padding: 6px 14px; border-radius: 3px; font-size: 14px; }
.td-input.is-send button { background: var(--cta); }
.td-log { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-height: 260px; }
.td-log li { max-width: 88%; padding: 8px 14px; border-radius: 3px; font-size: 15.5px; line-height: 1.7; opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s; }
.td-log li.is-on { opacity: 1; transform: none; }
.td-me { align-self: flex-end; background: #dfe8f7; }
.td-her { align-self: flex-start; background: #fff; border: 1px solid var(--rule); position: relative; padding-top: 22px !important; }
.td-her::after { content: attr(data-name); position: absolute; top: -10px; left: -4px; background: var(--ink); color: #fff; font-family: var(--gothic); font-weight: 700; font-size: 12px; padding: 1px 12px 1px 14px; clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%); }
.td-note { margin: 10px 0 0; font-size: 13px; color: var(--ink-soft); text-align: right; }

/* 付せんの特長 */
.feats { list-style: none; margin: 0 0 72px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.note { padding: 18px 18px 20px; box-shadow: 0 6px 14px rgba(43, 58, 92, .12); position: relative; border-top: 8px solid rgba(0, 0, 0, .06); }
.note:nth-child(odd) { transform: rotate(-1deg); }
.note:nth-child(even) { transform: rotate(1.1deg); }
.note h3 { font-family: var(--gothic); font-weight: 700; font-size: 17px; margin: 12px 0 6px; line-height: 1.5; }
.note p { margin: 0; font-size: 15px; line-height: 1.8; }
.note-y { background: var(--note-y); border-top-color: #f0d64a; }
.note-b { background: var(--note-b); border-top-color: #8db8e8; }
.note-p { background: var(--note-p); border-top-color: #f29bb6; }
.note-g { background: var(--note-g); border-top-color: #8fcf80; }
.note-y h3 { margin-top: 0; font-size: 19px; }
.shot { display: block; width: 100%; padding: 0; border: 0; background: #fff; cursor: zoom-in; box-shadow: 0 2px 6px rgba(43, 58, 92, .15); }
.note .shot { padding: 5px; }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .3s; }
.shot:hover img { transform: scale(1.02); }

/* 1日の流れ */
.flow-wrap { max-width: 920px; margin: 0 auto 64px; }
.flow { list-style: none; counter-reset: f; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.flow li { counter-increment: f; background: #fff; padding: 14px 14px 16px; position: relative; box-shadow: 0 3px 10px rgba(43, 58, 92, .1); line-height: 1.6; }
.flow li::before { content: counter(f); position: absolute; top: -12px; left: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--en); font-weight: 600; font-size: 16px; display: grid; place-items: center; }
.flow li:not(:last-child)::after { content: ""; position: absolute; right: -10px; top: 50%; border: 6px solid transparent; border-left-color: var(--ink-soft); transform: translateY(-50%); }
.flow b { display: block; font-family: var(--gothic); font-weight: 700; margin: 6px 0 4px; }
.flow span { font-size: 14px; color: var(--ink-2); }
.flow-end { text-align: center; margin: 24px 0 0; font-size: 18px; }
.flow-end strong { font-family: var(--gothic); color: var(--red); font-size: 1.15em; }

/* ボリューム（赤いハンコ） */
/* ボリューム（煽り文句・角ハンコ・丸ハンコ・手書きのひとこと） */
.volume { text-align: center; max-width: 920px; margin: 0 auto 72px; }
.vol-head { display: inline-flex; align-items: center; gap: 22px; margin-bottom: 10px; }
.vol-catch { margin: 0; font-family: var(--gothic); font-weight: 900; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.4; }
.vol-catch span { display: inline-block; }
.vol-catch span:last-child { color: var(--red); background: linear-gradient(transparent 62%, var(--marker) 62%); }
.vol-hanko {
  width: calc(2em + 18px); padding: 3px 4px; flex: none; text-align: center;
  font-family: var(--gothic); font-weight: 900; font-size: 18px; line-height: 1.05; letter-spacing: 0;
  color: var(--red); border: 3px solid var(--red); border-radius: 5px; background: rgba(255, 255, 255, .55);
  transform: rotate(9deg); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6);
}
.vol-lead { margin: 0 auto 30px; max-width: 640px; color: var(--ink-2); }
.vol-doodle { display: inline-flex; align-items: flex-end; gap: 6px; margin: 22px 0 0; color: var(--red); font-weight: 600; transform: rotate(-2deg); }
.vol-doodle svg { width: 40px; height: 34px; fill: none; stroke: var(--red); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transform: scaleX(-1); }
.stamps { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 26px; }
.stamps li { --r: -6deg; width: 128px; height: 128px; border: 3px solid var(--red); border-radius: 50%; color: var(--red); display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--gothic); font-weight: 700; line-height: 1.2; background: rgba(255, 255, 255, .6); transform: rotate(var(--r)); }
.stamps li:nth-child(even) { --r: 5deg; }
/* 見えたら、ハンコを1つずつ「ポン」と押す */
.js .volume:not(.is-in) .stamps li, .js .volume:not(.is-in) .vol-hanko { opacity: 0; }
.volume.is-in .stamps li { animation: stampIn .42s cubic-bezier(.2, .9, .3, 1.25) both; }
.volume.is-in .stamps li:nth-child(1) { animation-delay: .15s; }
.volume.is-in .stamps li:nth-child(2) { animation-delay: .3s; }
.volume.is-in .stamps li:nth-child(3) { animation-delay: .45s; }
.volume.is-in .stamps li:nth-child(4) { animation-delay: .6s; }
.volume.is-in .stamps li:nth-child(5) { animation-delay: .75s; }
.volume.is-in .vol-hanko { --r: 9deg; animation: stampIn .45s 1.05s cubic-bezier(.2, .9, .3, 1.25) both; }
@keyframes stampIn { from { opacity: 0; transform: scale(1.9) rotate(var(--r)); } 70% { opacity: 1; } to { opacity: 1; transform: scale(1) rotate(var(--r)); } }
.stamps .n { font-size: 15px; display: flex; align-items: baseline; gap: 2px; }
.stamps b { font-family: var(--en); font-size: 46px; font-weight: 600; line-height: 1; }
.stamps .n + span { font-size: 12.5px; margin-top: 6px; }

/* AI の所：左上に「AI」のマーク、右上に「文→AIがつなぐ→吹き出し」の小さな絵。見えたら動いて出る */
.ai-box { position: relative; max-width: 820px; margin: 40px auto 0; background: #fff; border-left: 6px solid var(--ink); padding: 26px 30px 22px 62px; box-shadow: 0 3px 10px rgba(43, 58, 92, .08); }
.ai-box h3 { margin: 0 0 8px; font-family: var(--gothic); font-weight: 900; font-size: clamp(18px, 2vw, 22px); line-height: 1.5; padding-right: 150px; }
.ai-box h3 span { background: linear-gradient(transparent 58%, var(--marker) 58%) no-repeat 0 0 / 100% 100%; }
.ai-box p { margin: 0; font-size: 15.5px; }
.ai-box .ai-tag { display: inline-block; margin: 0 0 6px; padding: 1px 12px 1px 10px; font-family: var(--gothic); font-weight: 700; font-size: 12.5px; color: #fff; background: var(--cta); clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%); padding-right: 18px; }
.ai-badge { position: absolute; left: -34px; top: -30px; width: 84px; height: 84px; }
.ai-badge svg { width: 100%; height: 100%; overflow: visible; }
.ai-ring { fill: none; stroke: var(--cta); stroke-width: 2.4; stroke-dasharray: 5 6; transform-box: fill-box; transform-origin: center; animation: aiSpin 14s linear infinite; }
.ai-core { fill: var(--ink); }
.ai-badge text { font-family: var(--gothic); font-weight: 900; font-size: 24px; fill: #fff; letter-spacing: .02em; }
.ai-spark { fill: #ffcf3f; transform-box: fill-box; transform-origin: center; animation: aiTwinkle 2.2s ease-in-out infinite; }
.ai-spark.s2 { animation-delay: 1.1s; }
.ai-net { position: absolute; right: -26px; top: -52px; width: 190px; height: auto; overflow: visible; }
.ai-net .ln { fill: none; stroke: var(--mizuki); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 90; }
.ai-net .nd { fill: var(--ink); transform-box: fill-box; transform-origin: center; }
.ai-net .nd-m { fill: var(--cta); }
.ai-net .bubble { fill: #fff; stroke: var(--cta); stroke-width: 2.6; stroke-linejoin: round; transform-box: fill-box; transform-origin: 20% 90%; }
.ai-net .dot { fill: var(--cta); transform-box: fill-box; transform-origin: center; }
@keyframes aiSpin { to { transform: rotate(360deg); } }
@keyframes aiTwinkle { 0%, 100% { opacity: .25; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.1); } }
/* 見えたときの動き（読みこむ前・見える前は、最初の形にしておく） */
.js .ai-box[data-reveal]:not(.is-in) { opacity: 0; transform: translateY(26px); }
.ai-box[data-reveal] { transition: opacity .6s ease, transform .6s ease; }
.js .ai-box:not(.is-in) .ai-badge { transform: scale(0) rotate(-120deg); }
.ai-box.is-in .ai-badge { animation: aiPop .8s .25s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes aiPop { from { transform: scale(0) rotate(-120deg); } to { transform: scale(1) rotate(0); } }
.js .ai-box:not(.is-in) h3 span { background-size: 0% 100%; }
.ai-box.is-in h3 span { transition: background-size 1s .55s ease; }
.js .ai-box:not(.is-in) .ai-tag { opacity: 0; transform: translateX(-12px); }
.ai-box.is-in .ai-tag { transition: opacity .4s .35s, transform .4s .35s; }
.js .ai-box:not(.is-in) .ai-net .ln { stroke-dashoffset: 90; }
.ai-box.is-in .ai-net .ln { animation: aiDraw .55s var(--d) ease-out both; }
@keyframes aiDraw { from { stroke-dashoffset: 90; } to { stroke-dashoffset: 0; } }
.js .ai-box:not(.is-in) .ai-net .nd, .js .ai-box:not(.is-in) .ai-net .bubble { transform: scale(0); }
.ai-box.is-in .ai-net .nd { animation: aiNode .35s var(--d) cubic-bezier(.3, 1.6, .5, 1) both; }
.ai-box.is-in .ai-net .bubble { animation: aiNode .5s 1.2s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes aiNode { from { transform: scale(0); } to { transform: scale(1); } }
/* 吹き出しの中の点は、吹き出しが出てから見せる（点そのものは、ずっと順番にはねる） */
.js .ai-box:not(.is-in) .ai-net .dots { opacity: 0; }
.ai-box.is-in .ai-net .dots { animation: aiShow .3s 1.5s both; }
@keyframes aiShow { from { opacity: 0; } to { opacity: 1; } }
.ai-net .dot { animation: aiDot 1.3s calc(var(--i) * .18s) ease-in-out infinite; }
@keyframes aiDot { 0%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }

/* ---------- 登場人物 ---------- */
.chara { --sec-bg: var(--desk); --prev: var(--sky); }
.tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 34px; flex-wrap: wrap; }
.tab {
  border: 0; cursor: pointer; font-family: var(--gothic); font-weight: 700; font-size: 18px;
  padding: 10px 26px 10px 32px; background: #fff; position: relative; box-shadow: 0 3px 8px rgba(43, 58, 92, .12);
  transition: transform .2s;
}
.tab::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--c); }
.tab[aria-selected="true"] { background: var(--c); color: #fff; transform: translateY(-4px); }
.t-mizuki { --c: var(--mizuki); } .t-miyako { --c: var(--miyako); } .t-reika { --c: var(--reika); } .t-takumi { --c: var(--takumi); }
.tab[aria-selected="true"]::before { background: rgba(0, 0, 0, .15); }

.cp { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; max-width: 1000px; margin: 0 auto; }
.cp[hidden] { display: none; }
.c-mizuki { --c: var(--mizuki); } .c-miyako { --c: var(--miyako); } .c-reika { --c: var(--reika); } .c-takumi { --c: var(--takumi); }
.cp-stage { position: relative; height: min(680px, 80vh); display: flex; justify-content: center; }
.cp-stage::before { content: ""; position: absolute; inset: 16% 4% 0; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 45%, transparent), transparent); }
.cp-img { position: relative; height: 100%; width: auto; max-width: none; object-fit: contain; object-position: top; filter: drop-shadow(0 8px 14px rgba(43, 58, 92, .18)); animation: fadeUp .5s both; }
.faces { position: absolute; left: 0; bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
.faces button { border: 0; background: #fff; font-family: var(--gothic); font-weight: 700; font-size: 13px; padding: 5px 12px 5px 14px; cursor: pointer; box-shadow: 0 2px 6px rgba(43, 58, 92, .14); border-left: 5px solid var(--c); text-align: left; }
.faces button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.cp-card { background: #fff; padding: 34px 32px 28px; box-shadow: var(--shadow); position: relative; }
.cp-card::before { content: ""; position: absolute; top: -12px; left: 40px; width: 110px; height: 24px; background: var(--c); opacity: .85; transform: rotate(-3deg); }
.cp-catch { margin: 0; font-family: var(--gothic); font-weight: 700; color: var(--ink-soft); font-size: 15px; }
.cp-name { margin: 4px 0 14px; font-family: var(--gothic); font-weight: 900; font-size: 36px; letter-spacing: .06em; line-height: 1.6; }
.cp-name rt { font-size: 12px; font-weight: 500; letter-spacing: .1em; color: var(--ink-soft); }
.cp-line { margin: 0 0 16px; padding: 12px 16px; background: color-mix(in srgb, var(--c) 18%, #fff); border-left: 4px solid var(--c); font-weight: 600; line-height: 1.8; }
.cp-card > p:not([class]) { margin: 0 0 18px; }
.cp-prof { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; border-top: 1px dashed var(--rule); padding-top: 12px; }
.cp-prof div { padding: 4px 0; }
.cp-prof .wide { grid-column: 1 / -1; }
.cp-prof dt { font-family: var(--gothic); font-weight: 700; font-size: 12px; color: var(--ink-soft); }
.cp-prof dd { margin: 0; font-size: 15.5px; line-height: 1.6; }
.chara-hero { text-align: center; margin: 40px auto 0; font-size: 15px; color: var(--ink-2); max-width: 760px; }

/* ---------- ギャラリー ---------- */
.gallery { --sec-bg: var(--paper); --prev: var(--desk); }
.gal { list-style: none; margin: 0 0 40px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gal .shot { padding: 6px; }

/* ---------- 実況・配信 ---------- */
.stream { --sec-bg: var(--sky); --prev: var(--paper); }
.stream-card { max-width: 860px; margin: 0 auto; font-size: 17px; }
.stream-big { font-family: var(--gothic); font-weight: 900; font-size: 24px; }
.stream-big strong { color: var(--red); }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { padding-left: 1.6em; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--red); font-weight: 700; }
.stream-tip strong { background: linear-gradient(transparent 60%, var(--marker) 60%); }

/* ---------- ダウンロード ---------- */
.dl { --sec-bg: var(--desk); --prev: var(--sky); }
.dl-grid { display: grid; grid-template-columns: 380px 1fr; gap: 48px; align-items: start; max-width: 1000px; margin: 0 auto; }
.dl-card { background: #fff; text-align: center; padding: 36px 28px 28px; box-shadow: var(--shadow); position: relative; }
.dl-card::before { content: ""; position: absolute; top: -12px; left: 50%; width: 120px; height: 26px; transform: translateX(-50%) rotate(2deg); background: repeating-linear-gradient(45deg, rgba(141, 184, 232, .85) 0 8px, rgba(176, 205, 240, .85) 8px 16px); }
.dl-title { margin: 0; font-family: var(--gothic); font-weight: 900; font-size: 24px; }
.dl-title span { font-family: var(--en); font-size: 18px; color: var(--ink-soft); margin-left: 4px; }
.dl-price { display: table; margin: 12px auto 22px; font-family: var(--gothic); font-weight: 900; font-size: 20px; color: var(--red); border: 2.5px solid var(--red); border-radius: 50%; padding: 6px 18px; transform: rotate(-6deg); }
.btn-dl-big { font-size: 20px; padding: 16px 40px 16px 34px; }
.dl-size, .dl-release { margin: 18px 0 0; font-size: 14px; color: var(--ink-2); }
.dl-release { margin-top: 4px; }
.spec { margin: 0 0 8px; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--rule); }
.spec div { display: grid; grid-template-columns: 7em 1fr; padding: 8px 0; border-bottom: 1px solid var(--rule); line-height: 1.6; }
.spec dt { font-family: var(--gothic); font-weight: 700; font-size: 14px; color: var(--ink-soft); }
.spec dd { margin: 0; }
.spec-note { font-size: 14px; color: var(--ink-2); margin: 0 0 32px; }
.steps { margin: 0; padding-left: 1.4em; }
.steps li { margin-bottom: 6px; line-height: 1.7; }

/* ---------- AI の利用・クレジット ---------- */
.info { --sec-bg: var(--paper); --band-h: 0px; padding: 72px 0; font-size: 15.5px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.info p { margin: 0 0 12px; }
.credit { margin: 0; }
.credit div { display: grid; grid-template-columns: 9em 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--rule); line-height: 1.6; }
.credit dt { font-family: var(--gothic); font-weight: 700; font-size: 13.5px; color: var(--ink-soft); }
.credit dd { margin: 0; }

/* ---------- いちばん下 ---------- */
.foot { background: var(--ink); color: #fff; text-align: center; padding: 48px 16px 40px; font-family: var(--gothic); }
.foot-logo { width: 260px; margin: 0 auto 18px; }
.foot-links { list-style: none; margin: 0 0 16px; padding: 0; display: flex; justify-content: center; gap: 24px; font-weight: 700; }
.foot-links a { text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .5); }
.foot-copy { margin: 0 0 6px; font-size: 14px; }
.foot-note { margin: 0; font-size: 12px; opacity: .7; }

/* ---------- 大きく見る ---------- */
.lb { border: 0; padding: 0; background: transparent; max-width: min(1280px, 94vw); width: 100%; overflow: visible; }
.lb::backdrop { background: rgba(20, 28, 46, .86); }
.lb figure { margin: 0; }
.lb img { width: 100%; background: #000; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lb figcaption { color: #fff; text-align: center; margin-top: 10px; font-family: var(--gothic); font-weight: 700; }
.lb button { position: absolute; border: 0; background: rgba(255, 255, 255, .92); color: var(--ink); width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb-prev { left: -22px; top: 45%; }
.lb-next { right: -22px; top: 45%; }
.lb-close { right: -12px; top: -16px; font-size: 22px !important; }

/* ---------- 画面がせまいとき ---------- */
@media (max-width: 960px) {
  .feats { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: 1fr; gap: 16px; }
  .flow li:not(:last-child)::after { right: auto; left: 50%; top: auto; bottom: -14px; border-left-color: transparent; border-top-color: var(--ink-soft); transform: translateX(-50%); }
  .feat-main { grid-template-columns: 1fr; gap: 40px; }
  .dl-grid { grid-template-columns: 1fr; }
  .dl-card { max-width: 420px; margin: 0 auto; width: 100%; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .bar { padding: 0 12px; height: 54px; }
  .bar-nav { display: none; }
  .bar-dl { margin-left: auto; }
  .bar-logo img { height: 28px; }
  html { scroll-padding-top: 60px; }

  .hero { display: block; min-height: 0; background: var(--paper); }
  /* スマホ：上に空の色とロゴ、その下に3人の絵、いちばん下に文字 */
  .hero-bg { position: relative; height: min(160vw, 760px); }
  .hero-chara { right: 50%; transform: translateX(50%); height: calc(100% - 120px); bottom: -40px; }
  /* ロゴのうしろ（上の方）は窓を出さず、空の色のままにする */
  .hero-window { width: 100%; -webkit-mask-image: linear-gradient(180deg, transparent 0, transparent 120px, #000 240px, #000 50%, transparent 90%); mask-image: linear-gradient(180deg, transparent 0, transparent 120px, #000 240px, #000 50%, transparent 90%); }
  .hero-word { --fs: 21vw; left: 50%; }
  .hero-in { position: static; padding: 0 16px 48px; margin-top: -8px; }
  .hero-logo { position: absolute; z-index: 2; top: 62px; left: 50%; transform: translateX(-50%); width: min(82%, 380px); margin: 0; animation: none; }
  .hero-catch { font-size: 24px; }
  .hero-scroll { display: none; }

  .sec { padding: 0 0 68px; }
  .sec:not(.info) { --band-h: 190px; }
  .info { padding: 56px 0; }
  .band + .wrap { padding-top: 44px; }
  .band-en { --k: .86; letter-spacing: .12em; padding-left: .12em; }
  .story-grid { grid-template-columns: 1fr; gap: 36px; }
  .cal { grid-template-columns: repeat(3, 1fr); max-width: 320px; margin: 0 auto; }
  .cal-fes { grid-column: span 3; }
  .paper { --lh: 36px; padding: var(--lh) 1.1em var(--lh) 2.6em; font-size: 16px; }
  .paper::before { left: 1.7em; }
  .story-paper { --lh: 38px; font-size: 16px; }

  .feats { grid-template-columns: 1fr; }
  .stamps li { width: 104px; height: 104px; }
  .stamps b { font-size: 38px; }
  .vol-head { gap: 14px; }
  .vol-hanko { font-size: 15px; }
  .ai-box { margin-top: 70px; padding: 26px 18px 20px 20px; }
  .ai-box h3 { padding-right: 0; }
  .ai-badge { left: -8px; top: -46px; width: 66px; height: 66px; }
  .ai-net { right: -4px; top: -60px; width: 128px; }

  .tab { font-size: 16px; padding: 8px 16px 8px 22px; }
  .cp { grid-template-columns: 1fr; gap: 20px; }
  .cp-stage { height: 440px; }
  .faces { bottom: 8px; }
  .cp-card { padding: 28px 18px 20px; }
  .cp-name { font-size: 30px; }
  .cp-prof { grid-template-columns: repeat(3, 1fr); }

  .gal { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gal-ss { grid-template-columns: 1fr; }
  .gal .shot { padding: 4px; }
  .stream-big { font-size: 19px; }
  .info-grid { grid-template-columns: 1fr; gap: 32px; }
  .credit div { grid-template-columns: 1fr; gap: 0; }
  .lb-prev { left: 4px; top: auto; bottom: -56px; }
  .lb-next { right: 4px; top: auto; bottom: -56px; }
  .lb-close { right: 4px; top: -52px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .td-log li { opacity: 1; transform: none; }
  .hero-chara img { opacity: 1 !important; }
}
