:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #171820;
  background: #f7f8fc;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --blue: #3949f5;
  --muted: #858ba0;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: #f7f8fc; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(30px, env(safe-area-inset-top)) 24px 40px;
}

.topbar { display: flex; min-height: 48px; align-items: center; justify-content: space-between; }
.back-link { display: inline-flex; align-items: center; gap: 7px; color: #62677b; font-size: 14px; font-weight: 600; }
.back-link span { color: var(--blue); font-size: 28px; line-height: 1; }
.brand { font-size: 18px; font-weight: 850; letter-spacing: -.7px; }
.brand span { color: var(--blue); }

.page-heading { margin: 35px 0 25px; }
.demo-badge { display: inline-flex; min-height: 25px; align-items: center; padding: 4px 10px; border-radius: 999px; color: #5137c9; background: #eeeaff; font-size: 11px; font-weight: 800; letter-spacing: .6px; }
.page-heading h1 { margin: 12px 0 0; font-size: 36px; line-height: 1.12; letter-spacing: -1.4px; }
.page-heading p { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

.reward-info { display: flex; align-items: center; gap: 16px; padding: 19px; border: 1px solid #eff0f5; border-radius: 20px; background: #fff; }
.reward-icon { display: grid; flex: 0 0 60px; width: 60px; height: 60px; place-items: center; border-radius: 17px; color: var(--blue); background: #f0f1ff; }
.reward-icon svg { width: 30px; fill: currentColor; }
.reward-kicker { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .55px; }
.reward-info h2 { margin: 4px 0 3px; font-size: 25px; letter-spacing: -.6px; }
.reward-info p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }

.redeem-form { display: grid; gap: 10px; margin-top: 24px; }
.redeem-form label { font-size: 16px; font-weight: 700; }
.redeem-form input { width: 100%; min-height: 60px; padding: 0 17px; border: 1px solid #dfe2eb; border-radius: 13px; outline: none; color: #171820; background: #fff; font-size: 22px; font-weight: 700; letter-spacing: 8px; text-align: center; }
.redeem-form input::placeholder { color: #c7cada; }
.redeem-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgb(57 73 245 / 12%); }
.input-hint, .field-error { margin: 0 2px; color: var(--muted); font-size: 12px; }
.field-error { color: #a2323c; }
.field-error[hidden], .result-message[hidden] { display: none; }
.verify-button { min-height: 52px; margin-top: 5px; border: 0; border-radius: 13px; color: #fff; background: linear-gradient(100deg, #3154f5, #4a39e8); font-size: 16px; font-weight: 700; cursor: pointer; }
.verify-button:focus-visible, .back-link:focus-visible, .brand:focus-visible { outline: 3px solid rgb(57 73 245 / 35%); outline-offset: 3px; }

.demo-panel { margin-top: 22px; padding: 15px 17px; border-left: 3px solid #6550e8; border-radius: 12px; background: #f0efff; }
.demo-panel strong { color: #4332ad; font-size: 13px; }
.demo-panel p { margin: 5px 0 0; color: #65627d; font-size: 12px; line-height: 1.5; }
.result-message { margin: 13px 2px 0; padding: 13px 15px; border-radius: 12px; color: #176b3c; background: #e6f7eb; font-size: 13px; line-height: 1.5; }
.result-message.is-failure { color: #9a3038; background: #fff0f0; }

@media (max-width: 370px) {
  .app-shell { padding-right: 18px; padding-left: 18px; }
}
@media (min-width: 520px) {
  .app-shell { min-height: calc(100vh - 18px); margin-top: 9px; border-radius: 28px; background: #fafbfe; }
}
