/* Tales of Valdir キャラクター（2026-11-03、Claudeの試作 v3 をDevへ反映）。共通の見た目は valdir-base.css。
   動きはトップより控えめにする：現れ方・肖像の広がり・アートの切替・宝石の色の移り変わりと、トップと同じカードの傾き。演出OFF（.is-calm）では止める。 */

:root { --castbar-h: 60px; }
html { scroll-padding-top: calc(var(--header-h) + var(--castbar-h) + 8px); }
/* 見出しと短い文は文節の途中で折り返さない（映像の題名は狭い枠に入るので、ふつうに折り返す） */
:lang(ja) :is(.profile__lead, .outro__title, .nft-note > span, .creators__lead) { word-break: auto-phrase; }
.profile__body { text-wrap: pretty; }

/* ---------------------------------------------------------------- 冒頭：見出しと、3人の肖像 */
.intro { position: relative; padding: calc(var(--header-h) + clamp(28px, 5vh, 64px)) var(--pad) clamp(56px, 8vh, 96px);
  background: radial-gradient(60% 50% at 50% 0%, rgb(217 181 108 / .08), transparent 70%), var(--ink); }
/* 見出しは1行にまとめ（左に題、右に一文）、3人の肖像の名前まで最初の画面に収める */
.intro__title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 48px; margin: 0; }
.intro .title-en { font-size: clamp(56px, 8vw, 128px); }
.intro .title-sub { max-width: 24em; margin: 0 0 .6em; }
/* 3人の肖像。ポインターかフォーカスを当てた人が広がり、ほかは少し暗くなる */
.roster { display: flex; gap: clamp(10px, 1.2vw, 18px); height: clamp(440px, calc(100svh - 330px), 720px); margin: clamp(28px, 4vh, 48px) 0 0; padding: 0; list-style: none; }
.roster__item { position: relative; flex: 1 1 0; min-width: 0; transition: flex-grow .9s var(--ease); }
.roster__link { position: relative; display: block; height: 100%; overflow: hidden; border-radius: 22px; text-decoration: none; isolation: isolate;
  box-shadow: 0 40px 80px -40px rgb(0 0 0 / .9), 0 0 0 1px rgb(255 255 255 / .08); transition: box-shadow .6s, filter .6s; }
.roster__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--fx) var(--fy); scale: 1.02; transition: scale 1.4s var(--ease), filter .7s; }
/* 下を暗くして文字を載せ、上端に宝石の色の線を引く */
.roster__link::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgb(6 7 12 / .94) 0%, rgb(6 7 12 / .55) 30%, transparent 58%); }
.roster__link::after { content: ""; position: absolute; left: 0; right: 0; top: 0; z-index: 2; height: 2px; background: var(--c); box-shadow: 0 0 18px var(--c); transform: scaleX(.18); transition: transform .8s var(--ease); }
.roster__text { position: absolute; left: clamp(18px, 2vw, 30px); right: clamp(18px, 2vw, 30px); bottom: clamp(18px, 2.4vw, 34px); z-index: 2; display: grid; gap: 6px; }
.roster__no { font: 600 14px/1 var(--font-en); letter-spacing: .14em; color: var(--c); }
.roster__name { font: 600 clamp(36px, 3.6vw, 60px)/.95 var(--font-en); color: var(--text); }
.roster__title { font: italic 500 clamp(15px, 1.2vw, 19px)/1.3 var(--font-en); color: var(--gold-hi); }
.roster__class { font: 700 10px/1.4 var(--font-ui); letter-spacing: .28em; text-transform: uppercase; color: var(--text-3); }
.roster:hover .roster__item, .roster:focus-within .roster__item { flex-grow: .78; }
.roster .roster__item:hover, .roster .roster__item:focus-within { flex-grow: 1.7; }
.roster:hover .roster__item:not(:hover) .roster__img, .roster:focus-within .roster__item:not(:focus-within) .roster__img { filter: brightness(.55) saturate(.8); }
.roster__item:hover .roster__img, .roster__item:focus-within .roster__img { scale: 1.06; }
.roster__item:hover .roster__link::after, .roster__item:focus-within .roster__link::after { transform: scaleX(1); }
.roster__item:hover .roster__link, .roster__item:focus-within .roster__link { box-shadow: 0 40px 90px -40px rgb(0 0 0 / .95), 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent), 0 0 60px -20px var(--c); }
.roster__link:focus-visible { outline-offset: 6px; border-radius: 22px; }

