:root {
  --bg: #0f0d17;
  --bg-raise: #181524;
  --bg-sunk: #0a0911;
  --line: #2a2540;
  --text: #ece8f4;
  --muted: #a19bb5;
  --pink: #ff5d8f;
  --orange: #ffa24c;
  --teal: #3fe0c5;
  --violet: #9b7bff;
  --sea: #6cb8ff;
  --sunset: linear-gradient(100deg, #ff5d8f 0%, #ffa24c 100%);
  --radius: 10px;
  --font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Consolas, monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: min(920px, 100% - 2.5rem); margin: 0 auto; padding: 2rem 0 4rem; }
a { color: var(--teal); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
code, .code-value { font-family: var(--mono); }

/* Mode visibility */
html[data-mode='safe'] .full-only,
html[data-mode='safe'] .full-only-inline,
html[data-mode='full'] .safe-only,
html[data-mode='full'] .safe-only-inline { display: none !important; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(15, 13, 23, 0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.5rem; color: var(--text); text-decoration: none; font-weight: 700; }
.brand-mark {
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 6px;
  background: var(--sunset); color: #1a0f1a; font-weight: 900; font-size: 0.85rem;
}
.site-nav { display: flex; gap: 1.25rem; flex: 1; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site-nav a:hover { color: var(--text); }
.mode-toggle {
  display: flex; align-items: center; gap: 0.5rem; cursor: pointer;
  padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-raise); color: var(--text); font: 600 0.9rem var(--font);
}
.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.tip-button {
  display: flex; align-items: center; gap: 0.45rem; white-space: nowrap;
  padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 162, 76, 0.07); color: var(--text); text-decoration: none; font: 600 0.9rem var(--font);
}
.tip-button svg { flex: none; color: var(--orange); }
.tip-button:hover, .tip-button[aria-current='page'] { border-color: rgba(255, 162, 76, 0.6); }
.tip-label-short { display: none; }
.mode-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--pink); }
html[data-mode='safe'] .mode-dot { background: var(--teal); box-shadow: 0 0 10px var(--teal); }

/* Index */
.hero { padding: 2.5rem 0 1rem; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 0.75rem; max-width: 18ch;
  color: var(--pink);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1 {
    background: var(--sunset); -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}
.hero-sub { color: var(--muted); max-width: 60ch; font-size: 1.05rem; }
.group { margin-top: 2.5rem; scroll-margin-top: 5rem; }
.group h2 { font-size: 1.3rem; display: flex; align-items: center; gap: 0.6rem; }
.count { font-size: 0.8rem; color: var(--muted); background: var(--bg-raise); border: 1px solid var(--line); padding: 0.1rem 0.5rem; border-radius: 999px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.card {
  display: flex; flex-direction: column; gap: 0.4rem; padding: 1.1rem 1.2rem;
  background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); text-decoration: none; transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--pink); transform: translateY(-2px); }
.card h3 { margin: 0.2rem 0 0; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--muted); }
.card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: auto; padding-top: 0.5rem; }
.card-tags span { font-size: 0.75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0.05rem 0.4rem; }
.empty { color: var(--muted); }

.status { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.status-solved { color: var(--teal); }
.status-partially-solved { color: var(--orange); }
.status-unsolved { color: var(--pink); }

/* Secret page */
.back { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.secret-meta { display: flex; gap: 1rem; align-items: center; margin-top: 1.5rem; color: var(--muted); font-size: 0.85rem; }
.secret h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); margin: 0.4rem 0 0.6rem; }
.teaser { font-size: 1.15rem; color: var(--muted); max-width: 62ch; margin: 0 0 1.5rem; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.fact-box { background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.fact-box h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 0.6rem; }
.fact-box dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0; font-size: 0.95rem; }
.fact-box dt { color: var(--muted); }
.fact-box dd { margin: 0; }
.rewards { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; font-size: 0.95rem; }
.ach { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--violet); border: 1px solid currentColor; border-radius: 4px; padding: 0 0.3rem; margin-right: 0.2rem; }
.spoiler-item .safe-only-inline { color: var(--muted); font-style: italic; }
.spoiler-item .safe-only-inline::before { content: '🔒 '; font-style: normal; }

