/* MELDAN — overlay UI. The city is the page; everything else floats above it. */
:root {
  --bg: #0a1210;
  --panel: rgba(11, 19, 17, 0.74);
  --panel-strong: rgba(11, 19, 17, 0.95);
  --line: rgba(214, 235, 222, 0.14);
  --line-strong: rgba(214, 235, 222, 0.26);
  --ink: #eef4ef;
  --muted: #b3c6bb;
  --dim: #7f958a;
  --emerald: #3ddc97;
  --emerald-deep: #1f9e6b;
  --emerald-ink: #06251a;
  --robe: #6b3fa0;
  --robe-soft: #c2a9ec;
  --gold: #e9c47c;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  --blur: saturate(140%) blur(14px);
  --font-display: "Cinzel", Georgia, "Times New Roman", serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
  --gutter: clamp(12px, 2.2vw, 22px);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
  touch-action: none;
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(4, 8, 7, 0.45) 100%);
}

button {
  font: inherit;
  color: inherit;
}

svg {
  display: block;
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, transform 0.15s, opacity 0.2s;
}
.btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(214, 235, 222, 0.4);
}
.btn:active {
  transform: translateY(1px);
}
.btn:focus-visible,
.icon-btn:focus-visible,
.label:focus-visible,
.moon:focus-visible,
.place-item:focus-visible,
.chip-btn:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}
.btn.accent {
  background: var(--emerald);
  border-color: var(--emerald);
  color: var(--emerald-ink);
}
.btn.accent:hover {
  background: #62e8ae;
}
.btn.small {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}
.btn.big {
  height: 50px;
  padding: 0 32px;
  font-size: 16px;
}
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.2s;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-btn.social {
  text-decoration: none;
  color: inherit;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  background: var(--panel);
}
.icon-btn.social svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke: none;
}

/* ── Loader ── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(80% 60% at 50% 35%, rgba(61, 220, 151, 0.08), transparent 70%),
    radial-gradient(60% 50% at 50% 100%, rgba(107, 63, 160, 0.16), transparent 70%),
    #07100d;
  transition: opacity 1s ease, visibility 1s;
}
#loader.gone {
  opacity: 0;
  visibility: hidden;
}
.loader-inner {
  width: min(460px, 100%);
  text-align: center;
}
.crest {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  color: var(--emerald);
  filter: drop-shadow(0 0 22px rgba(61, 220, 151, 0.35));
}
.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 9vw, 68px);
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  line-height: 1;
}
.sub {
  margin: 10px 0 30px;
  color: var(--muted);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 12px;
}
.progress {
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
#progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--emerald-deep), var(--emerald));
  transition: width 0.35s ease;
}
.progress-text {
  min-height: 22px;
  margin: 12px 0 26px;
  color: var(--dim);
  font-size: 13px;
}
#loader.error .progress-text {
  color: #ff9a8a;
}
.fineprint {
  margin: 28px auto 0;
  max-width: 340px;
  color: var(--dim);
  font-size: 11.5px;
  line-height: 1.55;
}

/* ── HUD visibility ── */
.hud {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.8s ease 0.6s, transform 0.8s ease 0.6s;
}
body.entered .hud {
  opacity: 1;
  transform: none;
}
body:not(.entered) .hud {
  pointer-events: none;
}
body.instant .hud,
body.instant #loader {
  transition: none;
}
body.touring .dock,
body.touring .hint,
body.touring .panel {
  opacity: 0;
  pointer-events: none;
}
body.photo .hud,
body.photo #labels,
body.photo .vignette {
  display: none;
}

/* ── Top bar ── */
.topbar {
  position: fixed;
  top: max(var(--gutter), env(safe-area-inset-top));
  left: var(--gutter);
  right: var(--gutter);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
.topbar > * {
  pointer-events: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 16px 6px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  cursor: pointer;
}
.brand svg {
  width: 34px;
  height: 34px;
  color: var(--emerald);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}
.brand-text b {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.2em;
}
.brand-text small {
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-actions .btn {
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.top-actions .btn.ghost {
  background: var(--panel);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  font-size: 13px;
  color: var(--muted);
}
.chip b {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
  font-size: 12.5px;
}
button.chip {
  appearance: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.chip.ca-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(214, 235, 222, 0.4);
}
.chip .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dim);
}
.chip.live .pulse {
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}
.chip.beat .pulse {
  animation: beat 1.2s ease-out;
}
@keyframes beat {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.7);
  }
  40% {
    transform: scale(1.5);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 14px rgba(61, 220, 151, 0);
  }
}

