/* ==========================================================================
   Islamic Hub — theme-system.css (v60)
   Loaded on every page. One place for:
   1. Accessible (WCAG AA) text colours in light + dark
   2. Text-over-image legibility (scrims + shadows)
   3. Responsive safety net (phone / tablet / desktop, no horizontal overflow)
   4. Theme toggle button (.ih-theme-btn / floating .ih-theme-fab)
   5. v60 GLOBAL UI POLISH LAYER (section 9) — elevation, focus rings, press
      feedback, themed scrollbars/selection, modal entrance, input focus.
      Pure refinement: ZERO layout / structure / feature changes.
   ========================================================================== */

/* ---------- 1. Colour tokens: AA contrast ---------- */
html[data-theme="light"] {
  color-scheme: light;
  /* homepage / namaz-shikkha family */
  --text-primary: #12281d;
  --text-secondary: #46655a;
  --accent-primary: #0d7a55;
  /* thematic / stories family */
  --tx: #10261b;
  --tx-2: #3b5c4e;
  --tx-3: #52746a;
  --brand-2: #0a7a54;
  --gold: #9a4a07;
  /* quran family */
  --text: #0f172a;
  --text2: #52606f;
  --accent2: #047857;
  /* admin */
  --accent-gold: #b45309;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --text-primary: #eaf6ef;
  --text-secondary: #a9d2bd;
  --tx: #eef8f2;
  --tx-2: #b5d6c4;
  --tx-3: #8fb6a2;
  --text: #f8fafc;
  --text2: #a9b6c8;
}

/* ---------- 2. Text over images ---------- */
/* Hero-style blocks always carry light text on a dark scrim, in BOTH themes */
.sb-header,
.reader-meta-block,
.adm-hero,
#prayerWidget,
.voice-ai-hero,
#voiceAIModal .modal-content,
#splashScreen,
.hero-banner,
[class*="ih-bg-"] {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55), 0 0 18px rgba(0, 0, 0, .25);
}
.sb-header {
  background: linear-gradient(rgba(3, 28, 21, .66), rgba(3, 28, 21, .78)), url('img/sidebar-premium-bg.webp') center/cover no-repeat !important;
}
.reader-meta-block {
  background: linear-gradient(rgba(3, 28, 21, .62), rgba(3, 28, 21, .80)), url('img/quran-premium-bg.webp') center/cover no-repeat !important;
}
.adm-hero {
  background: linear-gradient(rgba(3, 28, 21, .60), rgba(3, 28, 21, .78)), url('img/brand-banner-bg.webp') center/cover no-repeat !important;
}
#splashScreen {
  background: linear-gradient(rgba(3, 28, 21, .55), rgba(3, 28, 21, .72)), #064e3b url('img/sidebar-header-bg.webp') center/cover no-repeat !important;
}
#prayerWidget {
  background-image: linear-gradient(135deg, rgba(3, 40, 30, .93), rgba(6, 60, 43, .90)), url('img/prayer-premium-bg.webp') !important;
}
.voice-ai-hero,
#voiceAIModal .modal-content {
  background-image: linear-gradient(135deg, rgba(3, 30, 30, .94), rgba(4, 60, 45, .92)), url('img/voice-ai-bg.webp') !important;
}
.ih-bg-hero-day       { background-image: linear-gradient(rgba(3,28,21,.55), rgba(3,28,21,.72)), url('img/hero-premium-day.webp') !important; }
.ih-bg-hero-masjid    { background-image: linear-gradient(rgba(3,28,21,.55), rgba(3,28,21,.72)), url('img/hero-premium-masjid.webp') !important; }
.ih-bg-card-prayer    { background-image: linear-gradient(rgba(3,28,21,.50), rgba(3,28,21,.70)), url('img/card-prayer.webp') !important; }
.ih-bg-card-dua       { background-image: linear-gradient(rgba(3,28,21,.50), rgba(3,28,21,.70)), url('img/card-dua.webp') !important; }
.ih-bg-card-tasbih    { background-image: linear-gradient(rgba(3,28,21,.50), rgba(3,28,21,.70)), url('img/card-tasbih.webp') !important; }
.ih-bg-namaz-shikkha  { background-image: linear-gradient(rgba(3,28,21,.50), rgba(3,28,21,.70)), url('img/namaz-shikkha-bg.webp') !important; }
/* hero <img> + overlay: stronger scrim behind the text column, still left-to-right */
.hero-overlay {
  background: linear-gradient(to right, rgba(6, 22, 17, .96) 0%, rgba(6, 22, 17, .78) 50%, rgba(6, 22, 17, .25) 100%) !important;
}
@media (max-width: 600px) {
  /* phones: text spans the full width, so darken the whole banner */
  .hero-overlay { background: linear-gradient(rgba(6,22,17,.82), rgba(6,22,17,.9)) !important; }
}
/* Generic helper for any future image + text block */
.ih-on-image { position: relative; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.ih-on-image::before { content:''; position:absolute; inset:0; background:linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.65)); pointer-events:none; border-radius:inherit; }
.ih-on-image > * { position: relative; }

