.badge-card button { margin: .35rem .25rem .35rem 0; }
.badge-card button:disabled, .contact-form button:disabled { opacity: .55; cursor: not-allowed; }
.badge-card [data-sankalp-status] { min-height: 3em; }
.panchang-method-note { font-size: .95rem; line-height: 1.6; padding: 1rem; border-left: 3px solid #b56a24; background: #fff8ec; color: #542b16; }
.panchang-popup .panchang-method-note { max-height: 9rem; overflow-y: auto; }
.pandit-panel > p { font-size: .85rem; padding: .5rem 1rem; margin: 0; }

.content-source-note { font-size: .9rem; line-height: 1.6; padding: .75rem; background: #fff8ec; border-left: 3px solid #b56a24; }
.finder button[type="submit"] { align-self: end; }
.socials a { width: auto; padding: .4rem .6rem; }

body { -webkit-user-select: text; user-select: text; }
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 10000; padding: .7rem 1rem; background: #fff; color: #542b16; border: 2px solid #8a3b12; transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #1b6383; outline-offset: 3px; }
.reading-overview dl { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(0, 3fr); gap: .5rem 1rem; }
.reading-overview dt { font-weight: 700; }
.reading-overview dd { margin: 0; }
.reading-toc, .reader-toolbar { display: flex; flex-wrap: wrap; gap: .65rem; margin-block: 1rem; }
.reader-toolbar[hidden] { display: none; }
.reader-toolbar button { min-height: 44px; padding: .5rem .8rem; border: 1px solid #8a3b12; border-radius: .5rem; background: #fff8ec; color: #542b16; cursor: pointer; }
.reader-toolbar button:disabled { opacity: .5; cursor: not-allowed; }
.reader-toolbar [role="status"] { align-self: center; }
.lyrics-box[data-reading] { font-size: calc(1.15rem * var(--reader-scale, 1)); line-height: 1.9; overflow-wrap: anywhere; }
.lyrics-box[data-reading] p, .lyrics-box[data-reading] p strong { font-size: inherit; }
.passage-link { display: inline-block; font: .8rem system-ui, sans-serif; padding: .2rem .4rem; color: #6a3216; text-decoration: underline; }
[id^="passage-"], #reading-text, #reading-practice, #reading-faq, #main-content { scroll-margin-top: 6rem; }
[id^="passage-"]:target { background: #fff1be; }
[data-tool-load-status] { max-width: 18rem; background: #fff8ec; color: #542b16; margin: .25rem; font-size: .85rem; }
[data-tool-load-status]:empty { display: none; }
@media (max-width: 480px) {
  .reading-overview dl { grid-template-columns: 1fr; gap: .25rem; }
  .reading-overview dd { margin-bottom: .75rem; }
  .reader-toolbar { gap: .4rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  @page { margin: 15mm; }
  body { background: #fff !important; color: #000 !important; font: 12pt/1.6 serif; }
  .site-header, .site-footer, .finder-section, .reader-toolbar, .reading-toc, .related-panel,
  .pandit-chatbot, .jap-floating-widget, .panchang-popup, .damru-floating-toggle, .damru-player-popup,
  .passage-link, .skip-link, .chalisa-music-player, .chalisa-listen-links { display: none !important; }
  .inner-hero { background: none !important; color: #000 !important; padding: 0 !important; min-height: 0 !important; }
  .inner-hero *, .chalisa-article * { color: #000 !important; box-shadow: none !important; text-shadow: none !important; }
  .shell, .chalisa-layout, .chalisa-article { display: block !important; width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
  .lyrics-box { background: none !important; border: 0 !important; font-size: 13pt !important; }
  .lyrics-box p, h2, h3 { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
  .faq-list details > * { display: block !important; }
  a { text-decoration: none; }
}

.audio-preferences { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-block: .65rem; }
.audio-preferences label { display: flex; align-items: center; gap: .4rem; }
.audio-preferences button, .audio-preferences select, [data-favorites-list] button { min-height: 44px; padding: .45rem .65rem; border: 1px solid #8a3b12; border-radius: .4rem; background: #fff8ec; color: #542b16; }
.audio-preferences button[hidden], [data-favorite-url][hidden] { display: none; }
[data-favorites-list] h2 { overflow-wrap: anywhere; }
@media print { .audio-preferences, [data-favorite-url] { display: none !important; } }

/* Keep floating tools usable on short phone screens and with on-screen keyboards. */
.pandit-panel, .jap-floating-panel { max-height: calc(100dvh - 6rem); overflow-y: auto; overscroll-behavior: contain; }
.panchang-popup-card, .damru-player-card { max-height: calc(100dvh - 2rem); overflow-y: auto; overscroll-behavior: contain; }
.pandit-form input { min-width: 0; }
@media (max-width: 480px) {
  .pandit-panel, .jap-floating-panel { max-width: calc(100vw - 2rem); }
  .panchang-popup-card, .damru-player-card { width: min(100%, calc(100vw - 2rem)); }
}

.audio-feedback { margin-block: .5rem; font-size: .9rem; }
.audio-feedback p:empty { display: none; }
.audio-feedback button { min-height: 44px; padding: .5rem .8rem; border: 1px solid #8a3b12; border-radius: .4rem; background: #fff8ec; color: #542b16; }
.audio-feedback button[hidden] { display: none; }
.damru-player-card button:disabled { opacity: .5; cursor: not-allowed; }
@media print { .audio-feedback { display: none !important; } }

.suggestion-item.is-selected { background: #fff1be; outline: 2px solid #8a3b12; outline-offset: -2px; }
.search-status { min-height: 1.5em; font-size: .9rem; margin-block: .5rem; }
.search-results[aria-busy="true"] { opacity: .65; }
