@property --lit { syntax: '<number>'; inherits: true; initial-value: 1; }
/* 裏方界隈 — 没入ギミック（入口の扉・墨消し見出し・機密テープ・MISSION・シルエットの名鑑・HUD）
   JSが無い／動きを減らす設定では、すべて静止した完成状態で表示する。 */

:root { --hud-h: 48px; }
html.gate-open { overflow: hidden; }

/* ============ 入口 ============ */
.gate { display: none; }
.has-js .gate { display: block; position: fixed; inset: 0; z-index: 100; color: var(--paper); }
.gate.is-done { display: none; }
.gate__door {
  position: absolute; top: 0; bottom: 0; width: 50.2%; overflow: hidden;
  background: #0B0C0F url('./images/tex-dark.webp') 0 0 / 384px repeat;
  transition: transform 1.15s cubic-bezier(.76,0,.2,1);
}
.gate__door--l { left: 0; box-shadow: inset -2px 0 0 rgba(234,229,217,.18); }
.gate__door--r { right: 0; background-position: 190px 40px; box-shadow: inset 2px 0 0 rgba(0,0,0,.8); }
.gate__seal { /* 扉の合わせ目を封じる赤いテープ（左右に半分ずつ） */
  position: absolute; top: calc(50% + 150px); width: 120px; height: 34px;
  background: url('./images/tape-a.webp') center / cover; filter: saturate(.9);
}
.gate__door--l .gate__seal { right: -2px; transform: rotate(-4deg); transform-origin: right center; }
.gate__door--r .gate__seal { left: -2px; transform: rotate(-4deg); transform-origin: left center; background-position: right center; }
.gate__stamp {
  position: absolute; left: 8%; top: 12%; padding: 6px 14px; border: 3px solid rgba(157,64,54,.8); color: rgba(157,64,54,.85);
  font-family: var(--font-num); font-weight: 800; font-size: clamp(18px, 3vw, 34px); letter-spacing: .16em; transform: rotate(-9deg);
}
.gate__stamp--r { left: auto; right: 8%; top: auto; bottom: 14%; font-size: clamp(12px, 1.6vw, 18px); border-width: 2px; transform: rotate(6deg); color: rgba(234,229,217,.45); border-color: rgba(234,229,217,.35); }
.gate__noise {
  position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: screen;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.035) 0 1px, transparent 1px 3px);
  animation: gate-flicker 2.4s steps(6) infinite;
}
.gate__noise::after { content: ""; position: absolute; left: 0; right: 0; height: 18%; top: -20%; background: linear-gradient(to bottom, transparent, rgba(234,229,217,.06), transparent); animation: gate-scan 3.2s linear infinite; }
@keyframes gate-flicker { 0%,100% { opacity: .45; } 50% { opacity: .6; } 70% { opacity: .38; } }
@keyframes gate-scan { to { top: 110%; } }

