:root {
  --ink: #020a0f;
  --panel: rgba(3, 18, 26, 0.86);
  --line: rgba(129, 185, 202, 0.24);
  --line-strong: rgba(140, 216, 230, 0.48);
  --muted: #95a9b1;
  --text: #f4f8f8;
  --accent: #00f0a8;
  --accent-strong: #00ffb2;
  --danger: #ff7f6f;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--ink);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--text);
  background: var(--ink);
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

.exchange-page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  padding: max(22px, env(safe-area-inset-top)) clamp(24px, 5vw, 84px)
    max(24px, env(safe-area-inset-bottom));
  isolation: isolate;
}

.exchange-page::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #031018 url("/assets/code-exchange-hero-clean.png") center / cover no-repeat;
  content: "";
  transform: scale(1.01);
}

.exchange-page::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      rgba(2, 12, 18, 0.99) 0%,
      rgba(2, 13, 19, 0.97) 29%,
      rgba(2, 13, 19, 0.9) 43%,
      rgba(2, 13, 19, 0.58) 54%,
      rgba(2, 13, 19, 0.08) 74%
    ),
    linear-gradient(180deg, rgba(0, 8, 13, 0.18), rgba(0, 8, 13, 0.42));
  content: "";
}

.site-header {
  position: relative;
  z-index: 1;
  width: min(100%, 600px);
  height: 56px;
}

.brand-frame {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  overflow: visible;
}

.brand-symbol {
  position: relative;
  display: block;
  flex: 0 0 44px;
  width: 44px;
  height: 39px;
  overflow: hidden;
}

.merchant-logo {
  position: absolute;
  top: 0;
  left: 50%;
  width: 78px;
  max-width: none;
  height: auto;
  transform: translateX(-50%);
}

.brand-name {
  color: #f6f8f7;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.46);
  white-space: nowrap;
}

.redeem-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 560px);
  min-height: calc(100svh - 112px);
  padding: 32px 0 56px;
}

.hero-copy {
  margin-bottom: 30px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: #8aa7b0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 28px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(0, 240, 168, 0.6);
}

.title-lockup {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.title-lockup h1 {
  flex: 0 0 auto;
  margin: 0;
  color: #f3f5f2;
  font-family: "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: clamp(56px, 5.25vw, 88px);
  font-weight: 950;
  letter-spacing: -0.075em;
  line-height: 0.98;
  white-space: nowrap;
  text-shadow: 0 6px 28px rgba(0, 0, 0, 0.46);
}

.code-mark {
  flex: 0 0 auto;
  margin: 0 0 -7px -2px;
  color: var(--accent-strong);
  font-family: "Segoe Script", "Brush Script MT", cursive;
  font-size: clamp(30px, 3.2vw, 52px);
  font-style: italic;
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 1;
  text-shadow: 0 0 22px rgba(0, 255, 178, 0.24);
  transform: rotate(-7deg);
}

.intro {
  max-width: 520px;
  margin: 24px 0 0;
  color: #a8bac0;
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.035em;
}

.exchange-form {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(9, 35, 44, 0.5), transparent 42%),
    var(--panel);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.36);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.exchange-form::before {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.02);
  pointer-events: none;
  content: "";
}

.form-corner {
  position: absolute;
  width: 23px;
  height: 23px;
  border-color: var(--accent);
  pointer-events: none;
}

