:root {
  color-scheme: light;
  --paper: #f6f3ed;
  --ink: #171614;
  --muted: #666159;
  --line: rgba(23, 22, 20, .12);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: max(32px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  background: radial-gradient(circle at 50% 0%, #fff 0%, transparent 44%), var(--paper);
  text-align: center;
}

main { width: min(100%, 650px); }

.app-icon {
  display: block;
  width: 94px;
  height: 94px;
  margin: 0 auto 24px;
  border-radius: 22.5%;
  box-shadow: 0 16px 34px rgba(31, 28, 22, .14), 0 2px 7px rgba(31, 28, 22, .08);
}

h1 {
  margin: 0;
  font-size: clamp(2.55rem, 9vw, 3.7rem);
  font-weight: 690;
  line-height: .98;
  letter-spacing: -.05em;
}

.tagline {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 4vw, 1.2rem);
  line-height: 1.5;
  letter-spacing: -.015em;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 24px;
  margin-top: 36px;
}

.badge {
  display: grid;
  place-items: center;
  min-height: 56px;
  border-radius: 10px;
  touch-action: manipulation;
}

.badge:hover { filter: brightness(1.08); }
.badge img { display: block; height: auto; }
.badge-apple img { width: clamp(112px, 39vw, 180px); }
.badge-google img { width: clamp(138px, 45vw, 220px); }

footer {
  max-width: 590px;
  margin: 48px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.55;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  font-size: .82rem;
}

.footer-links a, .help-link {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

footer p { margin: 10px 0 0; }

button, input { font: inherit; }
button { cursor: pointer; }

.help-link {
  min-height: 44px;
  margin-top: 12px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  font-size: .88rem;
}

:focus-visible { outline: 2px solid #564e42; outline-offset: 4px; }

dialog {
  width: min(calc(100% - 32px), 440px);
  max-height: calc(100% - 40px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fffdf9;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 24px 70px rgb(23 22 20 / .2);
}

dialog::backdrop { background: rgb(23 22 20 / .34); }
dialog h2 { margin: 0 28px 0 0; font-size: 1.4rem; letter-spacing: -.035em; }
dialog ol { padding-inline-start: 23px; line-height: 1.5; color: var(--muted); }
dialog li + li { margin-top: 8px; }

.close {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font-size: 1.6rem;
}

.dialog-button {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--ink);
  color: white;
}

#manual-copy, .direct-link { display: block; margin-top: 12px; font-size: .92rem; }
#manual-url { width: 100%; margin-top: 8px; padding: 8px; }
.direct-link { color: inherit; text-align: center; }
.copy-status { margin: 0; }
.copy-status:not(:empty) { margin-top: 10px; font-size: .88rem; }

.privacy {
  max-width: 550px;
  text-align: left;
  line-height: 1.6;
}

.privacy h1 { margin-block: 16px 24px; font-size: clamp(2rem, 7vw, 3rem); }
.privacy a { color: inherit; text-underline-offset: 3px; }

@media (max-width: 480px) {
  .badges { gap: 6px 8px; margin-top: 28px; }
  footer { margin-top: 30px; }
}
