/* =====================================================================================
   ベイングローリー ヒーロー診断 — 「試合前のヒーロー選択画面（ドラフト）」がテーマ
   -------------------------------------------------------------------------------------
   ・ハルシオン・フォールドの夜の青緑に、金の縁取りとベインクリスタルの紫の光を重ねる
   ・角を落としたパネルはゲーム内HUDの形から取っている
   ・設問とドラフトボード（全57体）が1画面に収まるよう、見出しは低く、ボードはロールごとに1行
   ・背景の格子はクリスタルの面を模した自作の模様（外部素材は使わない）
   ===================================================================================== */

:root {
  --ground:       #08121c;
  --panel:        #0f2030;
  --panel-2:      #142a3d;
  --panel-3:      #1a3449;
  --line:         #1f3a50;
  --line-strong:  #2f5673;
  --gold:         #e3b45c;
  --gold-soft:    #f7dfa4;
  --gold-deep:    #a8792c;
  --crystal:      #8f7cff;
  --crystal-soft: #c9bfff;
  --weapon:       #f08a3c;
  --ally:         #3cb4f2;
  --text:         #eaf1f8;
  --muted:        #8ea3b8;
  --faint:        #5d7488;

  --cut: 14px;
  --chamfer: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  --hex: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);

  --font-display: "Big Shoulders Display", "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-body:    "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --font-hud:     "Rajdhani", "Arial Narrow", system-ui, sans-serif;

  /* 共通ナビ（rin-nav）の配色をこのアプリに寄せる */
  --rn-fg:        #eaf1f8;
  --rn-fg-dim:    #8ea3b8;
  --rn-bg:        rgba(15, 32, 48, .88);
  --rn-bg-hover:  rgba(227, 180, 92, .16);
  --rn-line:      rgba(227, 180, 92, .38);
  --rn-accent:    #e3b45c;
  --rn-radius:    6px;

  color-scheme: dark;

  /* AdSense 自動広告のサイドレール（左右の縦長広告）を避ける余白。ポータルと同じ考え方で、
     狭い画面ではサイドレールが出ないので 0。実際の広告が広ければ ../portal/ad-rail.js が測って広げる */
  --rail-left:  0px;
  --rail-right: 0px;
}

/* サイドレールが出るのは横に余裕のある画面だけ。180px = 標準的なサイドレール160px + 隙間20px */
@media (min-width: 1100px) {
  :root {
    --rail-left:  180px;
    --rail-right: 180px;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  padding-left: max(16px, var(--rail-left));
  padding-right: max(16px, var(--rail-right));
  padding-block: 14px 40px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  background-color: var(--ground);
  background-image:
    radial-gradient(60% 45% at 88% 0%, rgba(143, 124, 255, .20) 0%, rgba(143, 124, 255, 0) 70%),
    radial-gradient(55% 40% at 0% 100%, rgba(22, 120, 120, .18) 0%, rgba(22, 120, 120, 0) 70%),
    repeating-linear-gradient(60deg, rgba(255, 255, 255, .024) 0 1px, transparent 1px 38px),
    repeating-linear-gradient(-60deg, rgba(255, 255, 255, .024) 0 1px, transparent 1px 38px);
  background-attachment: fixed, fixed, scroll, scroll;
}
body.guide-open { overflow: hidden; }
a { color: var(--gold-soft); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }

.page { max-width: 1120px; margin-inline: auto; display: grid; gap: 14px; }

/* ── 見出し ─────────────────────────────────────────────── */
.topbar { display: grid; gap: 6px; }
.crumbs { margin: 0; padding-right: 150px; font-size: 12px; line-height: 1.6; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--gold-soft); text-decoration: underline; }

