:root {
  --ink: #070b1a;
  --ink-2: #0d1430;
  --glass: rgba(18, 26, 58, .55);
  --glass-hi: rgba(30, 42, 88, .7);
  --line: rgba(232, 195, 122, .16);
  --gold: #e8c37a;
  --gold-2: #f6dfa8;
  --rose: #d98aa6;
  --teal: #6fc6c0;
  --text: #ece6d6;
  --muted: #a7a3b8;
  --r: 18px;
  --poem: "Amiri", "Noto Naskh Arabic", serif;
  --ui: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --display: "Aref Ruqaa", "Amiri", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; background: var(--ink); color: var(--text);
  font-family: var(--ui); font-size: 16px; line-height: 1.6; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
::selection { background: rgba(232, 195, 122, .35); }

/* ---------- animated background ---------- */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -3; }
.aurora { position: fixed; inset: -20vmax; z-index: -2; filter: blur(70px); opacity: .55; pointer-events: none; }
.aurora i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; mix-blend-mode: screen; }
.aurora i:nth-child(1) { background: radial-gradient(circle, #3a2f7a 0, transparent 60%); top: 0; right: 10%; animation: drift1 38s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { background: radial-gradient(circle, #6b3358 0, transparent 60%); bottom: 0; left: 5%; animation: drift2 46s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { background: radial-gradient(circle, #1d5a63 0, transparent 60%); top: 30%; left: 35%; animation: drift3 54s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(-18vmax, 14vmax) scale(1.2); } }
@keyframes drift2 { to { transform: translate(16vmax, -12vmax) scale(.9); } }
@keyframes drift3 { to { transform: translate(-10vmax, -16vmax) scale(1.15); } }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- hero ---------- */
.hero { position: relative; text-align: center; padding: clamp(56px, 12vh, 120px) 16px 28px; }
.star8 { position: absolute; width: min(520px, 90vw); left: 50%; top: 50%; translate: -50% -58%; color: var(--gold); opacity: .13; animation: spin 140s linear infinite; pointer-events: none; }
@keyframes spin { to { rotate: 360deg; } }
.eyebrow { margin: 0; color: var(--gold); letter-spacing: .02em; font-size: .9rem; opacity: 0; animation: rise .9s .1s forwards; }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(3rem, 9vw, 6.2rem); margin: .1em 0 .05em; line-height: 1.25;
  background: linear-gradient(100deg, var(--gold-2), var(--gold) 40%, #c9925a 60%, var(--gold-2)); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: rise 1s .2s both, sheen 9s linear infinite; text-shadow: 0 0 60px rgba(232, 195, 122, .15); }
@keyframes sheen { to { background-position: -220% 0; } }
.lede { font-family: var(--poem); font-size: clamp(1.1rem, 2.4vw, 1.4rem); color: var(--muted); margin: 0 auto; max-width: 34ch; opacity: 0; animation: rise 1s .45s forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 28px; margin-top: 30px; opacity: 0; animation: rise 1s .7s forwards; }
.stat { min-width: 96px; }
.stat b { display: block; font-family: var(--poem); font-size: 2rem; color: var(--gold-2); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: .82rem; color: var(--muted); }

/* ---------- controls ---------- */
main { width: min(1240px, 100%); margin: 0 auto; padding: 0 16px 80px; }
.controls { position: sticky; top: 0; z-index: 5; padding: 12px 0 14px;
  background: linear-gradient(rgba(7,11,26,.96) 70%, rgba(7,11,26,0)); }
.searchbar { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(0,0,0,.35); transition: border-color .25s, box-shadow .25s; }
.searchbar:focus-within { border-color: rgba(232,195,122,.55); box-shadow: 0 0 0 4px rgba(232,195,122,.08), 0 10px 40px rgba(0,0,0,.35); }
.searchbar svg { width: 22px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 2; flex: none; margin-inline-start: 6px; }
#q { flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 10px 2px; font-size: 1.08rem; }
#q::placeholder { color: var(--muted); opacity: .8; }
kbd { font-family: var(--ui); font-size: .75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
.ghost { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s; white-space: nowrap; }
.ghost:hover { background: rgba(232,195,122,.1); border-color: rgba(232,195,122,.45); }
.ghost:active { transform: scale(.96); }
#random { color: var(--gold-2); }

.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tab { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 7px 16px; cursor: pointer; transition: .2s; }
.tab[aria-selected="true"] { background: linear-gradient(135deg, var(--gold), #c9925a); color: #1a1405; border-color: transparent; font-weight: 600; }
.tab small { opacity: .7; margin-inline-start: 6px; }

.controls-rest { margin-bottom: 8px; }
.filters { margin-top: 4px; border: 1px solid var(--line); border-radius: var(--r); background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.filters summary { list-style: none; cursor: pointer; padding: 12px 18px; display: flex; justify-content: space-between; font-weight: 500; }
.filters summary::-webkit-details-marker { display: none; }
.filters summary::after { content: "⌄"; color: var(--gold); transition: transform .25s; }
.filters[open] summary::after { transform: rotate(180deg); }
.active-count { color: var(--gold); font-size: .85rem; margin-inline-start: auto; margin-inline-end: 12px; }
.fgroup { padding: 4px 18px 10px; }
.fgroup h3 { margin: 0 0 6px; font-size: .78rem; font-weight: 500; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 120px; overflow-y: auto; }
.chip { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 999px; padding: 4px 12px; font-size: .88rem; cursor: pointer; transition: .18s; }
.chip:hover { border-color: rgba(232,195,122,.5); }
.chip[aria-pressed="true"] { background: rgba(232,195,122,.18); border-color: var(--gold); color: var(--gold-2); }
.chip small { opacity: .55; margin-inline-start: 4px; font-variant-numeric: tabular-nums; }
.frow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 6px 18px 16px; }
select { background: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .92rem; }
.toggle input { position: absolute; opacity: 0; }
.toggle span { width: 38px; height: 22px; border-radius: 999px; background: rgba(255,255,255,.12); position: relative; transition: .2s; }
.toggle span::after { content: ""; position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text); transition: .2s; }
.toggle input:checked + span { background: var(--gold); }
.toggle input:checked + span::after { right: 19px; background: #1a1405; }
.toggle input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.timeline { display: flex; align-items: flex-end; gap: 6px; height: 74px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; cursor: pointer; background: none; border: 0; padding: 0; }
.bar i { display: block; width: 100%; max-width: 64px; border-radius: 8px 8px 3px 3px; background: linear-gradient(var(--gold), rgba(232,195,122,.25)); opacity: .5; transition: opacity .2s, transform .3s; transform-origin: bottom; }
.bar:hover i, .bar[aria-pressed="true"] i { opacity: 1; }
.bar span { font-size: .75rem; color: var(--muted); }
.bar[aria-pressed="true"] span { color: var(--gold-2); }

.resultline { color: var(--muted); font-size: .9rem; margin: 14px 4px; min-height: 1.6em; }

/* ---------- cards ---------- */
.grid { columns: 3 320px; column-gap: 18px; }
.card { break-inside: avoid; margin: 0 0 18px; padding: 22px 22px 16px; border-radius: var(--r); position: relative; cursor: pointer;
  background: linear-gradient(160deg, var(--glass-hi), var(--glass)); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .35s, box-shadow .35s;
  opacity: 0; transform: translateY(18px); animation: cardIn .6s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes cardIn { to { opacity: 1; transform: none; } }
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(232,195,122,.12), transparent 45%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.card:hover { transform: translateY(-4px); border-color: rgba(232,195,122,.4); box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.card:hover::before { opacity: 1; }
.card:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.card .num { position: absolute; top: 14px; left: 16px; font-family: var(--poem); color: var(--gold); opacity: .55; font-size: .95rem; }
.verse { font-family: var(--poem); font-size: 1.22rem; line-height: 2.05; white-space: pre-wrap; margin: 0; color: #f3eee2; }
.card .verse { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.card .title { font-family: var(--poem); font-weight: 700; color: var(--gold-2); font-size: 1.3rem; margin: 0 0 6px; }
mark { background: rgba(232,195,122,.3); color: inherit; border-radius: 3px; padding: 0 1px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.meta .poet { color: var(--gold-2); }
.meta .pill { border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; }
.meta .pill.t { border-color: rgba(217,138,166,.35); color: #f0bfd0; }
.meta .pill.d { border-color: rgba(232,195,122,.5); color: var(--gold-2); background: rgba(232,195,122,.08); }
.meta .pill.k { border-color: rgba(111,198,192,.35); color: #a9e3df; }

.sentinel { height: 1px; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; font-family: var(--poem); font-size: 1.3rem; }

.gallery { columns: 3 260px; column-gap: 16px; }
.gallery img { width: 100%; margin-bottom: 16px; border-radius: 14px; border: 1px solid var(--line); cursor: zoom-in; transition: transform .3s; break-inside: avoid; display: block; }
.gallery img:hover { transform: scale(1.02); }
.gallery figure { margin: 0; break-inside: avoid; }
.gallery figcaption { font-size: .78rem; color: var(--muted); margin: -10px 4px 14px; }
.hidden { display: none !important; }

/* ---------- Instagram mirror ---------- */
.meta .pill.ig { border-color: rgba(217,138,166,.55); color: #f6c3d5; background: rgba(217,138,166,.1); }
.ighead { display: flex; align-items: center; gap: 18px; padding: 18px 20px; margin-bottom: 18px; border-radius: var(--r);
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.ighead h2 { margin: 0; font-size: 1.15rem; direction: ltr; text-align: right; color: var(--gold-2); }
.ighead p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.ighead b { color: var(--text); }
.igavatar { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font: 700 1.6rem var(--display); color: #1a1405;
  background: linear-gradient(135deg, #f6dfa8, #d98aa6 55%, #8b5cf6); box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px rgba(232,195,122,.5); }
.iggrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.igtile { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: #000; }
.igtile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s, filter .3s; }
.igtile:hover img { transform: scale(1.05); filter: brightness(.55); }
.igtile:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.igbadge { position: absolute; top: 8px; left: 8px; font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; }
.igbadge.poem { left: auto; right: 8px; background: rgba(232,195,122,.9); color: #1a1405; font-weight: 600; }
.igover { position: absolute; inset: auto 0 0 0; padding: 26px 10px 10px; font: 1rem/1.7 var(--poem); color: #fff; text-align: center;
  background: linear-gradient(transparent, rgba(0,0,0,.8)); opacity: 0; transition: opacity .3s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.igtile:hover .igover, .igtile:focus-visible .igover { opacity: 1; }
.igslider { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; }
.igslider img { max-height: 62vh; width: auto; max-width: 100%; border-radius: 12px; }
.igslider .ghost { position: absolute; top: 50%; translate: 0 -50%; font-size: 1.6rem; line-height: 1; padding: 6px 14px; background: rgba(7,11,26,.7); }
.igprev { right: 6px; } .ignext { left: 6px; }
.igdots { text-align: center; color: var(--muted); font-size: .85rem; margin: 8px 0 0; }
.igcap { margin-top: 18px; font-size: 1.15rem !important; line-height: 2 !important; }
.rmeta a { color: var(--gold); }
@media (max-width: 640px) { .iggrid { gap: 3px; } .igtile { border-radius: 4px; } .ighead { padding: 14px; } .igavatar { width: 52px; height: 52px; } }

/* ---------- reader ---------- */
dialog { border: 0; padding: 0; background: transparent; color: var(--text); width: min(760px, 94vw); max-height: 92vh; }
dialog::backdrop { background: rgba(4, 6, 16, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
dialog[open] article { animation: pop .35s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
dialog article { background: linear-gradient(170deg, #121a3d, #0a1027); border: 1px solid rgba(232,195,122,.3); border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0,0,0,.6); display: flex; flex-direction: column; max-height: 92vh; }
.rhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 22px 12px; border-bottom: 1px solid var(--line); }
.rmeta { font-size: .85rem; color: var(--muted); }
.rmeta b { color: var(--gold-2); font-weight: 600; }
.ractions { display: flex; gap: 6px; }
.ractions .ghost { padding: 6px 12px; font-size: .85rem; }
#rraw[aria-pressed="true"] { background: rgba(232,195,122,.18); border-color: var(--gold); }
.rbody { padding: 26px clamp(20px, 5vw, 48px); overflow-y: auto; }
.rbody .verse { font-size: clamp(1.3rem, 2.6vw, 1.6rem); line-height: 2.25; text-align: center; }
.rbody .verse.raw { text-align: right; font-size: 1.15rem; }
.rbody img { max-width: 100%; border-radius: 12px; display: block; margin: 0 auto; }
.rfoot { display: flex; justify-content: space-between; align-items: center; padding: 12px 22px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

.toast { position: fixed; bottom: 24px; left: 50%; translate: -50% 20px; background: var(--gold); color: #1a1405; padding: 10px 18px; border-radius: 999px; font-weight: 600; opacity: 0; transition: .3s; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; translate: -50% 0; }

footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 0 16px 40px; opacity: .7; }

@media (max-width: 640px) {
  .searchbar kbd { display: none; }
  #random { padding: 8px 10px; }
  .filters:not([open]) { margin-bottom: 0; }
  .verse { font-size: 1.12rem; }
  .stat b { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .card { opacity: 1; transform: none; }
}

/* ---------- interface switch + «أبجدية الوجود» timeline ---------- */
.modeswitch { position: fixed; bottom: 18px; inset-inline-start: 18px; z-index: 20; border: 1px solid rgba(232,195,122,.45); border-radius: 999px;
  padding: 8px 16px; background: rgba(7,11,26,.75); color: var(--gold-2); cursor: pointer; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,.4); transition: transform .2s, background .2s; }
.modeswitch:hover { transform: translateY(-1px); background: rgba(30,42,88,.85); }
.modeswitch .ms-dw, body.abmode .modeswitch .ms-ab { display: none; }
body.abmode .modeswitch .ms-dw { display: inline; }
body.abmode > header.hero, body.abmode > main, body.abmode > footer { display: none; }
.abview { width: min(980px, 100%); margin: 0 auto; padding: 0 16px 80px; }
.abhero { text-align: center; padding: clamp(64px, 12vh, 120px) 0 24px; }
.abhero h1 { font-family: var(--display); font-size: clamp(2.8rem, 8vw, 5.4rem); margin: .1em 0 0; line-height: 1.25;
  background: linear-gradient(100deg, #e9e3ff, #b9a7e0 45%, var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: rise 1s .1s both; }
.abhero .eyebrow, .abhero .lede, .abhero .stats { opacity: 1; animation: rise .9s both; }
.abriver, .abcontrols { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 16px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.abriver h2 { margin: 0 0 10px; font: 600 1rem var(--ui); color: var(--gold-2); }
.river { position: relative; }
.riverscroll { overflow-x: auto; direction: ltr; padding-bottom: 4px; scrollbar-width: thin; }
.river svg { display: block; }
.river text { fill: var(--muted); font: 10px var(--ui); }
.rbar { cursor: pointer; outline: none; }
.rbar:hover rect:not(.hit), .rbar:focus-visible rect:not(.hit) { filter: brightness(1.25); }
.rbar:focus-visible .hit { stroke: var(--gold); stroke-width: 1.5; }
.rtip { position: absolute; top: 0; z-index: 3; min-width: 170px; padding: 10px 12px; border-radius: 12px; background: #0d1430; border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0,0,0,.5); font-size: .82rem; pointer-events: none; }
.rtip b { display: block; margin-bottom: 4px; color: var(--text); }
.rtip div { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.rtip div span { margin-inline-start: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.rtip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ablegend .chip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; background: var(--mc); }
.ablegend { margin-top: 10px; max-height: none; }
.ablegend .chip { display: inline-flex; align-items: center; gap: 6px; }
.abtable { margin-top: 8px; font-size: .82rem; color: var(--muted); }
.abtable table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.abtable th, .abtable td { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: center; font-variant-numeric: tabular-nums; }
.abcontrols .chips { margin-top: 10px; max-height: none; }
.abline { position: relative; padding-inline-start: 28px; }
.abline::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 9px; width: 2px; background: linear-gradient(var(--line), rgba(185,167,224,.35), var(--line)); }
.abmh { position: sticky; top: 0; z-index: 2; margin: 26px 0 12px; margin-inline-start: -28px; padding: 10px 28px; font: 700 1.25rem var(--poem); color: var(--gold-2);
  background: linear-gradient(rgba(7,11,26,.95) 70%, transparent); }
.abmh small { font: .8rem var(--ui); color: var(--muted); margin-inline-start: 8px; }
.abitem { position: relative; margin-bottom: 14px; padding: 14px 18px; border-radius: 16px; background: linear-gradient(160deg, var(--glass-hi), var(--glass));
  border: 1px solid var(--line); border-inline-start: 3px solid var(--mc); animation: cardIn .5s both; }
.abitem.flash { box-shadow: 0 0 0 2px var(--gold), 0 0 40px rgba(232,195,122,.3); }
.abdot { position: absolute; inset-inline-start: -26px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--mc); box-shadow: 0 0 0 3px var(--ink), 0 0 14px var(--mc); }
.abmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .8rem; color: var(--muted); margin-bottom: 8px; }
.abmeta time { color: var(--text); }
.abmood, .abkind, .abfwd { border: 1px solid var(--line); border-radius: 999px; padding: 0 9px; }
.abmood { border-color: var(--mc); color: var(--text); }
.abfwd { color: #a9e3df; border-color: rgba(111,198,192,.35); }
.abreply { display: inline-block; font-size: .8rem; color: var(--gold); margin-bottom: 6px; }
.abtext { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.85; }
.abtext.verse { font-family: var(--poem); font-size: 1.2rem; line-height: 2.05; }
.abtext a, .abfoot a { color: var(--gold); }
.abph { display: grid; gap: 4px; margin-top: 10px; border-radius: 12px; overflow: hidden; }
.abph.n2, .abph.n3, .abph.n4 { grid-template-columns: 1fr 1fr; }
.abph img { width: 100%; height: auto; max-height: 520px; object-fit: cover; display: block; background: #000; }
.abvoice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.04); }
.abvoice audio { flex: 1; min-width: 220px; height: 36px; }
.abvid { position: relative; margin-top: 10px; border-radius: 12px; overflow: hidden; background: #000; }
.abvid img { width: 100%; max-height: 420px; object-fit: cover; display: block; opacity: .7; }
.abvid span { position: absolute; inset: auto 0 0 0; padding: 10px 14px; font-size: .85rem; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.abanim { width: 100%; max-height: 420px; margin-top: 10px; border-radius: 12px; }
.abfile { margin-top: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.04); font-size: .88rem; }
.abfile small { color: var(--muted); }
.abfoot { display: flex; justify-content: space-between; margin-top: 8px; font-size: .75rem; color: var(--muted); }
.ablink { opacity: .5; text-decoration: none; }
.ablink:hover { opacity: 1; }
@media (max-width: 640px) { .abline { padding-inline-start: 20px; } .abdot { inset-inline-start: -19px; } .abitem { padding: 12px 14px; }
  .abmh { margin-inline-start: -20px; padding-inline: 20px; } .modeswitch { bottom: 12px; inset-inline-start: 12px; padding: 7px 12px; font-size: .85rem; } }
.searchbar input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 10px 2px; font-size: 1.05rem; color: inherit; }
.abnote { margin: 0 0 8px; font-size: .8rem; color: #c9b8ff; }
.abnote.first { color: var(--gold-2); }
.abplay { width: 100%; max-height: 520px; margin-top: 10px; border-radius: 12px; background: #000; display: block; }
a.abfile { display: block; color: var(--text); text-decoration: none; }
a.abfile:hover { background: rgba(232,195,122,.08); }
.igslider video { max-height: 62vh; max-width: 100%; border-radius: 12px; background: #000; }
