/* =========================================================
   二人の天使 — TWIN ANGEL
   テーマ: おとぎ話の絵本（クリームの紙 × 金の飾り枠 × ピンク／ラベンダー／水色 × 紺の夜）
   基準は /DESIGN.md
   ========================================================= */

:root {
  --paper: #fdf7f1;
  --paper-2: #f8eee6;
  --pink: #f7d7e3;
  --pink-deep: #ec9fbf;
  --lavender: #e4dbf5;
  --lavender-deep: #b9a6e3;
  --sky: #d6e9fb;
  --sky-deep: #8fc1ec;
  --navy: #2b3a66;
  --navy-deep: #1a2648;
  --gold: #c9a35a;
  --gold-light: #ead9a6;
  --gold-deep: #9d7a35;
  --rose: #c94c6a;
  --apple: #c8323c;
  --ink: #3a2f3f;
  --ink-soft: #7a6a7e;
  --white: #ffffff;

  --font-en: "Cormorant Garamond", "Times New Roman", serif;
  --font-jp: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-ui: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;

  --container: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;

  /* 金の飾り枠の角（四隅に置く小さな唐草） */
  --corner: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><path d="M2 38V14C2 7 7 2 14 2h24" fill="none" stroke="%23c9a35a" stroke-width="2.4" stroke-linecap="round"/><path d="M8 30c0-9 5-14 14-14" fill="none" stroke="%23c9a35a" stroke-width="1.6" stroke-linecap="round"/><circle cx="22" cy="16" r="2.4" fill="%23c9a35a"/><circle cx="8" cy="30" r="2.4" fill="%23c9a35a"/><path d="M14 10c3-3 8-4 12-2" fill="none" stroke="%23c9a35a" stroke-width="1.4" stroke-linecap="round"/></svg>');
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { text-wrap: balance; }

.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--rose); color: #fff; padding: 8px 16px; border-radius: 6px; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }

.container { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }
.section { position: relative; padding-block: clamp(72px, 9vw, 120px); }

/* セクションの境のレース（白いスカラップ） */
.lace::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 18px; pointer-events: none;
  background:
    radial-gradient(circle at 50% 0, var(--white) 10px, transparent 11px) 0 0 / 28px 18px repeat-x,
    radial-gradient(circle at 50% 0, rgba(201, 163, 90, .5) 12px, transparent 13px) 0 1px / 28px 18px repeat-x;
}

/* ---------- header（紺のバー） ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-inline: var(--gutter);
  color: var(--white);
  border-bottom: 1px solid rgba(201, 163, 90, .45);
}
/* ぼかしは疑似要素に置く。header 本体に backdrop-filter を付けると、スマホの全画面メニュー（position: fixed）が
   header の高さに閉じ込められて文字が上にはみ出す */
.header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(27, 38, 72, .92); backdrop-filter: blur(8px); }
.header__logo { display: flex; flex-direction: column; line-height: 1.1; text-decoration: none; }
.header__ja { font-family: var(--font-jp); font-weight: 700; font-size: 20px; letter-spacing: .1em; }
.header__en { font-family: var(--font-en); font-style: italic; font-size: 12px; letter-spacing: .1em; color: var(--gold-light); }
.nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.nav a {
  font-family: var(--font-en); font-weight: 600; font-size: 15px; letter-spacing: .14em;
  text-decoration: none; padding: 6px 0; position: relative;
}
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold); transform: scaleX(0); transition: transform .25s ease; }
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); }
.header__toggle { display: none; }

@media (max-width: 1000px) {
  .header__toggle {
    display: grid; place-content: center; gap: 6px;
    width: 44px; height: 44px; cursor: pointer; background: none; border: 0; z-index: 2;
  }
  .header__toggle span { display: block; width: 24px; height: 2px; background: var(--white); transition: transform .3s ease; }
  .header__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .header__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 22px;
    background: radial-gradient(ellipse at 50% 20%, #3b4d85, var(--navy-deep));
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
  }
  .nav a { font-size: 22px; }
  .nav.is-open { opacity: 1; visibility: visible; }
}

/* =========================================================
   パーツ：支給素材を置き、素材の中の額に文字を載せる
   .slot の --x --y --w --h は素材画像のピクセル座標、--pw/--ph は素材の幅と高さ
   ========================================================= */
