:root {
  --bg: #fff8fa;
  --text: #202022;
  --muted: #706c70;
  --line: #efcbd4;
  --primary: #ff335e;
  --primary-strong: #d9214e;
  --success: #1f8f53;
  --error: #c9163a;
  --warning: #a05a00;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI",
    "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg), #fff 100%);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

h1,
h2,
p {
  margin: 0;
}

.page-shell {
  width: min(480px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 18px 20px 60px;
}

.top-bar {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #353438;
  font-size: 14px;
  font-weight: 650;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: block;
  flex-shrink: 0;
  border-radius: 8px;
}

.hero {
  padding: 26px 0 22px;
}

h1 {
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: 0.02em;
  font-weight: 750;
}

.subtitle {
  margin-top: 8px;
  color: #706c70;
  font-size: 17px;
  line-height: 1.4;
}

.registration-step {
  position: relative;
  padding-bottom: 35px;
}

.registration-step::after {
  position: absolute;
  top: 45px;
  bottom: 9px;
  left: 17px;
  width: 1px;
  background: #c4bec2;
  content: "";
}

.step-heading {
  display: flex;
  align-items: center;
  gap: 18px;
}

.step-number {
  flex: 0 0 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #68666a;
  background: #edecef;
  font-size: 20px;
  font-weight: 700;
}

.step-number.active {
  color: #fff;
  background: var(--primary);
}

.step-heading h2 {
  min-width: 0;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
}

.registration-step p {
  margin: 5px 0 0 54px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.redeem-heading {
  margin-bottom: 18px;
}

.agent-form {
  display: grid;
  gap: 16px;
}

.field {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.field > span {
  font-size: 15px;
  line-height: 1.5;
  font-weight: 650;
}

.field small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

input {
  min-width: 0;
  width: 100%;
  min-height: 50px;
  padding: 12px 17px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  font-size: 17px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input::placeholder {
  color: var(--muted);
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 51, 94, 0.12);
}

.redeem-review {
  padding: 12px 18px;
  color: var(--muted);
  background: #fff3f6;
  border-radius: 9px;
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.review-title {
  margin-bottom: 5px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.redeem-review strong {
  color: var(--text);
  font-weight: 700;
}

.primary-action,
.secondary-action {
  width: 100%;
  min-height: 53px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 650;
}

.primary-action {
  color: #fff;
  background: #e32150;
  transition: background 160ms ease, transform 160ms ease;
}

.primary-action:hover {
  background: var(--primary-strong);
}

.primary-action:active {
  transform: translateY(1px);
}

.primary-action:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

button:focus-visible {
  outline: 3px solid var(--primary-strong);
  outline-offset: 3px;
}

.redeem-notes {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #eee8eb;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.status {
  margin-bottom: 20px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  background: #fff;
}

.status-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.status-line {
  margin-top: 3px;
  color: inherit;
  overflow-wrap: anywhere;
}

.status.success {
  color: var(--success);
  border-color: rgba(31, 143, 83, 0.24);
  background: #f0fff6;
}

.status.error {
  color: var(--error);
  border-color: rgba(201, 22, 58, 0.2);
  background: #fff0f3;
}

.status.warning {
  color: var(--warning);
  border-color: rgba(178, 80, 0, 0.22);
  background: #fff8ec;
}

.confirm-dialog {
  width: min(380px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
  border: 0;
  border-radius: 12px;
  color: var(--text);
  background: #fff;
  box-shadow: 0 24px 70px rgba(88, 15, 30, 0.24);
}

.confirm-dialog::backdrop {
  background: rgba(35, 18, 25, 0.3);
}

.dialog-kicker {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.confirm-dialog h2 {
  font-size: 24px;
}

.dialog-account {
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
  color: var(--muted);
  background: #fff3f6;
  font-size: 13px;
  line-height: 1.5;
}

.dialog-account strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 24px;
  overflow-wrap: anywhere;
}

.dialog-message {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.primary-action.compact,
.secondary-action {
  min-height: 44px;
  font-size: 15px;
}

.secondary-action {
  color: #bc2345;
  background: #fff1f4;
}

@media (prefers-reduced-motion: reduce) {
  input,
  .primary-action {
    transition: none;
  }
}
