:root {
  --bg: #0c0f14;
  --bg-2: #11151c;
  --panel: #171b23;
  --panel-2: #1d222c;
  --line: rgba(214, 185, 124, .14);
  --line-strong: rgba(214, 185, 124, .28);
  --gold: #d8b56a;
  --gold-bright: #f1dfb2;
  --gold-dim: #9b7d46;
  --moon: #8fc7d8;
  --shadow: #a98bd4;
  --danger: #d97b66;
  --green: #8fbf8a;
  --text: #e9e4d8;
  --muted: #9b9689;
  --faint: #6d695f;
  --serif: "STKaiti", "KaiTi", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  --radius: 16px;
  --shadow-card: 0 24px 60px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .035);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-color: rgba(216, 181, 106, .35) transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  background:
    radial-gradient(1100px 760px at 82% -8%, rgba(90, 122, 148, .18), transparent 62%),
    radial-gradient(900px 680px at -5% 22%, rgba(124, 91, 48, .13), transparent 58%),
    radial-gradient(700px 500px at 60% 100%, rgba(70, 50, 95, .1), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(216, 181, 106, .3); color: #fff; }

.noscript { position: relative; z-index: 5; margin: 0; padding: 12px 20px; background: #2a2015; color: var(--gold-bright); text-align: center; font-size: 13px; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

button { font: inherit; color: inherit; }

.bg-stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, .55), transparent 1.4px),
    radial-gradient(1px 1px at 34% 62%, rgba(255, 255, 255, .35), transparent 1.4px),
    radial-gradient(1.4px 1.4px at 72% 28%, rgba(255, 255, 255, .5), transparent 1.6px),
    radial-gradient(1px 1px at 86% 74%, rgba(255, 255, 255, .32), transparent 1.4px),
    radial-gradient(1px 1px at 56% 88%, rgba(255, 255, 255, .3), transparent 1.4px),
    radial-gradient(1.2px 1.2px at 22% 84%, rgba(255, 255, 255, .38), transparent 1.5px);
  background-size: 420px 420px, 520px 520px, 460px 460px, 600px 600px, 380px 380px, 700px 700px;
}

.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 274px minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------------------------------- sidebar --------------------------------- */

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 28px 20px 18px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(18, 22, 29, .96), rgba(11, 14, 19, .98)),
    radial-gradient(400px 300px at 20% 0%, rgba(216, 181, 106, .06), transparent 70%);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  margin-bottom: 26px;
}

.brand:hover { color: var(--text); }

.brand-sigil {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  color: var(--gold);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(216, 181, 106, .13), transparent 68%);
  box-shadow: inset 0 0 18px rgba(216, 181, 106, .06);
}

.brand-sigil svg { width: 30px; height: 30px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--serif); font-size: 19px; letter-spacing: .05em; font-weight: 600; }
.brand-text small { margin-top: 5px; color: var(--faint); font-size: 10px; letter-spacing: .28em; text-transform: uppercase; }

.side-progress {
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .018);
  margin-bottom: 18px;
}

.side-progress-top { display: flex; align-items: baseline; justify-content: space-between; font-size: 11px; letter-spacing: .16em; color: var(--muted); }
.side-progress-top b { color: var(--gold-bright); font-family: var(--serif); font-size: 20px; letter-spacing: .02em; }

.bar { height: 4px; margin: 9px 0 7px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .07); }
.bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-bright)); transition: width .45s cubic-bezier(.2, .7, .3, 1); }

.side-progress p { margin: 0; color: var(--faint); font-size: 11px; letter-spacing: .06em; }

.side-nav { display: flex; flex-direction: column; gap: 2px; padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, .055); }

.nav-link {
  position: relative;
  display: block;
  padding: 8px 11px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .06em;
  border-radius: 7px;
  transition: color .18s, background .18s;
}

.nav-link::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: transparent;
  transform: translateY(-50%);
}

.nav-link:hover, .nav-link.active { color: var(--gold-bright); background: rgba(216, 181, 106, .07); }
.nav-link.active::before { background: var(--gold); }

.side-chapters {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 2px 10px;
  scrollbar-width: thin;
}

.side-chapter {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 7px 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: background .18s, color .18s;
}