.walkthrough h2, .notes h2, .media-list h2, .sources h2 { font-size: 1.35rem; margin-top: 2.5rem; }
.explain { color: var(--muted); max-width: 64ch; }
.steps { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 1rem; }
.step {
  position: relative; background: var(--bg-raise); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.3rem; scroll-margin-top: 5rem;
}
.step.current { border-color: color-mix(in srgb, var(--teal) 55%, var(--line)); }
.step-head { display: flex; align-items: center; gap: 0.75rem; }
.step-head h3 { margin: 0; font-size: 1.1rem; }
.step-num {
  flex: none; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--bg-sunk); border: 1px solid var(--line); font-weight: 700; font-size: 0.9rem; color: var(--orange);
}
.label { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-right: 0.35rem; }
.where { margin: 0.8rem 0 0.6rem; }
.tier { margin: 0.5rem 0; }
.tier-nudge { padding: 0.7rem 0.9rem; border-left: 3px solid var(--teal); background: var(--bg-sunk); border-radius: 0 6px 6px 0; }
.tier-nudge .label { color: var(--teal); }
details.tier { border: 1px solid var(--line); border-radius: 8px; background: var(--bg-sunk); }
details.tier > summary { cursor: pointer; padding: 0.55rem 0.9rem; font-weight: 600; font-size: 0.92rem; list-style: none; }
details.tier > summary::-webkit-details-marker { display: none; }
details.tier > summary::before { content: '+ '; color: var(--muted); }
details.tier[open] > summary::before { content: '− '; }
details.tier > div, details.tier > p { padding: 0 0.9rem 0.6rem; }
details.tier-hint > summary { color: var(--orange); }
details.tier-solution > summary { color: var(--pink); }
.tier-note { color: var(--muted); font-size: 0.85rem; margin: 0 0 0.3rem; }
.next-step {
  margin-top: 0.9rem; cursor: pointer; border: 0; border-radius: 8px; padding: 0.6rem 1rem;
  background: var(--sunset); color: #1a0f1a; font: 700 0.92rem var(--font);
}
.end-note { color: var(--muted); font-size: 0.9rem; margin: 0.9rem 0 0; }
.hidden-steps {
  list-style: none; text-align: center; color: var(--muted); font-size: 0.92rem;
  border: 1px dashed var(--line); border-radius: var(--radius); padding: 1rem;
}
.reset-progress { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: 0.85rem var(--font); }

.solution > :first-child { margin-top: 0.6rem; }
.codes { width: 100%; border-collapse: collapse; margin: 0.8rem 0 0.4rem; font-size: 0.9rem; }
.codes th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--line); padding: 0.4rem 0.5rem; }
.codes td { border-bottom: 1px solid var(--line); padding: 0.5rem; vertical-align: top; }
.code-value { font-size: 1.15rem; font-weight: 700; color: var(--orange); letter-spacing: 0.08em; white-space: nowrap; }
.wrong { color: var(--muted); font-size: 0.82rem; }
.conf { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.1rem 0.4rem; border-radius: 4px; white-space: nowrap; }
.conf-confirmed { color: var(--teal); border: 1px solid var(--teal); }
.conf-likely { color: var(--violet); border: 1px solid var(--violet); }
.conf-disputed { color: var(--orange); border: 1px solid var(--orange); }
.conf-unverified { color: var(--pink); border: 1px solid var(--pink); }

.prose { max-width: 68ch; }
.prose blockquote { margin: 1rem 0; padding: 0.6rem 1rem; border-left: 3px solid var(--orange); background: var(--bg-raise); border-radius: 0 6px 6px 0; }
.prose table { border-collapse: collapse; font-size: 0.9rem; margin: 1rem 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.4rem 0.6rem; text-align: left; vertical-align: top; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.media { display: flex; flex-direction: column; gap: 0.3rem; background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); text-decoration: none; padding-bottom: 0.7rem; }
.media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-sunk); }
.media-title { padding: 0 0.8rem; font-weight: 600; font-size: 0.92rem; }
.media-credit { padding: 0 0.8rem; color: var(--muted); font-size: 0.8rem; }
.media:not(:has(img)) { padding-top: 0.7rem; }

.sources ul { padding-left: 1.1rem; font-size: 0.92rem; }
.sources li { margin: 0.3rem 0; }
.pub { color: var(--muted); }
.weak { font-size: 0.72rem; color: var(--orange); border: 1px solid var(--orange); border-radius: 4px; padding: 0 0.3rem; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; text-align: center; padding: 1.5rem; }

