:root {
  --night: #12323a;
  --night-deep: #0c1c22;
  --plaster: #d5ddd4;
  --plaster-2: #e7eee6;
  --ink: #1a2421;
  --muted: #3e524c;
  --seal: #b4332a;
  --gold: #d6b25e;
  --water: #1f6f6a;
  --line: rgba(26, 36, 33, 0.16);
  --nav-h: 64px;
  --serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--night-deep);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}
button, input { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.shell {
  width: min(430px, 100%);
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--plaster);
}
.view { display: none; padding-bottom: calc(var(--nav-h) + 28px); }
.view.is-on { display: block; }

.hero { position: relative; color: #e7eee4; background: var(--night); }
.hero img { display: block; width: 100%; height: 42dvh; object-fit: cover; object-position: center 46%; }
.hero-copy {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 56px 20px 18px;
  background: linear-gradient(to top, rgba(12, 28, 34, 0.94), transparent);
}
.hero h1 { margin: 0; font-family: var(--serif); font-size: 42px; line-height: 1; font-weight: 700; }
.hero p { margin: 8px 0 0; max-width: 22em; }

.tools { padding: 14px 16px 0; position: sticky; top: 0; background: var(--plaster); z-index: 2; }
.tools input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--plaster-2);
  padding: 10px 12px;
}
.filters { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; }
.filters button, .nav button, .back {
  border: 0; background: transparent; cursor: pointer;
}
.filters button {
  flex: 0 0 auto;
  padding: 6px 10px;
  color: var(--muted);
}
.filters button[aria-pressed="true"] {
  color: var(--plaster);
  background: var(--seal);
}
.count { margin: 0 16px 8px; color: var(--muted); font-size: 13px; }

.spot-list { padding: 0 12px 12px; }
.spot {
  width: 100%;
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 12px 4px;
  cursor: pointer;
}
.spot img { width: 84px; height: 84px; object-fit: cover; background: var(--night); }
.spot b { display: block; font-family: var(--serif); font-size: 18px; font-weight: 700; }
.spot small { color: var(--muted); }
.mini { display: flex; gap: 8px; margin-top: 8px; }
.mini span { flex: 1; height: 4px; background: rgba(26, 36, 33, 0.12); }
.mini i { display: block; height: 4px; background: var(--water); }
.mini i.g { background: var(--seal); }

.charts { padding: 22px 18px 0; }
.chart { margin: 0 0 26px; }
.chart h2, .overlay-copy h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
}
.chart p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.bar-row {
  display: grid;
  grid-template-columns: 88px 1fr 52px;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
  font-size: 14px;
}
.track { display: block; height: 10px; background: rgba(26, 36, 33, 0.1); }
.fill { height: 10px; background: var(--water); }
.fill.seal { background: var(--seal); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.threshold { width: 100%; height: auto; }
.threshold text { font-family: var(--sans); font-size: 12px; fill: var(--ink); }
.pay { list-style: none; margin: 0; padding: 0; }
.pay li {
  display: flex; justify-content: space-between;
  border-top: 1px solid var(--line); padding: 10px 0;
}
.pay b { font-variant-numeric: tabular-nums; color: var(--seal); }

.overlay {
  position: fixed;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: min(430px, 100%);
  height: 100dvh;
  overflow: auto;
  background: var(--plaster);
  z-index: 8;
}
.overlay[hidden] { display: none; }
.back {
  position: sticky; top: 0; z-index: 2;
  display: block; width: 100%;
  text-align: left; padding: 14px 16px;
  background: var(--plaster-2);
  border-bottom: 1px solid var(--line);
}
.cover { display: block; width: 100%; height: 240px; object-fit: cover; background: var(--night); }
.overlay-copy { padding: 16px 16px 40px; }
.kicker { margin: 0; color: var(--seal); }
.overlay-copy h2 { font-size: 32px; }
.score { display: grid; gap: 8px; margin: 12px 0 18px; }
.score div { display: grid; grid-template-columns: 52px 1fr 36px; gap: 8px; align-items: center; font-size: 14px; }
.game {
  margin: 0 0 16px;
  background: var(--night);
  color: #e7eee4;
}
.game img { display: block; width: 100%; height: 210px; object-fit: cover; }
.game div { padding: 12px 14px 16px; }
.game h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 22px; }
.game .prior { margin: 0 0 6px; color: var(--gold); }
.game p { margin: 0; color: #c5d2cb; }

.nav {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(430px, 100%); height: var(--nav-h);
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--plaster-2); border-top: 1px solid var(--line); z-index: 5;
}
.nav button { color: var(--muted); }
.nav button[aria-pressed="true"] { color: var(--seal); font-weight: 700; }
.empty { padding: 24px 16px; color: var(--muted); }
