:root {
  color-scheme: light;
  --bg: #f7f7f5;
  --text: #171717;
  --muted: #737373;
  --line: #deded8;
  --panel: #ffffff;
  --accent: #111111;
  --danger: #b42318;
}

/* v1.2.5 guided receiver flow */
.wizard-page {
  --wizard-bg: #f3f5ff;
  --wizard-panel: #ffffff;
  --wizard-text: #17223b;
  --wizard-muted: #71809f;
  --wizard-line: #e3e8f5;
  --wizard-primary: #5865f2;
  --wizard-primary-dark: #4350da;
  --wizard-primary-soft: #eef0ff;
  --wizard-success: #1c9b70;
  --wizard-warning: #c8791a;
  min-height: 100vh;
  background: var(--wizard-bg);
  color: var(--wizard-text);
  padding: 48px 20px 32px;
}

.wizard-page::before,
.wizard-page::after {
  position: fixed;
  z-index: -1;
  width: 30vw;
  height: 100vh;
  top: 0;
  content: "";
  opacity: 0.42;
}

.wizard-page::before {
  left: 0;
  background: #ece8ff;
}

.wizard-page::after {
  right: 0;
  background: #e5efff;
}

.wizard-page button,
.wizard-page input,
.wizard-page select {
  font: inherit;
}

.wizard-shell {
  width: min(880px, 100%);
  margin: 0 auto;
}

.wizard-card {
  border: 1px solid rgb(255 255 255 / 86%);
  border-radius: 30px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 28px 80px rgb(46 63 122 / 14%);
  overflow: hidden;
}

.wizard-header {
  padding: 36px 48px 22px;
  text-align: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border: 5px solid #e9eaff;
  border-radius: 18px;
  background: var(--wizard-primary);
  color: #fff;
  font-size: 24px;
  box-shadow: 0 10px 24px rgb(88 101 242 / 22%);
}

.brand-mark .fa-openai {
  font-family: "Font Awesome 7 Brands";
  font-weight: 400;
  font-size: 29px;
}

.brand-kicker {
  margin: 0 0 4px;
  color: var(--wizard-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.wizard-header h1 {
  margin: 0;
  color: var(--wizard-text);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  margin: 7px 0 0;
  color: var(--wizard-muted);
  font-size: 14px;
}

.wizard-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 17px 44px 24px;
  list-style: none;
}

.wizard-progress::before {
  position: absolute;
  top: 37px;
  left: 13%;
  right: 13%;
  height: 2px;
  background: var(--wizard-line);
  content: "";
}

.wizard-progress-item {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #9aa6bf;
  font-size: 12px;
}

.progress-dot {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--wizard-line);
  border-radius: 50%;
  background: #fff;
  color: #9aa6bf;
  font-size: 14px;
  font-weight: 800;
  transition: 180ms ease;
}

.progress-dot i,
.wizard-progress-item.completed .progress-dot span {
  display: none;
}

.wizard-progress-item.active,
.wizard-progress-item.completed {
  color: var(--wizard-primary);
}

.wizard-progress-item.active .progress-dot {
  border-color: #bec3ff;
  background: var(--wizard-primary);
  color: #fff;
  box-shadow: 0 0 0 7px var(--wizard-primary-soft);
}

.wizard-progress-item.completed .progress-dot {
  border-color: var(--wizard-primary);
  background: var(--wizard-primary-soft);
  color: var(--wizard-primary);
}

.wizard-progress-item.completed .progress-dot i {
  display: inline-block;
}

.wizard-stage {
  min-height: 392px;
  border-top: 1px solid #edf0f7;
  padding: 36px 48px 28px;
}

.wizard-step[hidden] {
  display: none;
}

.wizard-step.active {
  animation: wizardStepIn 220ms ease-out;
}

@keyframes wizardStepIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-heading {
  margin-bottom: 24px;
}

.step-heading h2,
.drawer-heading h2,
.guide-modal-panel h2,
.image-modal-panel h2 {
  margin: 5px 0 6px;
  color: var(--wizard-text);
  font-size: 24px;
  line-height: 1.25;
}

.step-heading p,
.image-modal-panel > p {
  margin: 0;
  color: var(--wizard-muted);
  font-size: 14px;
  line-height: 1.7;
}

.step-eyebrow {
  color: var(--wizard-primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.field-label {
  display: block;
  margin: 0 0 8px;
  color: #51607d;
  font-size: 13px;
  font-weight: 700;
}

.primary-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.wizard-page .access-key-input-wrap {
  position: relative;
}

.wizard-page .access-key-input-wrap input {
  min-height: 58px;
  border: 1.5px solid #dce2ef;
  border-radius: 14px;
  padding: 0 52px 0 46px;
  color: var(--wizard-text);
  font-size: 16px;
  letter-spacing: 0.04em;
  transition: 160ms ease;
}

.wizard-page .access-key-input-wrap input:focus {
  border-color: var(--wizard-primary);
  box-shadow: 0 0 0 4px var(--wizard-primary-soft);
}

.field-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 17px;
  color: #9aa6bf;
  transform: translateY(-50%);
}

.wizard-page .key-visibility-button {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #7f8ba5;
  padding: 0;
  transform: translateY(-50%);
}

.wizard-page .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  border: 1px solid var(--wizard-primary);
  border-radius: 14px;
  background: var(--wizard-primary);
  color: #fff;
  padding: 0 25px;
  font-weight: 750;
  box-shadow: 0 10px 22px rgb(88 101 242 / 20%);
  transition: 160ms ease;
}

.wizard-page .primary-button:hover:not(:disabled) {
  border-color: var(--wizard-primary-dark);
  background: var(--wizard-primary-dark);
  transform: translateY(-1px);
}

.wizard-page .primary-button:disabled {
  border-color: #cbd1e4;
  background: #cbd1e4;
  box-shadow: none;
}

.wide-button {
  width: 100%;
  margin-top: 18px;
}

.step-tip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  margin-top: 18px;
  border: 1px solid #dfe3ff;
  border-radius: 13px;
  background: #f8f8ff;
  color: var(--wizard-primary);
  padding: 14px 16px;
}

.step-tip > i {
  margin-top: 2px;
  font-size: 17px;
}

.step-tip div {
  display: grid;
  gap: 3px;
}

.step-tip strong {
  font-size: 13px;
}

.step-tip span {
  color: #68758f;
  font-size: 13px;
  line-height: 1.55;
}

.warning-tip {
  border-color: #f4dfc2;
  background: #fffaf3;
  color: var(--wizard-warning);
}

.success-tip {
  border-color: #cfeade;
  background: #f4fbf8;
  color: var(--wizard-success);
}

.country-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.country-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 86px;
  border: 1.5px solid #e1e5ef;
  border-radius: 15px;
  background: #fff;
  padding: 15px;
  cursor: pointer;
  transition: 160ms ease;
}

.country-card:hover,
.country-card.selected {
  border-color: var(--wizard-primary);
  background: #fafaff;
  box-shadow: 0 0 0 3px var(--wizard-primary-soft);
}

.country-card input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  opacity: 0;
}

.country-flag {
  display: grid;
  place-items: center;
  width: 46px;
  height: 38px;
  border-radius: 9px;
  background: #eef1f8;
  color: #485673;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.country-card > span:nth-of-type(2) {
  display: grid;
  gap: 4px;
}

.country-card strong {
  color: var(--wizard-text);
  font-size: 16px;
}

.country-card small {
  color: var(--wizard-muted);
  font-size: 12px;
}

.country-card > i {
  color: #a7b0c5;
  font-size: 18px;
}

.country-card.selected > i {
  color: var(--wizard-primary);
}

.number-card,
.code-card {
  border: 1px solid #dfe3ff;
  border-radius: 17px;
  background: #f8f8ff;
  padding: 20px;
}

.result-label {
  display: block;
  margin-bottom: 8px;
  color: var(--wizard-muted);
  font-size: 12px;
  font-weight: 700;
}

