/* Editorial purchase journey. Load unlayered after the Atlas stylesheets.
   Partner storefronts are themed on html by app-live; also honor a body theme. */
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#product, #checkout, #cashier, #orders, #account, #sms, #modal, #cs-dock, #toast),
html:not([data-theme]) body:is(.auth-body.atlas:not(.admin-auth), .legal-body.atlas):not([data-theme]) {
  color-scheme: light;
  --editorial-flow-canvas: #f5f7fb;
  --editorial-flow-paper: #fff;
  --editorial-flow-ink: #152a47;
  --editorial-flow-muted: #506079;
  --editorial-flow-line: #dce4f0;
  --editorial-flow-input-line: #8496ad;
  --editorial-flow-accent: #224574;
  --editorial-flow-deep: #163258;
  --editorial-flow-wash: #edf3fc;
  --editorial-flow-accent-line: #b9cce7;
  --editorial-flow-primary: #224574;
  --editorial-flow-primary-hover: #163258;
  --editorial-flow-contrast: #fff;
  --editorial-flow-serif: 'PingFang SC', 'Microsoft YaHei UI', system-ui, sans-serif;
  --editorial-flow-sans: 'Inter', 'PingFang SC', 'Microsoft YaHei UI', system-ui, sans-serif;
  --editorial-flow-radius: 12px;
  --editorial-flow-control-radius: 8px;
  --editorial-flow-pad: clamp(18px, 3vw, 36px);
  --editorial-flow-gap: clamp(16px, 3vw, 32px);
  --editorial-flow-frame: 1px solid var(--editorial-flow-line);
  --editorial-flow-shadow: 0 1px 2px rgb(24 42 67 / 5%), 0 16px 40px -22px rgb(24 42 67 / 22%);
  --editorial-flow-width: 1180px;
  --bg: var(--editorial-flow-canvas);
  --bg-sunken: #eef3fa;
  --paper: var(--editorial-flow-paper);
  --paper-raised: var(--editorial-flow-paper);
  --paper-soft: var(--editorial-flow-canvas);
  --line: var(--editorial-flow-line);
  --line-soft: var(--editorial-flow-line);
  --line-strong: var(--editorial-flow-input-line);
  --ink: var(--editorial-flow-ink);
  --ink-soft: #334967;
  --muted: var(--editorial-flow-muted);
  --muted-soft: var(--editorial-flow-muted);
  --brand: var(--editorial-flow-accent);
  --brand-hi: #315584;
  --brand-deep: var(--editorial-flow-deep);
  --brand-line: var(--editorial-flow-accent-line);
  --brand-wash: var(--editorial-flow-wash);
  --blue: var(--editorial-flow-accent);
  --blue-hover: var(--editorial-flow-deep);
  --blue-line: var(--editorial-flow-accent-line);
  --blue-wash: var(--editorial-flow-wash);
  --journey-frame: var(--editorial-flow-frame);
  --journey-radius: var(--editorial-flow-radius);
  --on-brand: var(--editorial-flow-contrast);
  font-family: var(--editorial-flow-sans);
  color: var(--editorial-flow-ink);
}

