:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f1f1f1;
  color: #171717;
}

* { box-sizing: border-box; }
html, body, #app, #stage { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: #f1f1f1; }
#app { position: relative; }
#stage canvas { display: block; }

.glass {
  background: rgba(249, 249, 247, 0.78);
  border: 1px solid rgba(20, 20, 20, 0.12);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(18px) saturate(0%);
  -webkit-backdrop-filter: blur(18px) saturate(0%);
}

.topbar {
  position: absolute;
  top: 22px;
  left: 22px;
  right: 22px;
  min-height: 78px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 18px;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 6px;
  color: #686868;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.19em;
  font-weight: 700;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(18px, 2vw, 28px); font-weight: 500; letter-spacing: -0.035em; }
h2 { margin-bottom: 6px; font-size: 19px; font-weight: 520; letter-spacing: -0.02em; }

.mode-chip {
  padding: 8px 11px;
  border: 1px solid rgba(20, 20, 20, 0.22);
  border-radius: 999px;
  color: #303030;
  font-size: 10px;
  letter-spacing: 0.16em;
}

.info-card {
  position: absolute;
  left: 22px;
  bottom: 88px;
  width: min(370px, calc(100vw - 44px));
  padding: 18px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  border-radius: 18px;
  pointer-events: none;
}

.info-index {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #242424;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.info-card p:last-child { margin: 0; color: #686868; font-size: 13px; line-height: 1.45; }

.controls {
  position: absolute;
  right: 22px;
  bottom: 22px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: 16px;
}

.controls label { display: grid; gap: 5px; min-width: 170px; padding: 0 6px; }
.controls label span { color: #686868; font-size: 11px; }
input[type="range"] { accent-color: #282828; }

button, input { font: inherit; }
button {
  border: 1px solid rgba(20, 20, 20, 0.14);
  border-radius: 11px;
  padding: 10px 13px;
  background: rgba(0, 0, 0, 0.035);
  color: #202020;
  cursor: pointer;
}
button:hover { background: rgba(0, 0, 0, 0.075); }
button.accent { background: #242424; color: #ffffff; border-color: transparent; font-weight: 700; }

.token-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(440px, calc(100vw - 40px));
  padding: 24px;
  border-radius: 22px;
  transform: translate(-50%, -50%);
  z-index: 10;
}
.token-panel .close { position: absolute; top: 12px; right: 12px; padding: 4px 10px; font-size: 20px; }
.token-panel p:not(.eyebrow) { color: #686868; font-size: 13px; line-height: 1.5; }
.token-panel form { display: flex; gap: 8px; }
.token-panel input {
  min-width: 0;
  flex: 1;
  padding: 11px 12px;
  color: #202020;
  background: rgba(0, 0, 0, 0.035);
  border: 1px solid rgba(20, 20, 20, 0.16);
  border-radius: 11px;
  outline: none;
}

.hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  color: rgba(20, 20, 20, 0.5);
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
}

.data-credit {
  position: absolute;
  left: 22px;
  bottom: 18px;
  color: rgba(20, 20, 20, 0.45);
  font-size: 9px;
  letter-spacing: 0.02em;
}
.data-credit a { color: inherit; }

.mapboxgl-ctrl-bottom-left, .mapboxgl-ctrl-bottom-right { opacity: 0.72; }

@media (max-width: 760px) {
  .topbar { top: 12px; left: 12px; right: 12px; }
  .info-card { left: 12px; bottom: 142px; }
  .controls { left: 12px; right: 12px; bottom: 12px; flex-wrap: wrap; }
  .controls label { width: 100%; }
  .hint { display: none; }
  .data-credit { display: none; }
}
