/*
 * マビノギモバイル攻略ガイド
 * 参考：イナクロ攻略ガイド（紙白ベース、墨の太罫、段差の影、英字キッカー、斜線ライン）
 * 配色はマビノギ向けに「ワインレッド × 金 × 墨 × 紙白」。
 */
:root {
  color-scheme: light;
  --paper: #f1ece1;
  --paper-2: #e8e1d2;
  --panel: #f6f2e9;
  --surface: #fbf9f3;
  --ink: #17130d;
  --ink-soft: #5c5346;
  --ink-faint: #7d7364;
  --line: #d8cdb8;
  --line-strong: #241f17;
  --accent: #a82a22;
  --accent-deep: #7a1c16;
  --gold: #e3a62a;
  --gold-soft: #f6e3b8;
  --cool: #1f5fa8;
  --epic: #7444b8;
  --legend: #b26d0c;
  --header-h: 60px;
  --font-display: "M PLUS 1p", system-ui, sans-serif;
  --font-body:
    system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    "BIZ UDPGothic", "Yu Gothic", "Noto Sans JP", sans-serif;
  --font-num: "Anton", "Impact", sans-serif;
}

/* Class guide index and equipment explanations. Existing fonts are retained. */
.build-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}
.build-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.build-link:hover {
  border-color: var(--accent);
  background: var(--panel);
}
.build-link b, .build-link small {
  display: block;
}
.build-link small {
  color: var(--ink-soft);
  font-size: 12.5px;
}
.build-actions, .build-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 16px 0;
}
.build-jumps a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  background: var(--surface);
}
.gear-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
}
.gear-group, .gear-list, .gear-list > li {
  min-width: 0;
  overflow-wrap: anywhere;
}
.gear-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.gear-list > li + li {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.gear-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.gear-effect, .gear-reason {
  margin: 7px 0 0;
  font-size: 13.5px;
  line-height: 1.75;
}
.gear-reason {
  color: var(--ink-soft);
}
.gear-effect > span, .gear-reason > span {
  display: inline-block;
  margin-right: 7px;
  font-weight: 700;
  color: var(--ink);
}
/* A part label and complete recommendation cards retain the two-column guide.
   Cards have natural height; no clipping or ad-frame overrides are applied. */
.equipment-guide {
  border: 1.5px solid var(--line-strong);
  background: #fff;
  min-width: 0;
}
.equipment-part {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  min-width: 0;
}
.equipment-part + .equipment-part {
  border-top: 1.5px solid var(--line-strong);
}
.equipment-part-title {
  margin: 0;
  padding: 12px 10px;
  border-right: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.equipment-recommendations {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  min-width: 0;
  padding: 14px 12px;
}
.equipment-group, .equipment-card {
  min-width: 0;
  overflow-wrap: anywhere;
}
.equipment-group + .equipment-group,
.equipment-card + .equipment-card {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.equipment-card + .equipment-card { margin-top: 16px; }
.equipment-priority {
  display: block;
  margin-bottom: 5px;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.5;
}
.equipment-title { margin: 0; }
.equipment-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
}
.equipment-facts { margin: 7px 0 0; }
.equipment-facts > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 7px;
  margin-top: 7px;
  font-size: 13.5px;
  line-height: 1.75;
}
.equipment-facts dt { color: var(--ink); font-weight: 700; }
.equipment-facts dd { margin: 0; min-width: 0; }
.equipment-reason, .equipment-fallback, .equipment-note { color: var(--ink-soft); }
.equipment-facts > .equipment-fallback {
  display: block;
  font-size: 13px;
}
.equipment-fallback dt, .equipment-fallback dd { display: inline; }
.equipment-fallback dt::after { content: '：'; }
.equipment-note { margin: 8px 0 0; font-size: 13px; line-height: 1.7; }
@media (max-width: 560px) {
  .equipment-part { grid-template-columns: minmax(0, 1fr); }
  .equipment-part-title {
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 560px) {
  .build-page .tbl table, .build-page .tbl tbody,
  .build-page .tbl tbody tr, .build-page .tbl tbody th,
  .build-page .tbl tbody td {
    display: block;
    width: 100%;
  }
  .build-page .tbl thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .build-page .tbl tbody th {
    border-right: 0;
    padding: 10px 12px;
  }
  .build-page .tbl tbody td {
    padding: 14px 12px;
  }
}
.rune .ds {
  white-space: pre-line;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: auto;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}
body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(
    rgba(23, 19, 13, 0.035) 1px,
    transparent 1px
  );
  background-size: 4px 4px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Google reports an empty slot explicitly. Keep pending and filled ads intact.
   https://support.google.com/adsense/answer/10762946 */
ins.adsbygoogle[data-ad-status="unfilled"] {
  display: none !important;
}
.google-auto-placed:has(> ins.adsbygoogle[data-ad-status="unfilled"]):not(:has(ins.adsbygoogle:not([data-ad-status="unfilled"]))) {
  display: none !important;
}
::selection {
  background: var(--gold);
  color: var(--ink);
}
a {
  color: var(--accent-deep);
  text-underline-offset: 3px;
}
button {
  font: inherit;
  color: inherit;
}
:where(a, button, input, select, summary):focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 7px var(--gold);
}
.num {
  font-family: var(--font-num);
  font-weight: 400;
  letter-spacing: 0.02em;
  font-feature-settings: "tnum" 1;
}

/* ---------- マストヘッド ---------- */
.mast {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--ink);
  color: #fff;
}
.mast-inner {
  height: calc(var(--header-h) - 5px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  min-width: 0;
}
.logo-mark {
  width: 30px;
  height: 30px;
  flex: none;
  display: block;
}
.logo b {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: 0.02em;
}
.logo small {
  display: block;
  font-size: 11px;
  color: #d8cdb8;
  line-height: 1.2;
}
.menu-btn {
  margin-left: auto;
  flex-shrink: 0;
  width: 94px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid #fff;
  color: #fff;
  padding: 6px 12px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.slash-rule {
  height: 5px;
  background: repeating-linear-gradient(
    -45deg,
    var(--accent) 0 10px,
    var(--accent-deep) 10px 20px
  );
}

/* ---------- 骨組み ---------- */
.shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: calc(100vh - var(--header-h));
}
.side {
  position: sticky;
  top: var(--header-h);
  align-self: start;
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  border-right: 2px solid var(--line-strong);
  background: rgba(241, 236, 225, 0.92);
  padding: 14px 10px 28px;
}
.nav-group {
  margin-bottom: 10px;
}
.nav-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 6px 4px;
  font-size: 12px;
  font-weight: 900;
  color: var(--accent-deep);
  letter-spacing: 0.06em;
}
.nav-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.nav-link {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 7px 10px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.nav-link:hover {
  background: var(--paper-2);
}
.nav-link[aria-current="page"] {
  background: var(--ink);
  color: #fff;
}
.nav-sub {
  margin: 2px 0 6px 12px;
  border-left: 2px solid var(--line);
}
.nav-sub a {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--ink-soft);
}
.nav-sub a:hover {
  color: var(--ink);
  background: var(--paper-2);
}

