:root {
  color-scheme: light;
  --bg: #eef5ff;
  --card: rgba(255, 255, 255, 0.94);
  --ink: #13213b;
  --muted: #64748b;
  --line: #d9e5f4;
  --blue: #1769e0;
  --blue-dark: #0d4da9;
  --shadow: 0 24px 80px rgba(21, 55, 104, 0.16);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(64, 153, 255, 0.3), transparent 32rem),
    radial-gradient(circle at 88% 16%, rgba(100, 211, 199, 0.24), transparent 30rem),
    linear-gradient(145deg, #f8fbff, var(--bg));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(23, 105, 224, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 105, 224, 0.09) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.shell {
  position: relative;
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 40px;
}

.hero { margin-bottom: 28px; }

.eyebrow {
  display: inline-flex;
  padding: 7px 12px;
  color: var(--blue-dark);
  background: #dcecff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

h1 {
  margin: 16px 0 10px;
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
}

h2 { margin: 0; font-size: 24px; }

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

.muted { margin: 8px 0 0; line-height: 1.7; }

.panel {
  min-height: 470px;
  padding: clamp(24px, 5vw, 46px);
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

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

.status {
  margin: 9px 0 0;
  color: var(--blue-dark);
  font-weight: 600;
}

.qr-frame {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 292px;
  margin: 28px 0 24px;
  padding: 24px;
  background: #f7faff;
  border: 1px dashed #bdd2ec;
  border-radius: 22px;
}

#qr-code {
  display: grid;
  place-items: center;
  min-width: 248px;
  min-height: 248px;
  padding: 12px;
  background: #fff;
  border-radius: 14px;
}

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

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: steps;
}

.steps li {
  counter-increment: steps;
  padding: 14px;
  color: #41526a;
  background: #f3f7fd;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}

.steps li::before {
  content: counter(steps);
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 7px;
  color: #fff;
  background: var(--blue);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.button {
  min-height: 42px;
  padding: 0 18px;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.button:hover { background: var(--blue-dark); }

.button.secondary {
  color: var(--blue-dark);
  background: #e7f1ff;
}

.success {
  display: grid;
  place-items: center;
  min-height: 390px;
  text-align: center;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin-bottom: 18px;
  color: #fff;
  background: #16a36a;
  border-radius: 50%;
  font-size: 38px;
}

.success .button { margin-top: 18px; }

.draft-form {
  width: min(560px, 100%);
  margin-top: 24px;
  text-align: left;
}

.draft-form label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: #33445e;
  font-size: 14px;
  font-weight: 700;
}

.draft-form input,
.draft-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-weight: 400;
  outline: none;
}

.draft-form textarea {
  min-height: 190px;
  padding: 13px 14px;
  line-height: 1.7;
  resize: vertical;
}

.draft-form input:focus,
.draft-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.12);
}

.draft-form input[readonly] {
  color: #536176;
  background: #eef3f9;
  cursor: not-allowed;
}

.account-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.field-status {
  min-height: 20px;
  font-size: 13px;
  font-weight: 400;
}

.field-status[data-kind="success"] { color: #0b7a4b; }
.field-status[data-kind="error"] { color: #c23838; }

.field-hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
}

.mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.mode-switch legend {
  padding: 0 6px;
  color: #33445e;
  font-size: 14px;
  font-weight: 700;
}

.mode-switch label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  cursor: pointer;
}

.mode-switch input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.mode-note {
  margin: -4px 0 16px;
  padding: 12px 14px;
  color: #51627a;
  background: #eef6ff;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
}

.draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.draft-actions .button { margin-top: 0; }

.agreement {
  display: flex !important;
  align-items: flex-start;
  gap: 9px !important;
  margin-top: 20px !important;
  color: #596981 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.65;
}

.agreement input {
  flex: 0 0 auto;
  width: 17px;
  min-height: 17px;
  margin-top: 2px;
}

.agreement a {
  color: var(--blue-dark);
  text-decoration: none;
}

.submit-review {
  width: 100%;
  margin-top: 14px;
}