/* Dark mode: stop inline-white blocks from glowing (namaz-shikkha uses many inline styles) */
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:#ffffff"],
html[data-theme="dark"] [style*="background: #ffffff"],
html[data-theme="dark"] [style*="background:white"],
html[data-theme="dark"] [style*="background: white"] {
  background: var(--bg-surface, var(--surface, #132a1f)) !important;
  color: var(--text-primary, var(--tx, #eaf6ef)) !important;
}
/* Dark mode: dark inline text colours on dark surfaces */
html[data-theme="dark"] [style*="color:#000"],
html[data-theme="dark"] [style*="color: #000"],
html[data-theme="dark"] [style*="color:#111"],
html[data-theme="dark"] [style*="color:#1a2e23"],
html[data-theme="dark"] [style*="color: #1a2e23"],
html[data-theme="dark"] [style*="color:#333"],
html[data-theme="dark"] [style*="color: #333"] {
  color: var(--text-primary, var(--tx, #eaf6ef)) !important;
}
/* Light mode: pale inline text on pale surfaces */
html[data-theme="light"] [style*="color:#e2f0e8"],
html[data-theme="light"] [style*="color: #e2f0e8"],
html[data-theme="light"] [style*="color:#eaf6ef"] {
  color: var(--text-primary, var(--tx, #12281d)) !important;
}
/* Placeholders + disabled controls keep readable contrast */
input::placeholder, textarea::placeholder { opacity: 1; color: var(--text-secondary, var(--tx-2, #5b6b63)); }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea {
  color-scheme: dark;
}
html[data-theme="dark"] option { background: #10291f; color: #eaf6ef; }
html[data-theme="light"] option { background: #fff; color: #12281d; }

/* ---------- 3. Responsive safety net ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; max-width: 100%; overflow-x: clip; }
body { max-width: 100%; overflow-x: clip; min-width: 0; }
img, video, canvas, svg, iframe, embed, object { max-width: 100%; }
img, video { height: auto; }
svg[width] { height: auto; }
pre, code, kbd { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
table { max-width: 100%; }
/* Long Bangla / Arabic words never push a card past the screen */
h1, h2, h3, h4, h5, h6, p, li, label, button, a { overflow-wrap: anywhere; }
.material-symbols-rounded, .material-symbols-outlined, .material-icons { overflow-wrap: normal !important; word-break: normal !important; white-space: nowrap; }
.arabic, [lang="ar"], [dir="rtl"] { overflow-wrap: break-word; word-break: normal; }
/* Flex children are allowed to shrink (root cause of "header goes outside the screen") */
[style*="display:flex"] > *, [style*="display: flex"] > *,
[style*="display:grid"] > *,  [style*="display: grid"] > * { min-width: 0; }
[style*="display:flex"][style*="space-between"],
[style*="display: flex"][style*="space-between"] { flex-wrap: wrap; }
[style*="grid-template-columns"] { max-width: 100%; }
/* Page wrappers */
.ns-wrap, .result-area, main, .container, .wrap, .page, .content { max-width: 100%; }
.ns-wrap { width: 100%; margin-inline: auto; padding-inline: 16px; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
/* Safe areas for notches / gesture bars */
.app-header, .topbar, header { padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px)); }
.bottom-nav { padding-bottom: max(8px, env(safe-area-inset-bottom, 0px)); max-width: 100vw; }
/* Fixed-position panels can never be wider than the viewport */
.sidebar { max-width: min(86vw, 360px); }
.modal-content, [class*="modal"] > div, [class*="sheet"] { max-width: min(100vw - 16px, 720px); }
[class*="modal"] .modal-content, .modal-content { max-height: calc(100dvh - 24px); overflow-y: auto; }
/* Tap targets */
button, [role="button"], .header-btn, .tb-btn, .adm-btn-icon { min-height: 40px; }
button, a { -webkit-tap-highlight-color: transparent; }

/* Small phones */
@media (max-width: 480px) {
  /* namaz-shikkha top bar: stack, never overflow */
  .ns-wrap #namazArea > div:first-child,
  #namazArea > div:first-child { padding: 12px !important; gap: 10px !important; border-radius: 16px !important; }
  .ns-wrap .namaz-filters { width: 100%; }
  .ns-wrap .namaz-filters select { flex: 1 1 calc(50% - 8px); min-width: 0; }
  #namazArea .grid, .grid { grid-template-columns: 1fr !important; }
  .app-header, .topbar { border-radius: 0 0 22px 22px; }
  .app-header { padding-inline: 12px !important; }
  .header-title, .tb-title { font-size: 16px; }
}
/* Tablets: two comfortable columns, centred reading width */
@media (min-width: 768px) and (max-width: 1099px) {
  .ns-wrap { max-width: 860px; }
}
/* Desktop: centre the phone-first layout so lines stay readable */
@media (min-width: 1100px) {
  .ns-wrap { max-width: 1040px; }
}
/* Very large screens */
@media (min-width: 1600px) { html { font-size: 17px; } }
/* Landscape phones: keep header compact */
@media (max-height: 480px) and (orientation: landscape) {
  .app-header, .topbar { min-height: 52px !important; padding-top: calc(6px + env(safe-area-inset-top, 0px)) !important; padding-bottom: 8px !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- 4. Theme toggle ---------- */
.ih-theme-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; min-height: 42px; padding: 0; flex: 0 0 auto;
  border-radius: 50%; cursor: pointer; line-height: 1;
  border: 1.5px solid var(--border-color, var(--line-strong, rgba(120,160,140,.35)));
  background: var(--bg-surface, var(--surface, #fff));
  color: var(--text-primary, var(--tx, #12281d));
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
  transition: transform .2s ease, background .2s ease;
}
.ih-theme-btn:active { transform: scale(.92); }
.ih-theme-btn svg { width: 22px; height: 22px; pointer-events: none; }
.ih-theme-btn .ih-ic-sun { display: none; }
html[data-theme="dark"] .ih-theme-btn .ih-ic-sun { display: block; }
html[data-theme="dark"] .ih-theme-btn .ih-ic-moon { display: none; }
/* Inside green headers the button is glass */
.app-header .ih-theme-btn, .topbar .ih-theme-btn {
  background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .28); box-shadow: none;
}
/* Floating fallback for pages with no header slot */
.ih-theme-fab {
  position: fixed; z-index: 2147483000;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: calc(10px + env(safe-area-inset-right, 0px));
  width: 44px; height: 44px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
[dir="rtl"] .ih-theme-fab { right: auto; left: calc(10px + env(safe-area-inset-left, 0px)); }
@media print { .ih-theme-btn, .ih-theme-fab { display: none !important; } }

/* ---------- 5. namaz-shikkha: premium COMPACT single-row sticky header ---------- */
/* FIX: the 20px .result-area margin-top left a gap above the sticky bar where
   page content scrolled through (looked broken). Kill it — the bar itself carries
   safe-area + spacing. */
#namazArea.result-area { margin-top: 0 !important; }
/* FIX: single compact row on every screen. The old `flex-wrap: wrap` produced a
   fat 2-row header on phones (the reported header bug). */
#namazArea > div:first-child.nz-sticky-topbar,
#namazArea > div:first-child {
  min-width: 0;
  flex-wrap: nowrap !important;
  row-gap: 0 !important;
  margin: 0 -14px 14px -14px !important;   /* .ns-wrap side padding = 14px → exact full-bleed, no 2px overflow */
  width: calc(100% + 28px);
}
#namazArea > div:first-child > div:first-child { min-width: 0; flex: 1 1 auto; max-width: 100%; }
#namazArea > div:first-child > div:first-child > div { min-width: 0; }
#namazArea > div:first-child span[style*="font-size:19px"] {
  white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; min-width: 0; line-height: 1.25;
}
#namazArea > div:first-child .btn-outline { flex: 0 0 auto; }
.nz-header-actions { flex: 0 0 auto !important; max-width: 100%; min-width: 0; justify-content: flex-end; margin-left: auto; }
.nz-header-actions .ih-theme-btn { width: 36px; height: 36px; min-height: 36px; }
.nz-header-actions .ih-theme-btn svg { width: 19px; height: 19px; }
.nz-opt-btn, .nz-summary-pill { max-width: 100%; white-space: nowrap; }
/* Phones: compact labelled back button (restore "ফিরে যান" text — icon-only looked broken).
   Space is saved by hiding the mosque emoji + summary pill instead (pill content lives in the popover). */
@media (max-width: 767px) {
  #namazArea > div:first-child { padding-left: 12px !important; padding-right: 12px !important; }
  #namazArea > div:first-child .btn-outline {
    font-size: 13px !important; gap: 3px !important;
    padding: 6px 12px !important; min-height: 34px; flex: 0 0 auto; white-space: nowrap;
  }
  #namazArea > div:first-child .btn-outline .material-symbols-rounded { font-size: 18px !important; }
  #namazArea > div:first-child span[style*="font-size:24px"] { display: none !important; }  /* 🕌 emoji off on phones */
  #namazArea > div:first-child > div:first-child { gap: 8px !important; }
  .nz-summary-pill { display: none !important; }
}
@media (max-width: 520px) {
  .nz-opt-btn { padding: 6px 11px !important; }
  .nz-opt-btn > span:last-child { font-size: 12px !important; }  /* keep the "অপশন" label visible */
}
.nz-options-popover { max-width: calc(100vw - 20px); }

.nz-sticky-topbar .ih-theme-btn { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.3); box-shadow: none; }

/* ---------- 6. Full-bleed header inside the 5px phone container (was 11px wider than the screen) ---------- */
@media (max-width: 767px) {
  .container > .app-header, .container > header.app-header { margin-left: -5px !important; margin-right: -5px !important; }
}

/* ---------- 7. Grids: columns may shrink below their content (fixes tiles pushed off-screen) ---------- */
.dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 520px) { .dashboard-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
@media (min-width: 840px) { .dashboard-grid { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; } }
.dashboard-item { min-width: 0; max-width: 100%; }
.dashboard-label { max-width: 100%; line-height: 1.3; overflow-wrap: anywhere; word-break: break-word; }

/* ---------- 8. quran.html header: 3 action buttons must fit on 320px ---------- */
.app-header .header-left { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.app-header .header-btns { flex: 0 0 auto; gap: 4px !important; }
.app-header .ih-theme-btn { width: 36px; height: 36px; min-height: 36px; }
.app-header .ih-theme-btn svg { width: 19px; height: 19px; }
@media (max-width: 360px) { .app-header #cityNameHeader { max-width: 120px; overflow: hidden; } }

/* ---------- 9. v60 GLOBAL UI POLISH LAYER ----------------------------------
   Owner directive 2026-11-08: "whole UI/UX polished". Pure refinement layer:
   elevation tokens, focus rings, press physics, themed scrollbars + selection,
   modal entrance, input focus, disabled states. All rules are LOW specificity
   (:where / single class) so every page's own styles keep priority — no layout
   or structure change anywhere. */
:root {
  --ih-ease: cubic-bezier(.22, .61, .36, 1);
  --ih-ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  --ih-ring: 0 0 0 3px rgba(16, 185, 129, .30);
  --ih-sh-3: 0 18px 44px rgba(6, 60, 43, .18), 0 4px 10px rgba(6, 60, 43, .08);
}
html[data-theme="dark"] {
  --ih-ring: 0 0 0 3px rgba(110, 231, 183, .34);
  --ih-sh-3: 0 18px 44px rgba(0, 0, 0, .55), 0 4px 10px rgba(0, 0, 0, .30);
}

/* Crisper text, themed text selection + caret */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: rgba(16, 185, 129, .26); color: inherit; }
html[data-theme="dark"] ::selection { background: rgba(110, 231, 183, .30); }
input, textarea, select, [contenteditable="true"] { caret-color: #0d7a55; }
html[data-theme="dark"] input, html[data-theme="dark"] textarea, html[data-theme="dark"] select { caret-color: #4ecca3; }

/* App-like overscroll: no accidental pull-to-refresh flash */
html { overscroll-behavior-y: contain; }

/* Themed thin scrollbars everywhere (Firefox + Chromium/WebKit) */
* { scrollbar-width: thin; scrollbar-color: rgba(13, 122, 85, .42) transparent; }
html[data-theme="dark"] * { scrollbar-color: rgba(110, 231, 183, .32) transparent; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(13, 122, 85, .40); border-radius: 99px; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(110, 231, 183, .30); }
::-webkit-scrollbar-thumb:hover { background: rgba(13, 122, 85, .62); }
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: rgba(110, 231, 183, .50); }
::-webkit-scrollbar-corner { background: transparent; }

/* Keyboard focus: one consistent premium ring (mouse/touch clicks stay ring-free) */
:where(button, a, [role="button"], [tabindex]):focus-visible { outline: none !important; box-shadow: var(--ih-ring) !important; }
:where(input, select, textarea):focus { outline: none; }
:where(input, select, textarea):focus-visible { box-shadow: var(--ih-ring); border-color: rgba(16, 185, 129, .5); }
.form-input:focus, .form-input:focus-visible { border-color: rgba(16, 185, 129, .5); box-shadow: var(--ih-ring); }

/* Gentle press physics on every interactive element (pages with their own
   :active rules keep winning — this layer never uses !important on transform) */
button, [role="button"], .act-btn, .btn-outline {
  transition-property: transform, box-shadow, background-color, border-color, color, opacity, filter;
  transition-duration: .18s;
  transition-timing-function: var(--ih-ease);
}
:where(button):active { transform: scale(.965); }
:where(button):disabled { opacity: .55; cursor: not-allowed; }
:where(button):disabled:active { transform: none; }

/* Cards: soft rest elevation, gentle lift on devices that can hover */
:where(.card, .topic-card, .verse-card, .hadith-card, .story-card, .glass-card, .prf-body-card) {
  transition: transform .22s var(--ih-ease), box-shadow .22s var(--ih-ease);
}
@media (hover: hover) and (pointer: fine) {
  :where(.card, .topic-card, .verse-card, .hadith-card, .story-card):hover { transform: translateY(-2px); box-shadow: var(--ih-sh-3); }
}

/* Modals: refined entrance each time they open (namaz popover keeps its own nzPopIn) */
@keyframes ihPopIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-content { animation: ihPopIn .26s var(--ih-ease-pop); -webkit-overflow-scrolling: touch; }

/* Arabic passages: smoother glyph rendering */
.arabic, [lang="ar"] { text-rendering: optimizeLegibility; }

/* Headings: balanced line-fill where supported (no layout change — purely nicer wraps) */
@supports (text-wrap: balance) { h1, h2, h3 { text-wrap: balance; } }

/* ---------- 10. v61 SCROLL-ROW SAFETY — topic/chip names always FULL ----------
   Owner directive 2026-11-08: "scrollable card ache oigulai scroll card e oi
   topic gulor name full thaka chai". Flex children of horizontal scrollers were
   being squeezed (flex-shrink:1 default) so chip text clipped mid-word
   ("সব (", "কুরআন ও…"). Chips/buttons inside a horizontal scroller now keep
   their natural width and the row scrolls instead. Covers inline-styled rows
   (JS-generated) and the shared class-based rows. */
div[style*="overflow-x: auto"] > button,
div[style*="overflow-x:auto"] > button,
div[style*="overflow-x: auto"] > div[style*="white-space:nowrap"],
div[style*="overflow-x:auto"] > div[style*="white-space:nowrap"],
#ihHomeFilterBar > button,
.filter-btn, .tab, .zikr-chip, .quick-question-chip { flex-shrink: 0; }

/* ---------- 11. v61 IMAGE FALLBACK PLACEHOLDER (offline safety) ----------
   Owner directive: broken/missing images must never spill alt text over the
   layout — theme-system.js swaps failed <img> to a themed placeholder icon
   (img.ih-img-fb) or hides decorative ones (img.ih-img-hidden). */
img.ih-img-fb {
  background: rgba(13, 138, 95, 0.08);
  border-radius: 14px;
  object-fit: contain;
  min-width: 28px;
  min-height: 28px;
}
html[data-theme="dark"] img.ih-img-fb { background: rgba(110, 231, 183, 0.10); }
img.ih-img-hidden { visibility: hidden !important; opacity: 0 !important; }

/* ---------- 12. v62 FLEX-COLUMN SCROLL SAFETY — cards never crushed ----------
   Owner directive 2026-11-09: "tracker e calender e dhukte bolche ei ui tah
   ekdom bicciri". #ibadahDashboardContent is a definite-height flex column
   with overflow-y:auto; its children kept flex-shrink:1 so every widget got
   SQUEEZED to fit the viewport instead of scrolling — the ইবাদত ক্যালেন্ডার
   banner was crushed to its 40px min-height floor with the title spilling
   above and the subtitle clipped below. Vertical twin of the v61 rule:
   scrollable flex columns scroll, they never crush their children. */
#ibadahDashboardContent > * { flex-shrink: 0; }
/* Same protection for any other definite-height scrollable flex column
   (JS-injected overlays use this inline pattern): */
div[style*="flex-direction:column"][style*="overflow-y:auto"] > *,
div[style*="flex-direction: column"][style*="overflow-y: auto"] > * { flex-shrink: 0; }


/* ==== v63: icon fallback (offline-safe SVG icons instead of ligature text) ==== */
.msr-fb { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; fill: currentColor; pointer-events: none; }
.msr-fb-dot { color: transparent !important; }
.msr-fb-dot::before { content: '●'; color: var(--text-secondary, #94a3b8) !important; font-size: .45em; vertical-align: .12em; }
html.msr-noicon .material-symbols-rounded { color: transparent !important; text-shadow: none !important; }

/* ---------- UX polish pass (v73): touch ergonomics + a11y ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-iteration-count: 1 !important; }
}
/* icon buttons keep their visual size but get a larger touch hit-area */
.header-btn, .icon-btn, .ai-btn-close { position: relative; -webkit-user-select: none; user-select: none; }
.header-btn::after, .icon-btn::after, .ai-btn-close::after { content: ''; position: absolute; inset: -5px; border-radius: inherit; }
/* chrome (nav/buttons) shouldn't select text on double-tap; content stays selectable */
.sb-item, .bottom-nav, .bottom-nav *, .floating-nav, .floating-nav *, .chip { -webkit-user-select: none; user-select: none; }