/* Match Atlas's important body fill, but change it only on an active flow. */
html:not([data-theme]) body.shop-body.atlas:not([data-theme]):has(> main > :is(#product, #checkout, #cashier, #orders, #account, #sms).active) {
  background: #f5f7fb !important;
}

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#checkout, #cashier, #account, #orders, #sms, #modal) :is(.dark-button, .outline-button),
html:not([data-theme]) body.auth-body.atlas:not(.admin-auth):not([data-theme]) .user-auth-form .dark-button.full,
html:not([data-theme]) body.legal-body.atlas:not([data-theme]) .legal-header .outline-button {
  min-height: 46px;
  padding-inline: 16px;
  border-radius: var(--editorial-flow-control-radius);
  font: 650 14px/1.25 var(--editorial-flow-sans);
  box-shadow: none;
  white-space: normal;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#checkout, #cashier, #account, #orders, #sms, #modal) .dark-button:not(:disabled),
html:not([data-theme]) body.auth-body.atlas:not(.admin-auth):not([data-theme]) .user-auth-form .dark-button.full:not(:disabled) {
  border-color: var(--editorial-flow-primary);
  background: var(--editorial-flow-primary);
  color: var(--editorial-flow-contrast);
  box-shadow: 0 2px 4px rgb(22 40 65 / 16%);
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#checkout, #cashier, #account, #orders, #sms, #modal) .dark-button:hover:not(:disabled),
html:not([data-theme]) body.auth-body.atlas:not(.admin-auth):not([data-theme]) .user-auth-form .dark-button.full:hover:not(:disabled) {
  border-color: var(--editorial-flow-primary-hover);
  background: var(--editorial-flow-primary-hover);
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#checkout, #cashier, #account, #orders, #sms, #modal) .outline-button:not(:disabled),
html:not([data-theme]) body.legal-body.atlas:not([data-theme]) .legal-header .outline-button {
  border-color: var(--editorial-flow-input-line);
  background: var(--editorial-flow-paper);
  color: var(--editorial-flow-deep);
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#checkout, #cashier, #account, #orders, #sms, #modal) .outline-button:hover:not(:disabled),
html:not([data-theme]) body.legal-body.atlas:not([data-theme]) .legal-header .outline-button:hover {
  border-color: var(--editorial-flow-accent);
  background: var(--editorial-flow-wash);
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#product, #checkout, #cashier, #account, #orders, #sms, #modal, #cs-dock) :focus-visible,
html:not([data-theme]) body:is(.auth-body.atlas:not(.admin-auth), .legal-body.atlas):not([data-theme]) :focus-visible {
  outline: 2px solid var(--editorial-flow-accent);
  outline-offset: 3px;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product .quantity :focus-visible { outline-offset: -3px; }

html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#checkout .form-grid, #orders #query-form, #modal .search-input, #modal .admin-form) input:not([type='checkbox']):not([type='radio']),
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #sms #email-service,
html:not([data-theme]) body.auth-body.atlas:not(.admin-auth):not([data-theme]) .user-auth-form .auth-panel input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--editorial-flow-field-border, var(--editorial-flow-input-line));
  border-radius: var(--editorial-flow-control-radius);
  background-color: var(--editorial-flow-paper);
  color: var(--editorial-flow-ink);
  font: 400 16px/1.35 var(--editorial-flow-sans);
  box-shadow: var(--editorial-flow-field-shadow, inset 0 1px 2px rgb(24 42 67 / 5%));
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#checkout .form-grid, #orders #query-form, #modal .search-input, #modal .admin-form) input:focus,
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #sms #email-service:focus,
html:not([data-theme]) body.auth-body.atlas:not(.admin-auth):not([data-theme]) .user-auth-form .auth-panel input:focus {
  --editorial-flow-field-border: var(--editorial-flow-accent);
  --editorial-flow-field-shadow: inset 0 0 0 1px var(--editorial-flow-accent);
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#checkout .form-grid, #orders #query-form, #sms .sms-config, #modal .admin-form) label,
html:not([data-theme]) body.auth-body.atlas:not(.admin-auth):not([data-theme]) .user-auth-form .auth-panel label {
  color: var(--ink-soft);
  font: 650 14px/1.45 var(--editorial-flow-sans);
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#checkout .form-grid, #orders #query-form, #modal .search-input, #modal .admin-form) input::placeholder,
html:not([data-theme]) body.auth-body.atlas:not(.admin-auth):not([data-theme]) .user-auth-form .auth-panel input::placeholder {
  color: var(--editorial-flow-muted);
  opacity: 1;
}

/* Atlas Catalog's important product paints consume these tokens. Keep its
   interaction and image rules, including the distinct banner presentation. */
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product {
  --atlas-cat-width: var(--editorial-flow-width);
  --atlas-cat-gutter: var(--editorial-flow-gap);
  --atlas-cat-stone: var(--editorial-flow-canvas);
  --atlas-cat-rule: var(--editorial-flow-line);
  --atlas-cat-ink: var(--editorial-flow-ink);
  --atlas-cat-muted: var(--editorial-flow-muted);
  --atlas-cat-accent: var(--editorial-flow-accent);
  --atlas-cat-deep: var(--editorial-flow-deep);
  --atlas-cat-wash: var(--editorial-flow-wash);
  --atlas-cat-active-line: var(--editorial-flow-accent-line);
  --atlas-cat-editorial: var(--editorial-flow-serif);
  --atlas-cat-sans: var(--editorial-flow-sans);
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product .detail-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, .43fr);
  margin-inline: auto;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product #detail-name {
  margin-bottom: 0;
  color: var(--editorial-flow-ink);
  font: 650 clamp(30px, 4vw, 49px)/1.18 var(--editorial-flow-serif);
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product .detail-main #detail-icon { border-radius: var(--editorial-flow-radius); }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product .description-panel {
  padding-block: 18px 6px;
  background: transparent;
  overflow-wrap: anywhere;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product .purchase-panel {
  padding: var(--editorial-flow-pad);
  border-radius: var(--editorial-flow-radius);
  background: var(--editorial-flow-paper);
  box-shadow: var(--editorial-flow-shadow);
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product .purchase-top { padding-bottom: 16px; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product :is(#detail-price, #purchase-total, #detail-stock) { overflow-wrap: anywhere; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product #detail-price { font: 650 clamp(34px, 3.6vw, 44px)/1.1 var(--editorial-flow-serif); }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product .purchase-panel :is(#buy-now, #add-to-cart) {
  min-height: 48px;
  border-radius: var(--editorial-flow-control-radius);
  font: 650 14px/1.25 var(--editorial-flow-sans);
}
/* Atlas Catalog sets the product buttons' fills and borders as important. */
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product .purchase-panel #buy-now:not(:disabled) {
  border-color: var(--editorial-flow-primary) !important;
  background: var(--editorial-flow-primary) !important;
  color: var(--editorial-flow-contrast) !important;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product .purchase-panel #buy-now:hover:not(:disabled) {
  border-color: var(--editorial-flow-primary-hover) !important;
  background: var(--editorial-flow-primary-hover) !important;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product .purchase-panel #add-to-cart:not(:disabled) {
  border-color: var(--editorial-flow-input-line) !important;
  background: var(--editorial-flow-paper) !important;
  color: var(--editorial-flow-deep) !important;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product .purchase-panel #add-to-cart:hover:not(:disabled) {
  border-color: var(--editorial-flow-accent) !important;
  background: var(--editorial-flow-wash) !important;
}

/* Shared quiet headings and content widths for operational pages. */
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#checkout .checkout-wrap, #cashier .cashier-shell, #orders .orders-wrap, #account .account-page-wrap, #sms) {
  width: 100%;
  max-width: var(--editorial-flow-width);
  margin-inline: auto;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#checkout .checkout-title, #orders .order-query, #account .account-orders-head, #sms .sms-header) h1 {
  margin-block: 0;
  color: var(--editorial-flow-ink);
  font: 650 clamp(36px, 4.4vw, 54px)/1.14 var(--editorial-flow-serif);
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#checkout, #cashier, #orders, #account, #sms, #modal) .kicker,
html:not([data-theme]) body:is(.auth-body.atlas:not(.admin-auth), .legal-body.atlas):not([data-theme]) .kicker {
  color: var(--editorial-flow-accent);
  font: 700 11px/1.35 var(--editorial-flow-sans);
  letter-spacing: .12em;
}

/* Checkout: one continuous step sheet and a distinct, reachable receipt. */
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #checkout .checkout-title {
  grid-template-columns: minmax(0, 1fr) minmax(250px, .55fr);
  margin-bottom: var(--editorial-flow-gap);
  padding-block: 0 22px;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #checkout .checkout-title > p:not(.kicker) { color: var(--editorial-flow-muted); line-height: 1.65; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #checkout .checkout-layout {
  grid-template-columns: minmax(0, 1fr) minmax(290px, .52fr);
  gap: var(--editorial-flow-gap);
  align-items: start;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #checkout .checkout-main {
  border-radius: var(--editorial-flow-radius);
  box-shadow: var(--editorial-flow-shadow);
  counter-reset: editorial-checkout-step;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #checkout .checkout-block { padding: var(--editorial-flow-pad); counter-increment: none; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #checkout .checkout-block:not([hidden]) { counter-increment: editorial-checkout-step; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #checkout .checkout-block > h2 { font: 650 clamp(21px, 2.3vw, 26px)/1.24 var(--editorial-flow-serif); }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #checkout .checkout-block > h2::before {
  content: counter(editorial-checkout-step, decimal-leading-zero) / "";
  border: 1px solid var(--editorial-flow-accent-line);
  border-radius: 5px;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #checkout :is(.form-grid, .payment-options) { gap: 10px; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#checkout, #modal) :is(.mode-choice, .pay-option) { min-width: 0; border-radius: var(--editorial-flow-control-radius); }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #checkout .checkout-summary {
  padding: var(--editorial-flow-pad);
  border: var(--editorial-flow-frame);
  border-top: 2px solid var(--editorial-flow-accent);
  border-radius: var(--editorial-flow-radius);
  background: var(--editorial-flow-paper);
  box-shadow: var(--editorial-flow-shadow);
  overflow-wrap: anywhere;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #checkout .summary-total strong { color: var(--editorial-flow-accent); font-variant-numeric: tabular-nums; }

/* Cashier: preserve QR sizing, payment-provider states and the status actions. */
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #cashier .cashier-head { flex-wrap: wrap; gap: 10px 16px; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #cashier .cashier-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #cashier .cashier-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, .47fr);
  gap: var(--editorial-flow-gap);
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #cashier :is(.cashier-payment-card, .cashier-info-card) {
  min-width: 0;
  padding: var(--editorial-flow-pad);
  border: var(--editorial-flow-frame);
  border-radius: var(--editorial-flow-radius);
  background: var(--editorial-flow-paper);
  box-shadow: var(--editorial-flow-shadow);
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #cashier .cashier-info-card { border-top: 2px solid var(--editorial-flow-accent); }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #cashier .cashier-info-card h1 { font: 650 clamp(27px, 3.4vw, 39px)/1.2 var(--editorial-flow-serif); letter-spacing: -.012em; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #cashier :is(.cashier-order-meta b, .cashier-transfer li, .cashier-footnote) { overflow-wrap: anywhere; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #cashier :is(.cashier-qr-wrap, .online-pay-qr-frame) { min-width: 0; max-width: 100%; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #cashier .online-pay-qr-frame img { max-width: 100%; height: auto; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #cashier #cashier-countdown { font-variant-numeric: tabular-nums; }

/* Orders: intro, guest form and results stay in DOM/tab order. */
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #orders .order-query {
  grid-template-columns: minmax(0, .8fr) minmax(320px, 1fr);
  gap: 0 clamp(18px, 5vw, 64px);
  padding: var(--editorial-flow-pad);
  border: var(--editorial-flow-frame);
  border-radius: var(--editorial-flow-radius);
  background: var(--editorial-flow-paper);
  box-shadow: var(--editorial-flow-shadow);
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #orders .order-query > p:not(.kicker) { max-width: 39ch; line-height: 1.7; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #orders #query-form {
  min-width: 0;
  padding: var(--editorial-flow-pad);
  background: var(--bg-sunken);
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #orders #query-result { min-width: 0; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#orders, #account) .order-list-card {
  min-width: 0;
  border: var(--editorial-flow-frame);
  border-inline-start: 3px solid var(--editorial-flow-accent-line);
  border-radius: var(--editorial-flow-radius);
  background: var(--editorial-flow-paper);
  overflow-wrap: anywhere;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#orders, #account) .order-list-actions { flex-wrap: wrap; }

/* Account: wallet and history are separate, independently readable areas. */
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #account .account-orders:not([hidden]) {
  grid-template-columns: minmax(230px, .62fr) minmax(0, 1.38fr);
  column-gap: var(--editorial-flow-gap);
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #account .account-orders-head { flex-wrap: wrap; gap: 10px; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #account .account-orders-head > div { min-width: 0; margin-inline-end: auto; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #account #account-orders-email { overflow-wrap: anywhere; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #account .wallet-card {
  min-width: 0;
  padding: var(--editorial-flow-pad);
  border-radius: var(--editorial-flow-radius);
  background: var(--editorial-flow-paper);
  box-shadow: var(--editorial-flow-shadow);
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #account #wallet-balance {
  color: var(--editorial-flow-accent);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #account .wallet-card-actions { flex-wrap: wrap; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #account .account-guest-hint:not([hidden]) {
  padding: var(--editorial-flow-pad);
  border: var(--editorial-flow-frame);
  border-radius: var(--editorial-flow-radius);
  background: var(--editorial-flow-paper);
}

/* Email verification: configuration, upstream status and task state. */
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #sms .sms-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .36fr);
  align-items: end;
  gap: var(--editorial-flow-gap);
  margin: 0 0 var(--editorial-flow-gap);
  padding: 0 0 20px;
  border: 0;
  border-bottom: var(--editorial-flow-frame);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #sms .sms-header > div:last-child {
  min-width: 0;
  padding: 12px 14px;
  border: var(--editorial-flow-frame);
  border-inline-start: 3px solid var(--editorial-flow-accent);
  border-radius: var(--editorial-flow-control-radius);
  background: var(--editorial-flow-paper);
  color: var(--editorial-flow-ink);
  overflow-wrap: anywhere;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #sms #email-provider-state { color: var(--editorial-flow-accent); }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #sms .sms-shell {
  display: grid;
  grid-template-columns: minmax(245px, .7fr) minmax(0, 1fr);
  gap: var(--editorial-flow-gap);
  align-items: stretch;
  margin: 0;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #sms :is(.sms-config, .sms-session) {
  min-width: 0;
  padding: var(--editorial-flow-pad);
  border: var(--editorial-flow-frame);
  border-radius: var(--editorial-flow-radius);
  background: var(--editorial-flow-paper);
  color: var(--editorial-flow-ink);
  box-shadow: var(--editorial-flow-shadow);
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #sms .sms-config { display: grid; align-content: start; gap: 14px; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #sms :is(.sms-config h2, .empty-panel h2) { margin: 0; font: 650 24px/1.25 var(--editorial-flow-serif); letter-spacing: -.01em; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #sms .sms-cost { padding-block: 10px; border-block: var(--editorial-flow-frame); }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #sms :is(#email-price, .empty-panel > span) { color: var(--editorial-flow-accent); }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #sms .empty-panel { min-height: 150px; border: 0; background: transparent; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #sms .compliance {
  margin-top: 16px;
  padding: 12px 0;
  border: 0;
  border-top: var(--editorial-flow-frame);
  border-radius: 0;
  background: transparent;
  color: var(--editorial-flow-muted);
}

/* Keep overlay open/closed and status logic in the existing JS/CSS. */
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #modal.modal-layer {
  background: rgb(22 40 65 / 42%);
  backdrop-filter: blur(3px);
  overscroll-behavior: contain;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #modal .modal-card {
  border-radius: var(--editorial-flow-radius);
  box-shadow: 0 20px 64px rgb(22 40 65 / 24%);
  overscroll-behavior: contain;
}
/* Match Atlas Flow's search/cart variant specificity without replacing its important widths. */
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #modal:has(#modal-body > :is(.search-input, div > :is(.cart-empty, .cart-line))) .modal-card {
  border-radius: var(--editorial-flow-radius);
  box-shadow: 0 20px 64px rgb(22 40 65 / 24%);
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #modal .modal-x { width: 44px; height: 44px; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #modal :is(#modal-body > h2, #entry-notification-title) {
  padding-inline-end: 44px;
  color: var(--editorial-flow-ink);
  font: 650 clamp(26px, 3vw, 34px)/1.22 var(--editorial-flow-serif);
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #modal .search-results button > span { min-width: 0; overflow-wrap: anywhere; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #modal :is(.cart-line, .od-kv, .od-product, .od-guide, .od-secret-content) { min-width: 0; overflow-wrap: anywhere; }
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #modal .od-secret-content { white-space: pre-wrap; }
/* Atlas shell hard-codes these two important fills. */
html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#cs-dock .cs-head, #toast.toast) {
  border-color: var(--editorial-flow-accent-line);
  background: var(--editorial-flow-wash) !important;
  color: var(--editorial-flow-deep) !important;
}

/* Public account access and documents share the same paper and controls. */
html:not([data-theme]) body:is(.auth-body.atlas:not(.admin-auth), .legal-body.atlas):not([data-theme]) { background-color: var(--editorial-flow-canvas); }
html:not([data-theme]) body.auth-body.atlas:not(.admin-auth):not([data-theme]) .auth-shell {
  width: min(100%, 940px);
  gap: clamp(24px, 6vw, 72px);
  box-shadow: none;
}
html:not([data-theme]) body.auth-body.atlas:not(.admin-auth):not([data-theme]) .user-auth-aside h1 {
  color: var(--editorial-flow-ink);
  font: 650 clamp(35px, 4.4vw, 54px)/1.16 var(--editorial-flow-serif);
  letter-spacing: -.015em;
}
html:not([data-theme]) body.auth-body.atlas:not(.admin-auth):not([data-theme]) .auth-form-wrap {
  border-radius: var(--editorial-flow-radius);
  box-shadow: var(--editorial-flow-shadow);
}
html:not([data-theme]) body.auth-body.atlas:not(.admin-auth):not([data-theme]) .user-auth-form h2 { font: 650 clamp(27px, 3.4vw, 39px)/1.2 var(--editorial-flow-serif); letter-spacing: -.012em; }
html:not([data-theme]) body.auth-body.atlas:not(.admin-auth):not([data-theme]) .user-auth-form .auth-tab {
  min-height: 44px;
  border-radius: var(--editorial-flow-control-radius) var(--editorial-flow-control-radius) 0 0;
  font: 650 14px/1.3 var(--editorial-flow-sans);
}
html:not([data-theme]) body.auth-body.atlas:not(.admin-auth):not([data-theme]) .user-auth-form .password-wrap input { padding-inline-end: 48px; }
html:not([data-theme]) body.auth-body.atlas:not(.admin-auth):not([data-theme]) .user-auth-form .reveal { min-width: 44px; min-height: 44px; }
html:not([data-theme]) body.legal-body.atlas:not([data-theme]) .legal-header { border-bottom: var(--editorial-flow-frame); }
html:not([data-theme]) body.legal-body.atlas:not([data-theme]) .legal-shell { width: min(980px, calc(100% - clamp(28px, 8vw, 96px))); }
html:not([data-theme]) body.legal-body.atlas:not([data-theme]) .legal-shell > h1 { color: var(--editorial-flow-ink); font: 650 clamp(38px, 5.2vw, 62px)/1.14 var(--editorial-flow-serif); letter-spacing: -.016em; }
html:not([data-theme]) body.legal-body.atlas:not([data-theme]) .legal-shell > section { grid-template-columns: minmax(0, .37fr) minmax(0, 1fr); }
html:not([data-theme]) body.legal-body.atlas:not([data-theme]) .legal-shell section h2 { font: 650 22px/1.3 var(--editorial-flow-serif); letter-spacing: -.01em; }
html:not([data-theme]) body.legal-body.atlas:not([data-theme]) .legal-shell section p { line-height: 1.75; overflow-wrap: anywhere; }
html:not([data-theme]) body.legal-body.atlas:not([data-theme]) :is(.legal-shell, .legal-footer) a { color: var(--editorial-flow-accent); text-underline-offset: .2em; }

@media (max-width: 820px) {
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #checkout .checkout-layout { grid-template-columns: minmax(0, 1fr); }
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #checkout .checkout-summary { position: static; }
}
@media (max-width: 760px) {
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product .detail-layout { grid-template-columns: minmax(0, 1fr); }
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product .detail-main:has(#detail-icon.has-banner) > :is(#detail-category, #detail-name, #detail-desc) { grid-area: auto; }
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product #detail-name { font-size: 28px; }
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product #detail-price { font-size: 30px; }
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #product .purchase-panel { position: static; }
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#checkout .checkout-title, #cashier .cashier-grid, #orders .order-query, #account .account-orders:not([hidden]), #sms .sms-header, #sms .sms-shell) { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) :is(#checkout .checkout-title, #orders .order-query, #account .account-orders-head, #sms .sms-header) h1 { font-size: 32px; }
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #orders #query-form { grid-column: 1; grid-row: auto; margin-top: 17px; }
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #account :is(.wallet-card, .account-orders-subhead, #my-orders) { grid-column: 1; grid-row: auto; }
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #account .wallet-card { margin-bottom: 18px; }
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #sms .sms-header { gap: 12px; }
  html:not([data-theme]) body.auth-body.atlas:not(.admin-auth):not([data-theme]) .auth-shell { width: min(100%, 510px); grid-template-columns: minmax(0, 1fr); gap: 20px; }
  html:not([data-theme]) body.auth-body.atlas:not(.admin-auth):not([data-theme]) .user-auth-aside h1,
  html:not([data-theme]) body.legal-body.atlas:not([data-theme]) .legal-shell > h1 { font-size: 32px; }
  html:not([data-theme]) body.legal-body.atlas:not([data-theme]) .legal-shell > section { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 510px) {
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #checkout :is(.form-grid, .payment-options),
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #modal .search-results { grid-template-columns: minmax(0, 1fr); }
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #cashier .cashier-step { padding-inline: 7px; overflow-wrap: anywhere; }
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #modal :is(#modal-body > h2, #entry-notification-title) { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-theme]) body.shop-body.atlas:not([data-theme]) #modal .modal-card { animation: none; }
}