main {
  min-width: 0;
  padding: 22px 28px 64px;
}
.page {
  max-width: 880px;
  margin: 0 auto;
  animation: fade 0.2s ease;
}
.article-page { position: relative; }
.desktop-contents { display: none; }

/* Desktop navigation and reading stay together; comparisons use extra width. */
@media (min-width: 900px) {
  .mast-inner { max-width: 1440px; margin-inline: auto; }
  .shell { max-width: 1200px; margin-inline: auto; grid-template-columns: 220px minmax(0, 1fr); }
  .side { padding-inline: 8px; }
  .side .nav-label { margin-top: 8px; font-size: 11.5px; }
  .side .nav-link { padding: 6px 9px; font-size: 14px; line-height: 1.55; }
  .shell:has(.comparison-page) { max-width: 1800px; }
  .comparison-page { max-width: none; }
  .comparison-page > .article-intro,
  .comparison-page > .panel:not(.comparison-section),
  .comparison-page > .rel { max-width: 880px; margin-inline: auto; }
  .comparison-page > .comparison-section { max-width: none; }
}
@media (min-width: 1400px) {
  .shell { max-width: 1440px; }
  .shell #main > .page:not(.article-page) { max-width: 1124px; }
  .article-page.has-outline:not(.comparison-page) {
    width: calc(100% - 244px);
    max-width: 880px;
    margin-left: 0;
    margin-right: 244px;
  }
  .article-page.has-outline:not(.comparison-page) > .article-intro > .page-contents { display: none; }
  .article-page:not(.comparison-page) > .desktop-contents {
    display: block;
    position: absolute;
    left: calc(100% + 24px);
    top: 0;
    width: 220px;
    height: 100%;
  }
  .desktop-contents nav {
    position: sticky;
    top: calc(var(--header-h) + 22px);
    max-height: calc(100vh - var(--header-h) - 44px);
    overflow-y: auto;
    border-left: 2px solid var(--line);
    padding-left: 15px;
  }
  .desktop-contents h2 { margin: 0 0 8px; font-size: 14px; }
  .desktop-contents ol { margin: 0; padding: 0; list-style: none; }
  .desktop-contents li + li { margin-top: 3px; }
  .desktop-contents a { display: block; padding: 7px 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; text-decoration: none; overflow-wrap: anywhere; }
  .desktop-contents a:hover { color: var(--accent-deep); text-decoration: underline; }
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- ページ見出し ---------- */
.crumb {
  font-size: 12.5px;
  color: var(--ink-soft);
  font-weight: 700;
  margin-bottom: 14px;
}
.crumb a {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  color: var(--ink-soft);
  font-weight: 700;
}
.crumb a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.crumb span {
  margin: 0 6px;
  color: var(--ink-faint);
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-weight: 900;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.kicker::before {
  content: "";
  width: 0.65em;
  height: 0.65em;
  background: var(--accent);
  transform: skewX(-14deg);
}
.kicker.on-dark {
  color: var(--gold);
}
h1.title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.15;
  margin: 6px 0 8px;
}
.meta {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 0 0 6px;
}
.lead {
  margin: 0 0 14px;
  color: var(--ink);
}
.rule {
  height: 5px;
  margin: 16px 0 18px;
  background: repeating-linear-gradient(
    -45deg,
    var(--accent) 0 10px,
    var(--accent-deep) 10px 20px
  );
}

/* 目次カード（ページ内の節へ飛ぶ） */
.jump-title {
  font-weight: 900;
  font-size: 14px;
  margin: 0 0 8px;
}
.page-contents {
  margin-top: 18px;
}
.page-contents .jumps {
  margin-bottom: 8px;
}
.contents-return {
  display: none;
}
.jumps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  gap: 10px;
  margin-bottom: 26px;
}
.jump {
  text-align: left;
  cursor: pointer;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-items: center;
  gap: 4px 8px;
  min-height: 44px;
  transition:
    transform 0.08s,
    box-shadow 0.08s;
}
.jump:hover {
  box-shadow: 3px 3px 0 var(--line-strong);
  transform: translate(-1px, -1px);
}
.jump .ja {
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
}
.jump .jt {
  font-weight: 900;
  font-size: 15.5px;
  line-height: 1.35;
}
.jump .js {
  grid-column: 1 / -1;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.45;
}

/* 節パネル */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 20px 20px 22px;
  margin-bottom: 22px;
}
h2.sec-h {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 21px;
  line-height: 1.3;
  margin: 0 0 6px;
}
h2.sec-h::before {
  content: "";
  width: 5px;
  align-self: stretch;
  min-height: 1.1em;
  background: var(--accent);
}
.sec-desc {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 15px;
}
h3.sub-h {
  font-size: 16.5px;
  font-weight: 900;
  margin: 18px 0 8px;
}

/* ---------- 印刷物カード ---------- */
.pcard {
  background: var(--surface);
  border: 2px solid var(--line-strong);
  box-shadow: 4px 4px 0 var(--line-strong);
  padding: 16px 18px;
}
.pcard + .pcard {
  margin-top: 16px;
}
.pcard.thin {
  box-shadow: none;
  border-width: 1.5px;
}
.pcard h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 19px;
  margin: 0;
  line-height: 1.3;
}
.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-bottom: 4px;
}
.card-head .k {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--accent-deep);
}
.flavor {
  font-size: 13.5px;
  color: var(--ink-faint);
  margin: 0 0 10px;
}
.grid2 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
}
.grid3 {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}
.grid2 > .pcard + .pcard,
.grid3 > .pcard + .pcard {
  margin-top: 0;
}

