/* Shared finish for the incumbent white / cobalt / yellow customer shop. */
body.storefront {
  --ui-ease: cubic-bezier(.22, 1, .36, 1);
  --ui-fast: 140ms;
  --ui-panel: 220ms;
  --ui-field: #8d9db4;
  --ui-selected: #edf4ff;
  color-scheme: light;
  accent-color: var(--yst-blue);
  caret-color: var(--yst-blue);
  text-underline-offset: .2em;
  scrollbar-color: #a9b8ce var(--yst-soft);
}
body.storefront ::selection { background: #dbe9ff; color: #101c30; }
body.storefront :is(h1, h2, h3) { text-wrap: balance; }
body.storefront :is(button, a, select, summary, input) { touch-action: manipulation; }
body.storefront :is(button, a, summary) { -webkit-tap-highlight-color: #dbe9ff; }
body.storefront :is(button, a, summary):focus-visible {
  outline: 2px solid var(--yst-blue);
  outline-offset: 4px;
}
body.storefront :is(h1, h2, h3)[tabindex="-1"]:focus { outline: none; }
body.storefront :is(input, select, textarea) { scroll-margin-block: 100px 120px; }
body.storefront :is(section[id], h2[id], h3[id]) { scroll-margin-top: 100px; }
body.storefront .ui-skip-link {
  position: fixed; top: 12px; left: 16px; z-index: 500;
  padding: 12px 20px; border-radius: 10px; background: var(--yst-blue); color: white;
  font: 600 16px/1.5 YSTBody, sans-serif; transform: translateY(-180%);
}
body.storefront .ui-skip-link:focus { transform: none; }

/* A consistent hierarchy and more air between tasks, without larger chrome. */
body.storefront .topbar .brand-mark { min-height: 44px; }
body.storefront .topbar :is(#storeSearchButton, .shop-cart-nav, .mobile-menu-toggle) { box-shadow: none; }
body.storefront .topbar .topnav a { transition: background-color var(--ui-fast), color var(--ui-fast); }
body.storefront .section-heading { column-gap: 32px; row-gap: 16px; margin-bottom: 28px; }
body.storefront .section-heading p { max-width: 65ch; color: var(--yst-muted); }
body.storefront .home-canvas [data-region="hardware-note-caption"] { color: #536179; }
body.storefront .store-section-heading { margin-bottom: 24px; }
body.storefront :is(.store-product-info, .product-related-info) h3 { line-height: 1.5; }
body.storefront .store-product-info { padding: 22px; }
body.storefront .store-product-info p { line-height: 1.65; }
body.storefront .store-catalog-price { font-size: 20px; font-variant-numeric: tabular-nums; }
body.storefront .store-product-bottom { margin-top: 18px; }
body.storefront .store-product-bottom .store-text-action { min-height: 44px; display: inline-flex; align-items: center; }
body.storefront :is(.store-filters, .support-topics, .listen-vehicle-tabs) button {
  transition: color var(--ui-fast), background-color var(--ui-fast), border-color var(--ui-fast);
}
body.storefront :is(.store-filters, .support-topics) button:active { background: #dbe9ff; }
body.storefront :is(.product-selling-price, .price-total, .shop-summary dd, .checkout-summary-row strong) {
  font-variant-numeric: tabular-nums;
}
body.storefront .product-purchase { padding-block: 20px; border-top: 1px solid var(--yst-line); }
body.storefront .product-buy-actions .store-button { min-height: 52px; }
body.storefront .product-gallery-bar button { box-shadow: none; }
body.storefront .product-gallery-thumbs button { transition: background-color var(--ui-fast), border-color var(--ui-fast); }
body.storefront .site-footer :is(.footer-quick-links, .footer-links, .site-footer-bottom) a {
  display: inline-flex; align-items: center; min-height: 44px;
}
body.storefront .site-footer :is(.footer-link-column, .footer-column) a { min-height: 44px; }
body.storefront .site-footer a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
body.storefront .site-footer .store-footer-tools a { min-height: 44px; display: inline-flex; align-items: center; }
body.storefront .product-contents a, body.storefront .product-breadcrumb a { min-height: 44px; display: inline-flex; align-items: center; }

/* The audio itself drives playback, loading and the selected row. */
body.storefront :is(#listen, #flash) .listen-panel { padding: 28px; }
body.storefront :is(#listen, #flash) .listen-panel-header { gap: 20px; padding-bottom: 20px; }
body.storefront :is(#listen, #flash) .sound-row {
  padding-block: 16px; gap: 12px; border-bottom-color: var(--yst-line);
  transition: background-color var(--ui-fast), border-color var(--ui-fast);
}
body.storefront :is(#listen, #flash) .sound-label-title { font-size: 15px; font-weight: 600; }
body.storefront :is(#listen, #flash) :is(.sound-label-subtitle, .preset-counter) { font-size: 13px; }
body.storefront :is(#listen, #flash) .sound-row:has(.is-playing) {
  background: var(--ui-selected); border-radius: 10px; border-bottom-color: transparent;
}
body.storefront :is(#listen, #flash) .sound-row:has(.is-playing) .sound-label-title { color: var(--yst-blue); }
body.storefront :is(#listen, #flash) .preview-button {
  box-shadow: none; min-height: 44px;
  transition: color var(--ui-fast), background-color var(--ui-fast), transform var(--ui-fast) var(--ui-ease);
}
body.storefront :is(#listen, #flash) .preview-button.is-playing { background: #0048b5; color: white; }
body.storefront :is(#listen, #flash) .preview-button.is-loading { cursor: progress; }
body.storefront .audition-status {
  display: flex; align-items: center; gap: 12px; min-height: 56px;
  margin: 0 0 8px; padding: 10px 14px; border-radius: 10px;
  background: var(--yst-soft); color: var(--yst-muted); font-size: 14px; line-height: 1.5;
}
body.storefront .audition-status > svg { flex: 0 0 20px; width: 20px; height: 20px; color: var(--yst-blue); }
body.storefront .audition-status > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
body.storefront .audition-status button {
  flex: none; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px;
  background: white; color: var(--yst-blue); font: 600 14px/1.5 YSTBody, sans-serif; cursor: pointer;
}
body.storefront .audition-status button:disabled { color: var(--yst-muted); cursor: default; opacity: .7; }
body.storefront .audition-status[data-playing="true"] { background: var(--ui-selected); color: #274c7c; }
body.storefront .config-jump {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px;
  padding: 8px 0; border: 0; background: transparent; color: var(--yst-blue);
  font: 600 14px/1.5 YSTBody, sans-serif; cursor: pointer;
}
body.storefront .config-jump svg { width: 18px; height: 18px; }
body.storefront #pricing { padding: 24px; }
body.storefront #pricing .price-total { padding: 16px; border-radius: 12px; background: var(--ui-selected); }
body.storefront #pricing :is(.price-option, .board-version-choice):has(input:checked) { background: var(--ui-selected); border-color: var(--yst-blue); }
body.storefront #pricing .board-version-choice { transition: border-color var(--ui-fast), background-color var(--ui-fast); }
body.storefront #pricing #originalTotalPriceText { color: #536179; }
body.storefront .smart-config-actions { gap: 10px; }
body.storefront .smart-config-actions .price-order-button {
  min-height: 52px; border-radius: 10px; font-size: 16px;
  box-shadow: var(--yst-shadow-control);
  transition: background-color var(--ui-fast), transform var(--ui-fast) var(--ui-ease);
}
body.storefront .smart-config-actions .price-order-button:active:not(:disabled) { transform: translateY(1px) scale(.99); transition-duration: 0ms; }
body.storefront .smart-config-actions .price-order-button:disabled { box-shadow: none; cursor: not-allowed; }
body.storefront .mobile-config-jump { display: none; }

/* The same calm form language from cart through the existing checkout. */
body.storefront .shop-cart-row { padding-block: 28px; }
body.storefront .shop-cart-row > div > a { display: inline-block; font-size: 18px; line-height: 1.5; }
body.storefront .shop-cart-row .cart-config-overview { color: var(--yst-muted); }
body.storefront .shop-cart-row [data-cart-remove] { color: var(--yst-muted); }
body.storefront .shop-cart-row [data-cart-remove]:hover { color: #b42335; }
body.storefront .shop-summary h2 { font-size: 20px; }
body.storefront .shop-summary dl > div { padding-block: 16px; }
body.storefront .shop-cart-empty { padding: 32px; background: var(--yst-soft); border-radius: 16px; }
body.storefront .shop-cart-empty h2 { margin-bottom: 8px; }
body.storefront #checkout :is(.checkout-field, .checkout-address-field) > span { font-size: 14px; font-weight: 500; }
body.storefront #checkout :is(input, textarea) { border-color: var(--ui-field); }
body.storefront #checkout :is(input, textarea):focus { border-color: var(--yst-blue); }
body.storefront #checkout .checkout-support-card > small { color: var(--yst-muted); opacity: 1; font-size: 14px; }
body.storefront #checkout .checkout-summary-row.is-total { background: var(--ui-selected); }
body.storefront #checkout .checkout-summary-row.is-total strong { color: var(--yst-blue); font-size: 24px; }
body.storefront #checkout .checkout-payment-choice { transition: background-color var(--ui-fast), border-color var(--ui-fast); }
body.storefront .toy-discount-badge { color: #805000; background: #fff1c2; }

/* Legacy informational dialogs gain focus-safe entry/exit, without waiting on animations. */
body.storefront :is(.rx-info-modal, .dump-video-modal, .flash-upgrade-modal) {
  display: flex; visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity var(--ui-fast) var(--ui-ease), visibility 0s var(--ui-fast);
}
body.storefront :is(.rx-info-modal, .dump-video-modal, .flash-upgrade-modal).is-open {
  visibility: visible; opacity: 1; pointer-events: auto;
  transition: opacity var(--ui-panel) var(--ui-ease), visibility 0s;
}
body.storefront :is(.rx-info-dialog, .dump-video-dialog, .flash-upgrade-dialog) {
  max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain;
  transform: translateY(8px) scale(.985); transition: transform var(--ui-fast) var(--ui-ease);
}
body.storefront .is-open > :is(.rx-info-dialog, .dump-video-dialog, .flash-upgrade-dialog) {
  transform: none; transition-duration: var(--ui-panel);
}
body.storefront :is(.rx-info-head, .dump-video-head, .flash-upgrade-head) {
  position: sticky; top: 0; z-index: 2; background: white; border-bottom: 1px solid var(--yst-line);
}
body.storefront :is(.rx-info-close, .dump-video-close, .flash-upgrade-close) { min-width: 44px; min-height: 44px; color: var(--yst-ink); }
body.storefront .ui-focus-guard { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
body.storefront .smart-cart-toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
body.storefront .smart-cart-toast:not([hidden]) { animation: ui-notice-in 180ms var(--ui-ease); }
body.storefront .store-search-panel:not([hidden]) .store-search-inner { animation: ui-notice-in 180ms var(--ui-ease); }
body.storefront[data-page-hidden="true"] :is(.device-state-icon, .home-wave i, .home-wave span) { animation-play-state: paused; }
@keyframes ui-notice-in { from { opacity: .5; translate: 0 4px; } to { opacity: 1; translate: 0 0; } }

@media (hover: hover) and (pointer: fine) {
  body.storefront :is(#listen, #flash) .sound-row:focus-within:not(:has(.is-playing)) { background: #f7f9fd; }
  body.storefront :is(#listen, #flash) .preview-button:hover:not(:disabled) { transform: none; background: #0048b5; box-shadow: none; }
  body.storefront .audition-status button:hover:not(:disabled) { background: #dbe9ff; }
  body.storefront .smart-config-actions .smart-config-add:hover:not(:disabled) { background: #0048b5; }
}
@media (min-width: 1101px) {
  body.storefront #listen .listen-sidebar { position: sticky; top: 100px; }
  body.storefront #listen .store-listen-scene { max-height: 180px; }
  body.storefront #listen .store-listen-scene img { height: 180px; object-fit: cover; }
  body.storefront .shop-order-layout > .shop-summary { position: sticky; top: 100px; }
}
@media (max-width: 1100px) {
  body.storefront.mobile-menu-open .topnav { animation: ui-notice-in 180ms var(--ui-ease); }
}
@media (max-width: 860px) {
  body.storefront :is(#listen, #flash) .listen-panel { padding: 20px; }
  body.storefront .section-heading { margin-bottom: 24px; }
  body.storefront .floating-cta { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  body.storefront[data-active-tab="listen"] .floating-cta { grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; }
  body.storefront[data-active-tab="listen"] .mobile-config-jump {
    display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
    padding: 10px 12px; border: 0; border-radius: 10px; background: var(--ui-selected);
    color: var(--yst-blue); font: 600 14px/1.4 YSTBody, sans-serif; white-space: nowrap; cursor: pointer;
  }
  body.storefront[data-active-tab="listen"] .floating-cta .order-button { padding-inline: 14px; font-size: 14px; }
  body.storefront .mobile-order-total { min-width: 0; }
  body.storefront .smart-cart-toast { bottom: calc(100px + env(safe-area-inset-bottom)); }
}
@media (max-width: 600px) {
  body.storefront .store-product-info { padding: 20px; }
  body.storefront :is(#listen, #flash) .sound-row { padding-block: 18px; }
  body.storefront .audition-status { flex-wrap: wrap; gap: 8px; padding: 10px; }
  body.storefront .audition-status > span { flex-basis: calc(100% - 36px); }
  body.storefront .audition-status button { margin-left: 28px; }
  body.storefront .audition-status button:disabled { display: none; }
  body.storefront #pricing { padding: 20px; }
  body.storefront .shop-cart-row > div > a { font-size: 16px; }
  body.storefront .shop-cart-row { gap: 16px; }
  body.storefront .shop-cart-empty { padding: 24px; }
}
@media (max-width: 360px) {
  body.storefront[data-active-tab="listen"] .floating-cta .order-button { min-width: 0; padding-inline: 10px; font-size: 13px; }
  body.storefront[data-active-tab="listen"] .mobile-config-jump { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  body.storefront :is(.rx-info-modal, .dump-video-modal, .flash-upgrade-modal, .rx-info-dialog, .dump-video-dialog, .flash-upgrade-dialog) { transition: none; transform: none; }
  body.storefront .is-open > :is(.rx-info-dialog, .dump-video-dialog, .flash-upgrade-dialog) { transform: none; }
  body.storefront .smart-cart-toast:not([hidden]), body.storefront .store-search-panel:not([hidden]) .store-search-inner,
  body.storefront.mobile-menu-open .topnav { animation: none; }
  body.storefront .smart-config-actions .price-order-button:active:not(:disabled) { transform: none; }
}
