:root {
  --bg0: #0b0907;
  --bg1: #16110c;
  --bg2: #221a13;
  --ink: #f3eadc;
  --ink-dim: #b7aa98;
  --ink-mute: #7d7266;
  --line: rgba(243, 234, 220, 0.1);
  --card: rgba(20, 15, 10, 0.55);
  --card-solid: #16110c;
  --gold: #e8a54b;
  --accent: #e8a54b;
  --ember: #e35a2b;
  --teal: #5ec2c7;
  --green: #3faf6b;
  --glass: rgba(255, 244, 220, 0.06);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
}

[data-theme="light"] {
  --bg0: #f3ece2;
  --bg1: #efe6d8;
  --bg2: #e4d8c6;
  --ink: #2a2118;
  --ink-dim: #5c5146;
  --ink-mute: #8a7d6e;
  --line: rgba(42, 33, 24, 0.12);
  --card: rgba(255, 250, 242, 0.7);
  --card-solid: #faf4ea;
  --glass: rgba(42, 33, 24, 0.05);
  --shadow: 0 20px 50px rgba(80, 50, 20, 0.12);
  --accent: #c9842d;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(227, 90, 43, 0.16), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(232, 165, 75, 0.08), transparent 50%),
    var(--bg0);
  letter-spacing: 0.01em;
}

[data-theme="light"] body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(227, 90, 43, 0.08), transparent 50%),
    var(--bg0);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

.app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.wordmark {
  text-align: center;
  flex: 1;
}

.wordmark h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 4.4vw, 40px);
  letter-spacing: 0;
  text-transform: uppercase;
  line-height: 1;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.14em;
  white-space: nowrap;
}

.wordmark h1 span:nth-child(1) { color: #e35a2b; }
.wordmark h1 span:nth-child(2) { color: #e8a54b; }
.wordmark h1 span:nth-child(3) { color: #f0c36a; }
.wordmark h1 span:nth-child(4) { color: #5ec2c7; }
.wordmark h1 span:nth-child(5) { color: #3faf6b; }
.wordmark h1 span.gap {
  width: 0.42em;
  flex: 0 0 0.42em;
}
.wordmark h1 span.rest { color: var(--ink); }

.wordmark p {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  display: grid;
  place-items: center;
  color: var(--ink-dim);
  transition: background 0.2s, color 0.2s;
}

.icon-btn:hover {
  color: var(--ink);
  background: var(--glass);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin: 18px 0 28px;
  color: var(--ink-dim);
  font-size: 12px;
}

.meta-row .dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: #3faf6b;
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 8px #3faf6b;
}

.meta-row .dot.warn { background: #e8a54b; box-shadow: 0 0 8px #e8a54b; }
.meta-row .dot.bad { background: #e35a2b; box-shadow: 0 0 8px #e35a2b; }

.flasks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  margin: 8px auto 8px;
  max-width: 960px;
}

.flask-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px 14px;
  border-radius: 28px;
  border: 1px solid transparent;
  min-height: 430px;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}

.flask-col:hover {
  background: var(--card);
}

.flask-col.active {
  background: var(--card);
  border-color: var(--line);
}

.flask {
  width: 118px;
  height: 280px;
  position: relative;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.35));
}

.cap {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 16px;
  border-radius: 4px 4px 3px 3px;
  background: linear-gradient(180deg, #d9d0c4 0%, #9a9084 45%, #cfc6ba 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 4px rgba(0, 0, 0, 0.35);
  z-index: 3;
}

.neck {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 22px;
  background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02) 40%, rgba(0,0,0,0.25));
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 1px solid rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.body {
  position: absolute;
  top: 34px;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 18px 18px 28px 28px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.07), transparent 18%, transparent 78%, rgba(0,0,0,0.28)),
    linear-gradient(180deg, #2a231c 0%, #16110c 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

[data-theme="light"] .body {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.45), transparent 22%, transparent 78%, rgba(80,50,20,0.12)),
    linear-gradient(180deg, #d8cbb8 0%, #c3b49d 100%);
  border-color: rgba(42, 33, 24, 0.18);
}

.ticks {
  position: absolute;
  inset: 12px 7px 14px auto;
  width: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: rgba(243, 234, 220, 0.45);
  font-size: 8px;
  z-index: 4;
  pointer-events: none;
  text-align: right;
  line-height: 1;
}

.ticks span {
  display: block;
}

 .liquid {
  overflow: hidden;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--level) * 1%);
  transition: height 1.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
}

