/* Metro-Link website and experience styles */
:root {
  --page: #f5f6f1;
  --ink: #121821;
  --muted: #637083;
  --line: #d9ded6;
  --panel: #ffffff;
  --panel-2: #f0f4ef;
  --dark: #151d27;
  --accent: #d94b32;
  --accent-soft: #ffe5dc;
  --accent-strong: #aa2f1e;
  --focus: #1f8a70;
  --blue: #2f73f5;
}

/* Merchant operations console */
body[data-page-mode="merchant"] {
  --merchant-ink: #17231f;
  --merchant-muted: #66736e;
  --merchant-line: rgba(23, 35, 31, 0.12);
  margin: 0;
  min-height: 100vh;
  color: var(--merchant-ink);
  background:
    radial-gradient(circle at 84% 6%, rgba(236, 178, 51, 0.15), transparent 24%),
    #eef1eb;
  font-family: "Noto Sans TC", sans-serif;
}

body[data-page-mode="merchant"] * {
  box-sizing: border-box;
}

.merchant-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.merchant-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 30px 22px;
  color: white;
  background:
    radial-gradient(circle at 15% 10%, rgba(228, 73, 79, 0.18), transparent 28%),
    linear-gradient(175deg, #213a33, #101d1a 72%);
}

.merchant-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
}

.merchant-brand > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  color: #17231f;
  background: #ffd26f;
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  font-weight: 700;
  transform: rotate(-5deg);
}

.merchant-brand small,
.merchant-brand strong {
  display: block;
}

.merchant-brand small {
  color: rgba(255, 255, 255, 0.46);
  font-family: "Azeret Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.merchant-brand strong {
  margin-top: 3px;
  font-size: 16px;
}

.merchant-sidebar nav {
  display: grid;
  gap: 8px;
  margin-top: 54px;
}

.merchant-sidebar nav a {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 13px;
  padding: 0 14px;
  border-radius: 15px;
  color: rgba(255, 255, 255, 0.63);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.merchant-sidebar nav a span {
  font-family: "Azeret Mono", monospace;
  font-size: 8px;
}

.merchant-sidebar nav a.active,
.merchant-sidebar nav a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.merchant-sidebar-foot {
  display: grid;
  gap: 14px;
  margin-top: auto;
}

.merchant-sidebar-foot a {
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  text-decoration: none;
}

.merchant-live-dot {
  color: #b8eecb;
  font-size: 9px;
}

.merchant-live-dot::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #71d99a;
  box-shadow: 0 0 0 5px rgba(113, 217, 154, 0.12);
}

.merchant-main {
  width: min(1520px, 100%);
  padding: 34px clamp(24px, 3.2vw, 60px) 54px;
}

.merchant-topbar,
.merchant-top-actions,
.merchant-dashboard-grid > article > header,
.merchant-transactions > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.merchant-eyebrow {
  color: #a9283b;
  font-family: "Azeret Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.merchant-topbar h1 {
  margin: 7px 0 3px;
  font-size: clamp(32px, 3.5vw, 54px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.merchant-topbar p {
  margin: 0;
  color: var(--merchant-muted);
  font-size: 11px;
}

.merchant-top-actions span,
.merchant-top-actions a {
  padding: 10px 12px;
  border: 1px solid var(--merchant-line);
  border-radius: 999px;
  color: var(--merchant-muted);
  background: rgba(255, 255, 255, 0.52);
  font-family: "Azeret Mono", monospace;
  font-size: 8px;
  font-weight: 700;
  text-decoration: none;
}

.merchant-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 14px;
}

.merchant-kpis article {
  min-height: 142px;
  padding: 19px;
  border: 1px solid var(--merchant-line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 15px 35px rgba(32, 49, 43, 0.05);
}

.merchant-kpis article.accent {
  color: white;
  background: linear-gradient(145deg, #c83240, #86182d);
}

.merchant-kpis span,
.merchant-kpis small,
.merchant-kpis strong {
  display: block;
}

.merchant-kpis span {
  color: var(--merchant-muted);
  font-size: 10px;
}

.merchant-kpis strong {
  margin: 15px 0 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 34px;
}

.merchant-kpis small {
  color: var(--merchant-muted);
  font-size: 9px;
}

.merchant-kpis .accent span,
.merchant-kpis .accent small {
  color: rgba(255, 255, 255, 0.68);
}

.merchant-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 14px;
}

.merchant-scan-panel,
.merchant-campaign-panel,
.merchant-transactions {
  padding: 22px;
  border: 1px solid var(--merchant-line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 45px rgba(32, 49, 43, 0.06);
}

.merchant-dashboard-grid h2,
.merchant-transactions h2 {
  margin: 5px 0 0;
  font-size: 21px;
}

.merchant-status {
  padding: 7px 10px;
  border-radius: 999px;
  color: #5b6661;
  background: #e9ece8;
  font-size: 9px;
  font-weight: 800;
}

.merchant-status.waiting {
  color: #962236;
  background: #ffe5e2;
  animation: merchant-pulse 1.8s ease-in-out infinite;
}

.merchant-redemption-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 20px 0 14px;
  padding: 17px;
  border-radius: 22px;
  color: white;
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 210, 111, 0.25), transparent 25%),
    linear-gradient(145deg, #213a33, #101d1a);
}

.merchant-qr-mini {
  width: 76px;
  aspect-ratio: 1;
  border: 8px solid white;
  border-radius: 12px;
  background:
    linear-gradient(90deg, #17231f 10px, transparent 10px) 0 0 / 20px 20px,
    linear-gradient(#17231f 10px, transparent 10px) 0 0 / 20px 20px,
    white;
}

.merchant-redemption-card span,
.merchant-redemption-card strong,
.merchant-redemption-card p {
  display: block;
}

.merchant-redemption-card span {
  color: #ffd26f;
  font-family: "Azeret Mono", monospace;
  font-size: 8px;
}

.merchant-redemption-card strong {
  margin-top: 5px;
  font-size: 16px;
}

.merchant-redemption-card p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 9px;
}

.merchant-redemption-card > b {
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  white-space: nowrap;
}

.merchant-result-card {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid rgba(24, 132, 95, 0.18);
  border-radius: 20px;
  background: #f1f7f1;
}

.merchant-result-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.merchant-result-card h3 {
  margin: 4px 0 0;
  font-size: 15px;
}

.merchant-result-status {
  padding: 6px 8px;
  border-radius: 999px;
  color: #5b6661;
  background: #e4ebe4;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.merchant-result-status.waiting {
  color: #962236;
  background: #ffe5e2;
}

.merchant-result-status.complete {
  color: #116b4b;
  background: #d9f0df;
}

.merchant-result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.merchant-result-grid > div {
  min-width: 0;
  min-height: 78px;
  padding: 10px;
  border: 1px solid rgba(23, 35, 31, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
}

.merchant-result-grid span,
.merchant-result-grid strong,
.merchant-result-grid small {
  display: block;
}

.merchant-result-grid span {
  color: var(--merchant-muted);
  font-size: 9px;
}

.merchant-result-grid strong {
  margin: 9px 0 3px;
  color: var(--merchant-ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  white-space: nowrap;
}

.merchant-result-grid small {
  color: var(--merchant-muted);
  font-size: 8px;
  line-height: 1.35;
}

.merchant-result-card > p {
  margin: 10px 0 0;
  color: var(--merchant-muted);
  font-size: 8px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.merchant-check-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.merchant-check-list span {
  padding: 12px;
  border: 1px solid var(--merchant-line);
  border-radius: 15px;
  color: var(--merchant-muted);
  font-size: 8px;
}

.merchant-check-list i,
.merchant-check-list b {
  display: block;
  font-style: normal;
}

.merchant-check-list i {
  margin-bottom: 7px;
  color: #a9283b;
  font-family: "Azeret Mono", monospace;
}

.merchant-check-list b {
  margin-top: 2px;
  color: var(--merchant-ink);
}

.merchant-primary {
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  border: 0;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, #c83240, #8c1c30);
  font: 900 12px "Noto Sans TC", sans-serif;
  cursor: pointer;
}

.merchant-primary:disabled {
  opacity: 0.55;
  cursor: wait;
}

.merchant-feedback {
  margin: 9px 0 0;
  color: var(--merchant-muted);
  font-size: 9px;
  text-align: center;
}

.merchant-campaign-panel header > span,
.merchant-transactions header > span {
  color: var(--merchant-muted);
  font-size: 9px;
}

.merchant-campaign-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.merchant-campaign-list article {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border-radius: 16px;
  background: #f1f3ef;
}

.merchant-campaign-list article > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: var(--campaign-color);
  font-family: "Azeret Mono", monospace;
  font-size: 9px;
  font-weight: 700;
}

.merchant-campaign-list strong {
  display: block;
  font-size: 11px;
}

.merchant-campaign-list p {
  margin: 2px 0 0;
  color: var(--merchant-muted);
  font-size: 8px;
}

.merchant-campaign-list b {
  color: #116b4b;
  font-size: 8px;
}

.merchant-transactions {
  margin-top: 14px;
}

.merchant-table-head,
.merchant-transaction-list article {
  display: grid;
  grid-template-columns: 1.3fr 1.7fr 0.8fr 0.7fr 0.6fr;
  gap: 12px;
  align-items: center;
}

.merchant-table-head {
  padding: 18px 12px 10px;
  color: var(--merchant-muted);
  font-size: 8px;
}

.merchant-transaction-list article {
  min-height: 58px;
  padding: 10px 12px;
  border-top: 1px solid var(--merchant-line);
  font-size: 10px;
}

.merchant-transaction-list span strong,
.merchant-transaction-list span small {
  display: block;
}

.merchant-transaction-list span small {
  margin-top: 2px;
  color: var(--merchant-muted);
  font-family: "Azeret Mono", monospace;
  font-size: 7px;
}

.merchant-transaction-list b {
  color: #116b4b;
  font-size: 9px;
}

.merchant-disclaimer {
  display: flex;
  gap: 12px;
  margin-top: 15px;
  padding: 14px 18px;
  border-radius: 16px;
  color: #684b00;
  background: #fff3ce;
  font-size: 9px;
}

.merchant-disclaimer p {
  margin: 0;
}

@keyframes merchant-pulse {
  50% { box-shadow: 0 0 0 5px rgba(200, 50, 64, 0.1); }
}

@media (max-width: 1050px) {
  .merchant-shell {
    grid-template-columns: 1fr;
  }

  .merchant-sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    padding: 16px 20px;
  }

  .merchant-sidebar nav {
    display: flex;
    justify-content: flex-end;
    margin: 0;
  }

  .merchant-sidebar nav a {
    min-height: 40px;
  }

  .merchant-sidebar-foot {
    display: none;
  }

  .merchant-main {
    width: 100%;
  }

  .merchant-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .merchant-sidebar {
    grid-template-columns: 1fr;
  }

  .merchant-sidebar nav {
    margin-top: 14px;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .merchant-sidebar nav a {
    flex: 0 0 auto;
    padding-inline: 10px;
  }

  .merchant-sidebar nav a span {
    display: none;
  }

  .merchant-main {
    padding: 24px 12px 36px;
  }

  .merchant-topbar {
    align-items: flex-start;
  }

  .merchant-topbar h1 {
    font-size: 36px;
  }

  .merchant-top-actions span {
    display: none;
  }

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

  .merchant-kpis article {
    min-height: 124px;
    padding: 15px;
  }

  .merchant-kpis strong {
    font-size: 29px;
  }

  .merchant-scan-panel,
  .merchant-campaign-panel,
  .merchant-transactions {
    padding: 16px;
    border-radius: 22px;
  }

  .merchant-redemption-card {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .merchant-qr-mini {
    width: 60px;
  }

  .merchant-redemption-card > b {
    grid-column: 1 / -1;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  .merchant-result-card {
    padding: 14px;
  }

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

  .merchant-result-grid > div {
    min-height: 70px;
  }

  .merchant-check-list {
    grid-template-columns: 1fr;
  }

  .merchant-table-head {
    display: none;
  }

  .merchant-transaction-list {
    margin-top: 14px;
  }

  .merchant-transaction-list article {
    grid-template-columns: 1fr auto;
    gap: 7px;
    padding: 13px 2px;
  }

  .merchant-transaction-list article span:nth-child(2),
  .merchant-transaction-list article span:nth-child(3) {
    grid-column: 1;
  }

  .merchant-transaction-list article span:nth-child(4),
  .merchant-transaction-list article b {
    grid-column: 2;
    text-align: right;
  }

  .merchant-disclaimer {
    display: block;
  }

  .merchant-disclaimer p {
    margin-top: 4px;
  }
}

body[data-scenario="green"] {
  --accent: #18845f;
  --accent-soft: #dff5ec;
  --accent-strong: #0d6748;
}

body[data-scenario="blue"] {
  --accent: #2f73f5;
  --accent-soft: #e4edff;
  --accent-strong: #1f57bf;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Noto Sans TC", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(217, 75, 50, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(47, 115, 245, 0.08), transparent 24%),
    linear-gradient(180deg, #fafbf7 0%, var(--page) 38%, #eef1eb 100%);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app {
  width: min(1720px, calc(100% - 120px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 0 28px;
}

.app-narrow {
  width: min(1280px, calc(100% - 120px));
}

.appbar {
  min-height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: "Azeret Mono", monospace;
  font-size: 16px;
  font-weight: 700;
}

.appbar p,
.scenario-panel p,
.state-line,
.offer-line p,
.scenario-copy,
.confirm-panel p,
.success-panel p,
.note-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.top-actions span,
.top-actions a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}

.workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  padding-top: 16px;
}

.scenario-panel,
.main-panel,
.focus-panel,
.confirm-panel,
.success-panel,
.summary-panel,
.note-panel,
.tech-panel,
.deck-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.scenario-panel {
  position: sticky;
  top: 16px;
  padding: 12px;
  align-self: start;
}

.scenario-panel-title {
  display: block;
  margin-top: 8px;
  font-size: 20px;
  line-height: 1.3;
}

.scenario-panel-copy {
  margin-top: 8px;
}

.panel-label,
.scenario-kicker,
.offer-line span,
.impact-row span,
.summary-panel span {
  display: block;
  color: var(--accent-strong);
  font-family: "Azeret Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.scenario-tabs {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.scenario-tabs-inline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.scenario-tabs button,
.primary-btn,
.secondary-btn,
.side-action {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.scenario-tabs button {
  padding: 10px;
  background: var(--panel-2);
  color: var(--ink);
  text-align: left;
}

.scenario-tabs button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.side-action:hover {
  transform: translateY(-1px);
}

.scenario-tabs button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: 0 10px 24px rgba(18, 24, 33, 0.08);
}

.side-action {
  width: 100%;
  margin: 2px 0 10px;
  background: var(--dark);
  color: white;
  text-align: left;
  padding: 10px;
}

.demo-guide {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
}

.guide-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, #fff, #f6f8f4);
}

.guide-step span {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: "Azeret Mono", monospace;
  font-size: 11px;
  font-weight: 700;
}

.main-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.hero-stage {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(20, 29, 39, 0.08);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 247, 0.96)),
    linear-gradient(120deg, rgba(217, 75, 50, 0.06), rgba(47, 115, 245, 0.06));
  box-shadow: 0 18px 40px rgba(18, 24, 33, 0.06);
}

.hero-stage strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  line-height: 1.2;
}

.hero-stage p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

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

.hero-chip {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
}

.hero-chip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.hero-chip strong {
  margin-top: 6px;
  font-size: 18px;
}

.journey-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.journey-stop {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
}

.journey-stop span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #d7ddd7;
  color: var(--muted);
  font-family: "Azeret Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.journey-stop strong {
  margin-top: 10px;
  font-size: 16px;
}

.journey-stop.active {
  border-color: var(--accent);
  background: linear-gradient(180deg, white, var(--accent-soft));
  box-shadow: 0 14px 28px rgba(18, 24, 33, 0.08);
}

.journey-stop.active span {
  background: var(--accent);
  color: white;
}

.journey-stop.done span {
  background: var(--focus);
  color: white;
}

.journey-stop.done {
  border-color: rgba(31, 138, 112, 0.28);
}

.wallet-strip {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(110px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #263240;
  border-radius: 8px;
  background: #263240;
}

.point-box,
.mini-stat {
  padding: 14px;
  background: var(--dark);
  color: white;
  transition: background 0.2s ease, transform 0.2s ease;
}

.point-box span,
.mini-stat span {
  display: block;
  margin-bottom: 6px;
  color: #aeb8c5;
  font-size: 12px;
}

.point-box strong {
  display: block;
  font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
  font-size: 48px;
  line-height: 1;
}

.mini-stat strong {
  display: block;
  font-size: 18px;
}

.focus-panel,
.confirm-panel,
.success-panel,
.note-panel {
  padding: 16px;
}

.focus-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.focus-top h1 {
  margin: 6px 0 8px;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
}

.offer-tag {
  flex: 0 0 auto;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 18px rgba(18, 24, 33, 0.1);
}

.partner-pill {
  min-width: 148px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.offer-line {
  margin-top: 14px;
  padding: 12px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
}

.offer-line strong {
  display: block;
  margin: 4px 0;
  font-size: 18px;
}

.signal-line {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.impact-row,
.flow-row,
.summary-panel,
.action-row,
.confirm-panel {
  display: grid;
  gap: 8px;
}

.impact-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.impact-row div,
.flow-step,
.summary-panel div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
}

.impact-row strong,
.summary-panel strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.flow-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flow-step span {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #cfd8d2;
  font-size: 12px;
  font-weight: 700;
}

.flow-step.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 10px 20px rgba(18, 24, 33, 0.06);
}

.flow-step.active span {
  background: var(--accent);
  color: white;
}

.flow-step.done span {
  background: var(--focus);
  color: white;
}

.state-line {
  margin-top: 10px;
}

.action-row {
  grid-template-columns: 1fr 92px;
  margin-top: 14px;
}

.primary-btn {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  box-shadow: 0 12px 22px rgba(217, 75, 50, 0.22);
}

.secondary-btn {
  background: var(--panel);
  color: var(--ink);
}

.primary-btn:disabled,
.secondary-btn:disabled {
  cursor: default;
  opacity: 0.55;
}

.confirm-panel {
  grid-template-columns: minmax(0, 1fr) 160px;
  align-items: center;
  border-color: var(--accent);
}

.confirm-panel strong,
.success-panel strong,
.note-panel strong,
.deck-note strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.success-panel {
  background: #edf8f3;
  border-color: #9fd8c3;
  box-shadow: 0 16px 30px rgba(18, 138, 112, 0.08);
}

.summary-panel {
  grid-template-columns: 150px 150px 150px minmax(0, 1fr);
}

.activity-cell strong {
  font-size: 15px;
  line-height: 1.5;
}

.tech-panel {
  padding: 16px;
  border-color: #b9c5d8;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
}

.tech-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.tech-head span,
.tech-grid span {
  display: block;
  color: var(--blue);
  font-family: "Azeret Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.tech-head strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tech-grid article {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
}

.tech-grid strong {
  display: block;
  margin: 4px 0;
  font-size: 16px;
}

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

.tech-panel pre {
  overflow: auto;
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 6px;
  background: #101820;
  color: #e8f0f6;
  font-family: "Azeret Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.deck-note {
  padding: 12px;
  background: #f8faf7;
}

.note-panel {
  background: linear-gradient(135deg, rgba(21, 29, 39, 0.98), rgba(38, 50, 64, 0.96));
  color: white;
}

.note-panel strong {
  color: white;
}

.note-panel p {
  color: rgba(255, 255, 255, 0.76);
}

.deck-note p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.pulse {
  animation: pulse 0.55s ease;
}

.score-flash {
  animation: score-flash 0.65s ease;
}

body[data-page-mode="site"] {
  min-height: 100vh;
  color: #111817;
  background:
    linear-gradient(180deg, rgba(236, 246, 232, 0.96), rgba(230, 241, 252, 0.95) 48%, rgba(247, 249, 242, 0.98)),
    #eef4ea;
  overflow-x: hidden;
}

.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: min(1720px, calc(100% - 64px));
  min-height: 68px;
  margin: 0 auto;
  padding: 14px 0;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.site-brand span {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #111817;
  color: white;
  font-family: "Azeret Mono", monospace;
  font-size: 10px;
  font-weight: 700;
}

.site-brand strong {
  font-size: 18px;
}

.site-nav nav {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(17, 24, 23, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(18px);
}

.site-nav nav a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: #33413f;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.site-nav nav a:hover {
  background: white;
}

.site-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  align-items: center;
  gap: 44px;
  overflow: hidden;
  padding: 112px max(32px, calc((100vw - 1720px) / 2)) 64px;
}

.site-map {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.site-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.86), transparent 22%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.08), rgba(17, 24, 23, 0.04));
}

