:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f9fbff;
  --text: #111827;
  --muted: #667085;
  --line: #d9e2ef;
  --line-strong: #bdd2ee;
  --blue: #2563eb;
  --blue-soft: #eef5ff;
  --danger: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

h1,
p {
  margin: 0;
}

.redeem-shell {
  width: min(calc(100% - 32px), 860px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.redeem-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

h1 {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0 10px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.help-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-left: auto;
  padding: 0 14px;
  border: 1px solid #1d4ed8;
  border-radius: 8px;
  background: var(--blue);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.help-link::before {
  content: "?";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-right: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 12px;
  line-height: 1;
}

.help-link:hover,
.help-link:focus-visible {
  background: #1d4ed8;
  color: #ffffff;
}

.redeem-card {
  position: relative;
  z-index: 1;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  padding: 16px 20px;
}

.redeem-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  align-items: end;
  gap: 12px;
}

.redeem-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.redeem-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  outline: none;
}

.redeem-form input::placeholder {
  color: #98a2b3;
}

.redeem-form input:focus-visible,
.redeem-form button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}

.redeem-form button {
  min-height: 48px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--blue);
  color: #ffffff;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.redeem-form button:not(:disabled):hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.redeem-form button:not(:disabled):active {
  transform: scale(0.98);
}

.redeem-form button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.redeem-message {
  min-height: 18px;
  margin-top: 8px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.redeem-message:empty {
  display: none;
}

@media (max-width: 760px) {
  .redeem-shell {
    width: min(100% - 24px, 720px);
    min-height: auto;
    padding: 16px 0;
    justify-content: flex-start;
  }

  .redeem-header,
  .title-wrap {
    align-items: stretch;
    flex-direction: column;
  }

  .help-link {
    width: 100%;
    margin-left: 0;
  }

  h1 {
    font-size: 20px;
  }

  .redeem-card {
    padding: 14px 16px;
  }

  .redeem-form {
    grid-template-columns: 1fr;
  }

  .redeem-form input {
    min-height: 52px;
    font-size: 18px;
  }

  .redeem-form button {
    width: 100%;
    min-height: 44px;
  }
}
