/**
 * assets/css/rank-guide.css
 * ランクマッチの遊び方（rank_guide.php）。2026-11-24 追加（続き195）。
 * サイトと同じ黒×赤。1つの欄で1つのことだけを説明し、欄ごとに大きな番号（01〜04）と見出しを置く。
 * ランクのエンブレム・色（.exh-emblem・.exh-r-*）は exhibition.css を使う。
 */

.rg { --rg-red: #dc2626; --rg-line: rgba(127, 29, 29, .55); --rg-card: rgba(24, 24, 27, .9); }
.rg-muted { color: #a1a1aa; font-size: .85em; }

/* ---------- はじめに ---------- */
.rg-hero { position: relative; overflow: hidden; padding: 40px 24px 28px; margin-bottom: 20px; border: 1px solid var(--rg-line); border-radius: 20px;
    background: radial-gradient(120% 80% at 100% 0%, rgba(185, 28, 28, .35) 0%, rgba(0, 0, 0, 0) 60%), linear-gradient(180deg, rgba(24, 24, 27, .95), rgba(9, 9, 11, .95)); }
.rg-kicker { font-family: 'Oswald', 'Noto Sans JP', sans-serif; letter-spacing: .3em; font-size: 12px; color: #f87171; margin-bottom: 10px; }
.rg-title { font-weight: 900; font-size: clamp(26px, 5.4vw, 46px); line-height: 1.25; color: #fafafa; margin-bottom: 14px; }
.rg-title > span { display: inline-block; }
.rg-title-em { color: #ef4444; text-shadow: 0 0 24px rgba(239, 68, 68, .45); }
.rg-lead { max-width: 760px; font-size: 15px; line-height: 1.85; color: #d4d4d8; }
.rg-lead b { color: #fafafa; }
.rg-hero-status { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 8px 14px; border-radius: 999px; font-size: 13px;
    color: #d4d4d8; background: rgba(0, 0, 0, .45); border: 1px solid #3f3f46; }
.rg-hero-status.is-live { color: #bbf7d0; border-color: #16a34a; background: rgba(20, 83, 45, .35); }
.rg-hero-status .msi { font-size: 18px; }
.rg-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.rg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 12px; font-weight: 700; font-size: 14px;
    color: #e4e4e7; border: 1px solid #52525b; background: rgba(0, 0, 0, .35); transition: border-color .15s, filter .15s, transform .15s; }
.rg-btn:hover { border-color: #ef4444; color: #fecaca; }
.rg-btn.is-primary { color: #fff; border-color: #ef4444; background: linear-gradient(135deg, #b91c1c, #7f1d1d); box-shadow: 0 10px 28px rgba(127, 29, 29, .5); }
.rg-btn.is-primary:hover { filter: brightness(1.12); color: #fff; }
.rg-btn:active { transform: scale(.98); }
.rg-hero-me { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 14px; color: #d4d4d8; }
.rg-hero-me b { color: var(--c2); margin-left: 4px; }
.rg-emblems { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 26px; padding-top: 20px; border-top: 1px solid rgba(63, 63, 70, .6); }
.rg-emblem { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 10px; color: #a1a1aa; min-width: 56px; }

/* ---------- 目次 ---------- */
.rg-toc { position: sticky; top: 64px; z-index: 5; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 28px; padding: 6px;
    border-radius: 14px; border: 1px solid #27272a; background: rgba(9, 9, 11, .92); backdrop-filter: blur(8px); }
.rg-toc a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 6px; border-radius: 10px; font-size: 13px; color: #d4d4d8; text-align: center; }
.rg-toc a:hover { background: rgba(127, 29, 29, .35); color: #fff; }
.rg-toc b { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex-shrink: 0; border-radius: 999px; font-size: 11px;
    color: #fff; background: #991b1b; }

/* ---------- 欄 ---------- */
.rg-section { scroll-margin-top: 130px; margin-bottom: 44px; }
.rg-sec-no { font-family: 'Oswald', 'Noto Sans JP', sans-serif; font-size: 44px; line-height: 1; font-weight: 700; color: transparent;
    -webkit-text-stroke: 1px rgba(239, 68, 68, .7); margin-bottom: 4px; }
.rg-sec-title { font-size: clamp(22px, 4vw, 30px); font-weight: 900; color: #fafafa; margin-bottom: 10px; }
.rg-sec-lead { font-size: 14px; line-height: 1.8; color: #d4d4d8; max-width: 760px; margin-bottom: 16px; }
.rg-sec-lead b { color: #fafafa; }
.rg-sub-title { font-size: 17px; font-weight: 700; color: #fafafa; margin: 28px 0 8px; padding-left: 10px; border-left: 3px solid var(--rg-red); }
.rg-note { font-size: 12px; line-height: 1.7; color: #a1a1aa; margin-top: 10px; }

/* 参加の流れ：4枚のカードを矢印でつなぐ（スマホでは縦に並べ、矢印は下向き） */
.rg-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; list-style: none; margin: 0; padding: 0; }
.rg-flow-step { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px 16px; border-radius: 16px; background: var(--rg-card); border: 1px solid #27272a; }
.rg-flow-step:not(:last-child)::after { content: ''; position: absolute; top: 50%; right: -16px; width: 10px; height: 10px; border-top: 2px solid #ef4444; border-right: 2px solid #ef4444;
    transform: translateY(-50%) rotate(45deg); }
.rg-flow-no { position: absolute; top: 12px; right: 14px; font-family: 'Oswald', 'Noto Sans JP', sans-serif; font-size: 28px; font-weight: 700; color: rgba(239, 68, 68, .35); line-height: 1; }
.rg-flow-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(127, 29, 29, .45); color: #fecaca; }
.rg-flow-icon .msi { font-size: 24px; }
.rg-flow-step > b { font-size: 16px; color: #fafafa; }
.rg-flow-step > p { font-size: 13px; line-height: 1.7; color: #d4d4d8; }

.rg-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rg-mode { padding: 16px 18px; border-radius: 14px; background: var(--rg-card); border: 1px solid #27272a; }
.rg-mode-head { display: flex; align-items: center; gap: 8px; color: #fafafa; margin-bottom: 8px; }
.rg-mode-head .msi { color: #f87171; }
.rg-mode ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rg-mode li { position: relative; padding-left: 16px; font-size: 13px; line-height: 1.7; color: #d4d4d8; }
.rg-mode li::before { content: ''; position: absolute; left: 2px; top: .7em; width: 6px; height: 6px; border-radius: 999px; background: #ef4444; }

/* ランクの段階（上が強い） */
.rg-ladder { display: flex; flex-direction: column; gap: 6px; }
.rg-ladder-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: 'em name rp' 'em div div'; align-items: center; column-gap: 12px;
    padding: 8px 14px; border-radius: 12px; background: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(24, 24, 27, .9)); border: 1px solid #27272a; border-left: 3px solid var(--c1); }
.rg-ladder-row .exh-emblem { grid-area: em; }
.rg-ladder-name { grid-area: name; font-size: 15px; color: var(--c2); }
.rg-ladder-rp { grid-area: rp; font-family: 'Oswald', 'Noto Sans JP', sans-serif; font-size: 13px; color: #e4e4e7; white-space: nowrap; }
.rg-ladder-div { grid-area: div; font-size: 11px; color: #71717a; }
.rg-ladder-row.is-me { box-shadow: 0 0 0 1px var(--c1), 0 0 18px var(--glow); }
.rg-ladder-me { grid-area: div; justify-self: end; font-size: 10px; padding: 1px 8px; border-radius: 999px; color: #0a0a0a; background: var(--c2); font-weight: 700; }

.rg-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.rg-point { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--rg-card); border: 1px solid #27272a; }
.rg-point p { font-size: 13px; line-height: 1.7; color: #d4d4d8; }
.rg-point b { color: #fafafa; }
.rg-point-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; background: #27272a; color: #e4e4e7; }
.rg-point-icon.is-up { background: rgba(20, 83, 45, .6); color: #86efac; }
.rg-point-icon.is-mvp { background: rgba(120, 53, 15, .6); color: #fcd34d; }

.rg-table-wrap { overflow-x: auto; margin-bottom: 16px; }
.rg-table { width: 100%; max-width: 560px; border-collapse: collapse; font-size: 13px; }
.rg-table caption { text-align: left; font-size: 12px; color: #a1a1aa; padding-bottom: 6px; }
.rg-table th, .rg-table td { padding: 9px 12px; border-bottom: 1px solid #27272a; text-align: left; color: #e4e4e7; }
.rg-table th { font-size: 11px; color: #a1a1aa; font-weight: 600; background: rgba(0, 0, 0, .4); }
.rg-table .num { text-align: right; font-family: 'Oswald', 'Noto Sans JP', sans-serif; font-size: 15px; }
.rg .is-up { color: #4ade80; }
.rg .is-down { color: #f87171; }

/* RP の計算を試す */
.rg-calc { padding: 18px; border-radius: 16px; border: 1px solid var(--rg-line); background: linear-gradient(180deg, rgba(69, 10, 10, .35), rgba(9, 9, 11, .9)); }
.rg-calc-title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #fafafa; margin-bottom: 14px; }
.rg-calc-title .msi { color: #f87171; }
.rg-calc-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rg-calc-inputs label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 12px; color: #a1a1aa; }
.rg-calc-inputs label > b { font-family: 'Oswald', 'Noto Sans JP', sans-serif; font-size: 20px; color: #fafafa; }
.rg-calc-inputs input[type=range] { width: 100%; accent-color: #dc2626; }
.rg-calc-rank { font-size: 12px; font-weight: 700; color: var(--c2, #e4e4e7); }
.rg-calc-out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.rg-calc-out > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 12px; background: rgba(0, 0, 0, .5); border: 1px solid #27272a; }
.rg-calc-out span { font-size: 11px; color: #a1a1aa; }
.rg-calc-out b { font-family: 'Oswald', 'Noto Sans JP', sans-serif; font-size: 26px; line-height: 1.1; color: #e4e4e7; }
.rg-calc-out b.is-up { color: #4ade80; }
.rg-calc-out b.is-down { color: #f87171; }
.rg-calc-hint { margin-top: 10px; font-size: 12px; color: #a1a1aa; text-align: center; }
.rg-calc-hint b { color: #fafafa; }

/* 報酬 */
.rg-rewards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rg-reward { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px; border-radius: 14px; background: var(--rg-card); border: 1px solid #27272a; text-align: center; }
.rg-reward > span { font-size: 12px; color: #a1a1aa; }
.rg-reward > b { font-family: 'Oswald', 'Noto Sans JP', sans-serif; font-size: 28px; line-height: 1.15; color: #fafafa; }
.rg-reward > small { font-size: 10px; color: #71717a; }
.rg-reward.is-win { border-color: #166534; }
.rg-reward.is-win > b { color: #4ade80; }
.rg-reward.is-mvp { border-color: #92400e; }
.rg-reward.is-mvp > b { color: #fcd34d; }
.rg-bonus { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rg-bonus-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--rg-card); border: 1px solid #27272a; font-size: 13px; color: var(--c2); }
.rg-bonus-item b { margin-left: auto; font-family: 'Oswald', 'Noto Sans JP', sans-serif; font-size: 15px; color: #fcd34d; }

/* よくある質問 */
.rg-faq { display: flex; flex-direction: column; gap: 8px; }
.rg-faq details { border-radius: 12px; background: var(--rg-card); border: 1px solid #27272a; }
.rg-faq details[open] { border-color: var(--rg-line); }
.rg-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 700; color: #fafafa; }
.rg-faq summary::-webkit-details-marker { display: none; }
.rg-faq summary::before { content: 'Q'; flex-shrink: 0; font-family: 'Oswald', 'Noto Sans JP', sans-serif; color: #ef4444; }
.rg-faq summary > span { flex: 1; }
.rg-faq summary .msi { transition: transform .2s; color: #a1a1aa; }
.rg-faq details[open] summary .msi { transform: rotate(180deg); }
.rg-faq details > p { padding: 0 16px 16px 36px; font-size: 13px; line-height: 1.8; color: #d4d4d8; }

/* おわりに */
.rg-cta { text-align: center; padding: 32px 20px; margin-bottom: 20px; border-radius: 20px; border: 1px solid var(--rg-line);
    background: radial-gradient(80% 120% at 50% 100%, rgba(185, 28, 28, .3), rgba(0, 0, 0, 0) 70%), rgba(9, 9, 11, .9); }
.rg-cta-title { font-size: 24px; font-weight: 900; color: #fafafa; margin-bottom: 6px; }
.rg-cta .rg-sec-lead { margin-left: auto; margin-right: auto; }

/* ---------- スマホ ---------- */
@media (max-width: 767px) {
    .rg-hero { padding: 28px 16px 20px; }
    .rg-toc { top: 58px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rg-flow { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .rg-flow-step:not(:last-child)::after { top: auto; right: auto; bottom: -14px; left: 50%; transform: translateX(-50%) rotate(135deg); }
    .rg-modes, .rg-points, .rg-calc-inputs { grid-template-columns: minmax(0, 1fr); }
    .rg-rewards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rg-emblems { gap: 10px 8px; justify-content: space-between; }
    .rg-emblem { min-width: 64px; }
}
@media (prefers-reduced-motion: reduce) { .rg-faq summary .msi { transition: none; } }