.result-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.result-value-row strong {
  color: var(--wizard-text);
  font-size: clamp(26px, 5vw, 38px);
  letter-spacing: 0.045em;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  border: 1px solid #d9def0;
  border-radius: 10px;
  background: #fff;
  color: var(--wizard-primary);
  padding: 0 13px;
  font-size: 13px;
  font-weight: 750;
}

.mini-steps {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.mini-steps li {
  display: flex;
  align-items: center;
  gap: 11px;
}

.mini-steps li > span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--wizard-primary-soft);
  color: var(--wizard-primary);
  font-size: 12px;
  font-weight: 800;
}

.mini-steps p {
  margin: 0;
  color: #576683;
  font-size: 13px;
  line-height: 1.5;
}

.waiting-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--wizard-muted);
  font-size: 12px;
}

.wizard-page .retry-number-button {
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  margin-top: 14px;
  border: 2px solid #d9def0;
  border-radius: 14px;
  color: var(--wizard-primary);
  font-size: 15px;
  font-weight: 900;
}

.wizard-page .retry-number-button:not([hidden]) {
  display: flex;
}

.wizard-page .retry-number-button.is-countdown {
  border-color: #c9d2ee;
  background: #eef2fb;
  color: #66738f;
  cursor: not-allowed;
}

.wizard-page .retry-number-button.is-ready {
  border-color: #ff8b38;
  background: linear-gradient(135deg, #ffefe4, #fff8f2);
  color: #c04e0f;
  box-shadow: 0 10px 24px rgb(220 93 17 / 18%);
  animation: retryButtonPulse 1.1s ease-in-out infinite;
}

@keyframes retryButtonPulse {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wizard-success);
  box-shadow: 0 0 0 4px rgb(28 155 112 / 12%);
}

.wizard-page .retry-hint {
  margin: 10px 0 0;
  color: #b45e11;
  text-align: center;
}

.success-badge {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border: 7px solid #ddf4eb;
  border-radius: 50%;
  background: var(--wizard-success);
  color: #fff;
  font-size: 20px;
}

.centered-heading {
  text-align: center;
}

.code-card {
  display: grid;
  justify-items: center;
  padding: 22px;
}

.code-card[hidden],
#revealCodeButton[hidden] {
  display: none !important;
}

.code-card strong {
  margin: 2px 0 14px;
  color: var(--wizard-primary);
  font-size: clamp(44px, 9vw, 64px);
  letter-spacing: 0.15em;
  line-height: 1;
}

.wizard-page .status {
  min-height: 20px;
  margin: 16px 0 0;
  color: #75829b;
  font-size: 12px;
  text-align: center;
}

.wizard-page .status.error {
  color: #bc3f38;
}

.wizard-page .status.success {
  color: var(--wizard-success);
}

.wizard-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #edf0f7;
  padding: 15px 28px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #697791;
  padding: 0 10px;
  font-size: 12px;
}

.footer-link:hover {
  background: #f3f5fb;
  color: var(--wizard-primary);
}

.version-label {
  margin-left: auto;
  color: #a0a9bb;
  font-size: 11px;
}

.security-note {
  margin: 15px 0 0;
  color: #7d89a3;
  font-size: 12px;
  text-align: center;
}

.security-note i {
  margin-right: 7px;
  color: var(--wizard-success);
}

.wizard-refund {
  width: min(720px, calc(100% - 24px));
  margin: 18px auto 0;
  border: 1px solid #e4e8f3;
  border-radius: 20px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 18px 50px rgb(46 63 122 / 12%);
}

.drawer-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.drawer-heading h2 {
  font-size: 21px;
}

.icon-close {
  display: grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: #f3f5f9;
  color: #68758e;
  padding: 0;
}

.wizard-page .refund-note {
  color: var(--wizard-muted);
  font-size: 13px;
  line-height: 1.65;
}

.wizard-page .refund-panel > input {
  min-height: 50px;
  border-color: #dce2ef;
  border-radius: 12px;
}

.wizard-page .refund-actions {
  grid-template-columns: 1fr 1.4fr;
}

.wizard-page .refund-actions button {
  border-radius: 12px;
}

.wizard-page .message-modal-panel,
.wizard-page .image-modal-panel,
.wizard-page .country-confirm-panel {
  border: 1px solid #e4e8f3;
  border-radius: 22px;
  box-shadow: 0 28px 80px rgb(22 34 62 / 24%);
}

.guide-modal-panel {
  width: min(92vw, 540px);
}

.guide-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding-left: 22px;
  color: #52617e;
  font-size: 14px;
  line-height: 1.6;
}

.guide-step-with-link {
  display: grid;
  gap: 3px;
}

.tutorial-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  color: var(--wizard-primary);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guide-contact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.wizard-page .guide-contact-qr {
  width: 78px;
  min-height: 0;
  border: 1px solid #cfd8f5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgb(47 76 176 / 13%);
  padding: 5px 5px 4px;
  color: var(--wizard-primary);
  cursor: pointer;
}

.wizard-page .guide-contact-qr img {
  display: block;
  width: 66px;
  height: 66px;
  border-radius: 8px;
  object-fit: cover;
  object-position: 50% 37%;
}

.wizard-page .guide-contact-qr small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
}

.guide-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--wizard-primary);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.wizard-page .image-modal-panel > img {
  margin: 18px auto 12px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

@media (max-width: 720px) {
  .wizard-page {
    padding: 18px 12px 24px;
  }

  .wizard-card {
    border-radius: 22px;
  }

  .wizard-header {
    padding: 26px 20px 16px;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
    margin-bottom: 11px;
    border-radius: 16px;
  }

  .wizard-header h1 {
    font-size: 24px;
  }

  .wizard-progress {
    padding: 14px 10px 20px;
  }

  .wizard-progress::before {
    top: 33px;
    left: 12%;
    right: 12%;
  }

  .progress-dot {
    width: 38px;
    height: 38px;
  }

  .wizard-progress-item {
    font-size: 10px;
  }

  .wizard-stage {
    min-height: 430px;
    padding: 28px 18px 22px;
  }

  .step-heading h2 {
    font-size: 21px;
  }

  .primary-input-row,
  .country-grid {
    grid-template-columns: 1fr;
  }

  .wizard-page .primary-button,
  .wizard-page .access-key-input-wrap input {
    min-height: 54px;
  }

  .country-card {
    min-height: 74px;
  }

  .result-value-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-value-row strong {
    font-size: 29px;
  }

  .wizard-footer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    padding: 12px 8px;
  }

  .footer-link {
    justify-content: center;
    padding: 0 4px;
    font-size: 10px;
    white-space: nowrap;
  }

  .version-label {
    grid-column: 1 / -1;
    margin: 2px 0 0;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .wizard-progress-item strong {
    max-width: 58px;
    line-height: 1.3;
    text-align: center;
  }

  .wizard-page .refund-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wizard-step.active {
    animation: none;
  }
}

.country-confirm-modal[hidden] {
  display: none;
}

.country-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}

.country-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 52%);
  backdrop-filter: blur(4px);
}

.country-confirm-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 500px);
  border-radius: 16px;
  background: var(--panel);
  padding: 26px;
  box-shadow: 0 24px 70px rgb(0 0 0 / 25%);
}

.country-modal-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff1d6;
  color: #c95f00;
  font-size: 22px;
  font-weight: 900;
}

.country-confirm-panel h2 {
  margin: 16px 0 10px;
  font-size: 23px;
}

.country-confirm-panel p {
  margin: 0;
  color: #315071;
  font-size: 16px;
  line-height: 1.75;
}

.country-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

.country-confirm-actions button {
  min-height: 50px;
}

@media (max-width: 520px) {
  .country-confirm-panel {
    padding: 22px 18px;
  }

  .country-confirm-actions {
    grid-template-columns: 1fr;
  }
}

