/* Website only: native app shells retain their existing presentation. */
.story-page--web .story-hero { padding-block: 22px 34px; }
.story-page--web .story-breadcrumb { margin-bottom: 20px; }
.story-page--web .story-hero__grid { min-height: 0; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); }
.story-page--web .story-cover { width: 220px; }
.story-page--web .story-hero h1 { margin-bottom: 18px; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.35; letter-spacing: 0; }
.story-title__subtitle { display: block; margin-top: 5px; color: #52627b; font: 600 .57em/1.4 "Noto Kufi Arabic", system-ui, sans-serif; text-align: start; unicode-bidi: isolate; }
.story-page--web .story-hero h1:dir(rtl) .story-title__subtitle { text-align: right; }
.story-page--web .story-facts { margin-bottom: 14px; }
.story-page--web .story-hero__actions { margin-top: 18px; gap: 8px; }
.story-page--web .story-hero__actions .button { min-width: 0; min-height: 44px; padding-inline: 16px; font-size: 14px; }
.story-page--web .story-tabs button { min-height: 64px; font-size: 22px; }
.story-page--web #story-chapters-tab { scroll-margin-top: 110px; }
.story-page--web .story-detail-layout { padding-top: 28px; }
.story-chapters--web { max-width: 1000px; margin-inline: auto; }
.story-chapters--web .section-heading { margin-bottom: 20px; align-items: center; }
.story-chapters--web .section-heading h2 { margin: 0; font-size: 28px; }
.story-chapters--web .section-heading > span { color: #5c6c83; font-size: 14px; }
.chapter-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 22px; }
.chapter-search { display: flex; flex: 1 1 240px; align-items: center; gap: 8px; min-width: 0; padding-inline: 14px; min-height: 46px; border: 1px solid #d6dfec; border-radius: 10px; background: #fff; }
.chapter-search svg { width: 19px; flex-shrink: 0; color: #64748b; }
.chapter-search input { width: 100%; min-width: 0; padding: 11px 0; background: transparent; border: 0; color: #17243b; font: 400 14px "Noto Kufi Arabic", system-ui, sans-serif; }
.chapter-sort { display: flex; align-items: center; gap: 8px; font: 500 13px "Noto Kufi Arabic", system-ui, sans-serif; color: #52627b; }
.chapter-sort select { min-height: 46px; max-width: 100%; padding: 8px 12px; border: 1px solid #d6dfec; border-radius: 10px; background: #fff; color: #17243b; font: 600 13px "Noto Kufi Arabic", system-ui, sans-serif; }
.chapter-layout { display: flex; gap: 3px; padding: 3px; background: #f0f4fa; border: 1px solid #e2e8f0; border-radius: 10px; }
.chapter-layout button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 40px; padding: 8px 11px; background: transparent; border: 1px solid transparent; border-radius: 7px; color: #52627b; font: 600 13px "Noto Kufi Arabic", system-ui, sans-serif; cursor: pointer; }
.chapter-layout button[aria-pressed="true"] { background: #fff; color: #1553cf; border-color: #d4e1fa; box-shadow: 0 2px 4px #142e5810; }
.chapter-layout svg { width: 17px; height: 17px; }
.story-chapters--web .chapter-list { display: grid; gap: 14px; border: 0; }
.story-chapters--web .chapter-list--cards { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.story-chapters--web .chapter-list > a { min-width: 0; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 24px; padding: 22px; border: 1px solid #dce4f0; border-radius: 12px; background: #fff; color: #17243b; transition: border-color .16s, background .16s, box-shadow .16s; }
.story-chapters--web .chapter-list > a:hover { border-color: #8caff3; background: #f8faff; box-shadow: 0 4px 14px #16376b0a; }
.story-chapters--web .chapter-list > a > .chapter-list__cover { width: 120px; height: 165px; border-radius: 9px; }
.story-chapters--web .chapter-list > a > div { gap: 8px; }
.story-chapters--web .chapter-list__title { display: grid; gap: 4px; }
.story-chapters--web .chapter-list__title > span { font: 600 14px/1.5 "Noto Kufi Arabic", system-ui, sans-serif; color: #64748b; }
.story-chapters--web .chapter-list__title > span:only-child { font-size: 24px; color: #17243b; }
.story-chapters--web .chapter-list strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font: 700 24px/1.6 "Noto Kufi Arabic", system-ui, sans-serif; text-align: start; }
.story-chapters--web .chapter-list .chapter-list__meta { gap: 5px 12px; font: 400 14px/1.7 "Noto Kufi Arabic", system-ui, sans-serif; color: #5b6b82; }
.story-chapters--web .chapter-list__meta > span { white-space: normal; }
.story-chapters--web .chapter-list__meta svg { flex-shrink: 0; }
.chapter-status { display: flex; flex-wrap: wrap; gap: 6px; }
.chapter-status span { display: inline-block; padding: 2px 8px; border-radius: 5px; background: #eaf2ff; color: #1b52ae; font: 600 11px/1.6 "Noto Kufi Arabic", system-ui, sans-serif; }
.story-chapters--web .chapter-list--list { grid-template-columns: 1fr; gap: 8px; }
.story-chapters--web .chapter-list--list > a { grid-template-columns: 46px minmax(0, 1fr) 18px; padding: 12px 16px; }
.story-chapters--web .chapter-list--list > a > .chapter-list__cover { width: 46px; height: 64px; }
.story-chapters--web .chapter-list--list .chapter-list__title { display: flex; }
.story-chapters--web .chapter-list--list strong, .story-chapters--web .chapter-list--list .chapter-list__title > span:only-child { font-size: 17px; }
.story-chapters--web .chapter-list--list .chapter-list__meta { font-size: 12px; }
.story-chapters--web .chapter-list > a > .chapter-card__action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 16px; border-radius: 9px; border: 1px solid #cfddf6; background: #edf3ff; color: #174fc2; font: 700 14px/1.6 "Noto Kufi Arabic", system-ui, sans-serif; white-space: nowrap; }
.chapter-card__action svg { width: 19px; height: 19px; flex-shrink: 0; }
.chapter-empty { display: grid; justify-items: center; gap: 12px; padding: 36px 18px; background: #f8faff; border: 1px dashed #d6dfec; border-radius: 12px; color: #52627b; font-size: 15px; }
.chapter-empty p { margin: 0; }
.chapter-results { color: #52627b; font-size: 13px; }
.story-chapters--web :is(a, button, input, select):focus-visible, .story-page--web #story-chapters-tab:focus-visible { outline: 3px solid #3372ed; outline-offset: 3px; }
.chapter-search:focus-within { border-color: #3372ed; }
@media (max-width: 760px) {
  .story-chapters--web .chapter-list--cards { grid-template-columns: minmax(0, 1fr); }
  .story-chapters--web .chapter-list--cards > a { grid-template-columns: 85px minmax(0, 1fr); gap: 12px 16px; padding: 16px; }
  .story-chapters--web .chapter-list--cards > a > .chapter-list__cover { width: 85px; height: 120px; grid-row: 1 / 3; align-self: start; }
  .story-chapters--web .chapter-list--cards strong, .story-chapters--web .chapter-list--cards .chapter-list__title > span:only-child { font-size: 19px; }
  .story-chapters--web .chapter-list--cards .chapter-list__meta { font-size: 13px; }
  .story-chapters--web .chapter-list--cards > a > .chapter-card__action { grid-column: 2; justify-self: start; min-height: 42px; padding: 8px 12px; font-size: 13px; }
  .story-page--web .story-hero__grid { grid-template-columns: 100px minmax(0, 1fr); gap: 18px; align-items: start; }
  .story-page--web .story-cover { width: 100px; }
  .story-page--web .story-hero h1 { font-size: 27px; }
  .story-page--web .story-hero__copy { display: contents; }
  .story-page--web .story-hero__copy > :not(h1) { grid-column: 1 / -1; margin-block: 0; }
  .story-page--web .story-hero__copy > h1 { grid-column: 2; grid-row: 1; align-self: center; }
  .story-page--web .story-hero__actions .button { flex: 1 1 140px; }
  .story-page--web .story-breadcrumb { overflow-wrap: anywhere; }
  .chapter-toolbar { gap: 10px; }
  .chapter-search { flex-basis: 100%; }
  .chapter-sort { flex: 1 1 150px; flex-wrap: wrap; }
  .chapter-layout { margin-inline-start: auto; }
}
@media (max-width: 400px) {
  .story-chapters--web .chapter-list--cards > a { padding: 12px; column-gap: 12px; }
  .chapter-layout { width: 100%; margin: 0; }
  .chapter-layout button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .story-chapters--web .chapter-list > a, .story-page--web .story-cover img { transition: none; }
}