.side-chapter:hover { color: var(--text); background: rgba(255, 255, 255, .035); }
.side-chapter .sc-num { font-family: var(--serif); font-size: 12px; color: var(--faint); }
.side-chapter .sc-name { overflow: hidden; font-size: 12px; letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; }
.side-chapter .sc-pct { font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; }
.side-chapter.done .sc-num, .side-chapter.done .sc-pct { color: var(--green); }
.side-chapter.current { color: var(--gold-bright); background: rgba(216, 181, 106, .075); }
.side-chapter.current .sc-num { color: var(--gold); }

.side-chapter .mini-bar { grid-column: 2 / 4; height: 2px; margin-top: -3px; background: rgba(255, 255, 255, .06); border-radius: 99px; overflow: hidden; }
.side-chapter .mini-bar i { display: block; height: 100%; background: currentColor; opacity: .7; }

.side-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, .055);
  color: var(--faint);
  font-size: 10px;
  letter-spacing: .04em;
}

.text-btn {
  padding: 4px 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--faint);
  font-size: 10px;
  cursor: pointer;
  transition: color .18s, background .18s;
}

.text-btn:hover { color: var(--danger); background: rgba(217, 123, 102, .08); }

/* ----------------------------------- main ---------------------------------- */

.main {
  width: 100%;
  max-width: 1340px;
  padding: 30px 46px 70px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 34px;
}

.crumb { display: flex; align-items: center; gap: 9px; color: var(--faint); font-size: 10px; letter-spacing: .22em; }
.crumb span { color: var(--gold); }
.crumb i { font-style: normal; opacity: .5; }

.top-actions { display: flex; align-items: center; gap: 9px; }

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 268px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 255, 255, .026);
  color: var(--faint);
  transition: border-color .2s, background .2s;
}

.search:focus-within { border-color: var(--line-strong); background: rgba(255, 255, 255, .045); }
.search svg { width: 15px; height: 15px; flex: 0 0 15px; }
.search input { width: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { filter: invert(.75); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .026);
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}

.icon-btn:hover { color: var(--gold); border-color: var(--line-strong); background: rgba(216, 181, 106, .07); }
.icon-btn svg { width: 17px; height: 17px; }

/* ----------------------------------- hero ---------------------------------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 40px;
  align-items: center;
  min-height: 390px;
  padding: 16px 0 44px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  overflow: hidden;
}

.constellation {
  position: absolute;
  top: -50px;
  right: -80px;
  width: 520px;
  height: 520px;
  color: var(--gold);
  opacity: .22;
  pointer-events: none;
  mask-image: radial-gradient(circle at 50% 50%, #000 25%, transparent 72%);
}

.hero-copy { position: relative; z-index: 1; max-width: 710px; }

.eyebrow, .kicker {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .34em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(38px, 4.7vw, 64px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: .015em;
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(115deg, var(--gold-bright) 4%, var(--gold) 48%, #a9844b 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede { max-width: 620px; margin: 22px 0 0; color: #bdb6a7; font-size: 14px; line-height: 1.92; }
.lede-sub { margin-top: 9px; color: var(--muted); font-size: 13px; }

.hero-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 24px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 99px;
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .06em;
  white-space: nowrap;
}

.chip.gold { border-color: rgba(216, 181, 106, .3); background: rgba(216, 181, 106, .075); color: var(--gold-bright); }

.hero-progress { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }

.ring { position: relative; width: 182px; height: 182px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255, 255, 255, .065); stroke-width: 4; }
.ring-value { fill: none; stroke: url(#ringGrad); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .65s cubic-bezier(.2, .7, .3, 1); }

.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label b { font-family: var(--serif); font-size: 40px; font-weight: 600; line-height: 1; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.ring-label b span { margin-left: 1px; font-size: 15px; color: var(--gold-dim); }
.ring-label small { margin-top: 8px; color: var(--faint); font-size: 10px; letter-spacing: .18em; }

.hero-stats { width: 100%; margin-top: 20px; border-top: 1px solid rgba(255, 255, 255, .07); }
.hero-stats > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 8px 2px; border-bottom: 1px solid rgba(255, 255, 255, .045); }
.hero-stats span { flex: 0 0 auto; color: var(--faint); font-size: 10px; letter-spacing: .12em; }
.hero-stats b { overflow: hidden; color: var(--text); font-size: 12px; font-weight: 500; text-align: right; text-overflow: ellipsis; white-space: nowrap; }

/* -------------------------------- next card -------------------------------- */

.next-card { margin: 26px 0 6px; }