/* Guided-flow refinements */
.key-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin-top: 10px;
  border: 1px solid #dce2ef;
  border-radius: 11px;
  background: #f8f9fc;
  color: #63708a;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.key-feedback[hidden] {
  display: none;
}

.key-feedback.loading {
  border-color: #dfe3ff;
  background: #f8f8ff;
  color: var(--wizard-primary);
}

.key-feedback.success {
  border-color: #c9eadb;
  background: #f2fbf7;
  color: var(--wizard-success);
}

.key-feedback.error {
  border-color: #f1cbc7;
  background: #fff6f5;
  color: #bd3f37;
}

.region-select-field {
  display: grid;
  gap: 8px;
}

.region-select-wrap {
  position: relative;
}

.region-select-wrap > i {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 17px;
  color: var(--wizard-primary);
  font-size: 17px;
  transform: translateY(-50%);
  pointer-events: none;
}

.wizard-page .region-select-wrap select {
  width: 100%;
  min-height: 58px;
  border: 1.5px solid #dce2ef;
  border-radius: 14px;
  background-color: #fff;
  color: var(--wizard-text);
  padding: 0 46px;
  font-size: 16px;
  font-weight: 750;
  cursor: pointer;
  transition: 160ms ease;
}

.wizard-page .region-select-wrap select:focus {
  border-color: var(--wizard-primary);
  box-shadow: 0 0 0 4px var(--wizard-primary-soft);
}

.region-select-field > p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--wizard-muted);
  font-size: 12px;
}

.region-select-field > p i {
  color: var(--wizard-success);
}

.wizard-stage {
  position: relative;
}

.completion-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  min-height: 100%;
  background: rgb(246 248 255 / 82%);
  padding: 28px 48px;
  backdrop-filter: blur(4px);
}

.completion-overlay[hidden] {
  display: none;
}

.completion-dialog {
  position: relative;
  width: min(520px, 100%);
  border: 1px solid #dfe4f1;
  border-radius: 22px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 24px 60px rgb(43 58 112 / 22%);
}

.completion-dialog .step-heading {
  margin-bottom: 18px;
}

.completion-dialog .success-tip {
  margin-bottom: 0;
}

.completion-dialog .code-card {
  padding: 14px;
}

.completion-dialog .code-card strong {
  font-size: clamp(28px, 6vw, 42px);
}

.sms-announcement-box {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  border: 1px solid #d9e2ff;
  border-radius: 14px;
  background: #f6f8ff;
  padding: 13px 14px;
}

.sms-announcement-box[hidden] {
  display: none;
}

.sms-announcement-box h3 {
  margin: 0;
  color: #1f2d50;
  font-size: 17px;
}

.sms-announcement-box p {
  margin: 0;
  color: #53627f;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.sms-announcement-image {
  width: auto;
  max-width: 100%;
  max-height: 240px;
  margin-inline: auto;
  border: 1px solid #e2e7f4;
  border-radius: 12px;
  background: #fff;
  object-fit: contain;
}

.sms-announcement-image[hidden] {
  display: none;
}

.completion-close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: #f0f2f8;
  color: #5f6d87;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 750;
}

.completion-close-button:hover {
  background: #e7eaf3;
  color: var(--wizard-text);
}

.completion-close-button:focus-visible {
  outline: 3px solid var(--wizard-primary-soft);
  outline-offset: 2px;
}

.waiting-line[hidden] {
  display: none;
}

.sms-received-notice {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 14px;
  border: 1px solid #a9dfca;
  border-radius: 14px;
  background: #effaf5;
  color: #187b5c;
  padding: 12px 14px;
  text-align: left;
  box-shadow: 0 8px 20px rgb(28 155 112 / 10%);
}

.sms-received-notice[hidden] {
  display: none;
}

.sms-received-notice:hover {
  border-color: #79c9ad;
  background: #e8f8f1;
  transform: translateY(-1px);
}

.sms-received-notice:focus-visible {
  outline: 3px solid rgb(28 155 112 / 18%);
  outline-offset: 2px;
}

.sms-received-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--wizard-success);
  color: #fff;
}

.sms-received-copy {
  display: grid;
  flex: 1;
  gap: 2px;
}

.sms-received-copy strong {
  font-size: 14px;
}

.sms-received-copy small {
  color: #5a8d7a;
  font-size: 11px;
  font-weight: 650;
}

.sms-received-notice > i:last-child {
  color: #3ba481;
}

@media (max-width: 720px) {
  .completion-overlay {
    padding: 18px;
  }

  .completion-dialog {
    border-radius: 18px;
    padding: 20px 16px;
  }

  .completion-close-button {
    top: 12px;
    right: 12px;
  }

  .wizard-page .region-select-wrap select {
    min-height: 54px;
  }
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: min(760px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.auth-shell {
  width: min(520px, calc(100vw - 32px));
}

.admin-shell {
  width: min(1180px, calc(100vw - 32px));
}

.top {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.page-links a {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--accent);
  padding: 0 12px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.notice-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 10px;
}

.notice-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255 255 255 / 42%);
  padding: 16px 18px;
  margin-bottom: 22px;
}

.notice-panel h2,
.refund-panel h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.25;
}

.notice-title-note {
  display: inline-block;
  margin-left: 8px;
  border-radius: 6px;
  background: #fff176;
  color: #d92d20;
  padding: 3px 7px;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.45;
}

.notice-must-condition {
  display: inline-block;
  margin: 6px 0 12px;
  border-radius: 8px;
  background: #fff176;
  color: #d92d20;
  padding: 8px 10px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.55;
}

.notice-must-condition a {
  color: #0057d9;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notice-list {
  margin: 0;
  padding-left: 22px;
  color: #102a4c;
  line-height: 1.9;
}

.notice-list strong {
  font-weight: 750;
}

.notice-list .notice-warning {
  font-weight: 750;
}

.notice-inline-alert {
  display: inline;
  border-radius: 6px;
  background: #fff176;
  color: #d92d20;
  padding: 2px 6px;
  font-weight: 750;
}

.inline-link {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #00796b;
  padding: 0;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notice-contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}

.notice-text {
  display: inline-block;
  border-radius: 8px;
  background: #fff176;
  color: #d92d20;
  padding: 6px 10px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.5;
  animation: noticeColorPulse 1.15s ease-in-out infinite;
}

