:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #1d2733;
  --muted: #667085;
  --line: #d9e0ea;
  --accent: #1f6feb;
  --accent-strong: #1756c2;
  --ok: #137333;
  --warn: #9a6700;
  --bad: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(31, 111, 235, 0.08), rgba(31, 111, 235, 0) 36%),
    var(--bg);
}

.page-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 32px 16px;
}

.redeem-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 16px 40px rgba(26, 39, 61, 0.08);
}

.brand-row {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: #1f6feb;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}

.eyebrow,
.section-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

h1,
h2 {
  margin: 0;
  line-height: 1.25;
}

h1 {
  font-size: clamp(28px, 5vw, 38px);
}

h2 {
  font-size: 24px;
}

.notice {
  margin: 18px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.5;
}

.notice-info {
  background: #eef4ff;
  border-color: #c7d7fe;
  color: #233b6e;
}

.notice-success {
  background: #ecfdf3;
  border-color: #abefc6;
  color: var(--ok);
}

.notice-warning {
  background: #fffaeb;
  border-color: #fedf89;
  color: var(--warn);
}

.notice-error {
  background: #fef3f2;
  border-color: #fecdca;
  color: var(--bad);
}

.code-form {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

label {
  color: var(--ink);
  font-weight: 700;
}

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

input,
button {
  min-height: 44px;
  border-radius: 8px;
  font: inherit;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  padding: 0 12px;
  color: var(--ink);
  text-transform: uppercase;
}

button {
  border: 0;
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

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

.prize-card {
  display: grid;
  gap: 18px;
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.muted {
  color: var(--muted);
  line-height: 1.6;
}

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

.status-grid > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.status-grid strong {
  font-size: 22px;
}

.download-button {
  width: 100%;
}

.link-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.download-result {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #abefc6;
  border-radius: 8px;
  background: #f6fef9;
}

.download-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--ok);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

@media (max-width: 560px) {
  .page-shell {
    padding: 18px 12px;
  }

  .redeem-panel {
    padding: 20px;
  }

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

