:root {
  color: #152033;
  background: #f5f8fc;
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei UI",
    "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(23, 105, 224, 0.10), transparent 34rem),
    #f5f8fc;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(23, 105, 224, 0.28);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.page-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(220, 228, 239, 0.88);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #152033;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}

.brand-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #2c7bea, #1059c0);
  box-shadow: 0 8px 18px rgba(23, 105, 224, 0.25);
  color: #fff;
}

.language-switch {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  color: #9aa7b9;
}

.language-button,
.text-button,
.modal-close {
  border: 0;
  background: transparent;
}

.language-button {
  padding: 7px 8px;
  border-radius: 8px;
  color: #5d6b82;
}

.language-button:hover,
.language-button.is-active {
  background: #eaf2ff;
  color: #0f5cca;
}

.main-content {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 54px 0 36px;
}

.hero {
  margin-bottom: 28px;
  text-align: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: #1769e0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 38px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.hero p:last-child {
  max-width: 590px;
  margin: 14px auto 0;
  color: #5d6b82;
  font-size: 16px;
  line-height: 1.7;
}

.recharge-card {
  overflow: hidden;
  border: 1px solid rgba(220, 228, 239, 0.9);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(28, 55, 90, 0.10);
}

.stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 20px 24px;
  border-bottom: 1px solid #e6edf6;
  background: #f9fbfe;
  list-style: none;
}

.step {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  color: #5d6b82;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.step:not(:last-child)::after {
  position: absolute;
  right: -12%;
  width: 24%;
  height: 1px;
  background: #d1dce9;
  content: "";
}

.step-number {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #c9d5e5;
  border-radius: 50%;
  background: #fff;
}

.step.is-active,
.step.is-complete {
  color: #0f5cca;
}

.step.is-active .step-number,
.step.is-complete .step-number {
  border-color: #1769e0;
  background: #1769e0;
  color: #fff;
}

.step-panel {
  padding: 34px;
}

.section-heading {
  margin-bottom: 26px;
}

.section-heading h2,
.modal h2 {
  margin: 0;
  font-size: clamp(21px, 4vw, 26px);
  line-height: 1.3;
}

.section-heading > p:last-child,
.modal h2 + p {
  margin: 10px 0 0;
  color: #5d6b82;
  line-height: 1.65;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #26354d;
  font-size: 14px;
  font-weight: 700;
}

.text-input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #cdd8e7;
  border-radius: 12px;
  background: #fff;
  color: #152033;
  font-size: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.text-input:hover {
  border-color: #aebdd1;
}

.text-input:focus {
  border-color: #1769e0;
  box-shadow: 0 0 0 4px rgba(23, 105, 224, 0.11);
}

.text-input[aria-invalid="true"] {
  border-color: #c93434;
}

.code-input {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.025em;
}

.field-help,
.field-error {
  min-height: 20px;
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.55;
}

.field-help {
  color: #52627a;
}

.field-error {
  color: #b82525;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.button-primary {
  background: #1769e0;
  color: #fff;
  box-shadow: 0 8px 18px rgba(23, 105, 224, 0.18);
}

.button-primary:hover:not(:disabled) {
  background: #0f5cca;
}

.button-primary:active:not(:disabled) {
  background: #0b4ead;
}

.button-secondary {
  border-color: #cbd7e6;
  background: #fff;
  color: #2e405d;
}

.button-secondary:hover:not(:disabled) {
  border-color: #9fb2cb;
  background: #f7f9fc;
}

.button-warning {
  border-color: #e5b85a;
  background: #fff8e8;
  color: #7a4a00;
}

.button-warning:hover:not(:disabled) {
  border-color: #d99b25;
  background: #fff1cd;
}

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

.button-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.info-box,
.warning-box {
  margin-top: 26px;
  padding: 17px 18px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.65;
}

.info-box {
  border: 1px solid #d6e6fb;
  background: #f3f8ff;
  color: #355074;
}

.info-box ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.warning-box {
  border: 1px solid #f0d1a8;
  background: #fff8ed;
  color: #744310;
}

.warning-box p,
.info-box p {
  margin: 7px 0 0;
}

.info-box.compact {
  margin: 20px 0;
}

.result-panel {
  text-align: center;
}

.result-icon {
  display: grid;
  width: 66px;
  height: 66px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 50%;
  font-size: 30px;
  font-weight: 800;
}

.result-icon.is-processing {
  background: #eaf2ff;
  color: #1769e0;
}

.result-icon.is-success {
  background: #e8f7f1;
  color: #16845b;
}

.result-icon.is-warning {
  background: #fff3df;
  color: #a15c00;
}

.result-icon.is-danger {
  background: #fdecec;
  color: #c93434;
}

.result-icon.is-default {
  background: #edf1f6;
  color: #5d6b82;
}