/* ---------------------------------------------------------------- 人物の切替（上に貼りつく） */
.cast-bar { position: sticky; top: var(--header-h); z-index: 30; display: flex; justify-content: center; gap: 6px; height: var(--castbar-h); padding: 0 var(--pad);
  align-items: center; background: rgb(8 10 18 / .82); border-block: 1px solid var(--line); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
.cast-bar a { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 6px; border-radius: 999px; text-decoration: none; font: 600 18px/1 var(--font-en); letter-spacing: .04em; color: var(--text-3); transition: color .4s, background-color .4s; }
.cast-bar img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; filter: grayscale(.85) brightness(.75); box-shadow: 0 0 0 1px var(--line); transition: filter .4s, box-shadow .4s; }
.cast-bar a:hover { color: var(--text); }
.cast-bar a:hover img { filter: none; }
.cast-bar a[aria-current="true"] { color: var(--text); background: color-mix(in srgb, var(--c) 14%, transparent); }
.cast-bar a[aria-current="true"] img { filter: none; box-shadow: 0 0 0 2px var(--c), 0 0 18px -2px var(--c); }

/* ---------------------------------------------------------------- 人物ごとのプロフィール */
.profile { position: relative; display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(40px, 6vw, 110px); align-items: start;
  padding: clamp(64px, 10vh, 120px) var(--pad) clamp(84px, 13vh, 150px); overflow: clip;
  background: radial-gradient(48% 60% at 26% 46%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 72%), var(--ink);
  border-top: 1px solid var(--line); transition: --accent .8s; }
.profile.is-flip { background: radial-gradient(48% 60% at 74% 46%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 72%), var(--night); }
/* 2人目は、アートを右に置いて左右を入れ替える（広い画面だけ） */
.profile.is-flip .profile__art { order: 2; }
.profile__bgname { position: absolute; right: -2vw; top: 50%; z-index: 0; margin: 0; translate: 0 -50%; white-space: nowrap; pointer-events: none; user-select: none;
  font: 700 clamp(120px, 20vw, 360px)/.8 var(--font-en); letter-spacing: -.01em; color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--accent) 40%, transparent); opacity: .5; }
.profile.is-flip .profile__bgname { right: auto; left: -2vw; }
.profile__art, .profile__info { position: relative; z-index: 1; }
/* 本文を読む間も、アートが画面に残るようにする */
.profile__art { position: sticky; top: calc(var(--header-h) + var(--castbar-h) + 28px); display: grid; justify-items: center; gap: 20px; }

/* アート：枠と宝石の光。押すと大きく見られる */
/* 貼りついている間も、アートと切替のボタンが画面の高さに収まる大きさにする */
.art { position: relative; width: min(100%, 520px, calc((100svh - var(--header-h) - var(--castbar-h) - 230px) * .75)); min-width: min(100%, 300px); aspect-ratio: 3 / 4; margin: 0; perspective: 1500px; }
.art::before { content: ""; position: absolute; inset: 10% 8% -6%; z-index: -1; border-radius: 50%; background: var(--accent); filter: blur(70px); opacity: .32; transition: background-color .8s; }

/* カードの傾きと光：トップの試作（v5）の .card と同じ。マウスを重ねた位置へ傾き、虹色の箔と光が動く。タッチでは光だけがゆっくり動く */
.card__tilt { position: absolute; inset: 0; border-radius: 22px; overflow: hidden; background: var(--night-2);
  transform: rotateX(calc(var(--ry, 0) * 1deg)) rotateY(calc(var(--rx, 0) * 1deg)); transition: transform .7s var(--ease);
  box-shadow: 0 46px 90px -34px rgb(0 0 0 / .85), 0 0 0 1px rgb(255 255 255 / .1); }
.card.is-active .card__tilt { transition: transform .12s linear; }
.card__foil { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: var(--foil, .07); transition: opacity .6s;
  background: repeating-linear-gradient(115deg, hsl(0 100% 72% / .55) 0%, hsl(55 100% 72% / .55) 4%, hsl(120 100% 72% / .55) 8%, hsl(185 100% 72% / .55) 12%, hsl(240 100% 76% / .55) 16%, hsl(300 100% 74% / .55) 20%, hsl(360 100% 72% / .55) 24%);
  background-size: 400% 400%; background-position: calc(var(--mx) * 1%) calc(var(--my) * 1%); }
