:root {
  color-scheme: dark;
  --ink: #f4f6fb;
  --soft: rgba(232, 238, 252, 0.72);
  --glass: rgba(12, 18, 44, 0.5);
  --edge: rgba(255, 255, 255, 0.14);
  --warm: #ffc470;
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0b1230;
  color: var(--ink);
}

#hill {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: pointer;
}

.panel {
  position: fixed;
  background: var(--glass);
  border: 1px solid var(--edge);
  border-radius: 14px;
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 6px 24px rgba(0, 0, 20, 0.25);
}

#status {
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  padding: 10px 14px 11px;
  max-width: min(330px, calc(100vw - 24px));
  font-size: 12.5px;
  line-height: 1.35;
}

h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.conn {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8a93a8;
}

.conn[data-state="live"] {
  background: #5fe08c;
  box-shadow: 0 0 6px #5fe08c;
}

.conn[data-state="offline"] {
  background: #ff7a6b;
}

.when {
  margin: 2px 0 6px;
  color: var(--soft);
  font-variant-numeric: tabular-nums;
}

.sep {
  opacity: 0.6;
}

.counts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  color: var(--soft);
}

.counts b,
.school b {
  color: var(--ink);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.school {
  margin: 6px 0 0;
  color: var(--soft);
}

.kid {
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  padding: 12px 36px 12px 14px;
  width: min(300px, calc(100vw - 24px));
  font-size: 13px;
}

.kid h2 {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 650;
  color: var(--warm);
}

.kid p {
  margin: 0;
}

.kid .about {
  margin-top: 4px;
  color: var(--soft);
  font-size: 12px;
}

.close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--soft);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.close:hover,
.close:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  outline: none;
}

.hint {
  display: none;
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  margin: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--glass);
  color: var(--soft);
  font-size: 11.5px;
  white-space: nowrap;
  pointer-events: none;
  animation: fade 1s ease 6s forwards;
}

body.pannable .hint {
  display: block;
}

@keyframes fade {
  to {
    opacity: 0;
  }
}

@media (max-width: 520px) {
  #status {
    font-size: 11.5px;
    padding: 8px 11px 9px;
  }
  .counts {
    gap: 1px 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hint {
    animation: none;
  }
}