.notice-contact-link {
  color: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@keyframes noticeColorPulse {
  0%,
  100% {
    background: #fff176;
    color: #d92d20;
    box-shadow: 0 0 0 rgb(217 45 32 / 0%);
  }

  50% {
    background: #ffe066;
    color: #0057d9;
    box-shadow: 0 0 14px rgb(255 193 7 / 45%);
  }
}

.contact-thumb {
  width: 58px;
  min-width: 58px;
  height: 58px;
  min-height: 58px;
  padding: 0;
  border-color: var(--line);
  background: var(--panel);
  overflow: hidden;
}

.contact-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notice-token-gift {
  margin: 12px 0 0;
  border-radius: 8px;
  background: #fff176;
  color: #d92d20;
  padding: 10px 12px;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.55;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 700;
  letter-spacing: 0;
}

.access-key-field {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
}

.access-key-field label {
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
}

.access-key-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.access-key-input-wrap {
  position: relative;
  min-width: 0;
}

.access-key-row input {
  min-height: 60px;
  padding: 0 58px 0 16px;
  font-size: 22px;
  font-weight: 650;
}

.access-key-row > button {
  min-width: 108px;
  min-height: 60px;
  font-size: 20px;
  font-weight: 750;
}

.key-visibility-button {
  position: absolute;
  right: 8px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #555;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  transform: translateY(-50%);
}

.key-visibility-button:hover,
.key-visibility-button.active {
  background: rgb(0 0 0 / 6%);
  color: var(--text);
}

.muted,
.status {
  color: var(--muted);
}

.panel,
.result {
  border-top: 1px solid var(--line);
  padding: 24px 0;
}

.row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.align-end {
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto;
}

.grow {
  min-width: 0;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 0 12px;
  outline: none;
  font-size: 16px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
}

textarea {
  min-height: 118px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
}

select:disabled {
  color: var(--text);
  opacity: 1;
}

button {
  min-height: 48px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: white;
  padding: 0 18px;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.secondary,
.ghost {
  background: transparent;
  color: var(--accent);
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.step-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.step-item {
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: #0f2f55;
  font-weight: 750;
}

.step-item.active {
  border-color: #19836a;
  background: #19836a;
  color: white;
}

.step-item.danger {
  border-color: #f5b5ae;
  background: #fff4f2;
  color: #d92d20;
}

.retry-hint {
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

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

.admin-actions {
  grid-template-columns: repeat(3, auto);
  justify-content: start;
}

.key-editor {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 20px;
}

.editor-hint {
  margin: 0;
}

.admin-settings-row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) auto minmax(260px, 1fr);
  align-items: end;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 20px;
}

.admin-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  margin-top: 18px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.summary-grid div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.summary-grid strong {
  font-size: 28px;
}

.admin-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}

.admin-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 13px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.admin-table th {
  color: var(--muted);
  font-weight: 500;
}

.api-shell {
  width: min(1180px, calc(100vw - 32px));
}

.api-intro {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.api-actions {
  grid-template-columns: repeat(2, auto);
  justify-content: start;
  margin-top: 0;
}

.api-note {
  margin: 14px 0 0;
  color: #102a4c;
  line-height: 1.65;
}

.api-category {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.api-category h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.api-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.api-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
}

.api-card-header {
  display: grid;
  gap: 8px;
}

.api-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.api-card h3 {
  margin: 0;
  font-size: 18px;
}

.api-endpoint {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.api-description {
  margin: 0;
  color: #315071;
  line-height: 1.55;
}

.danger-badge {
  border-radius: 999px;
  background: #fff4f2;
  color: var(--danger);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.api-form {
  display: grid;
  gap: 12px;
}

.api-param-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.api-form textarea {
  min-height: 92px;
}

.api-card button {
  justify-self: start;
}

.api-result {
  display: block;
  min-height: 86px;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111111;
  color: #f8f8f2;
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.table-checkbox {
  width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
}

.danger-button {
  border-color: #f1b4ad;
  background: transparent;
  color: var(--danger);
}

.danger-text {
  color: var(--danger);
}

.refund-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255 255 255 / 46%);
  padding: 16px 18px;
  margin-top: 18px;
}

.refund-panel[hidden] {
  display: none;
}

.refund-note {
  margin: 0 0 16px;
  color: #102a4c;
  line-height: 1.6;
}

.refund-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.refund-message {
  min-height: 24px;
  margin: 12px 0 0;
  border: 1px solid #f5c45f;
  border-radius: 8px;
  background: #fff7e6;
  color: #7a4b00;
  padding: 10px 12px;
}

.refund-message.error {
  border-color: #f1b4ad;
  background: #fff4f2;
  color: var(--danger);
}

.refund-result-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.refund-result-grid[hidden] {
  display: none;
}

.refund-result-grid div {
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
}

.refund-result-grid span {
  display: block;
  color: #315071;
  font-size: 13px;
  margin-bottom: 20px;
}

.refund-result-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 24px;
  line-height: 1.12;
}

.result {
  display: grid;
  gap: 22px;
}

.label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
}

.copy-line,
.code-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.copy-line strong,
.code-line strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 28px;
  font-weight: 650;
}

.code-line strong {
  font-size: 44px;
  letter-spacing: 0.06em;
}

.text-button {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
}

.status {
  min-height: 24px;
  margin: 0;
}

.status.error {
  color: var(--danger);
}

.image-modal[hidden] {
  display: none;
}

.message-modal[hidden] {
  display: none;
}

.message-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}

.message-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 48%);
}

.message-modal-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 480px);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
  box-shadow: 0 18px 50px rgb(0 0 0 / 18%);
}

.message-modal-panel h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.message-modal-panel p {
  margin: 0;
  color: #102a4c;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.7;
  white-space: pre-line;
}

.message-modal-panel p.message-modal-danger {
  color: #d92d20;
  font-weight: 850;
}

.message-modal-image {
  display: block;
  width: 100%;
  margin-top: 14px;
  border-radius: 8px;
  background: #1f2028;
}

.message-modal-image[hidden] {
  display: none;
}

.message-modal-action {
  width: 100%;
  margin-top: 18px;
}

.message-modal-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 999px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.announcement-modal {
  z-index: 90;
}

.announcement-modal .message-modal-backdrop {
  background:
    radial-gradient(circle at 50% 12%, rgb(90 111 255 / 22%), transparent 44%),
    rgb(14 23 45 / 68%);
  backdrop-filter: blur(4px);
}

.wizard-page .announcement-modal-panel {
  width: min(92vw, 560px);
  max-height: min(88vh, 760px);
  overflow: auto;
  border: 1px solid rgb(255 255 255 / 75%);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
  padding: 28px;
  box-shadow: 0 30px 90px rgb(16 29 63 / 32%);
  animation: announcement-enter 220ms ease-out both;
}

.wizard-page .announcement-modal-panel .message-modal-close {
  top: 16px;
  right: 16px;
  border: 0;
  background: #eef1f8;
  color: #5d6982;
}

.announcement-modal-panel .step-eyebrow {
  margin-bottom: 7px;
}

.announcement-modal-panel h2 {
  margin: 0 46px 18px 0;
  color: var(--wizard-text, #17223b);
  font-size: clamp(22px, 4vw, 28px);
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.announcement-modal-image {
  display: block;
  width: 100%;
  max-height: min(44vh, 390px);
  margin: 0 0 18px;
  border: 1px solid #e3e7f1;
  border-radius: 16px;
  background: #f4f6fb;
  object-fit: contain;
}

.announcement-modal-image[hidden] {
  display: none;
}

.announcement-modal-panel p.announcement-modal-text {
  color: #465572;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.8;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.announcement-modal-panel .message-modal-action {
  min-height: 50px;
  border-radius: 13px;
  font-weight: 800;
}

@keyframes announcement-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wizard-page .announcement-modal-panel {
    animation: none;
  }
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 58%);
}

.image-modal-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(92vw, 420px);
  max-height: 90vh;
}

.contact-modal-message {
  margin: 0;
  border-radius: 8px;
  background: #fff176;
  color: #d92d20;
  padding: 12px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.6;
}

.image-modal-panel img {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 10px;
  background: white;
}

.image-modal-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 999px;
}

.image-modal-download {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  text-decoration: none;
}

.modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .shell {
    width: min(100vw - 24px, 760px);
    padding: 26px 0 calc(28px + env(safe-area-inset-bottom));
  }

  .auth-shell {
    width: min(100vw - 24px, 520px);
  }

  .admin-shell {
    width: min(100vw - 24px, 1180px);
  }

  .top {
    margin-bottom: 22px;
  }

  h1 {
    font-size: 40px;
    line-height: 1.05;
  }

  .notice-row,
  .notice-contact-row {
    align-items: flex-start;
  }

  .notice-text {
    flex: 1 1 220px;
    font-size: 18px;
  }

  .contact-thumb {
    width: 64px;
    min-width: 64px;
    height: 64px;
    min-height: 64px;
  }

  .row,
  .align-end,
  .access-key-row {
    grid-template-columns: 1fr;
  }

  .notice-panel,
  .refund-panel {
    padding: 14px;
  }

  .notice-list {
    padding-left: 20px;
    line-height: 1.75;
  }

  .panel,
  .result {
    padding: 20px 0;
  }

  .actions,
  .step-flow,
  .refund-actions,
  .refund-result-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .admin-actions,
  .admin-settings-row,
  .admin-filter-row,
  .api-intro,
  .api-actions,
  .api-grid,
  .api-param-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .actions button,
  input,
  select,
  textarea {
    width: 100%;
    min-height: 52px;
  }

  .table-checkbox {
    width: 16px;
    min-height: 16px;
  }

  .copy-line,
  .code-line {
    align-items: flex-start;
  }

  .copy-line strong {
    font-size: 24px;
  }

  .code-line strong {
    font-size: 36px;
    line-height: 1.15;
  }
}