/* Below this the six nav links don't fit beside the name and buttons, so they get their own row. */
@media (max-width: 1140px) {
  .site-header { flex-wrap: wrap; gap: 0.6rem 1rem; }
  .site-nav { order: 3; flex-basis: 100%; gap: 1.1rem; font-size: 0.9rem; }
  .header-actions { margin-left: auto; }
}
/* Phones: keep the name, tip button and spoiler switch on one row. */
@media (max-width: 560px) {
  .site-header { gap: 0.6rem 0.75rem; }
  .brand { gap: 0.45rem; }
  .brand-name { display: flex; flex-direction: column; font-size: 0.85rem; line-height: 1.15; }
  .header-actions { gap: 0.4rem; }
  .tip-button, .mode-toggle { padding: 0.45rem 0.7rem; }
  .tip-button { gap: 0.35rem; }
  .tip-label-long { display: none; }
  .tip-label-short { display: inline; }
}
@media (max-width: 340px) {
  .brand-name { display: none; }
}
@media (max-width: 640px) {
  .codes th:nth-child(3), .codes td:nth-child(3) { display: none; }
}
/* Guides */
.guide-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--sea); }
.card-guide { border-top: 3px solid var(--sea); }
.guide-summary {
  margin: 0 0 2rem; padding: 1rem 1.3rem; max-width: 68ch;
  background: var(--bg-raise); border: 1px solid var(--line); border-left: 3px solid var(--sea); border-radius: 0 var(--radius) var(--radius) 0;
}
.guide-summary h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sea); margin: 0 0 0.5rem; }
.guide-summary ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.35rem; }
.guide-summary .spoiler-item { list-style: none; margin-left: -1.1rem; }
.guide-body .prose { max-width: 72ch; }
.guide-body h2 { font-size: 1.35rem; margin-top: 2.2rem; }
.guide-body h3 { font-size: 1.08rem; margin-top: 1.6rem; }
.guide-body :is(h2, h3)[id] { scroll-margin-top: calc(var(--header-h, 3.6rem) + 1rem); }
.guide-jump { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; padding: 0; list-style: none; }
/* Wide tables scroll sideways on phones instead of squashing. */
.guide-body table { display: block; overflow-x: auto; max-width: 100%; }
.guide-body td:first-child { white-space: nowrap; font-weight: 600; }
.guide-body td small { font-weight: 400; color: var(--muted); }
.guide-body td .code-value { font-size: 1.05rem; }
.guide-body td .conf { display: inline-block; margin-top: 0.3rem; }
/* On phones a table of codes (the cheats page) becomes one card per row, so a code never runs off the screen. */
@media (max-width: 600px) {
  .guide-body table:has(.code-value) { overflow: visible; border: 0; }
  .guide-body table:has(.code-value) thead { display: none; }
  .guide-body table:has(.code-value) :is(tbody, tr, td) { display: block; }
  .guide-body table:has(.code-value) tr { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem 0.8rem; margin-bottom: 0.6rem; }
  .guide-body table:has(.code-value) td { border: 0; padding: 0.15rem 0; white-space: normal; }
  .guide-body table:has(.code-value) td:nth-child(2) { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; }
  .guide-body table:has(.code-value) td:nth-child(2) br { display: none; }
  .guide-body table:has(.code-value) td .conf { margin: 0; }
  .guide-body table:has(.code-value) td:last-child::before { content: "Unlock: "; color: var(--muted); }
}
.guide .sources h2 { font-size: 1.35rem; margin-top: 2.5rem; }

.related h2 { font-size: 1.35rem; margin-top: 2.5rem; }
.related .explain { margin: -0.4rem 0 0.8rem; font-size: 0.92rem; }
.related .cards { margin-top: 0.5rem; }

/* Real ties between secrets: the note is the point, so it gets the room and the card stays small. */
.connections { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.connection {
  position: relative; display: flex; flex-direction: column; gap: 0.35rem; padding: 0.95rem 1.15rem;
  background: var(--bg-raise); border: 1px solid var(--line); border-left: 3px solid var(--violet);
  border-radius: var(--radius); transition: border-color 0.15s, transform 0.15s;
}
.connection:hover { border-color: var(--pink); border-left-color: var(--pink); transform: translateY(-2px); }
.connection:focus-within { border-color: var(--teal); }
.connection-meta { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
/* Raised above the box-wide link below so its tooltip still shows. */
.connection-theory { position: relative; z-index: 1; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--orange); border: 1px solid currentColor; border-radius: 4px; padding: 0 0.35rem; cursor: help; }
.connection-title { font-weight: 700; font-size: 1.05rem; color: var(--text); text-decoration: none; line-height: 1.3; }
/* The whole box is the link. */
.connection-title::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); }
.connection-title:focus-visible { outline: none; }
.connection-why { margin: 0; color: var(--muted); font-size: 0.92rem; }

.filters { display: grid; gap: 0.6rem; margin-top: 1.5rem; }
.filter-row { display: grid; grid-template-columns: 5.5rem 1fr; align-items: start; gap: 0.5rem; }
.filter-name {
  padding-top: 0.45rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted);
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
@media (max-width: 560px) {
  .filter-row { grid-template-columns: 1fr; gap: 0.3rem; }
  .filter-name { padding-top: 0; }
}
.no-results { color: var(--muted); margin: 0.75rem 0 0; }
.no-results[hidden] { display: none; }

