/* Shared responsive rules for the local pages and customer flows. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
:where(img, video, canvas) { max-width: 100%; }
:where(audio) { width: 100%; max-width: 100%; min-width: 0; }
:where(main, section, article, form, fieldset) { min-width: 0; }
:where(button, a, input, select, textarea, summary) { -webkit-tap-highlight-color: transparent; }
:where(button, a, input, select, textarea, summary):focus-visible { outline-offset: 4px; }
:where(.grid) > * { min-width: 0; }
:where(p, h1, h2, h3, dd, address) { overflow-wrap: break-word; }

@media (max-width: 900px) {
  .sample-section .song-carousel { flex-direction: column; gap: 24px; }
  .sample-section .song-carousel .player-card,
  .sample-section .song-carousel .player-card.active {
    width: 340px;
    max-width: 100%;
    transform: none;
    margin-inline: auto;
    min-width: 0;
  }
  .ptable-wrap { max-width: 100%; margin-inline: 0; width: 100%; overscroll-behavior-x: contain; }
}
@media (max-width: 767px) {
  :where(button, summary, input:not([type="hidden"]), select) { min-height: 44px; }
  :where(button) { min-width: 44px; }
  :where(input, select, textarea) { font-size: 16px; }
  textarea { max-width: 100%; }
  :where(input[type="date"]) { max-width: 100%; min-width: 0; }
  :where(a.button, .nav-cta, .top-cta, .search-btn, .final-btn) { min-height: 44px; }
  :where(.nav-inner, .nav-wrap) { flex-wrap: wrap; row-gap: 12px; }
  :where(.nav-inner .logo, .nav-wrap .logo) { font-size: 18px; }
  .lis-brand { max-width: 100%; }
  .customer-header nav a { min-height: 44px; display: inline-flex; align-items: center; }
  .customer-header .account { max-width: 45%; }
  .customer-header:has(.account-email) .account { max-width: 100%; width: 100%; margin: 0; }
  .card-order dl, .order-details dl { overflow-wrap: anywhere; }
  .card-specs { line-height: 1.7; }
  .card-order > a, .detail-actions a, .player-tools a, .player-tools button {
    display: inline-flex; align-items: center; min-height: 44px;
  }
  .player-tools { gap: 8px 20px; }
  .text-button, button.text-button { min-height: 44px; }
  .library-player { padding: 10px 16px max(10px, env(safe-area-inset-bottom)); gap: 4px; }
  .library-player .play { width: 44px; height: 44px; }
  .library-player .playing-track { width: calc(100% - 60px); padding-left: 60px; }
  .library-player .playing-track img { display: none; }
  .library-player .playing-track span { display: none; }
  .library-player .audio-row { gap: 16px; }
  .library-player .sample-note { display: none; }
  body[data-view="dashboard"] .dashboard { padding-bottom: calc(132px + env(safe-area-inset-bottom)); }
  body[data-view="dashboard"] .customer-footer { margin-bottom: calc(132px + env(safe-area-inset-bottom)); }
  .wizard-footer { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .flow { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
  .wizard-footer > div { max-width: 100%; }
  #review { max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; }
  dialog { max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
  .local-nav-dialog { max-height: 100dvh; }
  .chapters button { width: 100%; margin-inline: 0; min-height: 44px; }
  .song-head { gap: 16px; }
  .song-head img { width: 72px; height: 72px; flex: none; }
  .song-head-text { min-width: 0; overflow-wrap: anywhere; }
  .song-head-text h2, .song-head-text h3 { overflow-wrap: anywhere; }
  .hero-body, .song-chip, .song-chip > div { min-width: 0; }
  .top-nav { min-width: 0; }
  .top-cta { white-space: normal; text-align: center; }
  .sample-section { padding-inline: 20px; }
  .prose-inner .tradition-grid, .prose-inner .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .inline-cta { max-width: 100%; min-width: 0; }
  .inline-cta > * { min-width: 0; }
  .final-guarantees { max-width: 100%; }
  .final-guarantee { min-width: 0; }
  .player-card { min-width: 0; }
  .notice { bottom: calc(136px + env(safe-area-inset-bottom)); }
  .album-links { flex-wrap: wrap; }
  #public-tribute .cover { max-height: 460px; object-fit: cover; }
  .invoice-meta { overflow-wrap: anywhere; }
  .invoice-sheet table { table-layout: fixed; }
  .invoice-sheet th:last-child, .invoice-sheet td:last-child { width: 30%; }
  .invoice-sheet td { overflow-wrap: anywhere; }
  .audio-progress input[type="range"] { height: 44px; margin: 0; background: transparent; }
  .audio-progress .time { margin-top: -4px; }
}
@media (max-width: 380px) {
  .customer-header { gap: 12px; }
  .customer-header .lis-brand { font-size: 18px !important; }
  .account { font-size: 10px; }
  .family-album figcaption { font-size: 9px; }
  .hero-section h1 { font-size: 30px; }
  .song-chip { gap: 12px; }
  .top { flex-wrap: wrap; row-gap: 12px; }
  .top-nav { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 900px) {
  .figure-portrait { transform: none !important; }
}
@media (max-width: 767px) {
  body input:not([type="range"]), body select, body textarea { font-size: 16px; }
  .dashboard:has(.tribute-filters) > .page-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
  }
  .dashboard:has(.tribute-filters) > .page-intro h1 { font-size: clamp(24px, 6.5vw, 30px); }
  .dashboard:has(.tribute-filters) > .page-intro p { display: none; }
  .dashboard:has(.tribute-filters) > .page-intro .button { font-size: 12px; padding: 10px 12px; }
  [data-section="funeral-services"] header > div { height: auto; min-height: 56px; padding-block: 10px; flex-wrap: wrap; gap: 8px 16px; }
  [data-section="funeral-services"] header nav { display: flex; gap: 0; }
  [data-section="funeral-services"] header nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 8px; font-size: 12px; }
  [data-section="funeral-services"] a.group { min-height: 44px; }
  [data-section="stories"] input[type="range"] { min-height: 44px; }
  [data-section="stories"] .lyrics button, [data-section="stories"] .memory-card button { min-height: 44px; }
}
.wizard-footer { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
@media (pointer: coarse) {
  .wizard-footer { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
  .library-player { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
}