/* 推奨レベルの箱 */
.lv-boxes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1.5px solid var(--line-strong);
  margin: 8px 0 12px;
  background: #fff;
}
.lv-box {
  padding: 6px 10px 4px;
  border-right: 1.5px solid var(--line-strong);
}
.lv-box:last-child {
  border-right: 0;
}
.lv-box .l {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
.lv-box .v {
  font-family: var(--font-num);
  font-size: 26px;
  line-height: 1.1;
}
.lv-box .v small {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  margin-right: 3px;
  color: var(--ink-soft);
}
.lv-box .v.none {
  color: var(--ink-faint);
  font-size: 20px;
}
.lv-box.n {
  border-top: 4px solid #4c8a3f;
}
.lv-box.h {
  border-top: 4px solid var(--gold);
}
.lv-box.vh {
  border-top: 4px solid var(--accent);
}

/* 見出し付きの小ブロック */
.block-t {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 12px 0 6px;
}

/* ---------- タグ・バッジ ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  padding: 0.42em 0.6em;
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  white-space: nowrap;
}
.tag.ink {
  background: var(--ink);
  color: var(--paper);
}
.tag.gold {
  background: var(--gold);
  color: var(--ink);
}
.tag.red {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-deep);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1;
  padding: 0.38em 0.55em;
  border: 1.5px solid currentColor;
  white-space: nowrap;
  background: #fff;
}
.g-エピック {
  color: var(--epic);
}
.g-伝説 {
  color: var(--legend);
}
.badge.tagk {
  color: var(--ink-soft);
  border-style: dashed;
}
.badge.jp {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent-deep);
}

/* ---------- 表 ---------- */
.tbl {
  overflow-x: auto;
  border: 1.5px solid var(--line-strong);
  background: #fff;
}
.tbl table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
}
.tbl th {
  background: var(--paper-2);
  font-size: 12px;
  font-weight: 900;
  color: var(--ink-soft);
  text-align: left;
  padding: 7px 10px;
  border-bottom: 1.5px solid var(--line-strong);
  white-space: nowrap;
}
.tbl td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  white-space: pre-line;
}
.tbl tbody th {
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}
.mobile-col-label {
  display: none;
}
.tbl tr:last-child td {
  border-bottom: 0;
}
.tbl .r {
  text-align: right;
  white-space: nowrap;
}
.tbl td.r {
  font-family: var(--font-num);
  font-size: 17px;
}
.tbl td.b {
  font-weight: 700;
}
.tbl td.accessory-cell {
  white-space: normal;
}
.accessory-group + .accessory-group {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.accessory-group .accessory-priority,
.gear-group .accessory-priority {
  margin: 0 0 5px;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.5;
}
.accessory-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.accessory-list li + li {
  margin-top: 10px;
}
.accessory-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.accessory-slot {
  color: var(--ink-soft);
  font-size: 11px;
  white-space: nowrap;
}
.accessory-list .accessory-summary,
.accessory-fallback,
.accessory-group .accessory-note,
.gear-group .accessory-note {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.accessory-group .accessory-note,
.gear-group .accessory-note {
  margin-top: 8px;
}
@media (max-width: 560px) {
  /* Read one complete record at a time instead of squeezing prose into columns. */
  .responsive-table {
    overflow-x: visible;
  }
  .responsive-table table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table tbody th,
  .responsive-table td {
    display: block;
    width: auto;
  }
  .responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .responsive-table tbody tr + tr {
    border-top: 1.5px solid var(--line-strong);
  }
  .responsive-table tbody th {
    padding: 10px 12px;
    font-size: 14.5px;
    line-height: 1.6;
    border-bottom: 1px solid var(--line);
  }
  .responsive-table td {
    padding: 10px 12px;
    border-bottom: 0;
    font-size: 15px;
    line-height: 1.75;
    overflow-wrap: anywhere;
  }
  .responsive-table td + td {
    padding-top: 0;
  }
  .responsive-table .mobile-col-label {
    display: block;
    margin-bottom: 3px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
    white-space: normal;
  }
  .accessory-table table,
  .accessory-table tbody,
  .accessory-table tr,
  .accessory-table tbody th,
  .accessory-table td {
    display: block;
  }
  .accessory-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .accessory-table tbody th {
    padding: 8px 10px;
    white-space: normal;
    font-size: 14px;
  }
  .accessory-table td.accessory-cell {
    padding: 10px;
  }
}

/* リスト */
ul.list {
  margin: 0;
  padding-left: 1.15em;
}
ul.list li {
  margin: 5px 0;
}
ul.list li::marker {
  color: var(--accent);
}

/* 定義リスト */
.defs {
  display: grid;
  gap: 10px;
}
.tbl + .defs {
  margin-top: 14px;
}
.def {
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  padding: 10px 14px;
}
.def b, .def dt {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
  font-weight: 700;
}
.def p, .def dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  white-space: pre-line;
}
.def p + p {
  margin-top: 8px;
}
.def-paragraphs { margin: 0; }

/* パターン（技の説明） */
.pats {
  display: grid;
  gap: 8px;
}
.pat {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink);
  padding: 9px 12px;
}
.pat b {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}
.pat span {
  font-size: 14.5px;
  color: var(--ink-soft);
}

/* 折りたたみ */
details.acc {
  background: var(--surface);
  border: 2px solid var(--line-strong);
  margin-bottom: 12px;
}
details.acc > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
details.acc > summary::-webkit-details-marker {
  display: none;
}
details.acc > summary .t {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
}
details.acc > summary .s {
  font-size: 13px;
  color: var(--ink-soft);
}
details.acc > summary::after {
  content: "▼";
  margin-left: auto;
  font-size: 11px;
  color: var(--accent);
}
details.acc[open] > summary::after {
  content: "▲";
}
details.acc[open] > summary {
  border-bottom: 1.5px solid var(--line-strong);
}
details.acc > .in {
  padding: 14px 16px 16px;
  display: grid;
  gap: 4px;
}

.note {
  background: var(--gold-soft);
  border: 1.5px solid var(--line-strong);
  padding: 10px 14px;
  font-size: 14.5px;
  margin: 14px 0 0;
}
.note b {
  color: var(--accent-deep);
}

/* セグメント（切り替えボタン） */
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.seg button {
  cursor: pointer;
  font-weight: 700;
  font-size: 13.5px;
  padding: 6px 12px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
}
.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}
.seg button:hover:not([aria-pressed="true"]) {
  background: var(--paper-2);
}

