@font-face {
  font-family: Geist;
  src: url('/fonts/geist-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  background: #08090a;
  color: #f7f5ef;
  font-family: Geist, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #08090a;
}

button, select { font-family: inherit; }

.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 46% 42% at 50% 48%, rgba(214, 239, 212, 0.16), transparent 62%),
    radial-gradient(ellipse 80% 70% at 50% 50%, rgba(20, 36, 32, 0.2), #08090a 72%);
}

.bar {
  position: fixed;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px 10px;
  background: linear-gradient(180deg, rgba(8, 9, 10, 0.92), rgba(8, 9, 10, 0));
}

.brand {
  color: #f7f5ef;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.bar__nav {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 13px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.bar__nav a {
  flex: none;
  padding: 5px 0;
  color: rgba(247, 245, 239, 0.72);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.bar__nav a:hover,
.bar__nav a[aria-current='page'] { color: #fff; }

.bar__view {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar__view label {
  color: rgba(247, 245, 239, 0.62);
  font-size: 12px;
}

.bar__view select {
  border: 1px solid rgba(214, 239, 212, 0.35);
  border-radius: 999px;
  background: rgba(8, 10, 10, 0.72);
  color: #f7f5ef;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 12px;
}

.bar__hint {
  margin: 0 0 0 auto;
  color: rgba(247, 245, 239, 0.72);
  font-size: 12px;
}

.bar__leave { margin-left: auto; border: 0; background: none; color: rgba(247, 245, 239, 0.78); font-size: 11px; cursor: pointer; text-decoration: underline; }
.bar__leave[hidden] { display: none; }

.stage {
  position: fixed;
  inset: 0;
}

.stage canvas { display: block; }

.legend {
  position: fixed;
  z-index: 3;
  left: 16px;
  bottom: 16px;
  margin: 0;
  color: rgba(247, 245, 239, 0.55);
  font-size: 11px;
}

.zoom {
  position: fixed;
  z-index: 3;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zoom button {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(214, 239, 212, 0.35);
  border-radius: 10px;
  background: rgba(8, 10, 10, 0.78);
  color: #f7f5ef;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.zoom button:hover { background: rgba(214, 239, 212, 0.12); }

.bubble {
  position: fixed;
  z-index: 4;
  width: min(240px, calc(100vw - 24px));
  margin: 0;
  padding: 10px 12px 11px;
  border: 1px solid rgba(214, 239, 212, 0.28);
  border-radius: 16px;
  background: rgba(12, 16, 15, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.bubble[hidden],
.panel[hidden],
.gate[hidden],
.banner[hidden] { display: none; }

.bubble__name {
  margin: 0 0 4px;
  color: #d6efd4;
  font-size: 12px;
  font-weight: 800;
}

.bubble__text {
  margin: 0;
  color: #f7f5ef;
  font-size: 13px;
  line-height: 1.4;
}

.panel {
  position: fixed;
  z-index: 5;
  top: 64px;
  right: 16px;
  width: min(340px, calc(100vw - 24px));
  max-height: calc(100svh - 96px);
  overflow: auto;
  padding: 18px 18px 16px;
  border: 1px solid rgba(214, 239, 212, 0.22);
  border-radius: 18px;
  background: rgba(10, 13, 12, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.panel__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #f7f5ef;
  font-size: 22px;
  cursor: pointer;
}

.panel__kicker {
  margin: 0;
  color: #d6efd4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel h2 {
  margin: 6px 40px 0 0;
  font-size: 22px;
  line-height: 1.15;
}

.panel__handle,
.panel__score,
.panel__status {
  margin: 4px 0 0;
  color: rgba(247, 245, 239, 0.72);
  font-size: 13px;
}

.panel__score { color: #f7f5ef; font-weight: 700; }

.panel__links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 10px; }
.panel__links a {
  padding: 8px 10px;
  border: 1px solid rgba(214, 239, 212, 0.32);
  border-radius: 8px;
  color: #d6efd4;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.panel__links a:hover { background: rgba(214, 239, 212, 0.12); }
.panel__links a[hidden] { display: none; }

.panel h3 {
  margin: 16px 0 6px;
  color: rgba(247, 245, 239, 0.55);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.panel p { margin: 0; font-size: 14px; line-height: 1.45; }

.panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.panel li { margin: 0 0 4px; font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chips span {
  border-radius: 999px;
  background: rgba(214, 239, 212, 0.12);
  color: #d6efd4;
  font-size: 12px;
  padding: 4px 8px;
}

.gate {
  position: fixed;
  z-index: 6;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 28px 22px;
  text-align: center;
  background: rgba(8, 9, 10, 0.88);
}

.gate h1 { margin: 8px 0 0; font-size: clamp(28px, 5vw, 42px); }

.gate p {
  max-width: 460px;
  margin: 0;
  color: rgba(247, 245, 239, 0.78);
  font-size: 15px;
  line-height: 1.5;
}

.gate__join {
  display: inline-flex;
  margin-top: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #d6efd4;
  color: #142018;
  font-weight: 800;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

.gate__join[hidden] { display: none; }
.gate__privacy a { color: #d6efd4; font-size: 12px; }

.gate__back { color: rgba(247, 245, 239, 0.7); font-size: 13px; }

.banner {
  position: fixed;
  z-index: 6;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  max-width: min(420px, calc(100vw - 32px));
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(12, 16, 15, 0.94);
  border: 1px solid rgba(214, 239, 212, 0.28);
  text-align: center;
  font-size: 14px;
}

.credit {
  position: fixed;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 0;
  padding: 0 90px 18px;
  color: rgba(247, 245, 239, 0.38);
  font-size: 11px;
  pointer-events: none;
}

.credit a { color: inherit; pointer-events: auto; }

a:focus-visible, button:focus-visible, select:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .bar { flex-wrap: wrap; gap: 8px 12px; }
  .bar__nav { order: 3; flex-basis: 100%; justify-content: center; flex-wrap: wrap; gap: 0 11px; overflow: visible; }
  .bar__nav a { font-size: 10px; }
  .bar__view { margin-left: auto; }
  .bar__hint { display: none; }
  .legend { display: none; }
  .panel {
    top: auto;
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
    max-height: 46svh;
  }
  .credit { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .glow { background: #08090a; }
}
