/* Legal pages (privacy, terms, delete) and the 404 page. Loaded after styles.css, which holds the tokens, fonts and nav pill. */
* { margin: 0; padding: 0; }
body {
  font-family: 'Barlow', sans-serif;
  background: var(--bg);
  color: var(--tx1);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* BUTTONS */
/* BUTTONS */
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--amber);
  color: #201202;
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  min-height: 40px;
}
.btn-primary:hover { background: var(--amber-hover); transform: translateY(-1px); }
.btn-primary.large {
  font-size: 16px;
  padding: 16px 32px;
  border-radius: 999px;
  min-height: 56px;
}
.app-store-link,
.play-link {
  display: inline-flex;
  align-items: center;
  transition: transform 0.15s;
}
.app-store-link:hover,
.play-link:hover { transform: translateY(-1px); }
.app-store-link img {
  height: 56px;
  width: auto;
  display: block;
}
/* Google's official badge file carries its own clear space (about 16% of its height on each side).
   It is 646x250, so this height makes the black badge itself match the App Store badge. */
.play-link img {
  height: 82px;
  width: auto;
  display: block;
  margin: -13px -12px;
}
.badge-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.legal-note { font-size: 11px; color: var(--tx3); margin-top: 8px; max-width: 520px; }

/* SECTION SHELL */
section { padding: 100px 48px; background: var(--bg); }
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}
.section-heading {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 24px;
  color: var(--tx1);
}
.section-heading span { color: var(--amber); }
.section-body {
  font-size: 18px;
  line-height: 1.7;
  color: var(--tx2);
  max-width: 600px;
}


/* FOOTER */
footer {
  padding: 32px 48px;
  background: var(--bg);
  border-top: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-copy { font-size: 12px; color: var(--tx3); }
.footer-legal {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--tx3);
  flex-wrap: wrap;
}
.footer-legal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.footer-legal a:hover { color: var(--tx2); }


/* ANIMATION */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}


/* POLICY + FORM (privacy, terms, delete) */
  .policy-hero {
    padding: 140px 48px 80px;
    background: var(--bg);
  }
  .policy-content {
    max-width: 760px;
    margin: 0 auto;
  }
  .policy-section {
    padding: 60px 48px;
    background: var(--bg);
  }
  .policy-section:nth-child(even) {
    background: var(--bg-mid);
  }
  .policy-card {
    background: var(--surface);
    border: 1px solid var(--stroke);
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 16px;
  }
  .policy-card-title {
    font-family: 'Barlow', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--tx1);
    margin-bottom: 8px;
  }
  .policy-card-body {
    font-size: 15px;
    line-height: 1.7;
    color: var(--tx2);
    margin: 0;
  }
  .policy-card-body + .policy-card-body { margin-top: 10px; }
  .policy-highlight {
    border-left: 3px solid var(--amber);
    padding-left: 20px;
    margin: 24px 0;
  }
  .policy-updated {
    font-size: 13px;
    color: var(--tx3);
    margin-top: 12px;
  }
  .policy-list {
    margin: 0;
    padding-left: 20px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--tx2);
  }
  .policy-list li + li { margin-top: 6px; }

  /* Deletion form */
  .form-label {
    display: block;
    font-family: 'Barlow', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--tx1);
    margin: 0 0 8px;
  }
  .form-input {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    font-size: 16px;
    color: var(--tx1);
    background: var(--surface);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 14px 16px;
  }
  .form-input:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
  .form-hint { font-size: 13px; line-height: 1.6; color: var(--tx3); margin: 8px 0 0; }
  .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 20px; }
  .form-actions .btn-primary { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
  .form-actions .btn-primary:disabled { opacity: .5; cursor: default; transform: none; }
  .btn-danger {
    background: var(--danger);
    color: #FFFFFF;
    border: 0;
    border-radius: 999px;
    padding: 14px 28px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }
  .btn-danger:disabled { opacity: .5; cursor: default; }
  .btn-link { background: none; border: 0; padding: 0; font: inherit; color: var(--tx2); text-decoration: underline; cursor: pointer; }
  .check { display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; font-size: 15px; line-height: 1.6; color: var(--tx2); }
  .check input { margin-top: 5px; }
  .form-msg { margin: 16px 0 0; font-size: 15px; line-height: 1.6; color: var(--tx2); }
  .form-msg.error { color: var(--danger); }
  .form-msg.ok { color: var(--ok); }
  [hidden] { display: none !important; }

  @media (max-width: 900px) {
    .policy-hero { padding: 120px 24px 60px; }
    .policy-section { padding: 48px 24px; }
    .policy-card { padding: 20px 20px; }
  }

/* 404 */
  /* Page-specific layout. Keeps the brand language from styles.css and only
     adds what's needed to center the message and shape the 404 hero.
     Two content variants share this shell: the default "page not found"
     and the magic-link "open on your phone" variant — the latter is
     swapped in via JS when the requested path starts with /auth/. */
  .page-404 {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    position: relative;
    overflow: hidden;
  }
  .page-404::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 640px; height: 640px;
    background: radial-gradient(circle, rgba(240, 170, 62, 0.08) 0%, transparent 70%);
    pointer-events: none;
  }
  .page-404::after {
    content: '';
    position: absolute;
    bottom: -160px; left: -120px;
    width: 520px; height: 520px;
    background: radial-gradient(circle, rgba(240, 170, 62, 0.05) 0%, transparent 70%);
    pointer-events: none;
  }

  .error-hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 48px 80px;
    position: relative;
    z-index: 1;
  }
  .error-inner {
    max-width: 640px;
    width: 100%;
    text-align: center;
    animation: fadeUp 0.6s ease both;
  }

  .error-code {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(96px, 14vw, 168px);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.03em;
    color: var(--amber);
    margin-bottom: 8px;
    text-shadow: 0 8px 32px rgba(240, 170, 62, 0.18);
  }
  .error-eyebrow {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--amber);
    background: rgba(240, 170, 62, 0.1);
    border: 1px solid rgba(240, 170, 62, 0.25);
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
  }
  .error-headline {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(38px, 5vw, 56px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--tx1);
    margin-bottom: 20px;
  }
  .error-headline span { color: var(--amber); }
  .error-body {
    font-size: 17px;
    line-height: 1.7;
    color: var(--tx2);
    margin-bottom: 36px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }
  .error-cta-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
  }
  .error-cta-note {
    font-size: 13px;
    color: var(--tx3);
    margin-top: 20px;
  }

  @media (max-width: 600px) {
    .error-hero { padding: 110px 24px 64px; }
    .error-code { font-size: 96px; }
    .error-headline { font-size: 30px; }
    .error-body { font-size: 16px; }
    .error-cta-group { flex-direction: column; gap: 12px; width: 100%; }
    .error-cta-group > .btn-primary { width: 100%; justify-content: center; }
    .error-cta-group .app-store-link img { height: 48px; }
    .error-cta-group .play-link img { height: 70px; margin: -11px -10px; }
  }

/* MOBILE */
@media (max-width: 900px) {
  .btn-primary { font-size: 13px; padding: 10px 16px; }
  section { padding: 72px 24px; }
  footer { flex-direction: column; text-align: center; padding: 24px; }
  .footer-legal { justify-content: center; }
}