/* ---------- ホーム ---------- */
.home-steps {
  list-style: none;
  counter-reset: home-step;
  margin: 16px 0 0;
  padding: 0;
}
.home-steps > li {
  counter-increment: home-step;
  position: relative;
  padding-left: 38px;
}
.home-steps > li + li {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.home-steps h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.5; }
.home-steps h3::before {
  content: counter(home-step, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--accent-deep);
  font-weight: 900;
}
.home-steps p { margin: 0; font-size: 14px; line-height: 1.8; }
.home-step-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 4px; }
.home-step-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 700; text-underline-offset: 3px; }
.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  border: 2px solid var(--line-strong);
  padding: 30px 26px 28px;
  margin-bottom: 20px;
}
.hero::after {
  content: "";
  position: absolute;
  top: -20px;
  bottom: -20px;
  right: -40px;
  width: 170px;
  background: linear-gradient(
    90deg,
    var(--accent) 0 58%,
    transparent 58% 66%,
    var(--gold) 66% 76%,
    transparent 76%
  );
  transform: skewX(-16deg);
  pointer-events: none;
}
.hero > * {
  position: relative;
  z-index: 1;
  max-width: 560px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(30px, 6.5vw, 46px);
  line-height: 1.12;
  margin: 8px 0 12px;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold);
}
.hero p {
  margin: 0 0 18px;
  color: #e5ddcd;
  font-size: 15px;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 900;
  font-size: 14.5px;
  border: 2px solid #fff;
  background: transparent;
  color: #fff;
}
.btn.primary {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

.strip {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  border-left: 6px solid var(--accent);
  margin-bottom: 26px;
}
.strip .lab {
  display: grid;
  place-items: center;
  padding: 0 14px;
  font-family: var(--font-num);
  font-size: 14px;
  letter-spacing: 0.08em;
  border-right: 1.5px solid var(--line-strong);
  color: var(--accent-deep);
}
.strip .body {
  padding: 10px 14px;
  font-size: 14.5px;
}
.strip .body b {
  display: block;
  font-size: 15.5px;
}

.sec-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
}
.sec-top h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  margin: 2px 0 0;
}
.sec-top .cnt {
  font-size: 13px;
  color: var(--ink-soft);
}
.sec-top .cnt b {
  font-family: var(--font-num);
  font-size: 18px;
  color: var(--ink);
  font-weight: 400;
  margin: 0 2px;
}
.ncards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 14px;
  margin-bottom: 30px;
}
.ncard {
  cursor: pointer;
  text-align: left;
  display: grid;
  grid-template-columns: 54px 1fr 28px;
  align-items: stretch;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  box-shadow: 4px 4px 0 var(--line-strong);
  padding: 0;
  transition:
    transform 0.08s,
    box-shadow 0.08s;
}
.ncard:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--line-strong);
}
.ncard:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--line-strong);
}
.ncard .no {
  background: var(--ink);
  color: var(--gold);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  font-family: var(--font-num);
  font-size: 19px;
}
.ncard .no i {
  font-style: normal;
  font-size: 15px;
}
.ncard .bd {
  padding: 10px 12px;
}
.ncard .bd b {
  display: block;
  font-size: 16.5px;
  line-height: 1.35;
}
.ncard .bd span {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-top: 2px;
}
.ncard .bd em {
  font-style: normal;
  font-family: var(--font-num);
  color: var(--accent);
  font-size: 14px;
}
.ncard .ar {
  display: grid;
  place-items: center;
  font-weight: 900;
}

.timeline {
  border-left: 3px solid var(--ink);
  margin-left: 6px;
}
.timeline > div {
  position: relative;
  padding: 0 0 14px 18px;
}
.timeline > div::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 7px;
  width: 13px;
  height: 13px;
  background: var(--accent);
  border: 2px solid var(--ink);
  transform: rotate(45deg);
}
.timeline .when {
  font-weight: 900;
  font-size: 13.5px;
  color: var(--accent-deep);
}
.timeline .what {
  font-size: 14.5px;
}
.timeline > div.out::before {
  background: var(--paper);
}
.timeline > div.out .what {
  color: var(--ink-faint);
}

/* ---------- ルーン ---------- */
.runes {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}
.rune {
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-top: 5px solid var(--line);
  padding: 9px 12px 11px;
}
.rune.g-エピック {
  border-top-color: var(--epic);
}
.rune.g-伝説 {
  border-top-color: var(--legend);
}
.rune .top {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-bottom: 4px;
}
.rune .nm {
  font-weight: 900;
  font-size: 16.5px;
  color: var(--ink);
  margin-right: 3px;
}
.rune .sk {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-deep);
  margin-bottom: 2px;
}
.rune .ds {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.empty {
  padding: 26px;
  text-align: center;
  color: var(--ink-faint);
  background: var(--surface);
  border: 1.5px dashed var(--line-strong);
}

/* フィールドボスのタイトル */
.title-box {
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  margin: 8px 0 10px;
}
.title-box .l {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--gold);
}
.title-box b {
  display: block;
  font-size: 15.5px;
}
.title-box span {
  font-size: 13px;
  color: #e5ddcd;
}

/* ---------- フッター ---------- */
.foot {
  border-top: 2px solid var(--line-strong);
  background: var(--paper-2);
  padding: 22px 0 36px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.foot .in {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px;
}
.foot h4 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 14.5px;
}
.foot ul {
  margin: 6px 0 12px;
  padding-left: 1.2em;
  columns: 2;
}
.foot p {
  margin: 0 0 8px;
}
.footer-links,
.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 12px 0 18px;
}
.footer-links a,
.legal-nav a {
  padding-block: 6px;
}
.footer-consent {
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.legal-shell {
  max-width: 940px;
  margin-inline: auto;
  padding: 24px 24px 56px;
  overflow-wrap: anywhere;
}
.legal-shell .title {
  font-size: clamp(24px, 4.8vw, 36px);
}
.legal-nav {
  font-size: 14px;
  margin-bottom: 28px;
}
.legal-nav [aria-current="page"] {
  color: var(--ink);
  font-weight: 800;
  text-decoration-thickness: 2px;
}

/* ---------- モバイルメニュー ---------- */
.mmenu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 40;
  background: var(--paper);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 12px 16px max(40px, env(safe-area-inset-bottom));
  border-top: 2px solid var(--line-strong);
}
.mmenu[hidden] {
  display: none;
}
.mmenu .links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.mmenu .nav-link {
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
}