body {
  background:
    radial-gradient(ellipse 60% 40% at 0% 20%, rgba(214, 233, 251, .7), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 60%, rgba(247, 215, 227, .7), transparent 70%),
    linear-gradient(180deg, #f8f2fb, #f1ebfa 50%, #fbf0f5);
}
.panel { position: relative; container-type: inline-size; width: 100%; line-height: 1.6; }
.panel__bg { display: block; width: 100%; height: auto; }
/* 画像の保存よけ（guard.js）：絵の上に重ねる透明な画像。押せる文字やボタンはこれより後ろ・上に置く */
img { -webkit-touch-callout: none; -webkit-user-drag: none; user-select: none; }
/* 立ち絵などの img 向けの指定（大きさ・ずらし・影）に負けないよう、フィルムの形は !important で固定する */
.guard { position: absolute !important; display: block !important; max-width: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
  translate: none !important; transform: none !important; filter: none !important; opacity: 0; }
.guard--cover { inset: 0 !important; width: 100% !important; height: 100% !important; }
.guard--bg { left: 0 !important; top: 0 !important; width: 100% !important; height: auto !important; aspect-ratio: var(--pw) / var(--ph); }
.card__frame > .guard { z-index: 2; }
.cast__pop { position: relative; }
.goodsframe .goods__name { position: relative; z-index: 1; }
.slot {
  position: absolute; margin: 0;
  left: calc(var(--x) / var(--pw) * 100%);
  /* 縦位置も幅基準（100cqw＝素材の表示幅）で決める。スマホで額の下に札が流れて高さが伸びても位置がずれない */
  top: calc(var(--y) / var(--pw) * 100cqw);
  width: calc(var(--w) / var(--pw) * 100%);
  height: calc(var(--h) / var(--pw) * 100cqw);
}

/* セクション：見出しの額 + パーツ */
.sec { width: min(100% - var(--gutter) * 2, 1180px); margin-inline: auto; padding-block: clamp(32px, 4vw, 56px) 0; display: grid; justify-items: center; gap: 0; }
/* 見出しの額とパーツは画像の上下に透明な余白があるので、少し重ねて詰める */
.sec > .plate { margin-bottom: clamp(-48px, -3vw, -12px); position: relative; z-index: 1; }
.sec > .sec__note { margin-block: 8px; }
.sec .panel--part { width: 100%; }
.sec__note { margin: 0; max-width: 46em; text-align: center; font-size: clamp(13px, 1.2vw, 15px); line-height: 1.9; }
.sec__note--small { font-size: 12px; color: var(--ink-soft); }

/* 王冠付きの額（見出し・タイトル） */
.plate { position: relative; container-type: inline-size; width: min(100%, 560px); margin: 0; }
.plate img { display: block; width: 100%; height: auto; }
.plate__text { position: absolute; left: 30%; right: 30%; top: 35%; bottom: 39%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .2em; text-align: center; line-height: 1.05; }
.plate__en { font-family: var(--font-en); font-weight: 600; font-size: 4.3cqw; letter-spacing: .1em; color: var(--navy); white-space: nowrap; }
.plate__en--long { font-size: 3.2cqw; letter-spacing: .06em; }
.plate__ja { font-size: 1.9cqw; font-weight: 700; letter-spacing: .22em; color: var(--rose); }
.plate__title { font-family: var(--font-jp); font-weight: 800; font-size: 7cqw; letter-spacing: .1em; color: var(--navy); }

/* 共通の文字 */
.catch { margin: 0; font-family: var(--font-jp); font-weight: 800; font-size: 2.1cqw; line-height: 1.7; color: var(--navy); }
.body { margin: 0; font-size: 1.3cqw; line-height: 2; }
.label { margin: 0; font-size: 1.1cqw; font-weight: 700; letter-spacing: .16em; color: var(--rose); }
.coming-soon { margin: 0; font-family: var(--font-en); font-weight: 600; font-size: 1.6cqw; letter-spacing: .14em; color: var(--navy); }
.hashtag { margin: 0; font-family: var(--font-jp); font-weight: 800; font-size: 2cqw; color: var(--navy); }
.copy { all: unset; box-sizing: border-box; cursor: pointer; font-family: var(--font-ui); font-weight: 700; font-size: 1cqw; color: var(--white); background: var(--navy); border-radius: 999px; padding: .2em 1.2em; }
.copy:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; }
.pills { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .5cqw; margin: 0; padding: 0; }
.pill {
  display: inline-flex; align-items: center; padding: .3em 1em;
  font-family: var(--font-ui); font-weight: 700; font-size: 13px; text-decoration: none; white-space: nowrap;
  color: var(--navy); background: rgba(255, 255, 255, .9); border: 1px solid var(--gold); border-radius: 999px;
}
.pills .pill { font-size: 1.05cqw; }
a.pill:hover { background: var(--navy); color: var(--white); }
.pill.is-soon { color: var(--ink-soft); border-style: dashed; background: rgba(255, 255, 255, .6); }

/* ---------- hero ---------- */
/* 1画面に収める：高さ＝画面−ヘッダー。背景は cover（横中央・上端合わせ）。
   --s は背景素材 1px あたりの表示サイズ。上の額（素材座標 712,84 / 248×50）に文字を合わせるのに使う */
