/* =========================================================
   ボクトレ プロトタイプ — 夜のボクシングジム
   赤コーナー = 選手 / 青コーナー = トレーナー（色が役割を運ぶ）
   外部フォント・外部画像は不使用（完全オフライン動作）
   ========================================================= */
:root {
  --bg-page: #0a0b0f;
  --bg: #13151c;
  --panel: #1c1f2a;
  --panel-2: #232736;
  --line: #2c3142;
  --text: #edeff5;
  --muted: #98a0b3;
  --red: #e5484d;
  --red-soft: rgba(229, 72, 77, 0.16);
  --blue: #5b84ff;
  --blue-soft: rgba(91, 132, 255, 0.16);
  --gold: #e8b64c;
  --good: #4fbf7f;
  --tone: #e8b64c;
  --bad: #e5484d;
  --radius: 14px;
  --font: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  --mono: Consolas, "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* hidden属性はカスタムdisplayより常に優先（表示バグ防止の全体ガード） */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background:
    radial-gradient(ellipse 90% 40% at 50% -5%, rgba(91, 132, 255, 0.08), transparent),
    var(--bg-page);
  color: var(--text);
  line-height: 1.7;
  display: flex;
  justify-content: center;
  min-height: 100dvh;
}

#phone {
  width: min(430px, 100%);
  min-height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
}
@media (min-width: 480px) {
  #phone {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
  }
}

/* ---------- デモ帯・ヘッダー ---------- */
#demo-ribbon {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-align: center;
  color: var(--muted);
  background: #0e1015;
  padding: 4px 8px;
  border-bottom: 1px solid var(--line);
}

#app-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, var(--red-soft), transparent 30%, transparent 70%, var(--blue-soft));
}
.brand { display: flex; align-items: center; gap: 10px; }
#brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.brand-logo {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  background: linear-gradient(90deg, var(--red), #f0c 30%, var(--blue));
  background: linear-gradient(90deg, var(--red) 0%, var(--text) 50%, var(--blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-tag {
  display: block;
  font-size: 0.66rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-top: 2px;
}

/* ---------- 視点切替バー ---------- */
#role-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(19, 21, 28, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.role-bar-label {
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  writing-mode: horizontal-tb;
  flex-shrink: 0;
}
#role-chips { display: flex; gap: 6px; overflow-x: auto; }
.role-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px 4px 6px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.72rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.role-chip .chip-avatar { font-size: 1.05rem; }
.chip-col { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.role-chip .chip-name { font-weight: 700; }
.role-chip .chip-role { font-size: 0.58rem; opacity: 0.8; }
.role-chip.corner-red.active { border-color: var(--red); color: var(--text); background: var(--red-soft); }
.role-chip.corner-blue.active { border-color: var(--blue); color: var(--text); background: var(--blue-soft); }

/* ---------- 画面 ---------- */
#main { flex: 1; padding: 16px 14px 90px; }
.screen { display: none; }
.screen.active { display: block; animation: fadein 0.25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.screen-title {
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  margin-bottom: 12px;
}

.btn-back {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 8px;
}

.empty { color: var(--muted); font-size: 0.82rem; padding: 24px 8px; text-align: center; }
.empty-art {
  display: block;
  width: min(240px, 70%);
  margin: 0 auto 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.hint { color: var(--muted); font-size: 0.72rem; margin: 6px 0 10px; }
.demo-hint {
  font-size: 0.7rem;
  color: var(--muted);
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 12px;
}

/* ---------- ユーザーチップ（赤=選手 / 青=トレーナー） ---------- */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  border-radius: 999px;
  padding: 2px 10px 2px 4px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.user-chip.corner-red { border-left: 3px solid var(--red); }
.user-chip.corner-blue { border-left: 3px solid var(--blue); }
.user-chip .chip-avatar { font-size: 0.95rem; }
.user-chip .chip-name { font-weight: 700; }
.user-chip .chip-role { font-size: 0.58rem; color: var(--muted); margin-left: 2px; }

.meta-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.66rem;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
}
.meta-time { font-size: 0.64rem; color: var(--muted); font-family: var(--mono); }

/* ---------- フィード ---------- */
.feed-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
  cursor: pointer;
  padding: 0;
  color: var(--text);
  font-family: var(--font);
  transition: transform 0.15s ease, border-color 0.2s;
}
.feed-card:hover { transform: translateY(-2px); border-color: #3a405a; }

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.thumb-emoji { font-size: 2.6rem; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)); }
.thumb-emoji.big { font-size: 3.4rem; }
.thumb-play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  padding-left: 3px;
}
.badge-recruit {
  position: absolute;
  left: 10px;
  top: 10px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #1a0f05;
  background: var(--gold);
  border-radius: 999px;
  padding: 3px 10px;
}

