.totk-guide-page {
  min-width: 0;
  background: #101815;
  color: #f3eee2;
}

.totk-guide-header, .totk-guide-footer {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .35rem 1.4rem;
  padding-block: .6rem;
  border-bottom: 1px solid #30483e;
}

.totk-guide-header nav { display: flex; align-items: center; flex-wrap: wrap; gap: .125rem 1rem; }
.totk-guide-header a, .totk-guide-footer a { color: #d6e3d6; min-height: 2.75rem; display: inline-flex; align-items: center; }
.totk-guide-header a[aria-current='page'] { text-decoration: underline; text-underline-offset: .2em; color: #f5d798; }
.totk-guide-header a:focus-visible, .totk-guide-footer a:focus-visible, .guide-skip-link:focus-visible { outline: 2px solid #f5d798; outline-offset: 3px; }
.totk-guide-header .totk-guide-brand { color: #f3eee2; font-weight: 700; gap: .45rem; text-decoration: none; }
.totk-guide-footer { border-bottom: 0; border-top: 1px solid #30483e; }
.guide-skip-link:not(:focus) { clip-path: inset(50%); position: absolute; width: 1px; height: 1px; white-space: nowrap; overflow: hidden; }
.guide-skip-link:focus { position: absolute; z-index: 1; top: 1rem; left: 1rem; padding: .65rem; color: #10201c; background: #f5d798; }
.totk-guide-hero { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(0, 1fr); gap: clamp(1rem, 4vw, 3rem); align-items: center; }
.totk-guide-hero > img { width: 100%; border: 1px solid #385247; }
.totk-guide-page .guide-reader h2 { font-size: clamp(1.5rem, 2.7vw, 2.15rem); }
.totk-guide-page .guide-reader h3 { font-size: clamp(1.06rem, 1.6vw, 1.21rem); }
.totk-related { border-block-start: 1px solid #30483e; }

.totk-explorer {
  --totk-border: #385247;
  --totk-ink: #eaf0e6;
  --totk-muted: #b5c7ba;
  --totk-accent: #f5d798;
  color: var(--totk-ink);
  margin-block: 1.25rem;
}

.totk-explorer fieldset {
  display: grid;
  grid-template-columns: minmax(12rem, 2fr) repeat(2, minmax(7.75rem, 1fr));
  gap: .8rem;
  align-items: end;
  border: 0;
  padding: 0;
  min-width: 0;
  margin: 0 0 .8rem;
}

.totk-explorer fieldset > label { display: grid; gap: .35rem; line-height: 1.3; min-width: 0; }
.totk-explorer label:has(input[type='checkbox']) { display: flex; align-items: center; gap: .45rem; min-height: 2.75rem; }
.totk-explorer fieldset > label:has(input[type='checkbox']) { grid-column: 1 / -1; min-height: 2.25rem; }
.totk-explorer input[type='checkbox'] { width: 1.2rem; height: 1.2rem; accent-color: var(--totk-accent); flex: 0 0 auto; }

.totk-explorer input[type='search'], .totk-explorer select, .totk-explorer button {
  color: inherit;
  background: #13251f;
  border: 1px solid var(--totk-border);
  border-radius: .5rem;
  min-height: 2.75rem;
  padding: .45rem .68rem;
  font: inherit;
  transition: background-color 140ms ease-out, border-color 140ms ease-out;
}

.totk-explorer input[type='search'], .totk-explorer select { width: 100%; min-width: 0; }
.totk-explorer input::placeholder { color: var(--totk-muted); }
.totk-explorer button { cursor: pointer; }
.totk-explorer button:disabled { opacity: .55; cursor: default; }
.totk-explorer button:active:enabled { background: #314e40; }
.totk-explorer :focus-visible { outline: 2px solid var(--totk-accent); outline-offset: 3px; }

@media (hover: hover) {
  .totk-explorer button:hover:enabled { background: #253d31; border-color: #849d8e; }
}

.totk-explorer__toolbar, .totk-explorer__pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  flex-wrap: wrap;
}

.totk-explorer__toolbar p, .totk-explorer__pagination p { margin: 0; color: var(--totk-muted); }
.totk-explorer__toolbar div { display: flex; gap: .4rem; }
.totk-explorer__map {
  --totk-ground: var(--bg-paper, #faf6ec);
  --totk-label: var(--text-primary, #141418);
  --totk-grid: var(--border-hairline, #d6cebc);
  --totk-axis: var(--text-muted, #5c5a56);
  --totk-dot: var(--accent-ruby, #cc2030);
  display: block; width: 100%; height: clamp(16rem, 48vw, 34rem); margin: .75rem 0;
  background: var(--totk-ground); color: var(--totk-label);
  border: 1px solid var(--totk-border); border-radius: .75rem; cursor: crosshair;
}

.totk-explorer__detail {
  padding: .85rem 1rem;
  border: 1px solid var(--totk-border);
  background: #14251f;
  border-radius: .75rem;
  margin-block: .75rem 1.25rem;
  scroll-margin-top: 7rem;
}

.totk-explorer__detail h3, .totk-explorer__detail p { margin: 0 0 .35rem; }
.totk-explorer__detail p:last-child { margin-bottom: 0; }
.totk-explorer__locations { padding: 0; margin: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 1.35rem; }
.totk-explorer__locations li { padding: .6rem 0 .85rem; border-top: 1px solid var(--totk-border); }
.totk-explorer__locations li > div:first-child { display: flex; justify-content: space-between; gap: .6rem; align-items: center; flex-wrap: wrap; }
.totk-explorer__locations li strong { font-size: 1.025rem; }
.totk-explorer__locations li p { margin: 0 0 .55rem; color: var(--totk-muted); font-size: .93rem; }
.totk-coordinate-links { display: flex; gap: .4rem; flex-wrap: wrap; }
.totk-coordinate-links button { font-variant-numeric: tabular-nums; white-space: nowrap; }
.totk-explorer__pagination { margin-block: .75rem; justify-content: center; }
.totk-reference { margin: 1.5rem 0 0; }
.totk-reference summary { display: list-item; cursor: pointer; padding: .65rem 0; }
.totk-reference li { margin-block: .4rem; }
.totk-reference bdi, .totk-coordinates { font-variant-numeric: tabular-nums; }
.totk-guide-links { display: flex; flex-wrap: wrap; gap: .65rem 1.35rem; list-style: none; padding-inline-start: 0; }

@media (max-width: 40rem) {
  .totk-guide-header, .totk-guide-footer { width: min(100% - 1.5rem, 72rem); }
  .totk-guide-hero { grid-template-columns: 1fr; }
  .totk-guide-hero > img { max-height: 11rem; object-fit: cover; }
  .totk-explorer fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .totk-explorer fieldset > label:has(input[type='search']) { grid-column: 1 / -1; }
  .totk-explorer__locations { grid-template-columns: 1fr; }
}

@media (max-width: 23rem) {
  .totk-explorer fieldset { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .totk-explorer button { transition: none; }
}