/* Contact modal annotation fix */
.wizard-page .image-modal-panel {
  width: min(92vw, 440px);
  max-height: calc(100vh - 32px);
  gap: 6px;
  overflow-y: auto;
  border-radius: 22px;
  background: #fff;
  padding: 26px;
}

.wizard-page .image-modal-panel h2 {
  margin: 0 42px 2px 0;
  font-size: 21px;
}

.wizard-page .image-modal-panel > p {
  margin: 0 42px 10px 0;
}

.wizard-page .image-modal-panel > img {
  width: 100%;
  max-height: min(56vh, 470px);
  margin: 8px auto 10px;
  border: 1px solid #edf0f6;
  object-fit: contain;
}

.wizard-page .image-modal-close {
  top: 16px;
  right: 16px;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  border: 0;
  background: #f1f3f8;
  color: #53617c;
}

.wizard-page .image-modal-download {
  border-radius: 12px;
  background: var(--wizard-primary);
  font-size: 14px;
  font-weight: 750;
}

@media (max-width: 520px) {
  .wizard-page .image-modal-panel {
    width: min(94vw, 420px);
    padding: 22px 18px 18px;
  }

  .wizard-page .image-modal-panel h2,
  .wizard-page .image-modal-panel > p {
    margin-right: 38px;
  }
}

/* Verification checkpoint */
.preverify-modal {
  z-index: 80;
}

.wizard-page .preverify-modal-panel {
  width: min(92vw, 700px);
  max-height: calc(100vh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 24px;
}

.wizard-page .preverify-modal-panel .message-modal-close {
  top: 16px;
  right: 16px;
  border: 0;
  background: #f1f3f8;
  color: #53617c;
}

.wizard-page .preverify-modal-panel h2 {
  margin: 6px 40px 6px 0;
  color: var(--wizard-text);
  font-size: clamp(21px, 3vw, 27px);
  line-height: 1.3;
}

.wizard-page .preverify-modal-panel .preverify-lead {
  margin: 0;
  color: var(--wizard-muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.6;
}

.preverify-figure {
  display: grid;
  gap: 9px;
  margin: 16px 0 14px;
}

.preverify-figure img {
  display: block;
  width: min(100%, 480px);
  max-height: 48vh;
  margin: 0 auto;
  border: 1px solid #e3e7f1;
  border-radius: 16px;
  background: #fff;
  object-fit: contain;
}

.preverify-figure figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #52617e;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.preverify-figure figcaption i {
  color: var(--wizard-success);
}

.wizard-page .preverify-modal-panel .preverify-tutorial {
  margin: 0;
  color: #52617e;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.6;
  text-align: center;
}

.preverify-tutorial a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--wizard-primary);
  font-weight: 800;
  text-underline-offset: 3px;
}

.wizard-page .preverify-modal-panel .preverify-countdown {
  margin: 12px 0 0;
  border-radius: 10px;
  background: #f4f5ff;
  color: var(--wizard-primary);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
  text-align: center;
}

.wizard-page .preverify-modal-panel .preverify-countdown.ready {
  background: #eef9f4;
  color: var(--wizard-success);
}

.preverify-confirm-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  border-radius: 12px;
  background: var(--wizard-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.preverify-confirm-button:disabled {
  background: #dfe3ef;
  color: #8b96ad;
  cursor: not-allowed;
}

.region-select-field > p.warning i {
  color: var(--wizard-warning);
}

.number-format-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid #f2d5ab;
  border-radius: 13px;
  background: #fff9ef;
  color: #815114;
  padding: 12px 14px;
}

.number-format-tip > i {
  margin-top: 2px;
  color: var(--wizard-warning);
  font-size: 16px;
}

.number-format-tip div {
  display: grid;
  gap: 3px;
}

.number-format-tip strong {
  color: #77490f;
  font-size: 13px;
}

.number-format-tip span {
  color: #9a6b2e;
  font-size: 12px;
  line-height: 1.55;
}

.number-format-tip b {
  color: #bd6410;
  font-size: 13px;
}

.resume-notice,
.sms-expired-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  border: 1px solid #cfd8ff;
  border-radius: 13px;
  background: #f3f6ff;
  color: #304f9a;
  padding: 12px 14px;
}

.current-region-notice {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  border: 2px solid #9eb0ff;
  border-radius: 14px;
  background: linear-gradient(135deg, #eef1ff, #f7f8ff);
  color: #334bb4;
  padding: 12px 14px;
  box-shadow: 0 8px 20px rgb(72 91 190 / 10%);
}

.current-region-notice > i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #5865f2;
  color: #fff;
}

.current-region-notice div {
  display: grid;
  gap: 1px;
}

.current-region-notice span {
  color: #6776aa;
  font-size: 11px;
  font-weight: 750;
}

.current-region-notice strong {
  color: #344bd0;
  font-size: 20px;
  line-height: 1.1;
}

.current-region-notice small {
  justify-self: end;
  color: #6372a4;
  font-size: 12px;
  font-weight: 700;
}

.current-region-notice[data-country="美国"] {
  border-color: #f0b468;
  background: linear-gradient(135deg, #fff5e7, #fffaf4);
  color: #a45b0e;
}

.current-region-notice[data-country="美国"] > i {
  background: #d77b1e;
}

.current-region-notice[data-country="美国"] strong {
  color: #b65d09;
}

.retry-country-switch-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  border: 2px solid #ef8d2f;
  border-radius: 13px;
  background: #fff2df;
  color: #8a4608;
  padding: 12px 14px;
  box-shadow: 0 8px 22px rgb(214 113 20 / 14%);
}

.retry-country-switch-notice[hidden] {
  display: none;
}

.retry-country-switch-notice > i {
  margin-top: 3px;
  color: #d5680c;
  font-size: 17px;
}

.retry-country-switch-notice div {
  display: grid;
  gap: 3px;
}

.retry-country-switch-notice strong {
  color: #aa4e06;
  font-size: 13px;
}

.retry-country-switch-notice span {
  color: #9a5b22;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.resume-notice[hidden],
.sms-expired-notice[hidden] {
  display: none;
}

.resume-notice > i,
.sms-expired-notice > i {
  margin-top: 2px;
}

.resume-notice div,
.sms-expired-notice div {
  display: grid;
  gap: 3px;
}

.resume-notice strong,
.sms-expired-notice strong {
  font-size: 13px;
}

.resume-notice span,
.sms-expired-notice span {
  font-size: 12px;
  line-height: 1.55;
}

.sms-expired-notice {
  margin-top: 14px;
  margin-bottom: 0;
  border-color: #f1b7b7;
  background: #fff3f3;
  color: #a32525;
}

.single-use-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  border: 2px solid #e12727;
  border-radius: 13px;
  background: #fff0f0;
  color: #c51616;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.65;
  animation: singleUseWarningPulse 1.05s ease-in-out infinite;
}

.single-use-warning[hidden] {
  display: none;
}

.single-use-warning > i {
  margin-top: 3px;
  font-size: 17px;
}

