.kg-check {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid #8aa0c2;
  background: #fff;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin: 0;
  vertical-align: middle;
  transition: background 0.15s, border-color 0.15s;
}

.kg-check:hover:not(:disabled) {
  border-color: #4fa8d9;
}

.kg-check:checked {
  background: linear-gradient(135deg, #4fa8d9, #1e5aa8);
  border-color: #163d75;
}

.kg-check:checked::after {
  content: "\2713";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -54%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.kg-check:disabled {
  opacity: 0.45;
  cursor: default;
}

.kg-check:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 168, 217, 0.35);
}

.register-body {
  background:
    radial-gradient(circle at 88% -10%, rgba(79, 168, 217, 0.22), transparent 38%),
    radial-gradient(circle at 8% 110%, rgba(22, 61, 117, 0.1), transparent 42%),
    var(--cream);
}

.reg-page {
  padding: 28px 0 80px;
}

.reg-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.reg-card {
  background: #fff;
  border: 1px solid var(--cream-line);
  border-radius: 28px;
  padding: 28px 32px 32px;
  box-shadow: 0 22px 50px rgba(22, 35, 59, 0.08);
}

.reg-head {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eef2f8;
}

.reg-head h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.2;
  color: var(--blue-dark);
}

.reg-kicker {
  margin: 0;
  color: var(--blue-light);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 13px;
}

.reg-lead {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.reg-chip {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  background: var(--blue-pale);
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  margin: 4px 0 0;
  white-space: nowrap;
}

.reg-photo,
.reg-photo-empty {
  width: 100%;
  border-radius: 18px;
  margin-top: 8px;
}

.reg-photo {
  height: 180px;
  object-fit: cover;
  display: block;
}

.reg-photo-empty {
  min-height: 88px;
  display: grid;
  place-items: center;
  background: #f6f9fd;
  border: 1px dashed #c5d4ea;
  color: var(--ink-soft);
  font-size: 13px;
}

.reg-form,
.reg-addons {
  display: grid;
  gap: 16px;
}

.reg-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.95fr);
  gap: 22px;
  align-items: start;
}

.welcome-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.welcome-tile {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  justify-items: center;
  align-content: stretch;
  gap: 14px;
  min-height: 360px;
  padding: 22px 18px 24px;
  border: 1px solid var(--cream-line);
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #f7fafd);
  text-align: center;
}

.welcome-tile .reg-section {
  margin: 0;
}

.welcome-qr {
  width: 184px;
  height: 184px;
  background: #fff;
  border: 1px solid var(--cream-line);
  border-radius: 16px;
  padding: 8px;
  display: grid;
  place-items: center;
}

.welcome-qr img,
.welcome-qr canvas,
.welcome-qr table {
  max-width: 100%;
  height: auto;
}

.welcome-caption {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  max-width: 26ch;
}

.welcome-phone {
  width: 118px;
  height: 184px;
  border: 3px solid var(--blue-dark);
  border-radius: 22px;
  padding: 10px 8px 12px;
  background: #0e2a52;
  position: relative;
  box-shadow: 0 16px 28px rgba(14, 42, 82, 0.18);
  animation: kg-float 3.2s ease-in-out infinite;
}

.welcome-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 42px;
  height: 6px;
  border-radius: 999px;
  background: #163d75;
  transform: translateX(-50%);
}

.welcome-screen {
  height: 100%;
  border-radius: 14px;
  background: linear-gradient(180deg, #eaf2fa, #fff);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.welcome-screen img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  margin-top: 16px;
}

.welcome-arrow {
  position: absolute;
  top: 28px;
  width: 2px;
  height: 36px;
  background: var(--blue);
  border-radius: 2px;
  animation: kg-drop 1.8s ease-in-out infinite;
}

.welcome-arrow::after {
  content: "";
  position: absolute;
  bottom: -2px;
  right: -5px;
  border: 6px solid transparent;
  border-top-color: var(--blue);
}

.welcome-apk {
  position: absolute;
  bottom: 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--blue-dark);
  background: #fff;
  border: 1px solid #d7e0ee;
  border-radius: 999px;
  padding: 3px 8px;
  animation: kg-apk 1.8s ease-in-out infinite;
}