.draft-status {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.draft-status[data-kind="success"] { color: #0b7a4b; }
.draft-status[data-kind="error"] { color: #c23838; }

.upload-block {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 16px;
  background: #f7faff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.upload-block h3 {
  margin: 0;
  color: #33445e;
  font-size: 15px;
}

.upload-button {
  justify-self: start;
  margin-top: 2px;
}

.footnote {
  margin: 20px 8px 0;
  font-size: 13px;
  text-align: center;
}

.review-view {
  width: 100%;
  color: var(--ink);
  text-align: left;
}

.review-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  background: linear-gradient(120deg, #edf2ff, #f5f1ff);
  border: 1px solid #dfe4fb;
  border-radius: 18px;
}

.review-hero[data-review-state="completed"] {
  background: linear-gradient(120deg, #e9fbf2, #f3fbf7);
  border-color: #ccecdf;
}

.review-hero[data-review-state="failed"] {
  background: linear-gradient(120deg, #fff1f1, #fff7f7);
  border-color: #f1d2d2;
}

.review-hero-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  color: var(--blue);
  background: #dbe7ff;
  border-radius: 50%;
  font-size: 34px;
  font-weight: 700;
}

.review-hero[data-review-state="completed"] .review-hero-icon {
  color: #0b8756;
  background: #d9f5e8;
}

.review-hero[data-review-state="failed"] .review-hero-icon {
  color: #c03838;
  background: #fbe0e0;
}

.review-hero-copy h2 {
  margin: 8px 0 4px;
  font-size: 24px;
}

.review-hero-copy p {
  margin: 0;
  color: #5e6d83;
  font-size: 14px;
  line-height: 1.6;
}

.review-help-link {
  white-space: nowrap;
  text-decoration: none;
}

.review-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 26px 0;
  padding: 0 8px;
  list-style: none;
}

.review-steps li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #8792a3;
  text-align: center;
}

.review-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 17px;
  left: calc(50% + 22px);
  width: calc(100% - 44px);
  border-top: 2px solid #d9e1ec;
}

.review-steps li.completed:not(:last-child)::after,
.review-steps li.active:not(:last-child)::after {
  border-color: #347be1;
}

.review-steps li.failed:not(:last-child)::after {
  border-color: #e5aaaa;
}

.review-step-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  color: #7c899b;
  background: #fff;
  border: 2px solid #d6dee9;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}

.review-steps li.completed {
  color: #47617f;
}

.review-steps li.completed .review-step-dot {
  color: var(--blue);
  border-color: var(--blue);
}

.review-steps li.active {
  color: var(--blue-dark);
}

.review-steps li.active .review-step-dot {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.review-steps li.failed {
  color: #b83a3a;
}

.review-steps li.failed .review-step-dot {
  color: #fff;
  background: #cf4747;
  border-color: #cf4747;
}

.review-steps strong {
  font-size: 14px;
}

.review-steps small {
  font-size: 12px;
}

.certified-profile {
  margin-bottom: 18px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.certified-profile-heading,
.certified-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.certified-profile-heading {
  justify-content: space-between;
}

.certified-profile-heading > span {
  padding: 5px 9px;
  color: #08724a;
  background: #e0f7eb;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.certified-identity {
  margin-top: 18px;
}

.certified-avatar,
.certified-avatar-fallback {
  width: 54px;
  height: 54px;
  border-radius: 50%;
}

.certified-avatar {
  object-fit: cover;
  background: #eef3f9;
}

.certified-avatar-fallback {
  display: grid;
  place-items: center;
  color: #118457;
  background: #e3f7ed;
  font-size: 22px;
  font-weight: 900;
}

.certified-identity strong {
  color: #203650;
  font-size: 20px;
}

.certified-identity > span {
  color: #607087;
}

.certified-meta {
  margin: 18px 0 0;
  border-top: 1px solid #e4ebf5;
}

.certified-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid #e4ebf5;
}

.certified-meta dt {
  color: #64738a;
}

.certified-meta dd {
  margin: 0;
  color: #243a56;
  font-weight: 700;
  text-align: right;
}

.review-summary {
  padding: 22px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.review-summary-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.review-summary-heading h2 {
  font-size: 20px;
}

.review-summary-heading span {
  color: var(--muted);
  font-size: 12px;
}

.review-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  margin: 0;
}

.review-detail-grid > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid #e4ebf5;
}

.review-detail-grid dt {
  color: #6a778b;
}

.review-detail-grid dd {
  margin: 0;
  color: #263b58;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.review-platform-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(11, 28, 54, 0.58);
  backdrop-filter: blur(6px);
}

.modal-card {
  width: min(760px, 100%);
  max-height: min(90vh, 980px);
  padding: clamp(22px, 4vw, 36px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  box-shadow: 0 30px 100px rgba(9, 27, 52, 0.35);
}

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

.modal-heading h2 {
  margin-top: 12px;
  font-size: 30px;
}

.modal-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: #536176;
  background: #eef3f9;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font: inherit;
  font-size: 24px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--ink);
  background: #e1e9f4;
}

