:root {
  --orange: #ff6b3e;
  --orange-dark: #e4542a;
  --bg: #17171a;
  --panel: #26262c;
  --line: #3a3a42;
  --text: #ffffff;
  --muted: #a1a1aa;
  --error: #ff8a8a;
  --radius: 24px;
  --nav-h: calc(64px + env(safe-area-inset-top));
}

* { box-sizing: border-box; }

html, body { margin: 0; overscroll-behavior-y: none; } /* no rubber-band bounce */
html { background: var(--bg); }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: var(--nav-h) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.app {
  flex: 1;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 28px 20px 8px;
}

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff;
  padding: calc(10px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 10px calc(16px + env(safe-area-inset-left));
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}
.logo { display: block; height: 44px; width: auto; }
.nav-btn {
  flex: none;
  font: inherit; font-size: 15px; font-weight: 800;
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
  background: #fff; color: #17171a; border: 2px solid #17171a;
  -webkit-tap-highlight-color: transparent;
}
.nav-btn-primary { background: var(--orange); color: #fff; border-color: var(--orange); }
.nav-btn:active { transform: scale(0.97); }
@media (max-width: 360px) {
  .logo { height: 36px; }
  .nav-btn { font-size: 13px; padding: 8px 12px; }
}

h1 {
  font-size: 40px; line-height: 1.02; font-weight: 900;
  letter-spacing: -1.2px; margin: 0 0 24px;
}
.lead { color: var(--muted); font-size: 18px; font-weight: 600; margin: -12px 0 24px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

input[type="email"] {
  width: 100%;
  font: inherit; font-size: 20px; font-weight: 700; /* ≥16px stops iOS zooming in */
  padding: 20px;
  border-radius: 16px;
  border: 3px solid var(--line);
  background: var(--panel);
  color: var(--text);
  outline: none;
}
input[type="email"]::placeholder { color: #6b6b75; font-weight: 600; }
input[type="email"]:focus { border-color: var(--orange); }
input[aria-invalid="true"] { border-color: var(--error); }

.error { color: var(--error); font-size: 16px; font-weight: 700; margin: 10px 0 0; }

.btn {
  display: block; width: 100%;
  font: inherit; font-size: 20px; font-weight: 800;
  padding: 20px; margin-top: 16px;
  border-radius: 999px; border: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 8px 24px rgba(255, 107, 62, 0.35); }
.btn-primary:active { background: var(--orange-dark); transform: scale(0.98); }
.btn-ghost { background: transparent; color: var(--text); border: 3px solid var(--line); }

.link {
  display: block; margin: 24px auto 0; padding: 10px;
  background: none; border: 0; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 700;
  color: var(--muted); text-decoration: underline; text-underline-offset: 3px;
}

/* Add-to-Home-Screen steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li {
  display: flex; align-items: center; gap: 16px;
  background: var(--panel); border-radius: 20px;
  padding: 18px; font-size: 20px; font-weight: 700; line-height: 1.25;
}
.steps small { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.steps strong { color: var(--orange); font-weight: 900; }
.num {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--orange); color: #fff; font-size: 22px; font-weight: 900;
}
.ios-share {
  display: inline-block; width: 18px; height: 23px; vertical-align: -4px; margin-left: 2px;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 18' fill='none' stroke='%23ff6b3e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 1v11M3.5 4.5 7 1l3.5 3.5M4.5 7.5H2v9.5h10V7.5H9.5'/%3E%3C/svg%3E");
}
.big-note { font-size: 22px; font-weight: 800; line-height: 1.3; }
.big-note strong { color: var(--orange); }

/* The membership card */
.card {
  background: linear-gradient(145deg, var(--orange) 0%, #ff8a5c 100%);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  box-shadow: 0 16px 44px rgba(255, 107, 62, 0.3);
  color: #fff;
}
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-title { font-weight: 900; font-size: 26px; letter-spacing: -0.6px; }
.card-badge {
  font-size: 12px; font-weight: 900; letter-spacing: 1.5px;
  background: rgba(0, 0, 0, 0.2); padding: 6px 12px; border-radius: 999px;
}
.qr { background: #fff; border-radius: 14px; padding: 14px; aspect-ratio: 1 / 1; }
.qr svg { display: block; width: 100%; height: 100%; }
.card-email {
  margin: 16px 0 0; text-align: center;
  font-size: clamp(13px, 4.3vw, 17px); font-weight: 800; overflow-wrap: anywhere;
}

.hint { text-align: center; font-size: 20px; font-weight: 800; margin: 22px 0 4px; }

.footer { text-align: center; padding: 16px 0 20px; }
.footer a { color: var(--muted); font-size: 13px; text-decoration: none; }

[hidden] { display: none !important; }