.card__glare { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay; opacity: var(--glare, .35); transition: opacity .5s;
  background: radial-gradient(farthest-corner circle at calc(var(--mx) * 1%) calc(var(--my) * 1%), rgb(255 255 255 / .55), rgb(255 255 255 / .08) 34%, transparent 62%); }
.card.is-active { --glare: 1; --foil: .26; }
.card__frame { position: absolute; inset: 10px; border-radius: 15px; border: 1px solid rgb(246 226 176 / .5); pointer-events: none; }
.card__frame::before, .card__frame::after { content: ""; position: absolute; left: 50%; width: 9px; height: 9px; background: var(--gold-hi); transform: translateX(-50%) rotate(45deg); box-shadow: 0 0 10px var(--gold); }
.card__frame::before { top: -5px; } .card__frame::after { bottom: -5px; }
@media (hover: none) {
  .card { --foil: .09; --glare: .4; }
  html:not(.is-calm) .card__tilt { animation: card-idle 7s ease-in-out infinite; }
  @keyframes card-idle { 0%, 100% { --mx: 25; --my: 20; } 50% { --mx: 75; --my: 80; } }
}

.art__open { position: absolute; inset: 0; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
/* カードは中身を角丸で切り抜くので、フォーカスの枠はカード自体に付ける */
.art__open:focus-visible { outline: none; }
.card:has(.art__open:focus-visible) .card__tilt { outline: 2px solid var(--accent); outline-offset: 6px; }
.art__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; scale: 1.03; transition: opacity .7s var(--ease), scale 1.2s var(--ease); }
.art__img.is-on { opacity: 1; scale: 1; }
/* 名札：左上はレアリティ（その宝石の色）、右上はメインアート（金）。当てはまらないときは薄く消す */
.art__badge { position: absolute; top: 14px; padding: 7px 11px; border-radius: 999px; background: rgb(6 7 12 / .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font: 700 10px/1 var(--font-ui); letter-spacing: .3em; text-transform: uppercase; transition: opacity .5s; }
.art__badge--rarity { left: 14px; border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); color: var(--accent); }
.art__badge--key { right: 14px; border: 1px solid rgb(246 226 176 / .5); color: var(--gold-hi); }
.art__badge.is-off { opacity: 0; }
.art__zoom { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgb(6 7 12 / .6); border: 1px solid rgb(255 255 255 / .25); opacity: .75; transition: opacity .4s, scale .5s var(--ease); }
.art__zoom svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 1.7; }
.art:hover .art__zoom { opacity: 1; scale: 1.08; }

/* アートの切替（小さい絵つきのボタン） */
.art-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.art-tab { display: grid; justify-items: center; gap: 7px; width: 82px; padding: 6px 6px 8px; border: 1px solid var(--line); border-radius: 14px; background: rgb(255 255 255 / .03); cursor: pointer;
  font: 700 10.5px/1.2 var(--font-ui); letter-spacing: .08em; color: var(--text-3); transition: border-color .4s, background-color .4s, color .4s, box-shadow .4s; }
.art-tab img { width: 100%; aspect-ratio: 3 / 4; height: auto; border-radius: 9px; object-fit: cover; filter: brightness(.7) saturate(.85); transition: filter .4s; }
.art-tab:hover { color: var(--text); border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.art-tab:hover img { filter: none; }
.art-tab[aria-checked="true"] { color: var(--text); border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); box-shadow: 0 0 26px -8px var(--c); }
.art-tab[aria-checked="true"] img { filter: none; }
.art-tab:only-child { cursor: default; } /* アートが1枚だけの人物（Erindel） */

