/* ValueDemoInk / Paper / Muted / Soft inherit the App's light/dark palette.
   Keep the illustrations in their native 236 × 478 coordinate system. */
.onboarding-home {
  --demo-line: rgba(var(--ink-rgb),.05);
  --demo-summary-line: rgba(var(--ink-rgb),.035);
  --demo-emphasis: rgba(var(--ink-rgb),.08);
  --demo-notification: rgba(255,255,255,.95);
  --demo-notification-line: rgba(255,255,255,.7);
  --demo-record: #f2f2f7; --demo-record-muted: var(--muted);
  --demo-record-outline: #d3d3d8; --demo-date-divider: #bcbcbc;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
@media (prefers-color-scheme: dark) {
  .onboarding-home {
    --demo-notification: rgba(28,28,30,.95);
    --demo-notification-line: rgba(255,255,255,.16);
    --demo-record: #1c1c1e;
    --demo-record-outline: #48484a; --demo-date-divider: #77777d;
  }
}
.onboarding-home h1,.onboarding-home h2,.onboarding-home h3 { font-family: inherit; }
.onboarding-home h1 { font-size: clamp(36px,4.1vw,56px); line-height: 1.32; font-weight: 750; letter-spacing: -.045em; }
.onboarding-home h2 { font-size: clamp(30px,3.4vw,44px); line-height: 1.36; font-weight: 720; letter-spacing: -.035em; }
.onboarding-home h3 { font-size: 18px; line-height: 1.5; font-weight: 650; }
.onboarding-hero,.onboarding-section,.onboarding-setup { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 90px; align-items: center; }
.onboarding-hero { padding-block: 34px 88px; min-height: 720px; }
.onboarding-home .hero-copy { grid-column: auto; grid-row: auto; }
.onboarding-copy { min-width: 0; }
.onboarding-lede { margin-top: 24px; max-width: 480px; font-size: 18px; line-height: 1.85; color: var(--muted); }
.onboarding-prerequisites { margin-top: 22px; font-size: 12px; color: var(--muted); }
.onboarding-home .hero-actions { gap: 24px; margin-top: 26px; }
.onboarding-home .text-link { font-size: 14px; gap: 10px; }
.onboarding-section { padding-block: 88px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.onboarding-benefits { display: grid; gap: 15px; padding: 0; margin: 28px 0 0; list-style: none; font-size: 16px; }
.onboarding-benefits li { display: flex; align-items: center; gap: 12px; }
.onboarding-benefits li > span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--ink); background: var(--soft); font-size: 12px; }
.onboarding-note { margin-top: 32px; font-size: 13px; color: var(--muted); }
.onboarding-setup { padding-block: 96px; border-top: 1px solid var(--line); scroll-margin-top: 24px; align-items: start; }
.onboarding-checklist { display: grid; gap: 12px; list-style: none; padding: 0; margin: 0; }
.onboarding-checklist li { display: flex; gap: 17px; padding: 23px 24px; background: var(--soft); border-radius: 20px; }
.setup-number { display: grid; width: 26px; height: 26px; margin-top: 1px; flex: 0 0 26px; place-items: center; border-radius: 50%; background: var(--paper); font-size: 12px; font-weight: 650; }
.onboarding-checklist li p { margin-top: 6px; font-size: 14px; color: var(--muted); }
.setup-links { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 13px; }
.setup-links a { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 550; }
.setup-links a svg { width: 14px; height: 14px; }
.setup-optional { margin: 19px 8px 0; color: var(--muted); font-size: 13px; line-height: 1.85; }
.onboarding-instructions { display: grid; gap: 24px; list-style: none; padding: 0; margin: 28px 0; }
.onboarding-instructions li p { margin-top: 7px; font-size: 14px; color: var(--muted); }
.onboarding-finish { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-block: 64px 42px; border-top: 1px solid var(--line); }
.onboarding-finish h2 { font-size: clamp(28px,3vw,36px); }
.onboarding-finish p { margin-top: 14px; font-size: 13px; color: var(--muted); }
.onboarding-faq { padding-bottom: 80px; }
.onboarding-faq .faq-list { margin-top: 0; max-width: none; }
.onboarding-faq .faq-list summary { font-size: 15px; }
.onboarding-faq .faq-list details p { font-size: 14px; }