@media (max-width: 899px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .side {
    display: none;
  }
  .menu-btn {
    display: inline-flex;
  }
  main {
    padding: 18px 16px 56px;
  }
  .panel {
    padding: 16px 14px 18px;
    margin-inline: -4px;
  }
  .foot ul {
    columns: 1;
  }
  .contents-return {
    display: flex;
    justify-content: flex-end;
    position: sticky;
    top: var(--header-h);
    z-index: 20;
    min-height: 44px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }
  .contents-return a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 6px 12px;
    color: var(--accent-deep);
    font-size: 14px;
    font-weight: 700;
    text-underline-offset: 3px;
  }
  .article-page > .panel {
    scroll-margin-top: 44px;
  }
  .list-target {
    scroll-margin-top: 44px;
  }
  .contents-return.has-list-jump {
    justify-content: space-between;
  }
}
@media (max-width: 560px) {
  .hero {
    padding: 20px 18px;
  }
  .hero h1 { font-size: 30.4px; line-height: 1.18; }
  .hero p { line-height: 1.65; margin-bottom: 16px; }
  .hero .cta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero .btn { justify-content: center; padding: 8px 6px; line-height: 1.4; }
  .hero .btn.primary { grid-column: 1 / -1; }
  .jumps { grid-template-columns: minmax(0, 1fr); gap: 0; border: 1.5px solid var(--line-strong); }
  .jump { grid-template-columns: minmax(0, 1fr) 16px; gap: 8px; padding: 10px 12px; border: 0; }
  .jump + .jump { border-top: 1px solid var(--line); }
  .jump .jt { font-size: 14px; line-height: 1.5; }
  .jump .js { display: none; }
  .hero::after {
    width: 90px;
    right: -46px;
  }
  .lv-box .v {
    font-size: 22px;
  }
  .pcard {
    padding: 14px 14px;
  }
  .ncard {
    grid-template-columns: 46px 1fr 24px;
  }
}
@media (max-width: 360px) {
  .hero h1 { font-size: 28px; }
  .mast-inner {
    gap: 8px;
    padding-inline: 12px;
  }
  .logo {
    gap: 8px;
  }
  .logo b {
    font-size: 15px;
  }
}
.mmenu .nav-link[aria-current="page"] {
  background: var(--ink);
  color: #fff;
}
.mmenu .nav-link { display: flex; align-items: center; min-height: 44px; }
.nav-name { min-width: 0; max-width: 100%; }
.nav-name-part { display: inline-block; max-width: 100%; vertical-align: top; }
button.tag.cls-link {
  cursor: pointer;
}
button.tag.cls-link:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- トップのグループ見出し・関連ページ・文中リンク ---------- */
.grp-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-weight: 900;
  font-size: 14px;
  color: var(--accent-deep);
}
.grp-label::before {
  content: "";
  width: 14px;
  height: 4px;
  background: var(--accent);
}
.grp-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.grp-label + .ncards {
  margin-bottom: 24px;
}
.rel {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 2px solid var(--line-strong);
}
.rel .ncards {
  margin-bottom: 0;
}
.rel .ncard .no i {
  font-size: 19px;
}
.inline-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 900;
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.inline-link:hover {
  color: var(--accent);
}