.next-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px;
  align-items: center;
  padding: 22px 26px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(110deg, rgba(216, 181, 106, .095), transparent 46%),
    linear-gradient(180deg, rgba(29, 34, 44, .92), rgba(20, 24, 31, .96));
  box-shadow: var(--shadow-card);
}

.next-inner::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -42px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(216, 181, 106, .18);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(216, 181, 106, .025), 0 0 0 40px rgba(216, 181, 106, .015);
  pointer-events: none;
}

.next-label { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; color: var(--gold); font-size: 10px; letter-spacing: .22em; }
.next-label::before { content: ""; width: 18px; height: 1px; background: var(--gold); opacity: .7; }
.next-chapter { color: var(--faint); font-size: 11px; letter-spacing: .06em; }
.next-title { margin: 0; font-family: var(--serif); font-size: 25px; font-weight: 600; letter-spacing: .02em; }
.next-desc { max-width: 720px; margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.next-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 12px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: transform .16s, background .18s, border-color .18s, color .18s;
}

.btn:active { transform: translateY(1px); }
.btn-primary { border-color: rgba(216, 181, 106, .5); background: linear-gradient(180deg, #e4c98e, #c9a25a); color: #17130c; font-weight: 600; box-shadow: 0 6px 22px rgba(216, 181, 106, .16); }
.btn-primary:hover { background: linear-gradient(180deg, #f1dfb2, #d8b56a); }
.btn-ghost { border-color: rgba(255, 255, 255, .13); background: rgba(255, 255, 255, .035); color: var(--muted); }
.btn-ghost:hover { border-color: var(--line-strong); color: var(--gold-bright); background: rgba(216, 181, 106, .07); }

.next-complete { display: flex; align-items: center; gap: 14px; }
.next-complete .seal { display: grid; place-items: center; width: 50px; height: 50px; flex: 0 0 50px; border: 1px solid rgba(143, 191, 138, .5); border-radius: 50%; color: var(--green); font-family: var(--serif); font-size: 24px; background: rgba(143, 191, 138, .07); }

/* -------------------------------- route map -------------------------------- */

.route-section { padding: 45px 0 20px; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.section-head.compact { margin-bottom: 12px; }
.section-head .kicker { margin-bottom: 8px; }
.section-head h2 { margin: 0; font-family: var(--serif); font-size: 29px; font-weight: 600; letter-spacing: .02em; }
.section-note { max-width: 430px; margin: 0 0 4px; color: var(--faint); font-size: 11px; line-height: 1.7; text-align: right; }

.route-map {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(118px, 1fr);
  gap: 0;
  overflow-x: auto;
  padding: 22px 4px 8px;
  scrollbar-width: thin;
}

.route-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}

.route-node::before {
  content: "";
  position: absolute;
  top: 22px;
  right: 50%;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, .09);
}

.route-node:first-child::before { display: none; }
.route-node.done::before { background: linear-gradient(90deg, rgba(216, 181, 106, .38), rgba(216, 181, 106, .1)); }

.route-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  margin-bottom: 11px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  background: #141820;
  color: var(--faint);
  font-family: var(--serif);
  font-size: 14px;
  transition: transform .2s, border-color .2s, color .2s, box-shadow .2s, background .2s;
}

.route-node:hover .route-dot { transform: translateY(-2px); border-color: var(--line-strong); color: var(--gold); }
.route-node.done .route-dot { border-color: rgba(216, 181, 106, .55); background: rgba(216, 181, 106, .12); color: var(--gold-bright); }
.route-node.current .route-dot { border-color: var(--gold); color: var(--gold-bright); box-shadow: 0 0 0 4px rgba(216, 181, 106, .07), 0 0 24px rgba(216, 181, 106, .18); }
.route-node.current .route-dot::after { content: ""; position: absolute; inset: -5px; border: 1px solid rgba(216, 181, 106, .22); border-radius: 50%; }

.route-title { width: 100%; overflow: hidden; color: var(--text); font-size: 11px; letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; }
.route-sub { width: 100%; overflow: hidden; margin-top: 2px; color: var(--faint); font-size: 9px; letter-spacing: .04em; text-overflow: ellipsis; white-space: nowrap; }
.route-node.done .route-title { color: var(--gold-bright); }

/* --------------------------------- chapters -------------------------------- */

.chapters { padding-top: 24px; }

.chapter {
  position: relative;
  margin: 28px 0;
  overflow: hidden;
  scroll-margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(700px 200px at 0% 0%, rgba(216, 181, 106, .04), transparent 60%),
    linear-gradient(180deg, rgba(27, 32, 41, .88), rgba(19, 23, 30, .96));
  box-shadow: var(--shadow-card);
}

.chapter::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), transparent 72%);
  opacity: .85;
}