.panel--hero {
  --mx: 0; --my: 0; --sy: 0;
  margin-top: var(--header-h); overflow: hidden;
  container-type: size; min-height: 520px;
  /* 縦長の画面では4人が横幅で頭打ちになるので、高さも 62vw までに抑えて余白を作らない */
  height: min(100svh - var(--header-h), 62vw);
}
.panel--hero > * { --s: max(100cqw / 1672, 100cqh / 941); }
.panel--hero > .panel__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.panel--hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 38% 46% at 50% 72%, rgba(255, 255, 255, .6), transparent 70%);
}
.hero__title {
  position: absolute; z-index: 3; left: 50%; translate: -50% 0; margin: 0;
  top: calc(78 * var(--s)); width: calc(248 * var(--s)); height: calc(50 * var(--s));
  display: grid; place-content: center; white-space: nowrap;
  font-family: var(--font-jp); font-weight: 800; font-size: calc(23 * var(--s)); letter-spacing: .12em; line-height: 1; color: var(--navy);
  animation: pop-late .8s cubic-bezier(.3, 1.5, .5, 1) 1.1s both;
}
.hero__actions {
  position: absolute; z-index: 3; left: 50%; translate: -50% 0;
  bottom: 2.5cqh; width: min(100% - 32px, 760px);
}
.hero__castrow {
  position: absolute; z-index: 2; left: 0; right: 0; top: calc(168 * var(--s)); bottom: 0;
  display: flex; justify-content: center; align-items: flex-end; pointer-events: none;
}
.hero__cast { display: flex; align-items: flex-end; justify-content: center; height: min(100%, 50cqw); pointer-events: none; overflow: visible; }
.hero__fallback { height: 100%; width: auto; max-width: none; }
.cast__girl {
  all: unset; box-sizing: border-box; cursor: pointer; pointer-events: auto;
  position: relative; height: 100%; margin-inline: -1.2cqw;
  z-index: var(--z, 1);
  transform: translate3d(calc(var(--mx) * var(--d) * .6px), calc(var(--my) * var(--d) * .4px - var(--sy) * var(--d) * .015px), 0);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
  -webkit-tap-highlight-color: transparent;
}
.cast__float { display: block; height: 100%; transform-origin: 50% 100%; animation: var(--idle) var(--idle-dur) ease-in-out var(--idle-delay) infinite; }
.cast__pop { display: block; height: 100%; animation: cast-in 1s cubic-bezier(.3, 1.5, .5, 1) var(--in-delay) both; }
.cast__girl img {
  display: block; height: 100%; width: auto; max-width: none;
  filter: drop-shadow(3px 0 0 #fff) drop-shadow(-3px 0 0 #fff) drop-shadow(0 -3px 0 #fff) drop-shadow(0 0 14px rgba(255, 255, 255, .9)) drop-shadow(0 14px 16px rgba(40, 40, 80, .3));
  transform-origin: 50% 100%; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.cast__girl:hover img, .cast__girl:focus-visible img { transform: translateY(-3%) scale(1.04) rotate(var(--tilt, 0deg)); }
.cast__girl:focus-visible { outline: none; }
/* 名前：ニュース帯のすぐ上に常に表示（位置は main.js で各キャラの中心に合わせる） */
.hero__names { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 0; pointer-events: none; }
.hero__name {
  position: absolute; bottom: 0; translate: -50% 0;
  display: inline-flex; align-items: center; gap: .45em;
  font-family: var(--font-jp); font-weight: 700; font-size: max(13px, 1.05cqw); line-height: 1; white-space: nowrap; letter-spacing: .1em;
  color: var(--navy); background: rgba(255, 250, 243, .95); border: 1px solid var(--gold); border-radius: 999px; padding: .4em 1.1em;
  box-shadow: 0 2px 8px rgba(40, 30, 80, .22);
  animation: pop-late .6s cubic-bezier(.3, 1.5, .5, 1) calc(var(--in-delay, 0s) + .7s) both;
}
.hero__name::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: var(--c); }
@keyframes cast-in { 0% { opacity: 0; transform: translateY(45%) scale(.8); } 60% { opacity: 1; transform: translateY(-4%) scale(1.03); } 100% { opacity: 1; transform: none; } }
@keyframes idle-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4.5%) rotate(-1.2deg); } }
@keyframes idle-sway { 0%, 100% { transform: rotate(-1.6deg); } 25% { transform: translateY(-1.6%) rotate(0); } 50% { transform: rotate(1.6deg); } 75% { transform: translateY(-1.6%) rotate(0); } }
@keyframes pop-late { from { opacity: 0; scale: .3; } }

.hero__actions { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.hero__btn { display: flex; }
.panel--hero .hero__btn .pill, .panel--hero .hero__btn a { font-size: 14px; padding: .55em 1.6em; background: rgba(255, 250, 243, .95); border: 1px solid var(--gold); border-style: solid; box-shadow: 0 2px 8px rgba(40, 30, 80, .25); }
.panel--hero .hero__btn .pill.is-soon { color: var(--ink-soft); }
.hero__news { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; background: rgba(255, 240, 246, .96); border: 1px solid var(--gold); border-radius: 999px; box-shadow: 0 2px 8px rgba(40, 30, 80, .25); }
.hero__news-viewport { position: relative; flex: 1; min-width: 0; height: 100%; overflow: hidden; }
.hero__news-item { position: absolute; inset: 0; display: flex; align-items: center; gap: .6em; font-family: var(--font-ui); font-weight: 700; font-size: 14px; white-space: nowrap; color: #5a2a3c; transition: transform .55s cubic-bezier(.3, 1.2, .5, 1), opacity .4s ease; }
.hero__news-item.is-below { transform: translateY(100%); opacity: 0; }
.hero__news-item.is-above { transform: translateY(-100%); opacity: 0; }
.hero__news-date { flex: none; font-family: var(--font-en); font-weight: 600; font-size: 14px; opacity: .7; font-variant-numeric: tabular-nums; }
.hero__news-tag { flex: none; font-size: 11px; line-height: 1; padding: .3em .6em; border-radius: 4px; color: var(--white); background: var(--rose); }
.hero__news-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hero__news-dots { flex: none; display: flex; }
.hero__news-dots button { all: unset; box-sizing: border-box; cursor: pointer; width: 16px; height: 100%; display: grid; place-items: center; }
.hero__news-dots button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--rose); }
.hero__news-dots button[aria-current="true"]::before { background: var(--rose); }
.hero__news-dots button:focus-visible::before { outline: 2px solid var(--navy); outline-offset: 2px; }