.welcome-dl-btn {
  position: relative;
  overflow: hidden;
  min-width: 180px;
  min-height: 44px;
  animation: kg-pulse 2.6s ease-in-out infinite;
}

.welcome-scan {
  min-width: 180px;
  min-height: 44px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--blue-dark);
}

.welcome-dl-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: translateX(130%);
  animation: kg-sheen 2.8s ease-in-out infinite;
}

.welcome-next {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #eef2f8;
  display: flex;
  justify-content: center;
}

.pay-shell {
  width: min(520px, calc(100% - 32px));
  margin: 0 auto;
}

.pay-card .reg-head {
  text-align: center;
  justify-items: center;
}

.pay-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbf8f1, #f4eee3);
  border: 1px solid #eadfcb;
}

.pay-total span {
  font-weight: 700;
  color: var(--ink-soft);
}

.pay-total strong {
  font-size: 32px;
  font-weight: 800;
  color: var(--blue-dark);
}

.pay-form {
  display: grid;
  gap: 12px;
}

.pay-plastic {
  height: 92px;
  border-radius: 16px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #163d75, #4fa8d9);
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.pay-chip {
  width: 36px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f4c542, #e2b12a 40%, #f8e7a0);
  box-shadow: inset 0 0 0 1px rgba(22, 61, 117, 0.2);
  align-self: flex-start;
}

.pay-brand {
  font-weight: 800;
  letter-spacing: 0.04em;
}

.pay-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 12px;
}

.pay-go {
  width: 100%;
  margin-top: 6px;
  padding: 14px;
}

.mail-head {
  margin-bottom: 18px;
}

.app-main:has(.mail-studio) .wrap {
  width: min(1180px, calc(100% - 32px));
}

.mail-head h1 {
  margin: 0 0 6px;
}

.mail-studio {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.mail-nav {
  display: grid;
  gap: 8px;
}

.mail-nav-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--cream-line);
  background: #fff;
  color: inherit;
  font-weight: 600;
}

.mail-nav-item b,
.mail-nav-item small {
  display: block;
}

.mail-nav-item small {
  color: var(--ink-soft);
  font-weight: 500;
  margin-top: 2px;
}

.mail-nav-item.on {
  border-color: #4fa8d9;
  background: #f3f8fd;
  box-shadow: 0 8px 20px rgba(22, 61, 117, 0.08);
}

.mail-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue-light);
}

