* {
  box-sizing: border-box;
}

:root {
  --fw-navy: #1d2b53;
  --fw-red: #ff004d;
  --fw-white: #ffffff;
  --fw-soft: #f7f9fc;
  --fw-muted: #697994;
  --fw-border: #dfe5ef;
  --fw-shadow: 0 22px 55px rgba(29, 43, 83, 0.16);
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Heebo", Arial, Helvetica, sans-serif;
  background: #ffffff;
  color: var(--fw-navy);
}

button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

h1,
.find-button,
.distance,
.reveal-card,
.primary-button,
.secondary-button {
  font-family: "DM Sans", Arial, Helvetica, sans-serif;
}

.app-shell {
  min-height: 100svh;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 0, 77, 0.06), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.screen {
  display: none;
  width: 100%;
  max-width: 520px;
  min-height: 100svh;
  padding: 34px 28px 28px;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.screen.active {
  display: flex;
}

.welcome-header,
.compass-header {
  width: 100%;
  margin-top: 10px;
}

.page-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border: 2px solid var(--fw-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 26px rgba(29, 43, 83, 0.08);
}

.page-icon.small {
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
}

.page-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--fw-red);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-icon.small svg {
  width: 24px;
  height: 24px;
}

.screen h1 {
  margin: 0;
  color: var(--fw-navy);
  font-family: "DM Sans", Arial, Helvetica, sans-serif;
  font-size: clamp(2.35rem, 10vw, 3.35rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.subtext {
  margin: 14px auto 0;
  max-width: 320px;
  color: var(--fw-muted);
  font-size: 1.22rem;
  line-height: 1.35;
}

.find-button {
  position: relative;
  margin: 26px 0 28px;
  width: min(68vw, 260px);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 12px solid var(--fw-white);
  border-radius: 999px;
  background: var(--fw-red);
  color: var(--fw-white);
  cursor: pointer;
  box-shadow:
    0 0 0 8px var(--fw-navy),
    var(--fw-shadow);
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.find-button:active {
  transform: scale(0.98);
}

.find-button:disabled {
  cursor: wait;
  opacity: 0.78;
}

.find-button span {
  display: block;
  font-size: clamp(2.55rem, 10vw, 3.75rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.button-arrow {
  width: 40px;
  height: 40px;
  margin-bottom: 0;
  fill: var(--fw-white);
  transform: rotate(22deg);
}

.permission-note {
  width: 100%;
  min-height: 84px;
  margin: 0;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  border: 1px solid var(--fw-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(29, 43, 83, 0.08);
  color: var(--fw-navy);
  font-size: 1.08rem;
  line-height: 1.35;
  text-align: left;
}

.note-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--fw-soft);
}

.note-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: var(--fw-red);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}


.permission-note > span:last-child {
  flex: 1;
}

.permission-note.error {
  border-color: rgba(255, 0, 77, 0.25);
  color: var(--fw-red);
}

.permission-note.success {
  color: var(--fw-navy);
}

.privacy-note {
  margin: 18px 0 0;
  color: var(--fw-muted);
  font-size: 0.95rem;
}

.privacy-note::before {
  content: "🔒";
  margin-right: 8px;
}

.compass-wrap {
  margin-top: 32px;
  width: min(75vw, 310px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.compass {
  position: relative;
  width: 100%;
  height: 100%;
  border: 12px solid var(--fw-white);
  border-radius: 999px;
  background: radial-gradient(circle at center, #ffffff 0%, #ffffff 60%, #f5f7fb 100%);
  box-shadow:
    0 0 0 8px var(--fw-navy),
    var(--fw-shadow),
    inset 0 0 0 1px var(--fw-border);
}

.compass::before {
  content: "";
  position: absolute;
  inset: 42px;
  border: 1px dashed rgba(29, 43, 83, 0.22);
  border-radius: inherit;
}

.cardinal {
  position: absolute;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--fw-soft);
  color: var(--fw-muted);
  font-family: "DM Sans", Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
}

.north { top: 15px; left: 50%; transform: translateX(-50%); }
.east { right: 15px; top: 50%; transform: translateY(-50%); }
.south { bottom: 15px; left: 50%; transform: translateX(-50%); }
.west { left: 15px; top: 50%; transform: translateY(-50%); }

.compass-needle {
  position: absolute;
  width: 42px;
  height: 188px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(32deg);
  transform-origin: center;
  filter: drop-shadow(0 10px 10px rgba(29, 43, 83, 0.18));
  transition: transform 120ms linear;
}

.needle-top,
.needle-bottom {
  width: 0;
  height: 0;
  margin: 0 auto;
  border-left: 21px solid transparent;
  border-right: 21px solid transparent;
}

.needle-top {
  border-bottom: 104px solid var(--fw-red);
}

.needle-bottom {
  border-top: 84px solid var(--fw-navy);
}

.compass-pin {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 7px solid var(--fw-navy);
  border-radius: 999px;
  background: var(--fw-white);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.distance {
  margin: 28px 0 0;
  padding: 10px 18px 11px;
  border-radius: 999px;
  background: rgba(255, 0, 77, 0.08);
  color: var(--fw-red);
  font-size: clamp(1.75rem, 7vw, 2.45rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.compass-message {
  margin: 14px 0 0;
  max-width: 330px;
  color: var(--fw-muted);
  font-size: 0.98rem;
  line-height: 1.35;
}

.compass-message.error {
  color: var(--fw-red);
}

.compass-message.success {
  color: var(--fw-navy);
}

.reveal-card {
  width: 100%;
  min-height: 86px;
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid var(--fw-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(29, 43, 83, 0.08);
  color: var(--fw-navy);
  font-size: 1rem;
  cursor: pointer;
}

.reveal-card:active {
  transform: scale(0.99);
}

.reveal-label {
  display: block;
  color: var(--fw-muted);
  font-family: "Heebo", Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reveal-card strong {
  display: block;
  margin-top: 5px;
  color: var(--fw-red);
  font-size: 1.38rem;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.reveal-address {
  display: block;
  margin-top: 7px;
  color: var(--fw-muted);
  font-family: "Heebo", Arial, Helvetica, sans-serif;
  font-size: 0.92rem;
  line-height: 1.3;
}

.action-stack {
  width: 100%;
  margin-top: auto;
  padding-top: 22px;
  display: grid;
  gap: 12px;
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}

.primary-button {
  background: var(--fw-navy);
  color: var(--fw-white);
  box-shadow: 0 12px 28px rgba(29, 43, 83, 0.22);
}

.secondary-button {
  background: #fff;
  color: var(--fw-navy);
  border: 1px solid var(--fw-border);
}

.primary-button:active,
.secondary-button:active {
  transform: scale(0.98);
}

@media (max-height: 720px) {
  .screen {
    padding-top: 24px;
  }

  .page-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
  }

  .screen h1 {
    font-size: clamp(2rem, 8.5vw, 2.85rem);
  }

  .subtext {
    margin-top: 14px;
    font-size: 1.05rem;
  }

  .find-button {
    margin-top: 22px;
    margin-bottom: 22px;
    width: min(66vw, 250px);
  }

  .permission-note {
    min-height: 76px;
    padding: 14px 16px;
    gap: 14px;
    font-size: 0.98rem;
  }

  .note-icon {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }

  .button-arrow {
    width: 34px;
    height: 34px;
  }

  .privacy-note {
    margin-top: 12px;
    font-size: 0.86rem;
  }

  .compass-wrap {
    margin-top: 22px;
    width: min(66vw, 270px);
  }

  .distance {
    margin-top: 22px;
  }

  .action-stack {
    padding-top: 16px;
  }
  
  .site-credit {
  margin: 16px 0 0;
  color: var(--fw-muted);
  font-family: "Heebo", Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  line-height: 1.3;
  text-align: center;
  opacity: 0.8;
}
}