/* ---------- about（本と2つの額） ---------- */
.book-page { display: flex; flex-direction: column; justify-content: center; gap: .9cqw; }
.book-page .body { font-size: 1.05cqw; line-height: 1.8; }
/* 見出しの額は下に透明な余白があるので、本に少し重ねて詰める（about-book-v4 は上の余白が小さい） */
#about > .plate { margin-bottom: clamp(-30px, -2vw, -12px); }
.small-frame { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .5cqw; text-align: center; }


/* ---------- character（4人それぞれの額） ---------- */
.sec--wide { width: min(100% - var(--gutter) * 2, 1240px); }
.cards { width: 100%; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(4px, 1vw, 16px); }
.card { --c: var(--sky-deep); display: grid; justify-items: center; gap: 6px; text-align: center; }
/* 額（窓は透明）を立ち絵の上に重ねる。立ち絵は窓の形のマスクで切り抜く */
.card__frame .panel__bg { position: relative; z-index: 2; pointer-events: none; }
.card__art { z-index: 1; overflow: hidden; -webkit-mask: var(--mask) center / 100% 100% no-repeat; mask: var(--mask) center / 100% 100% no-repeat;
  background: radial-gradient(ellipse 70% 50% at 50% 38%, rgba(255, 255, 255, .8), transparent 70%), linear-gradient(180deg, color-mix(in srgb, var(--c) 12%, white), color-mix(in srgb, var(--c) 34%, white)); }
.card__art img { position: absolute; left: 50%; top: 6%; translate: -50% 0; width: 118%; max-width: none; height: auto; }
.card__name { z-index: 3; text-shadow: 0 0 6px #fff, 0 0 2px #fff; display: flex; justify-content: center; align-items: center; gap: .35em; font-family: var(--font-jp); font-weight: 800; font-size: 5.2cqw; letter-spacing: .06em; color: var(--c); white-space: nowrap; }
/* 名前の右のプロフィールアイコン */
.card__profile {
  all: unset; box-sizing: border-box; cursor: pointer; flex: none;
  display: grid; place-items: center; width: 1.3em; height: 1.3em; border-radius: 50%;
  color: var(--white); background: var(--c); border: 1.5px solid var(--white); box-shadow: 0 0 0 1px var(--gold), 0 2px 6px rgba(40, 30, 80, .25);
  transition: transform .2s ease;
}
.card__profile svg { width: 62%; height: 62%; }
.card__profile:hover { transform: scale(1.12); }
.card__profile:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* ---------- プロフィール（ダイアログ） ---------- */
html.is-modal { overflow: hidden; }
.profile {
  --c: var(--sky-deep);
  padding: 0; border: 0; background: none; color: var(--ink);
  width: min(880px, 100vw - 32px); max-width: none; max-height: calc(100svh - 32px); overflow: visible;
}
.profile::backdrop { background: rgba(27, 38, 72, .62); backdrop-filter: blur(3px); }
.profile[open] { animation: profile-in .35s cubic-bezier(.3, 1.3, .5, 1); }
.profile[open]::backdrop { animation: fade-in .3s ease; }
@keyframes profile-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes fade-in { from { opacity: 0; } }
.profile__card {
  position: relative; display: grid; grid-template-columns: 44% 1fr; overflow: hidden;
  max-height: calc(100svh - 32px);
  background: #fffaf3; border: 1px solid var(--gold); border-radius: 22px;
  box-shadow: inset 0 0 0 6px #fffaf3, inset 0 0 0 7px rgba(201, 163, 90, .55), 0 24px 60px rgba(20, 20, 60, .35);
}
.profile__art {
  position: relative; display: flex; justify-content: center; align-items: flex-end; overflow: hidden;
  margin: 7px 0 7px 7px; border-radius: 16px 0 0 16px; min-height: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 40%, rgba(255, 255, 255, .85), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--c) 16%, white), color-mix(in srgb, var(--c) 42%, white));
}
.profile__art img { display: block; height: min(560px, 100svh - 80px); width: auto; max-width: 112%; object-fit: contain; object-position: 50% 100%; margin-top: 20px;
  filter: drop-shadow(0 10px 14px rgba(40, 40, 80, .25)); }
.profile__body { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 48px 44px; overflow: auto; }
.profile__unit { margin: 0; font-family: var(--font-en); font-size: 13px; letter-spacing: .16em; color: var(--rose); }
.profile__name { margin: 0; font-family: var(--font-jp); font-weight: 800; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: .08em; line-height: 1.2; color: var(--c);
  padding-bottom: 14px; border-bottom: 1px solid rgba(201, 163, 90, .55); }
