:root {
  --bg: #1B1E24;
  --panel: #24282F;
  --panel-raised: #2C313A;
  --line: #3A404B;
  --parchment: #C9B896;
  --amber: #C9862A;
  --amber-bright: #E0A752;
  --text: #E9E5DA;
  --text-dim: #9BA0AA;
  --text-faint: #6B7078;
  --good: #7FA876;
  font-family: 'IBM Plex Sans', sans-serif;
}
:root:not([data-theme="light"]) { color-scheme: dark; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F3F0E7;
    --panel: #FFFFFF;
    --panel-raised: #FBFAF6;
    --line: #DEDACB;
    --parchment: #7A6A45;
    --amber: #A8631C;
    --amber-bright: #8A4F14;
    --text: #262219;
    --text-dim: #6B6252;
    --text-faint: #948A76;
    --good: #4B7A43;
  }
}
:root[data-theme="dark"] {
  --bg: #1B1E24; --panel: #24282F; --panel-raised: #2C313A; --line: #3A404B;
  --parchment: #C9B896; --amber: #C9862A; --amber-bright: #E0A752;
  --text: #E9E5DA; --text-dim: #9BA0AA; --text-faint: #6B7078; --good: #7FA876;
}

* { box-sizing: border-box; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
body {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

header.masthead {
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
  margin-bottom: 36px;
}
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  color: var(--amber-bright);
  letter-spacing: 0.02em;
  margin: 0 0 10px;
}
h1 {
  font-family: 'Fraunces', serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.08;
  margin: 0 0 12px;
  color: var(--text);
}
.sub {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 58ch;
  margin: 0 0 10px;
}
.scope-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-faint);
  max-width: 58ch;
  margin: 0;
}
.scope-note strong { color: var(--text-dim); font-weight: 500; }

.result-banner {
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 22px 24px;
  margin-bottom: 32px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.result-banner .label {
  font-size: 13.5px;
  color: var(--text-dim);
}
.result-banner .winner {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 21px;
  color: var(--amber-bright);
}
.result-banner .rate {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  color: var(--good);
  white-space: nowrap;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.table-scroll { overflow-x: auto; margin-bottom: 8px; }
thead th {
  text-align: left;
  font-weight: 500;
  font-size: 12.5px;
  color: var(--text-faint);
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
thead th.num, td.num { text-align: right; }
tbody td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tbody tr.best { background: color-mix(in srgb, var(--amber) 10%, transparent); }
.monster-name { font-weight: 500; }
.monster-meta { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--text-faint); margin-top: 2px;}
td.num, .eggs-rate { font-family: 'IBM Plex Mono', monospace; }
.eggs-rate { font-weight: 600; color: var(--good); }
.approx { color: var(--text-faint); font-size: 12px; }
td.drops { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--text-dim); }
.drop-line { white-space: nowrap; }
td.num { white-space: nowrap; }
td.why { font-size: 13px; line-height: 1.45; color: var(--text-dim); min-width: 220px; }
.sub a { color: var(--amber-bright); }
.drop-line + .drop-line { margin-top: 3px; }

input.sec-input {
  width: 56px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 3px;
  text-align: right;
}
input.sec-input:focus {
  outline: none;
  border-color: var(--amber);
}

.picker {
  position: relative;
  margin-bottom: 40px;
}
.picker label {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.picker input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 16px;
  padding: 13px 16px;
  border-radius: 4px;
}
.picker input:focus {
  outline: none;
  border-color: var(--amber);
}
.picker-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 4px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 10;
  display: none;
}
.picker-results.open { display: block; }
.picker-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  cursor: pointer;
  font-size: 14.5px;
  border-bottom: 1px solid var(--line);
}
.picker-result:last-child { border-bottom: none; }
.picker-result:hover, .picker-result.active { background: color-mix(in srgb, var(--amber) 12%, transparent); }
.picker-result .icon { font-size: 17px; }
.picker-empty { padding: 14px 16px; font-size: 13.5px; color: var(--text-faint); }
.item-icon { font-size: 0.85em; margin-right: 8px; }

.show-more {
  margin-top: 12px;
  background: none;
  border: 1px solid var(--line);
  color: var(--amber-bright);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 3px;
  cursor: pointer;
}
.show-more:hover { border-color: var(--amber); }
.show-more[hidden] { display: none; }

.note {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-faint);
}
.note strong { color: var(--text-dim); font-weight: 500; }
.note a { color: var(--amber-bright); }

footer {
  margin-top: 40px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-faint);
}
footer a, .crumbs a, .source-link a { color: var(--text-dim); }

.crumbs {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  color: var(--text-faint);
  margin: 0 0 18px;
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--amber-bright); }
.eyebrow a { color: inherit; text-decoration: none; }

.source-link { font-size: 13px; color: var(--text-faint); margin: 10px 0 0; }

h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 22px;
  margin: 44px 0 14px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips a {
  display: inline-block;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}
.chips a:hover { border-color: var(--amber); color: var(--amber-bright); }

.az-letter {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--amber-bright);
  font-size: 13px;
  margin: 22px 0 6px;
}
.az-list {
  columns: 3 200px;
  column-gap: 24px;
  margin: 0; padding: 0; list-style: none;
  font-size: 13.5px;
  line-height: 1.9;
}
.az-list a { color: var(--text-dim); text-decoration: none; }
.az-list a:hover { color: var(--amber-bright); }
.az-jump { display: flex; flex-wrap: wrap; gap: 4px 10px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; }
.az-jump a { color: var(--text-dim); text-decoration: none; }

@media (max-width: 480px) {
  .wrap { padding: 32px 16px 60px; }
  thead th, tbody td { padding: 10px 8px; }
}