/* At-a-glance badges: difficulty (pips), terrain (sea blue), flags (quiet). */
.badges { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.74rem; line-height: 1.5; padding: 0.05rem 0.55rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-sunk); color: var(--muted);
}
.badge-difficulty { color: var(--text); font-weight: 600; }
.pips { display: inline-flex; gap: 2px; }
.pips i { width: 4px; height: 10px; border-radius: 1px; background: var(--line); }
.pips i.on { background: var(--violet); }
.badge-terrain { color: var(--sea); border-color: color-mix(in srgb, var(--sea) 35%, var(--line)); }
.badge-deadly, .badge-combat { color: color-mix(in srgb, var(--pink) 75%, var(--text)); }
.card .badges { margin-top: 0.5rem; }
.secret > .badges { margin: -0.6rem 0 1.5rem; }
.secret > .badges .badge { font-size: 0.8rem; padding: 0.1rem 0.65rem; cursor: help; }

.topic {
  cursor: pointer; border: 1px solid var(--line); background: var(--bg-raise); color: var(--muted);
  border-radius: 999px; padding: 0.35rem 0.85rem; font: 600 0.88rem var(--font);
}
.topic span { opacity: 0.7; font-weight: 400; margin-left: 0.15rem; }
.topic:hover { color: var(--text); }
.topic.active { color: #1a0f1a; background: var(--sunset); border-color: transparent; }
.card[hidden], .group[hidden] { display: none; }

/* Collectibles */
.hero-small { padding-bottom: 1rem; }
.hero-small h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.tracked { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.tracked.is-tracked { color: var(--teal); }
.progress { display: grid; gap: 0.4rem; }
.progress-text { font-size: 0.9rem; color: var(--muted); }
.progress-text strong { color: var(--text); font-size: 1.05rem; }
.progress-note { font-size: 0.85rem; }
.bar { height: 8px; border-radius: 999px; background: var(--bg-sunk); border: 1px solid var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--sunset); transition: width 0.25s; }
.card-progress { margin-top: auto; padding-top: 0.6rem; }
.card-progress .progress-text { font-size: 0.8rem; }

.tracker {
  position: sticky; top: calc(var(--header-h, 3.6rem) + 0.5rem); z-index: 5; display: grid; gap: 0.7rem;
  margin: 1.5rem 0; padding: 0.9rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-raise) 92%, transparent); backdrop-filter: blur(8px);
}
/* On phones the tools take too much of the screen to pin; let the tracker scroll away. */
@media (max-width: 600px) {
  .tracker { position: static; }
  .item-search { flex: 1 1 100%; }
}
.tracker-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; font-size: 0.88rem; color: var(--muted); }
.tracker-tools select, .reset-found {
  font: 0.85rem var(--font); color: var(--text); background: var(--bg-sunk);
  border: 1px solid var(--line); border-radius: 6px; padding: 0.3rem 0.6rem;
}
.reset-found { margin-left: auto; cursor: pointer; color: var(--muted); }
.reset-found:hover { color: var(--text); }
.hide-found-label { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; }

.set { margin: 2rem 0; }
.set h2 { display: flex; align-items: center; gap: 0.6rem; font-size: 1.25rem; }
.set-desc, .set-reward { color: var(--muted); margin: -0.3rem 0 0.8rem; max-width: 64ch; }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.item {
  background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.65rem 1rem; transition: opacity 0.15s, border-color 0.15s;
}
.item.found { opacity: 0.55; }
.item.found .item-name { text-decoration: line-through; text-decoration-color: var(--teal); }
.item-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem; }
.item-check { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; font-weight: 600; }
.item-check input { width: 1.1rem; height: 1.1rem; accent-color: var(--teal); cursor: pointer; }
.item-num { color: var(--muted); font-weight: 400; }
.hidden-name { color: var(--muted); font-style: italic; font-weight: 400; }
.hidden-name::before { content: '🔒 '; font-style: normal; }
.item-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.item-meta > span {
  font-size: 0.72rem; padding: 0.02rem 0.5rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-sunk); color: var(--muted);
}
.item-meta .item-how { color: var(--text); }
.item-meta .item-missable { color: var(--orange); border-color: color-mix(in srgb, var(--orange) 40%, var(--line)); }
.item-loc { margin-top: 0.3rem; font-size: 0.93rem; }
.item-loc p { margin: 0.2rem 0; }
.item-hint { color: var(--muted); }
.item-loc details.tier { margin-top: 0.15rem; border: 0; background: none; }
.item-loc details.tier > summary { display: inline-block; padding: 0.1rem 0; font-size: 0.85rem; color: var(--teal); }
.item-loc details.tier > summary::before { content: '› '; }
.item-loc details.tier[open] > summary::before { content: '⌄ '; }
.item-loc details.tier > div { padding: 0.3rem 0 0.1rem 0.8rem; border-left: 2px solid var(--line); margin-top: 0.25rem; }
.item-loc details.tier > div p { margin: 0.15rem 0; }
.item-unknown { color: var(--muted); font-style: italic; }
.item-how-detail { color: var(--muted); }
.item-extra, .item-notes { margin: 0.45rem 0 0; font-size: 0.85rem; color: var(--muted); }
.item-extra { display: flex; flex-wrap: wrap; gap: 0.1rem 1.1rem; }
.item[hidden], .set[hidden] { display: none; }