.onboarding-demo { min-width: 0; width: 100%; }
.demo-stage { position: relative; width: 100%; height: 570px; overflow: hidden; isolation: isolate; }
.value-stage { height: 590px; }
.demo-stage::after { content: ""; position: absolute; z-index: 8; pointer-events: none; inset: auto 0 0; height: 68px; background: linear-gradient(transparent,var(--paper)); }
.onboarding-demo figcaption { display: grid; gap: 6px; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.6; }
.onboarding-demo figcaption > span { min-height: 20px; }
.onboarding-demo figcaption small { color: var(--muted); font-size: 10px; }
.demo-controls { display: flex; justify-content: center; gap: 18px; min-height: 38px; margin-top: 7px; }
.demo-controls[hidden] { display: none; }
.demo-controls button { display: inline-flex; gap: 5px; align-items: center; justify-content: center; min-height: 36px; padding: 6px 4px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; }
.demo-controls button:hover { color: var(--ink); }
.demo-controls button:disabled { opacity: .45; cursor: default; }
.demo-controls button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 5px; }
.demo-controls svg { width: 13px; height: 13px; }

.demo-phone { position: absolute; left: 50%; top: 16px; width: 236px; height: 478px; padding: 6px; color: var(--ink); border-radius: 43px; background: linear-gradient(135deg,#666,#000,#666); box-shadow: inset 0 0 0 1px #ffffff66,0 16px 20px #00000024; transform: translateX(-50%) scale(1.1); transform-origin: top center; line-height: 1.25; font-family: -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif; }
.demo-screen { position: relative; display: flex; flex-direction: column; width: 224px; height: 466px; overflow: hidden; border-radius: 36px; background: var(--paper); }
.demo-status-bar { display: flex; justify-content: space-between; flex-shrink: 0; height: 46px; padding: 17px 19px 0; font-size: 8.5px; font-weight: 600; }
.demo-status-bar > div { display: flex; align-items: start; gap: 3px; height: 10px; }
.demo-status-bar svg { width: 10px; height: 10px; }
.demo-status-bar svg:last-child { width: 14px; }
.demo-home-indicator { position: absolute; z-index: 7; width: 78px; height: 3px; left: 50%; bottom: 8px; transform: translateX(-50%); border-radius: 3px; background: var(--ink); }
.demo-side-button { position: absolute; background: #666; border-radius: 4px; }
.demo-action-button { width: 4px; height: 24px; top: 97px; left: -2px; }
.demo-lock-button { width: 3px; height: 46px; top: 138px; right: -2px; }
.demo-capture-flash { position: absolute; z-index: 6; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.demo-order { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.demo-order-nav { display: flex; align-items: center; justify-content: space-between; padding-inline: 13px; font-size: 11px; }
.demo-order-nav > span { width: 21px; height: 21px; }
.demo-order-nav > span:first-child { display: grid; place-items: center; border: .5px solid var(--line); border-radius: 50%; color: var(--muted); }
.demo-order-nav svg { width: 11px; height: 11px; }
.demo-order-content { display: grid; gap: 13px; padding: 15px 13px 0; }
.demo-delivery { display: grid; gap: 7px; }
.demo-delivery p,.demo-order-label { display: flex; align-items: center; gap: 5px; font-size: 10px; }
.demo-delivery svg,.demo-order-label svg { width: 12px; height: 12px; }
.demo-delivery p b,.demo-order-label b { font-weight: 550; }
.demo-delivery > div { padding: 8px; border: .5px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 8.5px; }
.demo-delivery small { font-size: 7.5px; }
.demo-order-summary { padding: 10px; border: .5px solid var(--demo-summary-line); border-radius: 12px; background: var(--soft); }
.demo-products { display: grid; margin-top: 9px; }
.demo-product { display: flex; align-items: center; gap: 7px; padding-block: 4px; }
.demo-product + .demo-product { border-top: .5px solid var(--demo-line); }
.demo-product img { width: 31px; height: 31px; object-fit: cover; border-radius: 5px; }
.demo-product > div { display: grid; gap: 3px; }
.demo-product b { font-size: 9px; font-weight: 550; }
.demo-product span { font-size: 8.5px; color: var(--muted); }
.demo-product > span { margin-left: auto; }
.demo-order-costs { display: grid; gap: 5px; margin: 6px 0 0; padding-block: 9px; border-block: .5px solid var(--line); border-top-style: dashed; }
.demo-order-costs > div { display: flex; justify-content: space-between; font-size: 8.5px; }
.demo-order-costs dt { color: var(--muted); }
.demo-order-costs dd { margin: 0; font-weight: 550; }
.demo-paid { display: flex; justify-content: space-between; align-items: baseline; margin-top: 9px; border-radius: 6px; }
.demo-paid b { font-size: 10px; font-weight: 550; }
.demo-paid strong { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.demo-order-complete { display: grid; gap: 8px; text-align: center; }
.demo-order-complete > div { display: flex; align-items: center; justify-content: center; gap: 6px; height: 28px; border-radius: 99px; background: var(--ink); color: var(--paper); font-size: 10px; font-weight: 550; }
.demo-order-complete > div > span { width: 11px; height: 11px; padding: 1px; border-radius: 50%; color: var(--ink); background: var(--paper); }
.demo-order-complete p { font-size: 7.5px; color: var(--muted); }
.demo-order-tutorial .demo-order-content { padding-top: 22px; gap: 20px; }
.demo-order-tutorial .demo-paid { padding: 6px; background: var(--demo-emphasis); }
.demo-order-tutorial .demo-order-complete p { display: inline-block; justify-self: center; padding: 6px; border-radius: 6px; color: var(--ink); background: var(--demo-emphasis); font-weight: 600; }
.demo-order-tutorial [data-field] { outline: .6px solid transparent; outline-offset: 2px; }

.demo-island { position: absolute; z-index: 5; top: 10px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; justify-content: center; width: 74px; height: 22px; overflow: hidden; border-radius: 999px; color: #fff; background: #000; }
.demo-island-content { display: flex; align-items: center; gap: 7px; flex-shrink: 0; width: 190px; height: 60px; opacity: 0; }
.demo-island-content .app-icon img { width: 24px; height: 24px; object-fit: contain; border-radius: 5.5px; }
.demo-island-content > div { display: grid; flex: 1; min-width: 0; gap: 3px; }
.demo-island-content b { display: block; font-size: 10px; font-weight: 650; white-space: nowrap; }
.demo-island-content span { display: block; font-size: 8.2px; color: #ffffffa6; white-space: nowrap; }
.demo-progress { width: 24px; height: 24px; flex-shrink: 0; overflow: visible; }
.demo-progress circle { fill: none; stroke: #fff; stroke-width: 2; }
.demo-progress .demo-progress-track { stroke: #ffffff33; }
.demo-progress [data-progress] { stroke-dasharray: 69.115; stroke-dashoffset: 0; stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; }
.demo-progress path { stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.demo-notification { position: absolute; z-index: 4; top: 51px; left: 8px; right: 8px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: .5px solid var(--demo-notification-line); border-radius: 14px; background: var(--demo-notification); box-shadow: 0 8px 20px #00000026; backdrop-filter: blur(14px); }
.demo-notification .app-icon img { width: 24px; height: 24px; border-radius: 5.5px; }
.demo-notification > div { display: grid; gap: 3px; flex: 1; }
.demo-notification b { font-size: 10px; font-weight: 600; }
.demo-notification span { font-size: 7.5px; color: var(--muted); }
.demo-notification > svg { width: 13px; height: 13px; }

.demo-records { flex: 1; min-height: 0; padding-inline: 9px; overflow: hidden; }
.demo-records-menu { position: absolute; top: 40px; right: 12px; display: grid; place-items: center; width: 27px; height: 27px; font-size: 14px; border: .5px solid var(--demo-line); border-radius: 50%; box-shadow: 0 3px 8px #00000005; }
.demo-records-summary { display: grid; justify-items: start; gap: 4px; margin: 10px 4px 32px; }
.demo-records-summary > span:first-child { color: var(--muted); font-size: 7.5px; }
.demo-records-summary > strong { display: inline-block; font-size: 23px; font-weight: 750; letter-spacing: -.8px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.demo-records-summary > span:last-child { padding: 2px 7px; border-radius: 99px; background: var(--ink); color: var(--paper); font-size: 7.5px; font-weight: 600; }
.demo-records-list { display: grid; gap: 14px; }
.demo-day-heading { display: flex; justify-content: space-between; align-items: center; padding: 0 3px 6px; font-size: 7.5px; }
.demo-day-heading > span { color: var(--muted); font-weight: 600; }
.demo-day-heading b > span { color: var(--demo-date-divider); }
.demo-day-rows { display: grid; gap: 5px; }
.demo-record { display: flex; align-items: center; gap: 9px; padding: 9px; min-height: 56px; border-radius: 10px; background: var(--demo-record); transform-origin: center top; }
.demo-record-emoji { display: grid; position: relative; place-items: center; width: 33px; height: 33px; flex: 0 0 33px; border: 1px dashed var(--demo-record-outline); border-radius: 50%; font-size: 18px; }
.demo-record-emoji i { display: grid; position: absolute; place-items: center; width: 17px; height: 17px; bottom: -3px; left: -3px; border-radius: 50%; background: var(--paper); font-size: 8px; font-style: normal; }
.demo-record > div { display: grid; gap: 3px; min-width: 0; }
.demo-record > div b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; font-weight: 700; }
.demo-record > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--demo-record-muted); font-size: 7.5px; }
.demo-record > strong { margin-left: auto; font-size: 8px; white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }
.records-stage::after { height: 100px; }
.receipt-stage { height: 475px; }
.receipt-facts { display: flex; gap: 12px; margin: 4px 22px 22px; }
.receipt-facts > div { display: grid; gap: 5px; flex: 1; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.receipt-facts span { font-size: 12px; color: var(--muted); }
.receipt-facts strong { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }

@media (min-width: 1400px) {
  .onboarding-hero { gap: 100px; }
}
@media (max-width: 1080px) {
  .onboarding-hero,.onboarding-section,.onboarding-setup { gap: 44px; }
  .onboarding-home h1 { font-size: 42px; }
  .onboarding-home h2 { font-size: 35px; }
  .onboarding-lede { font-size: 17px; }
}
@media (max-width: 760px) {
  .onboarding-hero,.onboarding-section,.onboarding-setup { grid-template-columns: minmax(0,1fr); }
  .onboarding-hero { padding-block: 24px 48px; gap: 24px; min-height: auto; }
  .onboarding-home .hero-copy { grid-row: 1; }
  .onboarding-home h1 { font-size: clamp(32px,8.2vw,45px); }
  .onboarding-home h2 { font-size: clamp(28px,7.4vw,35px); }
  .onboarding-home h3 { font-size: 17px; }
  .onboarding-lede { margin-top: 18px; font-size: 16px; line-height: 1.85; }
  .onboarding-prerequisites { margin-top: 17px; font-size: 11px; }
  .onboarding-home .hero-actions { margin-top: 22px; gap: 20px; }
  .onboarding-home .hero-actions .store-badge img { height: 46px; }
  .onboarding-section { padding-block: 54px; gap: 28px; }
  .onboarding-setup { padding-block: 54px; gap: 28px; }
  .onboarding-checklist li { padding: 20px; border-radius: 17px; }
  .onboarding-benefits { margin-top: 24px; gap: 12px; font-size: 15px; }
  .onboarding-note { margin-top: 23px; font-size: 12px; }
  .demo-stage { height: 530px; }
  .value-stage { height: 520px; }
  .receipt-stage { height: 420px; }
  .receipt-section > .onboarding-copy { grid-row: 1; }
  .receipt-facts { margin-inline: 12px; }
  .onboarding-instructions { gap: 20px; }
  .onboarding-finish { display: grid; padding-block: 42px 30px; gap: 24px; }
  .onboarding-faq { padding-bottom: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .demo-controls { display: none; }
}
