:root {
  --bg: #0f1419;
  --panel: #1a212b;
  --panel-2: #232c39;
  --line: #2e3a49;
  --text: #e9eef5;
  --muted: #9aa9bd;
  --accent: #ffc24b;
  --accent-2: #4bd0ff;
  --good: #3ad29f;
  --bad: #ff6b6b;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 70% -10%, #1d2937 0%, var(--bg) 55%);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 20, 25, 0.7); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 1000;
}
.brand { font-weight: 700; font-size: 1.05rem; }
.brand .who { color: var(--accent); }
.whoami { color: var(--muted); font-size: 0.9rem; display: flex; gap: 10px; align-items: center; }
.whoami a { color: var(--accent-2); cursor: pointer; text-decoration: none; }
.whoami a:hover { text-decoration: underline; }

#app { max-width: 980px; margin: 0 auto; padding: 22px 16px 60px; }
.loading { color: var(--muted); text-align: center; padding: 60px 0; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 20px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 18px; }

h1, h2, h3 { margin: 0 0 12px; }
.sub { color: var(--muted); margin: -6px 0 16px; }

.photo-wrap {
  border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
  background: #000; margin-bottom: 16px; aspect-ratio: 4 / 3;
}
.photo-wrap img { width: 100%; height: 100%; object-fit: contain; display: block; }

.map { height: 420px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
@media (max-width: 600px) { .map { height: 320px; } }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

button, .btn {
  appearance: none; border: 0; border-radius: 12px; cursor: pointer;
  padding: 12px 20px; font-size: 1rem; font-weight: 600;
  background: var(--accent); color: #221a00; transition: transform .05s, filter .15s;
}
button:hover { filter: brightness(1.06); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }

input, textarea {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 12px 14px; font-size: 1rem; width: 100%;
}
label { display: block; font-weight: 600; margin: 12px 0 6px; }

.hint { color: var(--muted); font-size: 0.9rem; margin-top: 10px; }
.error { color: var(--bad); margin-top: 10px; min-height: 1.2em; }

/* Reveal / score */
.score-banner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, #21303f, #1a212b);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 16px;
}
.score-num { font-size: 2.4rem; font-weight: 800; color: var(--accent); line-height: 1; }
.score-meta { color: var(--muted); }
.score-meta b { color: var(--text); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: .04em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rank { color: var(--accent); font-weight: 700; }
.medal { font-size: 1.1rem; }

.archive-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.archive-item:last-child { border-bottom: 0; }
.archive-thumb { width: 92px; height: 70px; border-radius: 10px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.archive-meta { flex: 1; min-width: 0; }
.archive-meta .place { font-weight: 700; }
.archive-meta .date { color: var(--muted); font-size: 0.85rem; }

.center { text-align: center; }
.gap { height: 14px; }
.pill { display:inline-block; background: var(--panel-2); border:1px solid var(--line); color: var(--muted); padding: 3px 10px; border-radius: 999px; font-size: .8rem; }

/* custom marker labels */
.guess-label { font: 700 12px/1 system-ui; color:#fff; text-shadow:0 1px 3px #000; white-space:nowrap; }