/* Big checklists fold each set into one row; the count turns teal when a set is done. */
details.set { margin: 0.6rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-sunk); }
details.set > summary { list-style: none; cursor: pointer; padding: 0.7rem 1rem; }
details.set > summary::-webkit-details-marker { display: none; }
details.set > summary h2 { margin: 0; font-size: 1.1rem; }
details.set > summary h2::before { content: '›'; color: var(--muted); width: 0.8rem; transition: transform 0.15s; }
details.set[open] > summary h2::before { transform: rotate(90deg); }
details.set[open] > summary { border-bottom: 1px solid var(--line); }
details.set > :not(summary) { margin-left: 1rem; margin-right: 1rem; }
details.set > .items { margin-bottom: 1rem; }
details.set > .set-desc { margin-top: 0.8rem; }
.set.complete .set-count { color: var(--teal); border-color: color-mix(in srgb, var(--teal) 45%, var(--line)); }
.item-search {
  font: 0.85rem var(--font); color: var(--text); background: var(--bg-sunk);
  border: 1px solid var(--line); border-radius: 6px; padding: 0.3rem 0.6rem; min-width: 11rem;
}
details.sources > summary { list-style: none; cursor: pointer; }
details.sources > summary::-webkit-details-marker { display: none; }
details.sources > summary h2 { display: flex; align-items: center; gap: 0.6rem; }
details.sources > summary h2::after { content: 'Show'; font-size: 0.8rem; font-weight: 400; color: var(--teal); }
details.sources[open] > summary h2::after { content: 'Hide'; }
.char-checks { display: inline-flex; gap: 0.8rem; margin-left: 0.2rem; }
.char-check { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: var(--muted); cursor: pointer; }
.char-check input { width: 1rem; height: 1rem; accent-color: var(--teal); cursor: pointer; }
.item-head > .item-check:has(+ .char-checks) { cursor: default; }

/* A list item the map linked to. */
.item-target { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.map-link {
  display: inline-flex; align-items: center; gap: 0.4rem; margin: -0.6rem 0 1.4rem; font-size: 0.92rem;
  padding: 0.3rem 0.8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-raise); text-decoration: none;
}
.map-link::before { content: '◉'; color: var(--pink); }
.map-link:hover { border-color: var(--teal); }

/* ---- Map ---- */
main.wide { width: min(1440px, 100% - 2rem); padding-top: 1.25rem; }
.map-intro h1 { margin: 0 0 0.3rem; font-size: 2rem; }
.map-intro .hero-sub { margin: 0 0 1rem; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1rem; align-items: start; }
.map-wrap { position: sticky; top: calc(var(--header-h, 64px) + 0.75rem); }
.leonida-map {
  height: calc(100vh - var(--header-h, 64px) - 1.5rem); min-height: 460px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #2f90b0; font: inherit;
}
.map-error { padding: 2rem; color: var(--bg); font-weight: 600; }
.map-side { display: grid; gap: 0.75rem; min-width: 0; }
.map-callout {
  margin: 0; padding: 0.7rem 0.9rem; font-size: 0.9rem; color: var(--muted);
  background: var(--bg-raise); border: 1px solid var(--line); border-left: 3px solid var(--pink); border-radius: 0 var(--radius) var(--radius) 0;
}
.map-callout strong { color: var(--text); }
.map-filters { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-sunk); }
.map-filters > summary { cursor: pointer; padding: 0.6rem 0.9rem; font-weight: 600; list-style: none; }
.map-filters > summary::-webkit-details-marker { display: none; }
.map-filters > summary::before { content: '› '; color: var(--muted); display: inline-block; transition: transform 0.15s; }
.map-filters[open] > summary::before { transform: rotate(90deg); }
.map-filter-summary { color: var(--muted); font-weight: 400; }
.map-filter-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0 0.9rem 0.5rem; font-size: 0.88rem; }
.map-filter-tools button {
  font: 0.82rem var(--font); color: var(--text); background: var(--bg-raise); cursor: pointer;
  border: 1px solid var(--line); border-radius: 6px; padding: 0.2rem 0.6rem;
}
.map-filter-tools button:hover { border-color: var(--teal); }
.map-filter-tools .hide-found-label { margin-left: auto; }
.map-collections { list-style: none; margin: 0; padding: 0 0.9rem 0.7rem; display: grid; gap: 0.15rem; font-size: 0.9rem; }
.map-collections li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.map-collections label { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.map-collections input, .map-filter-tools input { accent-color: var(--pink); width: 1rem; height: 1rem; cursor: pointer; }
.map-collections .count { font-size: 0.72rem; }
.map-panel { min-width: 0; }
.map-empty { margin: 0; padding: 1.2rem 1rem; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
.map-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.4rem; }
.map-panel-head h2 { margin: 0; font-size: 1.4rem; }
.map-panel-sub { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.88rem; }
.map-close {
  font: 1.3rem/1 var(--font); color: var(--muted); background: none; border: 1px solid var(--line);
  border-radius: 6px; width: 2rem; height: 2rem; cursor: pointer; flex: none;
}
.map-close:hover { color: var(--text); border-color: var(--muted); }
.map-group { margin-top: 1rem; }
.map-group h3 { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 0 0 0.45rem; font-size: 0.95rem; }
.map-group h3 a { color: var(--text); text-decoration: none; }
.map-group h3 a:hover { color: var(--teal); }
.map-group .item { padding: 0.55rem 0.8rem; }
.map-credit { color: var(--muted); font-size: 0.82rem; margin: 0.6rem 0 0; }
.map-unplaced { margin-top: 2rem; max-width: 70ch; }
.map-unplaced h2 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.map-unplaced p { color: var(--muted); margin-top: 0; }
.map-unplaced ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; }