.form-corner--top {
  top: -1px;
  left: -1px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.form-corner--bottom {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group label {
  color: #d8e5e7;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.field-group label span {
  margin-left: 8px;
  color: #5e7b83;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.input-frame {
  position: relative;
}

.field-index {
  position: absolute;
  top: 50%;
  left: 16px;
  z-index: 1;
  color: #48636a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  transform: translateY(-50%);
}

.exchange-form input {
  display: block;
  width: 100%;
  height: 56px;
  padding: 0 18px 0 52px;
  border: 1px solid rgba(133, 183, 195, 0.3);
  border-radius: 0;
  outline: 0;
  color: #f2f8f8;
  background: rgba(0, 9, 14, 0.74);
  caret-color: var(--accent);
  font-size: 16px;
  letter-spacing: 0.03em;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.exchange-form input::placeholder {
  color: #60757b;
  opacity: 1;
}

.exchange-form input:hover {
  border-color: rgba(153, 215, 225, 0.48);
}

.exchange-form input:focus-visible {
  border-color: var(--accent);
  background: rgba(0, 16, 21, 0.92);
  box-shadow: 0 0 0 1px rgba(0, 240, 168, 0.22), 0 0 24px rgba(0, 240, 168, 0.08);
}

.exchange-form button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  margin-top: 2px;
  padding: 12px 24px;
  overflow: hidden;
  border: 1px solid #15ffc0;
  border-radius: 0;
  outline: 0;
  color: #001910;
  background: linear-gradient(100deg, #00d796, #17ffc1 54%, #00e3a1);
  box-shadow: 0 9px 30px rgba(0, 240, 168, 0.2);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: filter 160ms ease, transform 120ms ease, box-shadow 160ms ease;
}

.exchange-form button::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(112deg, transparent 25%, rgba(255, 255, 255, 0.3) 47%, transparent 69%);
  content: "";
  transform: translateX(-110%);
  transition: transform 420ms ease;
}

.exchange-form button:hover {
  filter: brightness(1.06);
  box-shadow: 0 12px 36px rgba(0, 240, 168, 0.3);
}

.exchange-form button:hover::before {
  transform: translateX(110%);
}

.exchange-form button:active {
  transform: translateY(1px);
}

.exchange-form button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.exchange-form button:disabled {
  cursor: wait;
  filter: saturate(0.65) brightness(0.78);
}

.button-arrow {
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.form-status {
  display: flex;
  align-items: flex-start;
  min-height: 20px;
  margin-top: -5px;
  color: #7f979e;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-line;
}

.status-dot {
  width: 6px;
  height: 6px;
  margin-top: 6px;
  margin-right: 9px;
  border-radius: 50%;
  background: #587078;
  box-shadow: 0 0 0 3px rgba(88, 112, 120, 0.12);
}

.form-status[data-kind="error"] {
  color: #ff9a8e;
}

.form-status[data-kind="error"] .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 127, 111, 0.14);
}

.form-status[data-kind="success"] {
  color: #86d9c1;
}

.form-status[data-kind="success"] .status-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 240, 168, 0.14);
}

.uid-query-panel {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 20px 24px;
  border: 1px solid rgba(133, 183, 195, 0.24);
  background:
    linear-gradient(135deg, rgba(0, 240, 168, 0.07), transparent 46%),
    rgba(3, 18, 26, 0.9);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
}

.uid-query-heading {
  display: grid;
  gap: 5px;
}

.uid-query-kicker {
  margin: 0;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.uid-query-heading h2 {
  margin: 0;
  color: #eef6f5;
  font-size: 20px;
  letter-spacing: 0.04em;
}

.uid-query-heading > p:last-child {
  margin: 0;
  color: #829aa1;
  font-size: 12px;
  line-height: 1.65;
}

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

.uid-query-form > label {
  color: #d8e5e7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.uid-query-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 142px;
  gap: 10px;
}

.uid-query-controls input,
.uid-query-controls button {
  width: 100%;
  min-height: 52px;
  border-radius: 0;
  outline: 0;
  font-size: 16px;
}

.uid-query-controls input {
  min-width: 0;
  padding: 0 16px;
  border: 1px solid rgba(133, 183, 195, 0.3);
  color: #f2f8f8;
  background: rgba(0, 9, 14, 0.74);
  caret-color: var(--accent);
}

.uid-query-controls input::placeholder {
  color: #60757b;
  opacity: 1;
}

.uid-query-controls input:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 240, 168, 0.22), 0 0 24px rgba(0, 240, 168, 0.08);
}