.wizard-page .single-use-contact-link {
  display: inline;
  min-height: 0;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  font-weight: 900;
  line-height: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

@keyframes singleUseWarningPulse {
  0%,
  100% {
    background: #fff0f0;
    color: #c51616;
    box-shadow: 0 0 0 rgb(225 39 39 / 0%);
  }

  50% {
    background: #ffd9d9;
    color: #f00000;
    box-shadow: 0 0 16px rgb(225 39 39 / 24%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .single-use-warning {
    animation: none;
  }
}

/* v1.2.5 key operations dashboard */
.admin-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, #e9edff 0, transparent 28%),
    radial-gradient(circle at 100% 16%, #e7f5ff 0, transparent 26%),
    #f4f6fb;
  color: #17223b;
}

.admin-page .admin-shell {
  width: min(1440px, calc(100vw - 40px));
  padding: 34px 0 56px;
}

.admin-header,
.admin-page .admin-overview-panel,
.admin-page .admin-workbench,
.admin-page .admin-key-panel {
  border: 1px solid #e0e5f1;
  border-radius: 20px;
  background: rgb(255 255 255 / 94%);
  padding: 24px;
  box-shadow: 0 14px 40px rgb(43 58 112 / 8%);
}

.admin-header {
  margin-bottom: 18px;
}

.admin-page .panel {
  margin-top: 18px;
}

.admin-heading-row,
.section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.admin-page h1 {
  color: #17223b;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
}

.admin-page h2 {
  margin: 0;
  color: #17223b;
  font-size: 20px;
  line-height: 1.2;
}

.admin-subtitle {
  margin: 8px 0 0;
}

.admin-api-mode {
  width: fit-content;
  margin: 12px 0 0;
  border: 1px solid #dfe5f2;
  border-radius: 999px;
  background: #f5f7fc;
  color: #5d6b86;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 800;
}

.admin-api-mode.is-live {
  border-color: #bfe6d6;
  background: #ecfaf4;
  color: #176c52;
}

.admin-api-mode.is-mock {
  border-color: #efd69b;
  background: #fff8e8;
  color: #8a5c13;
}

.admin-api-mode.is-error {
  border-color: #f1bebe;
  background: #fff1f1;
  color: #a92d2d;
}

.admin-login-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto auto;
  align-items: end;
  gap: 12px;
  margin-top: 22px;
}

.admin-page .admin-key-field {
  display: grid;
  gap: 7px;
  margin: 0;
  color: #5d6b86;
  font-size: 13px;
  font-weight: 700;
}

.admin-page .admin-key-field input {
  min-height: 48px;
  font-size: 15px;
}

.auto-refresh-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid #dfe4f0;
  border-radius: 10px;
  background: #f7f9fd;
  color: #5d6b86;
  padding: 0 13px;
  font-weight: 700;
  white-space: nowrap;
}

.auto-refresh-control input {
  width: 17px;
  min-height: 17px;
  margin: 0;
}

.admin-header > .status {
  margin-top: 12px;
  border-radius: 9px;
  background: #f5f7fc;
  padding: 9px 12px;
  line-height: 1.5;
}

.admin-header > .status.error {
  background: #fff1f1;
}

.admin-header > .status.success {
  background: #eaf8f2;
  color: #176c52;
}

.admin-page .page-links {
  justify-content: flex-end;
  margin-top: 0;
}

.admin-page .eyebrow {
  color: #6274b8;
  font-weight: 800;
}

.last-refresh-text {
  margin: 0;
  font-size: 12px;
}

.admin-summary-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 0;
}

.admin-summary-grid .summary-card {
  display: grid;
  gap: 5px;
  min-height: 92px;
  border: 1px solid #e2e7f2;
  border-radius: 14px;
  background: #f8f9fd;
  color: #24314f;
  padding: 14px;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.admin-summary-grid .summary-card:hover {
  border-color: #aeb9df;
  box-shadow: 0 8px 20px rgb(59 76 137 / 10%);
  transform: translateY(-2px);
}

.admin-summary-grid .summary-card span {
  margin: 0;
  color: #687692;
  font-size: 12px;
}

.admin-summary-grid .summary-card strong {
  color: #1d2a47;
  font-size: 28px;
}

.admin-summary-grid .cost-summary-card {
  background: #fff8e8;
}

.admin-summary-grid .cost-summary-card small {
  color: #8a6a27;
  font-size: 11px;
  line-height: 1.35;
}

.admin-summary-grid .status-unused { background: #f2fbf6; }
.admin-summary-grid .status-pending { background: #fff9ea; }
.admin-summary-grid .status-locked { background: #f1f5ff; }
.admin-summary-grid .status-used { background: #eefaf7; }
.admin-summary-grid .status-destroyed { background: #fff2f2; }

.issue-code-guide {
  margin-top: 14px;
  border: 1px solid #e2e7f2;
  border-radius: 12px;
  background: #fbfcff;
  color: #31405f;
}

.issue-code-guide summary {
  cursor: pointer;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
}

.issue-code-grid {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr);
  gap: 8px 12px;
  padding: 0 14px 14px;
}

.issue-code-grid span {
  align-self: start;
  border-radius: 6px;
  background: #fff0f0;
  color: #c33838;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 800;
}

.issue-code-grid p {
  margin: 1px 0 0;
  color: #66738d;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .issue-code-grid {
    grid-template-columns: max-content minmax(0, 1fr);
  }
}

.admin-workbench-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1.35fr) minmax(280px, 1fr) minmax(240px, 0.8fr);
  gap: 14px;
}

.admin-tool-card {
  display: grid;
  align-content: start;
  gap: 14px;
  border: 1px solid #e2e7f2;
  border-radius: 16px;
  background: #f9faff;
  padding: 18px;
}

.admin-page [data-collapse-ready="true"] {
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.admin-page [data-collapse-ready="true"][data-collapsed="true"] {
  box-shadow: 0 8px 24px rgb(43 58 112 / 6%);
}

.admin-page [data-collapse-ready="true"] > .collapsible-heading {
  align-items: center;
}

.admin-page [data-collapse-ready="true"] > .collapsible-heading > div:first-child {
  min-width: 0;
}

.admin-page [data-collapse-ready="true"] > .collapsible-heading h2 {
  overflow-wrap: anywhere;
}

.admin-collapsible-content {
  display: grid;
  gap: 14px;
}

.admin-collapsible-content[hidden] {
  display: none;
}

.collapse-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-width: 78px;
  justify-content: center;
}

.collapse-toggle-caret {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

[data-collapsed="false"] > .collapsible-heading .collapse-toggle-caret {
  transform: rotate(225deg) translateY(-2px);
}

.region-settings-card {
  grid-column: 1 / -1;
  border-color: #d7dff6;
  background:
    radial-gradient(circle at 96% 0%, rgb(83 101 223 / 10%), transparent 30%),
    #f9faff;
}

.region-settings-actions {
  justify-content: flex-end;
}

.region-policy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cost-limit-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #f0d59a;
  border-radius: 12px;
  background: #fff9e9;
  color: #72531a;
  padding: 11px 13px;
  font-size: 12px;
  line-height: 1.55;
}

.cost-limit-note strong {
  flex: 0 0 auto;
  color: #9a6410;
}

.region-editor-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #dfe5f2;
  color: #5c6b87;
  padding: 4px 2px 9px;
  font-size: 12px;
  font-weight: 800;
}

.region-editor-list {
  display: grid;
  gap: 12px;
}

.region-editor-empty {
  margin: 0;
  border: 1px dashed #cfd7ea;
  border-radius: 12px;
  background: rgb(255 255 255 / 72%);
  padding: 24px;
  text-align: center;
}

.region-editor-row {
  display: grid;
  gap: 13px;
  border: 1px solid #dfe5f2;
  border-radius: 14px;
  background: #fff;
  padding: 15px;
  box-shadow: 0 6px 16px rgb(42 57 113 / 5%);
}

.region-editor-row:focus-within {
  border-color: #aebaf0;
  box-shadow: 0 0 0 3px rgb(91 109 226 / 8%);
}

.region-editor-row-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.region-heading-actions {
  justify-content: flex-end;
}

.region-toggle-button {
  min-width: 72px;
}

.region-editor-body {
  display: grid;
  gap: 13px;
}

.region-editor-body[hidden] {
  display: none;
}

.region-editor-row-heading > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.region-editor-row-heading strong {
  color: #263552;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.region-state-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #e7f7ef;
  color: #176c50;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 800;
}

.region-state-badge.is-disabled {
  background: #eef1f6;
  color: #707b90;
}

.region-health-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: 6px;
  border-radius: 999px;
  background: #eef8f3;
  color: #167052;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 850;
}

