/* Screen palette shared by customer pages, including dialogs opened after navigation. */
html[data-bqt-theme="light"] {
  color-scheme: light;
  --bg: #f5f6f9;
  --surface: #fff;
  --panel: #fff;
  --surface-2: #edf0f5;
  --raised: #edf0f5;
  --line: #d4dae3;
  --field-line: #c6ceda;
  --text: #202534;
  --ink: #202534;
  --soft: #465166;
  --muted: #556176;
  --accent: #ad283f;
  --accent-2: #ae3347;
  --day-green: #17643e;
  --day-mint: #e5f4e9;
  --day-rose: #fce9ec;
  --day-gold: #805513;
  --day-cream: #fff3d7;
  background: var(--bg);
  color: var(--text);

  body, body.bqt-store-page.bqt-light-mode, body:has(:is(#history,#historyReceipt):not([hidden])) {
    background: var(--bg); color: var(--text);
  }
  .page-shell, .home-main { background:var(--bg); }
  .topbar, body > .login-topbar, footer { background:var(--surface); color:var(--text); border-color:var(--line); }
  .topbar .wallet-id, .bqt-header-search, .topbar .round-button, .app-card button {
    background:var(--surface-2); color:var(--text); border-color:var(--line);
  }
  .topbar .wallet-link, .header-account .wallet-link { background:var(--day-mint); color:var(--day-green); border-color:#bddfc9; }
  .bqt-side-menu .drawer-row > .drawer-symbol { color:color-mix(in srgb,var(--drawer-color) 50%,#172033); }
  .drawer-primary [data-key="charge"] > .drawer-symbol, .drawer-primary [data-key="login"] > .drawer-symbol { color:white; }

  /* Home and catalog */
  .slide, .hero-carousel { background:radial-gradient(circle at 72% 32%,#ffd7dd,transparent 46%),linear-gradient(120deg,#fff,#f8e9eb); color:var(--text); }
  .slide h1 em,.tag,.eyebrow,.section-heading > span,.section-head > a,.section-head button { color:var(--accent); }
  .tag { background:var(--day-rose); }
  .slide p,.merchant-banner p,.product-dialog-content > p,.section-head > div > span { color:var(--soft); }
  .slide-art small { color:var(--soft); }
  .slide-dots button { background:#a9a0a9; } .slide-dots button.active { background:var(--accent); }
  .merchant-banner,.withdraw-link { background:linear-gradient(110deg,#fff9ed,#e9f3f2);color:var(--text);border-color:var(--line); }
  .withdraw-link span { color:var(--day-gold); }
  .outline-cta { background:var(--surface); color:var(--text); border-color:var(--field-line); }
  .product-price b { color:var(--text); }
  .product-price small { color:var(--day-green);background:var(--day-mint); }
  .app-card button small, footer section a:hover, .legal a:hover { color:var(--soft); }
  .store-tile,.shop-cap button,.directory-card,.product-line { background:var(--surface);color:var(--text);border-color:var(--line); }
  .directory-card:hover,.directory-card .thumb,.store-tile-art,.store-tile-art.no-photo { background:var(--surface-2);color:var(--muted); }
  .store-tile-body,.category-list .category-card > b,.catalog-grid .directory-card > div {
    background:rgb(255 255 255 / 94%);color:var(--text);border-color:var(--line);
  }
  .store-tile-body small,.catalog-grid .directory-card p,.shop-empty,.facts-line { color:var(--soft); }
  .store-tile-unavailable { background:var(--day-rose);color:var(--accent); }
  .section-search,#branchMenu,#branchPicker { border-color:var(--field-line); }
  .section-kind { border-color:transparent; }

  /* Wallet, deposit history, orders and order details */
  .balance-card,.panel,.method,.record,.order-card,.detail-card,.movement,.wallet-metrics > div,
  .dh-panel,.dh-receipt-card,.dh-progress,.dh-dialog,.wallet-sheet,.sheet-actions {
    background:var(--surface);color:var(--text);border-color:var(--line);
  }
  .balance-card { background:linear-gradient(120deg,#ddf2e5,#fff 80%); }
  .balance-card strong,.record strong,.wallet-metrics > div:first-child strong,.movement .incoming,.dh-credit { color:var(--day-green); }
  .balance-card > span,.method small,.method-heading small,.record small,.panel :is(label,p,small),
  main nav,.back,.tools label,.heading > span,.order-time,.muted,.meta-label,#count,#notice,
  .wallet-metrics span,.movement dt,.movement time,.product-line p,.facts-line,.wallet-search,.wallet-tools small,
  .dh-net > span,.dh-when > span,.dh-duration,.dh-net .dh-money small,.dh-steps li,.dh-dialog label,
  .dh-receipt-ref,.dh-receipt-id .dh-receipt-ref,.sheet-field,.range label,.order-refs,.empty { color:var(--soft); }
  .facts-line b,.facts-line bdi,.dh-duration b,.panel dd { color:var(--text); }
  .panel dt { color:var(--muted); }
  .movement .outgoing,.feedback,.dh-detail-link { color:var(--accent); }
  .mark,.method i,.wallet-tools button,.more-page,.sheet-actions button:not([type=submit]),.action,.result,.product-photo,
  .dh-proof,.dh-proof-thumb,.dh-proof-upload,.dh-receipt-top .dh-logo,.dh-receipt-actions button,#downloadDeposit,
  .dh-tabs button[aria-pressed=true],#filterCount,dialog#help,dialog#cancelOrder,dialog#help button,dialog#cancelOrder button {
    background:var(--surface-2);color:var(--text);border-color:var(--line);
  }
  .action.quiet,.copy:hover,.copy:focus-visible,.sheet-top button,.dh-support-soon:disabled,.dh-support-soon small { color:var(--soft); }
  .action.danger {background:var(--day-rose);color:var(--accent);}
  .action.cancel-order {background:var(--day-cream);color:var(--day-gold);}
  .reset-archive,.deposit-success,.state { background:var(--day-cream);color:var(--day-gold);border-color:#e7d59f; }
  .reset-archive > summary,.reset-archive p,.deposit-success > span:last-child { color:var(--day-gold); }
  .state.accepted,.state.completed,#notice.success { background:var(--day-mint);color:var(--day-green); }
  .state.rejected,.state.canceled,.sort-options button[aria-pressed=true] {background:var(--day-rose);color:var(--accent);}
  .state.working,.state.dispute {background:#e6efff;color:#224c94;}
  :is(#history,#historyReceipt) { --dh-muted:var(--muted);--dh-line:var(--line);--dh-panel:var(--surface); }
  .dh-steps [data-phase=future] {color:var(--muted);}
  #downloadDeposit:is(:hover,:focus-visible),.action:hover { background:#e1e5ed;color:var(--text); }

  /* Purchase sheet, response and price calculator */
  dialog,.shop-sheet,.wallet-sheet {color-scheme:light;}
  dialog.bqt-welcome-screen {background:radial-gradient(ellipse at 84% 0,#fae4e9,transparent 45%),var(--bg);color:var(--text);}
  .bqt-welcome-screen p {color:var(--soft);}
  dialog,.shop-sheet,.shop-sheet.has-purchase-result,.resale-calculator,.purchase-result-card,
  .shop-guest-info .guest-product-login,.bqt-dialog,.auth-toast { background:var(--surface);color:var(--text);border-color:var(--line); }
  .shop-sheet .shop-product-glass::after { background:linear-gradient(180deg,#ffffff88,#fffffff0 48%,white 94%); }
  .shop-numbers > :is(label,div),.purchase-result dl > .purchase-result-reply,
  .purchase-result-wallet a,.purchase-result-actions a,.purchase-result-close,.shop-actions button:not([type=submit]),
  .resale-money,.shop-sheet[data-product-art] .shop-modes,.shop-sheet[data-product-art] .shop-numbers > *,
  .dialog-close,.shop-toast { background:var(--surface-2);color:var(--text);border-color:var(--line); }
  .shop-modes button[aria-pressed=true],.shop-offer { background:var(--day-rose);color:var(--accent); }
  .shop-numbers span,.shop-limits,.shop-field small,.shop-description,.shop-quantity,.purchase-result-message,
  .purchase-result-product small,.purchase-result dt,.purchase-result-wallet span,.resale-caption,
  #shopResaleQuantity,#shopResaleCurrency,#shopResaleProfit,#shopResaleReset,.auth-toast span { color:var(--soft); }
  .purchase-result-wallet bdi,.resale-money #shopResalePrice {color:var(--text);}
  .shop-numbers strong,.shop-feedback,.purchase-result[data-state=rejected] .purchase-result-price,#shopResaleProfit[data-state=loss] {color:var(--accent);}
  .shop-wallet a,#shopResaleProfit[data-state=recommended] {color:var(--day-green);}
  #shopResaleProfit[data-state=below] {color:var(--day-gold);}

  /* Account, security and sign-in */
  .account-hero,.account-main,.security-section,.ledger-section,.form-panel,.brand-panel,.wallet-card,
  .registration-dialog,.mfa-removal-dialog,.ledger-dialog {background:var(--surface);color:var(--text);border-color:var(--line);}
  .brand-panel,.account-hero {background:linear-gradient(135deg,#fff,#f9eef1);}
  .wallet-card {background:linear-gradient(120deg,#fbe9ee,#fff 75%);}
  .stat-grid article,.wallet-facts article,.profile-meta span,.empty-orders,.ledger-row,.wallet-account,.mfa-summary,.mfa-setup,
  .mfa-secret,.account-nav a:hover,.guest-button,.google-button,.dialog-close,.mfa-dialog-close,.mfa-secondary,.ledger-dialog header button {
    background:var(--surface-2);color:var(--text);border-color:var(--line);
  }
  .brand,.back-store:hover,.account-nav a:hover,.profile-meta b,.wallet-facts b,.wallet-account b,
  .ledger-row-details b,.wallet-card h3 em,.mfa-dialog-label,.field-label { color:var(--text); }
  .back-store,.brand small,.section-heading p,.security-heading p,.mfa-summary small,.mfa-setup-heading small,
  .mfa-manual-label,.mfa-code-label,.mfa-dialog-content > p,.stat-grid :is(span,small),.wallet-facts :is(span,small),
  .wallet-label,.wallet-card p,.wallet-account span,.empty-orders p,.ledger-heading :is(p,small),.ledger-row-details small,
  .ledger-row-amount small,.ledger-empty,.ledger-empty small,.profile-meta small,.account-nav a,.account-nav a span,
  .auth-heading p,.brand-story > p,.help-note,.back-home,.check-label,.signup-copy,.privacy-note,.privacy-note a,
  .dialog-content p,.divider,.passkey-panel p,.top-balance small {color:var(--soft);}
  .account-nav a.active,.signout-button,.signout-button:hover,.top-balance {background:var(--day-rose);color:var(--accent);}
  .account-nav a.active span,.top-balance em,.wallet-facts article:nth-child(2) b,.stat-grid article:first-child b,
  .profile-meta span:first-child b,.form-error,.mfa-feedback,.mfa-dialog-feedback.is-error,.form-options a,
  .signup-copy a,.email-link-button,.help-note a,.brand-story h1 em {color:var(--accent);}
  .wallet-facts article:nth-child(1) b,#passkeyReauth {color:#3a539c;}
  .wallet-facts article:nth-child(3) b,.ledger-row.is-unpaid :is(.ledger-row-details b,.ledger-row-amount b) {color:var(--day-gold);}
  .verified-row,.mfa-summary[data-state=enabled],.ledger-row-icon,.mfa-google-confirm {background:var(--day-mint);color:var(--day-green);}
  .verified-row small,.stat-grid .active-status,.ledger-row-amount b,.form-error.is-notice,.mfa-feedback.is-ok {color:var(--day-green);}
  .ledger-row.is-debit .ledger-row-amount b {color:var(--accent);}
  .mfa-summary[data-state=unavailable] {background:var(--day-cream);}
  .google-mark:after {background:var(--surface-2);}
  .guest-button:hover,.google-button:hover,.password-toggle:hover {background:#e3e7ed;color:var(--text);}
  .dialog-feedback {color:var(--soft)!important;}
  .dialog-feedback.is-error {color:var(--accent)!important;}

  :is(.panel,.tools,.wallet-sheet,.dh-dialog,.shop-sheet,.field-label,.dialog-content,.form-label,
    .mfa-dialog-label,.mfa-code-label,.registration-dialog,#passkeyForm,.wallet-search) :is(input:not([type=radio]):not([type=checkbox]),select,textarea),
  #sentCurrency {background:var(--surface);color:var(--text);border-color:var(--field-line);}
  :is(input,textarea)::placeholder {color:var(--muted);}
  .store-paused {background:var(--bg);color:var(--text);}
  .store-paused p,.store-paused .pause-unit > span {color:var(--soft);}
  .store-paused a,.store-paused .pause-unit > bdi {color:var(--day-gold);}
}
