:root {
  --bg: #141c16;
  --ink: #1d1a14;
  --paper: #f4efe4;
  --paper-2: #e7efe0;
  --moss: #7ea36a;
  --amber: #e2a15a;
  --amber-deep: #8a5318;
  --spore: #d7decc;
  --muted: #3e4638;
  --line: #e0d6c6;
  --danger: #6e2e24;
  --danger-bg: #f8e6df;
  --hollow: #5d4d96;
  --snow: #2d6278;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Segoe UI", Candara, system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(226, 161, 90, 0.18), transparent 55%),
    radial-gradient(800px 480px at 100% 0%, rgba(126, 163, 106, 0.16), transparent 50%),
    var(--bg);
  color: var(--spore);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
}

button, input { font: inherit; color: inherit; }

button { cursor: pointer; }

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

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--amber);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 5;
}

.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.top, .shell, .colophon, .finder, .site-nav {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.site-nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 4px; }

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(215, 222, 204, 0.35);
  color: var(--spore);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
}

.site-nav a[aria-current="page"] {
  background: var(--amber);
  border-color: var(--amber);
  color: #1d1a14;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 32px 0 8px;
}

.brand { display: flex; gap: 16px; align-items: center; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.mark {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  display: block;
}

.ico {
  width: 1.15em;
  height: 1.15em;
  display: inline-block;
  vertical-align: -0.2em;
  flex: none;
  overflow: visible;
}

.eyebrow, .section-label, .kicker, .pill, .quest-lv, .clock strong {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 2px;
  font-size: 0.74rem;
  color: var(--amber);
}

.brand h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 600;
  line-height: 0.95;
  color: #f7f3ea;
}

.tag { margin: 6px 0 0; max-width: 46ch; color: var(--spore); }

.clocks { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

.clock {
  min-width: 148px;
  padding: 10px 12px;
  border: 1px solid rgba(215, 222, 204, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.clock strong { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 650; color: #c5d0b4; }

.clock span {
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--amber);
}

.shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 22px;
  padding: 18px 0 28px;
}

.shell-solo { grid-template-columns: minmax(0, 1fr); }

.shell > *,
.route > *,
.top > * { min-width: 0; }

.rail {
  position: sticky;
  top: 14px;
  align-self: start;
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(215, 222, 204, 0.14);
  border-radius: 18px;
  background: rgba(20, 32, 24, 0.72);
}

fieldset { margin: 0; padding: 0; border: 0; }

legend {
  padding: 0;
  margin-bottom: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c5d0b4;
}

.worlds { display: grid; gap: 8px; }

.world {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(215, 222, 204, 0.18);
  border-radius: 12px;
  cursor: pointer;
}

.world:has(input:checked) {
  border-color: var(--amber);
  background: rgba(226, 161, 90, 0.12);
}

.world input { accent-color: var(--amber); width: 18px; height: 18px; }

.world strong, .world small { display: block; }

.world strong { font-size: 0.98rem; color: #f4efe4; }

.world small { color: #b7c2aa; }

.level-block { margin: 16px 0; }

.level-top { display: flex; justify-content: space-between; align-items: baseline; }

.level-top label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c5d0b4;
}

#level-num {
  width: 4.4rem;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: right;
  font-family: var(--serif);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--amber);
  appearance: textfield;
}

#level-num::-webkit-outer-spin-button,
#level-num::-webkit-inner-spin-button { appearance: none; margin: 0; }

input[type="range"] { width: 100%; margin-top: 8px; accent-color: var(--amber); }

.band-label { min-height: 1.4em; margin: 4px 0 0; color: #c5d0b4; }

.views { display: flex; flex-wrap: wrap; gap: 6px; }

.views button, .jobs button, .filters button, .ghost, .calls button, .calls a, .jump, .steps button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid rgba(215, 222, 204, 0.28);
  background: transparent;
  color: var(--spore);
  padding: 8px 12px;
  min-height: 42px;
}

.world-ico {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--amber);
}

.world:has(input:checked) .world-ico { background: rgba(226, 161, 90, 0.22); }

.world-ico .ico, .views button .ico, .ghost .ico { width: 18px; height: 18px; }

.views button[aria-pressed="true"],
.jobs button[aria-pressed="true"] {
  background: var(--amber);
  border-color: var(--amber);
  color: #1d1a14;
  font-weight: 650;
}

.jobs { display: flex; flex-wrap: wrap; gap: 6px; }

.finder { position: relative; margin-top: 8px; }

.find-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 6px 12px;
  border-radius: 14px;
  border: 1px solid rgba(215, 222, 204, 0.28);
  background: rgba(20, 32, 24, 0.72);
  color: var(--amber);
}