.chapter.done { border-color: rgba(143, 191, 138, .2); }
.chapter.done::before { background: linear-gradient(180deg, var(--green), transparent 72%); }

.chapter-head {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 180px;
  gap: 18px;
  align-items: center;
  padding: 24px 28px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
}

.chapter-num {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
  letter-spacing: .04em;
}

.chapter-kicker { margin: 0 0 4px; color: var(--accent); font-size: 9px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; }
.chapter-head h2 { margin: 0; font-family: var(--serif); font-size: 27px; font-weight: 600; line-height: 1.3; letter-spacing: .02em; }
.chapter-sub { margin: 4px 0 0; color: var(--faint); font-size: 11px; letter-spacing: .05em; }

.chapter-progress { min-width: 150px; }
.chapter-progress-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 7px; color: var(--faint); font-size: 10px; letter-spacing: .06em; }
.chapter-progress-top b { color: var(--accent); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chapter-progress .bar { margin: 0; }
.chapter-progress .bar > i { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 60%, transparent), var(--accent)); }

.chapter-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 30px;
  padding: 22px 28px 28px;
}

.chapter-main { min-width: 0; }

.goal {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 11px 14px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: 9px;
  background: rgba(255, 255, 255, .022);
}

.goal span { color: var(--accent); font-size: 10px; letter-spacing: .2em; }
.goal p { margin: 0; color: #c9c2b3; font-size: 12.5px; line-height: 1.7; }

.steps { margin: 0; padding: 0; list-style: none; }

.step {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 14px;
  padding: 15px 0;
  border-top: 1px dashed rgba(255, 255, 255, .075);
}

.step:first-child { border-top: 0; }

.check { position: relative; display: block; width: 20px; height: 20px; margin-top: 2px; cursor: pointer; }
.check input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.check .box {
  display: block;
  width: 19px;
  height: 19px;
  border: 1px solid rgba(216, 181, 106, .38);
  border-radius: 5px;
  background: rgba(255, 255, 255, .025);
  transition: background .18s, border-color .18s, box-shadow .18s;
}

.check:hover .box { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216, 181, 106, .06); }
.check input:focus-visible + .box { outline: 2px solid var(--moon); outline-offset: 2px; }

.check input:checked + .box { border-color: var(--accent); background: var(--accent); }
.check input:checked + .box::after {
  content: "";
  display: block;
  width: 5px;
  height: 9px;
  margin: 3px 0 0 6px;
  border: solid #11151b;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(43deg);
}

.step-content { min-width: 0; }
.step-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px 9px; }
.step-index { flex: 0 0 auto; color: var(--faint); font-family: var(--serif); font-size: 11px; font-variant-numeric: tabular-nums; }
.step-title { margin: 0; color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.6; letter-spacing: .01em; }
.step.done .step-title { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(155, 150, 137, .5); text-decoration-thickness: 1px; }
.step.done .step-desc { opacity: .58; }

.step-desc { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.82; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 99px;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: .05em;
  white-space: nowrap;
}

.tag.boss { border-color: rgba(217, 123, 102, .3); color: #d99b8c; background: rgba(217, 123, 102, .055); }
.tag.key { border-color: rgba(216, 181, 106, .3); color: var(--gold); background: rgba(216, 181, 106, .055); }

.prep { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 6px; }
.prep-label { color: var(--faint); font-size: 9px; letter-spacing: .14em; }
.prep .chip { padding: 1px 7px; font-size: 9.5px; color: #a9a394; }

.step-boss {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 7px;
  padding: 2px 8px;
  border: 1px solid rgba(217, 123, 102, .25);
  border-radius: 99px;
  background: rgba(217, 123, 102, .05);
  color: #d99b8c;
  font-size: 9.5px;
  cursor: pointer;
  transition: background .18s, border-color .18s;
}

.step-boss:hover { border-color: rgba(217, 123, 102, .5); background: rgba(217, 123, 102, .1); }

.chapter-aside { display: flex; flex-direction: column; gap: 13px; min-width: 0; }

.aside-block {
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 10px;
  background: rgba(255, 255, 255, .018);
}

.aside-title { display: flex; align-items: center; gap: 7px; margin: 0 0 9px; color: var(--accent); font-size: 9px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.aside-title::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .07); }

.supply-list { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0; list-style: none; }
.supply-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.supply-list li b { color: var(--text); font-weight: 500; }
.supply-list li span { flex: 0 0 auto; color: var(--gold-dim); font-size: 10px; font-variant-numeric: tabular-nums; }

.loot-list { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.loot-list li { padding: 2px 7px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 5px; color: var(--muted); font-size: 10px; }

.boss-links { display: flex; flex-direction: column; gap: 5px; }

.boss-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 7px;
  background: rgba(255, 255, 255, .022);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s, background .18s;
}

.boss-link:hover { border-color: rgba(217, 123, 102, .3); background: rgba(217, 123, 102, .05); }
.boss-link span { font-size: 11.5px; }
.boss-link em { color: var(--faint); font-size: 9px; font-style: normal; letter-spacing: .06em; }

.tips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 18px; }