.mail-dot-signup { background: #1e5aa8; }
.mail-dot-payment { background: #f4c542; }
.mail-dot-reminder { background: #c44536; }

.mail-edit {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--cream-line);
  border-radius: 22px;
}

.mail-when {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.mail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mail-chip {
  border: 1px solid #d7e0ee;
  background: #f7fafd;
  color: var(--blue-dark);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.mail-chip:hover {
  border-color: #4fa8d9;
  background: #eaf2fa;
}

.mail-body {
  min-height: 240px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
}

.mail-preview {
  min-width: 0;
}

.mail-window {
  background: #fff;
  border: 1px solid var(--cream-line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(22, 35, 59, 0.08);
}

.mail-window-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--blue-deep);
  color: #fff;
}

.mail-window-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.mail-window-bar b {
  margin-inline-start: auto;
  font-size: 12px;
  font-weight: 600;
}

.mail-meta {
  margin: 0;
  padding: 12px 16px;
  display: grid;
  gap: 6px;
  border-bottom: 1px solid #eef2f8;
}

.mail-meta > div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  font-size: 13px;
}

.mail-meta dt {
  color: var(--ink-soft);
  font-weight: 600;
}

.mail-meta dd {
  margin: 0;
  font-weight: 700;
}

.mail-window h2 {
  margin: 0;
  padding: 14px 16px 0;
  font-size: 18px;
  color: var(--blue-dark);
}

.mail-window pre {
  margin: 10px 16px 18px;
  background: #faf7f0;
  border-radius: 14px;
  padding: 14px;
  min-height: 180px;
}
.mail-window .mail-frame-host {
  margin: 12px;
  flex: none;
}
.mail-compose {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
}
.mail-subject-label,
.mail-body-label {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}
.mail-subject {
  width: 100%;
  height: 42px;
  border: 1px solid var(--cream-line);
  border-radius: 12px;
  padding: 8px 12px;
  background: #fff;
  font: inherit;
}
.mail-subject:focus,
.mail-compose-body:focus {
  outline: none;
  border-color: #4fa8d9;
  box-shadow: 0 0 0 3px rgba(79, 168, 217, 0.18);
}
.mail-compose-body {
  flex: 1;
  min-height: 220px;
  border: 1px solid var(--cream-line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  line-height: 1.7;
  font-size: 15px;
  white-space: pre-wrap;
  overflow: auto;
}
.mail-compose-body:empty:before {
  content: attr(data-placeholder);
  color: #9aa8bc;
}
.mail-token {
  display: inline;
  unicode-bidi: isolate;
  margin: 0 1px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #dceaf8;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
  cursor: pointer;
  user-select: none;
}
.mail-token:hover {
  background: #fdecea;
  color: var(--danger);
}
.mail-letter {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  padding: 4px 2px 8px;
}
.mail-letter-meta {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}
.mail-letter-meta span { font-weight: 700; }
.register-mail-preview h2,
.mail-letter h2 {
  margin: 0;
  font-family: "Frank Ruhl Libre", "Heebo", serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.35;
}
.mail-letter-body {
  flex: 1;
  font-family: "Frank Ruhl Libre", "Heebo", serif;
  font-size: 18px;
  line-height: 1.75;
  white-space: pre-wrap;
  color: var(--ink);
}
.mail-frame-host {
  flex: 1;
  background: #f3eee6;
  border-radius: 16px;
  padding: 14px;
  min-height: 0;
  overflow: auto;
}
.mail-frame-host .mail-frame-card {
  font-family: Tahoma, Arial, Helvetica, sans-serif;
}
.mail-frame-host #mail-preview-subject {
  font-family: Tahoma, Arial, Helvetica, sans-serif;
  font-size: 22px;
}
.mail-frame-host #mail-preview-body {
  white-space: normal;
}
.register-mail .mail-chip {
  background: #e8f1fb;
  color: var(--blue-dark);
}

@keyframes kg-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes kg-drop {
  0% { transform: translateY(-8px); opacity: 0; }
  22% { opacity: 1; }
  70% { transform: translateY(22px); opacity: 1; }
  100% { transform: translateY(34px); opacity: 0; }
}

@keyframes kg-apk {
  0%, 100% { transform: scale(1); }
  55% { transform: scale(1.08); }
}

@keyframes kg-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79, 168, 217, 0.45); }
  55% { box-shadow: 0 0 0 10px rgba(79, 168, 217, 0); }
}

@keyframes kg-sheen {
  0%, 35% { transform: translateX(130%); }
  70%, 100% { transform: translateX(-130%); }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-phone,
  .welcome-arrow,
  .welcome-apk,
  .welcome-dl-btn,
  .welcome-dl-btn::after {
    animation: none;
  }
}

.reg-actions {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.btn.reg-submit {
  width: auto;
  min-width: 120px;
  padding: 10px 22px;
  font-size: 15px;
  margin: 0;
}

.reg-group {
  display: grid;
  gap: 10px;
  padding: 4px 0 8px;
}

.reg-group + .reg-group {
  border-top: 1px solid #eef2f8;
  padding-top: 14px;
}

.reg-group .reg-section {
  margin: 0;
}

.reg-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.reg-fields > * {
  min-width: 0;
}

.reg-fields.is-edit {
  grid-template-columns: 1fr;
}

.reg-label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  min-width: 0;
}