.find-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #f4efe4;
  min-height: 36px;
}

.find-row input::placeholder { color: #b7c2aa; }

.find-row input::-webkit-search-cancel-button { cursor: pointer; }

.find-results {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 320px;
  overflow: auto;
  display: grid;
  gap: 4px;
  padding: 6px;
  border-radius: 14px;
  background: #1c2820;
  border: 1px solid rgba(215, 222, 204, 0.28);
  box-shadow: var(--shadow);
}

.find-results[hidden] { display: none; }

.find-hit {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #f4efe4;
  padding: 8px;
  min-height: 42px;
}

.find-hit[aria-selected="true"] {
  border-color: var(--amber);
  background: rgba(226, 161, 90, 0.14);
}

.find-hit strong, .find-hit small { display: block; }

.find-hit small { color: #b7c2aa; font-size: 0.82rem; }

.find-hit .ico { width: 18px; height: 18px; margin-top: 2px; color: var(--amber); }

.find-empty { margin: 4px 8px; color: #b7c2aa; }

.quest-count { margin: 14px 0; color: #c5d0b4; }

.ghost { width: 100%; }

.sheet {
  color-scheme: light;
  background:
    linear-gradient(90deg, rgba(226, 161, 90, 0.35), rgba(226, 161, 90, 0.35)) 0 0 / 8px 100% no-repeat,
    var(--paper);
  color: var(--ink);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 26px 26px 32px 34px;
  min-height: 70vh;
}

.sheet h2, .sheet h3, .path-title {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sheet h2 { margin: 0 0 0.25rem; font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.12; }

.sheet h3 { margin: 0 0 0.2rem; font-size: 1.35rem; }

.lead, .blurb, .why { margin: 0.2rem 0 0.8rem; }

.lead { max-width: 68ch; }

.route {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.path {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 100%;
}

.path button {
  width: 100%;
  text-align: left;
  border: 0;
  border-left: 3px solid rgba(29, 26, 20, 0.16);
  border-radius: 0 12px 12px 0;
  background: transparent;
  color: inherit;
  padding: 7px 8px 7px 10px;
}

.path button[aria-current="true"] {
  border-left-color: var(--amber-deep);
  background: rgba(226, 161, 90, 0.2);
}

.path-range, .section-label {
  display: block;
  font-size: 0.72rem;
  color: var(--amber-deep);
}

.path-title { display: block; font-size: 0.95rem; }

.path-map, .path-also, .meta, .fine, .alt small, .boss small, .event small {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.section-label { margin: 0 0 4px; }

.banner, .note, .hazard, .call {
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 12px;
}

.note, .call { background: var(--paper-2); }

.hazard {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--danger-bg);
  color: var(--danger);
}

.hazard .ico { width: 16px; height: 16px; margin-top: 2px; color: var(--danger); }

.banner { background: #f7e7cf; }

.card, .alt-wrap, .boss, .event, .extra, .watch-card, .stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
}

.card { padding: 14px 14px 12px; margin: 0 0 12px; overflow: hidden; }

.card-hero { padding-top: 0; }

.scene {
  display: block;
  width: calc(100% + 28px);
  height: 112px;
  margin: 0 -14px 12px;
}

.card.victoria { box-shadow: inset 4px 0 0 var(--moss); }
.card.hollow { box-shadow: inset 4px 0 0 var(--hollow); }
.card.ossyria { box-shadow: inset 4px 0 0 var(--snow); }

.kicker, .filters, .calls, .meta-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.kicker { margin-bottom: 6px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #efe6d4;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
}

.pill-best { background: #d9e8cf; }
.pill-role { background: #f3d7cf; }
.pill-hol { background: #e4def6; color: var(--hollow); }
.pill-oss { background: #d7e7ef; color: var(--snow); }

.drops { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 8px 0 0; list-style: none; }

.drops li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3ecdf;
  font-size: 0.86rem;
}

.drop-yours { background: #d9e8cf; box-shadow: inset 0 0 0 1px #7ea36a; }

.stat-yours { background: #f3f8ef; box-shadow: inset 3px 0 0 var(--moss); }

.flash { box-shadow: inset 0 0 0 2px var(--amber-deep); }

.drops .ico, .pill .ico, .quest-title .ico { width: 14px; height: 14px; }

.drops .ico, .with-ico .ico, .icon-list .ico, .quest-title .ico { color: var(--amber-deep); }

.with-ico { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }

.with-ico > span { min-width: 0; }

.with-ico .ico { margin-top: 0.16em; }

.quest > span:last-child { min-width: 0; }

.note strong.with-ico { display: inline-flex; vertical-align: -0.15em; }

.quest-title { display: flex; align-items: center; gap: 6px; }

.icon-list { list-style: none; padding: 0; margin: 8px 0 0; }

.icon-list li { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 8px; }

.icon-list .ico { width: 16px; height: 16px; margin-top: 3px; }

.clock .ico { width: 14px; height: 14px; }

.stack { display: grid; gap: 8px; margin: 8px 0 14px; }

.alt {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 10px 12px;
}

.alt-wrap { overflow: hidden; }

.alt-body { padding: 0 12px 12px; }

.filters { margin: 8px 0 14px; }

.filters button[aria-pressed="true"], .steps button[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.sheet .filters button, .sheet .calls button, .sheet .calls a, .sheet .jump, .sheet .steps button, .sheet .tiny {
  color: var(--ink);
  border-color: #cbbfaa;
  background: transparent;
}

.sheet .filters button[aria-pressed="true"],
.sheet .steps button[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper);
}

.calls { margin-top: 8px; }

.calls a { text-decoration: none; }

.jump, .tiny { min-height: 42px; }

.tiny { margin-top: 8px; }

.group { margin: 18px 0; }

.quest {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.quest input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--moss-deep, #2f4a34); }

.quest-lv { font-size: 0.78rem; color: var(--amber-deep); padding-top: 4px; }

.quest.done strong { text-decoration: line-through; color: var(--muted); }

.quest.locked { opacity: 0.78; }

.steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }

.steps button { border-radius: 999px; border: 1px solid #cbbfaa; background: transparent; color: var(--ink); padding: 8px 12px; min-height: 42px; }

.steps button .ico { width: 16px; height: 16px; }

.stage {
  padding: 14px;
  border-radius: 14px;
  background: #fffdf8;
  border: 1px solid var(--line);
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.board-wrap { overflow-x: auto; margin: 8px 0 12px; }

.board { width: 100%; border-collapse: collapse; font-size: 0.95rem; }

.board th, .board td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }

.board th { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--amber-deep); }

.board td.num, .board th.num { text-align: right; font-variant-numeric: tabular-nums; }

.board tr.pick { cursor: pointer; }

.board tr.pick[aria-expanded="true"] { background: rgba(126, 163, 106, 0.12); }

.owl-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }

.owl-tools input, .owl-tools select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf8;
  color: var(--ink);
  padding: 8px 10px;
}

.owl-tools input { flex: 1 1 220px; min-width: 0; }

.owl-tools select { flex: 0 1 180px; }

.bars { display: flex; align-items: flex-end; gap: 3px; height: 42px; min-width: 140px; }

.bars span {
  display: block;
  width: 8px;
  min-height: 2px;
  background: #2f4a34;
  border-radius: 2px 2px 0 0;
}

.band {
  display: grid;
  grid-template-columns: 6.2rem 1fr;
  gap: 4px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.band strong { color: var(--amber-deep); }

.mobs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }

.mob {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 4px;
  border-radius: 999px;
  background: rgba(47, 74, 52, 0.08);
  font-size: 0.82rem;
}

.mob .ico { width: 22px; height: 22px; color: #2f4a34; }

.mobs-compact .mob { padding: 2px; }

.page-anchor { scroll-margin-top: 12px; }

.boss, .event, .extra, .watch-card, .stat { padding: 12px 14px; }

.boss h3, .event h3, .extra h3, .watch-card h3, .stat h3 { font-size: 1.12rem; }

.colophon { padding: 8px 0 48px; color: #b7c2aa; font-size: 0.92rem; }

.colophon p { margin: 0 0 8px; max-width: 85ch; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: #f4efe4;
  color: #1d1a14;
  border-radius: 999px;
  padding: 10px 16px;
  box-shadow: var(--shadow);
}

@media (max-width: 860px) {
  .top, .shell, .finder, .site-nav { width: min(100% - 20px, 1180px); }
  .top { flex-direction: column; align-items: flex-start; padding-top: 20px; }
  .clocks { justify-content: flex-start; }
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; max-height: none; overflow: visible; }
  .route { grid-template-columns: 1fr; }
  .path {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .path li { min-width: 168px; }
  .path button { min-height: 92px; border-left: 0; border-top: 3px solid rgba(29, 26, 20, 0.16); border-radius: 12px; }
  .path button[aria-current="true"] { border-top-color: var(--amber-deep); }
  .split, .quest, .band { grid-template-columns: 1fr; }
  .quest { grid-template-columns: auto auto 1fr; }
  .sheet { padding: 18px 14px 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
