:root {
  --bg: #f3f7fd;
  --card: #ffffff;
  --line: #d5e2f5;
  --text: #0b3d91;
  --muted: #4a6fa5;
  --accent: #1a5fd0;
  --accent-soft: #e8f0fe;
  --accent-ink: #ffffff;
  --danger: #c62828;
  --radius: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body { min-height: 100dvh; }

.hidden { display: none !important; }

.top {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.back {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 16px calc(28px + var(--safe-b));
  display: grid;
  gap: 20px;
}

.hero {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}

h1 {
  margin: 14px 0 10px;
  font-size: clamp(1.45rem, 5vw, 2.1rem);
  line-height: 1.2;
  color: var(--text);
}

.content {
  white-space: pre-wrap;
  line-height: 1.65;
  color: #234a86;
  font-size: 1.02rem;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  padding: 18px;
  box-shadow: 0 8px 28px rgba(11, 61, 145, 0.08);
}

.progress-block { margin-bottom: 16px; }

.count-line { font-size: 1.15rem; color: var(--text); }

.count-line strong {
  font-size: 1.6rem;
  color: var(--accent);
}

.target-line {
  color: var(--muted);
  margin: 4px 0 10px;
  font-size: 0.92rem;
}

.bar {
  height: 10px;
  background: var(--accent-soft);
  border-radius: 999px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.4s ease;
}

.form h2, .thanks h2 {
  margin: 0 0 14px;
  font-size: 1.15rem;
  color: var(--text);
}

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

input[type="text"],
input[type="email"],
input:not([type="checkbox"]),
.gp-country-input {
  width: 100%;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  background: #f5f9ff;
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
}

.gp-country {
  position: relative;
  margin-bottom: 12px;
}

.gp-country-input { margin-bottom: 0; }

.gp-country-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 5;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  max-height: 220px;
  overflow: auto;
  box-shadow: 0 10px 24px rgba(11, 61, 145, 0.15);
}

.gp-country-list li {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.gp-country-list li:hover { background: var(--accent-soft); }

.gp-country-code {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 8px 0 12px;
  color: var(--text);
  font-size: 0.92rem;
}

.check input { margin-top: 3px; width: 18px; height: 18px; }

.error {
  color: var(--danger);
  min-height: 1.2em;
  font-size: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  font-weight: 650;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-block { width: 100%; }

.thanks {
  text-align: center;
}

.thanks p { color: var(--muted); }

.share {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.share-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #f5f9ff;
  color: var(--accent);
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  cursor: pointer;
}

.share-btn svg { width: 22px; height: 22px; fill: currentColor; }
.share-btn.is-wa { color: #128c7e; }
.share-btn.is-fb { color: #1877f2; }
.share-btn.is-x { color: #111; }

.sticky-cta {
  position: sticky;
  bottom: calc(12px + var(--safe-b));
  margin-top: 14px;
  width: 100%;
  box-shadow: 0 8px 24px rgba(11, 61, 145, 0.2);
}

.desktop-only { display: none; }
.mobile-only { display: block; }

@media (min-width: 860px) {
  .layout {
    grid-template-columns: 1.3fr 0.9fr;
    align-items: start;
    gap: 28px;
    padding: 28px 20px 48px;
  }
  .panel {
    position: sticky;
    top: 20px;
  }
  .desktop-only { display: block; }
  .mobile-only { display: none; }
}
