/* 子頁面（世界頁 worlds/、圖鑑頁 bestiary/；site/kit.py 的外殼）：接在 home.css 後面載入，卡片（.bug、.wfig、.range…）用 home.css 的。 */
.subpage .nav { position: static; }
.subpage .sticky { transform: none; }
.crumb { padding: 4px max(20px, calc((100% - 1120px) / 2)) 0; font-size: 14px; color: var(--muted); }
.crumb ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.crumb li + li::before { content: "›"; margin-right: 8px; }
.page-head { padding: 26px max(20px, calc((100% - 1120px) / 2)) 40px; }
.page-head h1 { margin: 0 0 14px; font: 800 clamp(32px, 4.6vw, 54px)/1.08 var(--display); letter-spacing: -.01em; text-wrap: balance; text-shadow: 0 3px 0 var(--ink); }
.page-head .lead { max-width: 46em; margin-bottom: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.toc a {
  display: block; padding: 9px 14px 8px; border-radius: 999px; font: 700 14px/1.2 var(--body); color: #fff; text-decoration: none;
  background: var(--panel); border: 2px solid var(--ink);
}
.toc a:hover { background: var(--panel2); }

main.page > section { padding-top: 60px; padding-bottom: 60px; border-top: 2px solid rgba(255, 255, 255, .08); }
main.page > section.final { padding-top: 90px; padding-bottom: 120px; border-top: 0; }
.world h2 { margin-bottom: 10px; }
.world .sub { margin-bottom: 26px; }
.world h3 { margin: 44px 0 16px; font-size: 26px; line-height: 1.15; font-weight: 800; }
.wfig.wide { aspect-ratio: 16 / 5; border: 4px solid var(--ink); border-radius: 26px; box-shadow: 0 8px 0 var(--ink); }
.wfig.wide .wh { left: 24%; width: 14%; bottom: 8%; }
.wfig.wide .wq { right: 20%; width: 12%; bottom: 8%; }
.biomes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.biomes li { position: relative; overflow: hidden; border: 3px solid var(--ink); border-radius: 14px; }
.biomes img { display: block; width: 100%; height: auto; }
.biomes span { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(20, 15, 51, .72); }

.mech { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 0; }
.mech div { padding: 16px 18px; background: var(--panel); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); }
.mech dt { font: 800 19px/1.25 var(--display); }
.mech dt small { display: block; margin-top: 2px; font: 700 13px/1.3 var(--body); color: var(--gold); }
.mech dd { margin: 8px 0 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

.qcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.qcard { padding: 14px 14px 16px; text-align: center; background: var(--panel); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 6px 0 var(--ink); }
.qcard img { width: 136px; max-width: 80%; height: auto; }
.qcard h4 { margin: 4px 0 2px; font: 800 19px/1.2 var(--display); overflow-wrap: anywhere; }
.qcard h4 a { color: inherit; text-decoration: none; }
.skills { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.skills li { padding: 4px 10px; border-radius: 999px; font-size: 13px; line-height: 1.3; background: rgba(20, 15, 51, .5); border: 2px solid rgba(255, 255, 255, .14); }

.hive-row { display: flex; align-items: center; gap: 20px; }
.hive-row img { flex: none; width: 104px; height: 104px; }
.hive-row p { margin: 0 0 6px; max-width: 46em; color: var(--muted); }
.hive-row p:first-child { color: var(--text); }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 14px; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.legend li::before, .lvls li::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: var(--dot, #8f86c4); }
.lvls { columns: 4 220px; column-gap: 28px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.lvls li { break-inside: avoid; padding: 4px 0; overflow-wrap: anywhere; }
.lvls b { display: inline-block; min-width: 2em; font-variant-numeric: tabular-nums; color: var(--muted); }
.k-boss { --dot: #ff4d6d; }
.k-gold { --dot: #ffd23f; }
.k-defend { --dot: #63d977; }
.k-rush { --dot: #4fb3ff; }
.lvls .k-boss { font-weight: 700; }

.more-row p { max-width: 46em; margin: 0; color: var(--muted); }
.more-row .more { margin-top: 20px; }
.more-row p + .more { margin-top: 24px; }
.cross { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 26px 0 0; }

@media (max-width: 900px) {
  .page-head { padding-bottom: 28px; }
  main.page > section { padding-top: 44px; padding-bottom: 44px; }
  .wfig.wide { aspect-ratio: 16 / 9; border-radius: 20px; }
  .wfig.wide .wh { left: 30%; width: 26%; }
  .wfig.wide .wq { right: 8%; width: 22%; }
  .mech { grid-template-columns: 1fr; }
  .qcards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .qcard { padding: 10px 8px 14px; }
  .qcard h4 { font-size: 16px; }
  .lvls { columns: 2; column-gap: 14px; font-size: 13.5px; }
  .hive-row img { width: 76px; height: 76px; }
}
