:root {
  --ink: #282c3f;
  --muted: #94969f;
  --line: #e8e8ec;
  --pink: #ff3f6c;
  --paper: #fff;
  --bg: #f7eef3;
  --card: #fff;
  --warn: #ff8a00;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Assistant, Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
body {
  display: flex;
  justify-content: center;
}
.phone {
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
  background: #f5f5f6;
  position: relative;
  padding-bottom: 72px;
  box-shadow: 0 0 24px rgba(40, 44, 63, 0.08);
}
.topbar {
  height: 52px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.back {
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink);
}
.back svg {
  width: 22px;
  height: 22px;
}
.title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.15px;
}
.step {
  margin-left: auto;
  font-size: 10px;
  color: #7b7f8d;
  font-weight: 600;
}
.content {
  padding: 10px 12px 8px;
}
.summary {
  font-size: 11px;
  color: #696b79;
  margin: 0 4px 8px;
}
.summary strong {
  color: var(--ink);
}
.section {
  background: var(--card);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 9px;
}
.section h2 {
  font-size: 13px;
  margin: 0 0 9px;
  font-weight: 700;
}
.field {
  position: relative;
  margin-bottom: 9px;
}
.field:last-child {
  margin-bottom: 0;
}
.input {
  width: 100%;
  height: 42px;
  border: 1px solid #d4d5da;
  border-radius: 4px;
  background: #fff;
  padding: 0 11px;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: 0.18s;
}
textarea.input {
  height: 58px;
  padding-top: 10px;
  resize: none;
  line-height: 1.28;
}
.input:focus {
  border-color: #535766;
  box-shadow: 0 0 0 1px #535766;
}
.input.invalid {
  border-color: #e53935;
  background: #fffafa;
}
.input[readonly] {
  background: #f5f5f6;
  color: #555a68;
}
.hint {
  font-size: 10px;
  color: var(--warn);
  margin: 3px 0 0;
  line-height: 1.25;
}
.error {
  display: none;
  background: #fff1f2;
  color: #b4233b;
  border: 1px solid #ffd0d8;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.35;
  margin-bottom: 8px;
}
.error.show {
  display: block;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.radio-row {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 0 0 8px;
  border-bottom: 1px solid #ededf0;
}
.radio {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  cursor: pointer;
}
.radio input {
  display: none;
}
.dot {
  width: 18px;
  height: 18px;
  border: 2px solid #a9abb3;
  border-radius: 50%;
  position: relative;
}
.radio input:checked + .dot {
  border-color: var(--pink);
}
.radio input:checked + .dot:after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--pink);
  border-radius: 50%;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 9px;
  font-size: 12px;
  cursor: pointer;
}
.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--pink);
}
.pincode-status {
  font-size: 10px;
  margin-top: 3px;
  color: #6b7280;
  line-height: 1.2;
}
.pincode-status.good {
  color: #18864b;
}
.pincode-status.bad {
  color: #c93737;
}
.bottom {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 8px;
  z-index: 30;
}
.btn {
  height: 44px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.cancel {
  background: #fff;
  border: 1px solid #d5d6db;
  color: var(--ink);
}
.save {
  background: var(--pink);
  border: 1px solid var(--pink);
  color: #fff;
}
.save:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}
.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 8px;
  vertical-align: -3px;
}
.saving .spinner {
  display: inline-block;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 480px) and (max-height: 760px) {
  .topbar {
    height: 48px;
  }
  .content {
    padding-top: 8px;
  }
  .section {
    padding: 8px 9px;
    margin-bottom: 7px;
  }
  .section h2 {
    margin-bottom: 7px;
  }
  .field {
    margin-bottom: 7px;
  }
  .input {
    height: 40px;
  }
  textarea.input {
    height: 54px;
  }
  .hint {
    font-size: 9.5px;
  }
  .bottom {
    padding: 7px 10px;
  }
  .btn {
    height: 42px;
  }
}
@media (min-width: 700px) {
  body {
    padding: 28px 0;
  }
  .phone {
    min-height: calc(100vh - 56px);
    border-radius: 12px;
    overflow: hidden;
  }
  .bottom {
    bottom: 28px;
    border-radius: 0 0 12px 12px;
  }
}