/* ── Panels ── */
.panel {
  position: fixed;
  z-index: 30;
  top: calc(max(var(--gutter), env(safe-area-inset-top)) + 58px);
  right: var(--gutter);
  width: min(390px, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100vh - 190px);
  overflow: auto;
  padding: 20px 20px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  animation: panel-in 0.35s ease;
}
.panel[hidden] {
  display: none;
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.panel h2 {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.panel-intro,
.lore-text {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.62;
}
.panel-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.places {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.place-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.place-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.place-item b {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.place-item small {
  display: block;
  color: var(--dim);
  font-size: 12px;
}
.place-item .dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--emerald);
}
.place-item .dot.major {
  background: var(--emerald);
}

.chapters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.chapters .eyebrow {
  margin-right: 4px;
  color: var(--dim);
}
.chapters a {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 12.5px;
  text-decoration: none;
}
.chapters a:hover {
  border-color: var(--emerald);
  color: var(--emerald);
}

/* ── Aesthetics vote ── */
.vote {
  margin: 4px 0 16px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(194, 169, 236, 0.28);
  background: linear-gradient(160deg, rgba(107, 63, 160, 0.2), rgba(107, 63, 160, 0.06));
}
.vote .eyebrow {
  color: var(--robe-soft);
}
.vote-q {
  margin: 8px 0 10px;
  font-size: 13.5px;
  color: var(--ink);
}
.vote-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
}
.vote-row input {
  flex: 1;
  accent-color: var(--robe-soft);
}
.vote-row output {
  min-width: 26px;
  text-align: right;
  color: var(--ink);
  font-weight: 600;
}
.tax {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 12.5px;
}
.tax td {
  padding: 4px 0;
  color: var(--muted);
  border-bottom: 1px dashed var(--line);
}
.tax td:last-child {
  text-align: right;
  font-family: var(--font-mono);
  color: var(--ink);
}
.tax .sum td {
  border-bottom: 0;
  font-weight: 700;
  color: var(--ink);
}
.vote-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--dim);
}

/* ── Token ── */
.ca-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.ca-box .eyebrow {
  grid-column: 1 / -1;
  color: var(--dim);
}
.ca-box code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  word-break: break-all;
  color: var(--ink);
}
.ca-box code.pending {
  color: var(--gold);
}
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}
.facts div {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.facts dt {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.facts dd {
  margin: 2px 0 0;
  font-weight: 600;
  font-size: 14px;
}
.link-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.link-grid .btn.accent {
  grid-column: 1 / -1;
}
.mini-title {
  margin: 18px 0 6px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.howto {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13.5px;
}
.howto li {
  margin: 4px 0;
}
.disclaimer {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 11.5px;
  line-height: 1.55;
}

/* ── Dock: moons and time ── */
.dock {
  position: fixed;
  z-index: 20;
  left: var(--gutter);
  bottom: max(var(--gutter), env(safe-area-inset-bottom));
  width: min(420px, calc(100vw - 2 * var(--gutter)));
  padding: 14px 16px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
}
.dock-row {
  display: grid;
  gap: 8px;
}
.moons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.moon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.moon:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}
.moon.on {
  color: var(--ink);
  border-color: var(--emerald);
  background: rgba(61, 220, 151, 0.12);
}
.moon-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.moon-dot.snowmoon {
  background: #dfe9f3;
}
.moon-dot.rainmoon {
  background: #7fa3c4;
}
.moon-dot.bloomtime {
  background: #f0a9c4;
}
.moon-dot.firemoon {
  background: #f0a44a;
}
.moon-dot.mistime {
  background: #c9a26b;
}
.moon-note {
  margin: 10px 0 12px;
  min-height: 38px;
  color: var(--dim);
  font-size: 12.5px;
  line-height: 1.5;
}
.time-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12.5px;
  color: var(--muted);
}
.time-label b {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink);
}
#time {
  width: 100%;
  margin: 8px 0 6px;
  accent-color: var(--emerald);
  cursor: pointer;
  height: 22px;
}
.time-quick {
  display: flex;
  gap: 6px;
}
.chip-btn {
  flex: 1;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.chip-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

/* ── Actions ── */
.actions {
  position: fixed;
  z-index: 20;
  right: var(--gutter);
  bottom: max(var(--gutter), env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 8px;
}
.actions .btn {
  height: 44px;
  padding: 0 20px;
  box-shadow: 0 10px 30px rgba(61, 220, 151, 0.25);
}
.actions .icon-btn {
  width: 44px;
  height: 44px;
  background: var(--panel);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.hint {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: calc(max(var(--gutter), env(safe-area-inset-bottom)) + 12px);
  translate: -50% 0;
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(8, 14, 12, 0.5);
  color: var(--dim);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}

/* ── Floating labels ── */
#labels {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}
.label {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 6px;
  margin: 0;
  border-radius: 999px;
  border: 1px solid rgba(238, 244, 239, 0.18);
  background: rgba(9, 16, 14, 0.66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
  translate: -50% calc(-100% - 14px);
  transition: background 0.2s, border-color 0.2s;
  will-change: transform, opacity;
}
.label .pin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--emerald);
  background: rgba(61, 220, 151, 0.25);
}
.label.major {
  font-size: 13px;
  font-weight: 600;
  padding: 5px 13px 5px 7px;
}
.label.major .pin {
  background: var(--emerald);
  box-shadow: 0 0 12px rgba(61, 220, 151, 0.7);
}
.label:hover,
.label.active {
  background: rgba(9, 16, 14, 0.92);
  border-color: var(--emerald);
}
.label::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 14px;
  background: linear-gradient(rgba(238, 244, 239, 0.5), transparent);
}

/* ── Tour ── */
#tour {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}
#tour[hidden] {
  display: none;
}
#tour .bars i {
  position: absolute;
  left: 0;
  right: 0;
  height: 7vh;
  background: #030605;
  animation: bars-in 0.8s ease both;
}
#tour .bars i:first-child {
  top: 0;
}
#tour .bars i:last-child {
  bottom: 0;
}
@keyframes bars-in {
  from {
    height: 0;
  }
}
.tour-card {
  position: absolute;
  left: 50%;
  bottom: calc(7vh + 22px);
  translate: -50% 0;
  width: min(620px, calc(100vw - 2 * var(--gutter)));
  padding: 18px 22px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  pointer-events: auto;
}
.tour-card.in {
  animation: caption 0.7s ease;
}
@keyframes caption {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.tour-card h3 {
  margin: 6px 0 6px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.tour-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}
.tour-ctrl {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
body.touring .topbar,
body.touring .actions .icon-btn {
  opacity: 0;
  pointer-events: none;
}
body.touring #btn-tour {
  opacity: 0;
  pointer-events: none;
}

/* ── Toast ── */
#toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  top: calc(max(var(--gutter), env(safe-area-inset-top)) + 64px);
  translate: -50% -8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, translate 0.3s;
}
#toast.show {
  opacity: 1;
  translate: -50% 0;
}