.status-chip {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.status-chip.is-processing {
  background: #eaf2ff;
  color: #0f5cca;
}

.status-chip.is-success {
  background: #e8f7f1;
  color: #126b4a;
}

.status-chip.is-warning {
  background: #fff1d6;
  color: #875000;
}

.status-chip.is-danger {
  background: #fde9e9;
  color: #ad2929;
}

.status-chip.is-default {
  background: #edf1f6;
  color: #4f5f76;
}

.result-panel h2 {
  margin: 0;
  font-size: 25px;
}

.result-message {
  max-width: 570px;
  margin: 12px auto 0;
  color: #52627a;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.operation-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 13px 14px;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #f8fafc;
  color: #52627a;
  font-size: 13px;
  text-align: left;
}

.operation-box code {
  color: #253752;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.text-button {
  padding: 6px 8px;
  border-radius: 8px;
  color: #0f5cca;
  font-weight: 700;
}

.text-button:hover {
  background: #eaf2ff;
}

.result-actions {
  justify-content: center;
}

.next-step-box,
.independent-notice {
  border: 1px solid #d6e6fb;
  border-radius: 12px;
  background: #f3f8ff;
  color: #355074;
  font-size: 13px;
  line-height: 1.65;
}

.next-step-box {
  margin: 18px 0 0;
  padding: 12px 14px;
  text-align: left;
}

.independent-notice {
  margin-top: 18px;
  padding: 12px 14px;
}

.restart-notice {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #b9ddc3;
  border-radius: 12px;
  background: #f0fbf3;
  color: #235f35;
  font-size: 13px;
  line-height: 1.65;
}

.quick-services {
  margin-top: 24px;
}

.quick-services h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

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

.quick-button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px 16px;
  border: 1px solid #dce4ef;
  border-radius: 14px;
  background: #fff;
  color: #2e405d;
  font-weight: 700;
  text-align: left;
}

.quick-button:hover {
  border-color: #abc3e3;
  background: #f8fbff;
}

.quick-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: #eaf2ff;
  color: #1769e0;
  font-size: 18px;
}

.site-footer {
  padding: 18px 20px 30px;
  color: #52627a;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.site-footer p {
  margin: 3px 0;
}

.modal {
  width: min(92vw, 520px);
  max-height: min(88vh, 720px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(18, 37, 64, 0.28);
  color: #152033;
}

.modal::backdrop {
  background: rgba(15, 27, 45, 0.50);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  min-width: 0;
  padding: 28px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: #69788d;
  font-size: 24px;
}

.modal-close:hover {
  background: #f0f3f7;
}

.confirm-list {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  margin: 22px 0 0;
  border: 1px solid #dce4ef;
  border-radius: 12px;
}

.confirm-list dt,
.confirm-list dd {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid #e7edf5;
}

.confirm-list dt {
  background: #f7f9fc;
  color: #65748a;
}

.confirm-list dd {
  font-family: "Cascadia Code", Consolas, monospace;
  overflow-wrap: anywhere;
}

.confirm-list > :nth-last-child(-n + 2) {
  border-bottom: 0;
}

.tutorial-list {
  margin: 22px 0;
  padding-left: 24px;
  color: #44546d;
  line-height: 1.8;
}

@media (max-width: 640px) {
  .site-header {
    min-height: 60px;
    padding: 10px 14px;
  }

  .brand {
    gap: 9px;
    max-width: calc(100% - 86px);
    font-size: 15px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .main-content {
    width: min(100% - 24px, 760px);
    padding-top: 34px;
  }

  .hero {
    margin-bottom: 22px;
  }

  .stepper {
    padding: 16px 10px;
  }

  .step {
    flex-direction: column;
    gap: 5px;
    font-size: 11px;
  }

  .step:not(:last-child)::after {
    top: 14px;
    right: -17%;
    width: 34%;
  }

  .step-panel {
    padding: 24px 20px;
  }

  .button-row {
    flex-direction: column-reverse;
  }

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

  .result-actions {
    flex-direction: column;
  }

  .operation-box {
    grid-template-columns: 1fr;
  }

  .operation-box > span {
    grid-column: 1 / -1;
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 25px 20px 20px;
  }

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

  .confirm-list dt,
  .confirm-list dd {
    border-bottom: 1px solid #e7edf5;
  }
}

@media (max-width: 360px) {
  .site-header {
    padding-inline: 10px;
  }

  .brand {
    gap: 7px;
    max-width: calc(100% - 76px);
    font-size: 13px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }

  .language-switch {
    gap: 2px;
  }

  .language-button {
    padding: 6px 4px;
  }

  .hero h1 {
    font-size: clamp(24px, 8.5vw, 28px);
  }

  .step-panel {
    padding-inline: 16px;
  }

  .modal {
    width: calc(100vw - 16px);
  }
}

@media (max-height: 560px) {
  .modal {
    max-height: calc(100vh - 16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
