/* UI 仕上げ（unslop by Damir Sokolovsky @heydamir, CC BY 4.0 の考え方を参考）
 * 元の index-*.css の後に読み込み、上書きだけで調整する。
 * 謎解きの演出（反転・グリッチ・vq・reveal）には触れない。
 */
:root {
  --line: rgba(255, 255, 255, .12);
  --sub: #c3c6d4;              /* 文字の 3 段階：--ink / --sub / --dim */
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- 動き ----------
 * 制作物一覧（「押すと光る」「動けば動くほどカッコいい」）に合わせ、
 * ボタンの脈打つ光・光の帯・押したときの発光・顔アイコンの揺れは元のまま残す。
 */
.btn { transition: transform .15s var(--ease), background-color .15s var(--ease), color .15s var(--ease), filter .2s var(--ease); }

/* ---------- 背景の上部：大会ロゴ（メインビジュアルが届くまでの代わり） ---------- */
.screen.top, .screen.quiz, .screen.result { position: relative; }
.screen.top:before, .screen.quiz:before, .screen.result:before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -8px;
  right: -8px;
  top: calc(24px + env(safe-area-inset-top));
  aspect-ratio: 1361 / 557;
  background: url("img/logo-haige.webp") center top / contain no-repeat;
  opacity: .16;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 40%, transparent);
  mask-image: linear-gradient(#000 40%, transparent);
}
/* 質問・結果の画面では文字と重なって崩れて見えるので、トップだけに出す */
.screen.quiz:before, .screen.result:before { content: none; }