.profile__text { margin: 0; font-size: 15px; line-height: 1.95; white-space: pre-line; }
.profile__links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; }
.profile__links .pill { font-size: 13px; }
.profile__close { all: unset; box-sizing: border-box; cursor: pointer; position: absolute; z-index: 2; top: 14px; right: 14px;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-content: center; gap: 0;
  background: var(--white); border: 1px solid var(--gold); box-shadow: 0 2px 6px rgba(40, 30, 80, .2); }
.profile__close span { display: block; width: 16px; height: 2px; background: var(--navy); grid-area: 1 / 1; }
.profile__close span:first-child { transform: rotate(45deg); } .profile__close span:last-child { transform: rotate(-45deg); }
.profile__close:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.card__links { z-index: 3; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; align-content: center; gap: 1.6cqw; margin: 0; padding: 0; }
.card__links .pill { font-size: 3.6cqw; padding: .15em 1em; }
.card__links .pill.is-soon { opacity: .75; }

/* ---------- music ---------- */
.music__jacket { overflow: hidden; }
.music__jacket img { position: absolute; left: 50%; top: 6%; translate: -50% 0; width: 118%; max-width: none; height: auto; }
.tracks { list-style: none; padding: 0; display: grid; align-content: center; justify-content: center; }
/* 額の中は意味の区切りで改行（content.js の \n）し、中央揃えで詩のように並べる */
.song-concept { display: flex; flex-direction: column; justify-content: center; gap: .25cqw; text-align: center; }
.song-concept p { margin: 0; font-size: 1.02cqw; line-height: 1.55; word-break: auto-phrase; }
.song-concept p:first-child { font-family: var(--font-jp); font-weight: 800; font-size: 1.08cqw; color: var(--navy); }
/* 額の中では文字が小さくなりすぎる幅では、額の下に紙の札で流す */
@media (min-width: 761px) and (max-width: 1100px) {
  .song-concept { position: static; width: auto; height: auto; margin-top: 8px; padding: 20px 24px; gap: 6px; background: rgba(255, 251, 248, .9); border: 1px solid var(--gold); border-radius: 14px; }
  .song-concept p { font-size: 15px; line-height: 1.8; } .song-concept p:first-child { font-size: 16px; }
  .br-wide { display: none; }
}


/* ---------- goods ---------- */
.goods__title { margin: 0; display: grid; place-content: center; font-family: var(--font-en); font-weight: 600; font-size: 1.9cqw; line-height: 1; letter-spacing: .14em; padding-left: .14em; color: var(--navy); }
.goodsframes { list-style: none; margin: 0; padding: 0; display: contents; }
.goodsframe { display: grid; place-content: center; text-align: center; overflow: hidden; }
/* 画像があるときは額の上に画像、下に名前と価格 */
.goodsframe.has-img { display: flex; flex-direction: column; align-items: center; padding: 1.3cqw 1.1cqw 1cqw; gap: .15em; }
.goodsframe.has-img img { flex: 1 1 0; min-height: 0; width: 100%; object-fit: contain; border-radius: 6px; margin-bottom: .2em; }
.goods__name a { color: inherit; text-underline-offset: 2px; }
.goods__shop { margin: clamp(10px, 1.6vw, 24px) 0 0; text-align: center; }
.goods__noimg { font-family: var(--font-en); font-style: italic; font-size: 1.5cqw; color: var(--gold-deep); }
.goods__name { margin: 0; font-size: 1.05cqw; font-weight: 700; }
.goods__price { margin: 0; font-family: var(--font-en); font-size: 1.05cqw; color: var(--ink-soft); }


