/* css/rules.css — ルールブック（rules.html の本文を、サイトの暗い見た目で）。★すべて .rules-page の中だけ。動きは足さない */
.rules-page{--r-paper:#101016;--r-shade:#17171f;--r-accent:var(--pink-soft);--r-soft:rgba(255,61,139,.28);--r-warn:var(--pink);--r-tip:var(--gold);--r-ok:#6fc3a3}
.rules-page .rules-lead{margin:8px 0 0;color:var(--sub);font-size:15px}
.rules-page .wrap{display:grid;grid-template-columns:1fr;gap:28px;padding-bottom:40px}
@media (min-width:980px){.rules-page .wrap{grid-template-columns:220px minmax(0,1fr)}}
.rules-page .rules-main{min-width:0;max-width:820px;font-size:16px;line-height:1.85}
.rules-page a{color:var(--gold)}

.rules-page section{margin-top:44px}
.rules-page section h2{font-size:24px;margin:0 0 14px;padding:2px 0 7px 12px;border-left:6px solid var(--pink);border-bottom:1px solid var(--line-strong);font-weight:700}
.rules-page section h3{font-size:17px;margin:26px 0 6px;border-left:4px solid var(--gold);padding-left:10px}
.rules-page section h4{font-size:15px;margin:18px 0 4px;border-left:3px solid var(--sub);padding-left:9px;color:var(--sub)}
.rules-page p{margin:10px 0}
.rules-page b.hl{background:linear-gradient(transparent 60%,var(--r-soft) 60%)}
.rules-page .small{font-size:14px}
.rules-page .tbd{display:inline-block;font-size:12px;font-weight:700;color:#000;background:var(--r-tip);padding:0 6px;margin:0 2px;vertical-align:1px}

.rules-page .note{background:var(--r-paper);border:1px solid var(--line-strong);padding:12px 14px;margin:14px 0}
.rules-page .note.warn{border-left:5px solid var(--r-warn)}
.rules-page .note.tip{border-left:5px solid var(--r-tip)}
.rules-page .note.ok{border-left:5px solid var(--r-ok)}
.rules-page .note > :first-child{margin-top:0}.rules-page .note > :last-child{margin-bottom:0}

.rules-page table{border-collapse:collapse;width:100%;margin:12px 0;font-size:15px;background:var(--r-paper)}
.rules-page th,.rules-page td{border:1px solid var(--line-strong);padding:7px 9px;text-align:left;vertical-align:top}
.rules-page th{background:var(--r-shade);white-space:nowrap;color:var(--sub);font-weight:700}
.rules-page .scroll{overflow-x:auto}

.rules-page dl.pairs{display:grid;grid-template-columns:max-content 1fr;gap:6px 14px;margin:12px 0}
.rules-page dl.pairs dt{font-weight:700}.rules-page dl.pairs dd{margin:0}
@media (max-width:560px){.rules-page dl.pairs{grid-template-columns:1fr}.rules-page dl.pairs dd{margin-bottom:8px}}

.rules-page ol.flow{counter-reset:f;list-style:none;padding:0;margin:12px 0}
.rules-page ol.flow li{counter-increment:f;padding:6px 0 6px 40px;position:relative;border-bottom:1px dashed var(--line-strong)}
.rules-page ol.flow li::before{content:counter(f);position:absolute;left:0;top:7px;width:26px;height:26px;line-height:26px;text-align:center;
  border:1px solid var(--gold);color:var(--gold);font-size:14px;font-weight:700}

.rules-page details.why{margin:10px 0;border:1px dashed var(--line-strong);background:var(--r-paper)}
.rules-page details.why summary{cursor:pointer;padding:8px 12px;font-weight:700;font-size:14px;color:var(--sub)}
.rules-page details.why .inner{padding:0 14px 8px}

.rules-page .story p{margin:14px 0}
.rules-page .story .cv{font-weight:700;color:var(--r-accent)}
.rules-page .titlecard{text-align:center;margin:34px 0 6px;padding:22px 10px;border-top:1px solid var(--gold);border-bottom:1px solid var(--gold)}
.rules-page .titlecard .tc-en{display:block;font-size:clamp(24px,6vw,38px);line-height:1.2;font-weight:800;letter-spacing:.02em;color:var(--gold)}
.rules-page .titlecard .tc-ja{display:block;margin-top:6px;font-size:14px;letter-spacing:.3em;color:var(--sub)}

.rules-page dl.qa{margin:10px 0 0}
.rules-page dl.qa dt{position:relative;margin:18px 0 0;padding:0 0 0 34px;font-weight:700;line-height:1.6}
.rules-page dl.qa dd{position:relative;margin:6px 0 0;padding:0 0 12px 34px;border-bottom:1px dashed var(--line-strong)}
.rules-page dl.qa dt::before,.rules-page dl.qa dd::before{position:absolute;left:0;top:1px;width:24px;height:24px;line-height:24px;text-align:center;font-size:13px;font-weight:700}
.rules-page dl.qa dt::before{content:"Q";border:1px solid var(--ink);color:var(--ink)}
.rules-page dl.qa dd::before{content:"A";background:var(--pink);color:#000}

.rules-page .terms-lead{margin:0 0 6px}
.rules-page ol.terms{list-style:none;counter-reset:t;margin:0;padding:0}
.rules-page ol.terms > li{counter-increment:t;position:relative;padding:14px 0 12px 46px;border-bottom:1px solid var(--line-strong)}
.rules-page ol.terms > li::before{content:counter(t);position:absolute;left:0;top:14px;width:32px;height:32px;line-height:32px;text-align:center;
  border:1px solid var(--gold);color:var(--gold);font-weight:700}
.rules-page ol.terms .tm{margin:0;font-size:18px;font-weight:700;line-height:1.5}
.rules-page ol.terms .ts{margin:6px 0 0;font-size:14px;line-height:1.75}
.rules-page ol.terms ul.ts{padding-left:1.3em}

.rules-page .fieldmap{margin:12px 0;background:#f4eef2;border:1px solid var(--line-strong);padding:8px}
.rules-page .fieldmap svg{display:block;width:100%;height:auto}
.rules-page .fieldmap text{font-family:inherit}

/* タブと目次。★JS が動いたときだけ html.rjs が付く。付かなければ全部縦に並ぶ */
.rules-page .rtabs{display:flex;gap:4px;margin:6px 0 0;border-bottom:2px solid var(--gold);position:sticky;top:0;background:var(--bg);z-index:5;padding-top:6px}
.rules-page .rtabs a{flex:1 1 auto;white-space:nowrap;display:flex;align-items:center;justify-content:center;min-height:44px;padding:4px 6px;
  font-weight:700;font-size:15px;text-decoration:none;color:var(--ink);background:var(--r-paper);border:1px solid var(--line-strong);border-bottom:none}
.rules-page .rtabs a.on{background:var(--gold);border-color:var(--gold);color:#000}
html:not(.rjs) .rules-page .rtabs{display:none}
.rjs .rules-page .rtab{display:none}.rjs .rules-page .rtab.on{display:block}
.rules-page .rtab > section:first-child{margin-top:26px}
html:not(.rjs) .rules-page .rtab + .rtab{border-top:2px solid var(--gold);margin-top:40px}
.rules-page .rtab-next{margin:44px 0 0;text-align:right}
.rules-page .rtab-next a{display:inline-flex;align-items:center;min-height:44px;padding:0 18px;border:1px solid var(--gold);background:transparent;color:var(--gold);font-weight:700;text-decoration:none}
.rules-page .rules-main section,.rules-page .rules-main [id]{scroll-margin-top:70px}
@media (max-width:560px){.rules-page .rtabs{gap:2px}.rules-page .rtabs a{font-size:13px;padding:4px 3px;min-width:0}}
.rules-page .toc{font-size:14px}
@media (min-width:980px){.rules-page .toc{position:sticky;top:16px;align-self:start;max-height:calc(100vh - 32px);overflow:auto;padding-top:40px}}
.rules-page .toc .grp{font-weight:700;margin:12px 0 2px;color:var(--gold)}
.rules-page .toc ul{list-style:none;margin:0;padding:0 0 0 10px;border-left:1px solid var(--line-strong)}
.rules-page .toc li a{display:block;padding:3px 0;color:var(--ink);text-decoration:none}
.rules-page .toc li a:hover{color:var(--pink-soft)}
.rules-page .toc summary{cursor:pointer;font-weight:700}
@media (max-width:979px){.rules-page .toc{order:-1;border:1px solid var(--line-strong);background:var(--r-paper);padding:10px 14px;margin-top:16px}}

/* アイテムの一覧などの折りたたみ */
.rules-page details.fold{margin:12px 0;border:1px solid var(--line-strong);background:var(--r-paper)}
.rules-page details.fold > summary{cursor:pointer;padding:10px 14px;font-weight:700}
.rules-page details.fold > .inner{padding:0 14px 10px}
/* コンバータ：正方形の立ち絵と、チャットの発言のような枠（★画像は img/converter/ を上書きして差し替える） */
/* ★立ち絵は大きく。PC では真ん中に、スマホでは横幅いっぱい（正方形のまま） */
.rules-page .cv-intro{display:flex;justify-content:center;margin:14px 0}
.rules-page .cv-portrait{position:relative;margin:0;flex:none;width:min(100%,300px);aspect-ratio:1/1;border:1px solid var(--line-strong);background:var(--r-shade)}
.rules-page .cv-portrait img{display:block;width:100%;height:100%;object-fit:cover}

/* コンバータの言葉は、ゲームのチャットと同じ形（css/chat.css の .log.is-converter を読み込む）。上下の余白だけここで */
.rules-page .cv-chat{margin:12px 0}
/* ★セリフの枠に、右上の角から薄い蜘蛛の巣（img/web.svg）。金の地の上に重ねる */
.rules-page .cv-chat .log.is-converter{background:rgba(232,182,90,.05) url("../img/web.svg") top right/220px auto no-repeat}
.rules-page .cv-chat .log{grid-template-areas:"ic nm" "ic body"}