.gate__panel { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 22px; padding: 24px 20px; text-align: center; transition: opacity .35s; }
.gate__log { min-height: 5.6em; font-family: var(--font-mono); font-size: clamp(12px, 1.4vw, 15px); line-height: 1.85; color: #9FA3A9; text-align: left; }
.gate__log li { min-height: 1.85em; white-space: nowrap; }
.gate__log li.is-typing::after { content: "▌"; margin-left: 2px; animation: caret .8s steps(2) infinite; color: var(--paper); }
@keyframes caret { 50% { opacity: 0; } }
.gate__ask { display: grid; justify-items: center; gap: 10px; opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s; }
.gate.is-asking .gate__ask { opacity: 1; transform: none; }
.gate__q { font-family: var(--font-num); font-weight: 800; font-size: clamp(34px, 7vw, 84px); line-height: 1.05; letter-spacing: -0.02em; }
.gate__q strong { color: #B8493C; font-weight: 800; }
.gate.is-asking .gate__q { animation: glitch 1.6s steps(1) 1; }
@keyframes glitch { 0% { text-shadow: 3px 0 #9D4036, -3px 0 #47716D; transform: translateX(2px); } 8% { text-shadow: none; transform: none; } 14% { text-shadow: -2px 0 #9D4036, 2px 0 #47716D; transform: translateX(-2px) skewX(-4deg); } 20%,100% { text-shadow: none; transform: none; } }
.gate__q-ja { font-size: clamp(14px, 1.6vw, 17px); color: #C9C5BB; letter-spacing: .12em; }
.gate__choices { display: flex; gap: 16px; margin-top: 16px; }
.gate__btn {
  min-width: 132px; min-height: 52px; padding: 0 22px; border: 1px solid rgba(234,229,217,.7); background: rgba(8,9,11,.6); color: var(--paper);
  font-family: var(--font-num); font-weight: 700; font-size: 18px; letter-spacing: .08em; cursor: pointer; transition: background-color .18s, color .18s, border-color .18s;
}
.gate__btn span { display: inline-block; margin-right: .4em; font-size: .8em; animation: caret 1.1s steps(2) infinite; }
.gate__btn:hover, .gate__btn:focus-visible { background: var(--paper); color: var(--ink); }
.gate__note { margin-top: 4px; font-size: 12px; color: #8A8E95; }
.gate__result { min-height: 1.6em; font-family: var(--font-mono); font-size: clamp(14px, 1.8vw, 19px); letter-spacing: .06em; }
.gate__result b { display: block; margin-bottom: 6px; font-family: var(--font-num); font-size: clamp(22px, 3.6vw, 40px); letter-spacing: .14em; color: var(--cta); }
.gate__skip { position: absolute; right: 16px; top: 14px; min-width: 64px; min-height: 44px; border: 1px solid rgba(234,229,217,.4); background: transparent; color: #C9C5BB; font-family: var(--font-num); font-size: 12px; letter-spacing: .2em; cursor: pointer; }
.gate__skip:hover { color: var(--paper); border-color: var(--paper); }
.gate.is-answered .gate__ask { opacity: 0; pointer-events: none; }
.gate.is-opening .gate__panel, .gate.is-opening .gate__skip, .gate.is-opening .gate__noise { opacity: 0; transition: opacity .3s; }
.gate.is-opening .gate__door--l { transform: translateX(-102%); }
.gate.is-opening .gate__door--r { transform: translateX(102%); }
.gate.is-shaking .gate__door { animation: door-shake .32s steps(4) 1; }
@keyframes door-shake { 25% { translate: -3px 0; } 50% { translate: 3px 1px; } 75% { translate: -2px -1px; } }

/* ============ HUD ============ */
.hud { position: fixed; z-index: 60; left: 0; right: 0; top: 0; height: var(--hud-h); display: flex; align-items: center; gap: 14px; padding: 0 16px;
  background: linear-gradient(to bottom, rgba(8,9,11,.94) 60%, rgba(8,9,11,0)); pointer-events: none; opacity: 0; transform: translateY(-8px); transition: opacity .5s, transform .5s; }
html:not(.has-js) .hud, .hud.is-on { opacity: 1; transform: none; }
.hud > * { pointer-events: auto; }
.hud__logo { font-weight: 900; font-size: 15px; letter-spacing: .12em; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.hud__file { flex: 1; display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: #A7A9AE; white-space: nowrap; overflow: hidden; }
.hud__rec { width: 7px; height: 7px; border-radius: 50%; background: #C0473A; flex: none; animation: caret 1.4s steps(2) infinite; }
.hud__sound { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid rgba(234,229,217,.35); background: rgba(8,9,11,.5); color: var(--paper); font-family: var(--font-num); font-size: 11px; letter-spacing: .14em; cursor: pointer; }
.hud__sound-icon { width: 14px; height: 12px; background: linear-gradient(currentColor, currentColor) 0 50% / 3px 6px no-repeat, linear-gradient(currentColor, currentColor) 4px 50% / 3px 10px no-repeat, linear-gradient(currentColor, currentColor) 8px 50% / 3px 12px no-repeat; }
.hud__sound[aria-pressed="false"] { color: #7C8087; }
.hud__sound[aria-pressed="false"] .hud__sound-icon { background-size: 3px 3px, 3px 3px, 3px 3px; }
.hud__progress { position: absolute; left: 0; bottom: 6px; height: 2px; width: 100%; background: #B8493C; transform-origin: left; transform: scaleX(var(--progress, 0)); opacity: .9; }
.hero__inner { padding-top: calc(var(--u) * 6 + 16px); }
@media (max-width: 700px) { .hero__inner { padding-top: calc(var(--m) * 468); } .hud__file { font-size: 10px; } .hud__logo { font-size: 13px; } }
/* スマホ幅：場所の英字が SOUND ON の下にもぐらないよう、入りきらない分は「…」で止める */
@media (max-width: 700px) { .hud__file { min-width: 0; } .hud__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; } }

/* ============ 墨消しの見出し（画面に入ると墨が剥がれる） ============ */
.has-js [data-redact] { position: relative; }
.has-js [data-redact] .redact { position: relative; display: inline-block; }
.has-js [data-redact] .redact::after {
  content: ""; position: absolute; left: -.08em; right: -.08em; top: .08em; bottom: .04em; background: var(--redact, #0E0F12);
  transform-origin: right center; transform: scaleX(1); transition: transform .62s cubic-bezier(.7,0,.2,1) var(--d, 0s);
}
.has-js [data-redact] .redact__t { opacity: 0; transition: opacity .01s linear calc(var(--d, 0s) + .12s); }
.has-js [data-redact].is-open .redact::after { transform: scaleX(0); }
.has-js [data-redact].is-open .redact__t { opacity: 1; }
.dark [data-redact], .mission [data-redact] { --redact: #D8D1C3; }
.teal [data-redact] { --redact: #0E1718; }

/* ============ 機密テープ（スクロールで横に流れる） ============ */
.tapeband { position: relative; z-index: 3; overflow: hidden; background: #8E3A31; color: #F0E9DC; transform: rotate(-1.6deg); margin: 0 -2vw; box-shadow: 0 6px 16px rgba(0,0,0,.55); }
.tapeband::before { content: ""; position: absolute; inset: 0; background: url('./images/tape-a.webp') center / 240px 100%; opacity: .35; mix-blend-mode: multiply; }
.tapeband__track { position: relative; white-space: nowrap; padding: 10px 0; font-family: var(--font-num); font-weight: 800; font-size: clamp(13px, 1.5vw, 18px); letter-spacing: .24em; transform: translateX(var(--shift, 0px)); will-change: transform; }
.tapeband--final { position: absolute; left: 0; right: 0; top: 0; transform: rotate(1.2deg); background: #1A1B1F; color: var(--cta); }
.tapeband--final::before { display: none; }
.final { padding-top: calc(var(--u) * 40 + 64px); }
@media (max-width: 700px) { .final { padding-top: 110px; } }

/* ============ 名鑑：シルエット → 光が当たって正体が分かる ============ */
.agents { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(var(--u) * 16); margin: calc(var(--u) * 36) calc(var(--u) * 60) 0 calc(var(--u) * 60); }
.agent { --lit: 1; transition: --lit .55s cubic-bezier(.2,.8,.2,1); }
.has-js .agent { --lit: 0; }
.has-js .agent.is-lit { --lit: 1; }
.reduce-motion .agent { --lit: 1; transition: none; }
.hint-pointer, .hint-touch { display: none; }
.agents-hover .hint-pointer, .agents-touch .hint-touch, html:not(.has-js) .hint-touch { display: inline; }
.agent__link { position: relative; display: grid; grid-template-rows: auto 1fr auto auto auto auto; height: 100%; padding: 14px 16px 18px; text-decoration: none; color: var(--paper);
  background: #0D0E11 url('./images/tex-dark.webp') 0 0 / 384px repeat; border: 1px solid rgba(234,229,217,.14); overflow: hidden; transition: border-color .2s; }
.agent__link:hover, .agent__link:focus-visible { border-color: rgba(255,226,52,.8); }
.agent__top { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; color: #8A8E95; }
.agent__status i { font-style: normal; }
.agent__on { display: none; color: #D7C36A; }
.agent.is-lit .agent__off { display: none; }
.agent.is-lit .agent__on { display: inline; }
.agent { --stage-h: clamp(250px, 30vw, 400px); }
.agent__stage { position: relative; display: flex; align-items: flex-end; justify-content: center; height: var(--stage-h); margin: 8px -16px 0; overflow: hidden; }
.agent__img { position: relative; z-index: 1; width: auto; height: var(--stage-h); max-width: 100%; object-fit: contain; object-position: center bottom;
  filter: brightness(calc(var(--lit) * 1)) saturate(var(--lit)) drop-shadow(0 0 1px rgba(234,229,217, calc(.5 - var(--lit) * .5))) drop-shadow(0 18px 18px rgba(0,0,0,.6)); }
.agent__beam { /* 上からのスポットライト */
  position: absolute; z-index: 0; left: 50%; top: -30px; width: 120%; height: calc(100% + 40px); transform: translateX(-50%);
  background: radial-gradient(ellipse 45% 18% at 50% 96%, rgba(255,240,200, calc(var(--lit) * .22)), transparent 70%),
              linear-gradient(to bottom, rgba(255,236,190, calc(var(--lit) * .20)), rgba(255,236,190, 0) 85%);
  clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%); opacity: var(--lit);
}
.agent__name { margin-top: 12px; font-weight: 900; font-size: calc(var(--u) * 19); line-height: 1.3; }
.agent__line { margin-top: 6px; font-size: 14px; line-height: 1.7; color: #D9D4C9; min-height: 3.4em; }
.agent__en { margin-top: 6px; font-family: var(--font-num); font-weight: 600; font-size: 10.5px; letter-spacing: .16em; color: #8A8E95; }
.agent__go { margin-top: 12px; justify-self: start; font-weight: 700; font-size: 13px; padding: 6px 0; border-bottom: 1px solid rgba(234,229,217,.5); }
.agent__name, .agent__line, .agent__en, .agent__go { transition: opacity .5s, filter .5s; }
.has-js .agent:not(.is-lit) .agent__name, .has-js .agent:not(.is-lit) .agent__line, .has-js .agent:not(.is-lit) .agent__en { filter: blur(6px); opacity: .35; }
@media (max-width: 1023px) and (min-width: 701px) { .agents { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .agents { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 24px 20px 0; }
  .agent__link { padding: 10px 10px 14px; }
  .agent { --stage-h: 240px; }
  .agent__stage { margin: 6px -10px 0; }
  .agent__name { font-size: 18px; margin-top: 10px; }
  .agent__line { font-size: 12.5px; min-height: 0; }
  .agent__line br { display: none; }
  .agent__en { font-size: 9px; letter-spacing: .1em; }
  .agent__top { font-size: 9.5px; letter-spacing: .06em; }
}

/* ============ FVの判子（扉が開いたあと、1文字ずつ押される） ============ */
.has-js .hero__ura .ch, .has-js .hero__kai .ch { display: inline-block; opacity: 0; transform: scale(1.6) rotate(-6deg); }
.has-js .hero.is-live .hero__ura .ch, .has-js .hero.is-live .hero__kai .ch { animation: stamp .42s cubic-bezier(.2,1.4,.4,1) both; animation-delay: calc(var(--i) * .16s); }
.has-js .hero.is-live .hero__kai .ch { animation-delay: calc(.34s + var(--i) * .16s); }
@keyframes stamp { 0% { opacity: 0; transform: scale(1.6) rotate(-6deg); } 60% { opacity: 1; transform: scale(.96) rotate(1deg); } 100% { opacity: 1; transform: none; } }
.has-js .hero__en, .has-js .hero .scroll-cue { opacity: 0; transform: translateY(10px); transition: opacity .6s, transform .6s; }
.has-js .hero.is-live .hero__en { opacity: 1; transform: none; transition-delay: .7s; }
.has-js .hero.is-live .scroll-cue { opacity: 1; transform: none; transition-delay: 1.2s; }

/* 動きを減らす設定：扉は一瞬で開き、演出は完成状態 */
.reduce-motion .gate__door, .reduce-motion .gate__panel { transition: none !important; }
.reduce-motion .gate__noise, .reduce-motion .hud__rec, .reduce-motion .gate__btn span { animation: none; }
.reduce-motion [data-redact] .redact::after { transition: none !important; }
.reduce-motion .hero .ch, .reduce-motion .hero__en, .reduce-motion .hero__body, .reduce-motion .hero .scroll-cue { opacity: 1 !important; transform: none !important; animation: none !important; }
.reduce-motion .agent__img, .reduce-motion .agent__name, .reduce-motion .agent__line { transition: none; }


/* タッチ端末：右列を半段ずらし、中央に来るカードが左右交互に1枚ずつになるようにする */
@media (max-width: 1023px) {
  .agents-touch .agents { padding-bottom: 46%; grid-auto-rows: 1fr; }
  .agents-touch .agents li:nth-child(even) { transform: translateY(52%); }
}

/* ============ FVの文言：スクロールに合わせて登場（--p1〜--p4 はJSが0→1で渡す） ============ */
.hero { --p1: 1; --p2: 1; --p3: 1; --p4: 1; }
.has-js .hero { --p1: 0; --p2: 0; --p3: 0; --p4: 0; }
/* 1 主コピー：1文字ずつ、ぼけた状態からくっきり */
.hero__lead .ch { --t: clamp(0, calc(var(--p1) * (var(--n, 14) + 3) - var(--i)), 1); display: inline-block;
  opacity: var(--t); transform: translateY(calc((1 - var(--t)) * .45em)); filter: blur(calc((1 - var(--t)) * 5px)); }
/* 2 補足：左から右へ現れる */
.hero__sub { clip-path: inset(0 calc((1 - var(--p2)) * 100%) 0 0); }
/* 3 CTA：テープを左から貼るように伸び、文字は最後に出る */
.hero .cta-wrap { clip-path: inset(-14px calc((1 - var(--p3)) * (100% + 28px) - 14px) -14px -14px); }
.hero .cta > * { opacity: clamp(0, calc(var(--p3) * 4 - 3), 1); }
/* 4 DM案内 */
.hero .cta-note { opacity: var(--p4); transform: translateY(calc((1 - var(--p4)) * 8px)); }
/* SCROLLの案内は文言が出そろうと薄くなる */
.has-js .hero.is-live .scroll-cue { opacity: calc(1 - var(--p4) * .6); }
.reduce-motion .hero { --p1: 1 !important; --p2: 1 !important; --p3: 1 !important; --p4: 1 !important; }

/* FVを少しのあいだ画面に固定し、その間に文言が出る（固定距離＝--hero-pin。JSの進み具合と同じ値） */
.hero { overflow: clip; --hero-pin: 320px; }
.hero__pin { position: relative; }
.has-js:not(.reduce-motion) .hero::after { content: ""; display: block; height: var(--hero-pin); } /* 固定しておく距離（paddingだとstickyが効かない） */
.has-js:not(.reduce-motion) .hero__pin { position: sticky; top: 0; }
@media (max-width: 700px) {
  .hero { background: var(--ink); }
  .hero__pin { background: var(--ink) url('./images/hero-mobile.webp') center top / 100% auto no-repeat; }
}

/* 扉が開いたあと見出しへ移したフォーカスの枠は出さない（読み上げ位置のためだけ） */
#hero-title:focus { outline: none; }

/* 入口の効果音ボタン・スキップ */
.gate__note { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.gate__sound { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid rgba(234,229,217,.45); background: rgba(8,9,11,.6); color: var(--paper); font: 700 12px var(--font-ja); letter-spacing: .06em; cursor: pointer; }
.gate__sound[aria-pressed="false"] { color: #8A8E95; }
.gate__sound[aria-pressed="false"] .hud__sound-icon { background-size: 3px 3px, 3px 3px, 3px 3px; }
.gate__skip { min-width: 0; padding: 0 14px; letter-spacing: .08em; font-family: var(--font-ja); }
/* DMで送る文 */
.cta-note__dm { display: inline-block; margin-top: 4px; color: #D7C36A; }

/* 04 この集まりについて（事実だけの一覧） */
.about { margin-top: calc(var(--u) * 26); max-width: 560px; }
.about__title { display: flex; align-items: baseline; gap: 12px; font-weight: 700; font-size: 15px; line-height: 1.4; }
.about__title small { font-family: var(--font-num); font-weight: 600; font-size: 10px; letter-spacing: .16em; color: var(--muted); margin: 0; }
.about__list { margin: 12px 0 0; border-top: 1px solid rgba(234,229,217,.25); }
.about__list > div { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(234,229,217,.18); }
.about__list dt { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: #C9A95A; padding-top: .2em; }
.about__list dd { margin: 0; font-size: 14.5px; line-height: 1.7; }
@media (max-width: 700px) {
  .about { margin-top: 22px; }
  .about__list > div { grid-template-columns: 6.2em 1fr; gap: 10px; }
  .about__list dd { font-size: 14px; }
}

/* ============ MISSION（見本サイトの DO MANIFESTO 型）
   画面に固定し、各段階の前半は静止・後半で次の言葉へ縦にスライド。背景は 黒→錆赤→生成り を斜めのワイプで入れ替える。
   高さは読み込み時に測った --mvh（1vhのpx値）で固定し、スマホのツールバー出入りでは組み直さない。 ============ */
.mission { height: calc(var(--mvh, 1vh) * 330); background: #060709; overflow-x: clip; }
.mission__pin { position: sticky; top: 0; height: calc(var(--mvh, 1vh) * 100); display: grid; align-items: center; overflow: hidden; }
.mission__pin::before { /* 背景の大きな透かし文字 */
  content: "URAKATA"; position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%) translateX(var(--ghost, 0px));
  font-family: var(--font-num); font-weight: 800; font-size: 28vw; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(234,229,217,.08); white-space: nowrap; pointer-events: none;
}
.mission__panel { position: absolute; inset: -2px; z-index: 1; clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); will-change: clip-path; }
.mission__panel--2 { background: #7E332B url('./images/tex-dark.webp') 0 0 / 384px repeat; background-blend-mode: soft-light; }
.mission__panel--3 { background: #E3DACB url('./images/tex-cream.webp') 0 0 / 192px repeat; background-blend-mode: multiply; }
.mission__blade { position: absolute; z-index: 2; left: 0; top: 50%; width: 3px; margin-left: -1.5px; background: var(--cta); opacity: 0; pointer-events: none; will-change: transform; }
.mission__inner { position: relative; z-index: 3; width: var(--wrap); margin-inline: auto; padding: 0 calc(var(--u) * 55); color: var(--paper); transition: color .45s; }
.mission__label { display: flex; align-items: baseline; gap: 16px; font-family: var(--font-num); font-weight: 700; font-size: 13px; letter-spacing: .24em; color: #C0473A; transition: color .45s; }
.mission__label small { font-family: var(--font-ja); font-weight: 400; letter-spacing: .08em; color: inherit; opacity: .75; font-size: 13px; margin: 0; }
.mission__roll { height: var(--item-h, 3.4em); margin-top: 22px; overflow: hidden; }
.mission__list { margin: 0; will-change: transform; }
.mission__item { height: var(--item-h, auto); }
.mission__en { font-family: var(--font-num); font-weight: 800; font-size: clamp(52px, 11vw, 168px); line-height: .92; letter-spacing: -0.03em; }
.mission__ja { margin-top: 18px; font-weight: 700; font-size: clamp(17px, 2.2vw, 28px); }
.mission__count { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 18px; font-family: var(--font-num); font-weight: 700; font-size: 13px; opacity: .45; }
.mission__count span.is-active { opacity: 1; }
.mission__count span { opacity: .5; }
.mission__count i { width: 28px; height: 1px; background: currentColor; opacity: .5; }
.mission[data-step="1"] .mission__label { color: #F0D9A8; }
.mission[data-step="2"] .mission__inner { color: #17181B; }
.mission[data-step="2"] .mission__label { color: #8E3A31; }
.mission[data-step="2"] .mission__pin::before { -webkit-text-stroke-color: rgba(23,24,27,.1); }
.mission[data-step="2"] .mission__count { opacity: .7; }
@media (max-width: 700px) {
  .mission { height: calc(var(--mvh, 1vh) * 300); }
  .mission__inner { padding: 0 20px; }
  .mission__label { flex-direction: column; gap: 4px; }
}
/* JSなし・動きを減らす：固定せず、3つを縦に並べて全部見せる */
html:not(.has-js) .mission, .reduce-motion .mission { height: auto; }
html:not(.has-js) .mission__pin, .reduce-motion .mission__pin { position: relative; height: auto; padding: 80px 0; }
html:not(.has-js) .mission__roll, .reduce-motion .mission__roll { height: auto; overflow: visible; }
html:not(.has-js) .mission__item, .reduce-motion .mission__item { height: auto; margin-bottom: 44px; }
html:not(.has-js) .mission__list, .reduce-motion .mission__list { transform: none !important; }
html:not(.has-js) .mission__panel, .reduce-motion .mission__panel, html:not(.has-js) .mission__count, .reduce-motion .mission__count { display: none; }

/* 名鑑：PCの3列で最後の1枚が余るときは中央に置く */
@media (min-width: 1024px) { .agents li:last-child:nth-child(3n+1) { grid-column: 2; } }

/* 名鑑（タッチ端末）：人数が奇数のときは右列の半段ずらし用の下余白を減らす */
@media (max-width: 1023px) {
  .agents-touch .agents:has(> li:last-child:nth-child(odd)) { padding-bottom: 24px; }
}

/* ============ 03 裏方って、何？（機密ファイルのチェックシート） ============ */
.check__lead { margin-top: calc(var(--u) * 16); font-size: calc(var(--u) * 14.5); line-height: 1.9; color: #D9D4C9; }
.check__sheet {
  position: relative; margin: calc(var(--u) * 22) 0 0; padding: 20px 22px 14px; border: 0; min-width: 0;
  background: #E3DACB url('./images/tex-cream.webp') 0 0 / 192px repeat; background-blend-mode: multiply; color: #17181B;
  clip-path: var(--rough-card); box-shadow: inset 0 0 22px rgba(90,70,40,.25);
}
.check__legend { float: left; width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 0 0 10px; margin-bottom: 4px; border-bottom: 1px dashed rgba(23,24,27,.45); font-size: 12.5px; font-weight: 700; }
.check__legend span[lang="en"] { font-family: var(--font-mono); font-weight: 400; letter-spacing: .1em; color: #8E3A31; }
.check__list { clear: both; }
.check__list li + li { border-top: 1px solid rgba(23,24,27,.16); }
.check__item { position: relative; display: grid; grid-template-columns: 28px 26px 1fr; align-items: start; gap: 10px; min-height: 44px; padding: 11px 4px; cursor: pointer; border-radius: 2px; transition: background-color .18s; }
.check__item:hover { background: rgba(255,226,52,.18); }
.check__box { position: absolute; opacity: 0; width: 28px; height: 28px; margin: 0; left: 4px; top: 9px; cursor: pointer; }
.check__mark { position: relative; width: 24px; height: 24px; margin-top: 1px; border: 2px solid #17181B; background: rgba(255,255,255,.35); }
.check__mark::after { /* 赤ペンのチェック */
  content: ""; position: absolute; left: 6px; top: -3px; width: 9px; height: 17px; border: solid #B23A2E; border-width: 0 4px 4px 0;
  transform: rotate(40deg) scale(0); transform-origin: center; transition: transform .18s cubic-bezier(.3,1.6,.5,1);
}
.check__box:checked + .check__mark::after { transform: rotate(40deg) scale(1); }
.check__box:focus-visible + .check__mark { outline: 3px solid var(--cta); outline-offset: 3px; }
.check__no { font-family: var(--font-mono); font-size: 12px; color: #6B6A66; padding-top: 4px; }
.check__text { font-size: calc(var(--u) * 14.5); font-weight: 700; line-height: 1.65; }
.check__item:has(.check__box:checked) .check__text { text-decoration: underline; text-decoration-color: rgba(178,58,46,.55); text-decoration-thickness: 2px; text-underline-offset: 5px; }
/* メッセージ：2つを同じ場所に重ね、高さは長い方で固定（ボタン位置が跳ねない） */
.check__result { display: grid; margin-top: calc(var(--u) * 22); }
.check__msg { grid-area: 1 / 1; font-size: calc(var(--u) * 19); font-weight: 700; line-height: 1.5; transition: opacity .25s, transform .25s; }
.check__msg strong { color: #D9564A; font-weight: 900; }
.check__msg--on { opacity: 0; transform: translateY(6px); visibility: hidden; }
.check:has(.check__box:checked) .check__msg--off { opacity: 0; visibility: hidden; }
.check:has(.check__box:checked) .check__msg--on { opacity: 1; transform: none; visibility: visible; }
.check__note { margin-top: 8px; font-size: 13.5px; color: #B9B6AE; }
.check__go { display: inline-flex; align-items: center; min-height: 48px; margin-top: calc(var(--u) * 18); padding: 0 20px; border: 1px solid rgba(234,229,217,.7); color: var(--paper); font-weight: 700; font-size: 15px; text-decoration: none; transition: background-color .18s, color .18s; }
.check__go:hover, .check__go:focus-visible { background: var(--paper); color: var(--ink); }
#for-you .row { align-items: flex-start; }
#for-you .col.check { max-width: 640px; }
@media (max-width: 700px) {
  .check__lead { font-size: 15px; }
  .check__sheet { padding: 16px 14px 10px; }
  .check__item { grid-template-columns: 26px 22px 1fr; gap: 8px; }
  .check__text { font-size: 15px; }
  .check__msg { font-size: 19px; }
  .check__go { width: 100%; justify-content: center; }
}
.reduce-motion .check__msg, .reduce-motion .check__mark::after { transition: none; }

/* ページ内リンクの移動先が上部の固定表示に隠れないように */
[data-lp-section], #members { scroll-margin-top: 56px; }
#mission { scroll-margin-top: 0; }

/* ============ 05 名鑑の導入（旧06の一文と青緑の帯） ============ */
.members__head { flex-wrap: wrap; }
.members__lead { flex-basis: 100%; margin: calc(var(--u) * 16) 0 0 calc(var(--u) * 76); }
.members__band { display: inline-block; padding: 8px 16px; background: #2F595C; color: var(--paper); font-weight: 700; font-size: calc(var(--u) * 15.5); line-height: 1.5; clip-path: var(--rough-cta); }
.members__head .members__hint { flex-basis: 100%; margin-left: calc(var(--u) * 76); margin-top: 10px; }
@media (max-width: 700px) {
  .members__lead { margin: 8px 0 0; }
  .members__band { font-size: 15px; padding: 7px 12px; }
  .members__head .members__hint { margin-left: 0; }
}

/* ============ 05 募集カード（空席のファイル） ============ */
.agent--recruit .agent__link { background: transparent; border: 2px dashed rgba(234,229,217,.38); }
.agent--recruit .agent__link:hover, .agent--recruit .agent__link:focus-visible { border-color: var(--cta); }
.agent--recruit .agent__status { color: #C0473A; letter-spacing: .16em; }
.recruit__stage { display: grid; grid-template-columns: 100%; grid-template-rows: 100%; place-items: center; }
.recruit__frame { display: grid; place-items: center; width: min(62%, 220px); height: 84%; border: 2px dashed rgba(234,229,217,.25); border-radius: 50% 50% 8px 8px / 30% 30% 8px 8px; }
.recruit__q { font-family: var(--font-num); font-weight: 800; font-size: clamp(64px, 9vw, 120px); color: rgba(234,229,217,.22); }
.recruit__stamp { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%) rotate(-12deg); padding: 4px 12px; border: 3px solid rgba(192,71,58,.85); color: rgba(192,71,58,.95); font-family: var(--font-num); font-weight: 800; font-size: 15px; letter-spacing: .18em; background: rgba(8,9,11,.55); }
.agent--recruit .recruit__en { margin-top: 12px; color: var(--cta); letter-spacing: .14em; font-weight: 700; }
.agent--recruit .agent__name { font-size: calc(var(--u) * 17); }
.agent--recruit .agent__go { color: var(--cta); border-color: rgba(255,226,52,.6); }
.agent--recruit .agent__name, .agent--recruit .agent__en { filter: none !important; opacity: 1 !important; }
@media (max-width: 700px) { .agent--recruit .agent__name { font-size: 16px; } .recruit__stamp { font-size: 12px; } }

@media (max-width: 700px) { .recruit__go { font-size: 12px; } }

/* 移動先の見出しへ移したフォーカスの枠は出さない（読み上げ位置のためだけ） */
#mission-title:focus, #how-title:focus { outline: none; }

/* 名鑑カード：狭い幅でも文字が枠からはみ出さないよう、カード内は通常の折り返しにする */
.agent, .agent * { overflow-wrap: anywhere; }
.agent__line, .agent__name { word-break: auto-phrase; } /* 文節で折り返し、入りきらない時だけ文節の途中で折る */
.agent__en { word-break: normal; overflow-wrap: break-word; }
.recruit__stamp, .agent__file, .agent__go { white-space: nowrap; overflow-wrap: normal; }
.agent__top { gap: 6px; }
.agent__status { white-space: nowrap; }
@media (max-width: 700px) { .agent__top { font-size: 9px; letter-spacing: .02em; } }

/* 小柄なキャラ（あん）：ほかのメンバーの約半分の高さで、足元をそろえる */
.agent__img--small { height: calc(var(--stage-h) * .52); }

/* ============ 05 名鑑：横スワイプで1人ずつ（真ん中のカードに光） ============ */
.carousel { --card-w: 320px; position: relative; margin-top: calc(var(--u) * 30); }
.agents.agents--carousel {
  display: flex; gap: 22px; margin: 0; padding: 8px calc(50% - var(--card-w) / 2) 18px;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; transform: none !important;
}
.agents.agents--carousel::-webkit-scrollbar { display: none; }
.agents.agents--carousel:focus-visible { outline: 2px solid var(--cta); outline-offset: 4px; }
.agents--carousel > li, .agents-touch .agents--carousel > li:nth-child(even) {
  flex: 0 0 var(--card-w); scroll-snap-align: center; scroll-snap-stop: always; transform: none;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .45s;
}
.has-js:not(.reduce-motion) .agents--carousel > li:not(.is-center) { transform: scale(.9); opacity: .55; }
.agents-touch .agents.agents--carousel, .agents.agents--carousel:has(> li:last-child:nth-child(odd)) { padding-bottom: 18px; }
.agents--carousel > li:last-child:nth-child(3n+1) { grid-column: auto; }
.agents--carousel .agent__line { min-height: 3.4em; }
/* 両端を暗くして「続きがある」ことを見せる */
.carousel::before, .carousel::after { content: ""; position: absolute; z-index: 2; top: 0; bottom: 90px; width: calc(50% - var(--card-w) / 2 - 10px); pointer-events: none; }
.carousel::before { left: 0; background: linear-gradient(to right, rgba(8,9,11,.85), rgba(8,9,11,0)); }
.carousel::after { right: 0; background: linear-gradient(to left, rgba(8,9,11,.85), rgba(8,9,11,0)); }
/* 操作 */
.carousel__ctrl { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 6px; }
.carousel__btn { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid rgba(234,229,217,.55); background: rgba(8,9,11,.6); color: var(--paper); font: 700 20px var(--font-num); cursor: pointer; transition: background-color .18s, color .18s, opacity .18s; }
.carousel__btn:hover, .carousel__btn:focus-visible { background: var(--paper); color: var(--ink); }
.carousel__btn:disabled { opacity: .3; cursor: default; background: transparent; color: var(--paper); }
.carousel__count { display: flex; align-items: center; gap: 10px; min-width: 120px; justify-content: center; font-family: var(--font-mono); font-size: 15px; letter-spacing: .12em; color: var(--muted); }
.carousel__now { color: var(--cta); font-weight: 700; font-size: 18px; }
.carousel__count i { width: 26px; height: 1px; background: currentColor; }
.carousel__index { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 760px; margin: 16px auto 0; padding: 0 20px; }
.carousel__index button { min-width: 36px; height: 30px; padding: 0 6px; border: 1px solid rgba(234,229,217,.25); background: transparent; color: #8A8E95; font: 600 11px var(--font-mono); letter-spacing: .04em; cursor: pointer; }
.carousel__index button:hover { color: var(--paper); border-color: rgba(234,229,217,.6); }
.carousel__index button[aria-current="true"] { color: var(--ink); background: var(--cta); border-color: var(--cta); }
.carousel__index .is-vacant { border-style: dashed; color: #C0473A; }
html:not(.has-js) .carousel__ctrl, html:not(.has-js) .carousel__index { display: none; }
@media (max-width: 700px) {
  .carousel { --card-w: min(74vw, 300px); margin-top: 20px; }
  .agents.agents--carousel { gap: 14px; }
  .agents--carousel .agent__line { min-height: 0; }
  .carousel__index { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding: 2px 20px; }
  .carousel__index::-webkit-scrollbar { display: none; }
  .carousel__index button { flex: none; min-width: 40px; height: 34px; }
}
.reduce-motion .agents--carousel > li { transition: none; transform: none !important; opacity: 1 !important; }
/* 名鑑（横スワイプ）：PCでも矢印まで1画面に収まるよう、カードを低めに。欄外の飾りはカードに重なるので出さない */
.carousel .agent { --stage-h: clamp(230px, 24vw, 310px); }
.carousel .agent__img--small { height: calc(var(--stage-h) * .52); }
#members .deco-en--members, #members .tape--r05 { display: none; }
@media (max-width: 700px) { .carousel .agent { --stage-h: 230px; } }

/* 名鑑の目次：番号＋名前で選べる */
.carousel__index button { display: inline-flex; align-items: baseline; gap: 6px; height: 34px; padding: 0 10px; }
.carousel__no { font: 600 10px var(--font-mono); letter-spacing: .04em; opacity: .7; }
.carousel__nm { font: 700 12.5px var(--font-ja); letter-spacing: 0; }
.carousel__index button[aria-current="true"] .carousel__no { opacity: 1; }
.carousel__index { max-width: 980px; gap: 6px 6px; }
@media (max-width: 700px) { .carousel__index button { height: 36px; } }
.carousel__index button { white-space: nowrap; flex: none; }
.carousel__index button > span { white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }

/* ============ 名鑑：照明が「パン」とつく ============ */
.has-js .agent { transition: --lit .18s ease-out; }                 /* 消えるときは素早く */
.has-js .agent.is-lit { transition: none; }                          /* つくときは一瞬 */
.agent__stage::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 30%, rgba(255,250,232,1), rgba(255,240,200,.55) 40%, rgba(255,230,170,.12) 70%, transparent 85%); mix-blend-mode: screen; }
.agent.is-flash .agent__stage::after { animation: spot-flash .75s cubic-bezier(.1,.7,.3,1) both; }
.agent.is-flash .agent__beam { animation: spot-beam .6s steps(1) both; }
.agent.is-flash .agent__img { animation: spot-img .6s ease-out both; }
@keyframes spot-flash { 0% { opacity: 0; } 6% { opacity: .95; } 18% { opacity: .8; } 100% { opacity: 0; } }
@keyframes spot-beam { 0% { opacity: .4; } 12% { opacity: 1; } 22% { opacity: .55; } 30%, 100% { opacity: 1; } }
@keyframes spot-img { 0% { filter: brightness(1.9) saturate(.6); } 100% { filter: brightness(1) saturate(1) drop-shadow(0 18px 18px rgba(0,0,0,.6)); } }
.agent.is-flash .agent__name, .agent.is-flash .agent__line, .agent.is-flash .agent__en { transition: none; }
.reduce-motion .agent.is-flash .agent__stage::after, .reduce-motion .agent.is-flash .agent__beam, .reduce-motion .agent.is-flash .agent__img { animation: none; }

/* LP診断（2026-10-08）：英字の合言葉は02の見せ場だけに。03・04の欄外の英字は表示しない（文字は残す） */
#for-you .deco-en--side, #gather .deco-en--low { display: none !important; }
