:root {
  color-scheme: light;
  --bg: #edf1f7;
  --ink: #182230;
  --muted: #667085;
  --line: #d7dde8;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --danger: #b42318;
  --success: #027a48;
  --shadow: 0 22px 55px rgba(24, 34, 48, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.12), rgba(245, 158, 11, 0.12)),
    var(--bg);
  font-family:
    Inter, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

.page-shell {
  display: grid;
  min-height: 100vh;
  padding: 32px 20px;
  place-items: center;
}

.redeem-panel {
  width: min(920px, 100%);
  padding: 28px;
  border: 1px solid rgba(215, 221, 232, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: #344054;
  font-size: 15px;
  font-weight: 700;
}

.brand-line img {
  display: block;
  flex: 0 0 auto;
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: end;
  margin-top: 48px;
}

.copy-block h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

.copy-block p {
  max-width: 430px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.redeem-form {
  display: grid;
  gap: 10px;
}

.redeem-form label {
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 10px;
}

.code-row input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  outline: none;
  text-transform: uppercase;
}

.code-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

.code-row button,
.result-head button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

.code-row button:hover,
.result-head button:hover {
  background: var(--accent-dark);
}

.code-row button:disabled {
  cursor: progress;
  opacity: 0.68;
}

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

.status[data-type="error"] {
  color: var(--danger);
}

.status[data-type="success"] {
  color: var(--success);
}

.result {
  margin-top: 26px;
  padding: 20px;
  border: 1px solid #b7e4d4;
  border-radius: 8px;
  background: #f2fbf7;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--success);
  font-size: 14px;
  font-weight: 800;
}

.result-head button {
  min-width: 82px;
  min-height: 38px;
  padding: 0 14px;
}

.result h2 {
  margin: 16px 0 8px;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.result pre {
  overflow-x: auto;
  margin: 0;
  padding: 16px;
  border-radius: 8px;
  color: #182230;
  background: #fff;
  white-space: pre-wrap;
  word-break: break-word;
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  line-height: 1.65;
}

.operation-guide {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #d7dde8;
  border-radius: 8px;
  background: #fff;
}

.operation-guide h3 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: 0;
}

.delivery-format {
  margin: 0 0 14px;
  color: #344054;
  font-size: 15px;
  line-height: 1.6;
}

.guide-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin-top: 12px;
}

.guide-step p {
  margin: 0;
  color: #182230;
  font-size: 15px;
  line-height: 1.75;
}

.step-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 15px;
  font-weight: 800;
}

.guide-step a {
  color: var(--accent-dark);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.guide-figure {
  margin: 16px 0 2px 42px;
}

.guide-figure img {
  display: block;
  width: 100%;
  max-width: 760px;
  height: auto;
  border: 1px solid #d7dde8;
  border-radius: 8px;
  background: #111827;
}

@media (max-width: 760px) {
  .page-shell {
    align-items: start;
    padding: 16px;
  }

  .redeem-panel {
    padding: 20px;
  }

  .panel-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 38px;
  }

  .code-row {
    grid-template-columns: 1fr;
  }

  .operation-guide {
    padding: 14px;
  }

  .guide-step {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .step-mark {
    width: 26px;
    height: 26px;
  }

  .guide-figure {
    margin-left: 0;
  }
}
