/* ═══════════════════════════════════════════════════════
   制度活用ナビ — デザインシステム
   プロフェッショナル/洗練。紺×ニュートラル、見出しに明朝。
   ═══════════════════════════════════════════════════════ */

:root {
  /* アクセント(Tweaksで上書き可) */
  --accent-h: 248;
  --accent: oklch(0.46 0.12 var(--accent-h));
  --accent-deep: oklch(0.34 0.10 var(--accent-h));
  --accent-soft: oklch(0.95 0.03 var(--accent-h));
  --accent-line: oklch(0.88 0.04 var(--accent-h));

  /* 安心の緑(マッチ/ポジティブ) */
  --gain: oklch(0.52 0.085 165);
  --gain-soft: oklch(0.95 0.03 165);

  /* ニュートラル(やや寒色) */
  --ink: oklch(0.24 0.012 260);
  --ink-2: oklch(0.42 0.012 260);
  --ink-3: oklch(0.58 0.012 260);
  --line: oklch(0.91 0.006 260);
  --line-2: oklch(0.95 0.005 260);
  --paper: oklch(0.995 0.003 255);
  --card: #ffffff;
  --bg: oklch(0.95 0.008 255);

  --radius: 16px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px oklch(0.4 0.03 260 / 0.06), 0 1px 3px oklch(0.4 0.03 260 / 0.05);
  --shadow-md: 0 4px 16px oklch(0.35 0.04 260 / 0.08), 0 1px 4px oklch(0.35 0.04 260 / 0.06);
  --shadow-lg: 0 18px 50px oklch(0.3 0.05 260 / 0.16), 0 6px 18px oklch(0.3 0.05 260 / 0.08);

  --serif: "Noto Serif JP", "Hiragino Mincho ProN", serif;
  --sans: "Noto Sans JP", -apple-system, "Hiragino Kaku Gothic ProN", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* デスクトップ背景(中央のスマホ的カラムを引き立てる) */
.stage {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background:
    radial-gradient(1100px 600px at 50% -10%, var(--accent-soft), transparent 60%),
    var(--bg);
}

.app {
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  background: var(--paper);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px oklch(0.3 0.04 260 / 0.07);
}
@media (min-width: 540px) {
  .app { margin: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

/* ── トップバー / 進捗 ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 12px;
  background: oklch(0.995 0.003 255 / 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-2);
}
.brandmark {
  display: flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 14px; letter-spacing: 0.01em; color: var(--ink);
  cursor: pointer; user-select: none; border-radius: 8px; transition: opacity 0.15s;
}
.brandmark:hover { opacity: 0.72; }
.brandmark:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.brandmark .dot {
  width: 24px; height: 24px; border-radius: 7px;
  background: linear-gradient(150deg, var(--accent), var(--accent-deep));
  display: grid; place-items: center; color: #fff; font-family: var(--serif); font-size: 13px; font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.topbar .spacer { flex: 1; }
.back-btn {
  appearance: none; border: 1px solid var(--line); background: var(--card);
  color: var(--ink-2); font-family: var(--sans); font-size: 13px; font-weight: 500;
  padding: 7px 12px; border-radius: 99px; cursor: pointer; transition: 0.15s;
  display: inline-flex; align-items: center; gap: 5px;
}
.back-btn:hover { border-color: var(--accent-line); color: var(--accent-deep); }

.progress {
  height: 4px; background: var(--line); border-radius: 99px; overflow: hidden; flex: 1; max-width: 200px;
}
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-deep)); border-radius: 99px; transition: width 0.4s cubic-bezier(.4,0,.2,1); }
.progress-num { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

/* ── スクロール本体 ── */
.scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.pad { padding: 26px 22px 30px; }

/* ── 汎用 ── */
.kicker {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-deep);
}
.kicker.muted { color: var(--ink-3); }
.h-serif { font-family: var(--serif); font-weight: 700; color: var(--ink); line-height: 1.34; letter-spacing: 0.01em; }
.fade-in { animation: fade 0.45s ease both; }
.rise { animation: rise 0.5s cubic-bezier(.2,.7,.3,1) both; }
@keyframes fade { from { transform: translateY(5px); } to { transform: none; } }
@keyframes rise { from { transform: translateY(11px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade-in, .rise, .opt, .rank-card { animation: none !important; } }

/* ── ボタン ── */
.btn {
  appearance: none; border: none; cursor: pointer; font-family: var(--sans);
  font-weight: 600; font-size: 16px; letter-spacing: 0.02em;
  padding: 16px 22px; border-radius: 13px; width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  transition: transform 0.12s, box-shadow 0.2s, background 0.2s;
}
.btn-primary {
  background: linear-gradient(160deg, var(--accent), var(--accent-deep));
  color: #fff; box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: var(--card); color: var(--accent-deep); border: 1px solid var(--accent-line); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }

/* ═══ イントロ ═══ */
.intro-hero { padding: 40px 24px 30px; }
.intro-badge {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  color: var(--accent-deep); background: var(--accent-soft); border: 1px solid var(--accent-line);
  padding: 6px 13px; border-radius: 99px; letter-spacing: 0.02em;
}
.intro-title { font-size: 31px; margin: 20px 0 0; }
.intro-title .em { color: var(--accent-deep); }
.intro-sub { color: var(--ink-2); font-size: 15px; line-height: 1.85; margin: 16px 0 0; }
.meta-row { display: flex; gap: 8px; margin: 22px 0 0; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); background: var(--card); border: 1px solid var(--line);
  padding: 8px 13px; border-radius: 10px;
}
.chip b { color: var(--accent-deep); }

.profile {
  display: flex; gap: 13px; align-items: center; margin: 26px 0 0;
  padding: 15px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.avatar {
  width: 52px; height: 52px; flex: none; border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  display: grid; place-items: center; color: var(--accent-deep); font-family: var(--serif); font-weight: 700; font-size: 19px;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile .who { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.profile .role { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.5; }

.x-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-decoration: none;
  padding: 4px 10px 4px 8px; border: 1px solid var(--line); border-radius: 99px;
  background: var(--card); transition: 0.15s;
}
.x-link svg { color: var(--ink); }
.x-link:hover { border-color: var(--ink); color: var(--ink); background: var(--paper); }
.x-link.on-dark {
  color: oklch(0.92 0.02 var(--accent-h)); border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
}
.x-link.on-dark svg { color: #fff; }
.x-link.on-dark:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.4); color: #fff; }

.intro-points { margin: 24px 0 0; display: flex; flex-direction: column; gap: 1px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.intro-points li {
  list-style: none; display: flex; gap: 12px; align-items: flex-start;
  padding: 15px 16px; background: var(--card); font-size: 14px; color: var(--ink-2); line-height: 1.6;
}
.intro-points li + li { border-top: 1px solid var(--line-2); }
.intro-points .n { font-family: var(--serif); font-weight: 700; color: var(--accent-deep); font-size: 15px; flex: none; width: 18px; }
.intro-points b { color: var(--ink); font-weight: 700; }

.cta-wrap { padding: 18px 22px calc(22px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); background: oklch(0.995 0.003 255 / 0.9); backdrop-filter: blur(8px); }
.cta-note { text-align: center; font-size: 12px; color: var(--ink-3); margin: 11px 0 0; }

/* ═══ 質問 ═══ */
.q-head { margin-bottom: 22px; }
.q-text { font-size: 23px; margin: 12px 0 0; }
.options { display: flex; flex-direction: column; gap: 11px; }
.opt {
  text-align: left; appearance: none; cursor: pointer; font-family: var(--sans);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 14px;
  padding: 16px 17px; display: flex; align-items: center; gap: 14px;
  transition: 0.16s; box-shadow: var(--shadow-sm);
}
.opt:hover { border-color: var(--accent-line); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.opt .tick {
  width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--line);
  display: grid; place-items: center; transition: 0.16s;
}
.opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.opt.sel .tick { border-color: var(--accent); background: var(--accent); }
.opt.sel .tick::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.opt .label { font-weight: 600; font-size: 16px; color: var(--ink); }
.opt .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.45; }

/* ═══ 集計(ローディング)═══ */
.loading { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 40px; text-align: center; }
.loader-ring { width: 64px; height: 64px; border-radius: 50%; border: 4px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading .msg { font-family: var(--serif); font-weight: 700; font-size: 19px; color: var(--ink); }
.loading .sub { font-size: 13.5px; color: var(--ink-3); margin-top: -14px; }

/* ═══ 結果 ═══ */
.result-head { padding: 24px 22px 18px; }
.result-title { font-size: 25px; margin: 10px 0 0; }
.result-title .num { color: var(--accent-deep); }
.result-sub { color: var(--ink-2); font-size: 13.5px; line-height: 1.7; margin: 12px 0 0; }

.rank-list { display: flex; flex-direction: column; gap: 12px; padding: 4px 22px 8px; }
.rank-card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 16px 15px; box-shadow: var(--shadow-sm);
  transition: 0.18s;
}
.rank-card:hover { box-shadow: var(--shadow-md); }
.rc-top { display: flex; gap: 13px; align-items: flex-start; }
.rc-rank {
  flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 17px; color: #fff;
  background: linear-gradient(155deg, var(--accent), var(--accent-deep));
}
.rank-card[data-top="1"] .rc-rank { background: linear-gradient(155deg, oklch(0.66 0.13 85), oklch(0.5 0.12 70)); }
.rank-card[data-top="2"] .rc-rank,
.rank-card[data-top="3"] .rc-rank { background: linear-gradient(155deg, var(--accent), var(--accent-deep)); }
.rc-main { flex: 1; min-width: 0; }
.rc-catrow { display: flex; align-items: center; gap: 8px; }
.cat-chip {
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em; padding: 3px 9px; border-radius: 99px;
  color: oklch(0.42 0.09 var(--ch, 248)); background: oklch(0.95 0.035 var(--ch, 248)); border: 1px solid oklch(0.88 0.05 var(--ch, 248));
}
.rc-name { font-family: var(--serif); font-weight: 700; font-size: 18px; color: var(--ink); margin: 8px 0 0; line-height: 1.35; }
.rc-tag { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin: 6px 0 0; }
.rc-benefit {
  display: inline-flex; align-items: center; gap: 7px; margin: 12px 0 0; font-size: 13px; font-weight: 700;
  color: var(--gain); background: var(--gain-soft); padding: 7px 12px; border-radius: 9px;
}
.rc-benefit svg { flex: none; }

/* 解錠された詳細 */
.rc-detail { margin: 13px 0 0; border-top: 1px dashed var(--line); padding-top: 13px; display: flex; flex-direction: column; gap: 9px; }
.dt-row { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; display: flex; gap: 8px; }
.dt-row .k { flex: none; font-weight: 700; color: var(--accent-deep); width: 64px; }
.dt-steps { margin: 2px 0 0; padding-left: 0; counter-reset: s; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.dt-steps li { counter-increment: s; position: relative; padding-left: 26px; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.dt-steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-deep); font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.dt-tip { font-size: 12px; color: var(--ink-2); background: oklch(0.97 0.02 85); border: 1px solid oklch(0.9 0.05 85); border-radius: 9px; padding: 9px 11px; line-height: 1.6; }
.dt-tip b { color: oklch(0.5 0.1 70); }

/* ロック表示 */
.rc-lock {
  margin: 13px 0 0; border-top: 1px dashed var(--line); padding-top: 13px;
  display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-3);
}
.rc-lock .lk { width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent-deep); flex: none; }
.rc-lock b { color: var(--ink-2); }

/* メール配信予告バッジ(案C: ハイブリッド型) */
.rc-mail-promise {
  margin: 13px 0 0; border-top: 1px dashed var(--accent-line); padding-top: 13px;
  display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2);
  background: linear-gradient(135deg, var(--accent-soft), oklch(0.97 0.02 var(--accent-h)));
  margin-left: -4px; margin-right: -4px;
  padding: 11px 12px; border-radius: 10px; border-top: 1px solid var(--accent-line);
}
.rc-mail-promise .mp-icon { font-size: 18px; flex: none; }
.rc-mail-promise b { color: var(--accent-deep); font-weight: 700; }

/* ═══ メール登録ゲート / フォーム ═══ */
.gate {
  margin: 18px 22px 26px; background: linear-gradient(165deg, var(--accent-deep), oklch(0.28 0.09 var(--accent-h)));
  border-radius: 20px; padding: 26px 22px; color: #fff; box-shadow: var(--shadow-lg);
}
.gate .g-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: oklch(0.86 0.05 var(--accent-h)); }
.gate .g-title { font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1.45; margin: 12px 0 0; }
.gate .g-sub { font-size: 13.5px; line-height: 1.8; color: oklch(0.92 0.02 var(--accent-h)); margin: 12px 0 0; }
.gate .g-list { margin: 16px 0 0; display: flex; flex-direction: column; gap: 9px; }
.gate .g-list div { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; line-height: 1.55; color: oklch(0.95 0.015 var(--accent-h)); }
.gate .g-list svg { flex: none; margin-top: 2px; }

.form { margin: 18px 0 0; display: flex; flex-direction: column; gap: 12px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: oklch(0.9 0.02 var(--accent-h)); margin-bottom: 6px; }
.field input {
  width: 100%; appearance: none; font-family: var(--sans); font-size: 16px; color: var(--ink);
  background: #fff; border: 1.5px solid transparent; border-radius: 12px; padding: 14px 15px; transition: 0.15s;
}
.field input::placeholder { color: var(--ink-3); }
.field input:focus { outline: none; border-color: oklch(0.8 0.08 var(--accent-h)); box-shadow: 0 0 0 4px oklch(0.7 0.1 var(--accent-h) / 0.25); }
.field .err { color: oklch(0.85 0.11 25); font-size: 12px; margin-top: 6px; font-weight: 600; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; line-height: 1.6; color: oklch(0.9 0.02 var(--accent-h)); cursor: pointer; }
.consent input { width: 18px; height: 18px; flex: none; margin-top: 1px; accent-color: var(--gain); }
.consent a { color: #fff; text-decoration: underline; }
.btn-unlock { background: #fff; color: var(--accent-deep); box-shadow: var(--shadow-md); margin-top: 4px; }
.btn-unlock:hover { background: oklch(0.97 0.02 var(--accent-h)); transform: translateY(-1px); }
.gate-note { text-align: center; font-size: 11.5px; color: oklch(0.85 0.03 var(--accent-h)); margin: 12px 0 0; line-height: 1.6; }

/* 解錠後の通知バナー */
.unlocked-banner {
  margin: 16px 22px; padding: 16px 18px; background: var(--gain-soft); border: 1px solid oklch(0.85 0.06 165);
  border-radius: var(--radius); display: flex; gap: 12px; align-items: flex-start;
}
.unlocked-banner .ic { width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--gain); display: grid; place-items: center; }
.unlocked-banner .t { font-weight: 700; font-size: 14.5px; color: oklch(0.36 0.08 165); }
.unlocked-banner .s { font-size: 12.5px; color: oklch(0.42 0.05 165); margin-top: 4px; line-height: 1.6; }

/* ═══ 完了 ═══ */
.done-wrap { flex: 1; display: flex; flex-direction: column; padding: 40px 24px; text-align: center; align-items: center; justify-content: center; gap: 4px; }
.done-check { width: 76px; height: 76px; border-radius: 50%; background: var(--gain-soft); display: grid; place-items: center; margin-bottom: 8px; }
.done-check .ring { width: 76px; height: 76px; border-radius: 50%; border: 3px solid var(--gain); position: absolute; animation: pop 0.5s cubic-bezier(.2,.8,.3,1) both; }
.done-title { font-family: var(--serif); font-weight: 700; font-size: 25px; color: var(--ink); margin: 8px 0 0; }
.done-sub { font-size: 14px; color: var(--ink-2); line-height: 1.85; margin: 14px 0 0; max-width: 320px; }
.done-card { margin: 26px 0 0; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); text-align: left; width: 100%; }
.done-card .ttl { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--accent-deep); }
.done-msg { font-size: 13.5px; color: var(--ink-2); line-height: 1.85; margin: 10px 0 0; }
.done-sign { margin-top: 12px; font-family: var(--serif); font-size: 14px; color: var(--ink); text-align: right; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.footnote { padding: 22px; text-align: center; font-size: 11px; color: var(--ink-3); line-height: 1.7; border-top: 1px solid var(--line-2); }

/* Tweaks panel host */
#tweaks-root { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }
#tweaks-root > * { pointer-events: auto; }

/* ══════════════════════════════════════════════════
   PC 2カラムレイアウト(スマホは上の1カラムのまま)
   ══════════════════════════════════════════════════ */
.shell { width: 100%; display: flex; justify-content: center; }
.brandrail { display: none; }
.intro-desktop-head { display: none; }

@media (min-width: 880px) {
  .stage { align-items: center; padding: 36px; }

  .shell {
    width: 100%;
    max-width: 1180px;
    height: calc(100vh - 72px);
    max-height: 900px;
    min-height: 600px;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
    background: var(--paper);
  }

  /* ── 左:ブランドレール ── */
  .brandrail {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 42%;
    max-width: 440px;
    flex: none;
    padding: 52px 44px 40px;
    color: #fff;
    background:
      radial-gradient(420px 300px at 80% 0%, oklch(0.42 0.1 var(--accent-h) / 0.55), transparent 70%),
      linear-gradient(165deg, var(--accent-deep), oklch(0.25 0.075 var(--accent-h)));
    overflow-y: auto;
  }
  .br-brand { color: #fff; font-size: 15px; }
  .br-brand .dot { width: 27px; height: 27px; font-size: 14px; background: rgba(255,255,255,0.16); box-shadow: none; }
  .br-title { font-size: 33px; line-height: 1.4; margin: 38px 0 0; color: #fff; }
  .br-title .em { color: oklch(0.86 0.08 var(--accent-h)); }
  .br-lead { font-size: 14.5px; line-height: 1.95; color: oklch(0.9 0.025 var(--accent-h)); margin: 22px 0 0; }

  .br-profile {
    display: flex; gap: 13px; align-items: center; margin: 30px 0 0;
    padding: 15px; border-radius: var(--radius);
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16);
  }
  .br-profile .avatar {
    background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.28); color: #fff;
  }
  .br-profile .who { font-weight: 700; font-size: 14.5px; color: #fff; }
  .br-profile .role { font-size: 12.5px; color: oklch(0.88 0.03 var(--accent-h)); margin-top: 3px; line-height: 1.5; }

  .br-trust { margin: 26px 0 0; display: flex; flex-direction: column; gap: 12px; }
  .br-trust > div {
    display: flex; gap: 10px; align-items: center; font-size: 13.5px; line-height: 1.5;
    color: oklch(0.94 0.018 var(--accent-h)); font-weight: 500;
  }
  .br-trust svg { flex: none; color: oklch(0.86 0.09 165); }

  .br-foot { font-size: 11px; line-height: 1.7; color: oklch(0.78 0.03 var(--accent-h)); margin: 36px 0 0; }

  /* ── 右:アプリ本体 ── */
  .shell > .app {
    max-width: none; width: auto; flex: 1; min-width: 0;
    height: 100%; min-height: 0;
    border: none; box-shadow: none;
    border-left: 1px solid rgba(0,0,0,0.04);
  }
  .shell > .app .topbar { padding-left: 30px; padding-right: 30px; }
  .topbar .brandmark { display: none; }      /* レールに表示済み */
  .topbar .spacer { display: none; }
  .topbar { justify-content: flex-end; }
  .topbar .progress { max-width: none; }

  /* 内側コンテンツを快適幅に */
  .intro-hero, .cta-wrap { max-width: 560px; margin-left: auto; margin-right: auto; width: 100%; }
  .pad { max-width: 600px; margin: 0 auto; padding-top: 40px; }
  .result-head, .unlocked-banner, .gate, .footnote { max-width: 820px; margin-left: auto; margin-right: auto; }

  /* デスクトップ用イントロ:レールと重複する要素を隠す */
  .intro-desktop-head { display: block; margin-bottom: 26px; }
  .intro-desktop-head .dh-title { font-size: 27px; margin: 12px 0 0; }
  .intro-hero { padding-top: 52px; }
  .intro-hero .intro-badge,
  .intro-hero .intro-title,
  .intro-hero .intro-sub,
  .intro-hero .profile { display: none !important; }

  /* 結果 Top10 を2列グリッドに */
  .rank-list {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
    align-items: start; max-width: 820px; margin-left: auto; margin-right: auto;
  }
  .q-text { font-size: 25px; }
}

@media (min-width: 880px) and (max-width: 1040px) {
  .br-title { font-size: 29px; }
  .brandrail { padding: 44px 34px 34px; }
}


/* ═══════════════════════════════════════════════════════
   v2.2: 全カードぼかし(初期表示) / 詳細ページ / パスワードゲート
   ═══════════════════════════════════════════════════════ */

/* ── 結果ページ・初期表示の警告バナー ── */
.rc-blur-banner {
  margin: 0 22px 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, oklch(0.97 0.05 60), oklch(0.95 0.06 50));
  border: 1px solid oklch(0.85 0.07 50);
  border-radius: 12px;
  font-size: 13px;
  color: oklch(0.4 0.08 40);
  line-height: 1.55;
}

/* 全カードぼかし(メアド入力前) */
.rank-list-blur { pointer-events: none; user-select: none; }
.rank-card-blur-wrap {
  filter: blur(8px) saturate(0.85);
  opacity: 0.85;
  transition: none;
}
.rank-card-blur-wrap .rc-name,
.rank-card-blur-wrap .rc-tag,
.rank-card-blur-wrap .rc-benefit,
.rank-card-blur-wrap .cat-chip { color: var(--ink-2); }

/* 解錠後カードの「詳しく見る」ボタン */
.rc-open-detail {
  appearance: none; border: none; background: var(--accent-soft);
  color: var(--accent-deep); font-family: var(--sans); font-weight: 600; font-size: 13.5px;
  padding: 11px 14px; border-radius: 10px; cursor: pointer; width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 13px; border-top: 1px dashed var(--line); padding-top: 13px;
  transition: 0.15s;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.rc-open-detail:hover { background: oklch(0.93 0.04 var(--accent-h)); }

/* ── Gate の警告文(追加) ── */
.g-warn {
  margin: 12px 0 14px;
  padding: 11px 13px;
  background: rgba(255, 220, 130, 0.14);
  border-left: 3px solid oklch(0.78 0.13 70);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.7;
  color: oklch(0.92 0.02 60);
}
.g-warn b { color: oklch(0.95 0.05 75); }

/* ═══ 詳細ページ ═══ */
.detail-head {
  padding: 30px 24px 22px;
  background: linear-gradient(170deg, var(--accent-soft) 0%, transparent 80%);
  border-bottom: 1px solid var(--line);
}
.detail-cat { display: inline-flex; }
.detail-title { font-size: 28px; margin: 14px 0 6px; line-height: 1.3; }
.detail-tag { color: var(--ink-2); font-size: 14px; line-height: 1.7; margin: 0 0 14px; }
.detail-benefit {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 600; color: var(--accent-deep);
  background: var(--card); padding: 9px 13px; border-radius: 10px;
  border: 1px solid var(--accent-line);
}

.detail-section {
  margin: 22px 22px 0;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.detail-section .ds-title { font-size: 18px; margin: 6px 0 16px; }
.detail-section .dt-row { padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; color: var(--ink-2); line-height: 1.7; display: flex; gap: 12px; align-items: flex-start; }
.detail-section .dt-row:last-of-type { border-bottom: none; }
.detail-section .dt-row .k { flex: none; min-width: 90px; color: var(--ink); font-weight: 600; }
.detail-section .dt-steps { margin: 0; padding-left: 1.2em; line-height: 1.85; }
.detail-section .dt-steps li { margin-bottom: 6px; }
.detail-section .dt-tip { margin-top: 14px; font-size: 13px; color: var(--ink-2); background: oklch(0.97 0.02 85); border: 1px solid oklch(0.9 0.05 85); border-radius: 9px; padding: 11px 13px; line-height: 1.7; }
.detail-section .dt-tip b { color: oklch(0.5 0.1 70); }
.detail-section.unlocked { border-color: var(--gain); background: linear-gradient(180deg, var(--gain-soft) 0%, var(--card) 25%); }
.kicker.accent { color: var(--gain); }

/* ═══ 境界デザイン(「ここからが大事」) ═══ */
.gate-boundary {
  margin: 30px 22px 0;
  padding: 26px 22px 22px;
  text-align: center;
  background: linear-gradient(180deg, transparent, var(--accent-soft) 70%);
  border-radius: var(--radius) var(--radius) 0 0;
}
.gb-icon {
  width: 48px; height: 48px; margin: 0 auto 12px;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff;
  box-shadow: 0 6px 18px oklch(0.4 0.1 var(--accent-h) / 0.28);
}
.gb-icon svg { width: 22px; height: 22px; }
.gb-title { font-size: 22px; color: var(--accent-deep); margin-bottom: 10px; line-height: 1.4; }
.gb-text { font-size: 14px; color: var(--ink-2); line-height: 1.85; max-width: 360px; margin: 0 auto; }

/* ═══ パスワードゲート ═══ */
.password-gate {
  margin: 0 22px 26px;
  padding: 26px 22px;
  background: linear-gradient(165deg, var(--accent-deep), oklch(0.28 0.09 var(--accent-h)));
  color: #fff;
  border-radius: 0 0 20px 20px;
  box-shadow: var(--shadow-lg);
}
.pg-kicker {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em;
  color: oklch(0.92 0.04 var(--accent-h));
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 12px; border-radius: 99px;
}
.pg-title { font-size: 18px; color: #fff; margin: 14px 0 16px; line-height: 1.5; }
.pg-form { display: flex; flex-direction: column; gap: 10px; }
.pg-form input {
  font-family: var(--sans); font-size: 16px; font-weight: 600;
  padding: 14px 16px; border-radius: 11px; border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08); color: #fff;
  letter-spacing: 0.05em; text-align: center;
}
.pg-form input::placeholder { color: rgba(255, 255, 255, 0.4); font-weight: 400; }
.pg-form input:focus { outline: 2px solid #fff; outline-offset: 2px; background: rgba(255, 255, 255, 0.14); }
.pg-form .err { font-size: 12.5px; color: oklch(0.85 0.13 30); background: oklch(0.4 0.13 30 / 0.25); border-radius: 8px; padding: 8px 10px; line-height: 1.55; }
.pg-form .btn-unlock {
  background: #fff; color: var(--accent-deep); margin-top: 4px;
}
.pg-form .btn-unlock:hover { background: oklch(0.97 0.02 var(--accent-h)); }

.pg-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 24px 0 16px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
}
.pg-divider::before, .pg-divider::after {
  content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.2);
}

.pg-channels { display: flex; flex-direction: column; gap: 11px; }
.pg-channel {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: #fff; text-decoration: none;
  transition: 0.15s;
}
.pg-channel.line { cursor: pointer; }
.pg-channel.line:hover { background: rgba(255, 255, 255, 0.13); transform: translateY(-1px); }
.pgc-badge {
  flex: none; padding: 3px 9px; border-radius: 99px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em;
  background: oklch(0.75 0.18 145); color: oklch(0.2 0.1 145);
}
.pgc-badge.wait {
  background: rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.85);
}
.pgc-main { flex: 1; }
.pgc-title { font-size: 14px; font-weight: 700; line-height: 1.45; margin-bottom: 3px; }
.pgc-sub { font-size: 12px; color: rgba(255, 255, 255, 0.7); line-height: 1.55; }

/* PC幅での詳細ページ調整 */
@media (min-width: 880px) {
  .detail-head { padding: 40px 36px 28px; }
  .detail-title { font-size: 34px; }
  .detail-section { margin: 26px 36px 0; padding: 28px 32px; }
  .gate-boundary { margin: 36px 36px 0; padding: 32px 28px 26px; }
  .gb-title { font-size: 26px; }
  .password-gate { margin: 0 36px 32px; padding: 32px 28px; }
  .pg-channels { flex-direction: row; }
  .pg-channel { flex: 1; }
}

/* ═══════════════════════════════════════════════════════
   v2.3: 2段階認証コード方式(Gate)
   ═══════════════════════════════════════════════════════ */

/* 6桁コード入力欄 */
.code-input {
  font-size: 28px !important;
  font-weight: 700 !important;
  text-align: center !important;
  letter-spacing: 0.6em !important;
  padding: 18px 12px !important;
  font-family: "SF Mono", "Menlo", "Consolas", monospace !important;
}
.code-input::placeholder {
  letter-spacing: 0.4em;
  opacity: 0.35;
  font-weight: 400;
}

/* 開発モック表示バナー(本番化時に削除) */
.dev-mock-banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  background: oklch(0.75 0.18 70 / 0.22);
  border: 1px dashed oklch(0.85 0.16 70);
  border-radius: 10px;
  color: oklch(0.96 0.05 75);
}
.dev-mock-banner .dmb-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  opacity: 0.8; margin-bottom: 4px;
}
.dev-mock-banner .dmb-code {
  font-size: 15px; font-weight: 600;
  font-family: "SF Mono", "Menlo", monospace;
  margin-bottom: 4px;
}
.dev-mock-banner .dmb-code b {
  font-size: 22px;
  color: #fff;
  letter-spacing: 0.15em;
  margin-left: 6px;
}
.dev-mock-banner .dmb-note {
  font-size: 11.5px;
  opacity: 0.75;
}

/* ゲート内アクションリンク(再送 / メアド変更) */
.gate-actions {
  display: flex; justify-content: center; gap: 22px;
  margin: 16px 0 8px;
}
.gate-link {
  appearance: none; background: none; border: none;
  font-family: var(--sans); font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer; padding: 6px 4px;
  transition: 0.15s;
}
.gate-link:hover { color: #fff; }
.gate-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }

/* 送信中ボタン disabled スタイル */
.btn-unlock[disabled] {
  background: rgba(255, 255, 255, 0.6) !important;
  cursor: not-allowed;
}