.reg-label.wide {
  grid-column: 1 / -1;
}

.reg-label > span {
  display: inline;
}

.reg-label i {
  color: var(--danger);
  font-style: normal;
  margin-inline-start: 3px;
}

.reg-input,
.reg-card select,
.reg-file {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #d7e0ee;
  border-radius: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  box-sizing: border-box;
}

input.reg-input {
  height: 48px;
}

.reg-file {
  padding: 10px;
  background: #fff;
}

.reg-input:focus,
.reg-card select:focus {
  outline: none;
  border-color: #4fa8d9;
  box-shadow: 0 0 0 3px rgba(79, 168, 217, 0.18);
  background: #fff;
}

.reg-section {
  margin: 16px 0 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: 0.04em;
}

.reg-hint {
  margin: -4px 0 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
}

.reg-kit {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--cream-line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fbf8f1, #f4eee3);
  margin: 0;
  min-width: 0;
}

.reg-kit-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.reg-kit-top b {
  display: block;
  margin: 2px 0 0;
}

.reg-kit-top p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.reg-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--blue-dark);
  white-space: nowrap;
}

.reg-kit-list,
.reg-kit-tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.reg-kit-list li,
.reg-kit-item {
  display: grid;
  gap: 8px;
  justify-items: stretch;
  background: #fff;
  border: 1px solid #eadfcb;
  border-radius: 16px;
  padding: 12px;
  min-width: 0;
}

.reg-kit-list b {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.reg-kit-list img,
.reg-kit-item img,
.reg-kit-ph {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  border-radius: 14px;
  background: #eaf2fa;
}

.reg-kit-ph {
  display: block;
  border: 1px dashed #c5d4ea;
}

.reg-kit-edit-meta {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 12px;
}

.kit-add {
  margin-top: 0;
}

.reg-choice {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #d7e0ee;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.reg-choice span {
  color: var(--ink-soft);
  font-weight: 500;
  min-width: 0;
}

.reg-choice b {
  display: block;
  color: var(--ink);
  margin-bottom: 2px;
}

.reg-choice em {
  font-style: normal;
  font-weight: 800;
  color: var(--blue-dark);
  white-space: nowrap;
}

.reg-choice:has(.kg-check:checked) {
  border-color: #4fa8d9;
  background: #f3f8fd;
}

.reg-field-edit,
.reg-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e3ecf6;
  border-radius: 14px;
  background: #f7fafd;
}

.reg-add {
  grid-template-columns: minmax(0, 1fr) 140px auto;
  background: #fff;
  border-style: dashed;
  margin-top: 4px;
}

.reg-type,
.reg-lock {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid #e3ecf6;
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.reg-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.btn.xl {
  width: 100%;
  padding: 16px;
  font-size: 17px;
  margin-top: 8px;
}

.text-btn {
  background: none;
  border: 0;
  color: var(--danger);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .reg-card { padding: 22px 18px 24px; }
  .reg-split,
  .reg-fields,
  .reg-field-edit,
  .reg-add,
  .reg-choice,
  .reg-kit-edit-meta { grid-template-columns: 1fr; }
  .reg-kit-list,
  .reg-kit-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome-pair,
  .mail-studio,
  .pay-row { grid-template-columns: 1fr; }
  .welcome-tile { min-height: 0; }
  .reg-chip { white-space: normal; }
}

.gmail-bind {
  gap: 8px;
}

.gmail-bind-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid #d7e0ee;
  background: #fff;
  color: #1b2a4a;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.gmail-bind-btn:hover {
  border-color: #4fa8d9;
}

.gmail-bind-ok {
  margin: 0;
  color: #1a7f4b;
  font-size: 13px;
  font-weight: 700;
}

.gmail-bind-err {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.gmail-bind-hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
}