/* 紹介 */
.profile__info { padding-top: clamp(0px, 3vh, 40px); }
.profile__class { margin: 0 0 14px; font: 700 12px/1 var(--font-ui); letter-spacing: .3em; text-transform: uppercase; color: var(--accent); transition: color .8s; }
.profile__name { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; font: 600 clamp(72px, 8.6vw, 144px)/.9 var(--font-en); letter-spacing: -.01em;
  background: linear-gradient(180deg, var(--text) 40%, color-mix(in srgb, var(--text) 55%, var(--accent)) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.profile__kana { font: 500 clamp(14px, 1.15vw, 18px)/1 var(--font-ja); letter-spacing: .32em; color: var(--text-3); -webkit-text-fill-color: var(--text-3); }
:lang(en) .profile__kana { display: none; }
.profile__title { margin: 12px 0 30px; font: italic 500 clamp(21px, 1.8vw, 29px)/1.2 var(--font-en); letter-spacing: .04em; color: var(--gold-hi); }
.profile__lead { margin: 0 0 16px; max-width: 30em; font: 700 clamp(18px, 1.5vw, 24px)/1.75 var(--font-ja); }
.profile__body { margin: 0 0 32px; max-width: 36em; font: 400 clamp(15px, 1.05vw, 17px)/2 var(--font-ui); color: var(--text-2); }
/* 種族・身長・年齢 */
.stats { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 40px; padding: 0; border-block: 1px solid var(--line); }
.stats > div { flex: 1 1 0; min-width: 7.5em; padding: 16px 20px 16px 0; }
.stats > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.stats dt { margin: 0 0 6px; font: 700 10.5px/1 var(--font-ui); letter-spacing: .26em; text-transform: uppercase; color: var(--text-3); }
.stats dd { margin: 0; font: 600 clamp(17px, 1.3vw, 20px)/1.4 var(--font-ja); color: var(--text); }
:lang(en) .stats dd { font-family: var(--font-en); font-size: clamp(19px, 1.45vw, 23px); }

/* 登場する映像（押すとその場で再生） */
.films { margin: 0 0 32px; }
.films__label { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font: 700 11px/1 var(--font-ui); letter-spacing: .3em; text-transform: uppercase; color: var(--text-3); }
.films__label b { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); font: 700 11px/1 var(--font-ui); letter-spacing: 0; }
.films__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, max(280px, calc(50% - 5px))), 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.film { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: center; height: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--text-2);
  background: rgb(255 255 255 / .02); transition: background-color .4s, border-color .4s, color .4s; }
.film__thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 9px; }
.film__thumb img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.8); transition: filter .5s, scale .9s var(--ease); }
.film__thumb i { position: absolute; inset: 0; display: grid; place-items: center; opacity: .85; transition: opacity .4s; }
.film__thumb i svg { width: 30px; height: 30px; padding: 8px 7px 8px 9px; border-radius: 50%; background: rgb(6 7 12 / .6); fill: #fff; border: 1px solid rgb(255 255 255 / .35); }
.film__text { display: grid; gap: 4px; min-width: 0; }
.film__meta { font: 700 10px/1.4 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.film__title { font: 700 13.5px/1.55 var(--font-ja); color: var(--text-2); }
:lang(ja) .film__title { word-break: auto-phrase; }
.film:hover { background: rgb(255 255 255 / .05); border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--text); }
.film:hover .film__thumb img { filter: none; scale: 1.05; }
.film:hover .film__title { color: var(--text); }
/* 映像アーカイブへの入口。映像の続きとして同じ形のカードにする（絵は次の映像で、残りの本数を重ねる）。列は2つまでなので、余る枠があれば横いっぱいに広げる */
.films__more:nth-child(odd) { grid-column: 1 / -1; }
.film--more .film__text { grid-template-columns: minmax(0, 1fr) 16px; align-items: center; gap: 10px; }
.film--more > .film__text:first-child { grid-column: 1 / -1; padding: 8px; }
.film--more .film__title { color: var(--gold-hi); }
.film--more svg { width: 16px; height: 16px; fill: none; stroke: var(--gold-hi); stroke-width: 1.6; transition: transform .45s var(--ease), stroke .4s; }
.film--more:hover svg { stroke: var(--text); transform: translateX(4px); }
.film--more .film__thumb img, .film--more:hover .film__thumb img { filter: brightness(.45); }
.film--more .film__thumb i { font: 700 20px/1 var(--font-ui); color: #fff; opacity: 1; }

/* NFTの一言とOpenSeaへの入口（控えめに） */
.nft-note { margin: 0; padding-top: 22px; border-top: 1px solid var(--line); font: 500 13px/1.8 var(--font-ui); color: var(--text-3); }
.nft-note__link { display: inline-flex; align-items: center; gap: 4px; margin-left: .6em; padding: 4px 0; white-space: nowrap; text-decoration: none; font-weight: 700; letter-spacing: .06em; color: var(--gold-hi); border-bottom: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); transition: color .3s, border-color .3s; }
.nft-note__link svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.nft-note__link:hover { color: #fff; border-color: var(--gold-hi); }
/* その人物のキャラクターシートへ（ページ下の「二次創作のための資料」へ移る） */
.profile__sheets { margin: -12px 0 30px; }

/* ---------------------------------------------------------------- 二次創作のためのキャラクターシート
   横長（16:9）の資料なので、縦長のカードの切替には混ぜず、ページの下にまとめて並べる（人物や枚数が増えても、並びが崩れない） */
.creators { position: relative; padding: clamp(84px, 12vh, 140px) var(--pad); border-top: 1px solid var(--line);
  background: radial-gradient(60% 55% at 50% 0%, rgb(217 181 108 / .08), transparent 70%), var(--night); }
.creators__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 28px 56px; margin-bottom: clamp(36px, 5vh, 60px); }
.creators__title { margin: 0; }
.creators .title-en { font-size: clamp(48px, 6.6vw, 112px); }
.creators__lead { margin: 18px 0 0; max-width: 40em; font: 400 clamp(14px, 1.05vw, 16px)/1.95 var(--font-ui); color: var(--text-2); }
.creators__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: clamp(20px, 2.4vw, 34px); margin: 0; padding: 0; list-style: none; }
/* ヘッダーと人物の切替の分は、html の scroll-padding-top で空けてある。ここでは、現れるときの浮き上がり（26px）の分を足す */
.sheet { display: grid; gap: 14px; align-content: start; scroll-margin-top: 40px; }
.sheet__open { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: var(--night-2); cursor: zoom-in;
  box-shadow: 0 30px 70px -36px rgb(0 0 0 / .9), 0 0 0 1px rgb(255 255 255 / .1); transition: box-shadow .5s; }