.title-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; }
.brand { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; min-width: 0; }
.wordmark {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(40px, 5.4vw, 60px); line-height: .84; letter-spacing: .01em; white-space: nowrap;
  color: var(--gold);
  background: linear-gradient(180deg, #fff6dc 0%, var(--gold-soft) 28%, var(--gold) 58%, var(--gold-deep) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 18px rgba(143, 124, 255, .3));
}
.title-block { display: grid; gap: 3px; min-width: 0; padding-left: 16px; border-left: 1px solid var(--line-strong); }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0; font: 700 11px/1 var(--font-hud); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.crystal {
  width: 10px; height: 10px; flex: none; transform: rotate(45deg);
  background: linear-gradient(135deg, #f1edff 0%, var(--crystal) 45%, var(--ally) 100%);
  box-shadow: 0 0 12px rgba(143, 124, 255, .85);
}
h1 { margin: 0; font-size: clamp(19px, 2.4vw, 24px); font-weight: 900; line-height: 1.3; letter-spacing: .02em; }
.sub { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

.guide-btn {
  --cut: 9px;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px;
  clip-path: var(--chamfer); box-shadow: inset 0 0 0 1px var(--gold-deep);
  background: linear-gradient(180deg, var(--panel-3), var(--panel-2));
  color: var(--gold-soft); font: 700 14px/1 var(--font-body); text-decoration: none; white-space: nowrap;
}
.guide-btn:hover { box-shadow: inset 0 0 0 1px var(--gold); background: linear-gradient(180deg, #21405a, var(--panel-3)); }
.guide-btn svg { flex: none; }

/* ── HUD パネル（金から紫へ抜ける1pxの縁 + 角落とし） ───────── */
.hud { position: relative; padding: 1px; clip-path: var(--chamfer); background: linear-gradient(155deg, rgba(227, 180, 92, .75) 0%, rgba(47, 86, 115, .55) 38%, rgba(47, 86, 115, .4) 70%, rgba(143, 124, 255, .7) 100%); }
.hud-body { clip-path: var(--chamfer); background: linear-gradient(180deg, rgba(20, 42, 61, .96) 0%, rgba(12, 26, 39, .97) 100%); padding: 18px 22px; }
.hud-label { margin: 0; font: 700 12px/1 var(--font-hud); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }

/* ── 診断（設問パネル） ─────────────────────────────────── */
.app { display: grid; gap: 12px; }
.stage-panel { display: grid; gap: 14px; }
.stage-top { display: flex; align-items: flex-end; gap: 14px; }
.progress-num { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.progress-num b { font: 900 34px/.9 var(--font-display); font-variant-numeric: tabular-nums; }
.progress-num span { font: 700 13px/1 var(--font-hud); color: var(--muted); letter-spacing: .12em; }
.gauge { flex: 1; min-width: 0; display: grid; gap: 6px; padding-bottom: 3px; }
.pips { display: flex; gap: 3px; }
.pip { flex: 1; height: 7px; transform: skewX(-24deg); background: var(--line); transition: background .25s; }
.pip.done { background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep)); }
.pip.now { background: var(--crystal); box-shadow: 0 0 10px rgba(143, 124, 255, .8); }
.ghost { flex: none; font: 500 13px/1 var(--font-body); color: var(--muted); background: transparent; border: 0; padding: 6px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.ghost:hover { color: var(--gold-soft); }
.ghost:disabled { visibility: hidden; }

.stage { display: grid; gap: 14px; }
.qtext { margin: 0; font-size: clamp(20px, 2.6vw, 26px); font-weight: 700; line-height: 1.4; text-wrap: balance; }
.options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.opt {
  --cut: 10px;
  display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 12px;
  text-align: left; font: 500 15px/1.45 var(--font-body); color: var(--text);
  background: linear-gradient(180deg, var(--panel-3), var(--panel-2));
  border: 0; clip-path: var(--chamfer); box-shadow: inset 0 0 0 1px var(--line-strong);
  cursor: pointer; transition: background .18s, box-shadow .18s, transform .18s;
}
.opt:hover { background: linear-gradient(120deg, rgba(143, 124, 255, .28), rgba(26, 52, 73, .95) 60%); box-shadow: inset 0 0 0 1px var(--crystal); }
.opt:active { transform: translateY(1px); }
.opt:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--gold-soft); }
.key {
  flex: none; width: 24px; height: 24px; display: grid; place-items: center;
  font: 700 13px/1 var(--font-hud); color: var(--ground);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.opt:hover .key { background: linear-gradient(135deg, #fff, var(--crystal-soft)); }
.noscript { margin: 0; color: var(--muted); }

/* ── ドラフトボード（ロールごとに1行） ─────────────────────── */
.board { display: grid; gap: 10px; padding-block: 14px 16px; }
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.board-title { display: flex; align-items: baseline; gap: 10px; }
.board-title span { font: 700 12px/1 var(--font-body); letter-spacing: .04em; text-transform: none; color: var(--muted); }
.board-note { margin: 0; font-size: 12px; color: var(--muted); }
.role-list { display: grid; gap: 6px; }
.role-row { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 12px; align-items: center; }
.role-head { display: grid; gap: 3px; padding-right: 10px; border-right: 1px solid var(--line); }
.role-head b { font-size: 13px; font-weight: 700; line-height: 1.2; }
.role-head b em { margin-left: 6px; font: 700 12px/1 var(--font-hud); font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.role-head span { font: 700 10px/1 var(--font-hud); letter-spacing: .2em; color: var(--faint); text-transform: uppercase; }
.roster { display: grid; grid-template-columns: repeat(14, minmax(0, 52px)); gap: 4px; }
.cell {
  --cut: 6px;
  position: relative; aspect-ratio: 1; max-width: 100%; overflow: hidden; clip-path: var(--chamfer);
  background: var(--panel); transition: opacity .35s, filter .35s;
}
.cell img, .hex img, .runner-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cell.top::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px var(--gold), inset 0 0 14px rgba(227, 180, 92, .6); }

/* 画像が無いヒーローは名前のタイル */
.face-name {
  display: grid; place-items: center; align-content: center; width: 100%; height: 100%; padding: 2px;
  text-align: center; line-height: 1.12; font-weight: 700; color: var(--gold-soft);
  background:
    linear-gradient(135deg, rgba(143, 124, 255, .22) 0%, rgba(143, 124, 255, 0) 45%),
    linear-gradient(160deg, #1d3a55 0%, #0f2131 100%);
}
.face-name span { display: block; white-space: nowrap; }
.cell .face-name { font-size: 9px; box-shadow: inset 0 0 0 1px var(--line-strong); }

/* ── 結果 ──────────────────────────────────────────────── */
.result { display: grid; gap: 18px; }
.result-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; }
.hex-wrap { filter: drop-shadow(0 0 22px rgba(143, 124, 255, .5)); }
.hex-frame { width: 140px; aspect-ratio: 1.1547; padding: 3px; background: linear-gradient(160deg, var(--gold-soft), var(--gold-deep) 60%, var(--crystal)); clip-path: var(--hex); }
.hex { width: 100%; height: 100%; overflow: hidden; clip-path: var(--hex); background: var(--panel); }
.hex .face-name { font-size: 19px; padding: 16px; }
.kicker { margin: 0; font: 700 12px/1 var(--font-hud); letter-spacing: .3em; text-transform: uppercase; color: var(--crystal-soft); }
.hero-name {
  margin: 6px 0 2px; font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(42px, 6vw, 64px); line-height: .9; letter-spacing: .01em; overflow-wrap: anywhere;
  color: var(--gold);
  background: linear-gradient(180deg, #fff6dc 0%, var(--gold-soft) 30%, var(--gold) 62%, var(--gold-deep) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--muted); font-size: 14px; }
.hero-sub i { width: 4px; height: 4px; background: var(--gold); transform: rotate(45deg); display: inline-block; }
.ring { position: relative; width: 100px; aspect-ratio: 1; display: grid; place-items: center; }
.ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(47, 86, 115, .6) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
}
.ring b { font: 900 32px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.ring b small { font-size: 15px; margin-left: 1px; }
.ring span { position: absolute; bottom: -18px; font: 700 11px/1 var(--font-hud); letter-spacing: .2em; color: var(--muted); white-space: nowrap; }
.desc { margin: 0; max-width: 62ch; }

.power { display: grid; gap: 7px; }
.power-labels { display: flex; justify-content: space-between; font: 700 13px/1 var(--font-hud); letter-spacing: .18em; text-transform: uppercase; }
.power-labels span:first-child { color: var(--weapon); }
.power-labels span:last-child { color: var(--crystal-soft); }
.power-bar { position: relative; height: 8px; transform: skewX(-24deg); background: linear-gradient(90deg, var(--weapon), #6b5a78 50%, var(--crystal)); }
.power-mark { position: absolute; top: -5px; width: 4px; height: 18px; background: #fff; transform: translateX(-50%); box-shadow: 0 0 0 2px var(--ground), 0 0 12px rgba(255, 255, 255, .7); }

.section-title { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 6px; margin-right: 6px; vertical-align: middle; transform: skewX(-24deg); }
.traits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; }
.trait { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 12px; align-items: center; font-size: 13px; }
.trait-track { position: relative; height: 8px; background: rgba(8, 18, 28, .9); box-shadow: inset 0 0 0 1px var(--line); }
.trait-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }
.trait-you { position: absolute; top: 50%; width: 12px; height: 12px; background: var(--ally); transform: translate(-50%, -50%) rotate(45deg); box-shadow: 0 0 0 2px var(--ground), 0 0 10px rgba(60, 180, 242, .8); }

.runners { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.runner { --cut: 9px; display: flex; gap: 10px; align-items: center; padding: 9px 10px; clip-path: var(--chamfer); background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--line-strong); min-width: 0; }
.runner-face { width: 46px; aspect-ratio: 1.1547; flex: none; overflow: hidden; clip-path: var(--hex); }
.runner-face .face-name { font-size: 8px; padding: 2px 6px; }
.runner b { display: block; font: 900 18px/1 var(--font-display); text-transform: uppercase; letter-spacing: .02em; overflow-wrap: anywhere; }
.runner small { display: block; margin-top: 3px; color: var(--muted); font: 700 12px/1 var(--font-hud); letter-spacing: .06em; font-variant-numeric: tabular-nums; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.primary, .secondary { --cut: 10px; clip-path: var(--chamfer); border: 0; cursor: pointer; padding: 14px 20px; font: 700 15px/1 var(--font-body); }
.primary { color: var(--ground); background: linear-gradient(180deg, var(--gold-soft), var(--gold) 55%, var(--gold-deep)); }
.primary:hover { background: linear-gradient(180deg, #fff, var(--gold-soft) 55%, var(--gold)); }
.secondary { font-weight: 500; color: var(--text); background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.secondary:hover { box-shadow: inset 0 0 0 1px var(--crystal); color: var(--crystal-soft); }

/* 結果が出た瞬間だけ、六角形の肖像をせり上げる */
.reveal .hex-wrap { animation: rise .6s cubic-bezier(.2, .9, .2, 1) both; }
.reveal .hero-name { animation: slide .5s .08s cubic-bezier(.2, .9, .2, 1) both; }
@keyframes rise { from { transform: translateY(14px) scale(.9); opacity: .35; } to { transform: none; opacity: 1; } }
@keyframes slide { from { transform: translateX(-10px); opacity: .35; } to { transform: none; opacity: 1; } }

/* ── 広告（メイン機能の直下） ───────────────────────────── */
.ad-slot { display: grid; gap: 4px; padding: 10px 12px 12px; background: rgba(12, 26, 39, .72); box-shadow: inset 0 0 0 1px var(--line); }
.ad-label { margin: 0; font-size: 11px; letter-spacing: .08em; color: var(--faint); }

/* ── この診断について（ページ上に常に見える短い説明） ─────────── */
.about-body { display: grid; gap: 10px; }
.about h2 { margin: 0; font-size: 18px; font-weight: 900; line-height: 1.4; }
.about p { margin: 0; max-width: 72ch; color: var(--muted); }
.about-points { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; }
.about-points li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; vertical-align: 2px; background: var(--gold); transform: rotate(45deg); }
.about .guide-btn { justify-self: start; }

/* ── 遊び方・解説（同じURLの静的HTML。JSが動く環境では全画面パネルとして開く） ── */
.guide { padding-block: 8px 24px; }
.js .guide {
  position: fixed; inset: 0; z-index: 950; display: none; overflow-y: auto; overscroll-behavior: contain;
  padding: 0 max(16px, var(--rail-right)) 56px max(16px, var(--rail-left)); background: #050b12;
}
.js .guide.is-open { display: block; }
.guide-inner { max-width: 860px; margin-inline: auto; display: grid; gap: 28px; }
.guide-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-block: 14px 18px; background: linear-gradient(180deg, rgba(5, 11, 18, .99) 72%, rgba(5, 11, 18, 0));
}
.guide-head-title { display: grid; gap: 4px; }
.guide-title { margin: 0; font-size: 20px; font-weight: 900; outline: none; }
.guide-close {
  --cut: 8px;
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; clip-path: var(--chamfer);
  background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--text); font: 700 14px/1 var(--font-body); text-decoration: none; cursor: pointer; border: 0;
}
.guide-close:hover { box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold-soft); }
.no-js-only { display: none; }
html:not(.js) .no-js-only { display: inline; }
html:not(.js) .guide-close { display: none; }

.guide-section { display: grid; gap: 10px; }
.guide h2 { margin: 0; padding-left: 12px; border-left: 3px solid var(--gold); font-size: clamp(18px, 2.4vw, 22px); font-weight: 900; line-height: 1.4; }
.guide h3 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.5; }
.guide p { margin: 0; color: #cdd8e3; max-width: 72ch; }
.guide ol, .guide ul { margin: 0; padding-left: 1.4em; display: grid; gap: 4px; color: #cdd8e3; }
.table-wrap { overflow-x: auto; }
.guide table { border-collapse: collapse; width: 100%; font-size: 13px; }
.guide th, .guide td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.guide th { color: var(--muted); font-weight: 700; white-space: nowrap; }
.guide td.nowrap { white-space: nowrap; }
.guide td.en { font: 700 15px/1.2 var(--font-hud); letter-spacing: .04em; white-space: nowrap; }
.guide td.num, .guide th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.guide tr.ref td { color: var(--faint); }
.guide tr.chosen td { background: linear-gradient(90deg, rgba(227, 180, 92, .18), rgba(227, 180, 92, .04)); color: var(--gold-soft); font-weight: 700; }
.guide tr.chosen td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.faq { display: grid; gap: 8px; }
.faq details { background: rgba(20, 42, 61, .6); box-shadow: inset 0 0 0 1px var(--line); }
.faq summary { cursor: pointer; padding: 12px 14px; list-style-position: inside; }
.faq summary h3 { display: inline; }
.faq details > p { padding: 0 14px 14px; }
.credits { font-size: 13px; }

.site-footer { display: grid; gap: 4px; font-size: 12px; color: var(--faint); }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }

/* ── 言語の切り替え ─────────────────────────────────────── */
.title-actions { display: flex; align-items: center; gap: 8px 14px; }
.lang-link { padding: 10px 2px; font: 700 13px/1 var(--font-hud); letter-spacing: .12em; color: var(--muted); text-decoration: none; }
.lang-link:hover { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 4px; }

/* ── 結果の共有 ─────────────────────────────────────────── */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
a.secondary { display: inline-flex; align-items: center; text-decoration: none; }
.share .secondary { padding: 12px 16px; font-size: 14px; }
.share-status { font-size: 13px; color: var(--crystal-soft); }
.shared-note { margin: 0; padding: 10px 14px; font-size: 13.5px; line-height: 1.6; color: var(--gold-soft); background: rgba(227, 180, 92, .1); box-shadow: inset 0 0 0 1px rgba(227, 180, 92, .4); }

/* ── ほかのアプリ（../_shared/rin-apps.js が描く） ─────────────── */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.related-card { --cut: 9px; display: block; padding: 12px 14px; clip-path: var(--chamfer); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); text-decoration: none; }
.related-card:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.related-card b { display: block; margin-bottom: 3px; font-size: 14px; color: var(--gold-soft); }
.related-card span { display: block; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.about-related { margin-top: 4px; }

/* ── レスポンシブ ───────────────────────────────────────── */
@media (max-width: 900px) {
  .options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .role-row { grid-template-columns: 1fr; gap: 4px; }
  .role-head { display: flex; align-items: baseline; gap: 8px; padding-right: 0; border-right: 0; }
  .roster { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .result-top { grid-template-columns: auto minmax(0, 1fr); }
  .ring { grid-column: 1 / -1; justify-self: start; width: 88px; margin-bottom: 14px; }
  .traits { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { padding-block: 10px 32px; }
  .crumbs { padding-right: 52px; }
  .wordmark { font-size: 34px; }
  .title-block { padding-left: 0; border-left: 0; }
  .guide-btn { padding: 9px 12px; font-size: 13px; }
  .hud-body { padding: 16px; }
  .opt { gap: 8px; padding: 12px 10px; font-size: 14px; }
  .cell .face-name { font-size: 8px; padding: 1px; }
  .hex-frame { width: 112px; }
  .runners { grid-template-columns: 1fr; }
  .progress-num b { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