.site-map span {
  position: absolute;
  height: 2px;
  border-radius: 999px;
  transform-origin: left center;
  opacity: 0.78;
}

.line-red {
  left: 4%;
  top: 38%;
  width: 84%;
  background: linear-gradient(90deg, transparent, #d94b32, transparent);
  transform: rotate(-9deg);
}

.line-green {
  left: 8%;
  top: 62%;
  width: 72%;
  background: linear-gradient(90deg, transparent, #18845f, transparent);
  transform: rotate(13deg);
}

.line-blue {
  left: 28%;
  top: 23%;
  width: 62%;
  background: linear-gradient(90deg, transparent, #2f73f5, transparent);
  transform: rotate(33deg);
}

.site-map i {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 4px solid white;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 16px 34px rgba(17, 24, 23, 0.22);
  animation: site-node 3s ease-in-out infinite;
}

.node-a {
  left: 23%;
  top: 42%;
}

.node-b {
  left: 58%;
  top: 32%;
  animation-delay: 0.7s;
  background: var(--focus);
}

.node-c {
  left: 74%;
  top: 64%;
  animation-delay: 1.3s;
  background: var(--blue);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.site-kicker {
  display: inline-flex;
  margin: 0 0 12px;
  color: #1f5f47;
  font-family: "Azeret Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(54px, 7vw, 118px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 700px;
  margin: 24px 0 0;
  color: #465550;
  font-size: 21px;
  line-height: 1.6;
}

.hero-actions,
.cta-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-actions {
  margin-top: 34px;
}

.site-primary,
.site-secondary {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: 1px solid #111817;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.site-primary {
  background: #111817;
  color: white;
  box-shadow: 0 18px 34px rgba(17, 24, 23, 0.18);
}

.site-secondary {
  background: rgba(255, 255, 255, 0.7);
  color: #111817;
}

.hero-phone {
  position: relative;
  z-index: 2;
  min-height: 650px;
  padding: 18px;
  border: 10px solid #111817;
  border-radius: 46px;
  background:
    radial-gradient(circle at 80% 7%, rgba(255, 225, 137, 0.46), transparent 28%),
    linear-gradient(180deg, rgba(245, 251, 235, 0.96), rgba(229, 240, 250, 0.98));
  box-shadow:
    0 44px 90px rgba(17, 24, 23, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  transform: rotate(3deg);
}

.hero-phone-status {
  display: flex;
  justify-content: space-between;
  font-family: "Azeret Mono", monospace;
  font-size: 11px;
  font-weight: 700;
}

.hero-phone-wallet {
  margin-top: 22px;
  padding: 18px;
  border-radius: 28px;
  background: #111817;
  color: white;
}

.hero-phone-wallet span,
.hero-phone-card span {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-family: "Azeret Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-phone-wallet strong {
  display: block;
  margin-top: 8px;
  font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
  font-size: 72px;
  line-height: 0.9;
}

.hero-phone-card {
  margin-top: 14px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.76);
}

.hero-phone-card span {
  color: #aa2f1e;
}

.hero-phone-card strong {
  display: block;
  margin-top: 8px;
  font-size: 25px;
  line-height: 1.15;
}

.hero-phone-card p {
  margin: 10px 0 0;
  color: #596653;
  font-size: 15px;
  line-height: 1.55;
}

.hero-phone-tabs {
  position: absolute;
  inset: auto 18px 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.hero-phone-tabs span {
  display: grid;
  min-height: 54px;
  place-items: center;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.site-band,
.site-section,
.platform-panel {
  width: min(1720px, calc(100% - 64px));
  margin: 0 auto;
  padding: 86px 0;
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 48px;
  border-top: 1px solid rgba(17, 24, 23, 0.1);
  border-bottom: 1px solid rgba(17, 24, 23, 0.1);
}

.site-band h2,
.section-head h2,
.platform-panel h2,
.cta-section h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 64px);
  line-height: 1.06;
  letter-spacing: 0;
}

.site-band p,
.platform-panel p {
  margin: 0;
  color: #465550;
  font-size: 18px;
  line-height: 1.75;
}

.section-head {
  max-width: 880px;
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.scene-grid article {
  min-height: 250px;
  padding: 20px;
  border: 1px solid rgba(17, 24, 23, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.scene-grid span {
  color: #1f5f47;
  font-family: "Azeret Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.scene-grid h3 {
  margin: 54px 0 12px;
  font-size: 27px;
}

.scene-grid p {
  margin: 0;
  color: #465550;
  font-size: 16px;
  line-height: 1.65;
}

.platform-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 42px;
  align-items: center;
  padding-block: 92px;
  border-top: 1px solid rgba(17, 24, 23, 0.1);
  border-bottom: 1px solid rgba(17, 24, 23, 0.1);
}

.platform-panel pre {
  overflow: auto;
  margin: 0;
  padding: 24px;
  border-radius: 8px;
  background: #101820;
  color: #e8f0f6;
  font-family: "Azeret Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
}

.cta-section {
  min-height: 420px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

@keyframes site-node {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.28); }
}

@media (max-width: 860px) {
  .site-nav {
    width: calc(100% - 24px);
    align-items: flex-start;
  }

  .site-nav nav {
    max-width: 62vw;
    overflow: auto;
    scrollbar-width: none;
  }

  .site-nav nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav nav a {
    white-space: nowrap;
  }

  .site-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    min-height: auto;
    padding: 104px 12px 54px;
  }

  .hero-copy h1 {
    font-size: 52px;
  }

  .hero-copy p {
    font-size: 18px;
  }

  .hero-phone {
    width: min(100%, 390px);
    min-height: 540px;
    margin: 0 auto;
    transform: none;
  }

  .site-band,
  .site-section,
  .platform-panel {
    width: calc(100% - 24px);
    padding-block: 58px;
  }

  .intro-band,
  .platform-panel,
  .scene-grid {
    grid-template-columns: 1fr;
  }

  .scene-grid article {
    min-height: 210px;
  }
}

@media (max-width: 520px) {
  .site-brand strong {
    display: none;
  }

  .site-nav nav {
    max-width: calc(100vw - 88px);
  }

  .hero-copy h1 {
    font-size: 44px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .site-primary,
  .site-secondary {
    width: 100%;
  }

  .hero-phone {
    min-height: 510px;
    border-width: 8px;
    border-radius: 38px;
  }

  .platform-panel pre {
    font-size: 11px;
  }
}

body[data-page-mode="experience"] {
  min-height: 100vh;
  color: #171d16;
  background:
    radial-gradient(circle at 50% 0%, rgba(163, 214, 255, 0.62), transparent 28%),
    linear-gradient(120deg, rgba(232, 244, 216, 0.95), rgba(225, 238, 255, 0.94) 56%, rgba(255, 233, 218, 0.92)),
    #eef4ea;
}

.pixel-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.pixel-device {
  width: min(430px, calc(100vw - 24px));
  aspect-ratio: 1080 / 2424;
  max-height: calc(100vh - 56px);
  padding: 12px;
  border: 1px solid rgba(18, 24, 33, 0.25);
  border-radius: 42px;
  background:
    linear-gradient(145deg, #252b2f, #101418 46%, #2c3237),
    #14191d;
  box-shadow:
    0 36px 90px rgba(18, 24, 33, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.pixel-frame-bar {
  height: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px 5px;
  color: rgba(255, 255, 255, 0.55);
  font-family: "Azeret Mono", monospace;
  font-size: 10px;
  letter-spacing: 0;
}

.pixel-screen {
  position: relative;
  height: calc(100% - 26px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding: 12px 12px 92px;
  border-radius: 31px;
  background:
    linear-gradient(180deg, rgba(245, 251, 235, 0.98) 0%, rgba(238, 246, 239, 0.96) 46%, rgba(229, 240, 250, 0.98) 100%);
  scrollbar-width: none;
  isolation: isolate;
}

.pixel-screen::-webkit-scrollbar {
  display: none;
}

.pixel-aura {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 18% 10%, rgba(217, 75, 50, 0.2), transparent 24%),
    radial-gradient(circle at 84% 3%, rgba(47, 115, 245, 0.22), transparent 30%),
    radial-gradient(circle at 58% 36%, rgba(24, 132, 95, 0.12), transparent 36%);
  animation: aura-shift 8s ease-in-out infinite alternate;
}

.metro-orbit {
  position: absolute;
  inset: 72px 18px auto;
  height: 128px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.62;
}

.metro-orbit::before,
.metro-orbit::after {
  content: "";
  position: absolute;
  inset: 18px 4px;
  border: 1px solid rgba(31, 138, 112, 0.22);
  border-radius: 999px;
  transform: rotate(-8deg);
}

.metro-orbit::after {
  inset: 32px 24px;
  border-color: rgba(47, 115, 245, 0.22);
  transform: rotate(11deg);
}

.metro-orbit span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
  animation: orbit-dot 4s ease-in-out infinite;
}

.metro-orbit span:nth-child(1) {
  left: 18%;
  top: 26px;
}

.metro-orbit span:nth-child(2) {
  right: 19%;
  top: 52px;
  animation-delay: 0.8s;
  background: var(--focus);
}

.metro-orbit span:nth-child(3) {
  left: 48%;
  bottom: 14px;
  animation-delay: 1.35s;
  background: var(--blue);
}

.android-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 26px;
  color: #253024;
  font-family: "Azeret Mono", monospace;
  font-size: 11px;
  font-weight: 700;
}

.android-status div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.battery-pill {
  min-width: 26px;
  padding: 2px 5px;
  border: 1px solid rgba(37, 48, 36, 0.35);
  border-radius: 999px;
  font-size: 10px;
}

.pixel-appbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.pixel-appbar h1 {
  margin: 5px 0 0;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
}

.material-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #dcebcf;
  color: #2d4b25;
  font-size: 12px;
  font-weight: 800;
}

.icon-link {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(37, 48, 36, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.76);
  color: #253024;
  text-decoration: none;
  font-size: 20px;
  line-height: 1;
}

.pixel-wallet,
.pixel-card,
.pixel-summary,
.pixel-note,
.pixel-toast,
.pixel-sheet {
  border: 1px solid rgba(37, 48, 36, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 28px rgba(55, 70, 47, 0.08);
}

.pixel-wallet {
  position: relative;
  overflow: hidden;
  padding: 16px;
  color: white;
  background:
    linear-gradient(135deg, rgba(42, 61, 39, 0.98), rgba(22, 31, 28, 0.98));
  transform: translateZ(0);
}

.wallet-glow {
  position: absolute;
  width: 170px;
  height: 170px;
  right: -52px;
  top: -64px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 234, 146, 0.44), rgba(119, 222, 188, 0.16) 48%, transparent 70%);
  animation: wallet-glow 5s ease-in-out infinite alternate;
}

.pixel-wallet span,
.pixel-wallet-grid span {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.pixel-wallet > div > strong {
  display: block;
  margin-top: 4px;
  font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
  font-size: 56px;
  line-height: 0.95;
}

.pixel-wallet-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.pixel-wallet-grid div {
  min-width: 0;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.pixel-wallet-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  white-space: nowrap;
}

.pixel-status-line,
.pixel-next {
  margin: -2px 4px 0;
  color: #596653;
  font-size: 12px;
  line-height: 1.5;
}

.pixel-tabs {
  position: sticky;
  top: -12px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(37, 48, 36, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 28px rgba(37, 48, 36, 0.08);
}

.pixel-tabs button {
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 7px;
  border-radius: 18px;
  text-align: center;
}

.pixel-tabs button span {
  font-size: 18px;
  line-height: 1;
}

.pixel-tabs button strong {
  font-size: 12px;
}

.pixel-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  backdrop-filter: blur(14px);
}

.pixel-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.62)),
    linear-gradient(120deg, rgba(255, 255, 255, 0), var(--accent-soft));
}

.live-route {
  position: absolute;
  inset: 10px 12px auto;
  height: 74px;
  pointer-events: none;
  opacity: 0.5;
}

.live-route::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 36px;
  height: 2px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, var(--accent), var(--focus), var(--blue), transparent);
  animation: route-flow 2.8s linear infinite;
}

.live-route span {
  position: absolute;
  top: 28px;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 8px 20px rgba(18, 24, 33, 0.16);
}

.live-route span:nth-child(1) {
  left: 12px;
}

.live-route span:nth-child(2) {
  left: calc(50% - 9px);
  background: var(--focus);
}

.live-route span:nth-child(3) {
  right: 12px;
  background: var(--blue);
}

.pixel-card-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding-top: 58px;
}

.pixel-card h2 {
  margin: 5px 0 8px;
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: 0;
}

.pixel-card .offer-tag {
  margin: 0;
  border-radius: 999px;
}

