/* Round 428 — the Mushaf flipbook (mushaf.php); round 430: the index of editions (mushaf-hub.php) */
.msf-page { max-width: 1240px; }
.msf-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 18px 0 18px; }
.msf-k { margin: 0 0 6px; font: 600 11.5px/1.3 'Inter', sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #b45309; }
.msf-h1 { margin: 0; font: 700 clamp(1.9rem, 4vw, 2.6rem)/1.1 'Space Grotesk', sans-serif; color: var(--t-text); }
.msf-sub { margin: 6px 0 0; color: var(--t-text-secondary); font-size: 14.5px; }
.msf-nav { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.msf-nav label { display: grid; gap: 4px; font-size: 12px; color: var(--t-text-secondary); }
.msf-nav select, .msf-nav input { min-height: 44px; box-sizing: border-box; padding: 0 10px; border-radius: 12px; border: 1px solid var(--t-border); background: var(--t-card, var(--t-bg)); color: var(--t-text); font: 500 14px 'Inter', sans-serif; }
.msf-nav select { max-width: 210px; }
.msf-nav input { width: 92px; }
.msf-nav button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: #8a4614; color: #fff; font: 600 14px 'Inter', sans-serif; cursor: pointer; }
.msf-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px 18px 18px; border-radius: 26px; background: linear-gradient(180deg, #efe6d6, #e4d7c1); }
.msf-book { width: 100%; max-width: 1000px; margin: 0 auto; }
.msf-p { background: #fffdf8; overflow: hidden; }
.msf-p img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
/* round 429: taking a corner must not start the browser's own image drag or a text selection (the book shook) */
.msf-book { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: pan-y; }
.msf-stage { overflow: hidden; }
html { scrollbar-gutter: stable; }
.msf-p img:not([src]) { visibility: hidden; }
.msf-no { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font: 600 11px 'Inter', sans-serif; color: rgba(0, 0, 0, .28); pointer-events: none; }
.msf-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.msf-b { display: inline-flex; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; justify-content: center; padding: 0 12px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .75); color: #4a2e12; font: 600 14px 'Inter', sans-serif; cursor: pointer; }
.msf-b:hover, .msf-b:focus-visible { background: #fff; outline: none; }
.msf-b svg { width: 20px; height: 20px; }
.msf-pn { min-width: 92px; text-align: center; font: 700 15px 'Space Grotesk', sans-serif; color: #4a2e12; font-variant-numeric: tabular-nums; }
.msf-read { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; background: #8a4614; color: #fff; font: 600 14px 'Inter', sans-serif; text-decoration: none; }
.msf-hint { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--t-text-secondary); }
.msf-src { margin: 8px auto 30px; max-width: 760px; text-align: center; font-size: 12px; line-height: 1.5; color: var(--t-text-secondary); }
.msf-stage.is-full { position: fixed; inset: 0; z-index: 2147483000; border-radius: 0; justify-content: center; overflow: auto;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.msf-stage.is-full .msf-book { max-width: calc((100vh - 110px) * 1.4); }
.msf-stage:fullscreen { width: 100%; height: 100%; }
html.msf-full-on, html.msf-full-on body { overflow: hidden; }
@media (max-width: 640px) {
    .msf-stage { padding: 12px 8px; border-radius: 18px; }
    .msf-nav select { max-width: 150px; }
    .msf-full span { display: none; }
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .msf-stage { background: linear-gradient(180deg, #2a2219, #1f1912); }
    :root:not([data-theme="light"]) .msf-b { background: rgba(255, 255, 255, .12); color: #f3e3c7; }
    :root:not([data-theme="light"]) .msf-pn { color: #f3e3c7; }
}
:root[data-theme="dark"] .msf-stage { background: linear-gradient(180deg, #2a2219, #1f1912); }
:root[data-theme="dark"] .msf-b { background: rgba(255, 255, 255, .12); color: #f3e3c7; }
:root[data-theme="dark"] .msf-pn { color: #f3e3c7; }
/* round 430: the reader's link back to the index; the index of editions */
.msf-k a { color: inherit; text-decoration: none; }
.msf-k a:hover { text-decoration: underline; }
.msf-hub-head { margin: 18px 0 22px; max-width: 760px; }
.msf-lead { margin: 10px 0 0; font-size: 16px; line-height: 1.6; color: var(--t-text-secondary); text-wrap: pretty; }
.msf-eds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 18px; }
.msf-ed { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; text-decoration: none; color: var(--t-text); background: var(--t-card, var(--t-bg)); border: 1px solid var(--t-border); transition: transform .2s, box-shadow .2s; }
.msf-ed:hover, .msf-ed:focus-visible { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(74, 46, 18, .16); outline: none; }
.msf-ed-cover { display: flex; justify-content: center; padding: 22px 18px 18px; background: linear-gradient(180deg, #efe6d6, #e4d7c1); }
.msf-ed-cover img { width: 46%; max-width: 190px; height: auto; aspect-ratio: 400 / 580; object-fit: contain; background: #fffdf8; box-shadow: 0 6px 16px rgba(74, 46, 18, .18); }
.msf-ed-body { display: grid; gap: 6px; padding: 16px 18px 18px; }
.msf-ed-name { font: 700 19px/1.25 'Space Grotesk', sans-serif; }
.msf-ed-meta { font-size: 13.5px; color: var(--t-text-secondary); }
.msf-ed-pub { font-size: 12.5px; color: var(--t-text-secondary); }
.msf-ed-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font: 600 14px 'Inter', sans-serif; color: #8a4614; }
.msf-ed-go svg { width: 18px; height: 18px; }
[dir="rtl"] .msf-ed-go svg { transform: scaleX(-1); }
.msf-about { margin: 30px 0 36px; max-width: 760px; font-size: 14.5px; line-height: 1.65; color: var(--t-text-secondary); }
.msf-about h2 { margin: 0 0 8px; font: 700 18px 'Space Grotesk', sans-serif; color: var(--t-text); }
.msf-about p { margin: 0 0 10px; }
.msf-src-l { font-size: 13px; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .msf-ed-cover { background: linear-gradient(180deg, #2a2219, #1f1912); }
    :root:not([data-theme="light"]) .msf-ed-go { color: #f0b37a; }
}
:root[data-theme="dark"] .msf-ed-cover { background: linear-gradient(180deg, #2a2219, #1f1912); }
:root[data-theme="dark"] .msf-ed-go { color: #f0b37a; }
