:root {
  color-scheme: light dark;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #5b6473;
  --line: #d9dee8;
  --accent: #1f6feb;
  --accent-dark: #1557bd;
  --danger: #b42318;
  --ok: #067647;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --card: #121a2b;
    --text: #f8fafc;
    --muted: #b8c0cc;
    --line: #263246;
    --accent: #66a3ff;
    --accent-dark: #8bb9ff;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, rgba(31,111,235,.16), transparent 38%), var(--bg);
  color: var(--text);
}
.card {
  width: min(100%, 560px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .12);
}
.badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(31,111,235,.12);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}
h1 { font-size: clamp(34px, 8vw, 52px); line-height: 1; margin: 22px 0 14px; }
.lead { color: var(--muted); font-size: 19px; line-height: 1.45; margin: 0 0 22px; }
.notice, .result {
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(148, 163, 184, .12);
  color: var(--muted);
  line-height: 1.4;
}
.notice.error, .result.error { color: var(--danger); background: rgba(180,35,24,.1); }
.result.ok { color: var(--ok); background: rgba(6,118,71,.1); }
.form { display: grid; gap: 16px; margin-top: 18px; }
label { display: grid; gap: 8px; font-weight: 700; }
label span { color: var(--muted); font-weight: 500; font-size: 14px; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 15px;
  font: inherit;
  color: var(--text);
  background: transparent;
}
textarea { min-height: 130px; resize: vertical; }
button {
  border: 0;
  border-radius: 16px;
  padding: 15px 18px;
  font: inherit;
  font-weight: 800;
  background: var(--accent);
  color: white;
  cursor: pointer;
}
button:hover { background: var(--accent-dark); }
button:disabled { opacity: .65; cursor: wait; }
.secondary {
  width: 100%;
  margin-top: 16px;
  color: var(--accent);
  background: rgba(31,111,235,.12);
}
.secondary:hover { background: rgba(31,111,235,.18); }
.hidden { display: none !important; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
footer { margin-top: 22px; color: var(--muted); }
.small { font-size: 13px; }
a { color: var(--accent); font-weight: 800; }
code { font-size: 14px; }

/* Hide empty status/result boxes so no grey blanks */
[role="status"]:empty {
  display: none;
}

.result:empty {
  display: none;
}

/* Location box styling */
.location-box {
  display: none;
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(148, 163, 184, .12);
  color: var(--muted);
  line-height: 1.4;
}

/* Visible state when active */
.location-box.active {
  display: block;
}

/* Slight emphasis for title */
.location-box strong {
  display: block;
  margin-bottom: 4px;
}

/* Muted helper text */
.location-box .muted {
  color: var(--muted);
  font-size: 14px;
}