:root {
  color-scheme: light;
  --bg: #eef4ff;
  --panel: #ffffff;
  --text: #102033;
  --muted: #667085;
  --line: #d9e3f1;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #059669;
  --red: #dc2626;
  --amber: #d97706;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34rem),
    linear-gradient(180deg, #f7fbff 0%, var(--bg) 48%, #ffffff 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

.pageShell {
  width: min(760px, calc(100vw - 28px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 28px 0;
}

.redeemCard {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
  padding: 24px;
}

.brandHeader {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brandMark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #111827;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.brandHeader b {
  display: block;
  font-size: 21px;
  line-height: 1.15;
}

.brandHeader span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.heroBlock {
  margin: 22px 0 18px;
  padding: 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f3b68, #0f766e);
  color: #ffffff;
}

.heroBlock p {
  margin: 0 0 8px;
  color: #bfdbfe;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.heroBlock h1 {
  margin: 0;
  font-size: clamp(27px, 5vw, 40px);
  line-height: 1.15;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.heroBlock span {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

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

.steps li {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 13px;
  font-weight: 900;
  min-width: 0;
  text-align: center;
}

.steps li.active {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #1d4ed8;
}

.steps li.done {
  border-color: #a7f3d0;
  background: #d1fae5;
  color: #047857;
}

.redeemForm,
.statusPanel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 16px;
  min-width: 0;
}

.fieldBlock {
  display: block;
}

.fieldBlock span {
  display: block;
  margin-bottom: 8px;
  color: #344054;
  font-size: 14px;
  font-weight: 900;
}

input,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1.6;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-width: 0;
}

input {
  min-height: 50px;
  padding: 0 14px;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-weight: 800;
}

textarea {
  resize: vertical;
  min-height: 190px;
  padding: 12px;
  font-family: Consolas, "Microsoft YaHei", monospace;
}

input:focus,
textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22);
}

.noticeBox {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  line-height: 1.6;
  font-size: 14px;
  font-weight: 700;
}

.sessionPanel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.sessionHead {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
  min-width: 0;
}

.sessionHead b {
  display: block;
  font-size: 17px;
}

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

.sessionHead a {
  flex: 0 0 auto;
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 9px;
  background: #111827;
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

.primaryButton,
.ghostButton {
  width: 100%;
  min-height: 50px;
  margin-top: 12px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.primaryButton {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.24);
}

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

.primaryButton:disabled {
  cursor: not-allowed;
  background: #94a3b8;
  box-shadow: none;
}

.ghostButton {
  background: #eef2f7;
  color: #1f2937;
}

.statusPanel {
  margin-top: 14px;
}

.statusTitle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.statusTitle span {
  flex: 0 0 auto;
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.statusTitle span.ok {
  background: #d1fae5;
  color: var(--green);
}

.statusTitle span.warn {
  background: #fef3c7;
  color: var(--amber);
}

.statusTitle span.fail {
  background: #fee2e2;
  color: var(--red);
}

.statusTitle b {
  line-height: 1.55;
  text-align: right;
  overflow-wrap: anywhere;
}

.progressTrack {
  height: 9px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.progressTrack i {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #14b8a6);
  transition: width 0.25s ease;
}

.resultContent {
  min-height: 54px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
  color: #475467;
  line-height: 1.7;
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .pageShell {
    width: min(100vw - 18px, 760px);
    padding: 12px 0;
    align-items: start;
  }

  .redeemCard {
    padding: 14px;
    border-radius: 14px;
  }

  .heroBlock {
    padding: 18px;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .sessionHead,
  .statusTitle {
    display: block;
  }

  .sessionHead a {
    width: 100%;
    margin-top: 10px;
  }

  .statusTitle b {
    display: block;
    margin-top: 8px;
    text-align: left;
  }
}