/* ---------- footer ---------- */
.panel--footer { margin-top: clamp(48px, 7vw, 96px); }
/* 下端の明るい花畑の上でも白い文字が読めるよう、紺のグラデーションを敷く */
.panel--footer::after { content: ""; position: absolute; inset: auto 0 0; height: 13%; z-index: 0; pointer-events: none; background: linear-gradient(180deg, rgba(27, 38, 72, 0), rgba(27, 38, 72, .78) 55%); }
.panel--footer > .slot, .panel--footer .footer__sns .slot { z-index: 1; }
.footer__logo { display: grid; place-content: center; font-family: var(--font-jp); font-weight: 800; font-size: 2.1cqw; letter-spacing: .12em; color: var(--navy); text-decoration: none; }
.footer__sns { list-style: none; margin: 0; padding: 0; display: contents; }
.footer__sns a, .footer__sns span { position: absolute; inset: 0; display: grid; place-content: center; border-radius: 50%; font-family: var(--font-en); font-weight: 600; font-size: .78cqw; letter-spacing: .02em; color: var(--navy); text-decoration: none; }
.footer__sns a:hover { color: var(--rose); }
/* STAFF CREDITS：夜空に白い文字、金の細い罫で区切る */
.footer__credits { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; color: #fffaf2; text-align: center; text-shadow: 0 1px 3px rgba(40, 30, 100, .75), 0 0 14px rgba(40, 30, 100, .4); }
.credits__title { display: flex; align-items: center; gap: .9em; margin: 0 0 1.4cqw; font-family: var(--font-en); font-weight: 600; font-size: 2.3cqw; letter-spacing: .22em; line-height: 1.2; }
.credits__title::before, .credits__title::after { content: "✦"; font-size: .8em; letter-spacing: 0; color: var(--gold-light); }
/* 5人を横一列のカードに（担当 → 名前 → SNS があれば X のアイコン） */
.credits__cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.1cqw; width: 100%; margin: 0; }
.credit {
  display: flex; flex-direction: column; align-items: center; gap: .6cqw; padding: 1.3cqw .9cqw 1.4cqw;
  border: 1px solid rgba(234, 217, 166, .75); border-radius: 1.2cqw;
  background: linear-gradient(180deg, rgba(58, 50, 140, .5), rgba(40, 34, 110, .38));
  box-shadow: inset 0 0 0 .3cqw rgba(255, 255, 255, .06), 0 .5cqw 1.6cqw rgba(40, 30, 100, .25);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.credit dt { display: grid; place-items: center; min-height: 2.6em; font-family: var(--font-en); font-weight: 600; font-size: 1.05cqw; letter-spacing: .05em; line-height: 1.3; color: #f4ecff; }
.credit dd { margin: 0; }
.credit__sns { margin-top: auto; padding-top: .2cqw; }
.credit__name { font-family: var(--font-jp); font-weight: 700; font-size: 1.9cqw; letter-spacing: .06em; line-height: 1.25; }
.credit__name:lang(en) { font-family: var(--font-en); font-weight: 600; font-size: 2.2cqw; }
.credit__sns a {
  display: grid; place-items: center; width: 2.3cqw; height: 2.3cqw; border-radius: 50%;
  color: var(--navy-deep); background: rgba(255, 255, 255, .94); text-shadow: none;
  box-shadow: 0 0 0 1px var(--gold), 0 .2cqw .6cqw rgba(40, 30, 100, .3); transition: transform .2s ease, background .2s ease;
}
.credit__sns svg { width: 50%; height: 50%; fill: currentColor; }
.credit__sns a:hover { transform: scale(1.1); background: var(--gold-light); }
.credit__sns a:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.footer__links { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0 1.6cqw; }
.footer__links li + li::before { content: "|"; margin-right: 1.6cqw; color: rgba(255, 255, 255, .55); }
.footer__links a { font-family: var(--font-ui); font-weight: 700; font-size: .9cqw; letter-spacing: .04em; color: var(--white); text-decoration: none; text-shadow: 0 1px 4px rgba(40, 30, 90, .7); }
.footer__links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer__links a:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; border-radius: 2px; }
.footer__copy { display: grid; place-content: center; font-family: var(--font-en); font-size: .95cqw; letter-spacing: .08em; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 4px rgba(40, 30, 90, .6); }

/* ---------- スマホ ---------- */
@media (max-width: 760px) {
  /* 額の外に流す文字は、素材の下に白い札で並べる */
  .panel--part { display: flex; flex-direction: column; gap: 10px; }
  /* 表示領域が狭いので、PROJECT（本）と MUSIC（ジャケットの額）の素材画像は出さず、札だけを並べる */
  #about .panel > .panel__bg, #about .panel > .guard,
  #music .panel > .panel__bg, #music .panel > .guard, #music .music__jacket { display: none !important; }
  #about > .plate, #music > .plate { margin-bottom: 8px; }
  /* GOODS はスマホでは一旦出さない（メニューからも外す） */
  #goods, .nav a[href="#goods"] { display: none; }
  .slot--flow {
    position: static; width: auto; height: auto;
    padding: 16px 18px; background: rgba(255, 251, 248, .9); border: 1px solid var(--gold); border-radius: 14px;
  }
  .coming-soon { font-size: 22px; }
  .catch { font-size: 18px; } .body { font-size: 15px; } .label { font-size: 12px; } .hashtag { font-size: 22px; } .copy { font-size: 13px; }
  .pills .pill { font-size: 13px; }
  .small-frame { gap: 6px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 12px 6px; }
  .card__name { font-size: 7cqw; }
  /* プロフィール：上に立ち絵、下に文字。画面に収まらないときは文字の側だけ動かす */
  .profile { width: calc(100vw - 24px); max-height: calc(100svh - 24px); }
  .profile__card { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); max-height: calc(100svh - 24px); }
  .profile__art { margin: 7px 7px 0; border-radius: 16px 16px 0 0; height: 40svh; }
  .profile__art img { height: calc(40svh - 12px); margin-top: 12px; }
  .profile__body { padding: 20px 22px 24px; gap: 10px; justify-content: flex-start; }
  .profile__name { font-size: 26px; padding-bottom: 10px; }
  .profile__text { font-size: 14px; line-height: 1.85; }
  /* スマホのカードは小さいので、リンクは額の下に出す */
  .card__frame { margin-bottom: 36px; }
  .card__links { left: 0; top: calc(100% + 6px); width: 100%; height: auto; gap: 4px; }
  .card__name { top: calc(var(--my) / var(--pw) * 100cqw); height: calc(var(--mh) / var(--pw) * 100cqw); }
  .card__links .pill { font-size: 12px; }
  .book-page .body { font-size: 15px; line-height: 1.9; }
  .book-page { gap: 10px; }
  .song-concept p { font-size: 15px; line-height: 1.9; } .song-concept p:first-child { font-size: 16px; }
  .song-concept { gap: 8px; }
  .br-wide { display: none; }
  .goods__noimg { display: none; }
  .goods__title { font-size: max(10px, 2.6cqw); }
  .goods__name, .goods__price { font-size: 2.6cqw; line-height: 1.3; }
  .plate__en { font-size: 5.2cqw; } .plate__ja { font-size: 2.4cqw; }
  .plate__en--long { font-size: 3.9cqw; }
  .panel--footer::after { content: none; }

  /* ヒーロー：背景を敷き、4人 → タイトルの額 → ニュース → ボタン */
  .panel--hero { min-height: 0; height: min(100svh - var(--header-h), 113vw + 140px); }
  .hero__title { font-size: max(15px, calc(23 * var(--s))); }
  .hero__actions { bottom: 14px; grid-template-columns: 1fr; gap: 8px; justify-items: center; }
  .hero__actions .hero__news { width: 100%; }
  .hero__castrow { top: calc(160 * var(--s)); bottom: auto; height: 94cqw; }
  .hero__cast { height: min(100%, 94cqw); }
  .panel--hero .cast__girl { margin-inline: -8.5cqw; }
  /* 4人を気持ち右へ。名札は main.js が並びの位置から合わせるので、transform ではなく left/right でずらす */
  .hero__castrow { left: 3cqw; right: -3cqw; }
  /* 重なりが大きいので、むにゃの羽が仔娘。の顔にかからないよう、白い羽のふたりは仔娘。を手前にする */
  .panel--hero [data-cast="white"] > .cast__girl:first-of-type { z-index: 3; }
  .hero__name { font-size: 11px; padding: .35em .7em; gap: .35em; letter-spacing: .04em; }
  .panel--hero .hero__btn .pill, .panel--hero .hero__btn a { font-size: 13px; }
  .hero__news { height: auto; min-height: 64px; padding: 10px 14px; border-radius: 18px; }
  .hero__news-viewport { height: 4.4em; }
  .hero__news-item { font-size: 13px; line-height: 1.5; flex-wrap: wrap; align-content: center; gap: 4px 8px; white-space: normal; }
  .hero__news-date { display: none; } .hero__news-tag { font-size: 11px; }
  .hero__news-title { flex-basis: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .hero__news-dots button { width: 20px; } .hero__news-dots button::before { width: 8px; height: 8px; }

  /* フッター：額と丸は小さすぎるので、夜空の部分だけ敷いて文字は普通に並べる */
  .panel--footer { background: #6d67c4 url("../img/parts/footer-bg.784e0a23e4a7.webp") 50% 0 / auto 240% no-repeat; padding: 48px 16px 88px; /* 下は右下の応援ボタンの分あける */ display: grid; justify-items: center; gap: 14px; }
  .panel--footer > .panel__bg, .panel--footer > .guard { display: none !important; }
  .panel--footer .slot { position: static; width: auto; height: auto; }
  .footer__logo { font-size: 28px; color: var(--white); text-shadow: 0 2px 8px rgba(40, 30, 90, .6); }
  .footer__sns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .footer__sns li { position: relative; }
  .footer__sns a, .footer__sns span { position: static; display: inline-flex; padding: 6px 16px; border-radius: 999px; font-family: var(--font-ui); font-weight: 700; font-size: 13px; background: rgba(255, 255, 255, .92); border: 1px solid var(--gold); }
  .footer__credits { width: 100%; max-width: 420px; margin-bottom: 12px; }
  .credits__title { font-size: 20px; margin-bottom: 10px; }
  .credits__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .credit { gap: 6px; padding: 12px 8px 14px; border-radius: 12px; }
  .credit:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .credit dt { font-size: 10.5px; min-height: 0; }
  .credit__name { font-size: 17px; } .credit__name:lang(en) { font-size: 20px; }
  .credit__sns a { width: 30px; height: 30px; }
  .footer__links { gap: 8px 14px; max-width: 320px; }
  .footer__links li + li::before { content: none; }
  .footer__links a { font-size: 13px; }
  .footer__copy { font-size: 12px; }
}

/* ---------- 応援ボタン（画面右下に固定。押すと X のリポスト画面が開く） ---------- */
/* メニュー（z-index 50）より下、ページの絵より上 */
.cheer {
  position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 40;
  display: flex; align-items: center; gap: 10px; padding: 7px 22px 7px 7px;
  text-decoration: none; color: var(--white);
  background: linear-gradient(135deg, #f5a3c4, var(--rose) 85%); border: 2px solid var(--gold-light); border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .7), 0 8px 22px rgba(201, 76, 106, .38);
  transition: transform .2s ease, box-shadow .2s ease;
}
.cheer:hover { transform: translateY(-3px); box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 12px 26px rgba(201, 76, 106, .45); }
.cheer:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; }
.cheer__heart { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--white); color: var(--rose); box-shadow: inset 0 0 0 2px var(--gold-light); }
.cheer__heart svg { width: 22px; height: 22px; fill: currentColor; animation: cheer-beat 1.8s ease-in-out infinite; }
.cheer__text { display: grid; line-height: 1.25; text-align: left; text-shadow: 0 1px 2px rgba(150, 40, 70, .35); }
.cheer__main { font-family: var(--font-jp); font-weight: 800; font-size: 17px; letter-spacing: .1em; }
.cheer__sub { font-family: var(--font-ui); font-weight: 700; font-size: 11px; letter-spacing: .04em; }
@keyframes cheer-beat { 0%, 55%, 100% { transform: scale(1); } 12% { transform: scale(1.22); } 26% { transform: scale(.95); } 40% { transform: scale(1.12); } }
@media (max-width: 760px) {
  .cheer { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); gap: 8px; padding: 5px 16px 5px 5px; }
  .cheer__heart { width: 36px; height: 36px; }
  .cheer__heart svg { width: 19px; height: 19px; }
  .cheer__main { font-size: 15px; }
  .cheer__sub { font-size: 10px; }
}

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

