:root {
  --bg: #0c0a09;
  --bg-1: #1c1917;
  --bg-2: #292524;
  --text: #fef3c7;
  --text-dim: rgba(254, 243, 199, 0.65);
  --text-faint: rgba(254, 243, 199, 0.4);
  --line: rgba(254, 243, 199, 0.1);
  --accent: #fbbf24;
  --accent-2: #f59e0b;
  --accent-3: #dc2626;
  --green: #84cc16;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 16px; min-height: 100vh;
}
body {
  background:
    radial-gradient(900px 400px at 80% -10%, rgba(251, 191, 36, 0.07), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(220, 38, 38, 0.06), transparent 60%),
    var(--bg);
}
#app {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}
header {
  text-align: center;
  margin-bottom: 28px;
}
.brand {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand span {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sub {
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 4px;
}

.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  align-items: end;
}
.filter {
  flex: 1;
  min-width: 130px;
}
.filter label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.filter select {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.filter select:focus {
  border-color: var(--accent);
}
.excluded-count {
  flex: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  font-size: 11px;
  color: var(--text-faint);
}

.spinner {
  position: relative;
  height: 260px;
  margin: 8px 0 18px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.spinner.spinning {
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  animation: shake 0.06s linear infinite;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-1px); }
  75% { transform: translateX(1px); }
}

.card {
  text-align: center;
  padding: 20px;
  width: 100%;
  animation: pop 0.35s ease;
}
.card.placeholder { opacity: 0.6; }
.card .emoji {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 10px;
}
.card .name {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}
.card .type {
  font-size: 13px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 8px;
}
.card .meta {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 4px;
  line-height: 1.45;
}
.card .tags {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.card .tag {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 50px;
  color: var(--text-dim);
}
.card a.maps {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 12px;
  background: rgba(132, 204, 22, 0.15);
  border: 1px solid rgba(132, 204, 22, 0.3);
  color: var(--green);
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}
.card a.maps:hover {
  background: rgba(132, 204, 22, 0.25);
}

@keyframes pop {
  0% { transform: scale(0.95); opacity: 0; }
  60% { transform: scale(1.03); }
  100% { transform: scale(1); opacity: 1; }
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}
button {
  font: inherit;
  cursor: pointer;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  border: 0;
  transition: transform 0.1s, filter 0.1s;
}
button:active { transform: scale(0.96); }
button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0c0a09;
  font-size: 18px;
  box-shadow: 0 8px 24px -8px rgba(251, 191, 36, 0.5);
}
button.primary:hover { filter: brightness(1.1); }
button.secondary {
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--line);
  font-size: 15px;
}
button.secondary:hover { background: var(--bg-1); }

.history {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 20px;
}
.history .h-item {
  padding: 3px 8px;
  background: var(--bg-1);
  border-radius: 50px;
  border: 1px solid var(--line);
}

footer {
  margin-top: 30px;
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
}
footer details {
  text-align: left;
  margin-bottom: 20px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
}
footer summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--text-dim);
}
footer details[open] summary { margin-bottom: 10px; }
.foot-link a { color: var(--accent); text-decoration: none; }
.foot-link a:hover { text-decoration: underline; }

#all-places {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  margin-top: 4px;
}
#all-places .row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}
#all-places .row:last-child { border: 0; }
#all-places .row .e { font-size: 18px; width: 24px; text-align: center; }
#all-places .row .n { flex: 1; font-weight: 500; color: var(--text); }
#all-places .row .t { font-size: 11px; color: var(--text-faint); }