.tip {
  padding: 11px 13px;
  border-left: 2px solid rgba(143, 199, 216, .5);
  border-radius: 0 8px 8px 0;
  background: rgba(143, 199, 216, .035);
}

.tip.warn { border-left-color: rgba(217, 123, 102, .55); background: rgba(217, 123, 102, .035); }
.tip-title { display: block; margin-bottom: 2px; color: var(--moon); font-size: 10px; letter-spacing: .08em; }
.tip.warn .tip-title { color: #d99b8c; }
.tip p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.7; }

.details {
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 9px;
  background: rgba(255, 255, 255, .018);
  overflow: hidden;
}

.details summary {
  padding: 10px 13px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
  cursor: pointer;
  list-style: none;
  transition: color .18s, background .18s;
}

.details summary::-webkit-details-marker { display: none; }
.details summary::before { content: "＋"; display: inline-block; width: 16px; color: var(--gold); }
.details[open] summary::before { content: "－"; }
.details summary:hover { color: var(--gold-bright); background: rgba(216, 181, 106, .04); }
.details-body { padding: 2px 14px 14px; border-top: 1px solid rgba(255, 255, 255, .05); }
.details-body p, .details-body li { color: var(--muted); font-size: 11.5px; line-height: 1.75; }
.details-body ul, .details-body ol { margin: 8px 0 0; padding-left: 19px; }
.details-body li { margin: 3px 0; }

/* ---------------------------------- bosses --------------------------------- */

.section { padding: 55px 0 10px; }

.filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 18px; }

.filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 99px;
  background: rgba(255, 255, 255, .022);
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}

.filter span { color: var(--faint); font-size: 9px; font-variant-numeric: tabular-nums; }
.filter:hover { color: var(--gold-bright); border-color: var(--line-strong); }
.filter.active { border-color: rgba(216, 181, 106, .45); background: rgba(216, 181, 106, .1); color: var(--gold-bright); }
.filter.active span { color: var(--gold); }

.boss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 13px; align-items: stretch; }

.boss-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 242px;
  padding: 17px 17px 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 12px;
  background:
    radial-gradient(260px 180px at 0% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 68%),
    linear-gradient(180deg, rgba(27, 32, 41, .9), rgba(19, 23, 30, .96));
  text-align: left;
  cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}

.boss-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 40%, transparent), transparent);
  opacity: .5;
}

.boss-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 38%, transparent); box-shadow: 0 18px 40px rgba(0, 0, 0, .3); }
.boss-card:focus-visible { outline: 2px solid var(--moon); outline-offset: 3px; }

.boss-top { display: flex; align-items: flex-start; gap: 12px; }

.sigil {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  border-radius: 50%;
  background: radial-gradient(circle at 42% 34%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
  color: var(--accent);
}

.sigil::before { content: ""; position: absolute; inset: 4px; border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent); border-radius: 50%; }
.sigil b { font-family: var(--serif); font-size: 23px; font-weight: 500; line-height: 1; }