/* ---------- ホバーと、キーボード操作の選択枠 ---------- */
@media (hover: hover) {
  .btn--main:hover { --bc: #d6fa6a; }
  .btn--result:hover { --bc: #ffd463; }
  .btn--x:hover { --bc: #e4e5ec; }
  .btn--sub:hover { background: rgba(255, 255, 255, .1); }
  .btn:disabled:hover { --bc: #2a2e42; }
}
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px #04050a; }
.btn--sub:focus-visible { box-shadow: inset 0 0 0 2px var(--lime); }
.dot:focus-visible, .member:focus-visible, .sound:focus-visible,
.modal__close:focus-visible, .player__skip:focus-visible, .foot a:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

/* ---------- 色：光る演出は残し、補足の文字だけ落ち着かせる ---------- */
.dot:hover { border-color: rgb(var(--c)); }
.dot.is-on { border-color: rgb(var(--c)); }
.top__lead small { color: var(--dim); letter-spacing: .08em; }
.quiz__intro p { color: var(--sub); }
.notes__title { color: var(--ink); }
.notes li { color: var(--sub); }
.hints__title span { color: var(--dim); }
.modal__box { border-color: var(--line); }

/* 注意帯：縞の上に白文字だと読みにくいので、縞は上下の帯に */
.spoiler { position: relative; padding: 16px; background: #111; color: var(--gold); text-shadow: none; }
.spoiler:before, .spoiler:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(-45deg, var(--gold) 0 8px, #111 8px 16px);
}
.spoiler:before { top: 0; }
.spoiler:after { bottom: 0; }

/* ---------- 文字：900 をやめ、字間を詰める ---------- */
.q__text { font-weight: 700; }
.notes__title, .result__tags li, .save-guide, .hint__ban, .modal__close { font-weight: 700; }
.notes li { font-size: 13px; }
.hud__label { letter-spacing: .16em; }
.loader__label { letter-spacing: .2em; }
.hints__title span { letter-spacing: .2em; }
.hud__count, .loader__pct { font-variant-numeric: tabular-nums; }

/* ---------- 余白：4px の倍数にそろえる ---------- */
.top__lead { margin: 8px 0 24px; }
.top__actions { gap: 12px; }
.notes { margin-top: 40px; padding: 20px; }
.notes__title { margin-bottom: 12px; }
.notes ul { gap: 8px; }
.foot { margin-top: 40px; gap: 16px 24px; }
.loader { gap: 24px; }
.hud { gap: 8px; }
.questions { gap: 24px; }
.q { padding: 24px 20px 20px; }
.q__text { margin: 12px 0 20px; }
.q__labels { margin-top: 12px; }
.quiz__submit { margin-top: 40px; }
.quiz__remain { margin-top: 12px; }
.result__name { margin: 4px 0 20px; }
.result__name:after { margin-top: 8px; }
.result__card figcaption { margin-top: 8px; }
.result__tags { margin: 20px 0 16px; }
.result__body { padding: 16px; }
.hints { margin-top: 48px; }
.hints__stage { margin-top: 16px; }
.modal__box { padding: 28px 24px 24px; }
.about__info { gap: 4px 16px; padding: 12px 16px; }
.hint__ban { margin-top: 16px; }

/* =========================================================
 * スマホ全画面向け
 * ========================================================= */
:root { --col: min(100vw, 440px); }          /* PC でもスマホの幅で見せる */

/* トップ：ロゴ・見出し・ボタンで最初の 1 画面を埋める */
.top__hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(56px + env(safe-area-inset-top)) 0 32px;
}
.top__hero .top__logo-wrap { margin-top: 0; }
.top .notes { margin-top: 0; }

/* 診断：1 画面に 1 問。答えると次の問いへ自動で送られる */
.screen.quiz { padding-left: 12px; padding-right: 12px; }
.hud { margin: 0 -12px; padding-left: 16px; }
.quiz__intro { padding: 24px 0 16px; }
.quiz__logo { width: 52%; }
/* 問いは詰めて並べる。答えると次の問いが画面の真ん中へ自動で送られる */
.questions { gap: 16px; margin-top: 0; }
.q {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 12px 20px;
}
.q__num { font-size: 32px; padding-left: 8px; }
.q__text {
  margin: 12px 0 24px;
  padding: 0 8px;
  font-family: var(--f-jp-disp);
  font-weight: 400;
  font-size: min(28px, calc((var(--col) - 72px) / 11.4));   /* 11 文字が 1 行に収まる大きさ */
  line-height: 1.4;
  letter-spacing: 0;
  white-space: nowrap;
}
.q__scale { gap: 0; }
.dot {
  width: calc((100% - 4px) / 11 * (.55 + var(--s) * .45));
  border-width: 2px;
}
.dot i { width: 52%; }
.q__labels { padding: 0 2px; font-size: 12px; }
.quiz__submit { margin-top: 32px; padding: 0 8px; }

/* 演出動画：画面いっぱい */
.player video { object-fit: cover; }

/* 結果：画像を画面の端まで */
.result__card { margin: 0 -20px; }
.result__card img { border: 0; }
.result__card figcaption { padding: 0 20px; }

/* 答え合わせ：11 個の丸が 1 行に収まる大きさ */
.vq__rows li { gap: 2px; }
.vq__q { width: 2.2em; font-size: 11px; }
.vq__dot {
  width: calc((var(--col) - 64px) / 11);
  border-width: 1.5px;
  font-size: calc((var(--col) - 64px) / 11 * .56);
}

/* =========================================================
 * 訪問時の「サウンド ON/OFF」ダイアログ
 * ========================================================= */
.sgate {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, .88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.sgate__box {
  width: min(100%, 360px);
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}
.sgate__eyebrow { font-family: var(--f-mono); font-size: 12px; letter-spacing: .3em; color: var(--lime); }
.sgate__icon { display: flex; align-items: flex-end; gap: 6px; height: 40px; }
.sgate__icon i { width: 8px; height: 100%; background: var(--lime); transform-origin: bottom; animation: eq .9s ease-in-out infinite alternate; }
.sgate__icon i:nth-child(2) { animation-delay: -.3s; background: var(--pink); }
.sgate__icon i:nth-child(3) { animation-delay: -.6s; }
.sgate__icon i:nth-child(4) { animation-delay: -.15s; background: var(--pink); }
.sgate__title { font-family: var(--f-jp-disp); font-weight: 400; font-size: clamp(22px, 6.4vw, 28px); line-height: 1.4; }
.sgate__lead { font-size: 13px; line-height: 1.8; color: var(--sub); }
.sgate__actions { width: 100%; display: grid; gap: 12px; margin-top: 8px; }

/* 画面の端のイナズマ */
.edge-fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 49; pointer-events: none; }

/* =========================================================
 * タップした丸と回答済みの枠の演出
 * ========================================================= */
.dot { position: relative; }
.dot.is-on {
  background: rgba(var(--c), .22);
  border-color: rgb(var(--c));
  box-shadow: 0 0 0 2px rgba(var(--c), .35), 0 0 16px rgba(var(--c), .9), 0 0 34px rgba(var(--c), .45);
  animation: dotPop .45s cubic-bezier(.2, 1.6, .4, 1), dotGlow 1.6s ease-in-out .45s infinite;
}
.dot.is-on i { background: #fff; box-shadow: 0 0 8px #fff, 0 0 16px rgb(var(--c)); }
.dot.is-on:before, .dot.is-on:after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid rgb(var(--c));
  pointer-events: none;
  animation: dotRing .6s ease-out forwards;
}
.dot.is-on:after { border-color: #fff; animation-delay: .1s; opacity: 0; }
@keyframes dotPop { 0% { transform: scale(.7); } 55% { transform: scale(1.38); } 100% { transform: scale(1); } }
@keyframes dotGlow { 50% { box-shadow: 0 0 0 3px rgba(var(--c), .55), 0 0 26px rgba(var(--c), 1), 0 0 52px rgba(var(--c), .6); } }
@keyframes dotRing { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(2.8); opacity: 0; } }

.q.is-answered {
  border-color: rgba(201, 247, 63, .55);
  box-shadow: inset 0 0 0 1px rgba(201, 247, 63, .2), inset 0 0 40px rgba(201, 247, 63, .08);
}
.q:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .28) 48%, rgba(201, 247, 63, .22) 52%, transparent 70%);
  transform: translateX(-130%);
}
.q.is-answered:after { animation: qSweep .7s cubic-bezier(.2, .8, .3, 1); }
.q.is-answered .q__num { color: var(--lime); text-shadow: 0 0 14px rgba(201, 247, 63, .8); animation: qNum .36s steps(2) 2; }
@keyframes qSweep { 0% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
@keyframes qNum { 0% { opacity: 1; } 50% { opacity: .2; } 100% { opacity: 1; } }

/* =========================================================
 * 見やすさの調整：背景の暗幕、走査線を薄く、フッターのロゴ
 * ========================================================= */
.scanlines { opacity: .08; }
#app:before {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: var(--col);
  transform: translate(-50%);
  z-index: -1;
  background: rgba(0, 0, 0, .42);
}
@media (min-width: 600px) { #app:before { background: rgba(0, 0, 0, .6); } }
.top__lead, .quiz__intro p, .result__pre, .hints__lead, .hints__title, .quiz__remain {
  text-shadow: 0 1px 2px #000, 0 0 12px rgba(0, 0, 0, .9);
}
.top__lead small, .quiz__remain, .hints__lead { color: var(--sub); }

.foot {
  margin: 40px -20px 0;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  gap: 12px;
  background: rgba(4, 5, 10, .9);
  border-top: 1px solid var(--line);
}
.foot__pintcle, .foot__openrec {
  height: 72px;
  border-radius: 10px;
  background: #fff;
}
.foot__pintcle { display: grid; place-items: center; padding: 8px 20px; }
.foot__pintcle img { height: 56px; width: auto; }
.foot__openrec { width: auto; }
.foot__copy { color: var(--sub); font-size: 12px; letter-spacing: .04em; }
.screen.top, .screen.result { padding-bottom: 0; }

/* =========================================================
 * 全タイプ一覧：ステージ・スポットライト・縁の光
 * ========================================================= */
.hints__stage {
  position: relative;
  isolation: isolate;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 16px -12px 0;
  padding: 92px 8px 20px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 26% at 50% 100%, rgba(201, 247, 63, .22), transparent 70%),
    radial-gradient(ellipse 45% 70% at 50% -10%, rgba(255, 255, 255, .14), transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 0, .2), rgba(0, 0, 0, .65));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hints__stage:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  z-index: -1;
  background:
    repeating-linear-gradient(90deg, rgba(201, 247, 63, .1) 0 1px, transparent 1px 28px),
    linear-gradient(180deg, transparent, rgba(201, 247, 63, .1));
  transform: perspective(160px) rotateX(48deg);
  transform-origin: bottom;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 60%);
  mask-image: linear-gradient(180deg, transparent, #000 60%);
}
.member { margin: 0 -7px; z-index: 1; transition: transform .2s var(--ease); }
.member:nth-child(3) { z-index: 3; transform: scale(1.1); transform-origin: bottom; }
.member:nth-child(2), .member:nth-child(4) { z-index: 2; }
.member:before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: -92px;
  bottom: 8%;
  z-index: -1;
  background: linear-gradient(180deg, rgba(var(--rgb, 255, 255, 255), 0) 0%, color-mix(in srgb, var(--c) 26%, transparent) 55%, transparent 100%);
  clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%);
  opacity: .8;
  pointer-events: none;
}
.member:after {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -6px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 70%, transparent), transparent);
  filter: blur(2px);
  pointer-events: none;
}
.member__sil {
  position: relative;
  filter: drop-shadow(0 0 1px var(--c)) drop-shadow(0 0 1px var(--c)) drop-shadow(0 0 10px color-mix(in srgb, var(--c) 70%, transparent));
  transition: filter .2s var(--ease), transform .2s var(--ease);
}
@media (hover: hover) {
  .member:hover .member__sil { transform: translateY(-4px); filter: brightness(1.6) drop-shadow(0 0 1px var(--c)) drop-shadow(0 0 1px var(--c)) drop-shadow(0 0 16px var(--c)); }
}
.member:active .member__sil { filter: brightness(1.9) drop-shadow(0 0 2px #fff) drop-shadow(0 0 18px var(--c)); }
.member__bubble { box-shadow: 0 0 0 2px rgba(0, 0, 0, .6), 0 0 16px color-mix(in srgb, var(--c) 80%, transparent); }
.member--u3 .member__sil { animation: silFlicker 4s steps(1) infinite; }
@keyframes silFlicker { 0%, 88% { opacity: 1; } 89% { opacity: .35; } 90% { opacity: 1; } 93% { opacity: .5; } 94% { opacity: 1; } }
.hints__lead:after { content: "TAP!"; display: inline-block; margin-left: 8px; padding: 0 8px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; color: #04050a; background: var(--lime); animation: blink 1s steps(2) infinite; }
.member__bubble { margin-bottom: 10px; }
.hints__stage { padding-top: 108px; }
.member:before { top: -108px; }

/* ？を押したときの揺れ：body を揺らすとポップアップの位置がずれるので、中身と答え合わせ画面だけ揺らす */
html.glitch body { animation: none; }
html.glitch #app, html.glitch .vq { animation: glitch .18s steps(2) infinite; }
/* 真ん中は大きくしてあるので、押したときは軽く縮むだけにする */
.member:nth-child(3):active { transform: scale(1.06); }

/* =========================================================
 * 全タイプ一覧：全身の発光シルエットと、会場の格子・床の光
 * ========================================================= */
.hints__stage {
  background:
    radial-gradient(ellipse 70% 30% at 50% 100%, rgba(255, 255, 255, .16), transparent 70%),
    radial-gradient(ellipse 45% 70% at 50% -10%, rgba(255, 255, 255, .16), transparent 70%),
    repeating-linear-gradient(60deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(-60deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .7));
}
.hints__stage:before {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .14) 0 2px, transparent 2px 34px),
    linear-gradient(180deg, transparent, rgba(255, 255, 255, .08));
}
.member { margin: 0 -10px; }
.member__sil { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c) 55%, transparent)); }
@media (hover: hover) {
  .member:hover .member__sil { transform: translateY(-4px); filter: brightness(1.25) drop-shadow(0 0 12px var(--c)); }
}
.member:active .member__sil { filter: brightness(1.45) drop-shadow(0 0 16px var(--c)); }
.member:before { opacity: 1; }