/* サムネ用グラデーション（外部画像なし） */
.grad-1 { background: radial-gradient(circle at 30% 20%, rgba(229, 72, 77, 0.45), transparent 60%), linear-gradient(150deg, #2a1220, #131017); }
.grad-2 { background: radial-gradient(circle at 70% 25%, rgba(91, 132, 255, 0.4), transparent 60%), linear-gradient(150deg, #101a2e, #0f1118); }
.grad-3 { background: radial-gradient(circle at 45% 20%, rgba(79, 191, 127, 0.35), transparent 60%), linear-gradient(150deg, #0f2118, #101216); }
.grad-4 { background: radial-gradient(circle at 60% 25%, rgba(232, 182, 76, 0.35), transparent 60%), linear-gradient(150deg, #241a0c, #131017); }

.feed-body { padding: 10px 12px 12px; }
.feed-title { font-size: 0.86rem; font-weight: 700; line-height: 1.55; margin-bottom: 8px; }
.feed-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ---------- 動画詳細 ---------- */
.stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.stage-play {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.1rem;
  padding-left: 4px;
  cursor: pointer;
}
.link-chip { cursor: pointer; margin-bottom: 10px; font-family: var(--font); }
.owner-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.detail-title { font-size: 0.98rem; font-weight: 900; line-height: 1.6; margin-bottom: 6px; }
.detail-desc { font-size: 0.8rem; color: var(--muted); margin-bottom: 18px; }

.advice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.advice-count { font-size: 0.9rem; font-weight: 900; letter-spacing: 0.06em; }

/* ---------- アドバイスカード（シグネチャー: コーナーテープ） ---------- */
.advice-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  margin: 12px 0;
  overflow: hidden;
}
.advice-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  border-style: solid;
  border-width: 16px 16px 0 0;
  border-color: transparent;
}
.advice-card.corner-blue::before { border-top-color: var(--blue); }
.advice-card.corner-red::before { border-top-color: var(--red); }

.best-label {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  border: 1px solid rgba(232, 182, 76, 0.45);
  border-radius: 999px;
  padding: 1px 10px;
  margin-bottom: 8px;
}

.advice-author { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tc-chip {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--gold);
  border: 1px solid rgba(232, 182, 76, 0.4);
  border-radius: 6px;
  padding: 1px 7px;
}

.advice-block { margin-bottom: 10px; padding-left: 10px; border-left: 3px solid var(--line); }
.advice-block.good { border-left-color: var(--good); }
.advice-block.fix { border-left-color: var(--blue); }
.advice-block.alt { border-left-color: var(--gold); }
.advice-label { font-size: 0.66rem; font-weight: 700; color: var(--muted); letter-spacing: 0.08em; margin-bottom: 2px; }
.advice-text { font-size: 0.82rem; line-height: 1.75; }

.tone-note {
  font-size: 0.7rem;
  color: var(--tone);
  background: rgba(232, 182, 76, 0.08);
  border: 1px dashed rgba(232, 182, 76, 0.35);
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 10px;
}

/* ---------- 評価バー ---------- */
.rating-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 4px; }
.rate-btn {
  font-family: var(--font);
  font-size: 0.68rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  padding: 5px 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.rate-btn.good.on { border-color: var(--good); color: var(--good); background: rgba(79, 191, 127, 0.12); }
.rate-btn.tone.on { border-color: var(--tone); color: var(--tone); background: rgba(232, 182, 76, 0.12); }
.rate-btn.bad.on { border-color: var(--bad); color: var(--bad); background: var(--red-soft); }
.own-note { font-size: 0.66rem; color: var(--muted); font-style: italic; }

/* ---------- 返信 ---------- */
.replies { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 10px; }
.reply { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; padding-left: 12px; border-left: 3px solid var(--red); }
.reply-text { font-size: 0.78rem; }
.reply-rule { font-size: 0.62rem; color: var(--muted); }
.reply-form { display: flex; gap: 6px; margin-top: 4px; }
.reply-input {
  flex: 1;
  font-family: var(--font);
  font-size: 0.78rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  color: var(--text);
}
.reply-input::placeholder { color: var(--muted); }

/* ---------- ボタン ---------- */
.btn-primary {
  display: block;
  width: 100%;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #3a5fd9);
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  cursor: pointer;
  margin-top: 8px;
  transition: transform 0.15s ease, box-shadow 0.2s;
  box-shadow: 0 6px 20px rgba(91, 132, 255, 0.25);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary.small { width: auto; font-size: 0.72rem; padding: 8px 16px; margin: 0; }

.btn-ghost {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.78rem;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.btn-ghost:hover { color: var(--text); border-color: #3a405a; }
.btn-ghost.small { font-size: 0.7rem; padding: 6px 14px; }
.btn-ghost.dim { opacity: 0.6; }

/* ---------- フォーム ---------- */
.form-note { font-size: 0.74rem; color: var(--muted); margin-bottom: 14px; }
.form-field { margin-bottom: 14px; }
.form-field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.form-field label em {
  font-style: normal;
  font-size: 0.58rem;
  color: var(--red);
  border: 1px solid rgba(229, 72, 77, 0.5);
  border-radius: 4px;
  padding: 0 5px;
}
.form-field label em.opt { color: var(--muted); border-color: var(--line); }
.form-field textarea,
.form-field input {
  width: 100%;
  font-family: var(--font);
  font-size: 0.82rem;
  line-height: 1.7;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  resize: vertical;
}
.form-field textarea::placeholder,
.form-field input::placeholder { color: #5b6377; }
.form-field .err { border-color: var(--red); }

/* ---------- トーンチェックモーダル ---------- */
#modal-backdrop[hidden] { display: none; }
#modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6, 7, 10, 0.75);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#tone-modal {
  width: min(380px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 18px;
  animation: fadein 0.2s ease;
}
#tone-title { font-size: 0.95rem; font-weight: 900; margin-bottom: 8px; }
.tone-lead { font-size: 0.76rem; color: var(--muted); margin-bottom: 10px; }
#tone-modal blockquote {
  font-size: 0.82rem;
  border-left: 3px solid var(--red);
  background: var(--red-soft);
  border-radius: 0 8px 8px 0;
  padding: 8px 12px;
  margin-bottom: 12px;
}
#tone-modal blockquote.suggest { border-left-color: var(--good); background: rgba(79, 191, 127, 0.1); }
.tone-suggest-label { font-size: 0.7rem; font-weight: 700; color: var(--good); margin-bottom: 4px; }
.tone-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.tone-actions .btn-ghost { text-align: center; }

/* ---------- 通知 ---------- */
.notif {
  display: flex;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
}
.notif.warn { border-color: rgba(232, 182, 76, 0.5); background: rgba(232, 182, 76, 0.06); }
.notif-icon { font-size: 1.3rem; flex-shrink: 0; }
.notif-img { width: 46px; height: 46px; object-fit: contain; flex-shrink: 0; }
.notif-title { font-size: 0.8rem; font-weight: 700; margin-bottom: 2px; }
.notif-text { font-size: 0.74rem; color: var(--muted); line-height: 1.7; }
.notif-time { font-size: 0.62rem; color: var(--muted); font-family: var(--mono); margin-top: 4px; }

/* ---------- マイページ ---------- */
.profile-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}
.profile-card.corner-red { border-left: 4px solid var(--red); }
.profile-card.corner-blue { border-left: 4px solid var(--blue); }
.profile-avatar { font-size: 2.2rem; }
.profile-avatar-img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--panel-2);
  flex-shrink: 0;
}
.profile-avatar-img.corner-red { border-color: var(--red); }
.profile-avatar-img.corner-blue { border-color: var(--blue); }
.profile-name { font-size: 1rem; font-weight: 900; }
.profile-sub { font-size: 0.68rem; color: var(--muted); }
.profile-bio { font-size: 0.72rem; margin-top: 4px; }

.me-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}
.me-heading { font-size: 0.82rem; font-weight: 900; letter-spacing: 0.08em; margin-bottom: 10px; }
.me-caption { font-size: 0.7rem; color: var(--muted); margin: 6px 0; }
.me-caption.warn { color: var(--tone); }
.ai-summary {
  font-size: 0.74rem;
  background: var(--panel-2);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 10px;
  line-height: 1.8;
}
.me-section.hall { border-color: rgba(232, 182, 76, 0.4); }
.hall-quote { font-size: 0.8rem; line-height: 1.8; border-left: 3px solid var(--gold); padding-left: 10px; }

.chart-row { display: flex; align-items: center; gap: 8px; margin: 7px 0; }
.chart-label { font-size: 0.68rem; width: 106px; flex-shrink: 0; color: var(--muted); }
.chart-bar { flex: 1; height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.chart-fill { height: 100%; border-radius: 999px; transition: width 0.5s ease; }
.chart-fill.fill-good { background: var(--good); }
.chart-fill.fill-tone { background: var(--tone); }
.chart-fill.fill-bad { background: var(--bad); }
.chart-val { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); width: 36px; text-align: right; }

.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge-cell { text-align: center; }
.badge-img { width: 74%; max-width: 92px; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45)); }
.badge-cell.locked .badge-img { filter: grayscale(1) brightness(0.35); }
.badge-name { font-size: 0.68rem; font-weight: 700; margin-top: 2px; }
.badge-cell.locked .badge-name { color: var(--muted); }
.badge-hint { font-size: 0.58rem; color: var(--muted); line-height: 1.5; }

.check-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.76rem;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  cursor: pointer;
}
.check-row input { margin-top: 4px; accent-color: var(--good); }
.check-row:last-of-type { border-bottom: none; }

.compare-row { display: flex; gap: 10px; margin-bottom: 10px; }
.compare-thumb {
  flex: 1;
  aspect-ratio: 9 / 12;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
}
.compare-label { font-size: 0.66rem; color: var(--text); background: rgba(0, 0, 0, 0.5); border-radius: 999px; padding: 2px 10px; }

#btn-reset { display: block; margin: 6px auto 0; }

/* ---------- タブバー ---------- */
#tab-bar {
  position: sticky;
  bottom: 0;
  z-index: 40;
  display: flex;
  background: rgba(14, 16, 21, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  padding: 8px 0 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.tab.active { color: var(--text); }
.tab-icon { font-size: 1.15rem; position: relative; }
#notif-badge {
  position: absolute;
  top: -4px;
  right: -10px;
  font-style: normal;
  font-size: 0.56rem;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  border-radius: 999px;
  min-width: 15px;
  height: 15px;
  line-height: 15px;
  text-align: center;
  padding: 0 3px;
}

/* ---------- トースト ---------- */
#toast {
  position: fixed;
  bottom: 78px;
  left: 50%;
  transform: translate(-50%, 10px);
  width: max-content;
  max-width: min(380px, 88vw);
  background: #262b3b;
  border: 1px solid #3a4157;
  color: var(--text);
  font-size: 0.74rem;
  line-height: 1.6;
  border-radius: 12px;
  padding: 10px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 90;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 同意ゲート（理念と免責事項） ---------- */
#gate[hidden] { display: none; }
#gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 9, 13, 0.92);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  overflow-y: auto;
  padding: 18px 14px;
}
#gate-inner {
  width: min(430px, 100%);
  height: fit-content;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 20px 22px;
  animation: fadein 0.3s ease;
}
.gate-hero {
  width: 100%;
  aspect-ratio: 3 / 1.6;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.gate-eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 10px;
}
.gate-catch {
  font-size: 1.32rem;
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  background: linear-gradient(90deg, var(--red) 0%, var(--text) 55%, var(--blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gate-lead { font-size: 0.78rem; color: var(--muted); margin-bottom: 18px; }
.gate-lead strong { color: var(--text); }
.gate-block {
  border-left: 3px solid var(--line);
  padding: 2px 0 2px 12px;
  margin-bottom: 14px;
}
.gate-block.forbidden { border-left-color: var(--red); }
.gate-block-title { font-size: 0.8rem; font-weight: 700; margin-bottom: 3px; }
.gate-block p:not(.gate-block-title) { font-size: 0.72rem; color: var(--muted); line-height: 1.8; }
.gate-block.forbidden .gate-block-title { color: var(--red); }

#gate-agree-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin: 18px 0 4px;
  cursor: pointer;
}
#gate-agree-row input { margin-top: 3px; accent-color: var(--gold); }
.gate-note { font-size: 0.64rem; color: var(--muted); text-align: center; margin-top: 10px; }
.btn-primary:disabled { opacity: 0.35; cursor: default; transform: none; box-shadow: none; }
#btn-gate-close { display: block; margin: 8px auto 0; }
.creed-btn { display: block; margin: 0 auto 12px; }

/* ---------- アクセシビリティ ---------- */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

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