.region-health-badge.is-warning {
  background: #fff1dd;
  color: #a3580c;
}

.admin-page .region-remove-button {
  min-height: 34px;
  padding: 0 12px;
}

.region-editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.region-editor-fields label,
.region-policy-grid label,
.region-fallback-field {
  display: grid;
  gap: 6px;
  color: #5d6b86;
  font-size: 12px;
  font-weight: 750;
}

.region-wide-field {
  grid-column: span 2;
}

.region-editor-fields input,
.region-editor-rules select,
.region-policy-grid input,
.region-policy-grid select {
  min-width: 0;
  min-height: 44px;
  background: #fbfcff;
  font-size: 13px;
}

.region-editor-rules {
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  gap: 12px;
  border-top: 1px solid #edf0f6;
  padding-top: 12px;
}

.provider-selection-section {
  display: grid;
  gap: 10px;
  border-top: 1px solid #e5e9f3;
  padding-top: 13px;
}

.provider-selection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.provider-selection-heading > div {
  display: grid;
  gap: 3px;
}

.provider-selection-heading strong {
  color: #31405e;
  font-size: 13px;
}

.provider-selection-heading span {
  color: #7a869d;
  font-size: 11px;
}

.provider-selection-section > .region-price-result {
  margin: 0;
}

.saved-provider-details {
  border: 1px solid #e1e6f1;
  border-radius: 10px;
  background: #fff;
}

.saved-provider-details summary {
  cursor: pointer;
  padding: 10px 12px;
  color: #53617b;
  font-size: 12px;
  font-weight: 800;
}

.saved-provider-list {
  display: grid;
  gap: 7px;
  padding: 0 10px 10px;
}

.saved-provider-item {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 120px minmax(150px, auto);
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  background: #f7f9fd;
  padding: 9px 10px;
  color: #68758e;
  font-size: 11px;
}

.saved-provider-item.is-suspended {
  background: #fff5f2;
}

.saved-provider-identity {
  display: grid;
  gap: 2px;
}

.saved-provider-identity strong {
  color: #31405e;
  font-size: 12px;
}

.saved-provider-identity small {
  color: #7a869d;
  font-size: 10px;
}

.saved-provider-health {
  justify-self: end;
  color: #167052;
}

.saved-provider-health.is-warning {
  color: #b63838;
  font-weight: 800;
}

.supplier-editor-section {
  display: grid;
  gap: 10px;
  border-top: 1px solid #e5e9f3;
  padding-top: 13px;
}

.supplier-editor-heading,
.supplier-editor-row-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.supplier-editor-heading > div {
  display: grid;
  gap: 3px;
}

.supplier-editor-heading strong,
.supplier-editor-row-heading strong {
  color: #31405e;
  font-size: 13px;
}

.supplier-editor-heading span {
  color: #7a869d;
  font-size: 11px;
}

.admin-page .supplier-editor-heading button {
  min-height: 36px;
  padding: 0 12px;
}

.supplier-editor-list {
  display: grid;
  gap: 9px;
}

.supplier-editor-empty {
  margin: 0;
  border: 1px dashed #d3daea;
  border-radius: 10px;
  background: #fafbfe;
  padding: 18px;
  text-align: center;
}

.supplier-editor-row {
  display: grid;
  gap: 10px;
  border: 1px solid #e1e6f1;
  border-radius: 11px;
  background: #f8faff;
  padding: 12px;
}

.supplier-editor-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.supplier-editor-fields label {
  display: grid;
  gap: 6px;
  color: #62708a;
  font-size: 11px;
  font-weight: 750;
}

.supplier-editor-fields input {
  min-width: 0;
  min-height: 41px;
  background: #fff;
  font-size: 12px;
}

.supplier-wide-field {
  grid-column: span 2;
}

.supplier-enabled-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid #dfe5f0;
  border-radius: 9px;
  background: #fff;
  color: #52617d;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.supplier-enabled-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #536be4;
}

.admin-page .supplier-remove-button {
  min-height: 34px;
  padding: 0 10px;
}

.supplier-editor-row > .region-price-result {
  margin: 0;
  border-top: 1px dashed #dfe4ef;
  padding-top: 8px;
}

.region-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid #e0e5f0;
  border-radius: 10px;
  background: #f8f9fd;
  color: #4e5d7b;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.region-toggle input {
  width: 17px;
  height: 17px;
  accent-color: #536be4;
}

.region-price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
}

.admin-page .region-price-row button {
  min-height: 36px;
  padding: 0 12px;
}

.region-price-result {
  color: #6b7892;
  font-size: 12px;
  line-height: 1.5;
}

.region-price-result.success,
.region-settings-message.success {
  color: #167052;
}

.region-price-result.error,
.region-settings-message.error {
  color: #b63838;
}

.region-price-result.is-loading,
.region-settings-message.warning {
  color: #9a6410;
}

.provider-discovery {
  display: grid;
  gap: 10px;
  border: 1px solid #dce3f2;
  border-radius: 12px;
  background: #fbfcff;
  padding: 12px;
}

.provider-discovery[hidden] {
  display: none;
}

.provider-discovery-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.provider-discovery-heading > div {
  display: grid;
  gap: 3px;
}

.provider-discovery-heading strong {
  color: #2e3c5b;
  font-size: 13px;
}

.provider-discovery-heading span {
  color: #71809b;
  font-size: 11px;
}

.provider-offer-list {
  display: grid;
  gap: 7px;
  max-height: 360px;
  overflow: auto;
}

.provider-offer-item {
  display: grid;
  grid-template-columns: 22px minmax(160px, 1fr) 90px 100px;
  align-items: center;
  gap: 10px;
  border: 1px solid #e1e6f1;
  border-radius: 9px;
  background: #fff;
  padding: 9px 11px;
  cursor: pointer;
}

.provider-offer-item input {
  width: 17px;
  height: 17px;
  accent-color: #536be4;
}

.provider-offer-item.is-blocked {
  background: #fff8f8;
  opacity: 0.72;
  cursor: not-allowed;
}

.provider-offer-identity {
  display: grid;
  gap: 2px;
}

.provider-offer-identity strong,
.provider-offer-price {
  color: #31405e;
  font-size: 12px;
}

.provider-offer-identity small,
.provider-offer-stock {
  color: #73809a;
  font-size: 11px;
}

.provider-offer-price {
  display: grid;
  justify-items: end;
}

.provider-offer-blocked {
  color: #b63838;
  font-size: 10px;
}

@media (max-width: 760px) {
  .provider-selection-heading,
  .provider-discovery-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .provider-offer-item {
    grid-template-columns: 22px minmax(0, 1fr) auto;
  }

  .provider-offer-stock {
    display: none;
  }

  .saved-provider-item {
    grid-template-columns: 1fr;
  }

  .saved-provider-health {
    justify-self: start;
  }
}

.region-settings-message {
  margin: 0;
  border-radius: 10px;
  background: #eef2fb;
  padding: 8px 11px;
}

.section-heading-row.compact {
  min-height: 42px;
}

.generator-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-page .admin-tool-card button {
  min-height: 44px;
}

.generated-result {
  display: grid;
  gap: 10px;
  border-top: 1px solid #dde3f0;
  padding-top: 14px;
}

.generated-result[hidden] {
  display: none;
}

.generated-result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.generator-card #generatedKeysOutput {
  min-height: 190px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
}

#commitGeneratedButton:not(:disabled) {
  background: #167653;
  box-shadow: 0 7px 18px rgb(22 118 83 / 18%);
}

#generatedCommitStatus {
  width: fit-content;
  border-radius: 999px;
  background: #eef2fb;
  padding: 5px 10px;
}

