:root {
  --bg: #ffffff;
  --fg: #16171a;
  --muted: #6b6d73;
  --card: #f3f3f5;
  --line: #e2e2e6;
  --accent: #1c6fd8;
  --accent-fg: #ffffff;
  --urgent: #c0392b;
  --ok: #2e9e5b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171a;
    --fg: #f1f1f3;
    --muted: #9a9ca3;
    --card: #212228;
    --line: #303138;
    --accent: #4d94f0;
    --accent-fg: #0d0e10;
    --urgent: #e5675a;
    --ok: #57c98a;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 19px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}

#app {
  max-width: 640px;
  margin: 0 auto;
  padding:
    calc(env(safe-area-inset-top) + 28px)
    calc(env(safe-area-inset-right) + 22px)
    calc(env(safe-area-inset-bottom) + 32px)
    calc(env(safe-area-inset-left) + 22px);
}

.hidden { display: none !important; }

h1 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 650;
}

h2.section-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 34px 0 12px;
}

.lead { margin: 0 0 24px; }
.muted { color: var(--muted); }
.center { text-align: center; }

.steps {
  margin: 0 0 26px;
  padding-left: 26px;
}
.steps li {
  margin-bottom: 14px;
  padding-left: 4px;
}

.share-glyph {
  display: inline-block;
  width: 20px;
  height: 24px;
  vertical-align: -6px;
  margin-left: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 24' fill='none' stroke='%231c6fd8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 2v13'/%3E%3Cpath d='M5.5 6.5L10 2l4.5 4.5'/%3E%3Cpath d='M5 10H3v12h14V10h-2'/%3E%3C/svg%3E") center/contain no-repeat;
}

.field {
  display: block;
  margin-bottom: 18px;
}
.field span {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
}
.field input {
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  font: inherit;
  font-size: 20px;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
}
.field input:focus {
  border-color: var(--accent);
}

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

button.big {
  display: block;
  width: 100%;
  min-height: 64px;
  margin-top: 8px;
  padding: 0 20px;
  font-size: 21px;
  font-weight: 600;
  color: var(--accent-fg);
  background: var(--accent);
  border: none;
  border-radius: 16px;
}
button.big:active { opacity: 0.75; }
button.big[disabled] { opacity: 0.5; }

button.big.ghost {
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--line);
}

.error {
  margin-top: 16px;
  padding: 14px 16px;
  font-size: 17px;
  color: var(--urgent);
  background: var(--card);
  border-radius: 12px;
}

.done {
  padding-top: 14vh;
  text-align: center;
}
.done .lead { margin-top: 12px; }

.tick {
  width: 76px;
  height: 76px;
  margin: 0 auto 26px;
  border-radius: 50%;
  background: var(--ok);
  position: relative;
}
.tick::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 18px;
  width: 20px;
  height: 34px;
  border: solid #fff;
  border-width: 0 5px 5px 0;
  border-radius: 2px;
  transform: rotate(45deg);
}