/* ===== UI・演出の改善（2026-11-11） ===== */
/* 診断前の読み込み：後ろのトップを透かさない */
.loader--overlay { background: #000; }

/* いま答える問いを「いまここ」で示す。答え終わった問いは少し下げる */
.q.is-current {
  border-color: rgba(201, 247, 63, .95);
  box-shadow: inset 0 0 0 1px rgba(201, 247, 63, .45), inset 0 0 48px rgba(201, 247, 63, .12);
}
.q.is-current:before { background: #fff; box-shadow: 0 0 12px #fff; }
.q.is-current .q__num:after {
  content: "いまここ";
  display: inline-block;
  margin-left: 12px;
  padding: 4px 8px 3px;
  vertical-align: 6px;
  font: 700 11px/1 var(--f-jp-disp, sans-serif);
  letter-spacing: .12em;
  color: #04050a;
  background: var(--lime);
  -webkit-text-stroke: 0;
  text-shadow: none;
  clip-path: polygon(6px 0, 100% 0, 100% 100%, 0 100%, 0 6px);
  animation: nowBlink 1.6s ease-in-out infinite;
}
@keyframes nowBlink { 50% { opacity: .55; } }
.questions .q { transition: opacity .35s, border-color .3s, box-shadow .3s; }
.questions.has-current .q.is-answered:not(.is-current) { opacity: .6; }
.questions.has-current .q.is-answered:not(.is-current):hover,
.questions.has-current .q.is-answered:not(.is-current):focus-within { opacity: 1; }

/* 丸の並びは上下にも押せる範囲を広げる（押した位置にいちばん近い丸を選ぶ） */
.q__scale { padding: 14px 0; margin: -14px 0; }
.q__labels { font-size: 13px; }

/* 進み具合：バーを太く、数字は切り替わるときに弾む */
.hud__bar { height: 6px; }
.hud__count b { display: inline-block; }

/* 結果ボタン：押せない間はサイトの色になじませる。全問答えたら画面の下に出したままにする */
.btn--result:disabled, .btn--result:disabled:hover { --bc: #1f2217; color: #858a74; }
.quiz__submit.is-ready {
  position: sticky;
  bottom: 0;
  z-index: 15;
  margin-left: -20px;
  margin-right: -20px;
  padding: 28px 28px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .88) 38%);
}
.quiz__submit.is-ready .quiz__remain { display: none; }

/* サウンドボタン：暗い背景でも見えるように */
.sound { background: rgba(0, 0, 0, .86); border-color: rgba(201, 247, 63, .6); box-shadow: 0 0 14px rgba(201, 247, 63, .28); }
.sound.is-muted { border-color: rgba(255, 255, 255, .4); box-shadow: none; }
.sound.is-muted span:before, .sound.is-muted span:after { background: rgba(255, 255, 255, .7); }

/* ヒントのふきだし：× を右上に重ねて置き、本文を横幅いっぱいに（スクロールバーは余白の中へ） */
.modal--bubble .modal__close { position: absolute; float: none; top: 12px; right: 12px; margin: 0; }
.modal--bubble .modal__content { margin-right: -14px; padding-right: 14px; scrollbar-width: thin; }
.modal--bubble .hint__face { margin-top: 4px; }

/* ===== FBK 対応（2026-11-15） ===== */
/* トップ：ロゴの下にハイゲのビジュアル */
.top__visual { margin: 6px -4px 18px; }
.top__visual img {
  display: block; width: 100%; height: auto;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
}

/* 制作表記（検索で引っかかるよう文字で） */
.foot__credit { width: 100%; text-align: center; font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: .06em; }
.foot__credit + .foot__copy { margin-top: -6px; }

/* 加藤チームの結果：投稿禁止の注意 */
.result__note { margin: 10px 0 0; padding: 10px 14px; font-size: 13px; font-weight: 700; line-height: 1.7; color: #ff2d78; border: 1px solid rgba(255, 45, 120, .6); background: rgba(255, 45, 120, .08); text-align: left; }

/* 全タイプ一覧：4 名のふきだしを大きく（加藤は少し小さく）。隣とぶつからないよう 2・4 番目を上にずらす */
.hints__stage { padding-top: 200px; }
.member:not(.member--u3) .member__bubble { width: 112%; padding: 4px; margin-bottom: 12px; }
.member:nth-child(2) .member__bubble, .member:nth-child(4) .member__bubble { margin-bottom: 66px; }
.member:nth-child(1) .member__bubble { margin-left: 9%; }
.member:nth-child(5) .member__bubble { margin-left: -9%; }
.member--u3 .member__bubble { width: 40%; font-size: 16px; }
.member:before { top: -170px; }

/* セリフ → チームロゴの演出 */
.say {
  position: fixed; inset: 0; z-index: 49; overflow: hidden;
  background: radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--c) 34%, #000) 0%, #000 64%);
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
.say[hidden] { display: none; }
.say__rays {
  position: absolute; inset: -60%;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--c) 30%, transparent) 0deg 5deg, transparent 5deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 0 18%, transparent 58%); mask-image: radial-gradient(circle, #000 0 18%, transparent 58%);
  opacity: .35; animation: sayRays 16s linear infinite; transition: opacity .5s;
}
.say.is-logo .say__rays { opacity: .85; animation-duration: 7s; }
@keyframes sayRays { to { transform: rotate(360deg); } }
.say__line {
  position: absolute; left: 50%; top: 50%; width: min(92vw, 520px); margin: 0;
  display: grid; gap: 4px; text-align: center;
  font-family: var(--f-jp-disp); font-size: clamp(32px, 10.5vw, 54px); line-height: 1.22; color: #fff;
  text-shadow: 0 0 22px var(--c), 0 0 2px #000, 4px 4px 0 color-mix(in srgb, var(--c) 65%, #000);
  transform: translate(-50%, -50%); transition: transform .55s cubic-bezier(.2, .9, .3, 1), opacity .55s;
}
.say__line span { display: block; opacity: 0; }
.say.is-logo .say__line { transform: translate(-50%, calc(-50% - min(36vh, 290px))) scale(.56); opacity: .92; }
.say__logo {
  position: absolute; left: 50%; top: 47%; width: min(66vw, 300px); aspect-ratio: 1;
  transform: translate(-50%, -50%); visibility: hidden;
}
.say__logo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 22px var(--c)) drop-shadow(0 0 4px #000); }
.say.is-logo .say__logo { visibility: visible; }
.say__team {
  position: absolute; left: 0; right: 0; top: calc(47% + min(33vw, 150px) + 14px); margin: 0; text-align: center;
  font-family: var(--f-jp-disp); font-size: clamp(22px, 7vw, 34px); color: #fff; letter-spacing: .08em;
  text-shadow: 0 0 16px var(--c), 3px 3px 0 color-mix(in srgb, var(--c) 60%, #000); visibility: hidden;
}
.say.is-logo .say__team { visibility: visible; }
.say__hint { position: absolute; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom)); margin: 0; text-align: center; font-family: var(--f-mono); font-size: 11px; letter-spacing: .3em; color: rgba(255, 255, 255, .45); }
/* 加藤チーム：白黒＋文字のずれ（＋α） */
.say--vq { background: radial-gradient(circle at 50% 46%, #3a3a3a 0%, #000 62%); }
.say--vq .say__line, .say--vq .say__team { text-shadow: 2px 0 #ff2d78, -2px 0 #00e5ff, 0 0 24px #fff; }
.say--vq .say__logo img { filter: grayscale(1) contrast(1.2) drop-shadow(0 0 26px #fff) drop-shadow(0 0 4px #000); }
html.glitch .say { animation: glitch .18s steps(2) infinite; }

/* サウンドボタン：スピーカーのアイコン（ON は音の波、OFF は ×）＋小さく ON / OFF */
.sound { width: 46px; height: 46px; display: grid; place-items: center; align-content: center; gap: 0; }
.sound span:not(.sound__txt) { display: none; }
.sound__icon { width: 22px; height: 22px; fill: none; stroke: var(--lime); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sound__spk { fill: var(--lime); }
.sound__off { display: none; }
.sound__txt { display: block; margin-top: -1px; font-family: var(--f-mono); font-size: 9px; line-height: 1; letter-spacing: .08em; color: var(--lime); }
.sound.is-muted .sound__icon { stroke: rgba(255, 255, 255, .85); }
.sound.is-muted .sound__spk { fill: rgba(255, 255, 255, .85); }
.sound.is-muted .sound__on { display: none; }
.sound.is-muted .sound__off { display: inline; stroke: #ff2d78; }
.sound.is-muted .sound__txt { color: rgba(255, 255, 255, .7); }
.sound .sound__txt { width: auto; height: auto; display: block; }
.sound .sound__txt:before, .sound .sound__txt:after { content: none; display: none; }

/* トップ：「配信者ハイパーゲーム大会とは」はシェアの下の文字リンク（枠・線なし） */
.top__about {
  justify-self: center; margin-top: 2px; padding: 10px 16px;
  border: 0; background: none; cursor: pointer;
  font-family: var(--f-jp-disp); font-size: clamp(14px, 4.2vw, 17px); letter-spacing: .04em; color: #fff;
  transition: opacity .2s, transform .12s;
}
.top__about:hover { opacity: .75; }
.top__about:active { transform: scale(.96); }
.top__about:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* ===== 結果画面の整理（2026-11-15） ===== */
/* キミの特性：番号つきの 2 列の一覧（奇数個の最後は 1 行使う） */
.result__traits { margin: 22px 0 16px; }
.result__traits-title { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin: 0 0 10px; font-family: var(--f-jp-disp); font-size: 17px; color: #fff; }
.result__traits-title span { font-family: var(--f-mono); font-size: 11px; letter-spacing: .3em; color: var(--team); }
.result__traits .result__tags {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; padding: 0;
  border-top: 1px solid color-mix(in srgb, var(--team) 45%, transparent); counter-reset: tag;
}
.result__traits .result__tags li {
  counter-increment: tag; display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 12px 10px; clip-path: none; background: none; color: #fff;
  font-family: var(--f-jp-disp); font-weight: 400; font-size: clamp(15px, 4.4vw, 18px); line-height: 1.3; text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.result__traits .result__tags li:nth-child(odd) { border-right: 1px solid rgba(255, 255, 255, .1); }
.result__traits .result__tags li:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; justify-content: center; }
.result__traits .result__tags li:before {
  content: counter(tag, decimal-leading-zero); flex: none;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; color: var(--team);
  text-shadow: 0 0 10px color-mix(in srgb, var(--team) 70%, transparent);
}
html.mode-vq .result__traits .result__tags li { background: none; }

/* 下のボタン：X ポストを主に、保存と演出は 2 つ並べて小さく */
.result__subacts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.result__subacts .btn { padding: 13px 6px; font-size: clamp(13px, 3.7vw, 16px); letter-spacing: .02em; }

/* 結果画像：出てくるときに光が 1 回走る */
.result__card { overflow: hidden; }
.result__card:after {
  content: ""; position: absolute; top: 0; bottom: 34px; left: -60%; width: 40%; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-18deg); opacity: 0;
}
.result__card.is-shine:after { animation: cardShine 1.1s cubic-bezier(.3, .1, .3, 1) forwards; }
@keyframes cardShine { 0% { left: -60%; opacity: 1; } 100% { left: 130%; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .result__card.is-shine:after { animation: none; } }

/* ===== 軽量化（2026-11-15）：スクロールのカクつき対策 ===== */
/* 上の進み具合：すりガラス（毎フレーム描き直しが重い）をやめて不透明に */
.hud { -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .94) 100%); }
/* 選んだ丸：光の脈打ち（box-shadow の連続アニメ）をやめて、出たときの弾みだけに */
.dot.is-on { animation: dotPop .45s cubic-bezier(.2, 1.6, .4, 1); box-shadow: 0 0 0 3px rgba(var(--c), .45), 0 0 22px rgba(var(--c), .9); }
/* 設問カード：描き直しをカードの中に閉じる */
.q { contain: layout paint; }
.questions { transform: translateZ(0); }

/* ===== セリフの画面：ゲームっぽさ（グリッドの床・走査線・HUD の枠・光の帯） ===== */
.say__line span { white-space: nowrap; }
.say__line { font-size: clamp(26px, 8.4vw, 50px); }
.say__grid {
  position: absolute; left: -50%; right: -50%; bottom: -10%; height: 62%;
  transform: perspective(380px) rotateX(64deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(0deg, #000 10%, transparent 92%); mask-image: linear-gradient(0deg, #000 10%, transparent 92%);
  overflow: hidden; opacity: .75;
}
.say__grid:before {
  content: ""; position: absolute; left: 0; right: 0; top: -60px; bottom: 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, transparent) 1.5px, transparent 1.5px) 0 0 / 46px 46px,
    linear-gradient(0deg, color-mix(in srgb, var(--c) 70%, transparent) 1.5px, transparent 1.5px) 0 0 / 46px 46px;
  animation: sayGrid .55s linear infinite;
}
@keyframes sayGrid { to { transform: translateY(46px); } }
.say__scan {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 3px);
}
.say__scan:after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 18%;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--c) 22%, transparent), transparent);
  animation: sayScan 2.4s linear infinite;
}
@keyframes sayScan { from { transform: translateY(-120%); } to { transform: translateY(620%); } }
.say__hud { position: absolute; inset: calc(14px + env(safe-area-inset-top)) 14px calc(44px + env(safe-area-inset-bottom)); pointer-events: none; }
.say__hud i { position: absolute; width: 26px; height: 26px; border: 3px solid var(--c); filter: drop-shadow(0 0 6px var(--c)); }
.say__hud i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.say__hud i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.say__hud i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.say__hud i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.say__hud span { position: absolute; font-family: var(--f-mono); font-size: 11px; letter-spacing: .28em; color: color-mix(in srgb, var(--c) 85%, #fff); }
.say__hud .tl { left: 36px; top: 6px; animation: blink 1s steps(2) infinite; }
.say__hud .br { right: 36px; bottom: 6px; opacity: .7; }
.say__hud .bar { left: 36px; right: 36px; top: 13px; height: 2px; background: linear-gradient(90deg, var(--c), transparent 70%); opacity: .6; }
.say__streak { position: absolute; left: -40%; top: 0; bottom: 0; width: 36%; pointer-events: none; opacity: 0; background: linear-gradient(100deg, transparent, color-mix(in srgb, var(--c) 45%, #fff), transparent); transform: skewX(-24deg); }
.say.is-logo .say__streak { animation: sayStreak .7s cubic-bezier(.3, .1, .3, 1) .05s 1 forwards; }
@keyframes sayStreak { 0% { left: -40%; opacity: .9; } 100% { left: 120%; opacity: 0; } }
.say--vq .say__grid:before { background:
    linear-gradient(90deg, rgba(255, 255, 255, .55) 1.5px, transparent 1.5px) 0 0 / 46px 46px,
    linear-gradient(0deg, rgba(255, 255, 255, .55) 1.5px, transparent 1.5px) 0 0 / 46px 46px; }
@media (prefers-reduced-motion: reduce) { .say__grid:before, .say__scan:after, .say__hud .tl { animation: none; } }

/* タップ・クリックのエフェクト：押した場所から光の輪と菱形が広がる */
.tapfx { position: fixed; z-index: 120; width: 0; height: 0; pointer-events: none; }
.tapfx:before, .tapfx:after { content: ""; position: absolute; left: 0; top: 0; pointer-events: none; }
.tapfx:before {
  width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
  border: 2px solid var(--lime); box-shadow: 0 0 12px rgba(201, 247, 63, .7), inset 0 0 8px rgba(201, 247, 63, .5);
  animation: tapRing .5s cubic-bezier(.2, .8, .3, 1) forwards;
}
.tapfx:after {
  width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid #fff;
  transform: rotate(45deg) scale(.2); animation: tapDia .42s cubic-bezier(.2, .8, .3, 1) forwards;
}
.tapfx--hit:before { width: 84px; height: 84px; margin: -42px 0 0 -42px; border-width: 3px; }
@keyframes tapRing { 0% { transform: scale(.15); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
@keyframes tapDia { 0% { transform: rotate(45deg) scale(.2); opacity: 1; } 100% { transform: rotate(135deg) scale(1.6); opacity: 0; } }

/* キミの特性：読みやすさ優先。不透明な台の上に 1 行 1 つ、番号はチーム色の四角に */
.result__traits {
  margin: 22px 0 16px; padding: 16px 16px 8px;
  background: #0d0e12; border: 1px solid rgba(255, 255, 255, .14);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.result__traits-title { justify-content: flex-start; margin: 0 0 6px; font-size: 16px; }
.result__traits .result__tags { display: block; border-top: 0; }
.result__traits .result__tags li,
.result__traits .result__tags li:nth-child(odd),
.result__traits .result__tags li:last-child:nth-child(odd) {
  display: flex; align-items: center; justify-content: flex-start; gap: 14px;
  padding: 11px 2px; border: 0; border-top: 1px solid rgba(255, 255, 255, .08); grid-column: auto;
  font-size: clamp(17px, 5vw, 20px); color: #fff;
}
.result__traits .result__tags li:first-child { border-top: 0; }
.result__traits .result__tags li:before {
  display: grid; place-items: center; width: 30px; height: 30px; flex: none;
  font-size: 13px; font-weight: 700; letter-spacing: 0; color: #04050a; background: var(--team); text-shadow: none;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
html.mode-vq .result__traits .result__tags li:before { background: #fff; }

/* ふきだしのしっぽ：縁の色の三角を後ろに重ねて、縁取りをしっぽまでつなげる */
.modal--bubble .modal__box:before {
  content: ""; position: absolute; left: 50%; bottom: -34px; margin-left: -22px; z-index: 0;
  border: 22px solid transparent; border-top: 34px solid var(--hc, var(--lime)); border-bottom: 0;
}
.modal--bubble .modal__box:after { z-index: 1; bottom: -27px; }
.modal--vq .modal__box:before { border-top-color: #fff; }

/* ---------- Safari（iPhone）対策 ---------- */
/* 二度押しで拡大しない・押した瞬間の灰色の四角を出さない */
button, a, .dot, .q__scale, .member, .sound, .modal { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
/* タッチ端末ではホバーの見た目が押したあとに残るので、マウスのときだけにする */
@media (hover: none) {
  .dot:hover:not(.is-on) { border-color: rgba(var(--c), .7); }
  .questions.has-current .q.is-answered:not(.is-current):hover { opacity: .6; }
  .top__about:hover { opacity: 1; }
}
/* 背景の WebGL が使えない・途中で失われたときの代わりの背景 */
.bg.is-fallback { visibility: hidden; }
html.bg-fallback {
  background:
    radial-gradient(ellipse 90% 50% at 50% 0%, rgba(201, 247, 63, .16), transparent 70%),
    radial-gradient(ellipse 90% 50% at 50% 100%, rgba(255, 45, 120, .14), transparent 70%),
    #000 fixed;
}
/* color-mix() が使えない古い Safari（iOS 16.1 まで）でも演出の背景が抜けないように */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .say { background: radial-gradient(circle at 50% 46%, #262a1a 0%, #000 64%); }
  .say__rays { background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .16) 0deg 5deg, transparent 5deg 15deg); }
  .member__sil { filter: drop-shadow(0 0 1px var(--c)) drop-shadow(0 0 10px var(--c)); }
  .result__traits .result__tags { border-top-color: rgba(255, 255, 255, .2); }
}
/* 吹き出しや保存の案内の中をスクロールしても、後ろのページが動かないように */
.modal, .modal__content { overscroll-behavior: contain; }

/* 結果前のボイス：チーム名の下に字幕。声が鳴っているあいだは波形が動く */
.say__quote {
  position: absolute; left: 50%; top: calc(47% + min(33vw, 150px) + 78px); transform: translateX(-50%);
  width: max-content; max-width: min(88vw, 460px); margin: 0; padding: 10px 16px 10px 12px;
  display: flex; align-items: center; gap: 10px;
  background: rgba(0, 0, 0, .62); border: 1px solid rgba(255, 255, 255, .14); border-left: 4px solid var(--c);
  font-family: var(--f-jp-disp); font-size: clamp(15px, 4.4vw, 20px); line-height: 1.45; color: #fff; text-align: left;
  text-shadow: 0 0 12px var(--c); visibility: hidden;
}
.say__quote.is-on { visibility: visible; }
.say__quote[hidden] { display: none; }
.say__wave { display: flex; align-items: center; gap: 3px; height: 18px; flex: none; }
.say__wave b { display: block; width: 3px; height: 30%; background: var(--c); border-radius: 2px; }
.say__quote.is-playing .say__wave b { animation: sayWave .5s ease-in-out infinite alternate; }
.say__quote.is-playing .say__wave b:nth-child(2) { animation-delay: -.15s; }
.say__quote.is-playing .say__wave b:nth-child(3) { animation-delay: -.3s; }
.say__quote.is-playing .say__wave b:nth-child(4) { animation-delay: -.42s; }
@keyframes sayWave { from { height: 25%; } to { height: 100%; } }
@media (prefers-reduced-motion: reduce) { .say__quote.is-playing .say__wave b { animation: none; height: 70%; } }
.say--vq .say__quote { border-left-color: #fff; }


/* ---- 改行の調整：かたまりの途中で折り返さない ---- */
.nb { display: inline-block; }
.sgate__title .nb { white-space: nowrap; }

/* ---- クリエイター FBK（2026-11-17） ---- */
/* サウンドON の（推奨） */
.sgate__rec { display: block; font-size: .72em; line-height: 1.1; margin-top: 3px; letter-spacing: .08em; opacity: .8; }
.sgate .btn--main span:has(.sgate__rec) { line-height: 1.2; }
/* 字幕の改行（\n）をそのまま出す */
.say__quote span { white-space: pre-line; }
/* ？吹き出し：文字にかかる白黒反転をやめ、枠の外側だけに色ずれのノイズを出す（点滅はしない） */
.modal--vq .modal__box { animation: vqFrame 3.2s steps(1) infinite; }
@keyframes vqFrame {
  0%, 93% { box-shadow: 0 0 0 4px #fff; }
  94% { box-shadow: 0 0 0 4px #fff, -6px 0 0 4px rgba(255,45,120,.85), 6px 0 0 4px rgba(0,229,255,.85); }
  96% { box-shadow: 0 0 0 4px #fff, 4px 3px 0 4px rgba(255,45,120,.85), -4px -3px 0 4px rgba(0,229,255,.85); }
  98% { box-shadow: 0 0 0 4px #fff, -2px 0 0 4px rgba(255,45,120,.6), 2px 0 0 4px rgba(0,229,255,.6); }
}
@media (prefers-reduced-motion: reduce) { .modal--vq .modal__box { animation: none; } }
/* 字幕：いちばん長い行（--ql 文字）が 1 行に収まる大きさにする。小さすぎる画面だけ折り返す */
.say__quote { max-width: min(94vw, 520px); font-size: clamp(12px, calc((min(94vw, 520px) - 66px) / var(--ql, 14)), 20px); }