.liquid::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fill);
  opacity: 0.92;
}

.liquid.gold { --fill: linear-gradient(180deg, #f0c36a 0%, #c9842a 70%, #8a5414 100%); }
.liquid.teal { --fill: linear-gradient(180deg, #7ee0e4 0%, #2a9aa0 70%, #15666b 100%); }
.liquid.ember { --fill: linear-gradient(180deg, #ff7a45 0%, #c83a18 70%, #7a1d0c 100%); }
.liquid.green { --fill: linear-gradient(180deg, #6ee39a 0%, #2e9a58 70%, #146336 100%); }

.meniscus {
  position: absolute;
  top: -8px;
  left: -4%;
  width: 108%;
  height: 16px;
  background: var(--meniscus);
  border-radius: 50%;
  filter: blur(0.2px);
}

.liquid.gold { --meniscus: #f6d78a; }
.liquid.teal { --meniscus: #b7f3f6; }
.liquid.ember { --meniscus: #ffb08a; }
.liquid.green { --meniscus: #b6f3cc; }

.bubbles-cv {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

.shine {
  position: absolute;
  top: 12%;
  left: 10%;
  width: 18%;
  height: 58%;
  border-radius: 40px;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0));
  z-index: 5;
  pointer-events: none;
}

.glow {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 8%;
  height: 40%;
  background: var(--glow);
  filter: blur(16px);
  opacity: 0.45;
  z-index: 0;
  pointer-events: none;
}

.flask-col figcaption {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.16em;
  text-transform: capitalize;
  color: var(--ink);
}

.score {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--ink-dim);
  font-size: 15px;
  margin-top: -4px;
}

.headline {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
}

.delta {
  font-size: 11px;
  color: var(--ink-mute);
}

.delta.up { color: #3faf6b; }
.delta.down { color: #e35a2b; }

.spark {
  width: 120px;
  height: 36px;
  display: block;
}

.hint {
  text-align: center;
  color: var(--ink-mute);
  font-size: 13px;
  max-width: 640px;
  margin: 8px auto 28px;
  line-height: 1.55;
  font-family: var(--serif);
  font-size: 16px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
}

.panel h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  margin-bottom: 4px;
}

.panel .lede {
  color: var(--ink-dim);
  margin-bottom: 18px;
  font-size: 14px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.stat {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--line);
}

.stat .k {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 4px;
}

.stat .v {
  font-size: 18px;
  font-weight: 500;
}

.history-board {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px 20px 16px;
  margin: 0 auto 22px;
  max-width: 980px;
}
.history-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.history-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  margin: 0;
}
.history-head p {
  margin: 4px 0 0;
  color: var(--ink-dim);
  font-size: 13px;
}
.history-note {
  max-width: 420px;
  text-align: right;
  color: var(--ink-mute);
  font-size: 12px;
  line-height: 1.45;
}
.history-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 12px;
}
.hgroup {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hchip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-dim);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
}
.hchip.on {
  color: var(--ink);
  border-color: var(--c, rgba(232, 165, 75, 0.55));
  background: color-mix(in srgb, var(--c, #e8a54b) 16%, transparent);
}
.history-svg {
  width: 100%;
  height: auto;
  display: block;
  color: var(--ink-mute);
  overflow: visible;
}
.plot-bg { fill: rgba(255,255,255,0.03); }
.grid-y { stroke: currentColor; stroke-width: 1; opacity: 0.14; }
.grid-x { stroke: currentColor; stroke-width: 1; opacity: 0.07; }
.tick-x { stroke: currentColor; stroke-width: 1; opacity: 0.35; }
.tick-x.major { opacity: 0.7; }
.axis { stroke: currentColor; stroke-width: 1.2; opacity: 0.45; }
#histCursor { stroke: #e8c37a; stroke-width: 1.2; stroke-dasharray: 3 3; opacity: 0.95; }
.history-tip {
  position: absolute;
  z-index: 3;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 92%, black);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.history-tip[hidden] { display: none; }
.history-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-dim);
}
.history-empty {
  color: var(--ink-mute);
  font-size: 13px;
  padding: 24px 8px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 13px;
}

.table th {
  text-align: left;
  color: var(--ink-mute);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
}

.table td {
  padding: 9px 6px;
  border-bottom: 1px solid var(--line);
}

.bar {
  height: 6px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  min-width: 80px;
}

.bar > i {
  display: block;
  height: 100%;
  background: var(--gold);
  border-radius: inherit;
}

.defs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.def {
  padding: 16px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
}

.def h3 {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.def.depth h3 { color: var(--gold); }
.def.flow h3 { color: var(--teal); }
.def.heat h3 { color: var(--ember); }
.def.calm h3 { color: var(--green); }

.def p {
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.5;
}

.sources {
  margin-top: 28px;
  color: var(--ink-mute);
  font-size: 12px;
  line-height: 1.7;
}

.sources a {
  color: var(--ink-dim);
  text-underline-offset: 3px;
}

.ticker {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--ink-dim);
}

.footer {
  margin-top: 36px;
  text-align: center;
  color: var(--ink-mute);
  font-size: 12px;
}

.skeleton .liquid {
  height: 18%;
  opacity: 0.35;
}

@media (max-width: 820px) {
  .flasks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 420px;
  }
  .defs {
    grid-template-columns: 1fr 1fr;
  }
  .wordmark h1 {
    gap: 0.1em;
  }
}

@media (max-width: 480px) {
  .app { padding: 18px 14px 64px; }
  .flask { width: 108px; height: 250px; }
  .defs { grid-template-columns: 1fr; }
}

.sitenav {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 18px;
}
.sitenav a {
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 14px;
}
.sitenav a.on,
.sitenav a:hover {
  color: var(--ink);
  border-color: var(--line);
  background: var(--card);
}

.city-wrap {
  margin-top: 8px;
}
.city-stage {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, #1a140f 0%, #0c0a08 55%, #14100c 100%);
  box-shadow: var(--shadow);
}
[data-theme="light"] .city-stage {
  background: linear-gradient(180deg, #f0d9b8 0%, #e8c9a0 40%, #c9b089 100%);
}
.city-stage svg {
  display: block;
  width: 100%;
  height: auto;
}
.district {
  cursor: pointer;
  outline: none;
}
.district .hit {
  fill: transparent;
}
.district .glow-ring {
  fill: none;
  stroke: transparent;
  stroke-width: 2;
  opacity: 0;
  transition: opacity 0.25s;
}
.district:hover .glow-ring,
.district[aria-current="true"] .glow-ring {
  opacity: 1;
  stroke: #e8a54b;
}
.city-label {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  fill: #f3eadc;
  pointer-events: none;
}
[data-theme="light"] .city-label { fill: #2a2118; }

.win {
  animation: blink 3.6s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.train {
  animation: dock 8s ease-in-out infinite;
}
@keyframes dock {
  0% { transform: translateX(-40px); opacity: 0; }
  15% { opacity: 1; }
  50% { transform: translateX(0); opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateX(28px); opacity: 0; }
}

.paths {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 16px 0 8px;
}
.paths button,
.paths a.sheet-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 14px;
  padding: 8px 14px 9px;
  font-size: 13px;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  max-width: 240px;
}
.paths button small,
.paths a.sheet-link small {
  font-size: 11px;
  line-height: 1.3;
  color: var(--ink-dim);
  font-weight: 400;
}
.paths button.on {
  color: var(--ink);
  border-color: rgba(232, 165, 75, 0.45);
}
.walkbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-dim);
  position: relative;
  overflow: hidden;
}
.walkbar[hidden] { display: none; }
.walk-tag {
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 10px;
}
#walkTick {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
}
@keyframes walkfill {
  from { width: 0; }
  to { width: 100%; }
}

.story {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  margin-top: 18px;
}
.story-card h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  margin-bottom: 6px;
}
.story-card .plain {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 10px;
}
.story-card .why {
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.55;
}
.jargon {
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-mute);
}
.jargon b { color: var(--ink-dim); font-weight: 500; }

.district-list {
  display: grid;
  gap: 8px;
}
.district-list button {
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
}
.district-list button.on {
  border-color: rgba(232, 165, 75, 0.5);
}
.district-list .name {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2px;
}
.district-list .one {
  font-size: 13px;
  color: var(--ink-dim);
}

.live-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

@media (max-width: 820px) {
  .story { grid-template-columns: 1fr; }
}

.city-stage.painted {
  position: relative;
  overflow: hidden;
  min-height: 0;
  padding: 0;
  background: #0c0a08;
}
.city-hero {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center 40%;
}
.pins { position: absolute; inset: 0 0 92px 0; pointer-events: none; }
.pin {
  pointer-events: auto;
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(12, 10, 8, 0.72);
  border: 1px solid rgba(232, 165, 75, 0.45);
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.pin { animation: pinpulse 2.8s ease-in-out infinite; }
.pin.on, .pin:hover { background: rgba(227, 90, 43, 0.85); border-color: #e8a54b; animation: none; }
@keyframes pinpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 165, 75, 0.0); }
  50% { box-shadow: 0 0 0 6px rgba(232, 165, 75, 0.18); }
}
.history-readout {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-dim);
  min-height: 1.3em;
}
.history-plot { position: relative; }
.history-svg { cursor: crosshair; overflow: visible; }
.htick {
  fill: currentColor;
  font-size: 8px;
  opacity: 0.72;
}
.yscale {
  fill: currentColor;
  font-size: 10px;
  opacity: 0.7;
}
.thumbs {
  display: flex;
  gap: 8px;
  padding: 10px;
  overflow-x: auto;
  background: linear-gradient(to top, rgba(8,6,4,0.92), rgba(8,6,4,0.55));
}
.thumb {
  flex: 0 0 88px;
  display: grid;
  gap: 4px;
  text-align: left;
}
.thumb img {
  width: 88px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.thumb.on img, .thumb:hover img { border-color: var(--gold); }
.thumb em { font-style: normal; font-size: 10px; color: var(--ink-dim); }

.story-still { margin: 0 0 12px; }
.story-still img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.tour {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(6, 4, 3, 0.88);
  display: grid;
  place-items: center;
  padding: 24px;
}
.tour[hidden] { display: none !important; }
.tour-stage {
  position: relative;
  width: min(960px, 100%);
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #0c0a08;
}
.tour-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tour-stage img.ken {
  animation: ken 6.5s ease-out forwards;
}
@keyframes ken {
  from { transform: scale(1.02); }
  to { transform: scale(1.12); }
}
.tour-cap {
  position: absolute;
  left: 0; right: 0; bottom: 52px;
  padding: 18px 22px 8px;
  background: linear-gradient(to top, rgba(8,6,4,0.85), transparent);
}
.tour-cap h3 { font-family: var(--serif); font-size: 28px; font-weight: 500; }
.tour-cap p { color: var(--ink-dim); font-size: 15px; }
.tour-ctrl {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 8px;
}
.tour-ctrl button {
  background: rgba(12,10,8,0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tour-ctrl button:hover { border-color: var(--gold); }
.tour-prog {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(243,234,220,0.12);
}
.tour-prog i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
}

@media (max-width: 820px) {
  .city-hero { height: 280px; }
  .pin { font-size: 10px; padding: 4px 8px; }
}

.hchip.locked { opacity: 0.55; }
.paywall {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 12px;
}
.paywall p { margin: 0; font-size: 13px; color: var(--ink); }
.pay-price { color: var(--ink-dim); margin-top: 4px !important; }
.pay-open { color: var(--ink-dim); font-size: 12px; }
.pay-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-cta, .dev-unlock {
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  border: 1px solid var(--line);
}
.pay-cta {
  background: #efe8dc;
  color: #161310;
  border-color: transparent;
}
.dev-unlock {
  background: transparent;
  color: var(--ink-dim);
}
.dev-unlock.on { color: var(--accent); border-color: var(--accent); }

.city-pass-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.member-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(8,6,4,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.member-layer[hidden] { display: none; }
.member-card {
  position: relative;
  width: min(720px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 24px 22px;
}
.member-x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}
.member-card h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 32px;
  margin: 0 0 6px;
}
.member-lede, .pay-ways, .member-foot, .save, .member-note {
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.45;
}
.member-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0;
}
.member-grid article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}
.member-grid .featured { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.member-grid h3 { margin: 0 0 6px; font-family: var(--serif); font-weight: 500; }
.member-grid .price { font-size: 22px; margin: 0 0 6px; }
.member-grid ul { margin: 10px 0 12px; padding-left: 18px; font-size: 14px; }
.ghost-pay {
  display: block;
  margin-top: 8px;
  background: none;
  border: 0;
  color: var(--ink-dim);
  font-size: 12px;
  text-decoration: underline;
}
.pay-ways { margin: 8px 0 6px; }
.member-foot { font-size: 12px; }
.badge-rack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 8px 0 16px;
}
.badge-rack article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--glass);
}
.badge-rack h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  margin: 0 0 4px;
}
.badge-rack p { margin: 0; font-size: 13px; color: var(--ink-dim); line-height: 1.4; }
.badge-rack .seal {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.badge-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 12px 0 8px;
}
.seal-chip {
  border: 1px solid rgba(232, 165, 75, 0.45);
  background: rgba(12, 10, 8, 0.55);
  color: var(--gold);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.seal-chip.muted { color: var(--ink-mute); border-color: var(--line); }
.apply-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
@media (max-width: 640px) {
  .member-grid { grid-template-columns: 1fr; }
  .badge-rack { grid-template-columns: 1fr; }
}

#sealDock {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 80;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
#sealDock .seal-pin {
  pointer-events: auto;
  position: relative;
  width: 58px;
  height: auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  border: 0;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
}
#sealDock .seal-pin img {
  width: 28px;
  height: 40px;
  object-fit: contain;
  object-position: center center;
  display: block;
  border-radius: 6px;
  border: 1px solid rgba(243, 234, 220, 0.28);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32);
  background: #0c0a08;
}
#sealDock .seal-count {
  color: #f3eadc;
  font-size: 9px;
  letter-spacing: 0.03em;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}
#sealDock .seal-tip {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  white-space: nowrap;
  background: #120e0a;
  color: #f3eadc;
  border: 1px solid rgba(243, 234, 220, 0.28);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
#sealDock .seal-pin:hover .seal-tip,
#sealDock .seal-pin:focus .seal-tip {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 640px) {
  #sealDock { top: 6px; right: 6px; gap: 6px; }
  #sealDock .seal-pin { width: 52px; }
  #sealDock .seal-pin img { width: 24px; height: 34px; }
  #sealDock .seal-count { font-size: 8px; }
}