/* Pins: pink with what's left to find, teal once a place is done, orange when open. */
.pin-box { outline: none; }
.pin {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  background: var(--pink); color: #fff; border: 2px solid #fff;
  font: 700 12px/1 var(--font); box-shadow: 0 2px 6px rgba(10, 9, 17, 0.55);
  transform-origin: 50% calc(100% + 9px); transition: transform 0.12s;
}
/* The pointer under each pin, aimed at the place itself. */
.pin::after {
  content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  border: 5px solid transparent; border-top: 8px solid #fff; border-bottom: 0;
}
.pin-box:hover .pin { transform: scale(1.12); }
.pin-box:focus-visible .pin { outline: 3px solid var(--orange); outline-offset: 2px; }
.pin-done { background: var(--teal); color: #08231f; }
.pin-active { background: var(--orange); color: #261303; box-shadow: 0 0 0 4px rgba(255, 162, 76, 0.35), 0 2px 8px rgba(10, 9, 17, 0.6); }
.zoomed-out .pin { transform: scale(0.78); }
.zoomed-out .pin-box:hover .pin { transform: scale(0.95); }
.zoomed-far .pin { transform: scale(0.5); color: transparent; }
.zoomed-far .pin-box:hover .pin { transform: scale(0.65); }
/* The in-game map has no place names, so a pin shows its own once zoomed in. */
.pin-name {
  display: none; position: absolute; left: 50%; top: calc(100% + 12px); transform: translateX(-50%);
  white-space: nowrap; pointer-events: none; color: #fff; font: 600 11px/1.35 var(--font);
  background: rgba(15, 13, 23, 0.78); padding: 0 5px; border-radius: 4px;
}
.show-names .pin-name { display: block; }

/* Leaflet, in the site's colours. */
.leonida-map .leaflet-tooltip {
  background: var(--bg-raise); color: var(--text); border: 1px solid var(--line); border-radius: 6px;
  font: 600 0.82rem var(--font); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.leonida-map .leaflet-tooltip-top::before { border-top-color: var(--line); }
.leonida-map .leaflet-bar { border: 1px solid var(--line); box-shadow: none; }
.leonida-map .leaflet-bar a { background: var(--bg-raise); color: var(--text); border-bottom-color: var(--line); }
.leonida-map .leaflet-bar a:hover { background: var(--bg); }
.leonida-map .leaflet-bar a.leaflet-disabled { color: var(--line); background: var(--bg-sunk); }
.leonida-map .leaflet-control-attribution { background: rgba(15, 13, 23, 0.8); color: var(--muted); font-size: 0.72rem; }
.leonida-map .leaflet-control-attribution a { color: var(--teal); }

@media (max-width: 900px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-wrap { position: static; }
  .leonida-map { height: 62vh; min-height: 360px; }
  .map-panel { scroll-margin-top: calc(var(--header-h, 64px) + 0.5rem); }
}

/* Nav: the section you're in */
.site-nav a[aria-current='page'] { color: var(--text); box-shadow: inset 0 -2px 0 var(--pink); }
.group h2 a { color: inherit; text-decoration: none; }
.group h2 a:hover { color: var(--teal); }

/* Footer */
.site-footer p { margin: 0.4rem auto; max-width: 70ch; }
.footer-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4rem 1.5rem; margin-bottom: 0.8rem; }
.footer-nav a { color: var(--text); }
.site-footer .legal { font-size: 0.78rem; }

/* The tip line at the end of content pages, and the tip pop-up every page has */
.tip-prompt { margin: 2.5rem 0 0; padding: 0.8rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.tip-prompt-cta { color: var(--teal); font-weight: 600; white-space: nowrap; }
.tip-count { color: var(--muted); }

/* "Tips from players": published tips at the end of content pages and the map */
.player-tips { margin: 2.5rem 0 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raise); }
.player-tips[hidden] { display: none; }
.player-tips > summary { padding: 0.75rem 1rem; cursor: pointer; font-weight: 600; }
.player-tips[open] > summary { border-bottom: 1px solid var(--line); }
.player-tips-note { margin: 0.8rem 1rem 0; color: var(--muted); font-size: 0.85rem; }
.player-tips-list { display: grid; gap: 0.75rem; padding: 0.8rem 1rem 1rem; }
.player-tips-empty { margin: 0; color: var(--muted); }
.player-tip { padding: 0.65rem 0.9rem; border-left: 3px solid var(--violet); background: var(--bg-sunk); border-radius: 0 8px 8px 0; }
.player-tip p { margin: 0; }
.player-tip-meta { color: var(--muted); font-size: 0.82rem; }
.player-tip-kind { color: var(--text); }
.player-tip .player-tip-text { margin: 0.3rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.player-tip-by { color: var(--muted); font-size: 0.85rem; }
.player-tips + .tip-prompt { margin-top: 1rem; }
.tip-dialog {
  width: min(40rem, 100% - 2rem); max-width: none; max-height: calc(100dvh - 2rem);
  padding: 0; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg-raise); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  overscroll-behavior: contain;
}
.tip-dialog::backdrop { background: rgba(6, 5, 12, 0.72); backdrop-filter: blur(3px); }
.tip-dialog[open] { animation: tip-in 0.18s ease-out; }
@keyframes tip-in { from { opacity: 0; transform: translateY(12px); } }
.tip-dialog-body { display: grid; gap: 0.9rem; padding: 1.1rem 1.25rem 1.25rem; }
.tip-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.tip-dialog-head h2 { margin: 0; font-size: 1.25rem; }
.tip-close {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; margin: -0.35rem -0.5rem -0.35rem 0;
  border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer;
}
.tip-close:hover { background: var(--bg-sunk); color: var(--text); }
.tip-dialog-sub { margin: -0.45rem 0 0; color: var(--muted); font-size: 0.92rem; }
.tip-dialog-body:has(.tip-sent:not([hidden])) .tip-dialog-sub { display: none; }
.tip-dialog .tip-form { margin: 0; gap: 0.9rem; max-width: none; }
.tip-dialog .tip-sent { margin: 0; max-width: none; display: grid; gap: 0.9rem; }
.tip-dialog .tip-sent[hidden] { display: none; }
.tip-dialog .tip-sent p { margin: 0; }
.tip-sent-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
@media (max-width: 560px) {
  .tip-dialog {
    width: 100%; max-height: 92dvh; margin: auto 0 0;
    border-width: 1px 0 0; border-radius: 16px 16px 0 0;
  }
  .tip-dialog[open] { animation-name: tip-up; animation-duration: 0.22s; }
  @keyframes tip-up { from { transform: translateY(100%); } }
  .tip-dialog-body { padding: 1rem 1rem calc(1.1rem + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .tip-dialog[open] { animation: none; }
}
.tip-inline textarea { min-height: 6rem; }
.tip-about { margin: 0; padding: 0.5rem 0.75rem; border-left: 3px solid var(--pink); background: var(--bg-sunk); border-radius: 0 8px 8px 0; font-size: 0.92rem; }
.tip-about-clear { margin-left: 0.4rem; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 0.85rem; text-decoration: underline; cursor: pointer; }
.tip-kinds { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span { display: inline-block; padding: 0.35rem 0.85rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.9rem; color: var(--muted); background: var(--bg-sunk); }
.pill input:checked + span { border-color: var(--pink); color: var(--text); background: rgba(255, 93, 143, 0.12); }
.pill input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.tip-extras > summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.tip-extras[open] { display: grid; gap: 0.8rem; }
.tip-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.tip-actions .tip-status { flex: 1 1 14rem; }
.tip-this-wrap { margin: 0.6rem 0 0; font-size: 0.85rem; }
.tip-this { color: var(--muted); }
.tip-this:hover { color: var(--teal); }
.item-unknown .tip-this { margin-left: 0.3rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tip form */
.tip-form { display: grid; gap: 1.3rem; max-width: 640px; margin-top: 1rem; }
.tip-form[hidden] { display: none; }
.tip-form .field { display: grid; gap: 0.4rem; border: 0; padding: 0; margin: 0; }
.field-label { font-weight: 600; }
.field-label em { font-weight: 400; color: var(--muted); font-style: normal; }
.field-help { color: var(--muted); font-size: 0.85rem; }
.tip-form select, .tip-form textarea, .tip-form input[type='text'], .tip-form input[type='url'] {
  width: 100%; padding: 0.6rem 0.75rem; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-sunk); color: var(--text); font: inherit;
}
.tip-form textarea { resize: vertical; min-height: 9rem; }
.tip-form :is(select, textarea, input):focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.choice { display: flex; gap: 0.55rem; align-items: baseline; cursor: pointer; }
.choice input { accent-color: var(--pink); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile-slot:empty { display: none; }
.tip-submit {
  justify-self: start; padding: 0.7rem 1.4rem; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--sunset); color: #1a0f1a; font: 700 1rem var(--font);
}
.tip-submit:disabled { opacity: 0.6; cursor: progress; }
.tip-status { margin: 0; min-height: 1.4em; }
.tip-error { color: var(--orange); }
.tip-privacy { margin: 0; color: var(--muted); font-size: 0.82rem; max-width: 60ch; }
.tip-sent { max-width: 640px; margin-top: 1.5rem; padding: 1.2rem 1.4rem; border: 1px solid var(--teal); border-radius: var(--radius); background: var(--bg-raise); }
.tip-sent h2 { margin-top: 0; }
.tip-again, .tip-done { padding: 0.5rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-sunk); color: var(--text); font: 600 0.92rem var(--font); cursor: pointer; }

/* About, 404 */
.about h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.about h2 { font-size: 1.3rem; margin-top: 2rem; }
.not-found-links { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; padding: 0; list-style: none; font-size: 1.05rem; }

/* Mini maps on secret and guide pages (minimap.js). The canvas has its height before Leaflet
   arrives, so nothing jumps when the map draws. */
details.tier-map > summary { color: var(--teal); }
.minimap { margin: 0.5rem 0 0.3rem; }
.minimap-canvas {
  height: 270px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: #2f90b0; font: inherit;
}
.minimap-route .minimap-canvas { height: 340px; }
/* leaflet.css arrives after this file, so beat its grey .leaflet-container background. */
.minimap-canvas.leaflet-container { background: #2f90b0; font: inherit; }
.minimap-loading .minimap-canvas::before {
  content: 'Loading the map…'; display: grid; place-items: center; height: 100%;
  color: #0b2530; font-weight: 600; font-size: 0.9rem;
}
.minimap-error { margin: 0; padding: 1.5rem 1rem; color: #0b2530; font-weight: 600; }
.minimap figcaption {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 0.3rem 1rem; margin-top: 0.45rem; font-size: 0.88rem;
}
.minimap-key { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.2rem; }
.minimap-tag {
  display: inline-grid; place-items: center; min-width: 1.3rem; height: 1.3rem; padding: 0 0.25rem;
  border-radius: 999px; background: var(--pink); color: #fff; font-weight: 700; font-size: 0.72rem;
}
.minimap-area { color: var(--muted); font-size: 0.82rem; }
.minimap-big { color: var(--teal); white-space: nowrap; }
/* An area's tag sits in the middle of its circle, without the pointer. */
.pin-area::after { display: none; }
.pin-area { transform-origin: 50% 50%; }
.minimap-canvas .leaflet-tooltip {
  background: var(--bg-raise); color: var(--text); border: 1px solid var(--line); border-radius: 6px;
  font: 600 0.8rem var(--font); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.minimap-canvas .leaflet-tooltip-top::before { border-top-color: var(--line); }
.minimap-canvas .leaflet-bar { border: 1px solid var(--line); box-shadow: none; }
.minimap-canvas .leaflet-bar a { background: var(--bg-raise); color: var(--text); border-bottom-color: var(--line); }
.minimap-canvas .leaflet-bar a:hover { background: var(--bg); }
.minimap-canvas .leaflet-bar a.leaflet-disabled { color: var(--line); background: var(--bg-sunk); }
.minimap-canvas .leaflet-control-attribution { background: rgba(15, 13, 23, 0.8); color: var(--muted); font-size: 0.68rem; }
.minimap-canvas .leaflet-control-attribution a { color: var(--teal); }

/* Our own screenshots on steps and in guides. */
.shots { display: grid; gap: 0.7rem; margin: 0.8rem 0; }
.shot { margin: 0; max-width: 640px; }
.shot img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-sunk); }
.shot figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 0.3rem; }

@media (max-width: 600px) {
  .minimap-canvas { height: 220px; }
  .minimap-route .minimap-canvas { height: 280px; }
}
/* The spot a secret or guide page sent you to the big map for. */
.pin-asked { background: var(--orange); cursor: default; }