.pixel-offer {
  margin-top: 12px;
  padding: 12px;
  border-radius: 20px;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.pixel-offer span,
.pixel-impact span,
.pixel-summary span {
  display: block;
  color: var(--accent-strong);
  font-family: "Azeret Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.pixel-offer strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
}

.pixel-offer p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.pixel-impact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.pixel-impact div,
.pixel-summary div {
  min-width: 0;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.pixel-impact strong,
.pixel-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.pixel-flow {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pixel-flow .flow-step {
  justify-content: center;
  border-radius: 18px;
}

.pixel-sheet {
  grid-template-columns: 1fr;
  padding: 14px;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -12px 30px rgba(18, 24, 33, 0.14);
}

.pixel-sheet .primary-btn {
  width: 100%;
}

.pixel-toast {
  padding: 14px;
  background: #e4f5e8;
  animation: sheet-pop 0.42s ease;
}

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

.pixel-summary .activity-cell {
  grid-column: 1 / -1;
}

.pixel-note {
  padding: 14px;
  color: white;
  background: linear-gradient(135deg, #223027, #101914);
}

.pixel-note strong {
  display: block;
  font-size: 16px;
}

.pixel-note p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.pixel-actions {
  position: sticky;
  bottom: -92px;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 8px;
  margin: 4px -2px -78px;
  padding: 10px 0 0;
  background: linear-gradient(180deg, rgba(236, 245, 238, 0), rgba(236, 245, 238, 0.96) 24%);
  backdrop-filter: blur(10px);
}

.pixel-actions button {
  min-height: 52px;
  border-radius: 18px;
}

.android-nav {
  position: sticky;
  bottom: -90px;
  z-index: 5;
  display: grid;
  place-items: center;
  height: 22px;
  margin-bottom: -92px;
  pointer-events: none;
}

.android-nav span {
  width: 116px;
  height: 4px;
  border-radius: 999px;
  background: rgba(37, 48, 36, 0.42);
}

@keyframes aura-shift {
  0% { filter: hue-rotate(0deg); transform: scale(1); }
  100% { filter: hue-rotate(18deg); transform: scale(1.03); }
}

@keyframes orbit-dot {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.7; }
  50% { transform: translate3d(18px, -8px, 0) scale(1.22); opacity: 1; }
}

@keyframes wallet-glow {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-26px, 28px, 0) scale(1.18); }
}

@keyframes route-flow {
  0% { background-position: 0 0; opacity: 0.46; }
  50% { opacity: 0.92; }
  100% { background-position: 260px 0; opacity: 0.46; }
}

@keyframes sheet-pop {
  0% { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@media (max-width: 520px) {
  .pixel-stage {
    padding: 0;
    place-items: stretch;
  }

  .pixel-device {
    width: 100vw;
    max-height: none;
    min-height: 100vh;
    aspect-ratio: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .pixel-frame-bar {
    display: none;
  }

  .pixel-screen {
    min-height: 100vh;
    height: 100vh;
    border-radius: 0;
    padding-inline: 14px;
  }
}

@keyframes pulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.01); }
  100% { transform: scale(1); }
}

@keyframes score-flash {
  0% { transform: translateY(0); color: inherit; }
  35% { transform: translateY(-2px); color: #fff1b8; }
  100% { transform: translateY(0); color: inherit; }
}

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .scenario-panel {
    position: static;
  }

  .scenario-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .point-box {
    grid-column: 1 / -1;
  }

  .journey-rail,
  .hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .app {
    width: min(100% - 16px, 100%);
    padding-top: 8px;
  }

  .appbar,
  .focus-top,
  .confirm-panel,
  .tech-head {
    display: grid;
  }

  .top-actions {
    justify-content: stretch;
  }

  .top-actions span,
  .top-actions a {
    justify-content: center;
    flex: 1;
  }

  .scenario-tabs,
  .scenario-tabs-inline,
  .impact-row,
  .flow-row,
  .summary-panel,
  .tech-grid,
  .action-row,
  .wallet-strip,
  .hero-meta,
  .journey-rail {
    grid-template-columns: 1fr;
  }

  .focus-top h1 {
    font-size: 24px;
  }

  .hero-stage strong {
    font-size: 24px;
  }

  .point-box strong {
    font-size: 42px;
  }
}

/* Metro-Link V3 mobile-first app */
body[data-page-mode="mobile-v3"] {
  --ml-red: #c83240;
  --ml-red-deep: #a92134;
  --ml-theme-start: #d33748;
  --ml-theme-mid: #9e1d36;
  --ml-theme-end: #5e172b;
  --ml-cream: #f7f2e8;
  --ml-paper: #fffdf8;
  --ml-ink: #17231f;
  --ml-muted: #5b6661;
  --ml-line: rgba(23, 35, 31, 0.12);
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ml-ink);
  background:
    radial-gradient(circle at 16% 16%, rgba(228, 73, 79, 0.2), transparent 28%),
    radial-gradient(circle at 86% 82%, rgba(26, 124, 91, 0.2), transparent 31%),
    #14221f;
}

body[data-page-mode="mobile-v3"][data-persona="green"] {
  --ml-red: #116b4b;
  --ml-red-deep: #0b5038;
  --ml-theme-start: #19835f;
  --ml-theme-mid: #116548;
  --ml-theme-end: #0b3b2d;
}

body[data-page-mode="mobile-v3"][data-persona="blue"] {
  --ml-red: #1e5dbb;
  --ml-red-deep: #16458a;
  --ml-theme-start: #2d72d7;
  --ml-theme-mid: #1d559f;
  --ml-theme-end: #17355f;
}

body[data-page-mode="mobile-v3"][data-persona="yellow"] {
  --ml-red: #a66f00;
  --ml-red-deep: #725000;
  --ml-theme-start: #d99a13;
  --ml-theme-mid: #a66f00;
  --ml-theme-end: #664600;
}

body[data-page-mode="mobile-v3"] button,
body[data-page-mode="mobile-v3"] a {
  font: inherit;
}

.ml-stage {
  width: min(1400px, calc(100% - 56px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(360px, 600px) 430px;
  align-items: center;
  justify-content: center;
  gap: clamp(48px, 7vw, 120px);
  padding: 24px 0;
}

.ml-desktop-note {
  color: white;
}

.ml-desktop-note > span {
  display: block;
  margin-bottom: 20px;
  color: #ffb2a8;
  font-family: "Azeret Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.ml-desktop-note strong {
  display: block;
  max-width: 580px;
  font-size: clamp(42px, 4.2vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.ml-desktop-note p {
  max-width: 500px;
  margin: 24px 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
  line-height: 1.8;
}

.ml-desktop-note a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.ml-device {
  width: 430px;
  height: min(930px, calc(100vh - 48px));
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 48px;
  background: linear-gradient(145deg, #252b2a, #0d1211 48%, #303836);
  box-shadow:
    0 42px 100px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.ml-device-label {
  height: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px 6px;
  color: rgba(255, 255, 255, 0.54);
  font-family: "Azeret Mono", monospace;
  font-size: 9px;
  text-transform: uppercase;
}

.ml-screen {
  position: relative;
  height: calc(100% - 24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 37px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(247, 242, 232, 0.98)),
    var(--ml-cream);
  isolation: isolate;
}

.ml-screen::before {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  right: -110px;
  top: 110px;
  z-index: -1;
  border-radius: 50%;
  background: rgba(228, 73, 79, 0.08);
  filter: blur(8px);
}

.ml-status {
  flex: none;
  height: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 22px 0;
  font-family: "Azeret Mono", monospace;
  font-size: 10px;
  font-weight: 700;
}

.ml-status div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ml-battery {
  min-width: 25px;
  padding: 2px 4px;
  border: 1px solid rgba(23, 35, 31, 0.3);
  border-radius: 999px;
  text-align: center;
  font-size: 9px;
}

.ml-view {
  flex: 1;
  min-height: 0;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 16px 28px;
  scrollbar-width: none;
  animation: ml-view-in 0.36s ease both;
}

.ml-view::-webkit-scrollbar {
  display: none;
}

.ml-view[hidden] {
  display: none !important;
}

.ml-appbar,
.ml-subbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.ml-appbar {
  margin-bottom: 16px;
}

.ml-appbar h1,
.ml-redeem-head h1,
.ml-reward-hero h1 {
  margin: 3px 0 0;
  font-size: 29px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.ml-overline {
  color: var(--ml-red-deep);
  font-family: "Azeret Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.ml-avatar {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--ml-ink);
  font-family: "Azeret Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.ml-appbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ml-merchant-link,
.ml-merchant-console-link {
  color: var(--ml-red-deep);
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
}

.ml-merchant-link {
  padding: 8px 10px;
  border: 1px solid var(--ml-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
}

.ml-wallet {
  position: relative;
  overflow: hidden;
  padding: 17px;
  border-radius: 26px;
  color: white;
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 208, 111, 0.26), transparent 25%),
    linear-gradient(135deg, #263d35, #14201d 58%, #301d21);
  box-shadow: 0 18px 38px rgba(31, 45, 40, 0.19);
}

.ml-carbon-note {
  margin: 8px 4px 0;
  color: var(--ml-muted);
  font-size: 8px;
  line-height: 1.5;
}

.ml-carbon-note b {
  color: var(--ml-red-deep);
  font-family: "Azeret Mono", monospace;
}

.ml-wallet::after {
  content: "R  G  BL  Y";
  position: absolute;
  right: -4px;
  bottom: 12px;
  color: rgba(255, 255, 255, 0.06);
  font-family: "Azeret Mono", monospace;
  font-size: 34px;
  font-weight: 700;
  transform: rotate(-10deg);
}

.ml-wallet-head,
.ml-wallet-meta {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ml-wallet-head {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.ml-wallet-head span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ml-wallet-head span:last-child::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8de0ae;
  box-shadow: 0 0 10px rgba(141, 224, 174, 0.7);
}

.ml-wallet > strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 8px 0 15px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 60px;
  line-height: 0.9;
}

.ml-wallet > strong::after {
  content: "PTS";
  margin-left: 7px;
  color: rgba(255, 255, 255, 0.5);
  font-family: "Azeret Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.ml-wallet-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.66);
  font-size: 10px;
}

.ml-wallet-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.ml-wallet-meta b {
  color: white;
}

.ml-section {
  margin-top: 22px;
}

.ml-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 11px;
}

.ml-section-head h2 {
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 1.25;
}

.ml-live-dot,
.ml-filter-chip {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  color: #7d1b2b;
  background: #ffe2df;
  font-size: 10px;
  font-weight: 800;
}

.ml-live-dot.completed {
  color: #136444;
  background: #def4e7;
}

.ml-feature-mission {
  position: relative;
  width: 100%;
  min-height: 176px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 38px;
  align-items: start;
  gap: 11px;
  overflow: hidden;
  padding: 16px 14px 22px;
  border: 0;
  border-radius: 28px;
  color: white;
  text-align: left;
  background:
    radial-gradient(circle at 80% 8%, rgba(255, 222, 165, 0.34), transparent 24%),
    linear-gradient(135deg, var(--ml-theme-start), var(--ml-theme-mid) 66%, var(--ml-theme-end));
  box-shadow: 0 18px 32px rgba(158, 29, 54, 0.24);
  cursor: pointer;
}

.ml-feature-mission::before,
.ml-feature-mission::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -70px;
  bottom: -120px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.ml-feature-mission::after {
  right: -28px;
  bottom: -155px;
  width: 260px;
  height: 260px;
}

.ml-route-badge {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 4px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  background: white;
  color: var(--ml-red);
  font-family: "Space Grotesk", sans-serif;
  font-size: 23px;
  font-weight: 700;
}

.ml-feature-copy {
  display: block;
}

.ml-feature-copy small,
.ml-feature-copy strong,
.ml-feature-copy > span {
  display: block;
}

.ml-feature-copy small {
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 10px;
}

.ml-feature-copy strong {
  font-size: 22px;
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.ml-feature-copy > span {
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  line-height: 1.5;
}

.ml-arrow {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  font-family: "Azeret Mono", monospace;
  font-size: 9px;
  font-weight: 700;
}

.ml-feature-progress {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.ml-feature-progress i,
.ml-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #ffd26f;
  transition: width 0.55s ease;
}

.ml-persona-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 104px;
  gap: 9px;
  overflow-x: auto;
  padding: 2px 1px 7px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.ml-persona-rail::-webkit-scrollbar {
  display: none;
}

.ml-persona {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: end;
  gap: 3px;
  padding: 11px;
  border: 1px solid var(--ml-line);
  border-radius: 22px;
  color: var(--ml-ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.64);
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ml-persona.selected {
  border-color: var(--ml-red);
  background: white;
  box-shadow: 0 12px 24px rgba(32, 49, 43, 0.1);
  transform: translateY(-2px);
}

.ml-persona-route {
  display: grid;
  width: 32px;
  height: 32px;
  margin-bottom: auto;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--ml-red);
  font-family: "Azeret Mono", monospace;
  font-size: 10px;
  font-weight: 700;
}

.ml-persona[data-persona-id="green"] .ml-persona-route {
  background: #116b4b;
}

.ml-persona[data-persona-id="blue"] .ml-persona-route {
  background: #1e5dbb;
}

.ml-persona[data-persona-id="yellow"] .ml-persona-route {
  color: #3e2f05;
  background: #f2b52b;
}

.ml-persona strong {
  font-size: 14px;
}

.ml-persona small {
  color: var(--ml-muted);
  font-family: "Azeret Mono", monospace;
  font-size: 8px;
  line-height: 1.3;
}

.ml-persona-detail {
  min-height: 40px;
  margin: 6px 3px 0;
  color: var(--ml-muted);
  font-size: 11px;
  line-height: 1.55;
}

.ml-text-button,
.ml-reset-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
  border: 0;
  color: var(--ml-red-deep);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.ml-nearby-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ml-line);
}

.ml-nearby-time {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: var(--ml-red-deep);
  background: #ffe7e3;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 0.8;
  text-align: center;
}

.ml-nearby-time small {
  font-size: 7px;
}

.ml-nearby-card strong {
  display: block;
  font-size: 13px;
}

.ml-nearby-card p {
  margin: 3px 0 0;
  color: var(--ml-muted);
  font-size: 10px;
}

.ml-point-pill {
  min-width: 38px;
  padding: 5px 7px;
  border-radius: 999px;
  color: #136444;
  background: #def4e7;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.ml-point-pill.spend {
  color: #8c2934;
  background: #ffe7e3;
}

.ml-view-intro {
  margin: -4px 0 17px;
  color: var(--ml-muted);
  font-size: 12px;
  line-height: 1.6;
}

.ml-activity-list {
  display: grid;
  gap: 12px;
}

.ml-activity-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--ml-line);
  border-radius: 25px;
  background:
    linear-gradient(135deg, var(--route-soft), rgba(255, 255, 255, 0.88));
  box-shadow: 0 12px 30px rgba(36, 52, 46, 0.07);
}

.ml-activity-route > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--route-color);
  font-family: "Azeret Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.ml-activity-route small {
  display: block;
  margin-top: 8px;
  color: var(--route-color);
  font-size: 8px;
  font-weight: 800;
  text-align: center;
}

.ml-activity-copy > span {
  color: var(--ml-muted);
  font-size: 9px;
}

.ml-activity-copy h2 {
  margin: 4px 0;
  font-size: 17px;
  line-height: 1.25;
}

.ml-activity-copy p {
  margin: 0;
  color: var(--ml-muted);
  font-size: 10px;
  line-height: 1.5;
}

.ml-activity-copy strong {
  display: block;
  margin-top: 7px;
  color: var(--route-color);
  font-size: 10px;
}

.ml-activity-copy em {
  display: inline-flex;
  margin-top: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #8c2934;
  background: #ffe7e3;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.ml-activity-card button {
  grid-column: 1 / -1;
  min-height: 44px;
  border: 0;
  border-radius: 15px;
  color: white;
  background: var(--route-color);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.ml-subbar {
  min-height: 40px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 800;
}

.ml-subbar button {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 0;
  color: var(--ml-red-deep);
  background: transparent;
  font-family: "Azeret Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.ml-subbar > span:last-child {
  color: var(--ml-muted);
  font-size: 9px;
}

.ml-mission-hero {
  overflow: hidden;
  padding: 18px;
  border-radius: 28px;
  color: white;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 210, 111, 0.3), transparent 28%),
    linear-gradient(135deg, var(--ml-theme-start), var(--ml-theme-end) 75%);
  box-shadow: 0 18px 35px rgba(143, 24, 48, 0.23);
}

.ml-mission-persona {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.ml-character-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 4px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  color: var(--ml-red);
  background: white;
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.ml-mission-persona small,
.ml-mission-persona strong {
  display: block;
}

.ml-mission-persona small {
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.58);
  font-family: "Azeret Mono", monospace;
  font-size: 8px;
}

.ml-mission-persona strong {
  font-size: 17px;
  line-height: 1.35;
}

.ml-progress-copy {
  display: flex;
  justify-content: space-between;
  margin: 18px 0 7px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 10px;
}

.ml-progress-copy strong {
  color: white;
}

.ml-progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.ml-route-map {
  position: relative;
  margin: 16px 0;
  padding: 3px 0;
}

.ml-route-line {
  position: absolute;
  left: 23px;
  top: 28px;
  bottom: 28px;
  width: 4px;
  border-radius: 999px;
  background: #eadbd5;
}

.ml-stop {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 76px;
}

.ml-stop > span {
  z-index: 1;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 4px solid var(--ml-cream);
  border-radius: 50%;
  color: #80756e;
  background: #eadbd5;
  font-family: "Azeret Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  transition: background 0.25s ease, transform 0.25s ease;
}

.ml-stop.active > span {
  color: white;
  background: var(--ml-red);
  box-shadow: 0 0 0 5px rgba(228, 73, 79, 0.12);
  animation: ml-stop-pulse 1.8s ease-in-out infinite;
}

.ml-stop.done > span {
  color: white;
  background: #19835f;
}

.ml-stop.locked {
  opacity: 0.52;
}

.ml-stop strong {
  display: block;
  font-size: 14px;
}

.ml-stop p {
  margin: 3px 0 0;
  color: var(--ml-muted);
  font-size: 10px;
}

.ml-stop-state {
  padding: 5px 7px;
  border-radius: 999px;
  color: var(--ml-muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 8px;
  white-space: nowrap;
}

.ml-stop.active .ml-stop-state {
  color: var(--ml-red-deep);
  background: rgba(255, 255, 255, 0.82);
}

.ml-stop.done .ml-stop-state {
  color: #136444;
  background: #def4e7;
}

.ml-task-card,
.ml-payment-card,
.ml-collection-card {
  padding: 16px;
  border: 1px solid var(--ml-line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
}

.ml-mission-insight {
  margin: 14px 0;
  padding: 15px;
  border: 1px solid var(--ml-line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--ml-red) 16%, transparent), transparent 34%),
    rgba(255, 255, 255, 0.74);
}

.ml-insight-head,
.ml-fitness-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.ml-insight-head span,
.ml-insight-head small,
.ml-insight-head strong {
  display: block;
}

.ml-insight-head small {
  color: var(--ml-muted);
  font-family: "Azeret Mono", monospace;
  font-size: 8px;
}

.ml-insight-head strong {
  margin-top: 3px;
  font-size: 15px;
}

.ml-insight-head > b {
  color: var(--ml-red-deep);
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
}

.ml-insight-head > b small {
  display: inline;
  font-size: 9px;
}

.ml-fitness-track {
  height: 9px;
  margin: 14px 0 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e0d5;
}

.ml-fitness-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ml-red), #ffd26f);
  transition: width 0.5s ease;
}