/* Title card used to render the social preview image (?og) */
.og-title {
  display: none;
}
body.og .og-title {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 64px 56px;
  background: linear-gradient(180deg, transparent 45%, rgba(5, 10, 8, 0.72) 100%);
}
body.og .og-title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 104px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.45);
}
body.og .og-title p {
  margin: 10px 0;
  font-size: 26px;
  color: var(--muted);
}
body.og .og-title p:first-child {
  color: var(--emerald);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 20px;
}

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  background: var(--bg);
  color: var(--muted);
}

/* ── Small screens ── */
@media (max-width: 760px) {
  body {
    font-size: 14px;
  }
  .brand {
    padding: 5px 12px 5px 5px;
  }
  .brand svg {
    width: 30px;
    height: 30px;
  }
  .brand-text small,
  .chip-label,
  .hint {
    display: none;
  }
  .chip {
    padding: 0 11px;
  }
  .top-actions .btn {
    padding: 0 12px;
  }
  .panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 72vh;
    border-radius: 18px 18px 0 0;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
    animation: sheet-in 0.35s ease;
  }
  @keyframes sheet-in {
    from {
      transform: translateY(30px);
      opacity: 0;
    }
  }
  body.panel-open .dock,
  body.panel-open .actions {
    opacity: 0;
    pointer-events: none;
  }
  .dock {
    width: calc(100vw - 2 * var(--gutter));
    bottom: calc(max(var(--gutter), env(safe-area-inset-bottom)) + 56px);
    padding: 12px;
  }
  .moons {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .moon {
    flex: none;
  }
  .moon-note {
    display: none;
  }
  .actions {
    left: var(--gutter);
    right: var(--gutter);
  }
  .actions #btn-tour {
    flex: 1;
  }
  .tour-card {
    bottom: calc(7vh + 12px);
    padding: 14px 16px;
  }
  .tour-card h3 {
    font-size: 18px;
  }
  .facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  #block-chip {
    display: none;
  }
  .brand-text b {
    font-size: 15px;
    letter-spacing: 0.16em;
  }
  .top-actions {
    gap: 6px;
  }
  .top-actions .btn {
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }
  .time-quick .chip-btn {
    height: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
