/* Scoped to surah memorization; the QPC Mushaf keeps its existing layout. */
.hifdh-page .surah-detail-head { margin-bottom: 1.6rem; }
.hifdh-intro { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.5rem; margin-bottom: 1rem; border: 1px solid #cddfd1; border-radius: 18px; background: #eaf2e8; }
.hifdh-intro h2 { margin: 0; font-size: 1.7rem; }
.hifdh-intro p { margin: .6rem 0 0; max-width: 600px; color: #456452; }
.hifdh-intro .eyebrow { margin-bottom: .5rem; }
.hifdh-intro .button { flex-shrink: 0; }
.hifdh-settings { border: 1px solid var(--line); border-radius: 16px; background: var(--white); padding: 0 1.25rem 1rem; margin-bottom: 1rem; scroll-margin-top: 100px; }
.hifdh-settings:not([open]) { padding-bottom: 0; }
.hifdh-settings summary { cursor: pointer; padding: 1rem 0; font-weight: 800; }
.hifdh-settings summary span { font-size: .75rem; color: #5c7566; margin-inline-start: 1rem; font-weight: 500; }
.hifdh-settings-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; padding: .4rem 0 1.25rem; }
.hifdh-settings-grid label { display: grid; gap: .4rem; font-size: .75rem; font-weight: 700; }
.hifdh-settings-grid select { width: 100%; min-width: 0; min-height: 44px; padding: .6rem; border: 1px solid #cad9ce; border-radius: 9px; color: var(--ink); background: white; font-size: .85rem; }
.hifdh-display { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1.25rem 0; }
.hifdh-display > span { font-size: .78rem; font-weight: 700; margin-inline-end: auto; }
.hifdh-dock { position: sticky; top: var(--hifdh-top, 74px); z-index: 35; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem 1rem; padding: .9rem 1rem .6rem; border: 1px solid #b6cfbf; border-radius: 16px; background: rgba(255, 254, 250, .98); box-shadow: 0 8px 26px #143e3020; }
.hifdh-transport { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.hifdh-dock button { cursor: pointer; }
.hifdh-dock button:disabled { cursor: default; opacity: .35; }
.hifdh-play, .hifdh-round { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid #d5e0d5; border-radius: 50%; background: #f2f6ef; color: #174b3a; font-size: 1.7rem; }
.hifdh-play { background: #10533e; color: white; border-color: #10533e; }
.hifdh-status { display: grid; min-width: 0; gap: .1rem; margin-inline-start: .4rem; }
.hifdh-status strong { font-size: .9rem; }
.hifdh-status span { font-size: .7rem; color: #516c5a; overflow-wrap: anywhere; }
.hifdh-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.hifdh-actions button { min-height: 38px; padding: .4rem .7rem; border: 1px solid #d0ddce; border-radius: 20px; background: white; color: #284e3a; font-size: .7rem; font-weight: 700; }
.hifdh-actions button[aria-pressed="true"] { background: #e4f0e2; border-color: #aacbab; }
.hifdh-seek { grid-column: 1 / -1; display: flex; align-items: center; gap: .6rem; direction: ltr; }
.hifdh-seek span { min-width: 2.5rem; color: #5d7565; font-size: .65rem; font-variant-numeric: tabular-nums; }
.hifdh-seek input { width: 100%; min-width: 0; height: 20px; accent-color: #1c7654; }
.hifdh-feedback { grid-column: 1 / -1; margin: 0; font-size: .75rem; color: #5c704b; }
.hifdh-feedback:empty { display: none; }
.hifdh-page .hifdh-verses { max-width: 940px; margin-top: 1.4rem; }
.hifdh-page .hifdh-verse { position: relative; margin-bottom: 1.1rem; padding: 1.25rem 1.5rem 1.6rem; border: 1px solid #e0e7db; border-inline-start: 4px solid transparent; border-radius: 16px; background: var(--white); transition: background-color .18s; }
.hifdh-page .hifdh-verse.is-active { border-color: #aec9b0; border-inline-start-color: #226b4d; background: #edf5e9; box-shadow: 0 5px 18px #305a3210; }
.hifdh-page .hifdh-verse.is-active::after { content: ''; position: absolute; inset-inline-start: 16px; bottom: 0; width: min(var(--ayah-progress, 0%), calc(100% - 32px)); height: 3px; background: #549a68; border-radius: 4px; }
.hifdh-verse .verse-top { gap: .5rem; }
.hifdh-verse .hifdh-verse-play { display: flex; align-items: center; gap: .35rem; min-height: 44px; cursor: pointer; background: #f6f4e9; border-radius: 10px; padding: .4rem .65rem; }
.hifdh-location { margin-inline-end: auto; color: #607969; font-size: .65rem; }
.hifdh-verse .verse-actions { gap: .2rem; }
.hifdh-verse .verse-actions button { width: 40px; height: 44px; border-radius: 10px; }
.hifdh-page .verse-ar { font-size: clamp(1.85rem, 3vw, 2.5rem); line-height: 2.15; margin: 1.2rem 0; overflow-wrap: break-word; }
.hifdh-page .verse-translit { color: #765c30; font-size: 1.05rem; line-height: 1.9; font-style: normal; text-align: start; margin: .8rem 0; overflow-wrap: anywhere; }
.hifdh-page .verse-translation { border-top: 1px solid #dbe4d5; padding-top: .9rem; margin-top: 1rem; }
.hifdh-page button:focus-visible, .hifdh-page select:focus-visible, .hifdh-page summary:focus-visible, .hifdh-page input:focus-visible { outline: 3px solid #b59044; outline-offset: 3px; }
body.hifdh-audio .player { display: none; }
body.hifdh-audio.has-player { padding-bottom: 0; }
html[dir="rtl"] .hifdh-transport > .hifdh-round { transform: scaleX(-1); }
@media (max-width: 900px) {
  .hifdh-dock { grid-template-columns: 1fr; }
  .hifdh-actions { justify-content: flex-start; }
  .hifdh-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .hifdh-intro { flex-direction: column; align-items: stretch; padding: 1.15rem; }
  .hifdh-intro p { font-size: .85rem; }
  .hifdh-page .surah-head-ar { font-size: 1.6rem; }
  .hifdh-dock { margin-inline: -.45rem; padding: .65rem .6rem .35rem; gap: .3rem; border-radius: 12px; }
  .hifdh-status strong { font-size: .82rem; }
  .hifdh-status span { font-size: .65rem; }
  .hifdh-actions button { min-height: 36px; padding: .3rem .6rem; }
  .hifdh-page .hifdh-verse { padding: .8rem .85rem 1.15rem; }
  .hifdh-page .verse-ar { font-size: 1.9rem; line-height: 2; }
  .hifdh-page .verse-translit { font-size: .98rem; }
  .hifdh-location { display: none; }
  .hifdh-verse .verse-top { justify-content: space-between; }
  .hifdh-settings summary span { display: block; margin: .4rem 0 0; }
}
@media (prefers-reduced-motion: reduce) { .hifdh-page * { scroll-behavior: auto; transition: none; } }