.sheet__open img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s var(--ease); }
.sheet__open::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--c); box-shadow: 0 0 16px var(--c); transform: scaleX(.18); transform-origin: left; transition: transform .8s var(--ease); }
.sheet__open:hover { box-shadow: 0 30px 70px -36px rgb(0 0 0 / .9), 0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent), 0 0 46px -18px var(--c); }
.sheet__open:hover img { scale: 1.03; }
.sheet__open:hover::after, .sheet__open:focus-visible::after { transform: scaleX(1); }
.sheet__open:focus-visible { outline-offset: 5px; border-radius: 16px; }
.sheet__open .art__zoom { position: absolute; right: 10px; bottom: 10px; }
.sheet__open:hover .art__zoom { opacity: 1; scale: 1.08; }
.sheet__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.sheet__face { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1.5px var(--c), 0 0 18px -4px var(--c); }
.sheet__name { display: grid; gap: 4px; min-width: 0; margin-right: auto; }
.sheet__name b { font: 600 24px/1 var(--font-en); letter-spacing: .02em; }
.sheet__name small { font: 700 10px/1.4 var(--font-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); }
.sheet__download, .lightbox__download { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgb(255 255 255 / .03);
  text-decoration: none; white-space: nowrap; font: 700 12px/1 var(--font-ui); letter-spacing: .06em; color: var(--text); transition: border-color .3s, color .3s, background-color .3s; }
.sheet__download svg, .lightbox__download svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sheet__download small, .lightbox__download small { font-weight: 500; letter-spacing: .02em; color: var(--text-3); }
.sheet__download:hover, .lightbox__download:hover { border-color: var(--gold); color: var(--gold-hi); background: rgb(217 181 108 / .08); }
.creators__note { margin: clamp(30px, 4vh, 44px) 0 0; font: 500 13px/1.8 var(--font-ui); color: var(--text-3); }

/* ---------------------------------------------------------------- 結び */