.boss-cat { display: block; margin: 0 0 3px; color: var(--faint); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.boss-name { display: block; margin: 0; font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.3; }
.boss-name span { margin-left: 5px; color: var(--faint); font-family: var(--sans); font-size: 9px; font-weight: 400; letter-spacing: .08em; }
.boss-summary { margin: 11px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.7; }

.boss-stats { display: flex; flex-wrap: wrap; gap: 5px; margin: auto 0 0; padding-top: 12px; }
.boss-stats span { padding: 2px 7px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 4px; color: var(--faint); font-size: 9.5px; font-variant-numeric: tabular-nums; }
.boss-open { display: flex; align-items: center; gap: 5px; margin-top: 10px; color: var(--accent); font-size: 10px; letter-spacing: .05em; }
.boss-open::after { content: "→"; transition: transform .18s; }
.boss-card:hover .boss-open::after { transform: translateX(3px); }

/* ---------------------------------- modal ---------------------------------- */

.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 22px; }
.modal.open { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 7, 11, .76); backdrop-filter: blur(7px); }

.modal-card {
  position: relative;
  z-index: 1;
  width: min(780px, 100%);
  max-height: 89vh;
  overflow-y: auto;
  border: 1px solid rgba(216, 181, 106, .22);
  border-radius: 16px;
  background:
    radial-gradient(700px 280px at 0% 0%, rgba(216, 181, 106, .07), transparent 58%),
    linear-gradient(180deg, #1c222b, #141820);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .55);
  animation: modalIn .24s cubic-bezier(.2, .7, .3, 1);
  scrollbar-width: thin;
}

@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }

.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .065);
}

.modal-head .sigil { width: 64px; height: 64px; flex-basis: 64px; }
.modal-head .sigil b { font-size: 29px; }
.modal-head-text { min-width: 0; flex: 1; }
.modal-kicker { margin: 0 0 3px; color: var(--accent); font-size: 9px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; }
.modal-head h2 { margin: 0; font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.25; }
.modal-head h2 small { margin-left: 7px; color: var(--faint); font-family: var(--sans); font-size: 11px; font-weight: 400; letter-spacing: .08em; }
.modal-where { margin: 5px 0 0; color: var(--muted); font-size: 11px; }

.modal-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  cursor: pointer;
  transition: color .18s, border-color .18s;
}

.modal-close:hover { color: var(--gold-bright); border-color: var(--line-strong); }

.modal-body { padding: 20px 26px 26px; }

.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-bottom: 20px; }
.stat { padding: 9px 10px; border: 1px solid rgba(255, 255, 255, .065); border-radius: 7px; background: rgba(255, 255, 255, .02); }
.stat span { display: block; color: var(--faint); font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; }
.stat b { display: block; overflow: hidden; margin-top: 3px; color: var(--text); font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }

.modal-section { margin-top: 20px; }
.modal-section h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--gold); font-size: 9px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.modal-section h3::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .07); }
.modal-section p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }

.modal-section .loot-list li { font-size: 10.5px; padding: 3px 8px; }

.gear-list { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.gear-list li { padding: 3px 8px; border: 1px solid rgba(216, 181, 106, .2); border-radius: 5px; background: rgba(216, 181, 106, .045); color: #c9b98f; font-size: 10.5px; }

.strategy-list, .pitfall-list { margin: 0; padding: 0 0 0 18px; }
.strategy-list li, .pitfall-list li { margin: 6px 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.strategy-list li::marker { color: var(--gold); font-family: var(--serif); }
.pitfall-list li::marker { color: var(--danger); }

.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .06); }

/* --------------------------------- supply ---------------------------------- */

.supply-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 13px; }

.select-wrap { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 10px; letter-spacing: .08em; }
.select-wrap select {
  padding: 6px 26px 6px 9px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 6px;
  background: #171b23;
  color: var(--text);
  font-size: 11px;
  outline: 0;
  cursor: pointer;
}

