:root {
  color-scheme: dark;
  --navy-950: #071726;
  --navy-800: #0d2a3e;
  --navy-700: #123b53;
  --cyan-400: #4ed9ef;
  --cyan-200: #b8f5fc;
  --white-100: #f4fbfc;
  --slate-300: #b5c5cf;
  --amber-400: #ffbf5a;
  --line: rgb(184 245 252 / 24%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  background: var(--navy-950);
  color: var(--white-100);
}

button,
output { font: inherit; }

.page-shell {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.instrument-card {
  position: relative;
  isolation: isolate;
  width: min(100%, 440px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--navy-800);
  box-shadow: 0 18px 48px rgb(0 0 0 / 30%);
  padding: 28px;
}

.instrument-card::before,
.instrument-card::after {
  position: absolute;
  z-index: -1;
  top: 185px;
  left: 50%;
  width: 260px;
  height: 260px;
  border: 1px solid rgb(78 217 239 / 15%);
  border-radius: 50%;
  content: "";
  transform: translateX(-50%);
}

.instrument-card::after {
  top: 214px;
  width: 202px;
  height: 202px;
  box-shadow: 0 -101px 0 -100px rgb(78 217 239 / 28%), 0 101px 0 -100px rgb(78 217 239 / 28%), 101px 0 0 -100px rgb(78 217 239 / 28%), -101px 0 0 -100px rgb(78 217 239 / 28%);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan-400);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p { margin-top: 0; }

h1 {
  max-width: 12ch;
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 8vw, 2.35rem);
  letter-spacing: -0.035em;
  line-height: 1.03;
}

h2 {
  margin-bottom: 10px;
  color: var(--slate-300);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.privacy,
.recovery p {
  color: var(--slate-300);
  font-size: 0.97rem;
  line-height: 1.5;
}

.status {
  min-height: 48px;
  margin: 22px 0;
  border-left: 3px solid var(--cyan-400);
  padding: 12px 0 12px 13px;
  color: var(--cyan-200);
  font-size: 0.94rem;
  line-height: 1.35;
}

.status-warning { border-left-color: var(--amber-400); color: #ffe2b0; }

.readout {
  min-height: 139px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(7 23 38 / 68%);
  padding: 18px;
}

.coordinates,
.accuracy {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.coordinates {
  min-height: 2.75em;
  color: var(--white-100);
  font-size: clamp(1.06rem, 5vw, 1.35rem);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.accuracy { margin-top: 10px; color: var(--cyan-200); font-size: 0.9rem; }

.actions { display: grid; gap: 12px; margin: 22px 0; }

.button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--white-100);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 12px 16px;
  text-align: center;
}

.button-primary { border-color: var(--cyan-400); background: var(--cyan-400); color: var(--navy-950); }
.button-quiet { color: var(--cyan-200); }
.button:disabled { cursor: not-allowed; opacity: 0.45; }
.button:not(:disabled):active { background: var(--navy-700); }
.button-primary:not(:disabled):active { background: var(--cyan-200); }

.button:focus-visible {
  outline: 3px solid var(--white-100);
  outline-offset: 3px;
}

.recovery { border-top: 1px solid var(--line); padding-top: 20px; }
.recovery p { margin-bottom: 0; font-size: 0.88rem; }

@media (max-width: 374px) {
  .instrument-card { border-radius: 16px; padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