.uid-query-controls button {
  border: 1px solid var(--accent);
  color: #001910;
  background: linear-gradient(100deg, #00d796, #17ffc1 54%, #00e3a1);
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.uid-query-controls button:hover {
  filter: brightness(1.06);
}

.uid-query-controls button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.uid-query-controls button:disabled {
  cursor: wait;
  filter: saturate(0.65) brightness(0.78);
}

.uid-query-status {
  min-height: 19px;
  margin: 0;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 16px 0 0;
  color: #688087;
  font-size: 11px;
  line-height: 1.5;
}

.shield {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border: 1px solid #4f6d74;
  color: #80a3a8;
  font-size: 9px;
  line-height: 1;
  clip-path: polygon(50% 0, 94% 18%, 86% 74%, 50% 100%, 14% 74%, 6% 18%);
}

.acceleration-panel[hidden] {
  display: none;
}

.acceleration-panel {
  position: relative;
  display: grid;
  container-type: inline-size;
  width: 100%;
  gap: 18px;
  margin-top: 32px;
  padding: 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(0, 240, 168, 0.075), transparent 30%),
    rgba(3, 16, 23, 0.97);
  box-shadow: 0 30px 86px rgba(0, 0, 0, 0.4);
  scroll-margin-top: 24px;
}

@media (min-width: 721px) {
  .acceleration-panel {
    align-self: flex-start;
    width: min(820px, calc(100vw - 48px));
  }
}

.acceleration-panel::before,
.acceleration-panel::after {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--accent);
  pointer-events: none;
  content: "";
}

.acceleration-panel::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.acceleration-panel::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.acceleration-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid rgba(123, 182, 194, 0.2);
  background:
    linear-gradient(110deg, rgba(0, 240, 168, 0.08), transparent 48%),
    rgba(0, 9, 14, 0.58);
}

.acceleration-heading {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.acceleration-kicker {
  margin: 0 0 7px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.acceleration-summary h2 {
  margin: 0;
  color: #f4f8f8;
  font-size: clamp(22px, 3.2cqw, 28px);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.acceleration-summary h2:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 5px;
}

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

.acceleration-description {
  max-width: 330px;
  margin: 10px 0 0;
  color: #829ba1;
  font-size: 12px;
  line-height: 1.65;
}

.summary-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 96px;
  padding: 13px 14px;
  border: 1px solid rgba(123, 182, 194, 0.19);
  background: rgba(0, 10, 15, 0.62);
}

.summary-metric > span {
  color: #759097;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.summary-metric p {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 4px 0 0;
}

.summary-metric strong {
  color: var(--accent-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 40px;
  line-height: 1;
  text-shadow: 0 0 20px rgba(0, 255, 178, 0.22);
}

.summary-metric p span {
  color: #d7e4e6;
  font-size: 13px;
  font-weight: 700;
}

.reward-total {
  border-color: rgba(0, 240, 168, 0.34);
  background: linear-gradient(135deg, rgba(0, 240, 168, 0.105), rgba(0, 10, 15, 0.68));
}

.reward-total strong {
  font-size: 27px;
}

.reward-total p span {
  font-size: 11px;
}

.reward-bonus-line {
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid rgba(255, 207, 103, 0.66);
  color: #ffe9ae;
  background: linear-gradient(100deg, rgba(255, 177, 61, 0.16), rgba(0, 240, 168, 0.12));
  box-shadow: 0 0 18px rgba(255, 199, 82, 0.12);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.35;
}

.reward-bonus-line[hidden],
.task-card[hidden],
.task-unlock-alert[hidden] {
  display: none;
}

.task-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.task-grid--single .task-card:not([hidden]) {
  grid-column: 1 / -1;
}

@container (min-width: 680px) {
  .task-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-grid--single .task-bonus-card {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .task-grid--single .task-bonus-card__copy {
    grid-column: auto;
  }
}

.task-list-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 2px 11px;
  border-bottom: 1px solid rgba(126, 180, 193, 0.18);
}

.task-list-heading p {
  margin: 0 0 4px;
  color: #6d9299;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.task-list-heading h3 {
  margin: 0;
  color: #edf6f5;
  font-size: 18px;
  font-weight: 850;
}

.task-list-heading > span {
  color: #6f888e;
  font-size: 11px;
  white-space: nowrap;
}

.task-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 290px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(133, 183, 195, 0.25);
  background:
    linear-gradient(145deg, rgba(8, 30, 36, 0.68), rgba(0, 8, 13, 0.88)),
    rgba(0, 9, 14, 0.82);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.02);
  transition: border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.task-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 58px;
  background: linear-gradient(180deg, var(--accent), rgba(0, 240, 168, 0));
  content: "";
}