.ml-fitness-meta {
  font-size: 8px;
}

.ml-fitness-meta span {
  color: var(--ml-muted);
}

.ml-fitness-meta b {
  display: block;
  margin-top: 3px;
  color: var(--ml-ink);
  font-size: 9px;
}

.ml-commute-bars {
  height: 74px;
  display: flex;
  align-items: end;
  gap: 9px;
  margin: 12px 0 8px;
}

.ml-commute-bars i {
  position: relative;
  flex: 1;
  border-radius: 7px 7px 3px 3px;
  background: #d9dedb;
}

.ml-commute-bars i.active {
  background: linear-gradient(180deg, #6da2f3, var(--ml-red));
}

.ml-commute-bars span {
  position: absolute;
  left: 50%;
  bottom: 5px;
  color: white;
  font-family: "Azeret Mono", monospace;
  font-size: 7px;
  transform: translateX(-50%);
}

.ml-mission-insight > p {
  margin: 8px 0 0;
  color: var(--ml-muted);
  font-size: 9px;
  line-height: 1.5;
}

.ml-data-note {
  display: grid;
  gap: 5px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid rgba(24, 132, 95, 0.18);
  border-radius: 18px;
  background: #edf7ef;
}

.ml-data-note[hidden] {
  display: none;
}

.ml-data-note-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.ml-data-note-head span {
  color: #116b4b;
  font-family: "Azeret Mono", monospace;
  font-size: 8px;
  font-weight: 700;
}

.ml-data-note-head strong {
  color: #164f3b;
  font-size: 10px;
  text-align: right;
}

.ml-data-note p {
  margin: 0;
  color: #527264;
  font-size: 9px;
  line-height: 1.5;
}

.ml-taste-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.ml-taste-tags span {
  padding: 7px 9px;
  border-radius: 999px;
  color: var(--ml-red-deep);
  background: color-mix(in srgb, var(--ml-red) 12%, white);
  font-size: 9px;
  font-weight: 800;
}

.ml-task-card h2,
.ml-collection-card h2 {
  margin: 5px 0 6px;
  font-size: 20px;
}

.ml-task-card p {
  margin: 0;
  color: var(--ml-muted);
  font-size: 11px;
  line-height: 1.55;
}

.ml-reward-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.ml-reward-row span {
  padding: 8px 4px;
  border-radius: 13px;
  color: var(--ml-muted);
  background: var(--ml-cream);
  font-size: 8px;
  text-align: center;
}

.ml-reward-row b {
  display: block;
  color: var(--ml-ink);
  font-size: 14px;
}

.ml-stamp-strip,
.ml-stamp-book {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 12px 0;
}

.ml-stamp-strip > span,
.ml-stamp-book > span {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #9b918b;
  font-size: 8px;
  text-align: center;
}

.ml-stamp-strip i,
.ml-stamp-book i {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px dashed #bcb2ac;
  border-radius: 50%;
  color: #9b918b;
  font-family: "Azeret Mono", monospace;
  font-size: 9px;
  font-style: normal;
}

.ml-stamp-strip .unlocked,
.ml-stamp-book .unlocked {
  color: var(--ml-red-deep);
  font-weight: 800;
}

.ml-stamp-strip .unlocked i,
.ml-stamp-book .unlocked i {
  border: 2px solid rgba(228, 73, 79, 0.34);
  color: white;
  background: var(--ml-red);
  box-shadow: 0 6px 14px rgba(228, 73, 79, 0.2);
  transform: rotate(-8deg);
}

.ml-primary-action,
.ml-secondary-action {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.ml-primary-action {
  color: white;
  background: linear-gradient(135deg, #c83240, #8c1c30);
  box-shadow: 0 13px 25px rgba(169, 33, 52, 0.22);
}

.ml-primary-action:disabled {
  cursor: default;
  opacity: 0.58;
  box-shadow: none;
}

.ml-secondary-action {
  margin-top: 8px;
  color: var(--ml-ink);
  background: rgba(255, 255, 255, 0.7);
}

.ml-action-note {
  margin: 8px 0 0;
  color: var(--ml-muted);
  font-size: 9px;
  text-align: center;
}

.ml-merchant-console-link {
  display: block;
  margin-top: 10px;
  text-align: center;
}

.ml-action-dock {
  position: sticky;
  bottom: -20px;
  z-index: 6;
  margin: 12px -4px -20px;
  padding: 9px 4px 12px;
  background: linear-gradient(180deg, rgba(247, 242, 232, 0), var(--ml-cream) 18px);
}

#redeemView .ml-action-dock {
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.ml-redeem-head {
  margin: 8px 0 14px;
}

.ml-redeem-head p,
.ml-reward-hero p {
  margin: 7px 0 0;
  color: var(--ml-muted);
  font-size: 11px;
  line-height: 1.5;
}

.ml-qr-card {
  position: relative;
  display: grid;
  justify-items: center;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--ml-line);
  border-radius: 28px;
  background: white;
  box-shadow: 0 18px 36px rgba(31, 45, 40, 0.1);
}

.ml-qr-code {
  width: 180px;
  height: 180px;
  border: 13px solid white;
  border-radius: 8px;
  background:
    radial-gradient(circle at 17% 17%, white 0 8%, #17231f 8% 13%, white 13% 16%, transparent 16%),
    radial-gradient(circle at 83% 17%, white 0 8%, #17231f 8% 13%, white 13% 16%, transparent 16%),
    radial-gradient(circle at 17% 83%, white 0 8%, #17231f 8% 13%, white 13% 16%, transparent 16%),
    repeating-conic-gradient(#17231f 0 25%, white 0 50%) 0 / 18px 18px;
  box-shadow: 0 0 0 1px rgba(23, 35, 31, 0.1);
}

.ml-qr-image {
  display: block;
  object-fit: contain;
}

.ml-qr-card > strong {
  margin-top: 12px;
  font-family: "Azeret Mono", monospace;
  font-size: 11px;
}

.ml-qr-card > span {
  margin-top: 4px;
  color: var(--ml-muted);
  font-size: 9px;
}

.ml-scan-beam {
  position: absolute;
  left: 50%;
  top: 34px;
  width: 184px;
  height: 2px;
  background: rgba(228, 73, 79, 0.78);
  box-shadow: 0 0 12px rgba(228, 73, 79, 0.6);
  transform: translateX(-50%);
  animation: ml-scan 2.4s ease-in-out infinite;
}

.ml-payment-card {
  margin-top: 12px;
}

.ml-payment-card > div {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  color: var(--ml-muted);
  font-size: 11px;
}

.ml-payment-card > div + div {
  border-top: 1px solid var(--ml-line);
}

.ml-payment-card strong {
  color: var(--ml-ink);
}

.ml-payment-card .ml-negative {
  color: #a92134;
}

.ml-payment-card .ml-positive {
  color: #16724f;
}

.ml-payment-card .total {
  margin-top: 3px;
  padding-top: 11px;
  color: var(--ml-ink);
  font-weight: 800;
}

.ml-compliance {
  margin: 12px 0;
  padding: 12px;
  border-radius: 18px;
  background: #e9f5ee;
}

.ml-compliance strong {
  display: block;
  color: #155e43;
  font-size: 11px;
}

.ml-compliance p {
  margin: 4px 0 0;
  color: #527264;
  font-size: 9px;
  line-height: 1.55;
}

.ml-reward-hero {
  display: grid;
  justify-items: center;
  padding: 20px 10px 14px;
  text-align: center;
}

.ml-reward-seal {
  display: grid;
  width: 92px;
  height: 92px;
  margin-bottom: 15px;
  place-items: center;
  border: 7px double rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #f45d5f, #a91e36);
  box-shadow:
    0 18px 38px rgba(169, 30, 54, 0.28),
    0 0 0 8px rgba(228, 73, 79, 0.08);
  font-family: "Space Grotesk", sans-serif;
  font-size: 39px;
  font-weight: 700;
  animation: ml-seal-in 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.ml-reward-card,
.ml-collection-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ml-reward-card div,
.ml-collection-summary span {
  padding: 12px;
  border: 1px solid var(--ml-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.ml-reward-card span,
.ml-collection-summary span {
  color: var(--ml-muted);
  font-size: 9px;
}

.ml-reward-card strong,
.ml-collection-summary strong {
  display: block;
  margin-top: 3px;
  color: var(--ml-ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 19px;
}

.ml-view blockquote {
  margin: 12px 0;
  padding: 16px;
  border: 0;
  border-radius: 22px;
  color: #603027;
  background: #ffe6d6;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
}

.ml-badge-unlocked,
.ml-empty-badge {
  display: grid;
  justify-items: center;
  margin: 12px 0;
  padding: 16px;
  border: 1px solid var(--ml-line);
  border-radius: 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
}

.ml-badge-unlocked > span {
  color: var(--ml-red-deep);
  font-family: "Azeret Mono", monospace;
  font-size: 8px;
  font-weight: 700;
}

.ml-badge-unlocked strong,
.ml-empty-badge strong {
  margin-top: 5px;
  font-size: 17px;
}

.ml-badge-unlocked p,
.ml-empty-badge p {
  margin: 4px 0 0;
  color: var(--ml-muted);
  font-size: 10px;
}

.ml-confetti {
  position: absolute;
  inset: 42px 12px auto;
  height: 140px;
  pointer-events: none;
}

.ml-confetti i {
  position: absolute;
  width: 7px;
  height: 14px;
  border-radius: 2px;
  background: var(--ml-red);
  animation: ml-confetti 1.8s ease-in-out infinite;
}

.ml-confetti i:nth-child(1) { left: 8%; top: 14px; transform: rotate(20deg); }
.ml-confetti i:nth-child(2) { left: 28%; top: 3px; background: #f2b52b; animation-delay: 0.25s; }
.ml-confetti i:nth-child(3) { right: 12%; top: 12px; background: #18845f; animation-delay: 0.5s; }
.ml-confetti i:nth-child(4) { right: 30%; top: 0; background: #3276e8; animation-delay: 0.8s; }
.ml-confetti i:nth-child(5) { left: 47%; top: 20px; background: #ef8e51; animation-delay: 1s; }

.ml-collection-summary {
  margin-bottom: 12px;
}

.ml-collection-summary span:last-child {
  grid-column: 1 / -1;
}

.ml-collection-card {
  margin-top: 12px;
}

.ml-stamp-book {
  margin-bottom: 0;
}

.ml-badge-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 2px dashed #b9afa8;
  border-radius: 50%;
  color: #9b918b;
  font-family: "Azeret Mono", monospace;
  font-size: 20px;
  font-weight: 700;
}

.ml-empty-badge.unlocked {
  color: white;
  background: linear-gradient(135deg, var(--ml-theme-start), var(--ml-theme-end));
}

.ml-empty-badge.unlocked .ml-badge-icon {
  border: 4px double rgba(255, 255, 255, 0.72);
  color: var(--ml-red);
  background: white;
}

.ml-empty-badge.unlocked strong,
.ml-empty-badge.unlocked p {
  color: white;
}

.ml-empty-badge.unlocked {
  justify-items: stretch;
  text-align: left;
}

.ml-badge-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.ml-badge-item + .ml-badge-item {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.ml-badge-item .ml-badge-icon {
  width: 52px;
  height: 52px;
}

.ml-badge-item strong {
  display: block;
  margin: 0;
}

.ml-preview-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  align-items: end;
}

.ml-preview-overlay[hidden] {
  display: none;
}

.ml-preview-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(13, 24, 20, 0.52);
  opacity: 0;
  backdrop-filter: blur(4px);
  transition: opacity 0.18s ease;
}

.ml-preview-sheet {
  position: relative;
  z-index: 1;
  max-height: calc(100% - 28px);
  overflow-y: auto;
  padding: 10px 18px max(18px, env(safe-area-inset-bottom));
  border-radius: 30px 30px 0 0;
  background:
    radial-gradient(circle at 88% 8%, rgba(228, 73, 79, 0.1), transparent 27%),
    var(--ml-paper);
  box-shadow: 0 -24px 64px rgba(17, 29, 24, 0.22);
  transform: translateY(100%);
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ml-preview-overlay.open .ml-preview-scrim {
  opacity: 1;
}

.ml-preview-overlay.open .ml-preview-sheet {
  transform: translateY(0);
}

.ml-preview-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 13px;
  border-radius: 999px;
  background: #d7cec7;
}

.ml-preview-sheet header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.ml-preview-sheet header button {
  min-width: 52px;
  min-height: 44px;
  border: 0;
  color: var(--ml-muted);
  background: transparent;
  font-family: "Azeret Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.ml-preview-route {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--preview-route-color, var(--ml-red));
  font-family: "Azeret Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.ml-preview-sheet h2 {
  margin: 6px 0 8px;
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.ml-preview-sheet > p {
  margin: 0;
  color: var(--ml-muted);
  font-size: 12px;
  line-height: 1.65;
}

.ml-preview-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 12px;
}

.ml-preview-meta span {
  padding: 12px;
  border: 1px solid var(--ml-line);
  border-radius: 18px;
  background: white;
}

.ml-preview-meta small,
.ml-preview-meta strong {
  display: block;
}

.ml-preview-meta small {
  margin-bottom: 5px;
  color: var(--ml-muted);
  font-size: 8px;
}

.ml-preview-meta strong {
  font-size: 11px;
  line-height: 1.45;
}

.ml-preview-status {
  margin-bottom: 12px;
  padding: 13px;
  border-radius: 18px;
  color: #315c4d;
  background: #e8f3ed;
}

.ml-preview-status span {
  font-family: "Azeret Mono", monospace;
  font-size: 8px;
  font-weight: 700;
}

.ml-preview-status p {
  margin: 5px 0 0;
  font-size: 10px;
  line-height: 1.55;
}

.ml-bottom-nav {
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin: 0 10px 6px;
  padding: 7px;
  border: 1px solid rgba(23, 35, 31, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 30px rgba(31, 45, 40, 0.12);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ml-bottom-nav.hidden {
  display: none;
}

.ml-bottom-nav button {
  min-height: 47px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 5px;
  border: 0;
  border-radius: 16px;
  color: #7c8681;
  background: transparent;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.ml-bottom-nav button span {
  font-family: "Azeret Mono", monospace;
  font-size: 8px;
}

.ml-bottom-nav button.active {
  color: white;
  background: var(--ml-ink);
}

.ml-home-indicator {
  flex: none;
  height: 13px;
  display: grid;
  place-items: start center;
}

.ml-home-indicator span {
  width: 106px;
  height: 4px;
  border-radius: 999px;
  background: rgba(23, 35, 31, 0.36);
}

.ml-toast {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 44px;
  z-index: 20;
  padding: 12px 14px;
  border-radius: 16px;
  color: white;
  background: rgba(19, 30, 26, 0.94);
  box-shadow: 0 14px 34px rgba(17, 28, 24, 0.24);
  font-size: 11px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.ml-toast.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes ml-view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ml-stop-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(228, 73, 79, 0.1); }
  50% { box-shadow: 0 0 0 9px rgba(228, 73, 79, 0.04); }
}

@keyframes ml-scan {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.35; }
  50% { transform: translate(-50%, 176px); opacity: 1; }
}

@keyframes ml-seal-in {
  from { opacity: 0; transform: rotate(-18deg) scale(0.55); }
  to { opacity: 1; transform: rotate(-4deg) scale(1); }
}

@keyframes ml-confetti {
  0%, 100% { transform: translateY(0) rotate(0); opacity: 0.45; }
  50% { transform: translateY(38px) rotate(170deg); opacity: 1; }
}

@media (min-width: 601px) {
  body[data-page-mode="mobile-v3"] {
    background:
      radial-gradient(circle at 8% 10%, rgba(228, 73, 79, 0.18), transparent 25%),
      radial-gradient(circle at 92% 86%, rgba(24, 132, 95, 0.2), transparent 28%),
      #14221f;
  }

  .ml-stage {
    width: min(1540px, calc(100% - 56px));
    min-height: 100dvh;
    display: block;
    padding: 24px 0;
  }

  .ml-device {
    width: 100%;
    height: calc(100dvh - 48px);
    padding: 0;
    border-radius: 34px;
    background: var(--ml-cream);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.28);
  }

  .ml-screen {
    height: 100%;
    border-radius: inherit;
  }

  .ml-view {
    padding: 30px clamp(32px, 5vw, 76px) 38px;
  }

  .ml-view > :not(.ml-action-dock) {
    max-width: 980px;
    margin-inline: auto;
  }

  .ml-action-dock {
    max-width: 988px;
    margin-inline: auto;
  }

  .ml-bottom-nav {
    width: min(980px, calc(100% - 48px));
    margin: 0 auto 18px;
  }

  .ml-home-indicator,
  .ml-device-label,
  .ml-status {
    display: none;
  }
}

@media (max-width: 1040px) {
  .ml-stage {
    grid-template-columns: 430px;
  }

  .ml-desktop-note {
    display: none;
  }
}

@media (max-width: 600px) {
  body[data-page-mode="mobile-v3"] {
    overflow: hidden;
    background: var(--ml-cream);
  }

  .ml-stage {
    width: 100%;
    min-height: 100dvh;
    display: block;
    padding: 0;
  }

  .ml-device {
    width: 100%;
    height: 100dvh;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--ml-cream);
    box-shadow: none;
  }

  .ml-device-label {
    display: none;
  }

  .ml-screen {
    height: 100dvh;
    border-radius: 0;
    padding-top: env(safe-area-inset-top);
  }

  .ml-status {
    min-height: 36px;
  }

  .ml-bottom-nav {
    margin-bottom: max(6px, env(safe-area-inset-bottom));
  }

  .ml-home-indicator {
    display: none;
  }
}

@media (max-width: 360px) {
  .ml-view {
    padding-inline: 12px;
  }

  .ml-feature-mission {
    grid-template-columns: 46px minmax(0, 1fr) 30px;
  }

  .ml-route-badge,
  .ml-character-mark {
    width: 46px;
    height: 46px;
  }

  .ml-feature-copy strong {
    font-size: 19px;
  }

  .ml-wallet > strong {
    font-size: 52px;
  }

  .ml-qr-code {
    width: 160px;
    height: 160px;
  }

  .ml-scan-beam {
    width: 164px;
  }
}

/* Metro-Link V3 concept site */
body[data-page-mode="site-v3"] {
  min-height: 100vh;
  overflow-x: hidden;
  color: #17231f;
  background:
    radial-gradient(circle at 14% 8%, rgba(228, 73, 79, 0.12), transparent 25%),
    radial-gradient(circle at 86% 30%, rgba(24, 132, 95, 0.11), transparent 26%),
    linear-gradient(180deg, #fbf7ee, #f1f6ef 48%, #eef3f7);
}

body[data-page-mode="site-v3"] .site-nav {
  width: min(1760px, calc(100% - 80px));
}

.site-nav-cta {
  color: white !important;
  background: #17231f;
}

.v3-hero {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
}

.v3-hero .hero-copy h1 {
  max-width: none;
  font-size: clamp(58px, 5.8vw, 96px);
  letter-spacing: -0.065em;
}

.v3-hero .hero-copy h1 > span {
  display: block;
}

.v3-hero .hero-copy p {
  max-width: 760px;
}

.v3-launch-panel {
  align-self: center;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 32px;
  color: white;
  background:
    radial-gradient(circle at 88% 4%, rgba(242, 181, 43, 0.2), transparent 25%),
    linear-gradient(145deg, #213a33, #101d1a 66%, #34202a);
  box-shadow: 0 28px 70px rgba(16, 31, 26, 0.25);
}

.v3-launch-panel-head,
.v3-launch-route,
.v3-launch-stats,
.v3-launch-personas,
.v3-launch-action {
  display: flex;
  align-items: center;
}

.v3-launch-panel-head {
  justify-content: space-between;
}

.v3-launch-panel-head span {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-family: "Azeret Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.v3-launch-panel-head strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.v3-launch-panel-head b {
  padding: 7px 10px;
  border-radius: 999px;
  color: #c7f3d7;
  background: rgba(141, 224, 174, 0.13);
  font-size: 10px;
}

.v3-launch-mission {
  margin: 20px 0 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px;
  background: linear-gradient(145deg, #c83240, #86182d 72%);
}

.v3-launch-route {
  gap: 9px;
}

.v3-launch-route span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: var(--ml-red);
  background: white;
  font-family: "Azeret Mono", monospace;
  font-size: 11px;
  font-weight: 700;
}

.v3-launch-route small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 700;
}

.v3-launch-mission > strong {
  display: block;
  margin-top: 20px;
  font-size: 25px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.v3-launch-mission p {
  margin: 9px 0 16px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 11px;
}

.v3-launch-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.v3-launch-progress i {
  display: block;
  width: 28%;
  height: 100%;
  border-radius: inherit;
  background: #ffd26f;
}

.v3-launch-stats {
  justify-content: space-between;
  margin: 0;
  padding: 14px 0;
  border-block: 1px solid rgba(255, 255, 255, 0.12);
}

.v3-launch-stats div {
  min-width: 0;
}

.v3-launch-stats dt {
  color: rgba(255, 255, 255, 0.5);
  font-size: 9px;
}

.v3-launch-stats dd {
  margin: 3px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.v3-launch-personas {
  gap: 8px;
  margin: 16px 0;
}

.v3-launch-personas span {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: #a9283b;
  font-family: "Azeret Mono", monospace;
  font-size: 10px;
  font-weight: 700;
}

.v3-launch-personas span:nth-child(2) { background: #116b4b; }
.v3-launch-personas span:nth-child(3) { background: #1e5dbb; }
.v3-launch-personas span:nth-child(4) { color: #3e2f05; background: #f2b52b; }

.v3-launch-action {
  justify-content: space-between;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 17px;
  color: #17231f;
  background: #fffdf8;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.v3-launch-action span {
  font-family: "Azeret Mono", monospace;
  font-size: 18px;
}

.v3-hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.v3-hero-proof span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 8px 12px;
  border: 1px solid rgba(23, 35, 31, 0.1);
  border-radius: 999px;
  color: #5a6762;
  background: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.v3-hero-proof b {
  color: #a92134;
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
}

.v3-phone {
  min-height: 700px;
  background:
    radial-gradient(circle at 80% 7%, rgba(255, 212, 141, 0.38), transparent 28%),
    linear-gradient(180deg, #fffaf1, #f5eee3);
}

.v3-phone-appbar {
  margin-top: 24px;
}

.v3-phone-appbar span,
.v3-phone-appbar strong {
  display: block;
}

.v3-phone-appbar span {
  color: #a92134;
  font-family: "Azeret Mono", monospace;
  font-size: 9px;
  font-weight: 700;
}

.v3-phone-appbar strong {
  margin-top: 4px;
  font-size: 27px;
}

.v3-phone .hero-phone-wallet {
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 214, 132, 0.24), transparent 25%),
    #17231f;
}

.v3-phone-mission {
  position: relative;
  min-height: 224px;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 86% 8%, rgba(255, 216, 142, 0.28), transparent 25%),
    linear-gradient(135deg, #dd4450, #941a34);
}

.v3-phone-mission span {
  color: rgba(255, 255, 255, 0.62);
}

.v3-phone-mission strong {
  font-size: 29px;
}

.v3-phone-mission p {
  color: rgba(255, 255, 255, 0.7);
}

.v3-phone-mission i {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.v3-phone-mission i::after {
  content: "";
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: #ffd26f;
}

.v3-phone-personas {
  position: absolute;
  inset: auto 18px 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.v3-phone-personas span {
  display: grid;
  min-height: 54px;
  place-items: center;
  border-radius: 19px;
  color: white;
  background: #e4494f;
  font-family: "Azeret Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.v3-phone-personas span:nth-child(2) { background: #18845f; }
.v3-phone-personas span:nth-child(3) { background: #3276e8; }
.v3-phone-personas span:nth-child(4) { color: #3e2f05; background: #f2b52b; }

.section-head > p {
  max-width: 680px;
  margin: 18px 0 0;
  color: #586660;
  font-size: 17px;
  line-height: 1.7;
}

.site-persona-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.site-persona-card {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(23, 35, 31, 0.1);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 40px rgba(32, 49, 43, 0.06);
}

.site-persona-card::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -85px;
  bottom: -85px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.18;
}

.site-persona-card > span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: currentColor;
  font-family: "Azeret Mono", monospace;
  font-size: 15px;
  font-weight: 700;
}

.site-persona-card > span::first-line {
  color: white;
}

.site-persona-card small {
  display: block;
  margin-top: 38px;
  color: #66736e;
  font-size: 11px;
}

.site-persona-card h3 {
  margin: 7px 0 5px;
  color: #17231f;
  font-size: 24px;
  line-height: 1.18;
}

.site-persona-card strong {
  color: currentColor;
  font-size: 13px;
}

.site-persona-card p {
  margin: 12px 0 0;
  color: #586660;
  font-size: 14px;
  line-height: 1.65;
}

.site-persona-card.red { color: #a9283b; background: linear-gradient(145deg, #fff1ef, rgba(255,255,255,0.78)); }
.site-persona-card.green { color: #116b4b; background: linear-gradient(145deg, #edf9f1, rgba(255,255,255,0.78)); }
.site-persona-card.blue { color: #1e5dbb; background: linear-gradient(145deg, #edf3ff, rgba(255,255,255,0.78)); }
.site-persona-card.yellow { color: #825800; background: linear-gradient(145deg, #fff8df, rgba(255,255,255,0.78)); }

.v3-journey-section {
  border-top: 1px solid rgba(23, 35, 31, 0.1);
}

.v3-journey {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 36px;
}

.v3-journey article {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border-radius: 22px;
  color: white;
  background: #17231f;
}

.v3-journey article:nth-child(2),
.v3-journey article:nth-child(5) {
  color: #17231f;
  background: #ffe2df;
}

.v3-journey article:nth-child(3),
.v3-journey article:nth-child(6) {
  color: #17231f;
  background: #dff3e7;
}

.v3-journey span {
  font-family: "Azeret Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.64;
}

.v3-journey strong {
  margin-top: auto;
  font-size: 19px;
}

.v3-journey p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
  opacity: 0.7;
}

.v3-platform {
  grid-template-columns: minmax(0, 0.9fr) minmax(520px, 1.1fr);
}

.v3-value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.v3-value-grid article {
  min-height: 220px;
  padding: 18px;
  border: 1px solid rgba(23, 35, 31, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
}

.v3-value-grid span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #a92134;
  background: #ffe2df;
  font-size: 10px;
  font-weight: 800;
}

.v3-value-grid strong {
  display: block;
  margin-top: 58px;
  font-size: 20px;
  line-height: 1.25;
}

.v3-value-grid p {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.6;
}

.v3-cta {
  width: min(1720px, calc(100% - 64px));
  margin: 0 auto;
  padding: 90px 0 110px;
  flex-direction: row;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
}

.v3-cta p {
  max-width: 720px;
  margin: 16px 0 0;
  color: #586660;
  font-size: 17px;
  line-height: 1.65;
}

.v3-cta .site-primary {
  flex: none;
  min-height: 58px;
  padding-inline: 24px;
  border-radius: 999px;
}

@media (max-width: 1180px) {
  .site-persona-grid,
  .v3-journey {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v3-platform {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  body[data-page-mode="site-v3"] .site-nav {
    width: calc(100% - 24px);
  }

  .v3-hero {
    grid-template-columns: 1fr;
  }

  .v3-hero .hero-copy h1 {
    font-size: 54px;
  }

  .v3-phone {
    min-height: 650px;
  }

  .v3-value-grid {
    grid-template-columns: 1fr;
  }

  .v3-value-grid article {
    min-height: 170px;
  }

  .v3-value-grid strong {
    margin-top: 34px;
  }

  .v3-cta {
    width: calc(100% - 24px);
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 560px) {
  .site-nav nav a:not(.site-nav-cta) {
    display: none;
  }

  .site-nav nav {
    max-width: none;
    border: 0;
    padding: 0;
    background: transparent;
  }

  .site-nav-cta {
    min-height: 42px !important;
    padding-inline: 14px !important;
  }

  .v3-hero .hero-copy h1 {
    font-size: 44px;
    line-height: 0.98;
  }

  .v3-hero .hero-copy p {
    font-size: 17px;
  }

  .v3-hero-proof {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .v3-hero-proof span {
    justify-content: center;
    padding-inline: 6px;
    font-size: 9px;
  }

  .site-persona-grid,
  .v3-journey {
    grid-template-columns: 1fr;
  }

  .site-persona-card {
    min-height: 280px;
  }

  .v3-journey article {
    min-height: 160px;
  }

  .v3-cta .site-primary {
    width: 100%;
  }
}

/* One-page presentation demo */
body[data-page-mode="demo"] {
  --demo-ink: #17231f;
  --demo-muted: #53635d;
  --demo-line: rgba(23, 35, 31, 0.14);
  --demo-red: #c93443;
  --demo-red-dark: #8f1d2b;
  --demo-red-soft: #fff0ed;
  --demo-green: #116b4b;
  --demo-green-dark: #0d4535;
  --demo-green-soft: #eaf6ef;
  --demo-frame-inline: clamp(12px, 1.5vw, 24px);
  --demo-frame-block: clamp(8px, 1.8dvh, 24px);
  --demo-layout-gap: clamp(8px, 1.5dvh, 18px);
  --demo-card-pad: clamp(12px, 2dvh, 24px);
  --demo-control-height: clamp(48px, 7dvh, 64px);
  --demo-radius-large: clamp(20px, 2.8dvh, 28px);
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--demo-ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(226, 73, 79, 0.15), transparent 28%),
    radial-gradient(circle at 94% 12%, rgba(22, 132, 95, 0.14), transparent 25%),
    linear-gradient(rgba(23, 35, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 35, 31, 0.035) 1px, transparent 1px),
    #f4efe3;
  background-size: auto, auto, 38px 38px, 38px 38px, auto;
  font-family: "Noto Sans TC", sans-serif;
}

body[data-page-mode="demo"] *,
body[data-page-mode="demo"] *::before,
body[data-page-mode="demo"] *::after {
  box-sizing: border-box;
}

body[data-page-mode="demo"] button,
body[data-page-mode="demo"] a {
  font-family: inherit;
}

body[data-page-mode="demo"] button:focus-visible,
body[data-page-mode="demo"] a:focus-visible {
  outline: 4px solid #f2b52b;
  outline-offset: 3px;
}

body[data-page-mode="demo"] [hidden] {
  display: none !important;
}

.demo-shell {
  width: min(1760px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: var(--demo-frame-block) var(--demo-frame-inline);
}

.demo-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  overflow: hidden;
  padding: var(--demo-card-pad) clamp(18px, 2vw, 32px);
  border-radius: var(--demo-radius-large);
  color: white;
  background:
    linear-gradient(115deg, rgba(201, 52, 67, 0.2), transparent 38%),
    linear-gradient(135deg, #17231f, #0e2d25);
  box-shadow: 0 24px 60px rgba(23, 35, 31, 0.18);
}

.demo-hero::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: 11%;
  bottom: -235px;
  border: 22px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  pointer-events: none;
}

.demo-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
}

.demo-brand > span {
  display: grid;
  width: clamp(48px, 7dvh, 58px);
  height: clamp(48px, 7dvh, 58px);
  place-items: center;
  border-radius: 18px;
  color: #17231f;
  background: #ffd26f;
  font-family: "Space Grotesk", sans-serif;
  font-size: 21px;
  font-weight: 700;
  transform: rotate(-4deg);
}

.demo-brand small,
.demo-brand strong {
  display: block;
}

.demo-brand small,
.demo-eyebrow {
  font-family: "Azeret Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.demo-brand small {
  color: rgba(255, 255, 255, 0.6);
}

.demo-brand strong {
  margin-top: 3px;
  font-size: 18px;
}

.demo-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.demo-hero-copy .demo-eyebrow {
  color: #ffd26f;
}

.demo-hero h1 {
  margin: 7px 0 0;
  font-size: clamp(30px, 4.8dvh, 52px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.demo-hero-copy p {
  max-width: 900px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(15px, 2.2dvh, 20px);
  line-height: 1.55;
}

.demo-reset {
  position: relative;
  z-index: 1;
  min-height: var(--demo-control-height);
  padding: 0 clamp(16px, 1.7vw, 24px);
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  font-size: clamp(16px, 2.2dvh, 18px);
  font-weight: 900;
  cursor: pointer;
}

.demo-reset:hover {
  color: var(--demo-ink);
  background: white;
}

.demo-reset:disabled {
  cursor: wait;
  opacity: 0.58;
}

.demo-hero-actions {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  min-width: 172px;
}

.demo-sound-toggle {
  display: grid;
  gap: 3px;
  min-height: var(--demo-control-height);
  padding: 8px 18px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  text-align: left;
  cursor: pointer;
}

.demo-sound-toggle span {
  color: rgba(255, 255, 255, 0.62);
  font-family: "Azeret Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.demo-sound-toggle strong {
  font-size: 16px;
}

.demo-sound-toggle[aria-pressed="false"] {
  color: var(--demo-ink);
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.82);
}

.demo-sound-toggle[aria-pressed="false"] span {
  color: var(--demo-muted);
}

.demo-sound-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.demo-sound-toggle[aria-pressed="false"]:hover {
  background: white;
}

.demo-alert {
  margin-top: 14px;
  padding: 16px 20px;
  border: 2px solid #b42636;
  border-radius: 16px;
  color: #7d1524;
  background: #fff0ed;
  font-size: 18px;
  font-weight: 800;
}

.demo-alert[data-kind="success"] {
  border-color: #16845f;
  color: #0d5c41;
  background: #e8f7ee;
}

.demo-story {
  display: grid;
  grid-template-columns: minmax(360px, 0.7fr) minmax(600px, 1.3fr);
  gap: 16px;
  margin-top: 16px;
}

.demo-current-step,
.demo-steps {
  border: 1px solid var(--demo-line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 32px rgba(32, 49, 43, 0.07);
}

.demo-current-step {
  padding: clamp(13px, 2dvh, 20px) clamp(16px, 1.8vw, 24px);
  border-left: 8px solid var(--demo-red);
}

.demo-current-step > span {
  display: block;
  color: var(--demo-red-dark);
  font-family: "Azeret Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.demo-current-step > strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(20px, 3.2dvh, 29px);
  line-height: 1.25;
}

.demo-current-step > p {
  margin: 8px 0 0;
  color: var(--demo-muted);
  font-size: 16px;
  line-height: 1.55;
}

.demo-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-block: 0;
  padding: clamp(8px, 1.4dvh, 12px);
  list-style: none;
}

.demo-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: clamp(8px, 1.5dvh, 12px);
  border-radius: 15px;
  color: #718079;
  background: #f0f1ec;
}

.demo-steps li > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-family: "Azeret Mono", monospace;
  font-size: 14px;
  font-weight: 700;
}

.demo-steps li > strong {
  font-size: 16px;
  line-height: 1.25;
}

.demo-steps li.active {
  color: white;
  background: var(--demo-red);
  box-shadow: 0 10px 24px rgba(201, 52, 67, 0.22);
}

.demo-steps li.complete {
  color: #0c5b40;
  background: #dff3e7;
}

.demo-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--demo-layout-gap);
  margin-top: 18px;
}

.demo-panel {
  min-width: 0;
  overflow: hidden;
  padding: var(--demo-card-pad);
  border: 1px solid var(--demo-line);
  border-radius: var(--demo-radius-large);
  box-shadow: 0 22px 54px rgba(32, 49, 43, 0.1);
  animation: demo-panel-in 480ms ease both;
}

.demo-member-panel {
  border-top: 8px solid var(--demo-red);
  background: linear-gradient(155deg, #fffaf6, #fff1ee);
}

.demo-merchant-panel {
  border-top: 8px solid var(--demo-green);
  background: linear-gradient(155deg, #f9fcf9, #eaf6ef);
  animation-delay: 90ms;
}

.demo-panel-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.demo-side-label {
  display: grid;
  min-width: 78px;
  min-height: 68px;
  place-content: center;
  border-radius: 17px;
  color: white;
  text-align: center;
}

.demo-side-label.member {
  background: var(--demo-red);
}

.demo-side-label.merchant {
  background: var(--demo-green);
}

.demo-side-label span,
.demo-side-label strong {
  display: block;
}

.demo-side-label span {
  font-size: 12px;
  opacity: 0.76;
}

.demo-side-label strong {
  font-size: 18px;
}

.demo-panel-head .demo-eyebrow {
  color: var(--demo-muted);
  font-size: 10px;
}

.demo-panel-head h2 {
  margin: 3px 0 0;
  font-size: clamp(22px, 3.5dvh, 32px);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.demo-status {
  align-self: start;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--demo-red-dark);
  background: #ffe0dc;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.demo-status.waiting {
  color: #6d5400;
  background: #fff0bb;
}

.demo-status.complete,
.demo-member-panel .demo-status.complete {
  color: #0b5d40;
  background: #d8f0e2;
}

.demo-status.logged-in {
  color: #0b5d40;
  background: #d8f0e2;
}

.demo-member-summary,
.demo-merchant-summary {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.demo-member-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.demo-merchant-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.demo-member-summary > div,
.demo-merchant-summary > div {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--demo-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
}

.demo-member-summary span,
.demo-merchant-summary span {
  display: block;
  color: var(--demo-muted);
  font-size: 14px;
  font-weight: 700;
}

.demo-member-summary strong,
.demo-merchant-summary strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-size: 20px;
  line-height: 1.25;
}

.demo-member-summary .demo-points {
  color: white;
  background: var(--demo-red-dark);
}

.demo-member-summary .demo-points span,
.demo-member-summary .demo-points small {
  color: rgba(255, 255, 255, 0.72);
}

.demo-member-summary .demo-points strong {
  display: inline-block;
  margin-right: 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 42px;
  line-height: 1;
}

.demo-member-start,
.demo-member-home,
.demo-color-picker,
.demo-merchant-login {
  margin-top: 14px;
  padding: 22px;
  border: 2px solid rgba(23, 35, 31, 0.12);
  border-radius: 20px;
  background: white;
}

.demo-merchant-login {
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 210, 111, 0.3), transparent 28%),
    linear-gradient(145deg, #f3fbf5, #ffffff);
}

.demo-merchant-login .demo-flow-kicker {
  color: var(--demo-green-dark);
}

.demo-merchant-login h3 {
  margin: 7px 0 0;
  color: var(--demo-ink);
  font-size: clamp(24px, 2.1vw, 32px);
  line-height: 1.2;
}

.demo-merchant-login p {
  margin: 9px 0 0;
  color: var(--demo-muted);
  font-size: 16px;
  line-height: 1.55;
}

.demo-merchant-login small {
  display: block;
  margin-top: 10px;
  color: var(--demo-muted);
  font-size: 13px;
}

.demo-member-start {
  color: white;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 210, 111, 0.32), transparent 28%),
    linear-gradient(145deg, #8f1d2b, #c93443);
  box-shadow: 0 18px 34px rgba(143, 29, 43, 0.2);
}

.demo-flow-kicker {
  display: block;
  color: var(--demo-red-dark);
  font-family: "Azeret Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.demo-member-start .demo-flow-kicker {
  color: #ffd9c9;
}

.demo-member-start h3,
.demo-member-home h3,
.demo-color-picker h3 {
  margin: 7px 0 0;
  font-size: clamp(24px, 2.1vw, 32px);
  line-height: 1.2;
}

.demo-member-start p,
.demo-member-home > p,
.demo-color-picker > p {
  margin: 9px 0 0;
  color: var(--demo-muted);
  font-size: 16px;
  line-height: 1.55;
}

.demo-member-start p {
  color: rgba(255, 255, 255, 0.78);
}

.demo-member-start .demo-primary {
  color: var(--demo-ink);
  background: #ffd26f;
}

.demo-home-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.demo-home-stats > div {
  min-width: 0;
  padding: 14px;
  border-radius: 15px;
  background: #fff5ef;
}

.demo-home-stats span,
.demo-home-stats strong {
  display: block;
}

.demo-home-stats span {
  color: var(--demo-muted);
  font-size: 13px;
  font-weight: 700;
}

.demo-home-stats strong {
  margin-top: 7px;
  overflow-wrap: anywhere;
  color: var(--demo-ink);
  font-size: 18px;
  line-height: 1.3;
}

.demo-home-stats > div:first-child {
  color: white;
  background: var(--demo-red-dark);
}

.demo-home-stats > div:first-child span,
.demo-home-stats > div:first-child strong {
  color: white;
}

.demo-color-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding: 14px;
  border: 2px solid var(--demo-red);
  border-radius: 16px;
  background: var(--demo-red-soft);
}

.demo-color-route {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 3px solid white;
  border-radius: 50%;
  color: white;
  background: var(--demo-red);
  box-shadow: 0 5px 0 var(--demo-red-dark);
  font-family: "Azeret Mono", monospace;
  font-size: 20px;
  font-weight: 700;
}

.demo-color-choice strong,
.demo-color-choice span {
  display: block;
}

.demo-color-choice strong {
  color: var(--demo-ink);
  font-size: 18px;
}

.demo-color-choice span {
  margin-top: 3px;
  color: var(--demo-muted);
  font-size: 14px;
}

.demo-color-choice > b {
  padding: 6px 9px;
  border-radius: 999px;
  color: white;
  background: var(--demo-red);
  font-size: 12px;
}

.demo-mission-card,
.demo-action-card,
.demo-qr-card,
.demo-member-result,
.demo-data-note,
.demo-pending-card,
.demo-outcome-card,
.demo-transaction {
  margin-top: 14px;
  border-radius: 20px;
}

.demo-mission-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
  color: white;
  background: #3a1c22;
}

.demo-route-mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 4px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: var(--demo-red);
  font-family: "Azeret Mono", monospace;
  font-size: 22px;
  font-weight: 700;
}

.demo-mission-card span,
.demo-mission-card h3,
.demo-mission-card p {
  display: block;
  margin: 0;
}

.demo-mission-card span {
  color: #ffc9c3;
  font-size: 13px;
  font-weight: 800;
}

.demo-mission-card h3 {
  margin-top: 4px;
  font-size: 23px;
  line-height: 1.25;
}

.demo-mission-card p {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
}

.demo-route-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding: 14px 6px 2px;
  --route-progress: 0%;
}

.demo-route-track-line {
  position: absolute;
  top: 34px;
  right: 16%;
  left: 16%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--demo-red) 0 var(--route-progress),
    #eadbd5 var(--route-progress) 100%
  );
}

.demo-route-stop {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  color: #8d8178;
  text-align: center;
}

.demo-route-stop > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 4px solid #fff1ee;
  border-radius: 50%;
  color: #8d8178;
  background: #eadbd5;
  font-family: "Azeret Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.demo-route-stop > strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.25;
}

.demo-route-stop[data-state="active"] {
  color: var(--demo-red-dark);
}

.demo-route-stop[data-state="active"] > span {
  color: white;
  background: var(--demo-red);
  box-shadow: 0 0 0 5px rgba(201, 52, 67, 0.12);
  animation: demo-route-pulse 1.8s ease-in-out infinite;
}

.demo-route-stop[data-state="complete"] {
  color: #0c5b40;
}

.demo-route-stop[data-state="complete"] > span {
  color: white;
  background: var(--demo-green);
}

.demo-action-card,
.demo-pending-card {
  padding: 20px;
  border: 2px solid rgba(23, 35, 31, 0.12);
  background: white;
}

.demo-action-card > span,
.demo-pending-card > span,
.demo-member-result > span,
.demo-transaction > span {
  color: var(--demo-muted);
  font-family: "Azeret Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.demo-action-card h3,
.demo-pending-card h3,
.demo-member-result h3 {
  margin: 6px 0 0;
  font-size: 25px;
  line-height: 1.25;
}

.demo-action-card p,
.demo-pending-card p {
  margin: 8px 0 0;
  color: var(--demo-muted);
  font-size: 16px;
  line-height: 1.55;
}

.demo-primary {
  width: 100%;
  min-height: var(--demo-control-height);
  margin-top: 18px;
  padding: 10px 20px;
  border: 0;
  border-radius: 16px;
  color: white;
  font-size: clamp(17px, 2.5dvh, 20px);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(23, 35, 31, 0.15);
}

.demo-primary.member {
  background: var(--demo-red);
}

.demo-primary.merchant {
  background: var(--demo-green);
}

.demo-primary:not(:disabled):hover {
  filter: brightness(0.92);
  transform: translateY(-1px);
}

.demo-primary:disabled {
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.55;
}

.demo-qr-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  grid-template-areas:
    "qr label"
    "qr code"
    "qr note";
  align-items: center;
  gap: 8px 22px;
  padding: 18px;
  color: white;
  background: var(--demo-red-dark);
  box-shadow: 0 18px 34px rgba(143, 29, 43, 0.2);
  --demo-qr-size: 176px;
}

.demo-qr-card::after {
  position: absolute;
  top: 18px;
  left: 18px;
  width: var(--demo-qr-size);
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #ffd26f 18%, white 50%, #ffd26f 82%, transparent);
  box-shadow: 0 0 16px rgba(255, 210, 111, 0.78);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateY(0);
}

.demo-qr-card.demo-scan-active::after {
  animation: demo-qr-scan 1.1s ease-in-out infinite;
  opacity: 1;
}

.demo-qr-card > span {
  grid-area: label;
  align-self: end;
  color: #ffc9c3;
  font-size: 15px;
  font-weight: 800;
}

.demo-qr-card > img {
  grid-area: qr;
  display: block;
  width: 176px;
  height: 176px;
  padding: 9px;
  border-radius: 14px;
  background: white;
}

.demo-qr-card > strong {
  grid-area: code;
  font-family: "Azeret Mono", monospace;
  font-size: clamp(22px, 2.1vw, 32px);
  overflow-wrap: anywhere;
}

.demo-qr-card > small {
  grid-area: note;
  align-self: start;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
}

.demo-member-result {
  position: relative;
  overflow: hidden;
  padding: 20px;
  color: #0c4c38;
  background: #dff3e7;
}

.demo-result-metrics {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 10px;
  margin-top: 14px;
}

.demo-result-metric {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 13px;
  border: 1px solid rgba(12, 76, 56, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
}

.demo-result-metric > span {
  color: #39735d;
  font-size: 12px;
  font-weight: 800;
}

.demo-result-metric strong {
  white-space: nowrap;
  color: var(--demo-green-dark);
  font-size: clamp(17px, 1.9vw, 30px);
  line-height: 1.05;
}

.demo-result-summary {
  margin: 14px 0 0;
  color: #39735d;
  font-size: 15px;
  font-weight: 800;
}

.demo-member-result.result-reveal {
  animation: demo-result-card-in 520ms cubic-bezier(0.22, 0.78, 0.3, 1) both;
}

.demo-member-result.result-reveal::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -34%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  content: "";
  pointer-events: none;
  animation: demo-result-sweep 1.5s ease-out 120ms both;
}

.demo-member-result.result-reveal .demo-result-metric {
  opacity: 0;
  animation: demo-result-metric-in 460ms cubic-bezier(0.22, 0.78, 0.3, 1) var(--result-delay, 0ms) both;
}

.demo-member-result.result-reveal .demo-result-metric:nth-child(1) {
  --result-delay: 300ms;
}

.demo-member-result.result-reveal .demo-result-metric:nth-child(2) {
  --result-delay: 680ms;
}

.demo-member-result.result-reveal .demo-result-metric:nth-child(3) {
  --result-delay: 1060ms;
}

.demo-member-result.result-reveal .demo-result-summary {
  opacity: 0;
  animation: demo-result-summary-in 420ms ease-out 1.55s both;
}

.demo-data-note {
  padding: 16px 18px;
  border: 1px solid rgba(30, 93, 187, 0.18);
  color: #183d72;
  background: #edf3ff;
}

.demo-data-note span,
.demo-data-note strong {
  display: block;
}

.demo-data-note span {
  font-size: 12px;
  font-weight: 900;
}

.demo-data-note strong {
  margin-top: 4px;
  font-size: 19px;
}

.demo-data-note p {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.55;
}

.demo-pending-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 13px;
  color: white;
  background: var(--demo-green-dark);
}

.demo-pending-code span {
  font-size: 13px;
}

.demo-pending-code strong {
  font-family: "Azeret Mono", monospace;
  font-size: 20px;
  overflow-wrap: anywhere;
  text-align: right;
}

.demo-pending-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.demo-pending-details > div {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 13px;
  background: #eef8f0;
}

.demo-pending-details span,
.demo-pending-details strong {
  display: block;
}

.demo-pending-details span {
  color: var(--demo-muted);
  font-size: 12px;
  font-weight: 700;
}

.demo-pending-details strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--demo-ink);
  font-size: 18px;
  line-height: 1.25;
}

.demo-manual-note {
  margin: 10px 0 0;
  color: var(--demo-muted);
  font-size: 13px;
  line-height: 1.45;
}

.demo-scan-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 13px;
  color: #315246;
  background: #eef8f0;
}

.demo-scan-status[data-status="scanned"] {
  color: #8f1d2b;
  background: #fff0ed;
}

.demo-scan-status[data-status="completed"] {
  color: #0c4c38;
  background: #dff3e7;
}

.demo-scan-status[data-status="error"] {
  color: #8f1d2b;
  background: #fff5ef;
}

.demo-scan-status-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--demo-green);
  box-shadow: 0 0 0 4px rgba(22, 132, 95, 0.12);
}

.demo-scan-status[data-status="scanned"] .demo-scan-status-dot {
  background: var(--demo-red);
  box-shadow: 0 0 0 4px rgba(201, 52, 67, 0.12);
}

.demo-scan-status[data-status="completed"] .demo-scan-status-dot {
  background: var(--demo-green-dark);
}

.demo-scan-status[data-status="error"] .demo-scan-status-dot {
  background: var(--demo-red-dark);
}

.demo-scan-status strong {
  font-size: 16px;
  line-height: 1.3;
}

.demo-split {
  position: relative;
}

.demo-cross-signal {
  position: absolute;
  top: 47%;
  left: 50%;
  z-index: 3;
  width: 76px;
  height: 18px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.demo-cross-signal::before {
  position: absolute;
  top: 7px;
  right: 4px;
  left: 4px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--demo-red), var(--demo-green));
  content: "";
  opacity: 0.8;
}

.demo-cross-signal span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--demo-red);
  box-shadow: 0 0 0 4px rgba(201, 52, 67, 0.18), 0 0 14px rgba(255, 210, 111, 0.8);
}

.demo-split.demo-scan-active .demo-cross-signal {
  opacity: 1;
}

.demo-split.demo-scan-active .demo-cross-signal span {
  animation: demo-signal-travel 1.05s cubic-bezier(0.22, 0.78, 0.3, 1) forwards;
}

.demo-outcome-grid > div.demo-outcome-pop {
  animation: demo-outcome-pop 460ms cubic-bezier(0.22, 0.78, 0.3, 1) var(--outcome-delay, 0ms) both;
}

.demo-outcome-card {
  padding: 20px;
  color: white;
  background: #17231f;
  box-shadow: 0 18px 38px rgba(23, 35, 31, 0.18);
}

.demo-outcome-card > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.demo-outcome-card .demo-eyebrow {
  color: rgba(255, 255, 255, 0.55);
}

.demo-outcome-card h3 {
  margin: 5px 0 0;
  font-size: 25px;
}

.demo-outcome-card > header > span {
  padding: 7px 11px;
  border-radius: 999px;
  color: #ffe7a4;
  background: rgba(255, 210, 111, 0.14);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.demo-outcome-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.demo-outcome-grid > div {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.06);
}

.demo-outcome-grid span,
.demo-outcome-grid strong {
  display: block;
}

.demo-outcome-grid span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
}

.demo-outcome-grid strong {
  margin-top: 7px;
  color: #ffd26f;
  font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
  font-size: clamp(27px, 2.5vw, 40px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.demo-outcome-card > p {
  margin: 15px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.55;
}

.demo-transaction {
  padding: 18px;
  border: 2px solid #16845f;
  color: #0c4c38;
  background: #dff3e7;
}

.demo-transaction strong {
  display: block;
  margin-top: 5px;
  font-family: "Azeret Mono", monospace;
  font-size: 22px;
}

.demo-transaction p {
  margin: 7px 0 0;
  font-size: 15px;
  line-height: 1.5;
}

.demo-disclosure {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 16px 20px;
  border: 1px solid var(--demo-line);
  border-radius: 18px;
  color: var(--demo-muted);
  background: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

.demo-disclosure > strong {
  flex: none;
  color: var(--demo-ink);
}

.demo-disclosure > p {
  margin: 0;
}

.demo-disclosure nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.demo-disclosure a {
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--demo-green-dark);
  background: #e5eee9;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

@keyframes demo-panel-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes demo-route-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(201, 52, 67, 0.1); }
  50% { box-shadow: 0 0 0 9px rgba(201, 52, 67, 0.04); }
}

@keyframes demo-qr-scan {
  0%, 100% { transform: translateY(0); opacity: 0.42; }
  50% { transform: translateY(calc(var(--demo-qr-size) - 8px)); opacity: 1; }
}

@keyframes demo-signal-travel {
  from { transform: translateX(0); }
  to { transform: translateX(58px); }
}

@keyframes demo-outcome-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes demo-result-card-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes demo-result-metric-in {
  from { opacity: 0; transform: translateY(18px) scale(0.88); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes demo-result-summary-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes demo-result-sweep {
  from { transform: translateX(0) skewX(-18deg); }
  to { transform: translateX(520%) skewX(-18deg); }
}

@media (prefers-reduced-motion: reduce) {
  .demo-member-result.result-reveal,
  .demo-member-result.result-reveal .demo-result-metric,
  .demo-member-result.result-reveal .demo-result-summary {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .demo-member-result.result-reveal::after {
    display: none;
  }
}

@media (max-width: 1280px) {
  .demo-shell {
    width: calc(100% - 24px);
  }

  .demo-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .demo-hero-actions {
    grid-column: 1 / -1;
    justify-self: end;
    display: flex;
    align-items: center;
  }

  .demo-hero-actions .demo-reset {
    min-height: 52px;
  }

  .demo-story {
    grid-template-columns: 1fr;
  }

  .demo-current-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 16px;
  }

  .demo-current-step > span {
    align-self: center;
    grid-row: 1 / 3;
  }

  .demo-current-step > strong,
  .demo-current-step > p {
    margin-top: 0;
  }
}

@media (min-width: 981px) {
  body[data-page-mode="demo"] {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .demo-shell {
    display: flex;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    flex-direction: column;
    gap: var(--demo-layout-gap);
    overflow: hidden;
  }

  .demo-hero,
  .demo-story,
  .demo-split,
  .demo-disclosure,
  .demo-alert {
    margin: 0;
  }

  .demo-hero {
    flex: 0 0 auto;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: clamp(12px, 1.5vw, 24px);
    padding: clamp(10px, 1.6dvh, 18px) clamp(16px, 1.8vw, 28px);
  }

  .demo-brand {
    gap: 10px;
  }

  .demo-brand small,
  .demo-hero-copy .demo-eyebrow {
    font-size: clamp(9px, 1.2dvh, 11px);
  }

  .demo-brand strong {
    font-size: clamp(14px, 2dvh, 17px);
  }

  .demo-hero h1 {
    margin-top: 3px;
    font-size: clamp(32px, 5dvh, 48px);
  }

  .demo-hero-copy p {
    margin-top: 5px;
    font-size: clamp(13px, 1.9dvh, 18px);
    line-height: 1.35;
  }

  .demo-hero-actions {
    display: flex;
    min-width: 0;
    grid-column: auto;
    align-items: center;
    justify-self: auto;
    gap: 8px;
  }

  .demo-sound-toggle,
  .demo-reset,
  .demo-hero-actions .demo-reset {
    min-height: clamp(42px, 5.8dvh, 52px);
  }

  .demo-sound-toggle {
    min-width: 132px;
    padding: 5px 12px;
    border-radius: 13px;
  }

  .demo-reset {
    padding-inline: clamp(13px, 1.4vw, 20px);
    white-space: nowrap;
  }

  .demo-alert {
    flex: 0 0 auto;
    padding: clamp(10px, 1.5dvh, 14px) 18px;
    font-size: clamp(14px, 2dvh, 17px);
  }

  .demo-story {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: minmax(300px, 0.7fr) minmax(0, 1.3fr);
    gap: var(--demo-layout-gap);
  }

  .demo-current-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    padding: clamp(9px, 1.5dvh, 14px) clamp(13px, 1.4vw, 20px);
    border-left-width: 6px;
  }

  .demo-current-step > span {
    grid-row: 1 / 3;
    font-size: clamp(12px, 1.7dvh, 14px);
  }

  .demo-current-step > strong {
    margin-top: 0;
    font-size: clamp(21px, 3.1dvh, 28px);
  }

  .demo-current-step > p {
    margin-top: 2px;
    overflow: hidden;
    font-size: clamp(12px, 1.7dvh, 15px);
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .demo-steps {
    gap: clamp(3px, 0.5vw, 7px);
    padding: clamp(5px, 1dvh, 9px);
  }

  .demo-steps li {
    gap: clamp(4px, 0.6vw, 8px);
    padding: clamp(5px, 1dvh, 9px);
  }

  .demo-steps li > span {
    width: clamp(27px, 3.8dvh, 32px);
    height: clamp(27px, 3.8dvh, 32px);
    font-size: clamp(11px, 1.6dvh, 13px);
  }

  .demo-steps li > strong {
    font-size: clamp(13px, 2dvh, 16px);
  }

  .demo-split {
    min-height: 0;
    flex: 1 1 0;
    align-items: stretch;
  }

  .demo-panel {
    height: 100%;
    min-height: 0;
  }

  .demo-disclosure {
    flex: 0 0 auto;
    gap: 10px;
    padding: clamp(7px, 1.1dvh, 11px) clamp(12px, 1.2vw, 18px);
    border-radius: 14px;
    font-size: clamp(11px, 1.6dvh, 13px);
  }

  .demo-disclosure > p {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .demo-disclosure a {
    padding: 5px 9px;
  }

  .demo-panel {
    display: flex;
    flex-direction: column;
  }

  .demo-panel-head {
    flex: 0 0 auto;
    gap: clamp(8px, 1vw, 13px);
  }

  .demo-panel-head h2 {
    font-size: clamp(25px, 3.9dvh, 34px);
  }

  .demo-side-label {
    min-width: clamp(58px, 7.5dvh, 72px);
    min-height: clamp(48px, 6.5dvh, 62px);
    border-radius: clamp(12px, 1.8dvh, 16px);
  }

  .demo-side-label span {
    font-size: clamp(10px, 1.45dvh, 12px);
  }

  .demo-side-label strong {
    font-size: clamp(15px, 2.2dvh, 18px);
  }

  .demo-status {
    padding: clamp(5px, 0.9dvh, 8px) clamp(8px, 0.8vw, 12px);
    font-size: clamp(14px, 2dvh, 16px);
  }

  .demo-member-summary,
  .demo-merchant-summary {
    flex: 0 0 auto;
    gap: clamp(5px, 0.7vw, 9px);
    margin-top: clamp(6px, 1.1dvh, 12px);
  }

  .demo-member-summary > div,
  .demo-merchant-summary > div {
    padding: clamp(8px, 1.3dvh, 13px);
    border-radius: clamp(11px, 1.6dvh, 15px);
  }

  .demo-member-summary span,
  .demo-merchant-summary span {
    font-size: clamp(12px, 1.8dvh, 14px);
  }

  .demo-member-summary strong,
  .demo-merchant-summary strong {
    margin-top: 3px;
    font-size: clamp(17px, 2.5dvh, 21px);
  }

  .demo-member-summary .demo-points strong {
    font-size: clamp(31px, 4.8dvh, 41px);
  }

  .demo-merchant-summary > div {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding-block: clamp(6px, 0.9dvh, 9px);
  }

  .demo-merchant-summary strong {
    margin-top: 0;
  }

  .demo-member-start,
  .demo-member-home,
  .demo-color-picker,
  .demo-merchant-login {
    display: grid;
    min-height: 0;
    flex: 1 1 auto;
    align-content: center;
    margin-top: clamp(7px, 1.2dvh, 12px);
    padding: clamp(13px, 2dvh, 20px);
  }

  .demo-member-start h3,
  .demo-member-home h3,
  .demo-color-picker h3,
  .demo-merchant-login h3 {
    font-size: clamp(21px, 3.3dvh, 29px);
  }

  .demo-member-start p,
  .demo-member-home > p,
  .demo-color-picker > p,
  .demo-merchant-login p {
    margin-top: clamp(4px, 0.8dvh, 8px);
    font-size: clamp(13px, 1.9dvh, 16px);
    line-height: 1.4;
  }

  .demo-home-stats,
  .demo-color-choice {
    margin-top: clamp(8px, 1.4dvh, 15px);
  }

  .demo-home-stats > div,
  .demo-color-choice {
    padding: clamp(9px, 1.4dvh, 13px);
  }

  .demo-member-start .demo-primary,
  .demo-member-home .demo-primary,
  .demo-color-picker .demo-primary,
  .demo-merchant-login .demo-primary {
    margin-top: clamp(9px, 1.5dvh, 16px);
  }

  .demo-member-mission-flow {
    display: grid;
    min-height: 0;
    flex: 1 1 auto;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.9fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: clamp(6px, 1dvh, 10px);
    margin-top: clamp(7px, 1.2dvh, 12px);
  }

  .demo-member-mission-flow > * {
    min-width: 0;
    margin: 0;
  }

  .demo-mission-card {
    grid-column: 1 / -1;
    padding: clamp(9px, 1.5dvh, 15px);
  }

  .demo-route-mark {
    width: clamp(46px, 6.8dvh, 58px);
    height: clamp(46px, 6.8dvh, 58px);
    font-size: clamp(17px, 2.6dvh, 21px);
  }

  .demo-mission-card h3 {
    font-size: clamp(18px, 2.7dvh, 22px);
  }

  .demo-mission-card p {
    font-size: clamp(12px, 1.8dvh, 14px);
  }

  .demo-route-track {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
    padding: clamp(8px, 1.3dvh, 12px) 4px 0;
  }

  .demo-route-track-line {
    top: clamp(27px, 4dvh, 33px);
  }

  .demo-route-stop > span {
    width: clamp(34px, 5dvh, 40px);
    height: clamp(34px, 5dvh, 40px);
  }

  .demo-route-stop > strong {
    font-size: clamp(11px, 1.6dvh, 13px);
  }

  .demo-action-card {
    display: grid;
    grid-column: 2;
    grid-row: 2 / 4;
    align-content: center;
    padding: clamp(12px, 1.8dvh, 18px);
  }

  .demo-action-card h3,
  .demo-pending-card h3,
  .demo-member-result h3,
  .demo-outcome-card h3 {
    font-size: clamp(20px, 3.1dvh, 26px);
  }

  .demo-action-card p,
  .demo-pending-card p {
    margin-top: clamp(4px, 0.8dvh, 7px);
    font-size: clamp(14px, 2.1dvh, 16px);
    line-height: 1.4;
  }

  .demo-primary {
    font-size: clamp(19px, 2.7dvh, 22px);
  }

  .demo-action-card .demo-primary,
  .demo-pending-card .demo-primary {
    margin-top: clamp(7px, 1.2dvh, 13px);
  }

  .demo-pending-card .demo-primary {
    min-height: clamp(44px, 6dvh, 48px);
    padding-block: 6px;
  }

  .demo-data-note {
    grid-column: 1;
    grid-row: 3;
    padding: clamp(9px, 1.3dvh, 13px) clamp(11px, 1.3vw, 16px);
  }

  .demo-data-note strong {
    font-size: clamp(15px, 2.1dvh, 18px);
  }

  .demo-data-note p {
    margin-top: 3px;
    font-size: clamp(11px, 1.6dvh, 13px);
    line-height: 1.35;
  }

  body[data-demo-stage="3"] .demo-member-mission-flow,
  body[data-demo-stage="verifying"] .demo-member-mission-flow {
    grid-template-columns: minmax(220px, 0.75fr) minmax(300px, 1.25fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }

  body[data-demo-stage="3"] .demo-mission-card,
  body[data-demo-stage="verifying"] .demo-mission-card {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
  }

  body[data-demo-stage="3"] .demo-route-track,
  body[data-demo-stage="3"] .demo-action-card,
  body[data-demo-stage="verifying"] .demo-route-track,
  body[data-demo-stage="verifying"] .demo-action-card {
    display: none;
  }

  body[data-demo-stage="3"] .demo-qr-card,
  body[data-demo-stage="verifying"] .demo-qr-card {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
  }

  body[data-demo-stage="3"] .demo-data-note,
  body[data-demo-stage="verifying"] .demo-data-note {
    grid-column: 1;
    grid-row: 2;
  }

  body[data-demo-stage="4"] .demo-member-mission-flow {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }

  body[data-demo-stage="4"] .demo-mission-card,
  body[data-demo-stage="4"] .demo-route-track,
  body[data-demo-stage="4"] .demo-action-card {
    display: none;
  }

  body[data-demo-stage="4"] .demo-qr-card {
    display: none;
  }

  body[data-demo-stage="4"] .demo-member-result {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }

  body[data-demo-stage="4"] .demo-data-note {
    grid-column: 1;
    grid-row: 2;
  }

  .demo-qr-card {
    --demo-qr-size: clamp(124px, 20dvh, 168px);
    grid-template-columns: var(--demo-qr-size) minmax(0, 1fr);
    gap: clamp(5px, 0.9dvh, 8px) clamp(12px, 1.3vw, 19px);
    padding: clamp(10px, 1.5dvh, 16px);
  }

  .demo-qr-card::after {
    top: clamp(10px, 1.5dvh, 16px);
    left: clamp(10px, 1.5dvh, 16px);
  }

  .demo-qr-card > img {
    width: var(--demo-qr-size);
    height: var(--demo-qr-size);
  }

  .demo-qr-card > span {
    font-size: clamp(12px, 1.8dvh, 14px);
  }

  .demo-qr-card > strong {
    font-size: clamp(18px, 3dvh, 26px);
  }

  .demo-qr-card > small {
    font-size: clamp(11px, 1.6dvh, 13px);
  }

  .demo-member-result {
    padding: clamp(11px, 1.7dvh, 17px);
  }

  .demo-result-metrics {
    gap: 6px;
    margin-top: clamp(7px, 1.1dvh, 11px);
  }

  .demo-result-metric {
    padding: 7px 9px;
  }

  .demo-result-metric > span {
    font-size: 11px;
  }

  .demo-result-metric strong {
    font-size: clamp(15px, 2.4dvh, 25px);
  }

  .demo-merchant-console {
    display: grid;
    min-height: 0;
    flex: 1 1 auto;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: clamp(6px, 1dvh, 10px);
    margin-top: clamp(7px, 1.2dvh, 12px);
  }

  .demo-merchant-console > * {
    min-width: 0;
    margin: 0;
  }

  .demo-merchant-console .demo-merchant-summary {
    grid-column: 1 / -1;
    grid-row: 1;
    margin: 0;
  }

  .demo-pending-card {
    grid-column: 1;
    grid-row: 2;
    padding: clamp(10px, 1.5dvh, 15px);
  }

  .demo-pending-code {
    gap: 8px;
    margin-top: clamp(6px, 1dvh, 11px);
    padding: clamp(7px, 1.1dvh, 11px) clamp(9px, 1vw, 14px);
  }

  .demo-pending-code strong {
    font-size: clamp(17px, 2.5dvh, 20px);
  }

  .demo-pending-details {
    gap: 6px;
    margin-top: 6px;
  }

  .demo-pending-details > div {
    padding: clamp(7px, 1dvh, 10px);
  }

  .demo-pending-details strong {
    margin-top: 2px;
    font-size: clamp(16px, 2.3dvh, 19px);
  }

  .demo-scan-status {
    gap: 7px;
    margin-top: clamp(6px, 1dvh, 10px);
    padding: clamp(7px, 1dvh, 10px);
  }

  .demo-scan-status strong {
    font-size: clamp(15px, 2.2dvh, 18px);
  }

  .demo-manual-note {
    margin-top: 5px;
    font-size: clamp(11px, 1.5dvh, 12px);
  }

  .demo-outcome-card {
    grid-column: 2;
    grid-row: 2;
    padding: clamp(10px, 1.5dvh, 15px);
  }

  .demo-outcome-card > header {
    gap: 8px;
  }

  .demo-outcome-card > header > span {
    padding: 5px 8px;
    font-size: clamp(12px, 1.8dvh, 14px);
  }

  .demo-outcome-grid {
    gap: 5px;
    margin-top: clamp(6px, 1dvh, 10px);
  }

  .demo-outcome-grid > div {
    padding: clamp(7px, 1.1dvh, 11px);
    border-radius: 11px;
  }

  .demo-outcome-grid span {
    font-size: clamp(12px, 1.8dvh, 14px);
  }

  .demo-outcome-grid strong {
    margin-top: 3px;
    font-size: clamp(24px, 4.1dvh, 35px);
  }

  .demo-outcome-card > p {
    display: -webkit-box;
    margin-top: clamp(6px, 1dvh, 10px);
    overflow: hidden;
    font-size: clamp(12px, 1.8dvh, 14px);
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .demo-transaction {
    grid-column: 1 / -1;
    grid-row: 3;
    padding: clamp(8px, 1.2dvh, 12px) clamp(11px, 1.2vw, 16px);
  }

  .demo-transaction strong {
    display: inline;
    margin: 0 8px 0 0;
    font-size: clamp(15px, 2dvh, 18px);
  }

  .demo-transaction p {
    display: inline;
    margin: 0;
    font-size: clamp(12px, 1.7dvh, 14px);
  }

  body[data-demo-merchant-stage="complete"] .demo-pending-card > p,
  body[data-demo-merchant-stage="complete"] .demo-pending-details,
  body[data-demo-merchant-stage="complete"] .demo-pending-card .demo-primary,
  body[data-demo-merchant-stage="complete"] .demo-manual-note {
    display: none;
  }
}

@media (min-width: 981px) and (max-height: 800px) {
  .demo-hero-copy > .demo-eyebrow,
  .demo-hero-copy > p,
  .demo-current-step > p {
    display: none;
  }

  .demo-current-step {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .demo-current-step > span {
    grid-row: auto;
  }
}

@media (max-width: 980px) {
  .demo-split {
    grid-template-columns: 1fr;
  }

  .demo-cross-signal {
    display: none;
  }

  .demo-hero {
    align-items: start;
  }

  .demo-hero-copy {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .demo-hero-actions {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }

  .demo-panel {
    padding: 22px;
  }
}

@media (max-width: 640px) {
  .demo-shell {
    width: 100%;
    padding: 10px 10px 24px;
  }

  .demo-hero {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 20px;
    border-radius: 22px;
  }

  .demo-brand > span {
    width: 50px;
    height: 50px;
  }

  .demo-brand strong {
    font-size: 16px;
  }

  .demo-hero-copy {
    grid-column: 1;
    grid-row: auto;
  }

  .demo-hero h1 {
    font-size: clamp(32px, 10vw, 42px);
  }

  .demo-hero-copy p {
    font-size: 17px;
  }

  .demo-hero-actions {
    display: grid;
    width: 100%;
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
  }

  .demo-hero-actions .demo-reset {
    width: 100%;
  }

  .demo-alert {
    padding: 14px 16px;
    font-size: 16px;
  }

  .demo-current-step {
    display: block;
    padding: 18px;
  }

  .demo-current-step > strong {
    margin-top: 5px;
    font-size: 23px;
  }

  .demo-current-step > p {
    margin-top: 7px;
  }

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

  .demo-steps li {
    padding: 10px;
  }

  .demo-steps li > strong {
    font-size: 14px;
  }

  .demo-panel {
    padding: 17px;
    border-radius: 22px;
  }

  .demo-panel-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .demo-panel-head .demo-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .demo-side-label {
    min-width: 67px;
    min-height: 62px;
  }

  .demo-panel-head h2 {
    font-size: 25px;
  }

  .demo-member-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .demo-member-summary > div:first-child {
    grid-column: 1 / -1;
  }

  .demo-member-summary strong,
  .demo-merchant-summary strong {
    font-size: 17px;
  }

  .demo-member-summary .demo-points strong {
    font-size: 36px;
  }

  .demo-member-start,
  .demo-member-home,
  .demo-color-picker,
  .demo-merchant-login {
    padding: 18px;
  }

  .demo-member-start h3,
  .demo-member-home h3,
  .demo-color-picker h3 {
    font-size: 23px;
  }

  .demo-home-stats {
    grid-template-columns: 1fr;
  }

  .demo-color-choice {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .demo-color-choice > b {
    grid-column: 2;
    justify-self: start;
  }

  .demo-mission-card {
    align-items: start;
  }

  .demo-route-mark {
    width: 54px;
    height: 54px;
  }

  .demo-mission-card h3,
  .demo-action-card h3,
  .demo-pending-card h3,
  .demo-outcome-card h3 {
    font-size: 21px;
  }

  .demo-primary {
    min-height: 62px;
    font-size: 18px;
  }

  .demo-qr-card {
    grid-template-columns: 122px minmax(0, 1fr);
    gap: 7px 14px;
    padding: 14px;
    --demo-qr-size: 122px;
  }

  .demo-qr-card::after {
    top: 14px;
    left: 14px;
  }

  .demo-qr-card > img {
    width: 122px;
    height: 122px;
  }

  .demo-qr-card > strong {
    font-size: 19px;
  }

  .demo-qr-card > span,
  .demo-qr-card > small {
    font-size: 12px;
  }

  .demo-pending-code {
    align-items: flex-start;
    flex-direction: column;
  }

  .demo-pending-code strong {
    font-size: 17px;
    text-align: left;
  }

  .demo-pending-details {
    grid-template-columns: 1fr;
  }

  .demo-outcome-grid > div {
    padding: 13px;
  }

  .demo-outcome-grid strong {
    font-size: 26px;
  }

  .demo-disclosure {
    align-items: flex-start;
    flex-direction: column;
  }

  .demo-disclosure nav {
    width: 100%;
    margin-left: 0;
  }

  .demo-disclosure a {
    flex: 1;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page-mode="demo"] .demo-panel,
  body[data-page-mode="demo"] .demo-route-stop > span,
  body[data-page-mode="demo"] .demo-qr-card::after,
  body[data-page-mode="demo"] .demo-cross-signal span,
  body[data-page-mode="demo"] .demo-outcome-grid > div {
    animation: none;
  }

  body[data-page-mode="demo"] .demo-route-stop[data-state="active"] > span {
    box-shadow: 0 0 0 7px rgba(201, 52, 67, 0.1);
  }

  body[data-page-mode="demo"] .demo-qr-card.demo-scan-active::after {
    top: calc(14px + (var(--demo-qr-size) / 2));
    opacity: 0.9;
  }

  body[data-page-mode="demo"] .demo-outcome-grid > div.demo-outcome-pop {
    opacity: 1;
    transform: none;
  }
}

/* Mobile scan landing page */
body[data-page-mode="scan"] {
  --scan-ink: #17231f;
  --scan-muted: #53635d;
  --scan-line: rgba(23, 35, 31, 0.14);
  --scan-red: #c93443;
  --scan-red-dark: #8f1d2b;
  --scan-green: #116b4b;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--scan-ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(226, 73, 79, 0.16), transparent 34%),
    radial-gradient(circle at 94% 12%, rgba(22, 132, 95, 0.15), transparent 30%),
    #f4efe3;
  font-family: "Noto Sans TC", sans-serif;
}

body[data-page-mode="scan"] *,
body[data-page-mode="scan"] *::before,
body[data-page-mode="scan"] *::after {
  box-sizing: border-box;
}

body[data-page-mode="scan"] button {
  font-family: inherit;
}

body[data-page-mode="scan"] [hidden] {
  display: none !important;
}

.scan-shell {
  display: grid;
  width: min(100% - 24px, 520px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  align-content: center;
  gap: 16px;
  padding: 24px 0;
}

.scan-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
}

.scan-brand > span {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 17px;
  color: var(--scan-ink);
  background: #ffd26f;
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  font-weight: 700;
  transform: rotate(-4deg);
}

.scan-brand small,
.scan-brand strong {
  display: block;
}

.scan-brand small,
.scan-kicker {
  color: var(--scan-red-dark);
  font-family: "Azeret Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.scan-brand strong {
  margin-top: 3px;
  font-size: 17px;
}

.scan-card {
  position: relative;
  overflow: hidden;
  padding: 28px 24px 24px;
  border: 2px solid var(--scan-line);
  border-top: 8px solid var(--scan-red);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 22px 54px rgba(32, 49, 43, 0.13);
}

.scan-card::after {
  position: absolute;
  width: 210px;
  height: 210px;
  right: -105px;
  bottom: -105px;
  border: 18px solid rgba(201, 52, 67, 0.08);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.scan-route-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  margin-bottom: 18px;
  border: 4px solid white;
  border-radius: 50%;
  color: white;
  background: var(--scan-red);
  box-shadow: 0 6px 0 var(--scan-red-dark);
  font-family: "Azeret Mono", monospace;
  font-size: 25px;
  font-weight: 700;
}

.scan-card[data-scan-state="success"] {
  border-top-color: var(--scan-green);
  background: linear-gradient(145deg, #f3fbf5, #ffffff);
}

.scan-card[data-scan-state="waiting"] {
  border-top-color: #d39b18;
}

.scan-card[data-scan-state="error"] {
  border-top-color: var(--scan-red-dark);
}

.scan-card[data-scan-state="success"] .scan-route-mark {
  background: var(--scan-green);
  box-shadow: 0 6px 0 #0d4535;
}

.scan-card[data-scan-state="waiting"] .scan-route-mark {
  background: #d39b18;
  box-shadow: 0 6px 0 #87620a;
}

.scan-card[data-scan-state="error"] .scan-route-mark {
  background: var(--scan-red-dark);
  box-shadow: 0 6px 0 #5b111d;
}

.scan-card h1 {
  max-width: 430px;
  margin: 8px 0 0;
  font-size: clamp(30px, 8vw, 48px);
  line-height: 1.14;
  letter-spacing: -0.04em;
}

.scan-card > p {
  max-width: 430px;
  margin: 12px 0 0;
  color: var(--scan-muted);
  font-size: 18px;
  line-height: 1.6;
}

.scan-indicator {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}

.scan-indicator i {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--scan-red);
  animation: scan-indicator-pulse 1.2s ease-in-out infinite;
}

.scan-indicator i:nth-child(2) {
  animation-delay: 160ms;
}

.scan-indicator i:nth-child(3) {
  animation-delay: 320ms;
}

.scan-detail {
  display: grid;
  gap: 4px;
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 15px;
  background: #eef8f0;
}

.scan-detail span {
  color: var(--scan-muted);
  font-size: 13px;
  font-weight: 700;
}

.scan-detail strong {
  font-size: 18px;
  line-height: 1.35;
}

.scan-retry {
  width: 100%;
  min-height: 58px;
  margin-top: 20px;
  padding: 10px 18px;
  border: 0;
  border-radius: 15px;
  color: white;
  background: var(--scan-green);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.scan-retry:hover {
  filter: brightness(0.92);
}

.scan-fallback {
  color: var(--scan-muted);
  font-size: 14px !important;
}

.scan-footer {
  padding: 0 4px;
  color: var(--scan-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

@keyframes scan-indicator-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.82);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 420px) {
  .scan-shell {
    width: min(100% - 20px, 520px);
    padding: 16px 0;
  }

  .scan-card {
    padding: 24px 19px 20px;
    border-radius: 22px;
  }

  .scan-card > p {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scan-indicator i {
    animation: none;
    opacity: 0.7;
  }
}