/* ---------------------------------------------------------------- アートを大きく見る（キャラクターシートも同じ枠で見る） */
.lightbox { width: min(96vw, 1100px); max-height: 96svh; overflow: hidden; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px 12px 24px; }
.lightbox__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0; font: 600 24px/1.2 var(--font-en); }
.lightbox__count { font: 700 11px/1 var(--font-ui); letter-spacing: .2em; color: var(--text-3); }
/* 行と列の大きさを決めておく（決めないと、絵の最大の高さが効かず、縦長の絵が下で切れる） */
.lightbox__stage { position: relative; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; height: calc(min(96svh, 1100px) - 80px); padding: 0 16px 16px; }
.lightbox__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 12px; box-shadow: 0 30px 80px -30px rgb(0 0 0 / .9); }
.lightbox__nav { position: absolute; top: 50%; display: grid; place-items: center; width: 52px; height: 52px; translate: 0 -50%; border: 1px solid var(--line-strong); border-radius: 50%; background: rgb(6 7 12 / .7); cursor: pointer; transition: border-color .3s, background-color .3s; }
.lightbox__nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lightbox__nav:hover { border-color: var(--gold); background: rgb(6 7 12 / .9); }
.lightbox__nav--prev { left: 24px; }
.lightbox__nav--next { right: 24px; }
.lightbox__nav[hidden] { display: none; }
.lightbox__tools { display: flex; align-items: center; gap: 10px; }
.lightbox__download[hidden] { display: none; }

/* ---------------------------------------------------------------- 演出OFF・動きを減らす設定 */
.is-calm .roster__item { transition: none; }
.is-calm .roster__img, .is-calm .art__img { scale: 1 !important; transition: opacity .25s ease, filter .3s ease; }
.is-calm .card__tilt { transform: none !important; }

/* ---------------------------------------------------------------- 画面幅 */
@media (max-width: 1080px) {
  .profile { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .creators__head { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  :root { --castbar-h: 54px; }
  .intro { padding: calc(var(--header-h) + 40px) 20px 48px; }
  .intro .title-en { font-size: clamp(56px, 17vw, 76px); }
  .intro__title { display: block; }
  .intro .title-sub { margin: 14px 0 0; }
  /* 肖像は縦に3つ並べた横長の帯にする（顔の位置で切り抜く） */
  .roster { flex-direction: column; height: auto; gap: 10px; margin-top: 32px; }
  .roster__item, .roster:hover .roster__item, .roster .roster__item:hover { flex: none; height: clamp(150px, 24vh, 200px); }
  .roster__link { border-radius: 16px; }
  .roster__link::before { background: linear-gradient(to right, rgb(6 7 12 / .9) 0%, rgb(6 7 12 / .5) 45%, transparent 75%); }
  .roster__text { left: 18px; right: auto; top: 50%; bottom: auto; translate: 0 -50%; gap: 4px; }
  .roster__name { font-size: 38px; }
  .roster__class { display: none; }
  .roster:hover .roster__item:not(:hover) .roster__img { filter: none; }
  .cast-bar { gap: 2px; padding: 0 10px; }
  .cast-bar a { gap: 7px; height: 40px; padding: 0 10px 0 4px; font-size: 16px; }
  .cast-bar img { width: 28px; height: 28px; }
  .profile { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 56px 20px 72px; }
  .profile.is-flip .profile__art { order: 0; }
  .profile__art { position: static; }
  .art { width: min(100%, 420px); min-width: 0; }
  .art-tab { width: 72px; }
  .profile__bgname { top: 30%; font-size: 34vw; }
  .profile__name { font-size: clamp(60px, 18vw, 80px); }
  /* 種族・身長・年齢は、見出しと値を左右に置いた行にする（3列だと値が折り返す） */
  .stats { display: grid; }
  .stats > div, .stats > div + div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 13px 0; border-left: 0; }
  .stats > div + div { border-top: 1px solid var(--line); }
  .stats dt { margin: 0; }
  .film { grid-template-columns: 104px minmax(0, 1fr); }
  .creators { padding: 72px 20px; }
  .creators__actions { display: grid; }
  .sheet__download { width: 100%; justify-content: center; }
  /* 狭い画面では、拡大表示のダウンロードは印と大きさだけを見せる（読み上げでは言葉も読む） */
  .lightbox__download-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lightbox__download { padding: 0 12px; }
  .lightbox__stage { height: calc(100svh - 80px); padding: 0 8px 8px; }
  .lightbox__nav { width: 44px; height: 44px; }
  .lightbox__nav--prev { left: 12px; }
  .lightbox__nav--next { right: 12px; }
}