.guide-steps {
  display: grid;
  gap: 14px;
  margin: 24px 0 20px;
  padding: 0;
  list-style: none;
}

.guide-steps > li {
  padding: 16px 18px;
  background: #f7faff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.guide-steps p {
  margin: 8px 0 0;
  color: #52627a;
  font-size: 14px;
  line-height: 1.65;
}

.guide-step-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.guide-step-title span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: var(--blue);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
}

.guide-step-title h3,
.guide-mode-note h3 {
  margin: 0;
  color: #263a58;
  font-size: 16px;
}

.avatar-fetch-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 12px;
}

.avatar-fetch-row input {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  font: inherit;
  outline: none;
}

.avatar-fetch-row input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.12);
}

.avatar-result {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.avatar-result img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  background: #eef3f9;
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(27, 61, 108, 0.14);
}

.avatar-result-info {
  display: grid;
  justify-items: start;
  gap: 7px;
}

.avatar-result-info strong {
  color: #253a58;
  font-size: 16px;
}

.avatar-save-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  text-decoration: none;
}

.guide-mode-note {
  padding: 16px 18px;
  background: #eef6ff;
  border-radius: 14px;
}

.guide-mode-note h3 {
  margin-bottom: 8px;
}

.guide-mode-note p {
  margin: 5px 0;
  color: #4e6079;
  font-size: 14px;
  line-height: 1.6;
}

.guide-confirm-button {
  width: 100%;
  margin-top: 20px;
}

.operation-backdrop {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(11, 28, 54, 0.62);
  backdrop-filter: blur(7px);
}

.operation-card {
  width: min(430px, 100%);
  padding: 34px 30px 28px;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  box-shadow: 0 30px 100px rgba(9, 27, 52, 0.38);
}

.operation-card h2 {
  font-size: 24px;
}

.operation-indicator {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  color: #fff;
  background: #16a36a;
  border-radius: 50%;
  font-size: 32px;
  font-weight: 800;
}

.operation-card[data-state="loading"] .operation-indicator {
  background: transparent;
  border: 5px solid #dceaff;
  border-top-color: var(--blue);
  animation: operation-spin 0.8s linear infinite;
}

.operation-card[data-state="error"] .operation-indicator {
  background: #d84a4a;
}

.operation-message {
  margin: 12px 0 0;
  color: #40516a;
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.operation-card[data-state="success"] .operation-message {
  color: #0b7a4b;
}

.operation-card[data-state="error"] .operation-message {
  color: #b52f2f;
}

.operation-note {
  margin: 10px 0 0;
  color: #7a8799;
  font-size: 12px;
}

.operation-close-button {
  width: 100%;
  margin-top: 20px;
}

@keyframes operation-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .shell { padding-top: 32px; }
  .panel { padding: 22px 18px; border-radius: 22px; }
  .panel-heading { display: block; }
  .panel-heading .button { margin-top: 14px; }
  .steps { grid-template-columns: 1fr; }
  .qr-frame { min-height: 268px; padding: 14px; }
  .modal-backdrop { padding: 12px; }
  .modal-card { padding: 20px 16px; border-radius: 20px; }
  .modal-heading { gap: 12px; }
  .modal-heading h2 { font-size: 25px; }
  .avatar-fetch-row { grid-template-columns: 1fr; }
  .avatar-result { grid-template-columns: 82px 1fr; gap: 13px; }
  .avatar-result img { width: 82px; height: 82px; }
  .operation-backdrop { padding: 14px; }
  .operation-card { padding: 28px 20px 22px; border-radius: 20px; }
  .review-hero { grid-template-columns: auto 1fr; padding: 17px; }
  .review-help-link { grid-column: 1 / -1; text-align: center; }
  .review-hero-icon { width: 52px; height: 52px; font-size: 28px; }
  .review-steps { grid-template-columns: repeat(2, 1fr); gap: 20px 0; }
  .review-steps li:nth-child(2)::after { display: none; }
  .review-detail-grid { grid-template-columns: 1fr; }
  .review-actions .button { width: 100%; }
}