.task-card:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.task-card--unlock-reveal {
  animation: task-unlock-reveal 850ms cubic-bezier(0.18, 0.82, 0.2, 1) both;
}

@keyframes task-unlock-reveal {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
    border-color: rgba(0, 240, 168, 0.18);
    box-shadow: 0 0 0 rgba(0, 240, 168, 0);
  }
  58% {
    opacity: 1;
    transform: translateY(-4px) scale(1.008);
    border-color: rgba(63, 255, 201, 0.92);
    box-shadow: 0 0 42px rgba(0, 240, 168, 0.28);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    border-color: rgba(0, 240, 168, 0.56);
    box-shadow: 0 0 24px rgba(0, 240, 168, 0.14);
  }
}

.task-card[data-completed="true"] {
  border-color: rgba(0, 240, 168, 0.48);
  background:
    linear-gradient(145deg, rgba(0, 70, 53, 0.34), rgba(0, 15, 17, 0.88)),
    rgba(0, 34, 28, 0.54);
}

.task-card[aria-busy="true"] {
  border-color: rgba(0, 240, 168, 0.4);
}

.task-card__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.task-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(0, 240, 168, 0.25);
  color: #6cd8bb;
  background: rgba(0, 240, 168, 0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.task-card__title {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.task-card__title > span {
  color: #5f7e85;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.task-card h3 {
  margin: 0;
  color: #edf5f5;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
}

.task-benefit {
  width: fit-content;
  max-width: 100%;
  margin: 15px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(0, 240, 168, 0.18);
  color: #8ea8ae;
  font-size: 11px;
  line-height: 1.55;
  background: rgba(0, 240, 168, 0.045);
}

.task-benefit strong {
  margin-left: 4px;
  color: var(--accent);
  font-size: 13px;
}

.task-bonus-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin: 14px 0 0;
  padding: 12px 13px 12px 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 205, 105, 0.25);
  border-left: 3px solid rgba(255, 205, 105, 0.78);
  background:
    linear-gradient(115deg, rgba(255, 190, 64, 0.1), rgba(5, 24, 30, 0.18) 58%),
    rgba(4, 17, 21, 0.9);
  box-shadow: inset 0 0 22px rgba(255, 194, 73, 0.025);
}

.task-bonus-card::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 68px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 205, 105, 0.72));
  content: "";
}

.task-bonus-card__copy {
  display: grid;
  grid-column: 1 / -1;
  min-width: 0;
  gap: 3px;
}

.task-bonus-card__eyebrow {
  color: #d9b86d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.task-bonus-card__copy strong {
  color: #f2f8f7;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.4;
}

.task-bonus-card__copy > span:last-child {
  color: #9eaaa8;
  font-size: 11px;
  line-height: 1.45;
}

.task-bonus-card__reward {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 205, 105, 0.48);
  color: #ffe4a3;
  background: rgba(255, 190, 64, 0.1);
  font-size: 13px;
  font-weight: 800;
  justify-self: start;
  white-space: nowrap;
}

.task-bonus-card__reward b {
  font-size: 16px;
  font-weight: 950;
}

.task-bonus-card__status {
  min-width: 54px;
  padding: 6px 8px;
  border: 1px solid rgba(143, 169, 169, 0.28);
  color: #9bb0b1;
  background: rgba(98, 124, 128, 0.08);
  font-size: 10px;
  font-weight: 800;
  justify-self: end;
  letter-spacing: 0.08em;
  text-align: center;
  white-space: nowrap;
}

