:root {
  --primary: #0069b4;
  --primary-hover: #004b81;
  --primary-dark: #00101b;
  --secondary: #1f7c97;
  --accent: #da4637;
  --bg: #f3f4f8;
  --card: #ffffff;
  --title: #050d36;
  --text: #1c2434;
  --muted: #5b6578;
  --line: #d8dee8;
  --ok: #0e8d68;
  --radius: 16px;
  --tap: 52px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Open Sans", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
}

.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
  background: linear-gradient(180deg, #e8f3fb 0%, var(--bg) 220px);
}

.hero {
  background: linear-gradient(160deg, var(--primary) 0%, #004b81 70%, #00101b 100%);
  color: #fff;
  padding: 22px 20px 28px;
  text-align: center;
}
.hero img {
  height: 56px;
  width: auto;
  background: #fff;
  border-radius: 12px;
  padding: 6px 10px;
}
.hero h1 {
  margin: 14px 0 6px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.92;
  line-height: 1.4;
}
.badge-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.badge {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 600;
}

.sheet {
  padding: 16px 16px 32px;
  display: grid;
  gap: 14px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 8px 24px rgba(5, 13, 54, 0.06);
}

.card h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: var(--title);
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  margin: 10px 0 6px;
}

input, select, textarea {
  width: 100%;
  min-height: var(--tap);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(0,105,180,0.22);
  border-color: var(--primary);
}

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.seg button, .amounts button {
  min-height: var(--tap);
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  color: var(--title);
  cursor: pointer;
}
.seg button[aria-pressed="true"],
.amounts button[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.amount-wrap {
  position: relative;
  margin-top: 10px;
}
.amount-wrap span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  color: var(--primary);
}
.amount-wrap input { padding-left: 32px; font-size: 1.25rem; font-weight: 700; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 8px;
}
.switch input { width: 22px; height: 22px; min-height: 22px; accent-color: var(--primary); }
.switch span { font-size: 0.95rem; }

.hint {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 8px 0 0;
}

.actions { display: grid; gap: 10px; }
.btn {
  min-height: 56px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-weight: 800;
  font-size: 1.02rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.btn-ch { background: #e21836; color: #fff; }
.btn-pp { background: #003087; color: #fff; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-ghost {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.install-card { border: 2px solid #c5def0; }
.icon-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.icon-preview img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0, 105, 180, 0.25);
}
.icon-preview strong { display: block; font-size: 1.15rem; color: var(--title); }
.icon-preview span { color: var(--muted); font-size: 0.9rem; }
.ios-steps {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--text);
  line-height: 1.55;
}
.ios-steps li { margin: 8px 0; }
.ios-share {
  display: inline-block;
  min-width: 28px;
  text-align: center;
  border: 1.5px solid var(--primary);
  border-radius: 6px;
  color: var(--primary);
  font-weight: 800;
  padding: 0 6px;
}
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.secure {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 4px 0 0;
}

.err {
  color: #9b1c1c;
  background: #fde8e8;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.88rem;
  display: none;
}
.err.show { display: block; }

.install {
  display: none;
  background: #fff7e8;
  border: 1px solid #f0d7a3;
  color: #6a4b00;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.92rem;
  line-height: 1.45;
}
.install.show { display: block; }
.install strong { display: block; margin-bottom: 4px; }

.foot {
  text-align: center;
  padding: 8px 8px 24px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}
.foot a { color: var(--primary); }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,16,27,0.55);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  z-index: 20;
}
.modal.show { display: flex; }
.modal-card {
  background: #fff;
  width: min(520px, 100%);
  border-radius: 20px;
  padding: 20px;
  max-height: 90dvh;
  overflow: auto;
}
.modal-card h3 { margin: 0 0 8px; }
.summary { font-size: 0.95rem; line-height: 1.5; color: var(--text); }
.summary b { color: var(--title); }
