/* Star Savior fan codex. Visual language taken from the game's own UI and site:
   night-sky blue with falling stars and blue crystals, elegant serif display type,
   Noto Sans body, royal-blue accent, gold reserved for star ratings, thin white rules,
   diamond-framed icons and slanted parallelogram bars. */
:root {
  --sky-0: #050a1c;
  --sky-1: #0b1638;
  --sky-2: #16306d;
  --glow: #5cb8ff;
  --blue: #3d7cf2;
  --blue-hi: #8fc4ff;
  --gold: #f5c64a;
  --red: #e2404d;
  --text: #f2f5ff;
  --muted: #9aa7c7;
  --rule: rgba(255, 255, 255, 0.14);
  --rule-strong: rgba(255, 255, 255, 0.32);
  --panel: rgba(9, 16, 40, 0.72);
  --panel-hi: rgba(20, 34, 78, 0.55);
  --radius: 6px;
  --serif: "Cormorant Garamond", "Noto Serif KR", "Times New Roman", serif;
  --sans: "Noto Sans KR", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  color: var(--text);
  font: 14px/1.45 var(--sans);
  min-height: 100vh;
  background:
    radial-gradient(1400px 620px at 62% -12%, rgba(92, 184, 255, 0.42), transparent 62%),
    radial-gradient(900px 500px at 8% 4%, rgba(61, 124, 242, 0.25), transparent 60%),
    linear-gradient(180deg, var(--sky-2) 0%, var(--sky-1) 34%, var(--sky-0) 78%);
  background-attachment: fixed;
}
a { color: var(--blue-hi); }
::selection { background: var(--blue); color: #fff; }

/* sky layers */
#stars { position: fixed; inset: 0; z-index: -2; width: 100%; height: 100%; pointer-events: none; }
.crystals { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.crystal {
  position: absolute; width: var(--s); height: calc(var(--s) * 1.5);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: linear-gradient(135deg, rgba(160, 215, 255, .85), rgba(40, 90, 200, .55) 55%, rgba(10, 30, 90, .7));
  filter: drop-shadow(0 0 18px rgba(92, 184, 255, .7));
  opacity: .5;
  animation: drift var(--d) ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translateY(0) rotate(-8deg); }
  to   { transform: translateY(-26px) rotate(10deg); }
}
@media (prefers-reduced-motion: reduce) { .crystal { animation: none; } }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 34px;
  padding: 12px 28px;
  background: linear-gradient(180deg, rgba(5, 10, 28, .92), rgba(5, 10, 28, .62));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: #fff; }
.brand-title { font: italic 500 26px var(--serif); letter-spacing: .02em; white-space: nowrap; }
.brand-title b { font-weight: 600; font-style: normal; letter-spacing: .06em; }
.brand-sub { font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.tabs { display: flex; gap: 26px; flex: 1; }
.tabs a {
  position: relative; padding: 6px 0;
  font: 600 12px var(--sans); letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255, 255, 255, .75); text-decoration: none;
}
.tabs a:hover { color: #fff; }
.tabs a.on { color: var(--blue-hi); }
.tabs a.on::after {
  content: ""; position: absolute; left: -4px; right: -4px; bottom: -13px; height: 2px;
  background: var(--blue); box-shadow: 0 0 12px var(--glow);
}
.lang { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--rule); border-radius: 999px; }
.lang button {
  background: none; border: 0; color: var(--muted); padding: 4px 12px; border-radius: 999px;
  cursor: pointer; font: 600 11.5px var(--sans); letter-spacing: .06em;
}
.lang button.on { background: var(--blue); color: #fff; box-shadow: 0 0 12px rgba(61, 124, 242, .6); }
@media (max-width: 1000px) {
  .topbar { flex-wrap: wrap; gap: 12px 20px; }
  .brand-sub { display: none; }
}
/* Tab labels never break mid-label, and the language switch never gets squeezed. Six tabs (the hosted site adds
   Downloads) only fit beside the title from about 1300 px, so below that they get their own row, like on phones. */
.tabs a { white-space: nowrap; }
.lang { flex-shrink: 0; }
@media (max-width: 1280px) {
  .topbar { flex-wrap: wrap; row-gap: 10px; }
  .topbar .tabs { order: 3; flex-basis: 100%; }
  .tabs a.on::after { bottom: -2px; }
}
/* phones: the tab row would scroll sideways with no visible hint that Guides is there, so wrap it instead */
@media (max-width: 560px) {
  .topbar .tabs { flex-wrap: wrap; overflow-x: visible; row-gap: 10px; }
}

/* ---------------------------------------------------------------- layout */
main { padding: 22px 28px 48px; }
.foot { padding: 18px 28px 30px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--rule); background: rgba(5, 10, 28, .6); }

.layout { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  box-shadow: 0 14px 44px rgba(0, 0, 0, .35);
}
.panel > h3 {
  display: flex; align-items: center; gap: 10px;
  margin: 0; padding: 11px 16px 10px;
  font: 600 19px var(--serif); letter-spacing: .02em; color: #fff;
  border-bottom: 1px solid var(--rule);
}
.panel > h3::before {      /* blue tick, like the game's "| Default" headers */
  content: ""; width: 3px; height: 16px; background: var(--blue); box-shadow: 0 0 8px var(--glow);
}
.panel > h3 .ko-sub { font: 400 11.5px var(--sans); color: var(--muted); }

/* ---------------------------------------------------------------- roster */
.roster { position: sticky; top: 78px; max-height: calc(100vh - 96px); display: flex; flex-direction: column; }
.roster .filters { padding: 12px; display: flex; flex-direction: column; gap: 9px; border-bottom: 1px solid var(--rule); }
.search {
  width: 100%; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--rule-strong);
  background: rgba(0, 0, 0, .3); color: var(--text); font: inherit;
}
.search:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(61, 124, 242, .3); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px 2px 3px; border-radius: 999px; border: 1px solid var(--rule);
  background: rgba(255, 255, 255, .04); color: var(--muted); font: 500 11.5px var(--sans); cursor: pointer;
}
.chip img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.chip:hover { color: #fff; border-color: var(--rule-strong); }
.chip.on { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: 0 0 10px rgba(61, 124, 242, .5); }
.roster ul { list-style: none; margin: 0; padding: 6px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--sky-2) transparent; }
.roster li a {
  display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 4px;
  text-decoration: none; color: var(--text);
}
.roster li a:hover { background: rgba(255, 255, 255, .06); }
.roster li a.on { background: linear-gradient(90deg, rgba(61, 124, 242, .45), rgba(61, 124, 242, 0)); box-shadow: inset 3px 0 0 var(--blue-hi); }
.roster li img.face { width: 36px; height: 36px; border-radius: 4px; object-fit: cover; object-position: center 20%; border: 1px solid var(--rule); }
.roster li .nm { flex: 1; font-size: 13px; line-height: 1.2; }
.roster li .mini { width: 18px; height: 18px; border-radius: 50%; opacity: .9; }
.roster .count { padding: 7px 14px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--rule); letter-spacing: .06em; }