/* ---------- 下層ページ（ガイドライン・ポリシー） ---------- */
.subpage { margin-top: var(--header-h); }
.header__back { font-family: var(--font-ui); font-weight: 700; font-size: 14px; color: var(--white); text-decoration: none; border: 1px solid var(--gold); border-radius: 999px; padding: 6px 16px; }
.header__back:hover { background: var(--gold); color: var(--navy-deep); }
.doc {
  width: 100%; max-width: 860px; margin-top: 8px; padding: clamp(24px, 5vw, 56px) clamp(20px, 5vw, 64px);
  background: rgba(255, 251, 248, .94); border: 1px solid var(--gold); border-radius: 20px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .6), 0 12px 32px rgba(60, 50, 110, .12);
  font-size: 15px; line-height: 2;
}
.doc > :first-child { margin-top: 0; }
.doc h2 { margin: 2em 0 .6em; padding-left: .8em; border-left: 3px solid var(--rose); font-family: var(--font-jp); font-weight: 800; font-size: 18px; line-height: 1.5; color: var(--navy); }
.doc p, .doc ul, .doc ol { margin: 0 0 1em; }
.doc ul, .doc ol { padding-left: 1.4em; }
.doc li + li { margin-top: .3em; }
.doc a { color: var(--navy); text-underline-offset: 3px; }
.doc .doc__ok li::marker { content: "✿ "; color: var(--sky-deep); }
.doc .doc__ng li::marker { content: "✕ "; color: var(--rose); }
.doc__date { margin-top: 2.5em; text-align: right; font-size: 13px; color: var(--ink-soft); }

