/* ===== 攻略チャート（攻略Wiki風） ===== */
:root { --g-s: #e0453a; --g-a: #f08a24; --g-b: #e3b923; --g-c: #4aa3df; --g-head: #24324f; --g-yellow: #fff7d6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --g-head: #2c3c5e; --g-yellow: #3a3420; } }
:root[data-theme="dark"] { --g-head: #2c3c5e; --g-yellow: #3a3420; }
.nav a.nav-hot { color: var(--g-s); font-weight: 700; }
.nav a.nav-hot.active { background: var(--ng-soft); color: var(--g-s); }

.g-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; align-items: start; }
.container:has(.g-wrap) { max-width: 1120px; }
.g-main { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 22px; }
.g-crumb { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.g-title { font-size: 26px; border-bottom: 3px solid var(--g-s); padding-bottom: 8px; }
.g-meta { font-size: 12px; color: var(--muted); margin: 6px 0 12px; }
.g-note { font-size: 13px; color: var(--muted); }
.g-h2 { background: var(--g-head); color: #fff; padding: 9px 14px; border-left: 6px solid var(--g-s); border-radius: 4px; font-size: 19px; margin: 34px 0 14px; scroll-margin-top: 70px; }
.g-h3 { border-left: 5px solid var(--accent); border-bottom: 1px solid var(--border); padding: 4px 10px; font-size: 17px; margin: 26px 0 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.g-part { scroll-margin-top: 70px; }
.g-sec { font-size: 11px; color: #fff; border-radius: 4px; padding: 1px 6px; }
.g-sec.l { background: #3a8fd8; }
.g-sec.r { background: #d8603a; }

.g-toc { border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px; padding: 10px 16px; margin: 14px 0; }
.g-toc-head { font-weight: 700; text-align: center; margin-bottom: 4px; }
.g-toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 24px; font-size: 14px; }
.g-toc a, .g-side a { text-decoration: none; }

.g-conclusion { border: 3px solid var(--g-s); border-radius: 8px; background: var(--g-yellow); padding: 0 16px 10px; }
.g-conclusion-head { display: inline-block; background: var(--g-s); color: #fff; font-weight: 700; padding: 2px 14px; border-radius: 0 0 8px 8px; margin-bottom: 6px; }
.g-conclusion ul { padding-left: 4px; list-style: none; }
.g-conclusion li { margin: 6px 0; font-weight: 500; padding-left: 24px; position: relative; }
.g-conclusion li::before { content: "\2714"; color: var(--g-s); position: absolute; left: 2px; }

.g-scroll { overflow-x: auto; }
.g-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
.g-table th, .g-table td { border: 1px solid var(--border); padding: 8px 10px; vertical-align: middle; }
.g-table th { background: var(--surface-2); white-space: nowrap; }
.g-table tbody th { width: 30%; text-align: left; white-space: normal; }
.g-center td, .g-center th { text-align: center; }
.g-center td.g-left { text-align: left; }
.g-hl td { background: var(--g-yellow); }
.g-cite { font-size: 11px; vertical-align: super; margin-left: 2px; text-decoration: none; }
.g-stars { color: #f0a500; letter-spacing: 1px; white-space: nowrap; }
.g-stars .off { color: var(--border); }

.g-tier { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.g-tier-row { display: grid; grid-template-columns: 80px 1fr; border-top: 1px solid var(--border); }
.g-tier-row:first-child { border-top: 0; }
.g-tier-badge { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; font-size: 30px; font-weight: 800; line-height: 1.1; }
.g-tier-badge small { font-size: 11px; font-weight: 600; }
.t-s { background: var(--g-s); }
.t-a { background: var(--g-a); }
.t-b { background: var(--g-b); }
.t-c { background: var(--g-c); }
.g-tier-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; padding: 10px; }
.g-tier-item { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; font-size: 14px; }

.g-box { border-radius: 8px; padding: 0 14px 8px; margin: 10px 0; border: 2px solid; }
.g-box ul { margin: 6px 0 0; padding-left: 20px; }
.g-box.ok { border-color: var(--ok); background: var(--ok-soft); }
.g-box.ng { border-color: var(--ng); background: var(--ng-soft); }
.g-box-head { display: inline-block; color: #fff; font-weight: 700; font-size: 13px; padding: 1px 12px; border-radius: 0 0 6px 6px; margin-bottom: 4px; }
.g-box.ok .g-box-head { background: var(--ok); }
.g-box.ng .g-box-head { background: var(--ng); }
.g-practice { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 600; background: var(--accent); color: #fff; padding: 3px 12px; border-radius: 999px; text-decoration: none; }

.g-timebar { display: flex; height: 34px; border-radius: 6px; overflow: hidden; font-size: 11px; color: #fff; margin: 8px 0; }
.g-timebar span { display: flex; align-items: center; justify-content: center; padding: 0 4px; white-space: nowrap; overflow: hidden; }
.g-timebar .c0 { background: #3a8fd8; }
.g-timebar .c1 { background: #2fae7a; }
.g-timebar .c2 { background: #f08a24; }
.g-timebar .c3 { background: #d8603a; }
.g-timebar .c4 { background: #8a5bd1; }

.g-chart { display: flex; flex-direction: column; }
.g-step { display: grid; grid-template-columns: 76px 1fr; border: 2px solid var(--accent); border-radius: 10px; overflow: hidden; }
.g-step-no { background: var(--accent); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.g-step-body { padding: 10px 14px; }
.g-step-body ul { margin: 6px 0 0; padding-left: 20px; font-size: 14px; }
.g-step-range { font-size: 18px; font-weight: 700; }
.g-step-goal { font-weight: 600; margin-top: 4px; }
.g-arrow { text-align: center; color: var(--accent); font-size: 20px; line-height: 1.4; }

.g-daily { display: grid; gap: 8px; }
.g-daily-item { display: grid; grid-template-columns: 90px 1fr; gap: 10px; align-items: center; background: var(--surface-2); border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.g-daily-slot { font-weight: 700; text-align: center; border-right: 2px solid var(--border); }
.g-daily-slot small { display: block; color: var(--muted); font-weight: 400; }

.g-materials { display: grid; gap: 10px; }
.g-material { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: start; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.g-rank { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--surface-2); font-weight: 800; }
.g-rank.r1 { background: linear-gradient(135deg, #f7d774, #c9971c); color: #fff; }
.g-rank.r2 { background: linear-gradient(135deg, #e3e6ea, #9aa3ad); color: #fff; }
.g-rank.r3 { background: linear-gradient(135deg, #e9b48a, #a86a3d); color: #fff; }

.g-faq { border: 1px solid var(--border); border-radius: 8px; padding: 4px 14px; margin: 8px 0; }
.g-faq summary { font-weight: 600; color: var(--text); }
.g-faq div { padding: 4px 0 10px; font-size: 14px; }
.g-src-box { border: 1px solid var(--border); border-radius: 8px; padding: 4px 14px; }
.g-src-box summary { font-size: 14px; }
.g-sources { font-size: 13px; padding-left: 22px; }
.first-chip { background: var(--g-s); color: #fff; font-weight: 600; }
.g-sources li { scroll-margin-top: 70px; margin-bottom: 4px; word-break: break-all; }

.g-side { position: sticky; top: 70px; display: grid; gap: 14px; }
.g-side-box { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; font-size: 13px; }
.g-side-head { background: var(--g-head); color: #fff; font-weight: 700; padding: 6px 12px; }
.g-side a { display: block; padding: 6px 12px; border-top: 1px solid var(--border); color: var(--text); }
.g-side a:hover { background: var(--accent-soft); }

.g-banner { display: flex; gap: 14px; align-items: center; text-decoration: none; color: #fff; background: linear-gradient(120deg, var(--g-head), #3b4f7d); border-left: 6px solid var(--g-s); border-radius: 12px; padding: 16px 18px; margin-bottom: 20px; }
.g-banner b { font-size: 18px; display: block; }
.g-banner span { font-size: 13px; opacity: .85; }
.g-banner .g-banner-tag { background: var(--g-s); border-radius: 6px; padding: 2px 8px; font-weight: 700; font-size: 12px; opacity: 1; white-space: nowrap; }

@media (max-width: 860px) {
  .g-wrap { grid-template-columns: 1fr; }
  .g-side { position: static; }
  .g-main { padding: 14px; }
  .g-toc ol { columns: 1; }
  .g-tier-row { grid-template-columns: 56px 1fr; }
  .g-title { font-size: 21px; }
  .g-h2, .g-part, .g-sources li { scroll-margin-top: 110px; }
  .g-step { grid-template-columns: 58px 1fr; }
  .g-step-no { font-size: 12px; align-items: flex-start; padding-top: 14px; }
  .g-tier-badge { justify-content: flex-start; padding-top: 12px; }
}