.section-copy {
  white-space: pre-line;
  margin: 12px 0 18px;
}
.guide-points { display: grid; gap: 10px; margin: 0; }
.guide-points > div { padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.guide-points > div:last-child { padding-bottom: 0; border-bottom: 0; }
.guide-points dt { font-size: 15px; font-weight: 800; }
.guide-points dd { margin: 3px 0 0; font-size: 14px; color: var(--ink-soft); }
.text-overview { margin: 18px 0; }
.text-overview .guide-points dd { font-size: 15px; line-height: 1.65; }
.guide-details-body > .guide-points { margin: 18px 0; }
.guide-steps { display: grid; gap: 10px; margin: 18px 0; padding: 0; list-style: none; }
.guide-steps > li { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 14px; border: 1px solid var(--line); background: var(--paper-2); }
.guide-step-number { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; background: var(--accent-deep); color: #fff; font-size: 15px; font-weight: 800; line-height: 1; }
.guide-steps li > div { min-width: 0; }
.guide-steps b { display: block; font-size: 16px; line-height: 1.5; }
.guide-steps p { margin: 4px 0 0; font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.guide-cards { display: grid; gap: 10px; margin: 18px 0; }
.guide-cards > div { min-width: 0; padding: 14px; border: 1px solid var(--line); background: var(--paper-2); }
.guide-cards dt { font-size: 16px; font-weight: 800; line-height: 1.5; }
.guide-cards dd { margin: 5px 0 0; font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.guide-checks dt::before { content: '✓'; margin-right: 8px; color: var(--accent-deep); }
.guide-example { display: block; margin: 8px 0; padding: 6px 8px; background: var(--surface); font-size: 14px; font-weight: 700; }
.guide-flows { display: grid; gap: 16px; margin: 18px 0; }
.guide-flow { min-width: 0; padding: 14px; border: 1px solid var(--line-strong); border-top: 4px solid var(--accent-deep); background: var(--paper-2); }
.guide-flow:first-child { border-top-color: #315a70; }
.guide-flow h3 { margin: 0; font-size: 18px; }
.guide-flow-steps { gap: 0; margin: 12px 0; }
.guide-flow-steps > li { align-items: center; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; }
.guide-flow-steps > li:last-child { border-bottom: 0; }
.guide-flow-steps .guide-step-number { flex-basis: 24px; width: 24px; height: 24px; font-size: 13px; }
.guide-flow:first-child .guide-step-number { background: #315a70; }
.guide-flow-steps b { font-size: 15px; }
.guide-flow-steps p { margin-top: 2px; font-size: 14px; }
.guide-flow-note { margin: 0; padding-top: 10px; border-top: 1px solid var(--line-strong); font-size: 14px; font-weight: 700; line-height: 1.65; }
@media (min-width: 700px) {
  .guide-checks, .guide-flows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-comparison, .guide-steps[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guide-steps[data-count="3"] > li { flex-direction: column; }
}
@media (min-width: 1100px) {
  .guide-steps[data-count="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .guide-steps[data-count="5"] > li { flex-direction: column; }
}
.list-jumps { margin: 18px 0; padding: 14px; border: 1.5px solid var(--line-strong); background: var(--paper-2); }
.list-jumps h3 { margin: 0 0 10px; font-size: 16px; }
.list-jump-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.list-jump-links a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.5; text-align: center; text-decoration: none; overflow-wrap: anywhere; }
.list-jump-links a:hover { border-color: var(--accent); background: var(--paper); }
.list-jump-links .dungeon-suffix, .list-jump-links .list-jump-suffix { display: inline-block; white-space: nowrap; }
.list-target:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.list-return { display: flex; align-items: center; width: fit-content; min-height: 44px; margin-top: 10px; color: var(--accent-deep); font-size: 14px; font-weight: 700; text-underline-offset: 3px; }
.dungeon-group, .table-group { margin-top: 28px; }
.dungeon-group h3, .table-group h3 { margin: 0 0 12px; font-size: 18px; }
.table-group + .table-group { padding-top: 20px; border-top: 1px solid var(--line); }
.living-cards { align-items: start; }
.living-points { display: grid; gap: 12px; margin: 14px 0 0; font-size: 15px; line-height: 1.7; }
.living-points dt { font-size: 13px; font-weight: 800; color: var(--accent-deep); }
.living-points dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.living-details { margin-top: 14px; border-top: 1px solid var(--line); }
.living-details summary { display: list-item; min-height: 44px; padding: 12px 0; font-size: 14px; font-weight: 700; cursor: pointer; }
.living-details summary::marker { color: var(--accent); }
.living-details summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.living-details-body { border-top: 1px solid var(--line); }
.living-details-body h4 { margin: 14px 0 6px; font-size: 13px; color: var(--accent-deep); }
.living-details-body ul { margin: 0; padding-left: 1.3em; font-size: 15px; line-height: 1.7; }
.living-details-body li + li { margin-top: 10px; }
@media (min-width: 640px) {
  .list-jump-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .list-jump-links { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.rune-classes { display: grid; gap: 10px; }
.rune-class { border: 1.5px solid var(--line-strong); background: var(--surface); }
.rune-class summary { cursor: pointer; padding: 12px 14px; min-height: 44px; }
.rune-class summary::marker { color: var(--accent); }
.rune-class summary b { font-size: 15px; }
.rune-class summary span { display: block; margin: 3px 0 0 18px; font-size: 13px; color: var(--ink-soft); line-height: 1.6; }
.rune-class-body { border-top: 1px solid var(--line); padding: 14px; }
.rune-class-body > .inline-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; }
.guide-notice { padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--surface); font-size: 14px; }
.tier-image { margin: 20px 0; }
.tier-image-open { display: block; border: 1px solid var(--line); background: #fff; }
.tier-image img { display: block; width: 100%; height: auto; }
.tier-image-viewport { overflow-x: auto; }
.tier-image-scale { accent-color: var(--accent-deep); width: 18px; height: 18px; vertical-align: middle; margin: 0 8px 0 0; }
.tier-image-scale-label { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 700; cursor: pointer; vertical-align: middle; }
.tier-image-scale:checked ~ .tier-image-viewport img { min-width: 1800px; }
.tier-image figcaption { margin-top: 8px; color: var(--ink-soft); font-size: 13px; }
.tier-image-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; }
.tier-image-actions a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent-deep); font-size: 14px; font-weight: 700; text-underline-offset: 3px; }
.tier-image a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tier-image-viewport:focus-visible, .class-matrix:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.class-matrix-shell { min-width: 0; scroll-margin-top: 0; }
.matrix-controls { position: sticky; top: var(--header-h); z-index: 15; padding: 10px; border: 1.5px solid var(--line-strong); border-bottom: 0; background: var(--panel); }
.matrix-controls-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; }
.matrix-controls button, .matrix-job-select { min-width: 0; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 0; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; }
.matrix-controls button { cursor: pointer; font-weight: 800; font-size: 20px; }
.matrix-controls button:disabled { opacity: .35; cursor: default; }
.matrix-job-select { width: 100%; padding: 6px 10px; }
.matrix-controls-info { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.matrix-position { white-space: nowrap; font-weight: 700; }
.matrix-hint { margin: 0 0 10px; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.matrix-controls:not([hidden]) + .matrix-hint { display: none; }
.matrix-controls :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.class-matrix { --matrix-label-width: 160px; --matrix-job-width: 148px; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scroll-behavior: auto; }
.class-matrix table { width: calc(var(--matrix-label-width) + 18 * var(--matrix-job-width)); table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.matrix-label-column { width: var(--matrix-label-width); }
.matrix-job-column { width: var(--matrix-job-width); }
.class-matrix th, .class-matrix td { width: var(--matrix-job-width); text-align: center; white-space: normal; overflow-wrap: anywhere; border-right: 1px solid var(--line); }
.class-matrix th { font-size: 14px; }
.class-matrix td { font-size: 16px; }
.class-matrix tr > :first-child { position: sticky; left: 0; z-index: 1; width: var(--matrix-label-width); background: var(--paper-2); text-align: left; }
.class-matrix thead th.is-current { box-shadow: inset 0 -3px var(--accent); color: var(--accent-deep); }
.class-matrix tbody tr:first-child td { background: var(--paper-2); font-size: 20px; font-weight: 800; }
.class-matrix tbody tr:nth-last-child(2) td { text-align: left; font-size: 14px; line-height: 1.7; }
@media (max-width: 899px) {
  .class-matrix-shell { scroll-margin-top: 40px; }
  .matrix-controls { top: calc(var(--header-h) + 44px); }
}
@media (max-width: 639px) {
  .class-matrix { --matrix-label-width: 92px; }
  .class-matrix tr > :first-child { padding: 8px; font-size: 12.5px; line-height: 1.5; }
  .class-matrix thead th { padding: 12px 8px; line-height: 1.5; }
  .class-matrix td { padding: 9px 8px; }
  .matrix-controls { padding: 8px; }
}
.guide-details { margin-top: 16px; border-top: 1px solid var(--line); }
.guide-details summary { padding: 14px 2px; font-weight: 700; cursor: pointer; }
.guide-details summary::marker { color: var(--accent); }
.guide-details-body { padding-bottom: 4px; }
.guide-destinations .ncard { position: relative; grid-template-columns: minmax(0, 1fr) auto; }
.reference-facts { display: grid; gap: 10px; margin: 18px 0; }
.reference-facts > div { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr); border: 1.5px solid var(--line-strong); background: var(--surface); }
.reference-facts dt { padding: 12px 14px; background: var(--paper-2); font-weight: 800; overflow-wrap: anywhere; }
.reference-facts dd { min-width: 0; margin: 0; padding: 12px 14px; overflow-wrap: anywhere; }
.reference-label { display: block; margin-bottom: 4px; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
@media (max-width: 560px) {
  .reference-facts > div { grid-template-columns: minmax(0, 1fr); }
  .reference-facts dt { border-bottom: 1px solid var(--line); }
}
.guide-anchor { position: absolute; top: 0; left: 0; scroll-margin-top: calc(var(--header-h) + 72px); }
.panel > .guide-anchor { position: static; display: block; }
.tags + h3 {
  margin-top: 12px;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 100;
  padding: 10px;
  background: var(--gold);
  color: var(--ink);
}
.skip-link:focus {
  top: 12px;
}
#catalog-count {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* Navigation remains available before JavaScript loads. */
.ncard, .jump { color: var(--ink); text-decoration: none; }
.btn { text-decoration: none; }
.nav-sub a, .crumb a { text-decoration: none; }

/* Rune recommendations are isolated from the class matrix and article tables. */
.rune-tier-board { display: grid; gap: 24px; margin-top: 20px; }
.rune-tier-group { min-width: 0; border: 1px solid var(--ink); background: #faf9f4; }
.rune-tier-group > h3 { margin: 0; padding: 12px 16px; background: #e8e4d7; font-size: 18px; }
.rune-tier-row { display: grid; grid-template-columns: 64px minmax(0,1fr); border-top: 1px solid #c8c3b5; }
.rune-tier-rank { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 10px 3px; }
.rune-tier-rank b { font-size: 28px; line-height: 1; }
.rune-tier-rank span { font-size: 11px; font-weight: 700; }
.rune-rank-s { color: #fff; background: #254f56; }
.rune-rank-ss { color: #fff; background: #23394e; }
.rune-rank-a { color: #fff; background: #62517b; }
.rune-rank-b { color: #332a1d; background: #d0bd94; }
.rune-tier-picks { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,190px),1fr)); gap: 8px; list-style: none; margin: 0; padding: 12px; }
.rune-tier-picks li { min-width: 0; }
.rune-tier-picks a { display: flex; flex-direction: column; justify-content: center; height: 100%; min-height: 64px; padding: 9px 12px; color: var(--ink); background: #fff; border: 1px solid #bdb8ab; text-decoration: none; overflow-wrap: anywhere; }
.rune-tier-picks strong { font-size: 15px; }
.rune-tier-picks small { margin-top: 3px; font-size: 12px; color: #56534d; line-height: 1.5; }
.rune-tier-picks a:hover { border-color: #254f56; background: #edf4f2; }
.rune-tier-picks a:focus-visible, .rune-tier-back:focus-visible { outline: 3px solid #254f56; outline-offset: 3px; }
.rune-tier-details { display: grid; gap: 16px; }
.rune-tier-entry, .rune-accessory-entry { min-width: 0; padding: 18px; border: 1px solid #c8c3b5; background: #fff; scroll-margin-top: calc(var(--header-h) + 65px); }
.rune-tier-entry:target, .rune-accessory-entry:target { border-color: #254f56; box-shadow: inset 4px 0 #254f56; }
.rune-tier-entry-heading { display: flex; gap: 12px; align-items: center; }
.rune-tier-entry-heading h4, .rune-tier-entry-heading h5 { margin: 0; font-size: 20px; }
.rune-tier-badge { display: grid; place-items: center; min-width: 34px; height: 34px; font-size: 21px; font-weight: 800; }
.rune-tier-condition { margin: 10px 0 12px; font-size: 14px; line-height: 1.7; }
.rune-tier-condition b { color: #254f56; margin-right: 5px; }
.rune-tier-axes { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 0; background: #f3f2ec; border: 1px solid #dedacf; }
.rune-tier-axes > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; }
.rune-tier-axes > div + div { border-left: 1px solid #dedacf; }
.rune-tier-axes dt { font-size: 12px; font-weight: 700; }
.rune-tier-axes dd { margin: 0; font-size: 20px; font-weight: 700; }
.rune-tier-reason { margin: 12px 0; font-size: 15px; line-height: 1.9; }
.rune-tier-back { font-size: 12px; color: #56534d; text-underline-offset: 3px; }
.rune-tier-explorer [hidden] { display: none !important; }
.rune-tier-controls { position: sticky; top: var(--header-h); z-index: 15; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; padding: 8px 0; background: var(--panel); }
.rune-tier-controls button { min-height: 44px; padding: 8px 4px; border: 1px solid #9b978d; background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; overflow-wrap: anywhere; }
.rune-tier-controls button[aria-pressed="true"] { color: #fff; background: #23394e; border-color: #23394e; }
.rune-tier-controls button:focus-visible, .rune-tier-job-control select:focus-visible { outline: 3px solid #254f56; outline-offset: 2px; }
.rune-tier-pane > h3, .rune-tier-job { scroll-margin-top: calc(var(--header-h) + 120px); }
.rune-tier-pane > h3 { margin: 14px 0 10px; font-size: 20px; }
.rune-tier-tap-hint, .rune-tier-accessory-intro { font-size: 13px; line-height: 1.8; }
.rune-tier-explorer .rune-tier-board { margin-top: 0; }
.rune-tier-picks a[aria-current="true"] { border: 2px solid #254f56; background: #edf4f2; padding: 8px 11px; }
.rune-tier-detail-label { margin: 24px 0 10px; font-size: 14px; color: var(--ink-soft); }
.rune-tier-job-control { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 12px; padding: 12px; border: 1px solid #c8c3b5; background: #e8e4d7; }
.rune-tier-job-control label { font-size: 14px; font-weight: 700; }
.rune-tier-job-control select { width: 100%; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid #9b978d; border-radius: 0; background: #fff; color: var(--ink); font: inherit; font-size: 16px; }
.rune-tier-job > h4 { margin: 18px 0 12px; font-size: 20px; }
.rune-accessory-entry { overflow-wrap: anywhere; }
.rune-tier-job .rune-tier-picks { grid-template-columns: repeat(2,minmax(0,1fr)); }
.rune-accessory-note { margin: 8px 0 12px; font-size: 14px; line-height: 1.8; }
.rune-accessory-note { border-top: 1px solid #dedacf; padding-top: 10px; color: var(--ink-soft); }
.rune-tier-guide-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 14px; font-size: 14px; }
@media (max-width: 600px) {
  .rune-tier-row { grid-template-columns: 42px minmax(0,1fr); }
  .rune-tier-picks { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; padding: 8px; }
  .rune-tier-picks:has(>li:only-child) { grid-template-columns: minmax(0,1fr); }
  .rune-tier-picks a { min-height: 56px; padding: 8px; }
  .rune-tier-picks a[aria-current="true"] { padding: 7px; }
  .rune-tier-picks strong { font-size: 14px; line-height: 1.5; }
  .rune-tier-picks small { font-size: 11px; }
  .rune-tier-entry, .rune-accessory-entry { padding: 14px; }
  .rune-tier-entry-heading h4, .rune-tier-entry-heading h5 { font-size: 18px; }
  .rune-tier-axes { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .rune-tier-axes > div { display: block; text-align: center; padding: 7px 2px; }
  .rune-tier-axes dt { font-size: 10px; }
  .rune-tier-axes dd { font-size: 18px; }
  .rune-tier-controls { top: calc(var(--header-h) + 44px); }
  .rune-tier-controls button { font-size: 11px; }
  .rune-tier-entry, .rune-accessory-entry { scroll-margin-top: calc(var(--header-h) + 130px); }
  .rune-tier-pane > h3, .rune-tier-job { scroll-margin-top: calc(var(--header-h) + 130px); }
  .rune-tier-job-control { grid-template-columns: minmax(0,1fr); gap: 6px; }
}

/* Only the requested equipment explanation uses these schematic figures. */
.equipment-diagrams { display: grid; gap: 24px; margin: 22px 0; }
.equipment-diagrams figure { min-width: 0; margin: 0; }
.equipment-diagrams img { display: block; width: 100%; max-width: 400px; height: auto; margin: 0 auto; }
.equipment-diagrams figcaption { margin-top: 12px; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
@media (min-width: 1100px) {
  .equipment-diagrams { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
/* Gathering settings: one recommended plan, with a separate material picker. */
.gn { margin: 24px 0 32px; min-width: 0; }
.gn [hidden] { display: none !important; }
.gn-selection { scroll-margin-top: calc(var(--header-h) + 16px); }
.gn-selection > span { display: block; font-size: 13px; font-weight: 800; margin-bottom: 8px; color: #6c352c; }
.gn-change { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; text-align: left; padding: 16px 18px; background: #fffdf7; border: 2px solid #312b20; color: #1b1812; cursor: pointer; font: inherit; }
.gn-change > span:first-child { display: grid; gap: 4px; }
.gn-change b { font-size: 24px; line-height: 1.35; }
.gn-change small { font-size: 12px; color: #665c4a; }
.gn-change > span:last-child { font-size: 12px; white-space: nowrap; font-weight: 800; }
.gn-change i { font-style: normal; color: #982e22; font-size: 20px; }
.gn-setting { margin-top: 16px; background: #211e17; color: #fff9e8; padding: 20px; border-top: 5px solid #b9892b; }
.gn-setting-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.gn-setting-top > span { color: #e6c780; font-weight: 800; }
.gn-setting-top > b { font-size: 12px; border: 1px solid #8d7e5f; padding: 4px 8px; }
.gn .gn-recipe-name { color: inherit; font-size: 22px; line-height: 1.6; margin: 14px 0 0; overflow-wrap: anywhere; }
.gn .gn-condition { font-size: 12px; color: #ded3b9; margin: 8px 0 0; line-height: 1.7; }
.gn-target { border-top: 1px solid #6a5e47; margin-top: 18px; padding-top: 14px; }
.gn-target > span { display: block; font-size: 12px; color: #ded3b9; }
.gn-target strong { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; font-size: 22px; line-height: 1.6; margin-top: 4px; }
.gn-target b { font-size: 38px; font-variant-numeric: tabular-nums; color: #efc66b; line-height: 1.3; white-space: nowrap; }
.gn .gn-indirect { font-size: 13px; line-height: 1.8; color: #eee4cb; margin: 12px 0 0; }
.gn .gn-quantity-note { font-size: 11px; color: #68604f; margin: 8px 0 0; line-height: 1.7; }
.gn select, .gn input[type=search] { font: inherit; color: #201c15; border: 1px solid #86785d; border-radius: 0; background: #fffdf8; max-width: 100%; min-width: 0; min-height: 46px; padding: 10px; }
.gn-method { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; background: #eae3d1; padding: 12px; margin-top: 18px; font-size: 12px; }
.gn-method > b { font-size: 14px; }
.gn-method > span:last-child:not(:nth-child(3)) { flex-basis: 100%; }
.gn-method select { font-size: 14px; min-height: 40px; padding: 6px; }
.gn .gn-note { border-left: 3px solid #ae7a20; background: #f3eddc; padding: 12px 14px; font-size: 13px; line-height: 1.9; margin: 12px 0 0; }
.gn-steps-title { font-size: 16px; margin: 24px 0 12px; }
.gn-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.gn-steps li { border-bottom: 1px solid #d7cdb9; padding: 0 0 12px; min-width: 0; }
.gn-steps b { display: block; font-size: 15px; line-height: 1.6; }
.gn-steps i { display: inline-block; font-style: normal; color: #a13928; margin-right: 8px; font-size: 13px; }
.gn-steps li > p { font-size: 13px; line-height: 1.9; margin: 5px 0 0; overflow-wrap: anywhere; }
.gn-alternates { margin-top: 20px; border: 1px solid #c9bda5; padding: 0 12px; }
.gn-alternates summary { cursor: pointer; font-size: 13px; font-weight: 800; padding: 14px 0; }
.gn-alternates label { display: block; font-size: 12px; margin: 0 0 6px; }
.gn-alternates select { width: 100%; font-size: 15px; margin-bottom: 12px; text-overflow: ellipsis; }
.gn .gn-limit { font-size: 12px; color: #6a6151; line-height: 1.8; }
.gn-picker { color: #201c15; background: #f6f0e4; border: 2px solid #332c20; padding: 20px; width: min(620px,calc(100vw - 24px)); max-height: calc(100dvh - 32px); box-sizing: border-box; overflow-y: auto; }
.gn-picker::backdrop { background: rgb(24 20 13 / .66); }
.gn-picker-top { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 18px; }
.gn-picker-top h3 { font-size: 22px; margin: 0; }
.gn-picker-top button { font: inherit; font-size: 24px; width: 44px; height: 44px; border: 1px solid #99886b; background: #fffaf0; cursor: pointer; }
.gn-picker > label { font-size: 13px; font-weight: 800; display: block; margin-bottom: 6px; }
.gn-picker input[type=search] { width: 100%; font-size: 16px; }
.gn-filter { display: flex !important; justify-content: space-between; align-items: center; gap: 16px; margin: 12px 0 0 !important; }
.gn-filter select { font-size: 14px; flex: 1; max-width: 230px; }
.gn-result-count { font-size: 12px; color: #71634e; margin: 16px 0 8px; }
.gn-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.gn-choices button { font: inherit; cursor: pointer; text-align: left; padding: 12px; border: 1px solid #af9e7d; background: #fffcf4; color: #211c15; display: flex; flex-direction: column; justify-content: center; gap: 5px; min-height: 72px; }
.gn-choices button b { font-size: 14px; line-height: 1.5; }
.gn-choices button span { font-size: 11px; color: #77664a; }
.gn button:hover { background: #f6e7c4; }
.gn button:focus-visible, .gn select:focus-visible, .gn input:focus-visible, .gn summary:focus-visible { outline: 3px solid #a13b25; outline-offset: 3px; }
@media (min-width: 700px) {
  .gn-setting { padding: 24px 28px; }
  .gn .gn-recipe-name { font-size: 27px; }
  .gn-target strong { font-size: 25px; }
  .gn-target b { font-size: 46px; }
  .gn-selection .gn-change { padding: 18px 24px; }
  .gn-steps { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
  .gn-steps li { border-bottom: 0; border-right: 1px solid #d7cdb9; padding-right: 14px; }
  .gn-steps li:last-child { border-right: 0; }
}
@media (max-width: 380px) {
  .gn-change { padding: 12px; gap: 8px; }
  .gn-change b { font-size: 21px; }
  .gn-setting { padding: 16px; }
  .gn .gn-recipe-name { font-size: 20px; }
  .gn-target strong { font-size: 20px; }
  .gn-target b { font-size: 34px; }
  .gn-picker { padding: 14px; }
  .gn-choices button { padding: 10px; }
}