.task-bonus-card[data-earned="true"] {
  border-color: rgba(0, 255, 178, 0.54);
  border-left-color: #00f0a8;
  background:
    linear-gradient(115deg, rgba(0, 240, 168, 0.17), rgba(5, 24, 30, 0.2) 58%),
    rgba(4, 23, 25, 0.92);
  box-shadow: 0 0 26px rgba(0, 240, 168, 0.11);
}

.task-bonus-card[data-earned="true"] .task-bonus-card__copy strong,
.task-bonus-card[data-earned="true"] .task-bonus-card__copy > span:last-child {
  color: #b8ffe8;
}

.task-bonus-card[data-earned="true"] .task-bonus-card__status {
  border-color: rgba(0, 240, 168, 0.58);
  color: #8dffdc;
  background: rgba(0, 240, 168, 0.12);
}

.task-bonus-card[data-earned="true"]::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 25%, rgba(157, 255, 226, 0.12) 48%, transparent 70%);
  content: "";
  pointer-events: none;
  animation: bonus-reward-earned 650ms ease-out both;
}

@keyframes bonus-reward-earned {
  from {
    opacity: 0;
    transform: translateX(-45%);
  }

  45% {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: translateX(45%);
  }
}

.task-unlock-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  margin: -2px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(0, 255, 178, 0.62);
  background:
    linear-gradient(100deg, rgba(0, 240, 168, 0.18), rgba(0, 93, 76, 0.08)),
    rgba(0, 23, 25, 0.78);
  box-shadow: 0 0 24px rgba(0, 240, 168, 0.12);
}

.task-unlock-alert__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #03150f;
  background: #60ffd1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.task-unlock-alert__copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.task-unlock-alert__copy strong {
  color: #7effd5;
  font-size: 16px;
  font-weight: 900;
}

.task-unlock-alert__copy > span {
  color: #add5c9;
  font-size: 12px;
  line-height: 1.45;
}

.task-status {
  min-height: 38px;
  margin: 14px 0 16px;
  padding: 9px 11px;
  border-left: 2px solid rgba(126, 171, 182, 0.35);
  color: #8fa4aa;
  font-size: 11px;
  line-height: 1.55;
  background: rgba(5, 24, 30, 0.62);
}

.task-status[data-kind="completed"] {
  border-left-color: rgba(0, 240, 168, 0.75);
  color: #76e0c0;
  background: rgba(0, 240, 168, 0.07);
}

.task-status[data-kind="uploading"] {
  border-left-color: rgba(215, 239, 241, 0.52);
  color: #d6e7e8;
}

.task-status[data-kind="error"] {
  border-left-color: rgba(255, 127, 111, 0.76);
  color: #ff9a8e;
  background: rgba(255, 127, 111, 0.07);
}

.task-actions {
  display: grid;
  grid-template-columns: 0.9fr 1.35fr;
  gap: 9px;
  margin-top: auto;
}

.task-tutorial,
.task-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 9px 10px;
  border-radius: 0;
  outline: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  cursor: pointer;
}

.task-tutorial {
  border: 1px solid rgba(134, 194, 207, 0.4);
  color: #bdd0d4;
  background: rgba(4, 24, 31, 0.78);
}

.task-upload {
  border: 1px solid #15ffc0;
  color: #001910;
  background: linear-gradient(100deg, #00d796, #17ffc1 54%, #00e3a1);
}

.task-tutorial:hover,
.task-upload:hover {
  filter: brightness(1.08);
}

.task-tutorial:focus-visible,
.task-upload:focus-within,
.task-upload-input:focus-visible + .task-upload {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.task-upload[data-disabled="true"] {
  border-color: rgba(130, 166, 174, 0.24);
  color: #71868b;
  background: rgba(24, 42, 47, 0.72);
  cursor: not-allowed;
  filter: none;
}

.task-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.task-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -2px 0 0;
  padding-top: 2px;
  color: #718990;
  font-size: 11px;
  line-height: 1.6;
}

.result-dialog {
  width: min(calc(100% - 32px), 480px);
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(81, 229, 195, 0.5);
  border-radius: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.78), 0 0 42px rgba(0, 240, 168, 0.1);
}

