.sg-page { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
.sg-shell {
  min-height: calc(100vh - 40px);
  min-height: calc(100dvh - 40px);
  display: flex; flex-direction: column;
}

.sg-top { display: flex; align-items: center; gap: 6px; min-height: 44px; margin: -6px 0 4px -12px; }
.sg-back {
  width: 44px; height: 44px; display: grid; place-items: center; flex: none;
  background: none; border: 0; border-radius: 12px; color: var(--p-gold-ink); cursor: pointer;
}
.sg-back:hover { background: color-mix(in srgb, var(--p-gold) 10%, transparent); }
.sg-top-t { color: var(--p-muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sg-card { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sg-form { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.sg-spacer { flex: 1; min-height: 12px; }

.sg-steps { display: flex; gap: 5px; margin-bottom: 10px; }
.sg-steps i { flex: 1; height: 3px; border-radius: 2px; background: var(--p-line); }
.sg-steps i.on { background: var(--p-gold); }

.sg-h { font: 400 27px/1.15 var(--p-font-display); color: var(--p-ink); text-wrap: balance; overflow-wrap: anywhere; }
.sg-page .sg-h:focus, .sg-page .sg-h:focus-visible { outline: none; }
.sg-sub { color: var(--p-body); font-size: 15px; line-height: 1.5; }
.sg-fine { color: var(--p-muted); font-size: 13px; line-height: 1.45; text-align: center; }
.sg-err { color: var(--p-err); font-size: 14px; line-height: 1.45; }
.sg-err[hidden], .sg-note[hidden] { display: none; }
.sg-note { color: var(--p-body); font-size: 14px; line-height: 1.45; text-align: center; }

.sg-field { display: flex; flex-direction: column; gap: 6px; }
.sg-label { font-size: 13.5px; font-weight: 500; color: var(--p-body); }
.sg-input {
  width: 100%; padding: 13px 14px; border-radius: 12px;
  border: 1px solid var(--p-card-line); background: var(--p-field); color: var(--p-ink);
  font: 400 16px/1.4 var(--p-font-body);
}
.sg-input::placeholder { color: var(--p-dim); opacity: .85; }
.sg-input:focus { outline: none; border-color: var(--p-gold); box-shadow: 0 0 0 3px var(--p-ring); }
.sg-words { resize: vertical; min-height: 104px; }
.sg-link { color: var(--p-muted); font-size: 13.5px; overflow-wrap: anywhere; }
.sg-link b { color: var(--p-body); font-weight: 500; }

.sg-btn {
  width: 100%; min-height: 50px; padding: 13px 16px; border-radius: 14px;
  border: 1px solid var(--p-card-line); background: none; color: var(--p-ink);
  font: 600 15.5px/1.2 var(--p-font-body); cursor: pointer;
}
.sg-btn.sg-primary { background: var(--p-btn); border-color: var(--p-btn); color: var(--p-btn-ink); }
.sg-btn.sg-contact { color: var(--p-gold-ink); border-color: var(--p-gold); }
.sg-btn:hover:not(:disabled) { filter: brightness(1.06); }
.sg-btn:disabled { opacity: .4; cursor: default; }

.sg-count { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-top: 2px; }
.sg-count b { font: 400 52px/1 var(--p-font-display); color: var(--p-gold-ink); font-variant-numeric: tabular-nums; }
.sg-count span { color: var(--p-body); font-size: 15px; }
.sg-track { position: relative; height: 36px; margin: 2px 0 4px; }
.sg-range { position: relative; z-index: 1; display: block; width: 100%; height: 36px; margin: 0; accent-color: var(--p-gold); cursor: pointer; background: none; }
.sg-mark {
  position: absolute; top: 50%; left: calc(8px + var(--f) * (100% - 16px));
  width: 2px; height: 14px; margin-left: -1px; transform: translateY(-50%);
  border-radius: 1px; background: var(--p-muted); opacity: .75;
}

.sg-plan { display: flex; flex-direction: column; gap: 10px; }
.sg-plan-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sg-plan-h b { font: 700 21px/1.15 var(--p-font-display); color: var(--p-ink); }
.sg-price { text-align: right; white-space: nowrap; line-height: 1.2; font-variant-numeric: tabular-nums; }
.sg-price strong { color: var(--p-gold-ink); font-size: 20px; font-weight: 600; }
.sg-price span { color: var(--p-body); font-size: 13.5px; }
.sg-price small { display: block; color: var(--cw-green, #3da867); font-size: 12.5px; margin-top: 2px; }

.sg-seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px;
  border-radius: 12px; border: 1px solid var(--p-line); background: var(--p-field);
}
.sg-seg button {
  min-height: 38px; border: 0; border-radius: 9px; background: none; cursor: pointer;
  color: var(--p-muted); font: 500 14px var(--p-font-body);
}
.sg-seg button[aria-pressed="true"] { background: var(--p-card); color: var(--p-ink); box-shadow: inset 0 0 0 1px var(--p-card-line); }

.sg-feats { display: flex; flex-direction: column; gap: 7px; }
.sg-ft { display: flex; gap: 8px; align-items: center; font-size: 14.5px; color: var(--p-ink); line-height: 1.35; }
.sg-ft svg { color: var(--p-gold); flex: none; }
.sg-olds { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.sg-olds .sg-ft { font-size: 13px; color: var(--p-muted); }
.sg-olds .sg-ft svg { color: var(--p-dim); }
.sg-plus { font-size: 13px; color: var(--p-gold-ink); margin-top: 2px; }
.sg-soon { color: var(--p-muted); font-size: 13.5px; flex-wrap: wrap; padding-left: 22px; }
.sg-soon-tag { font-style: normal; font-size: 11.5px; letter-spacing: .02em; color: var(--p-muted); border: 1px dashed var(--p-dim); border-radius: 999px; padding: 1px 8px; }
.sg-renew { color: var(--p-body); font-size: 13px; line-height: 1.45; margin: 0; }
.sg-more { color: var(--p-body); font-size: 13.5px; line-height: 1.45; }
.sg-more-lg { font-size: 15px; }
.sg-new { animation: sg-grow .55s ease-out both; }
@keyframes sg-grow { from { opacity: 0; transform: translateX(-8px); } }

.sg-done { align-items: center; text-align: center; justify-content: center; gap: 14px; }
.sg-tick {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--p-gold); color: var(--p-gold-ink);
  background: color-mix(in srgb, var(--p-gold) 12%, transparent);
}
.sg-qr { background: #fff; border-radius: 14px; padding: 10px; display: flex; }
.sg-qr img, .sg-qr canvas { display: block; width: 128px; height: 128px; }
.sg-linkrow {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 4px 4px 4px 14px; border-radius: 12px; border: 1px solid var(--p-line); background: var(--p-field);
  color: var(--p-body); font-size: 14px; text-align: left;
}
.sg-linkrow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sg-copy {
  flex: none; min-height: 40px; padding: 0 12px; border: 0; border-radius: 9px; background: none;
  color: var(--p-gold-ink); font: 600 14px var(--p-font-body); cursor: pointer;
}
.sg-wait {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--p-line); border-top-color: var(--p-gold);
  animation: sg-spin 1s linear infinite;
}
@keyframes sg-spin { to { transform: rotate(1turn); } }

@media (prefers-reduced-motion: reduce) {
  .sg-new { animation: none; }
  .sg-wait { animation-duration: 3s; }
}

@media (min-width: 769px) {
  body.sg-page { max-width: none; padding: 28px 24px 48px; }
  .sg-shell { width: min(560px, 100%); min-height: 0; margin: 0 auto; }
  .sg-top { margin-left: -12px; }
  .sg-card {
    flex: none; padding: 26px 32px 28px; border-radius: 22px;
    border: 1px solid var(--p-card-line); background: var(--p-card); box-shadow: var(--p-card-shadow);
  }
  .sg-spacer { flex: none; min-height: 8px; }
  .sg-h { font-size: 30px; }
}
.sg-range:focus-visible { outline: 2px solid var(--p-gold); outline-offset: 4px; border-radius: 8px; }
