:root {
  --ink: #fffefa;
  --paper: #292a23;
  --lime: #d8fd71;
  --muted: rgba(255, 254, 250, 0.72);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

#scene {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  gap: 12px;
}

.card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  pointer-events: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.card img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--lime);
  object-fit: cover;
}

.card b { display: block; font-size: 16px; }
.card span { font-size: 12px; opacity: 0.7; }

.card button, .btn {
  margin-left: 4px;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--lime);
  color: var(--paper);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  background: var(--paper);
  border-radius: 999px;
  padding: 10px 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.hint {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: rgba(41, 42, 35, 0.88);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 20%, rgba(216, 253, 113, 0.16), transparent 45%),
    rgba(11, 28, 36, 0.72);
  backdrop-filter: blur(8px);
}

.overlay[hidden], .hud[hidden] { display: none !important; }

.panel {
  width: min(440px, calc(100% - 32px));
  background: var(--paper);
  color: var(--ink);
  border-radius: 28px;
  padding: 28px 24px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.panel h1 {
  margin: 0 0 8px;
  font-size: 32px;
  letter-spacing: -0.03em;
}

.panel p { margin: 0 0 16px; color: var(--muted); line-height: 1.45; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  outline: 2px solid rgba(255, 254, 250, 0.2);
}

#board {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  max-height: 220px;
  overflow: auto;
}

#board li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid rgba(255, 254, 250, 0.08);
  font-size: 14px;
}

#board li.me { color: var(--lime); }

.save-note {
  min-height: 1.2em;
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--lime);
}