.result-dialog::backdrop {
  background: rgba(0, 7, 11, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.result-dialog[open] {
  animation: dialog-enter 180ms ease-out;
}

.dialog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 34px);
  padding: 34px 32px 30px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(0, 240, 168, 0.1), transparent 42%),
    #06151c;
}

.dialog-card::before,
.dialog-card::after {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--accent);
  pointer-events: none;
  content: "";
}

.dialog-card::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.dialog-card::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.dialog-card[data-kind="error"] {
  background:
    linear-gradient(135deg, rgba(255, 127, 111, 0.09), transparent 42%),
    #06151c;
}

.dialog-card[data-kind="error"]::before,
.dialog-card[data-kind="error"]::after {
  border-color: var(--danger);
}

.dialog-card[data-kind="warning"] {
  background:
    linear-gradient(135deg, rgba(255, 185, 75, 0.1), transparent 42%),
    #06151c;
}

.dialog-card[data-kind="warning"]::before,
.dialog-card[data-kind="warning"]::after {
  border-color: #ffbd56;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  outline: 0;
  color: #8ca2a9;
  background: transparent;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.dialog-close:hover {
  color: #fff;
}

.dialog-kicker {
  margin: 0 42px 9px 0;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.dialog-card[data-kind="error"] .dialog-kicker {
  color: var(--danger);
}

.dialog-card[data-kind="warning"] .dialog-kicker {
  color: #ffcb78;
}

.dialog-card h2 {
  margin: 0;
  color: #f4f8f8;
  font-size: clamp(25px, 7vw, 34px);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.dialog-reward-presentation {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
  margin: 18px 0 4px;
  padding: 10px 16px 10px 10px;
  border: 1px solid rgba(84, 226, 195, 0.24);
  background:
    linear-gradient(105deg, rgba(0, 240, 168, 0.1), rgba(5, 21, 28, 0.18) 60%),
    rgba(1, 11, 16, 0.54);
  box-shadow: inset 0 0 24px rgba(0, 240, 168, 0.035);
}

.dialog-reward-presentation[hidden] {
  display: none;
}

.dialog-reward-icon {
  display: block;
  width: 86px;
  height: 86px;
  object-fit: cover;
  border: 1px solid rgba(199, 223, 221, 0.22);
  background: #202223;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.38),
    0 0 18px rgba(0, 240, 168, 0.08);
}

.dialog-reward {
  min-width: 0;
  margin: 0;
  color: var(--accent-strong);
  font-family: "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: clamp(31px, 9vw, 46px);
  font-weight: 950;
  letter-spacing: -0.035em;
  line-height: 1.12;
  text-shadow: 0 0 24px rgba(0, 255, 178, 0.25);
}

.dialog-message {
  max-height: min(42dvh, 350px);
  margin: 20px 0 0;
  padding-right: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #b3c4c9;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-line;
  overflow-wrap: anywhere;
  scrollbar-color: rgba(0, 240, 168, 0.42) rgba(5, 25, 32, 0.5);
  scrollbar-width: thin;
}

.dialog-card[data-kind="success"] .dialog-message {
  margin-top: 14px;
}

.dialog-card[data-kind="library"] .dialog-message {
  padding: 14px 16px;
  border: 1px solid rgba(129, 185, 202, 0.24);
  color: #d9e8e9;
  background: rgba(0, 8, 12, 0.58);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.9;
  user-select: text;
}

.tutorial-dialog {
  width: min(calc(100% - 32px), 720px);
}

.tutorial-dialog .dialog-card {
  height: min(900px, calc(100dvh - 34px));
  padding-bottom: 20px;
}

.tutorial-dialog h2 {
  margin-right: 50px;
  font-size: clamp(23px, 5vw, 32px);
}

.tutorial-dialog .dialog-close {
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
}

.tutorial-content {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 18px;
  padding-right: 7px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y pinch-zoom;
  scrollbar-color: rgba(0, 240, 168, 0.42) rgba(5, 25, 32, 0.5);
  scrollbar-width: thin;
}

.tutorial-intro {
  margin: 0 0 16px;
  color: #c6d6d9;
  font-size: 14px;
  line-height: 1.7;
}

[data-tutorial-content][hidden] {
  display: none;
}

.tutorial-steps {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tutorial-step {
  padding: 14px;
  border: 1px solid rgba(129, 185, 202, 0.22);
  background:
    linear-gradient(135deg, rgba(0, 240, 168, 0.07), transparent 42%),
    rgba(1, 12, 17, 0.74);
}

.tutorial-step-heading {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.tutorial-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(21, 255, 192, 0.62);
  color: var(--accent-strong);
  background: rgba(0, 240, 168, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.tutorial-step h3 {
  margin: 0;
  color: #eff8f7;
  font-size: 17px;
  line-height: 1.4;
}

.tutorial-step-heading p {
  margin: 5px 0 0;
  color: #9fb4b9;
  font-size: 13px;
  line-height: 1.7;
}

.tutorial-step figure {
  margin: 14px 0 0;
}

.tutorial-step img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(179, 215, 220, 0.16);
  background: #fff;
}

.tutorial-step figcaption {
  margin-top: 7px;
  color: #718a91;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.tutorial-privacy {
  margin: 16px 2px 0;
  color: #6f888e;
  font-size: 11px;
  line-height: 1.7;
}

.tutorial-dialog .dialog-confirm {
  flex: 0 0 auto;
  margin-top: 16px;
}

.dialog-confirm {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  margin-top: 26px;
  padding: 10px 20px;
  border: 1px solid #15ffc0;
  border-radius: 0;
  outline: 0;
  color: #001910;
  background: linear-gradient(100deg, #00d796, #17ffc1 54%, #00e3a1);
  box-shadow: 0 9px 26px rgba(0, 240, 168, 0.16);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.dialog-close:focus-visible,
.dialog-confirm:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .uid-query-controls {
    grid-template-columns: 1fr;
  }
}

@keyframes dialog-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 980px) {
  .exchange-page::after {
    background:
      linear-gradient(90deg, rgba(2, 12, 18, 0.99) 0%, rgba(2, 12, 18, 0.92) 55%, rgba(2, 12, 18, 0.3) 100%),
      linear-gradient(180deg, rgba(0, 8, 13, 0.1), rgba(0, 8, 13, 0.45));
  }
}

@media (max-width: 720px) {
  .task-benefit,
  .task-status {
    font-size: 13px;
  }

  .task-note {
    font-size: 12px;
  }

  .exchange-page {
    min-height: 100svh;
    padding: max(18px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
    overflow: clip;
  }

  .exchange-page::before {
    background-position: 100% top;
    background-size: auto clamp(315px, 44svh, 410px);
    transform: none;
  }

  .exchange-page::after {
    background:
      linear-gradient(180deg, rgba(1, 10, 15, 0.2) 0, rgba(1, 10, 15, 0.14) 18svh, #020b10 42svh, #020b10 100%),
      linear-gradient(90deg, rgba(2, 12, 18, 0.96) 0%, rgba(2, 12, 18, 0.58) 28%, rgba(2, 12, 18, 0.04) 68%);
  }

  .site-header {
    width: 100%;
    height: 42px;
  }

  .brand-frame {
    gap: 8px;
    height: 40px;
  }

  .brand-symbol {
    flex-basis: 38px;
    width: 38px;
    height: 34px;
  }

  .merchant-logo {
    width: 68px;
  }

  .brand-name {
    font-size: 15px;
  }

  .redeem-shell {
    justify-content: flex-start;
    width: 100%;
    min-height: auto;
    padding: clamp(220px, 34svh, 306px) 0 20px;
  }

  .hero-copy {
    margin-bottom: 22px;
  }

  .eyebrow {
    margin-bottom: 10px;
    font-size: 9px;
  }

  .title-lockup {
    gap: 10px;
  }

  .title-lockup h1 {
    font-size: clamp(42px, 12vw, 54px);
  }

  .code-mark {
    margin-bottom: -3px;
    font-size: clamp(27px, 8vw, 36px);
  }

  .intro {
    margin-top: 17px;
    font-size: 13px;
    line-height: 1.75;
  }

  .desktop-break {
    display: none;
  }

  .exchange-form {
    gap: 16px;
    padding: 20px 16px 18px;
    background: rgba(3, 17, 24, 0.94);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .exchange-form input,
  .exchange-form button {
    min-height: 54px;
    font-size: 16px;
  }

  .exchange-form input {
    height: 54px;
  }

  .privacy-note {
    margin-top: 13px;
  }

  .uid-query-panel {
    gap: 14px;
    margin-top: 16px;
    padding: 18px 16px;
  }

  .uid-query-controls input,
  .uid-query-controls button {
    min-height: 54px;
  }

  .acceleration-panel {
    gap: 19px;
    margin-top: 26px;
    padding: 20px 16px;
  }

  .acceleration-summary {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .acceleration-summary h2 {
    font-size: 21px;
  }

  .acceleration-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-metric {
    min-width: 0;
    padding: 10px 12px;
  }

  .summary-metric strong {
    font-size: 34px;
  }

  .reward-total strong {
    font-size: 26px;
  }

  .task-bonus-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 14px 13px 14px 15px;
  }

  .task-bonus-card__copy {
    grid-column: 1 / -1;
  }

  .task-bonus-card__copy strong {
    font-size: 16px;
  }

  .task-bonus-card__reward {
    justify-self: start;
  }

  .task-bonus-card__status {
    justify-self: end;
  }

  .task-grid {
    grid-template-columns: 1fr;
  }

  .result-dialog {
    width: min(calc(100% - 24px), 480px);
    max-height: calc(100dvh - 24px);
  }

  .dialog-card {
    max-height: calc(100dvh - 26px);
    padding: 30px 22px 24px;
  }

  .dialog-reward-presentation {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 11px;
    margin-top: 15px;
    padding: 8px 10px 8px 8px;
  }

  .dialog-reward-icon {
    width: 64px;
    height: 64px;
  }

  .dialog-reward {
    font-size: clamp(25px, 8vw, 36px);
  }

  .dialog-message {
    max-height: min(45dvh, 330px);
    font-size: 14px;
  }

  .tutorial-dialog {
    width: min(calc(100% - 16px), 720px);
    max-height: calc(100dvh - 16px);
  }

  .tutorial-dialog .dialog-card {
    height: calc(100dvh - 18px);
    max-height: calc(100dvh - 18px);
    padding: 26px 14px 14px;
  }

  .tutorial-content {
    margin-top: 14px;
    padding-right: 4px;
  }

  .tutorial-intro {
    font-size: 13px;
  }

  .tutorial-steps {
    gap: 14px;
  }

  .tutorial-step {
    padding: 10px;
  }

  .tutorial-step-heading {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
  }

  .tutorial-step-number {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  .tutorial-step h3 {
    font-size: 15px;
  }

  .tutorial-step-heading p {
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  .redeem-shell {
    padding-top: clamp(205px, 31svh, 258px);
  }

  .title-lockup h1 {
    font-size: 40px;
  }

  .code-mark {
    font-size: 27px;
  }

  .intro {
    font-size: 12px;
  }

  .acceleration-summary {
    grid-template-columns: 1fr;
  }

  .acceleration-metrics {
    grid-template-columns: 1fr;
  }

  .summary-metric {
    width: 100%;
  }

  .task-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .exchange-form button,
  .exchange-form button::before,
  .exchange-form input {
    transition: none;
  }

  .result-dialog[open] {
    animation: none;
  }

  .task-card--unlock-reveal {
    animation: none;
  }

  .task-bonus-card[data-earned="true"]::after {
    animation: none;
  }
}