.admin-tool-card.announcement-card {
  grid-column: 1 / -1;
  border-color: #dce3f7;
  background:
    radial-gradient(circle at 94% 6%, rgb(89 106 255 / 10%), transparent 26%),
    #f9faff;
}

.announcement-card .admin-collapsible-content {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.announcement-card .admin-collapsible-content > label[for="announcementTitleInput"],
.announcement-card .admin-collapsible-content > label[for="announcementContentInput"],
.announcement-card .admin-collapsible-content > label[for="smsAnnouncementTitleInput"],
.announcement-card .admin-collapsible-content > label[for="smsAnnouncementContentInput"],
.announcement-card .admin-collapsible-content > .compact-actions,
.announcement-card .admin-collapsible-content > .editor-hint,
.announcement-card .admin-collapsible-content > #announcementPreview,
.announcement-card .admin-collapsible-content > #smsAnnouncementPreview {
  grid-column: 1 / -1;
}

.announcement-card textarea {
  min-height: 170px;
  resize: vertical;
  line-height: 1.7;
}

.announcement-card input[type="file"] {
  min-height: 48px;
  border: 1px dashed #bdc8e5;
  background: #fff;
  padding: 8px;
}

.announcement-card input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 10px;
  border: 0;
  border-radius: 8px;
  background: #edf1ff;
  color: #4b5dcc;
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
}

.announcement-card #announcementPreview,
.announcement-card #smsAnnouncementPreview {
  border: 1px solid #dfe5f3;
  border-radius: 14px;
  background: #fff;
  padding: 16px;
}

.announcement-card #announcementPreview h3,
.announcement-card #smsAnnouncementPreview h3 {
  margin: 2px 0 0;
  color: #1d2a47;
  font-size: 21px;
  overflow-wrap: anywhere;
}

.announcement-card #announcementPreviewContent,
.announcement-card #smsAnnouncementPreviewContent {
  color: #4c5b77;
  line-height: 1.75;
}

.announcement-card #announcementPreviewImage,
.announcement-card #smsAnnouncementPreviewImage {
  width: auto;
  margin-inline: auto;
  border: 1px solid #e3e7f1;
  background: #f7f8fc;
}

.compact-actions,
.admin-export-actions,
.admin-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.compact-actions button,
.admin-export-actions button,
.admin-bulk-actions button {
  min-height: 38px;
  padding: 0 12px;
}

.admin-key-panel .section-heading-row {
  align-items: center;
}

.admin-filter-row {
  grid-template-columns: minmax(280px, 1fr) 200px auto;
  align-items: end;
  gap: 12px;
  margin-top: 20px;
}

.filter-result-text {
  margin: 0 0 12px;
  white-space: nowrap;
}

.bulk-action-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  border: 1px solid #e2e7f2;
  border-radius: 13px;
  background: #f8f9fd;
  padding: 11px 13px;
}

.bulk-action-hint {
  margin: 0;
  font-size: 12px;
  text-align: right;
}

.admin-page .admin-table-wrap {
  border: 1px solid #e1e6f0;
  border-radius: 14px;
  background: #fff;
  margin-top: 16px;
  max-height: 66vh;
  overflow: auto;
}

.admin-key-table {
  min-width: 1780px;
}

.admin-key-table thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #f4f6fb;
  color: #55627c;
  font-size: 12px;
  font-weight: 800;
}

.admin-key-table tbody tr:hover {
  background: #fafbff;
}

.admin-key-table td {
  color: #3f4d69;
  font-size: 12px;
}

.admin-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: #edf0f6;
  color: #5b667c;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-status-badge.status-unused { background: #e9f8ef; color: #197147; }
.admin-status-badge.status-pending { background: #fff3ce; color: #93600a; }
.admin-status-badge.status-locked { background: #e9efff; color: #3d58b7; }
.admin-status-badge.status-used { background: #e1f6f0; color: #14745b; }
.admin-status-badge.status-destroyed { background: #ffe7e7; color: #a92d2d; }

.key-value-cell {
  min-width: 250px;
}

.key-value-cell code,
.sms-code-cell,
.request-id-cell,
.proof-id-cell {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.key-value-cell code {
  display: block;
  color: #273454;
  font-size: 11px;
}

.compact-copy-button {
  min-height: 24px;
  margin-top: 4px;
  font-size: 11px;
}

.sms-code-cell {
  color: #137259 !important;
  font-weight: 800;
}

.numeric-cell {
  text-align: center !important;
}

.time-cell {
  min-width: 138px;
}

.request-id-cell,
.proof-id-cell {
  max-width: 190px;
  color: #66738e !important;
  font-size: 11px !important;
}

.row-action-cell {
  min-width: 86px;
}

.row-action-cell .text-button {
  display: block;
  min-height: 28px;
  font-size: 11px;
}

.table-empty-cell {
  padding: 40px !important;
  text-align: center !important;
}

.clipboard-fallback {
  position: fixed;
  left: -9999px;
  opacity: 0;
}

@media (max-width: 1000px) {
  .admin-login-row {
    grid-template-columns: minmax(260px, 1fr) repeat(2, auto);
  }

  .auto-refresh-control {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .admin-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-workbench-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-card {
    grid-column: 1 / -1;
  }

  .region-editor-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .supplier-editor-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .region-wide-field {
    grid-column: auto;
  }

  .region-editor-rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .region-fallback-field {
    grid-column: 1 / -1;
  }

  .bulk-action-bar {
    grid-template-columns: 1fr;
  }

  .bulk-action-hint {
    text-align: left;
  }
}

@media (max-width: 680px) {
  .admin-page .admin-shell {
    width: min(100vw - 20px, 1440px);
    padding: 14px 0 30px;
  }

  .admin-header,
  .admin-page .admin-overview-panel,
  .admin-page .admin-workbench,
  .admin-page .admin-key-panel {
    border-radius: 15px;
    padding: 16px;
  }

  .admin-heading-row,
  .section-heading-row,
  .generated-result-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-page [data-collapse-ready="true"] > .collapsible-heading {
    align-items: stretch;
  }

  .collapse-toggle {
    width: 100%;
  }

  .admin-page .page-links {
    justify-content: flex-start;
  }

  .admin-login-row,
  .admin-workbench-grid,
  .generator-fields,
  .admin-filter-row,
  .region-policy-grid,
  .region-editor-fields,
  .region-editor-rules,
  .supplier-editor-fields {
    grid-template-columns: 1fr;
  }

  .announcement-card .admin-collapsible-content {
    grid-template-columns: 1fr;
  }

  .announcement-card .admin-collapsible-content > * {
    grid-column: auto;
  }

  .auto-refresh-control,
  .settings-card {
    grid-column: auto;
  }

  .region-settings-card,
  .region-fallback-field,
  .region-wide-field {
    grid-column: 1 / -1;
  }

  .supplier-wide-field {
    grid-column: auto;
  }

  .region-settings-actions,
  .region-price-row {
    align-items: stretch;
    flex-direction: column;
  }

  .region-editor-heading {
    display: none;
  }

  .region-editor-row-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .region-heading-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .supplier-editor-heading,
  .supplier-editor-row-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-result-text {
    margin: 0;
  }
}

@media (max-width: 520px) {
  .current-region-notice {
    grid-template-columns: auto 1fr;
  }

  .current-region-notice small {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .wizard-page .preverify-modal-panel {
    width: min(95vw, 700px);
    padding: 20px 15px 16px;
  }

  .wizard-page .announcement-modal-panel {
    width: min(95vw, 560px);
    max-height: 90vh;
    border-radius: 18px;
    padding: 22px 16px 18px;
  }

  .announcement-modal-panel h2 {
    margin-right: 42px;
  }

  .announcement-modal-image {
    max-height: 38vh;
  }

  .preverify-figure img {
    max-height: 44vh;
    border-radius: 12px;
  }

  .preverify-figure figcaption {
    align-items: flex-start;
    font-size: 12px;
  }
}