.switch { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-box { position: relative; display: block; width: 30px; height: 17px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 99px; background: rgba(255, 255, 255, .05); transition: background .2s, border-color .2s; }
.switch-box::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch input:checked + .switch-box { border-color: rgba(216, 181, 106, .45); background: rgba(216, 181, 106, .15); }
.switch input:checked + .switch-box::after { transform: translateX(13px); background: var(--gold); }

.supply-count { margin-left: auto; color: var(--faint); font-size: 10px; letter-spacing: .05em; font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px; background: rgba(20, 24, 31, .6); }

.supply-table { width: 100%; min-width: 650px; border-collapse: collapse; }
.supply-table th { padding: 10px 13px; border-bottom: 1px solid rgba(255, 255, 255, .075); color: var(--faint); font-size: 9px; font-weight: 500; letter-spacing: .17em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.supply-table td { padding: 10px 13px; border-bottom: 1px solid rgba(255, 255, 255, .045); color: var(--muted); font-size: 12px; line-height: 1.6; vertical-align: middle; }
.supply-table tr:last-child td { border-bottom: 0; }
.supply-table tr:hover td { background: rgba(255, 255, 255, .018); }
.supply-table .col-check { width: 38px; padding-right: 0; }
.supply-table .item-name { color: var(--text); font-weight: 500; }
.supply-table .item-qty { color: var(--gold); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.supply-table .item-use { color: var(--faint); font-size: 11px; }
.supply-table .item-chapter { color: var(--faint); font-size: 10px; white-space: nowrap; }
.supply-table tr.done .item-name, .supply-table tr.done .item-qty { color: var(--faint); text-decoration: line-through; text-decoration-color: rgba(155, 150, 137, .35); }
.supply-table tr.done td { opacity: .72; }

.row-check { position: relative; display: grid; place-items: center; width: 18px; height: 18px; }
.row-check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.row-check span { display: block; width: 17px; height: 17px; border: 1px solid rgba(216, 181, 106, .3); border-radius: 4px; background: rgba(255, 255, 255, .025); transition: background .18s, border-color .18s; }
.row-check input:checked + span { border-color: var(--green); background: var(--green); }
.row-check input:checked + span::after { content: ""; display: block; width: 4px; height: 8px; margin: 2px 0 0 5px; border: solid #11151b; border-width: 0 1.5px 1.5px 0; transform: rotate(43deg); }
.row-check input:focus-visible + span { outline: 2px solid var(--moon); outline-offset: 2px; }

/* --------------------------------- recipes --------------------------------- */

.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 13px; }

.recipe {
  padding: 17px 17px 15px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(27, 32, 41, .8), rgba(19, 23, 30, .94));
}

.recipe-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.recipe-name { margin: 0; font-family: var(--serif); font-size: 19px; font-weight: 600; }
.recipe-name span { margin-left: 4px; color: var(--faint); font-family: var(--sans); font-size: 9px; font-weight: 400; letter-spacing: .06em; }
.recipe-tier { flex: 0 0 auto; padding: 1px 7px; border: 1px solid rgba(216, 181, 106, .25); border-radius: 99px; color: var(--gold); font-size: 8.5px; letter-spacing: .08em; }

.recipe-ingredients { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.ingredient { padding: 2px 7px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 4px; color: var(--muted); font-size: 10px; }
.ingredient b { color: var(--text); font-weight: 500; }

.recipe-note { margin: 10px 0 0; color: var(--faint); font-size: 11px; line-height: 1.65; }

/* --------------------------------- footer ---------------------------------- */

.footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-top: 63px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.footer-main { max-width: 720px; }
.footer-title { margin: 0 0 6px; color: var(--gold); font-family: var(--serif); font-size: 16px; }
.footer p { margin: 0 0 5px; color: var(--faint); font-size: 10.5px; line-height: 1.75; }
.footer-fine { opacity: .8; }
.footer-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; color: var(--faint); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }

/* ---------------------------------- misc ----------------------------------- */

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  padding: 9px 15px;
  border: 1px solid rgba(216, 181, 106, .25);
  border-radius: 7px;
  background: rgba(23, 27, 35, .96);
  color: var(--gold-bright);
  font-size: 11px;
  letter-spacing: .04em;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}

.toast.show { opacity: 1; transform: none; }

.hidden-by-search { display: none !important; }
.empty-state { padding: 30px; border: 1px dashed rgba(255, 255, 255, .12); border-radius: 12px; color: var(--faint); text-align: center; font-size: 12px; }

:focus-visible { outline: 2px solid var(--moon); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

@media (max-width: 1180px) {
  .main { padding: 26px 30px 60px; }
  .hero { grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
  .chapter-body { grid-template-columns: minmax(0, 1fr) 270px; gap: 22px; }
  .chapter-head { grid-template-columns: 64px minmax(0, 1fr) 150px; padding: 22px 22px 18px; }
  .chapter-body { padding: 20px 22px 24px; }
}

@media (max-width: 980px) {
  .app { display: block; }
  .sidebar {
    position: relative;
    height: auto;
    padding: 16px 20px 13px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand { margin-bottom: 14px; }
  .brand-sigil { width: 38px; height: 38px; flex-basis: 38px; }
  .brand-text strong { font-size: 17px; }
  .side-progress { display: none; }
  .side-nav { flex-direction: row; flex-wrap: wrap; gap: 2px; overflow-x: visible; padding-bottom: 9px; border-bottom: 0; }
  .nav-link { flex: 0 0 auto; padding: 6px 10px; white-space: nowrap; }
  .side-chapters { display: none; }
  .side-foot { position: absolute; top: 21px; right: 20px; padding: 0; border: 0; }
  .side-foot span { display: none; }
  .main { padding: 22px 20px 55px; }
  .topbar { margin-bottom: 20px; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 6px; }
  .hero-progress { flex-direction: row; align-items: center; justify-content: flex-start; gap: 22px; margin-top: 6px; }
  .ring { width: 130px; height: 130px; flex: 0 0 130px; }
  .ring-label b { font-size: 29px; }
  .ring-label small { font-size: 8px; }
  .hero-stats { margin-top: 0; flex: 1; }
  .constellation { top: -80px; right: -130px; opacity: .15; }
  .chapter-head { grid-template-columns: 58px minmax(0, 1fr); }
  .chapter-progress { grid-column: 2; max-width: 230px; }
  .chapter-body { grid-template-columns: 1fr; gap: 16px; }
  .chapter-aside { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .section-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .section-note { max-width: none; text-align: left; }
}

@media (max-width: 640px) {
  .main { padding: 18px 14px 45px; }
  .crumb { display: none; }
  .topbar { justify-content: flex-end; }
  .search { width: 100%; flex: 1; }
  .nav-link { padding: 6px 6px; font-size: 12px; letter-spacing: .02em; }
  .hero h1 { font-size: 35px; }
  .lede { font-size: 12.5px; }
  .hero-progress { flex-direction: row; align-items: center; gap: 16px; }
  .hero-stats { width: auto; flex: 1; }
  .ring { width: 112px; height: 112px; flex: 0 0 112px; }
  .ring-label b { font-size: 25px; }
  .ring-label small { font-size: 8px; letter-spacing: .12em; }
  .next-inner { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
  .next-actions { justify-content: flex-start; }
  .next-title { font-size: 21px; }
  .chapter-head { gap: 12px; padding: 18px 16px 15px; }
  .chapter-num { width: 48px; height: 48px; font-size: 18px; }
  .chapter-head h2 { font-size: 22px; }
  .chapter-body { padding: 16px 16px 20px; }
  .goal { grid-template-columns: 1fr; gap: 3px; }
  .tips { grid-template-columns: 1fr; }
  .step { gap: 10px; }
  .chapter-aside { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal { padding: 10px; }
  .modal-head { padding: 18px 18px 14px; }
  .modal-body { padding: 16px 18px 20px; }
  .modal-head h2 { font-size: 24px; }
  .footer { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-meta { align-items: flex-start; }
  .supply-count { width: 100%; margin-left: 0; }
}

@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #111; font-size: 10pt; }
  .bg-stars, .sidebar, .topbar, .next-card, .constellation, .filters, .hero-progress, .toast, .modal, .chapter-aside .boss-links button, .step-boss, .icon-btn { display: none !important; }
  .app { display: block; }
  .main { max-width: none; padding: 0; }
  .hero { display: block; min-height: 0; padding: 0 0 14pt; }
  .hero h1 { font-size: 24pt; }
  .hero h1 em { color: #7a5a1e; -webkit-text-fill-color: #7a5a1e; }
  .hero-meta, .lede-sub { display: none; }
  .section, .route-section { padding: 14pt 0 0; }
  .chapter, .boss-card, .recipe, .table-wrap { break-inside: avoid; border-color: #d8d2c4; background: #fff; box-shadow: none; }
  .chapter::before { display: none; }
  .chapter-head, .chapter-body { padding: 10pt 12pt; }
  .chapter-head { grid-template-columns: 40pt 1fr; }
  .chapter-progress { grid-column: 2; }
  .chapter-body { grid-template-columns: 1fr; }
  .chapter-aside { grid-template-columns: repeat(2, 1fr); }
  .step, .goal, .aside-block, .tip { border-color: #ddd; background: #fff; }
  .step-title, .chapter-head h2, .section-head h2 { color: #111; }
  .step-desc, .tip p, .goal p, .supply-table td, .chapter-sub { color: #444; }
  .hidden-by-search { display: block !important; }
  a { color: #6b4d17; }
}
