.two-step-page {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 28px 0 48px;
}

.two-step-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.back-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  text-decoration: none;
  font-size: 30px;
  line-height: 1;
  background: var(--card-background, rgba(255,255,255,.08));
  color: inherit;
}

.two-step-header h1 {
  margin: 0 0 5px;
  font-size: 28px;
}

.two-step-header p {
  margin: 0;
  opacity: .7;
}

.security-card {
  margin-bottom: 16px;
  padding: 20px;
  border-radius: 20px;
  background: var(--card-background, rgba(255,255,255,.06));
  border: 1px solid var(--border-color, rgba(255,255,255,.1));
}

.hero-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.security-icon {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(127,127,127,.12);
  font-size: 23px;
}

.security-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.security-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  opacity: .65;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}

.status-row p {
  margin-top: 3px;
}

.status-badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(127,127,127,.12);
  font-size: 12px;
  font-weight: 600;
}

.status-badge.active {
  background: rgba(80,180,100,.15);
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.primary-button {
  background: var(--accent-color, #4f8cff);
  color: white;
}

.secondary-button {
  margin-top: 14px;
  background: rgba(127,127,127,.12);
  color: inherit;
}

.card-description {
  margin-bottom: 0 !important;
}

.setup-dialog {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: manipulation;
}

.setup-dialog[hidden] {
  display: none !important;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(0,0,0,.72);
  pointer-events: none;
}

.dialog-card {
  position: relative;
  z-index: 2;
  width: min(100%, 430px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px;
  border-radius: 20px;
  background: var(--background-color, #111);
  border: 1px solid var(--border-color, rgba(255,255,255,.12));
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  pointer-events: auto;
  touch-action: manipulation;
}

.dialog-card h2 {
  margin: 0 0 10px;
}

.dialog-card p {
  margin-bottom: 18px;
}

.dialog-card label {
  display: block;
  margin: 14px 0 7px;
  font-weight: 600;
}

.dialog-card input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-color, rgba(255,255,255,.15));
  background: rgba(127,127,127,.08);
  color: inherit;
  font: inherit;
  font-size: 16px;
  outline: none;
  touch-action: manipulation;
}

.dialog-card button {
  position: relative;
  z-index: 3;
  pointer-events: auto;
  touch-action: manipulation;
}

.secret-row {
  display: flex;
  gap: 8px;
  margin: 8px 0 12px;
}

.secret-row input {
  flex: 1;
  min-width: 0;
  font-size: 13px;
}

.secret-row .secondary-button {
  width: auto;
  min-width: 105px;
  margin-top: 0;
}

#verificationCode {
  text-align: center;
  letter-spacing: .18em;
  font-weight: 700;
}

#recoveryCodes {
  margin-top: 10px;
  padding: 12px;
  overflow-x: auto;
  border-radius: 10px;
  background: rgba(127,127,127,.08);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 600px) {
  .setup-dialog {
    align-items: flex-end;
    padding: 8px;
  }

  .dialog-card {
    width: 100%;
    max-height: calc(100dvh - 16px);
    padding: 20px;
    border-radius: 20px;
  }

  .secret-row {
    flex-direction: column;
  }

  .secret-row .secondary-button {
    width: 100%;
  }

  .dialog-card .primary-button,
  .dialog-card .secondary-button {
    min-height: 52px;
  }
}