/* ---------- 下層ページ：メンバーからのメッセージ（message.html） ---------- */
.cards__more { margin: clamp(16px, 2.4vw, 32px) 0 0; text-align: center; }
.pill--more { font-size: 15px; padding: .6em 1.8em; box-shadow: 0 4px 14px rgba(60, 50, 110, .12); }
.msgs__lead { margin: 10px 0 clamp(16px, 2vw, 24px); text-align: center; font-size: 15px; color: var(--ink-soft); }
.msgs { width: 100%; max-width: 960px; list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(18px, 2.4vw, 28px); }
.msg {
  --c: var(--sky-deep);
  display: grid; grid-template-columns: clamp(150px, 24%, 230px) 1fr; overflow: hidden;
  background: #fffaf3; border: 1px solid var(--gold); border-radius: 20px;
  box-shadow: inset 0 0 0 6px #fffaf3, inset 0 0 0 7px rgba(201, 163, 90, .55), 0 12px 32px rgba(60, 50, 110, .12);
}
.msg:nth-child(even) { grid-template-columns: 1fr clamp(150px, 24%, 230px); }
.msg:nth-child(even) .msg__art { order: 2; margin: 7px 7px 7px 0; border-radius: 0 14px 14px 0; }
.msg__art {
  position: relative; display: flex; justify-content: center; align-items: flex-start; overflow: hidden;
  margin: 7px 0 7px 7px; border-radius: 14px 0 0 14px; min-height: 220px;
  background: radial-gradient(ellipse 70% 55% at 50% 40%, rgba(255, 255, 255, .85), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--c) 16%, white), color-mix(in srgb, var(--c) 42%, white));
}
.msg__art img { position: absolute; top: 14px; left: 50%; translate: -50% 0; width: 118%; max-width: none; height: auto;
  filter: drop-shadow(0 8px 12px rgba(40, 40, 80, .22)); }
.msg__body { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: clamp(22px, 3.4vw, 40px) clamp(22px, 4vw, 48px); }
.msg__unit { margin: 0; font-family: var(--font-en); font-size: 13px; letter-spacing: .16em; color: var(--rose); }
.msg__name { margin: 0; padding-bottom: 10px; border-bottom: 1px solid color-mix(in srgb, var(--gold) 60%, transparent);
  font-family: var(--font-jp); font-weight: 800; font-size: clamp(24px, 2.6vw, 32px); letter-spacing: .08em; line-height: 1.2; color: var(--c); }
.msg__text { margin: 4px 0 0; font-size: 15px; line-height: 2; white-space: pre-line; }
@media (max-width: 760px) {
  .msg, .msg:nth-child(even) { grid-template-columns: 1fr; }
  .msg__art, .msg:nth-child(even) .msg__art { order: 0; margin: 7px 7px 0; border-radius: 14px 14px 0 0; min-height: 0; height: 180px; }
  .msg__art img { width: 64%; top: 10px; }
  .msg__body { padding: 18px 20px 22px; }
  .msg__text { font-size: 14px; line-height: 1.9; }
  .pill--more { font-size: 14px; }
}