/* ---------------------------------------------------------------- savior hero */
.hero {
  display: flex; gap: 22px; align-items: center; padding: 18px 20px; margin-bottom: 18px; overflow: hidden;
  background: linear-gradient(100deg, rgba(22, 48, 109, .85), rgba(9, 16, 40, .75) 60%);
}
.hero::after {   /* falling-star streak */
  content: ""; position: absolute; right: 8%; top: -30%; width: 1.5px; height: 160%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .7), transparent);
  transform: rotate(32deg); opacity: .5; pointer-events: none;
}
.portrait-frame { position: relative; flex: none; }
.portrait-frame::before {   /* blue offset card shadow from the official site */
  content: ""; position: absolute; inset: 6px -6px -6px 6px; border-radius: 8px; background: var(--blue);
}
.portrait {
  position: relative; display: block; width: 116px; height: 116px; border-radius: 8px;
  object-fit: cover; object-position: center 20%; border: 1px solid rgba(255, 255, 255, .6);
}
.hero h1 { margin: 0; font: 600 44px/1 var(--serif); letter-spacing: .01em; color: #fff; text-shadow: 0 2px 18px rgba(92, 184, 255, .45); }
.hero .ko-name { display: block; margin-top: 4px; color: var(--muted); font: 400 13px var(--sans); }
.hero .tags { display: flex; gap: 8px; margin: 10px 0 4px; flex-wrap: wrap; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 11px 2px 3px;
  border-radius: 999px; background: #fff; color: #1a2340; font: 600 12px var(--sans);
}
.tag img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; background: #0b1638; }
.tag.group { background: var(--blue); color: #fff; padding-left: 11px; }
.notes { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
.note { font-size: 12.5px; color: #dfe6ff; }
.note a { color: #dfe6ff; text-decoration: none; border-bottom: 1px dotted var(--rule-strong); }
.note a:hover { color: #fff; border-bottom-color: var(--blue-hi); }
.note a::before { content: "▶"; display: inline-block; margin-right: 7px; font-size: 9px; color: var(--red); }
.note.release { display: inline-block; align-self: flex-start; padding: 1px 10px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 600; }
.pager { margin-left: auto; display: flex; gap: 8px; align-self: flex-start; }
.pager button {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: rgba(0, 0, 0, .25); color: #fff; border: 1px solid var(--rule-strong);
  border-radius: 50%; cursor: pointer; font-size: 16px;
}
.pager button:hover { border-color: var(--blue-hi); box-shadow: 0 0 10px rgba(92, 184, 255, .5); }

.sections { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.sections .panel { flex: 0 1 auto; max-width: 100%; }
.sheet-wrap { overflow-x: auto; padding: 12px; }

/* ---------------------------------------------------------------- sheet grid */
.sheet { display: grid; gap: 3px; }
.cell {
  position: relative; min-width: 0;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 1px 5px; border-radius: 3px;
  font-size: 12px; line-height: 1.22; white-space: pre-line; overflow-wrap: anywhere;
}
.cell.txt { background: rgba(255, 255, 255, .045); }
.cell.has-bg {
  background: color-mix(in oklab, var(--cbg) 26%, rgba(6, 12, 32, .7));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--cbg) 50%, transparent);
}
.cell.bold { font-weight: 700; }
.cell.label {   /* row labels: slanted bar like the in-game party/HP strips */
  color: #fff; font-weight: 600; letter-spacing: .02em;
  background: linear-gradient(90deg, rgba(61, 124, 242, .55), rgba(61, 124, 242, .18));
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  box-shadow: none;
}
.cell.stars { color: var(--gold); letter-spacing: .05em; font-size: 12.5px; text-shadow: 0 0 6px rgba(245, 198, 74, .5); background: none; box-shadow: none; }
.cell.stars.pvp { color: #ff8f96; text-shadow: 0 0 6px rgba(226, 64, 77, .5); }
.cell.arrows { color: var(--blue-hi); font-size: 11px; background: none; letter-spacing: .1em; box-shadow: none; }
.cell.chipcell { background: none; box-shadow: none; }
.cell.chipcell span.ch { padding: 1px 10px; border-radius: 999px; background: #fff; color: #1a2340; font-weight: 600; font-size: 11.5px; }
.cell.img { padding: 0; background: none; box-shadow: none; }
.cell.img .icon { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.cell.img img {
  max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px;
  transition: transform .12s ease, filter .12s ease;
}
.cell.img:hover img { transform: translateY(-2px) scale(1.05); filter: drop-shadow(0 0 10px rgba(92, 184, 255, .75)); }
.cap {
  position: absolute; left: 0; right: 0; bottom: 1px; margin: 0 auto;
  width: fit-content; max-width: calc(100% - 2px); padding: 0 6px; border-radius: 8px;
  background: rgba(255, 255, 255, .94); color: #14204a;
  font: 600 9px/1.25 var(--sans); white-space: normal; text-align: center;
  pointer-events: none;
}
.hero .official { color: var(--blue-hi); }
.cell a { color: var(--blue-hi); }

/* ---------------------------------------------------------------- resources */
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.toc a { text-decoration: none; }
.res-list { display: flex; flex-direction: column; gap: 18px; }
.res-list .panel { width: fit-content; max-width: 100%; }

/* ---------------------------------------------------------------- glossary */
.gloss { display: flex; flex-direction: column; gap: 18px; }
.gloss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; padding: 14px; }
.gl {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 8px;
  border-radius: 4px; background: rgba(255, 255, 255, .035); border: 1px solid transparent; text-align: center;
}
.gl:hover { border-color: var(--rule-strong); background: rgba(61, 124, 242, .12); }
.gl img { width: 74px; height: 74px; object-fit: contain; border-radius: 4px; }
.gl .en { font-size: 12px; font-weight: 600; color: #fff; }
.gl .ko { font-size: 11px; color: var(--muted); }
.gl .skills { display: flex; gap: 3px; }
.gl .skills img { width: 26px; height: 26px; }
.page-head { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h2 { margin: 0; font: 600 38px/1 var(--serif); color: #fff; text-shadow: 0 2px 18px rgba(92, 184, 255, .45); }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- guides */
.guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.guide { padding: 16px 18px; text-decoration: none; color: var(--text); display: block; transition: border-color .15s, transform .15s; }
.guide:hover { border-color: var(--blue-hi); transform: translateY(-2px); }
.guide .date { display: inline-block; padding: 0 9px; border-radius: 999px; background: var(--blue); color: #fff; font: 600 11px/1.7 var(--sans); letter-spacing: .06em; }
.guide .label { font: 600 23px var(--serif); color: #fff; margin: 6px 0 6px; }
.guide .t { font-size: 13px; color: #dfe6ff; }
.guide .ko { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ---------------------------------------------------------------- tooltip */
#tip {
  position: fixed; z-index: 50; pointer-events: none; display: none;
  max-width: 320px; padding: 8px 11px; border-radius: 4px;
  background: rgba(5, 10, 28, .97); border: 1px solid var(--rule-strong);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .55), 0 0 0 1px rgba(61, 124, 242, .25);
  font-size: 12px;
}
#tip .t-en { color: #fff; font-weight: 600; }
#tip .t-ko { color: var(--muted); margin-top: 2px; white-space: pre-line; }
#tip .t-cat { color: var(--blue-hi); font-size: 10px; text-transform: uppercase; letter-spacing: .14em; margin-top: 4px; }

.empty { color: var(--muted); padding: 30px; text-align: center; }

/* ---------------------------------------------------------------- video notes */
.vnotes { margin-top: 18px; }
.vn-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; padding: 14px; }
.vn { background: rgba(255, 255, 255, .035); border: 1px solid var(--rule); border-radius: 4px; padding: 12px 14px; }
.vn-title a { color: #fff; font: 600 19px var(--serif); text-decoration: none; }
.vn-title a:hover { color: var(--blue-hi); }
.vn-meta { color: var(--muted); font-size: 11px; letter-spacing: .04em; margin: 2px 0 8px; }
.vn-sum { margin: 0 0 8px; color: #dfe6ff; }
.vn-pts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.vn-pts li { display: block; padding-left: 14px; position: relative; font-size: 13px; line-height: 1.45; }
.vn-pts li b { color: var(--blue-hi); font-weight: 600; }
.vn-pts .ts {
  align-self: start; text-align: center; font: 600 10.5px/1.8 var(--sans); text-decoration: none;
  color: #fff; background: var(--blue); border-radius: 999px;
}
.vn-pts .ts:hover { box-shadow: 0 0 10px var(--glow); }
.vn-cav { margin-top: 10px; padding: 8px 10px; border-left: 3px solid var(--red); background: rgba(226, 64, 77, .1); font-size: 12.5px; }
.vn-cav b { color: #ff9aa1; }
.vn-cav ul { margin: 4px 0 0; padding-left: 18px; }
.guide .label a { color: #fff; text-decoration: none; }
.guide .label a:hover { color: var(--blue-hi); }
.guide details.vn { margin-top: 10px; padding: 8px 12px; }
.guide details.vn summary { cursor: pointer; color: var(--blue-hi); font-weight: 600; font-size: 12.5px; }
.guide details.vn[open] summary { margin-bottom: 8px; }
.guide details.vn .vn-title { display: none; }
.guides { align-items: start; }
.vnotes .vn-body > .vn:only-child { max-width: 980px; }
.nobuild { flex: 1 1 100%; } .nobuild p { margin: 0; padding: 12px 16px 16px; color: #dfe6ff; }

/* ---------------------------------------------------------------- resources hub */
.topic-groups { display: flex; flex-direction: column; gap: 26px; }
.tg-title { margin: 0 0 10px; font: 600 24px var(--serif); color: #fff; display: flex; align-items: center; gap: 10px; }
.tg-title::before { content: ""; width: 3px; height: 18px; background: var(--blue); box-shadow: 0 0 8px var(--glow); }
.topic-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.topic-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.topic-card:hover { border-color: var(--blue-hi); transform: translateY(-2px); }
.tc-imgs { display: flex; gap: 4px; height: 44px; }
.tc-imgs img { height: 44px; width: 44px; object-fit: cover; border-radius: 4px; border: 1px solid var(--rule); }
.tc-title { font: 600 21px var(--serif); color: #fff; }
.tc-desc { font-size: 12.5px; color: #c9d3f0; line-height: 1.45; }
.tc-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.tc-tabs span { font-size: 10.5px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--rule); color: var(--muted); }
.topic-nav ul { padding-top: 4px; }
.topic-nav .nav-group { padding: 10px 10px 4px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-hi); }
.topic-nav .back { color: var(--muted); text-decoration: none; font-size: 12.5px; }
.topic-nav .back:hover { color: #fff; }
.topic-head { padding: 16px 20px; margin-bottom: 16px; background: linear-gradient(100deg, rgba(22, 48, 109, .85), rgba(9, 16, 40, .75) 60%); }
.topic-head h1 { margin: 2px 0 6px; font: 600 36px/1.05 var(--serif); color: #fff; }
.topic-head p { margin: 0; max-width: 820px; color: #dfe6ff; }
.th-group { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--blue-hi); }
.th-guides { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.th-guides a { color: var(--blue-hi); text-decoration: none; }
.th-guides a:hover { text-decoration: underline; }
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.subtab { padding: 5px 14px; border-radius: 999px; border: 1px solid var(--rule-strong); color: #dfe6ff; text-decoration: none; font-size: 12.5px; font-weight: 600; }
.subtab:hover { border-color: var(--blue-hi); }
.subtab.on { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 10px rgba(61, 124, 242, .5); }

/* ---------------------------------------------------------------- written guides */
.g-actions { display: flex; gap: 8px; margin-top: 10px; }
.btn { padding: 5px 14px; border-radius: 999px; border: 1px solid var(--rule-strong); color: #dfe6ff; text-decoration: none; font-size: 12.5px; font-weight: 600; }
.btn:hover { border-color: var(--blue-hi); color: #fff; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 10px rgba(61, 124, 242, .45); }
.guide-article { padding: 22px 30px 26px; max-width: 900px; }
.guide-article header { border-bottom: 1px solid var(--rule); padding-bottom: 14px; margin-bottom: 8px; }
.guide-article h1 { margin: 4px 0 6px; font: 600 40px/1.05 var(--serif); color: #fff; text-shadow: 0 2px 18px rgba(92, 184, 255, .35); }
.guide-article .lede { margin: 0 0 8px; font-size: 15px; color: #dfe6ff; }
.guide-article .vn-meta a { color: var(--blue-hi); text-decoration: none; }
.guide-article footer { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--rule); }
.md { font-size: 14.5px; line-height: 1.65; color: #e6ebfb; }
.md h2 { margin: 28px 0 8px; font: 600 27px var(--serif); color: #fff; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; scroll-margin-top: 80px; }
.md h2::before { content: ""; width: 3px; height: 20px; background: var(--blue); box-shadow: 0 0 8px var(--glow); }
.md h3 { margin: 20px 0 6px; font: 600 20px var(--serif); color: #fff; scroll-margin-top: 80px; }
.md h4 { margin: 14px 0 4px; font-size: 14px; color: var(--blue-hi); }
.md p { margin: 8px 0; }
.md ul, .md ol { margin: 6px 0 10px; padding-left: 22px; }
.md li { margin: 4px 0; }
.md li::marker { color: var(--blue-hi); }
.md b { color: #fff; }
.md a { color: var(--blue-hi); }
.md .ts { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; background: rgba(61, 124, 242, .25); border: 1px solid rgba(143, 196, 255, .35);
  font: 600 10.5px/1.7 var(--sans); text-decoration: none; color: #fff; vertical-align: middle; white-space: nowrap; }
.md .ts:hover { background: var(--blue); }
.md .sv, .note-list .sv { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px 0 2px; border-radius: 999px; background: rgba(255, 255, 255, .08);
  border: 1px solid var(--rule); color: #fff; text-decoration: none; font-weight: 600; white-space: nowrap; vertical-align: middle; line-height: 1.5; }
.md .sv img, .note-list .sv img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; object-position: center 20%; }
.md .sv:hover, .note-list .sv:hover { border-color: var(--blue-hi); }
.md-table { overflow-x: auto; margin: 10px 0 14px; }
.md table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.md th { text-align: left; padding: 7px 10px; background: rgba(61, 124, 242, .25); color: #fff; border-bottom: 1px solid var(--rule-strong); }
.md td { padding: 7px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.md tr:hover td { background: rgba(255, 255, 255, .03); }
.callout { margin: 12px 0; padding: 10px 14px; border-left: 3px solid var(--blue); background: rgba(61, 124, 242, .12); border-radius: 0 4px 4px 0; }
.callout.since { border-left-color: var(--red); background: rgba(226, 64, 77, .1); }
.toc-list { border-bottom: 1px solid var(--rule); }
@media (min-width: 901px) { .guide-layout .topic-nav { max-height: calc(100vh - 96px); } }
.vn-pts li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--blue-hi); }

/* ---------------------------------------------------------------- tier list */
.tier-head { padding: 14px 18px; margin-bottom: 16px; }
.tier-head .subtabs { margin-top: 0; }
.tier-meta { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.tier-meta a { color: var(--blue-hi); text-decoration: none; }
.tier-meta a:hover { text-decoration: underline; }
.tier-head .callout { font-size: 12.5px; }
.filters-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; }
.tierlist { display: flex; flex-direction: column; gap: 6px; }
.tier-row { display: grid; grid-template-columns: 74px 1fr; min-height: 104px;
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.tier-label { display: grid; place-items: center; font: 700 34px var(--serif); color: #0b1020; text-shadow: 0 1px 0 rgba(255, 255, 255, .35); }
.t-SS { background: linear-gradient(160deg, #ffd27a, #ff8a5c); }
.t-Sp, .t-S { background: linear-gradient(160deg, #ffe9a8, #f5c64a); }
.t-A { background: linear-gradient(160deg, #d2f5a6, #7fd18b); }
.t-B { background: linear-gradient(160deg, #b9e4ff, #5cb8ff); }
.t-C { background: linear-gradient(160deg, #d6ccff, #8f7cf0); }
.t-D { background: linear-gradient(160deg, #d9dce8, #8e97b3); }
.tier-tiles { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; align-content: flex-start; }
.tile { position: relative; width: 84px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-decoration: none; color: var(--text); transition: transform .12s, opacity .15s, filter .15s; }
.tile:hover { transform: translateY(-3px); }
.tile-img { display: flex; width: 72px; height: 72px; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--rule-strong); background: rgba(0, 0, 0, .3); box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.tile:hover .tile-img { border-color: var(--blue-hi); box-shadow: 0 0 14px rgba(92, 184, 255, .6); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.tile.pair .tile-img img { width: 50%; }
.tile-txt { margin: auto; padding: 4px; font-size: 10.5px; text-align: center; color: var(--muted); }
.tile-badges { position: absolute; top: 2px; left: 8px; display: flex; flex-direction: column; gap: 1px; }
.tile-badges img { width: 17px; height: 17px; border-radius: 50%; background: rgba(5, 10, 28, .85); padding: 1px; }
.tile-name { font-size: 11px; line-height: 1.2; text-align: center; max-width: 84px; }
.tile.dim { opacity: .18; filter: grayscale(1); }
.tierlist.arcana .tile { width: 96px; }
.tierlist.arcana .tile-img { width: 84px; height: 84px; }
.tierlist.arcana .tile-name { max-width: 96px; font-size: 10.5px; }
#tip .t-ko { max-width: 360px; }
.topic-card.ext .ext-ico { font-size: 15px; color: var(--blue-hi); }
.tc-url { font-size: 11px; color: var(--blue-hi); opacity: .8; word-break: break-all; }

/* ---------------------------------------------------------------- quick build card + tier badges */
.tag.tierb { color: #0b1020; font-weight: 700; padding-left: 10px; text-decoration: none; }
.mentions { margin-top: 6px; font-size: 12px; color: var(--muted); }
.mentions a { color: var(--blue-hi); text-decoration: none; }
.mentions a:hover { text-decoration: underline; }
.quick { margin-bottom: 18px; }
.qgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; padding: 14px; }
.qbox { background: rgba(255, 255, 255, .035); border: 1px solid var(--rule); border-radius: 4px; padding: 10px 12px; min-width: 0; }
.qbox.wide { grid-column: span 2; }
@media (max-width: 760px) { .qbox.wide { grid-column: auto; } }
.qbox h4 { margin: 0 0 8px; font: 600 16px var(--serif); color: #fff; }
.qrow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 4px 0; font-size: 13px; }
.qrow.alt { opacity: .72; font-size: 12px; }
.qrow b { color: #fff; }
.qrow small, .qpot small { color: var(--muted); }
.qlabel { min-width: 74px; font-size: 11px; letter-spacing: .04em; color: var(--blue-hi); }
.qi { width: 26px; height: 26px; object-fit: contain; border-radius: 4px; }
.qpills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.qpill { padding: 2px 10px; border-radius: 999px; background: rgba(61, 124, 242, .2); border: 1px solid rgba(143, 196, 255, .3); font-size: 12.5px; }
.qpill b { color: var(--blue-hi); font-weight: 600; }
.qsub { margin-top: 6px; font-size: 12px; color: #c9d3f0; }
.qcards { display: flex; flex-wrap: wrap; gap: 10px; }
.qcard { width: 92px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.qc { width: 72px; height: 72px; object-fit: cover; border-radius: 5px; border: 1px solid var(--rule-strong); }
.qcn { font-size: 10.5px; line-height: 1.2; color: #dfe6ff; }
.qstars { color: var(--gold); font-size: 11.5px; letter-spacing: .04em; white-space: nowrap; }
.qnote { color: var(--muted); font-size: 10.5px; }
.qlv { border-collapse: collapse; margin-top: 6px; font-size: 12.5px; width: 100%; }
.qlv th, .qlv td { padding: 3px 6px; text-align: center; border-bottom: 1px solid var(--rule); }
.qlv th { color: var(--blue-hi); font-weight: 600; font-size: 11px; }
.qlv tr > th:first-child { text-align: left; }
.qpots { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.qpot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }

/* ---------------------------------------------------------------- mobile & touch */
@media (max-width: 900px) {
  main { padding: 14px 12px 40px; }
  .topbar { padding: 10px 12px; gap: 8px 14px; }
  .tabs { order: 3; flex-basis: 100%; overflow-x: auto; gap: 18px; padding-bottom: 4px; scrollbar-width: none; }
  .tabs a { white-space: nowrap; }
  .tabs a.on::after { bottom: -2px; }
  .brand-title { font-size: 21px; }
  .roster { position: static; max-height: none; }
  .roster ul { max-height: 46vh; }
  .hero { flex-wrap: wrap; padding: 14px; gap: 14px; }
  .hero h1 { font-size: 32px; }
  .portrait { width: 88px; height: 88px; }
  .pager { margin-left: 0; }
  .sections .panel, .res-list .panel { width: 100%; }
  .guide-article { padding: 16px 16px 20px; }
  .guide-article h1 { font-size: 30px; }
  .topic-head h1 { font-size: 28px; }
  .tier-row { grid-template-columns: 48px 1fr; min-height: 84px; }
  .tier-label { font-size: 24px; }
  .tile { width: 64px; }
  .tile-img { width: 56px; height: 56px; }
  .tile-name { font-size: 10px; }
  .tierlist.arcana .tile { width: 72px; }
  .tierlist.arcana .tile-img { width: 64px; height: 64px; }
  .vn-body { grid-template-columns: 1fr; padding: 10px; }
  .guide-layout .topic-nav, .layout > .topic-nav { position: static; max-height: none; }
  .topic-nav ul { max-height: 36vh; overflow-y: auto; }
  .foot { padding: 14px 12px 24px; }
}
@media (hover: none) {
  #tip { max-width: calc(100vw - 24px); }
  .cell.img:hover img, .tile:hover { transform: none; }
}
/* mobile fixes: keep wide content inside its own scroller, compact roster, articles before menus */
.layout > * { min-width: 0; }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .roster .filters { flex-direction: column; }
  .roster .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .roster ul { display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; max-height: none; padding: 8px; scrollbar-width: thin; }
  .roster li a { flex-direction: column; width: 64px; gap: 3px; padding: 4px; text-align: center; }
  .roster li .nm { font-size: 10px; }
  .roster li .mini { display: none; }
  .roster .count { display: none; }
  .guide-layout > article, .layout > .topic-nav + div { order: -1; }
  .topic-nav ul { display: block; }
  .qgrid { grid-template-columns: minmax(0, 1fr); padding: 10px; }
  .qcards { flex-wrap: nowrap; overflow-x: auto; }
  .md-table { margin-left: -4px; margin-right: -4px; }
}

/* ---------------------------------------------------------------- Journey route */
.journey { margin-bottom: 18px; }
.jsteps { list-style: none; margin: 0; padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 12px; }
.jstep > details { border: 1px solid var(--rule); border-radius: var(--radius); background: rgba(255, 255, 255, .02); }
.jstep > details[open] { background: var(--panel-hi); border-color: var(--rule-strong); }
.jhead { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 8px 12px; cursor: pointer; list-style: none; }
.jhead::-webkit-details-marker { display: none; }
.jhead::after { content: "▸"; color: var(--muted); transition: transform .15s; }
details[open] > .jhead::after { transform: rotate(90deg); }
.jhead:hover .jtitle { color: var(--blue-hi); }
.jhead .jtitle { margin: 1px 0 0; }
.jstep .jbody { margin: 0 12px 10px 58px; }
.jexpand { float: right; margin-top: 2px; background: none; border: 1px solid var(--rule-strong); color: #dfe6ff; border-radius: 999px;
  padding: 3px 12px; font: 600 11.5px var(--sans); cursor: pointer; }
.jexpand:hover { border-color: var(--blue-hi); color: #fff; }
.jnum { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--sans);
  background: var(--blue); color: #fff; box-shadow: 0 0 10px rgba(61, 124, 242, .5); }
.jstep:not(:last-child) .jnum { position: relative; }
.jbody { min-width: 0; border-left: 1px solid var(--rule); padding-left: 12px; }
.jwhen { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-hi); }
.jtitle { font: 600 18px var(--serif); color: #fff; margin: 1px 0 4px; }
.jbody p, .jbody ul { margin: 4px 0; font-size: 13px; color: #dfe6ff; }
.jbody ul { padding-left: 18px; }
.jsub { color: #c9d3f0 !important; font-size: 12.5px !important; }
.jcards { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.jcard { border: 1px solid var(--rule); border-radius: 4px; background: rgba(255, 255, 255, .03); }
.jcard summary { display: flex; align-items: center; gap: 8px; padding: 6px 10px; cursor: pointer; font-size: 13px; color: #fff; }
.jcard summary img { width: 30px; height: 30px; object-fit: cover; border-radius: 3px; }
.jcard summary small { margin-left: auto; color: var(--muted); }
.jcard[open] summary { border-bottom: 1px solid var(--rule); }
.jev { padding: 8px 12px; border-bottom: 1px solid var(--rule); }
.jev:last-child { border-bottom: 0; }
.jev-name { font-weight: 600; color: #fff; font-size: 13px; margin-bottom: 3px; }
.jev-name small { color: var(--muted); font-weight: 400; }
.jch { padding: 3px 8px; margin: 2px 0; border-radius: 4px; font-size: 12.5px; }
.jch.best { background: rgba(61, 124, 242, .16); box-shadow: inset 2px 0 0 var(--blue-hi); }
.jch-n { color: var(--blue-hi); font-weight: 700; }
.jch-t { color: #e6ebfb; }
.jbest { margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 10px; font-weight: 700; }
.jrw { color: #c9d3f0; font-size: 12px; margin-top: 1px; }
.jrw .fail { color: #ff9aa1; }
.jsrc { padding: 8px 18px 14px; font-size: 11.5px; color: var(--muted); }
.jsrc a { color: var(--blue-hi); text-decoration: none; }
.journey .jq{border-left:3px solid #d9b45a;background:rgba(217,180,90,.08);padding:.45rem .7rem;border-radius:4px;font-size:.92em}
.journey .jalts{margin:.3rem 0 .4rem 1.1rem;font-size:.92em}
.journey .jalts li{margin:.15rem 0}
.journey .jslot{border:1px dashed rgba(201,211,240,.35);border-radius:6px;padding:.35rem .5rem;margin:.35rem 0}

/* savior page tabs */
.stabs { margin: 0 0 14px; position: sticky; top: 56px; z-index: 5; padding: 8px 0; background: linear-gradient(rgba(5, 10, 28, .92), rgba(5, 10, 28, .75)); backdrop-filter: blur(6px); }
.stab-body > .panel { margin-bottom: 18px; }
.says p { margin: 10px 16px; font-size: 14px; color: #dfe6ff; line-height: 1.55; }
.says .says-more { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.says a, .quick .qsub a { color: var(--blue-hi); }
@media (max-width: 900px) {
  .stabs { position: static; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .stabs .subtab { white-space: nowrap; }
  .jstep .jbody { margin-left: 14px; }
  .jexpand { float: none; display: block; margin: 8px 0 0; }
}
@media (max-width: 900px) {
  .journey > h3 { flex-wrap: wrap; }
  .journey > h3 .ko-sub { flex-basis: 100%; margin-left: 0; }
}
.says .says-cav { margin: 4px 16px 10px; }
.says .says-cav summary { cursor: pointer; color: #ffd0d4; }
.says .says-cav summary:hover b { text-decoration: underline; }
.en-only { margin: 0 0 12px; padding: 6px 12px; border-left: 3px solid var(--blue); background: rgba(61, 124, 242, .1); font-size: 13px; color: #dfe6ff; border-radius: 4px; }
.en-only a { color: var(--blue-hi); }
.newsbox { margin: 0 0 18px; }
.newsbox ul { margin: 10px 16px 14px; padding-left: 18px; font-size: 13.5px; color: #dfe6ff; line-height: 1.55; }
.newsbox li { margin: 4px 0; }
.newsbox code { font: 600 12.5px ui-monospace, Consolas, monospace; background: rgba(255,255,255,.08); padding: 1px 5px; border-radius: 3px; }
.newsbox .ko-sub a { color: var(--blue-hi); }
.empty-table { padding-bottom: 12px; }
.empty-table .jq { margin: 12px 16px; border-left: 3px solid #d9b45a; background: rgba(217,180,90,.08); padding: .5rem .8rem; border-radius: 4px; font-size: 13.5px; color: #dfe6ff; }
.empty-table .jq a, .empty-table a { color: var(--blue-hi); }
.empty-table h4 { margin: 14px 16px 4px; font: 600 16px var(--serif); color: #fff; }
.empty-table .note-list { margin: 4px 16px 6px; padding-left: 20px; font-size: 13.5px; color: #dfe6ff; line-height: 1.6; }
.jglance { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; margin: 12px 16px 2px; }
.jg-box { border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--panel-hi); padding: 10px 14px; }
.jg-box h4 { margin: 0 0 6px; font: 600 17px var(--serif); color: #fff; }
.jg-box p { margin: 6px 0; font-size: 13px; color: #dfe6ff; }
.jg-box a { color: var(--blue-hi); }
.jtrain { list-style: none; margin: 0; padding: 0; }
.jtrain li { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--rule); font-size: 13px; color: #dfe6ff; }
.jtrain li:last-child { border-bottom: 0; }
.jt-stat { font-weight: 600; color: #fff; }
.jt-stat small { font-weight: 400; color: var(--muted); }
@media (max-width: 900px) { .jglance { grid-template-columns: 1fr; } .jtrain li { grid-template-columns: 1fr; gap: 2px; } }
.jgroup h5 { margin: 12px 0 6px; font: 600 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--blue-hi); }
.jcard summary .jpick { margin-left: auto; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: rgba(61,124,242,.2); color: #dfe6ff; white-space: nowrap; }
.jcard summary .jpick.src { background: rgba(217,180,90,.22); color: #ffe7a8; }
.jrw .need { color: #ffd38a; font-size: .95em; }
.jchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 16px 0; }
.jchip { border: 1px solid var(--rule-strong); border-radius: 999px; padding: 3px 12px; font-size: 12.5px; color: #fff; background: rgba(61,124,242,.12); }
.jchip > small:first-child { color: var(--blue-hi); letter-spacing: .06em; text-transform: uppercase; font-size: 10.5px; margin-right: 4px; }
.jpart { margin: 16px 16px 0; font: 600 13px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--blue-hi); }
.jref .jnum { background: rgba(61,124,242,.35); }
.jmiles { margin: 4px 0; padding-left: 20px; font-size: 13px; color: #dfe6ff; }
.jmiles li { margin: 5px 0; }
.jmore { margin: 6px 0; font-size: 13px; }
.jmore summary { cursor: pointer; color: var(--blue-hi); }
.jdeckpicks { list-style: none; margin: -2px 0 8px 14px; padding: 0 0 0 10px; border-left: 2px solid var(--rule); font-size: 12.5px; color: #dfe6ff; }
.jdeckpicks li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.jdeckpicks .jpick { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: rgba(61,124,242,.2); white-space: nowrap; }
.jdeckpicks .jpick.src { background: rgba(217,180,90,.22); color: #ffe7a8; }
.jsel { margin: 4px 0 10px; padding-left: 18px; font-size: 13px; color: #dfe6ff; }
.jsel > li { margin: 5px 0; }
.jsel .jrelic { border-bottom: 1px dotted var(--muted); cursor: help; }
.jsel ol { margin: 4px 0 6px; padding-left: 20px; font-size: 12.5px; }
.jpar { list-style: none; margin: 4px 0; padding: 0; font-size: 12.5px; }
.jpar li { margin: 4px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.jpar small { color: var(--blue-hi); min-width: 62px; }
.jpar .sv { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px 0 2px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid var(--rule); color: #fff; text-decoration: none; }
.jpar .sv img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; object-position: center 20%; }
.jpar .sv:hover { border-color: var(--blue-hi); }

/* estimated (not Bullet-rated) stars on provisional builds */
.est{font-size:.68em;font-style:italic;color:#f0b35a;border:1px dashed #f0b35a88;border-radius:4px;padding:0 3px;margin-left:3px;vertical-align:middle;cursor:help}
.qpill .qalt{opacity:.8}

/* ---------- arcana panel ---------- */
.arclink { cursor: pointer; border-bottom: 1px dotted var(--rule-strong); }
.arclink:hover, .arclink:focus { color: var(--blue-hi); outline: none; }
img[data-arc], .qcard img, .sheet .icon[data-en] img, .tile.arc[data-arc] { cursor: pointer; }
body.arcm-open { overflow: hidden; }
.arcm-back { position: fixed; inset: 0; z-index: 60; background: rgba(3, 6, 18, 0.72); display: flex;
  align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; }
.arcm { position: relative; width: min(640px, 100%); background: linear-gradient(180deg, var(--sky-1), var(--sky-0));
  border: 1px solid var(--rule-strong); border-radius: 10px; padding: 18px 20px 14px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.arcm-x { position: absolute; top: 8px; right: 10px; background: none; border: 0; color: var(--muted); font-size: 26px;
  line-height: 1; cursor: pointer; padding: 4px 8px; }
.arcm-x:hover, .arcm-x:focus { color: var(--text); }
.arcm-tabs { display: flex; gap: 6px; margin: 0 32px 10px 0; flex-wrap: wrap; }
.arcm-tabs:empty { display: none; }
.arcm-tabs button, .arcm-lv button { background: var(--panel-hi); border: 1px solid var(--rule); color: var(--muted);
  border-radius: 999px; padding: 3px 11px; font: inherit; font-size: 12px; cursor: pointer; }
.arcm-tabs button.on, .arcm-lv button.on { color: var(--text); border-color: var(--gold); background: rgba(245,198,74,.12); }
.arcm-head { display: flex; gap: 14px; align-items: center; margin-right: 28px; }
.arcm-head img { width: 84px; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid var(--rule-strong); flex: none; }
.arcm-head h3 { margin: 0; font-family: var(--serif); font-size: 22px; line-height: 1.15; }
.arcm-ko { color: var(--muted); font-size: 12px; }
.arcm-sub { color: var(--blue-hi); font-size: 13px; margin-top: 2px; }
.arcm-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.arcm-tags span { font-size: 11px; border: 1px solid var(--rule); border-radius: 4px; padding: 1px 6px; color: var(--muted); }
.arcm section { border-top: 1px solid var(--rule); margin-top: 12px; padding-top: 10px; }
.arcm h4 { margin: 0 0 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.arcm h5 { margin: 8px 0 3px; font-size: 12px; color: var(--muted); font-weight: 600; }
.arcm p { margin: 4px 0; }
.arcm-note { color: var(--muted); font-size: 12px; }
.arcm-lv { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.arcm-fx { list-style: none; margin: 0; padding: 0; }
.arcm-fx li { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; border-bottom: 1px dashed rgba(255,255,255,.07); }
.arcm-fx li b { color: var(--text); white-space: nowrap; }
.arcm-fx li.locked { color: var(--muted); }
.arcm-fx li.locked b { color: var(--muted); font-weight: 400; font-size: 12px; }
.arcm-used { display: flex; flex-wrap: wrap; gap: 6px; }
.arcm-used .sv { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 8px 2px 2px;
  border: 1px solid var(--rule); border-radius: 999px; color: var(--text); text-decoration: none; }
.arcm-used .sv:hover { border-color: var(--blue-hi); }
.arcm-used .sv img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.arcm-used .sv small { color: var(--gold); }
.arcm-src { color: var(--muted); font-size: 11px; margin-top: 12px !important; }
@media (max-width: 560px) { .arcm { padding: 14px 14px 10px; } .arcm-head img { width: 64px; height: 64px; } }
.arcm-more { margin-top: 6px; } .arcm-more summary { cursor: pointer; color: var(--blue-hi); font-size: 12px; margin-bottom: 5px; }
.jcomp { font-size: 11px; color: var(--gold); border: 1px solid rgba(245,198,74,.4); border-radius: 4px; padding: 0 5px; }
.tier-sub { margin-top: 26px; } .tier-sub h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 22px; } .tier-sub p { color: var(--muted); margin: 0; }

/* ---------------------------------------------------------------- downloads (hosted site only) */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.dl-card, .dl-note { padding: 18px 20px; }
.dl-card h3, .dl-note h3 { margin: 0 0 8px; font: 600 24px/1.2 var(--serif); color: #fff; }
.dl-card p, .dl-card li, .dl-note li { color: #dfe6ff; }
.dl-card .btn.primary { display: inline-block; padding: 8px 18px; font-size: 13.5px; }
.dl-card ol, .dl-note ul { padding-left: 20px; margin: 8px 0; }
.dl-card li, .dl-note li { margin: 4px 0; }
.dl-hash { font-size: 11.5px; color: var(--muted); }
.dl-hash code { word-break: break-all; }
#app .dl-grid, #app .dl-note { max-width: 1100px; }   /* the Downloads page shouldn't stretch across very wide screens */

/* ---------------------------------------------------------------- phones (survey 2026-11-26) */
/* Bullet's tables re-flowed (renderFlow in app.js): bands stack, column groups wrap like words. */
.sheet-flow { display: flex; flex-direction: column; gap: 14px; }
.flow-band { display: flex; flex-wrap: wrap; gap: 8px 3px; align-items: flex-start; }
.flow-band .sheet { width: max-content; max-width: 100%; }
.sheet-flow .cell { overflow-wrap: normal; }   /* break between words, not inside them (see min-content columns) */
/* topic notes shown above the tables (note_show: "always" in resources_layout.py) */
.topic-head .th-note { margin: 14px 0 4px; font-size: 13px; color: var(--blue-hi); letter-spacing: .04em; }
.topic-head .note-list { margin: 0; padding-left: 18px; font-size: 13px; color: #dfe6ff; }
.topic-head .note-list li { margin: 4px 0; }
/* "Mentioned in" folded on phones */
details.mentions summary { cursor: pointer; color: var(--blue-hi); }
details.mentions[open] summary { margin-bottom: 4px; }
/* guide contents menu at the top, phones only */
.toc-phone { display: none; margin: 4px 0 16px; border: 1px solid var(--rule); border-radius: var(--radius); background: rgba(255, 255, 255, .03); }
.toc-phone summary { padding: 10px 14px; cursor: pointer; font-weight: 600; color: var(--blue-hi); }
.toc-phone ol { margin: 0; padding: 0 14px 12px 34px; }
.toc-phone li { margin: 6px 0; }
.toc-phone a { color: #dfe6ff; text-decoration: none; }
@media (max-width: 900px) {
  .toc-phone { display: block; }
  .md h2, .md h3 { scroll-margin-top: 120px; }
  /* the "All topics" / "Other guides" menu: a readable two-column list instead of a squeezed strip */
  .topic-nav ul { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 6px; max-height: none; overflow: visible; }
  .topic-nav .nav-group { grid-column: 1 / -1; }
  .topic-nav li a { flex-direction: row; width: auto; text-align: left; padding: 8px 10px; }
  .topic-nav li .nm { font-size: 12.5px; }
}
@media (max-width: 560px) {
  .stabs { flex-wrap: wrap; overflow-x: visible; }   /* savior sub-tabs wrap instead of cutting off "Videos" */
}
/* touch screens: tap targets of at least 34 px */
@media (pointer: coarse) {
  .chip, .subtab, .btn, .lang button { min-height: 34px; display: inline-flex; align-items: center; }
  .topic-nav li a { min-height: 40px; }
}
