:root {
  --bg: #05060c;
  --bg2: #070b16;
  --card: #0b1222;
  --card2: #0f1830;
  --line: rgba(120, 150, 255, 0.14);
  --text: #e7ecf7;
  --muted: #8b96b0;
  --accent: #4f8cff;
  --accent2: #8fb6ff;
  --paper: #f5ecd6;
  --paper2: #efe2c4;
  --ink: #2a2116;
  --ink2: #7a4b14;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --ar: "Amiri", "Noto Naskh Arabic", "Traditional Arabic", serif;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--ui); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; background: radial-gradient(1200px 600px at 80% -10%, rgba(79, 140, 255, 0.12), transparent 60%), radial-gradient(900px 500px at -10% 10%, rgba(143, 182, 255, 0.06), transparent 60%), var(--bg); }
a { color: var(--accent2); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
.ar { font-family: var(--ar); direction: rtl; }
.hidden { display: none !important; }

/* ---------- header */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 10px 18px; background: rgba(5, 6, 12, 0.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: 0.2px; white-space: nowrap; }
.brand img { width: 30px; height: 30px; }
.brand small { color: var(--muted); font-weight: 500; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; align-items: center; }
.nav a, .chip { padding: 7px 12px; border-radius: 999px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.nav a:hover, .nav a.on { color: var(--text); background: rgba(79, 140, 255, 0.12); }
.nav a.ai { color: #fff; background: linear-gradient(135deg, #2f6cf0, #4f8cff); }
.lang { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font-size: 13px; }
@media (max-width: 640px) {
  .top { padding: 8px 12px; gap: 8px; }
  .brand small, .nav .site, .nav .home { display: none; }
  .nav a { padding: 6px 9px; font-size: 13px; }
}

/* ---------- home */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px 60px; }
.hero { padding: 42px 0 18px; }
.hero h1 { font-size: clamp(28px, 4.6vw, 46px); margin: 0 0 8px; line-height: 1.1; letter-spacing: -0.5px; }
.hero h1 span { background: linear-gradient(90deg, #8fb6ff, #4f8cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0; color: var(--muted); font-size: 16px; }
.searchbar { display: flex; gap: 8px; margin-top: 22px; }
.searchbar input { flex: 1; min-width: 0; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); outline: none; font-size: 16px; }
.searchbar input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.18); }
.btn { padding: 11px 16px; border-radius: 12px; border: 1px solid transparent; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--card); border-color: var(--line); color: var(--text); }
.btn.sm { padding: 7px 11px; border-radius: 10px; font-size: 14px; }

.resume:empty { display: none; }
.resume { display: flex; gap: 12px; overflow-x: auto; padding: 4px 0 6px; margin-top: 22px; }
.resume-card { flex: 0 0 auto; display: flex; gap: 12px; align-items: center; padding: 10px 14px 10px 10px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(79, 140, 255, 0.16), rgba(79, 140, 255, 0.04)); border: 1px solid rgba(79, 140, 255, 0.3); color: var(--text); max-width: 360px; }
.resume-card .mini { width: 40px; height: 56px; border-radius: 4px; flex: 0 0 auto; }
.resume-card b { display: block; font-family: var(--ar); font-size: 18px; direction: rtl; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.resume-card span { color: var(--muted); font-size: 13px; }
.resume-card .btn { margin-inline-start: auto; }

.section { margin-top: 38px; }
.section > h2 { display: flex; align-items: baseline; gap: 10px; font-size: 22px; margin: 0 0 4px; }
.section > h2 small { color: var(--muted); font-weight: 500; font-size: 14px; }
.group h3 { font-size: 15px; color: var(--accent2); margin: 18px 0 10px; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.book { display: block; color: var(--text); border-radius: var(--radius); transition: transform 0.18s; }
.book:hover { transform: translateY(-3px); }
.book .meta { padding: 8px 2px 0; }
.book .nm { font-size: 13.5px; line-height: 1.3; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.more-row { margin-top: 14px; }

/* ---------- generated cover */
.cover { position: relative; aspect-ratio: 2 / 3; border-radius: 6px 10px 10px 6px; overflow: hidden; color: #f3e3b5; background: linear-gradient(135deg, hsl(var(--h) 45% 24%), hsl(var(--h) 50% 12%)); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), inset 6px 0 0 rgba(0, 0, 0, 0.25), inset 8px 0 0 rgba(255, 255, 255, 0.05); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 18% 12%; direction: rtl; }
.cover::before { content: ""; position: absolute; inset: 7px 7px 7px 11px; border: 1.5px solid rgba(232, 200, 120, 0.55); border-radius: 4px; box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.15), inset 0 0 0 4px rgba(232, 200, 120, 0.25); pointer-events: none; }
.cover::after { content: ""; position: absolute; top: 9%; left: 50%; width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg); border: 1.5px solid rgba(232, 200, 120, 0.7); }
.cover .ct { font-family: var(--ar); font-weight: 700; line-height: 1.35; font-size: var(--fs, 20px); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.cover .ca { font-family: var(--ar); font-size: 13px; opacity: 0.85; margin-top: 10px; }
.cover .cp { position: absolute; bottom: 8%; left: 0; right: 0; font-family: var(--ui); direction: ltr; font-size: 10.5px; letter-spacing: 0.6px; opacity: 0.7; }
.mini.cover { padding: 4px; }
.mini.cover::after, .mini.cover .ca, .mini.cover .cp { display: none; }
.mini.cover .ct { font-size: 9px; -webkit-line-clamp: 3; }

/* ---------- search results */
.results { margin-top: 18px; }
.res-sec h4 { margin: 18px 0 8px; font-size: 15px; color: var(--accent2); }
.hit { display: block; padding: 12px 14px; margin-bottom: 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--text); }
.hit:hover { border-color: rgba(79, 140, 255, 0.45); }
.hit .h1 { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); direction: rtl; font-family: var(--ar); }
.hit .h1 b { color: var(--accent2); font-weight: 700; }
.hit .s { font-family: var(--ar); direction: rtl; font-size: 18px; line-height: 1.8; margin-top: 4px; }
.hit mark, .page mark { background: rgba(255, 200, 60, 0.35); color: inherit; border-radius: 3px; padding: 0 1px; }
.muted { color: var(--muted); }
.foot { margin-top: 60px; padding: 24px 18px; text-align: center; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* ---------- reader */
body.reader { overflow: hidden; height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.rbar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: rgba(5, 6, 12, 0.9); border-bottom: 1px solid var(--line); z-index: 20; }
.rbar .ttl { flex: 1; min-width: 0; text-align: center; font-family: var(--ar); font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; }
.ibtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--text); cursor: pointer; font-size: 14px; white-space: nowrap; }
.ibtn:hover { border-color: rgba(79, 140, 255, 0.5); }
.ibtn svg { width: 18px; height: 18px; }
.stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 18px 12px; position: relative; }
.book3d { position: relative; display: flex; flex-direction: row-reverse; perspective: 2400px; width: min(1240px, calc(100vw - 130px), calc((100dvh - 150px) * 1.36)); aspect-ratio: 1.36; }
.book3d.single { width: min(620px, calc(100vw - 130px), calc((100dvh - 150px) * 0.7)); aspect-ratio: 0.7; }
.book3d.single .leaf.l { display: none; }
.leaf { position: relative; flex: 1; height: 100%; }
.page { position: absolute; inset: 0; background: linear-gradient(90deg, var(--paper2), var(--paper) 8%, var(--paper) 92%, var(--paper2)); color: var(--ink); border-radius: 4px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; overflow: hidden; direction: rtl; }
.page::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.35), transparent 60%); mix-blend-mode: soft-light; }
.spread .leaf.r .page { border-radius: 4px 8px 8px 4px; background: linear-gradient(90deg, #d9c9a4 0%, var(--paper2) 3%, var(--paper) 10%, var(--paper) 96%, var(--paper2)); }
.spread .leaf.l .page { border-radius: 8px 4px 4px 8px; background: linear-gradient(270deg, #d9c9a4 0%, var(--paper2) 3%, var(--paper) 10%, var(--paper) 96%, var(--paper2)); }
.single .page { border-radius: 4px 10px 10px 4px; background: linear-gradient(270deg, var(--paper2), var(--paper) 6%, var(--paper) 94%, #d9c9a4); }
.phead { display: flex; justify-content: space-between; gap: 12px; padding: 16px 26px 6px; font-family: var(--ar); font-size: 14px; color: var(--ink2); border-bottom: 1px solid rgba(122, 75, 20, 0.22); margin: 0 18px; padding-left: 8px; padding-right: 8px; }
.phead .rh { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phead .rf { white-space: nowrap; opacity: 0.85; }
.pbody { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 28px 10px; font-family: var(--ar); font-size: var(--rfs, 21px); line-height: 1.95; text-align: justify; scrollbar-width: thin; scrollbar-color: rgba(122, 75, 20, 0.35) transparent; }
.pbody p { margin: 0 0 0.55em; }
.pbody .hd { color: var(--ink2); font-weight: 700; text-align: center; margin-bottom: 0.4em; }
.pbody .bab { color: #5a3a12; font-weight: 700; margin-bottom: 0.5em; }
.pbody .fn { font-size: 0.78em; line-height: 1.75; color: #4a3d2c; border-top: 1px solid rgba(122, 75, 20, 0.3); padding-top: 0.5em; margin-top: 0.8em; }
.pbody .src { font-size: 0.72em; color: #6b5a40; line-height: 1.7; margin-top: 0.8em; }
.pbody .grade { font-size: 0.8em; color: #2f5d2a; font-weight: 700; }
.pfoot { text-align: center; padding: 6px 0 12px; font-family: var(--ar); font-size: 14px; color: var(--ink2); }
.page.blank .pbody, .page.blank .phead, .page.blank .pfoot { visibility: hidden; }
.flip { position: absolute; top: 0; height: 100%; transform-style: preserve-3d; z-index: 5; will-change: transform; }
.flip .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip .face .page { box-shadow: none; }
.flip .face.back { transform: rotateY(180deg); }
.flip .shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, 0.25), transparent 40%); opacity: 0; }
.rnav { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 12px 12px; flex-wrap: wrap; }
.jump { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.jump input { width: 74px; padding: 8px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); text-align: center; }
.edge { position: absolute; top: 50%; transform: translateY(-50%); z-index: 8; width: 44px; height: 64px; border-radius: 12px; border: 1px solid var(--line); background: rgba(11, 18, 34, 0.7); color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.edge.l { left: 10px; }
.edge.r { right: 10px; }
.edge:disabled { opacity: 0.3; cursor: default; }
@media (max-width: 899px) {
  .stage { padding: 10px 8px; }
  .book3d, .book3d.single { width: 100%; max-width: 620px; aspect-ratio: auto; align-self: stretch; }
  .edge { display: none; }
  .pbody { padding: 12px 18px 8px; }
  .phead { margin: 0 12px; padding-top: 12px; }
  .rbar .lbl, #pgLbl, #goBtn { display: none; }
  .rnav { flex-wrap: nowrap; gap: 8px; padding: 6px 8px 10px; }
  .rnav .btn { padding: 8px 10px; }
  .rbar { padding: 8px 10px; gap: 6px; }
}
.drawer { position: fixed; top: 0; bottom: 0; right: 0; width: min(420px, 92vw); background: var(--bg2); border-left: 1px solid var(--line); z-index: 50; transform: translateX(105%); transition: transform 0.25s ease; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer .dh { display: flex; gap: 6px; padding: 10px; border-bottom: 1px solid var(--line); align-items: center; }
.tabs { display: flex; gap: 4px; flex: 1; }
.tab { flex: 1; padding: 9px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.tab.on { background: var(--card); border-color: var(--line); color: var(--text); }
.drawer .dsearch { padding: 10px; display: flex; gap: 6px; }
.drawer .dsearch input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); outline: none; }
.drawer .dlist { flex: 1; overflow-y: auto; padding: 4px 10px 20px; }
.titem { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--text); cursor: pointer; direction: rtl; font-family: var(--ar); font-size: 17px; line-height: 1.5; }
.titem:hover, .titem.cur { background: rgba(79, 140, 255, 0.12); }
.titem .pn { color: var(--muted); font-family: var(--ui); font-size: 12px; white-space: nowrap; direction: ltr; padding-top: 4px; }
.titem.vol { font-weight: 700; color: var(--accent2); }
.titem.sub { padding-inline-start: 22px; font-size: 16px; }
.dnote { color: var(--muted); font-size: 13px; padding: 4px 6px 10px; }
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 40; }
.toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); background: var(--card2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; z-index: 60; font-size: 14px; }

/* ---------- AI chat */
.chat { max-width: 860px; margin: 0 auto; padding: 24px 16px 140px; }
.chat h1 { font-size: 30px; margin: 10px 0 4px; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.examples button { padding: 8px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.msg { margin: 14px 0; display: flex; }
.msg .bub { max-width: 100%; padding: 12px 15px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); white-space: pre-wrap; line-height: 1.6; overflow-wrap: anywhere; }
.msg.me { justify-content: flex-end; }
.msg.me .bub { background: linear-gradient(135deg, #2f6cf0, #4f8cff); border: 0; color: #fff; max-width: 85%; }
.blk { margin: 10px 0; border-radius: 12px; background: var(--paper); color: var(--ink); padding: 12px 14px; white-space: normal; }
.blk .tl { font-family: var(--ar); direction: rtl; color: var(--ink2); font-weight: 700; font-size: 15px; border-bottom: 1px solid rgba(122, 75, 20, 0.25); padding-bottom: 6px; margin-bottom: 6px; }
.blk .bx { font-family: var(--ar); direction: rtl; font-size: 19px; line-height: 1.9; text-align: justify; }
.blk .bx p { margin: 0 0 0.4em; }
.blk .sr { font-family: var(--ar); direction: rtl; font-size: 13.5px; color: #6b5a40; margin-top: 6px; }
.blk .tv, .note { font-size: 13px; color: var(--muted); }
.blk .tv { color: #6b5a40; }
.sug { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; white-space: normal; }
.sug .sl { width: 100%; color: var(--muted); font-size: 13px; }
.sug button { padding: 7px 11px; border-radius: 10px; background: var(--card2); border: 1px solid var(--line); cursor: pointer; font-size: 13.5px; text-align: start; }
.composer { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px 16px; background: linear-gradient(transparent, var(--bg) 30%); }
.composer form { max-width: 860px; margin: 0 auto; display: flex; gap: 8px; }
.composer textarea { flex: 1; resize: none; min-height: 50px; max-height: 160px; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; outline: none; }
.dots::after { content: "…"; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
.openb { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 7px 12px; border-radius: 10px; background: #1d3b7a; color: #fff; font-size: 13.5px; font-family: var(--ui); }
.openb:hover { background: #2f6cf0; }

/* ---------- uzun səhifə: kağız içində sürüşmə + göstərici (heç bir sətir gizli qalmır) */
.pbody { scrollbar-width: none; overscroll-behavior: contain; padding-bottom: 28px; }
.pbody::-webkit-scrollbar { display: none; }
.pwrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ptrack { position: absolute; top: 10px; bottom: 10px; width: 4px; border-radius: 4px; background: rgba(122, 75, 20, 0.12); left: 7px; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.spread .leaf.r .ptrack { left: auto; right: 7px; }
.ptrack i { position: absolute; left: 0; right: 0; border-radius: 4px; background: rgba(122, 75, 20, 0.55); }
.page.long .ptrack { opacity: 1; }
.pmore { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; background: linear-gradient(rgba(245, 236, 214, 0), var(--paper) 70%); pointer-events: none; opacity: 0; transition: opacity 0.2s; }
.pmore button { pointer-events: auto; border: 1px solid rgba(122, 75, 20, 0.35); background: #fbf4e2; color: var(--ink2); border-radius: 999px; padding: 4px 12px; font: 13px var(--ui); cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); }
.page.more-below .pmore { opacity: 1; }
.page:not(.more-below) .pmore button { pointer-events: none; }

/* ---------- sadə ana səhifə və bölmə səhifələri */
.airy { max-width: 1120px; padding-left: 22px; padding-right: 22px; }
.airy .hero { padding: 64px 0 8px; max-width: 760px; }
.airy .hero p { margin-top: 6px; }
.airy .searchbar { margin-top: 28px; }
.airy .resume { margin-top: 36px; }
.secgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
@media (max-width: 760px) { .secgrid { grid-template-columns: 1fr; gap: 16px; margin-top: 32px; } .airy .hero { padding-top: 36px; } }
.seccard { position: relative; display: flex; gap: 22px; align-items: center; padding: 26px; border-radius: 20px; background: linear-gradient(160deg, rgba(79, 140, 255, 0.09), rgba(11, 18, 34, 0.6) 55%); border: 1px solid var(--line); color: var(--text); overflow: hidden; transition: border-color 0.2s, transform 0.2s; min-height: 190px; }
.seccard:hover { border-color: rgba(79, 140, 255, 0.45); transform: translateY(-2px); }
.fanbox { position: relative; flex: 0 0 104px; height: 130px; }
.fan { position: absolute; top: 0; width: 82px; }
.fan .cover { width: 82px; height: auto; }
.fan.f0 { left: 22px; z-index: 3; }
.fan.f1 { left: 11px; top: 6px; z-index: 2; transform: rotate(-6deg); opacity: 0.85; }
.fan.f2 { left: 0; top: 12px; z-index: 1; transform: rotate(-12deg); opacity: 0.7; }
.fan .mini.cover .ct { font-size: 12px; -webkit-line-clamp: 4; }
.sbody { flex: 1; min-width: 0; }
.sic { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(79, 140, 255, 0.14); color: var(--accent2); margin-bottom: 10px; }
.sic svg { width: 19px; height: 19px; }
.seccard h2 { margin: 0 0 6px; font-size: 21px; letter-spacing: -0.2px; }
.seccard p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.scount { margin-top: 14px; color: var(--accent2); font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.sar { position: absolute; top: 18px; inset-inline-end: 22px; font-size: 15px; color: rgba(143, 182, 255, 0.45); }
@media (max-width: 420px) { .seccard { padding: 20px 18px; gap: 16px; min-height: 0; } .fanbox { flex-basis: 84px; height: 110px; } .fan, .fan .cover { width: 68px; } .sar { display: none; } }
.crumbs { display: flex; gap: 8px; align-items: center; padding-top: 28px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs b { color: var(--text); font-weight: 600; }
.sechead { padding: 18px 0 4px; }
.sechead h1 { margin: 0 0 6px; font-size: clamp(26px, 4vw, 38px); letter-spacing: -0.4px; }
.sechead p { margin: 0; }
.searchbar.narrow { max-width: 460px; margin-top: 22px; }
.airy .group h3 { margin: 44px 0 16px; font-size: 16px; }
.airy .group h3 small { color: var(--muted); font-weight: 500; margin-inline-start: 6px; }
.airy .grid { gap: 26px 20px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
@media (max-width: 520px) { .airy .grid { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; } }
.vols { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.vtile { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--text); }
.vtile:hover { border-color: rgba(79, 140, 255, 0.45); }
.vtile .vn { flex: 0 0 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: rgba(79, 140, 255, 0.14); color: var(--accent2); font-size: 13px; font-weight: 700; }
.vtile .vt { font-size: 17px; flex: 1; text-align: start; }
[dir="rtl"] .sar { display: none; }
.group.feature { margin-top: 56px; padding: 28px; border-radius: 22px; background: linear-gradient(160deg, rgba(212, 175, 95, 0.1), rgba(11, 18, 34, 0.55) 60%); border: 1px solid rgba(212, 175, 95, 0.28); }
.feature .fhead { display: flex; gap: 26px; align-items: center; margin-bottom: 24px; }
.feature .fhead .book { flex: 0 0 150px; }
.feature .fhead .book .meta { display: none; }
.feature .ftext h3 { margin: 0 0 8px !important; font-size: 22px !important; }
.feature .ftext p { margin: 0 0 16px; line-height: 1.55; }
@media (max-width: 520px) { .group.feature { padding: 20px 16px; } .feature .fhead { gap: 16px; } .feature .fhead .book { flex-basis: 96px; } .feature .ftext h3 { font-size: 18px !important; } }
.seccard { flex-direction: column; align-items: flex-start; padding: 30px 28px; }
.seccard .fanbox { flex: 0 0 auto; width: 120px; height: 128px; margin-bottom: 6px; }
.seccard .sbody { width: 100%; }
@media (max-width: 760px) { .seccard { flex-direction: row; align-items: center; padding: 22px 20px; } .seccard .fanbox { width: 104px; margin: 0; } }
@media (max-width: 420px) { .seccard .fanbox { width: 84px; height: 110px; } }
.resume-card span.btn { color: #fff; font-size: 14px; }
.sar { display: none !important; }

/* ---------- faza 3: ana səhifə */
html { overflow-x: clip; }
.home .hero { position: relative; text-align: center; margin: 0 auto; padding: 72px 0 12px; max-width: 760px; }
.home .hero::before, .home .hero::after { content: ""; position: absolute; z-index: -1; left: 50%; transform: translateX(-50%); pointer-events: none; }
.home .hero::before { top: -60px; width: 100vw; height: 560px; opacity: 0.07;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23c9d8ff' stroke-width='1'%3E%3Crect x='20' y='20' width='44' height='44'/%3E%3Crect x='20' y='20' width='44' height='44' transform='rotate(45 42 42)'/%3E%3Ccircle cx='42' cy='42' r='9'/%3E%3Cpath d='M0 0l11 11M84 0 73 11M0 84l11-11M84 84 73 73M42 0v11M42 84V73M0 42h11M84 42H73'/%3E%3C/g%3E%3C/svg%3E") center top / 84px 84px;
  -webkit-mask: radial-gradient(closest-side, #000 30%, transparent); mask: radial-gradient(closest-side, #000 30%, transparent); }
.home .hero::after { top: -40px; width: min(900px, 120vw); height: 460px; background: radial-gradient(closest-side, rgba(79, 140, 255, 0.2), rgba(212, 175, 95, 0.05) 55%, transparent); }
.cal { font-family: "Aref Ruqaa", var(--ar); font-weight: 700; font-size: clamp(54px, 9vw, 86px); line-height: 1.15; color: transparent; background: linear-gradient(180deg, #f3dfa6, #c9a24f); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 6px 24px rgba(212, 175, 95, 0.25)); }
.home .hero h1 { margin: 6px 0 10px; font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -0.6px; }
.home .hero > p#sub { font-size: 16.5px; color: var(--muted); }
.stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.stats span { padding: 6px 13px; border-radius: 999px; font-size: 13px; color: #c7d4f2; background: rgba(15, 24, 48, 0.7); border: 1px solid var(--line); }
.searchbar.big { position: relative; align-items: center; gap: 0; margin: 30px auto 0; max-width: 640px; padding: 6px; border-radius: 999px; background: rgba(7, 11, 22, 0.85); border: 1px solid rgba(120, 150, 255, 0.22); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35); transition: border-color 0.2s, box-shadow 0.2s; }
.searchbar.big:focus-within { border-color: rgba(79, 140, 255, 0.6); box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.14), 0 10px 40px rgba(0, 0, 0, 0.35); }
.searchbar.big .sicon { flex: 0 0 20px; height: 20px; margin: 0 6px 0 14px; color: var(--muted); }
.searchbar.big input, .searchbar.big input:focus { border: 0; background: transparent; box-shadow: none; padding: 12px 8px; font-size: 16.5px; }
.searchbar.big .btn { border-radius: 999px; padding: 12px 22px; }
.shint { margin: 12px 0 0; font-size: 13px; color: #6f7a94; }
.home .resume { justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.home .results { max-width: 900px; margin: 30px auto 0; }
.home .secgrid { margin-top: 56px; gap: 24px; }
.seccard { --c1: 79, 140, 255; --c2: 212, 175, 95; flex-direction: column; align-items: stretch; padding: 30px 28px 26px; border-radius: 24px; min-height: 0;
  background: radial-gradient(120% 90% at 0% 0%, rgba(var(--c1), 0.2), transparent 60%), radial-gradient(90% 70% at 100% 100%, rgba(var(--c2), 0.12), transparent 65%), linear-gradient(180deg, #0c1428, #080d1b);
  border: 1px solid rgba(var(--c1), 0.22); box-shadow: 0 20px 50px -25px rgba(0, 0, 0, 0.7); transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; }
.seccard[data-s="nahw"] { --c1: 43, 181, 168; --c2: 120, 210, 230; }
.seccard[data-s="hadith"] { --c1: 52, 194, 122; --c2: 212, 190, 110; }
.seccard:hover { transform: translateY(-4px); border-color: rgba(var(--c1), 0.5); box-shadow: 0 28px 60px -25px rgba(var(--c1), 0.45); }
.seccard .fanbox { position: relative; width: 150px; height: 150px; margin: 0 0 18px; flex: none; }
.seccard .fan { width: 88px; top: 8px; transition: transform 0.3s; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.5)); }
.seccard .fan .cover { width: 88px; }
.seccard .fan.f0 { left: 30px; z-index: 3; }
.seccard .fan.f1 { left: 4px; top: 16px; transform: rotate(-9deg); opacity: 0.8; z-index: 2; }
.seccard .fan.f2 { left: 58px; top: 16px; transform: rotate(9deg); opacity: 0.8; z-index: 1; }
.seccard:hover .fan.f0 { transform: translateY(-6px); }
.seccard:hover .fan.f1 { transform: rotate(-14deg) translateX(-6px); }
.seccard:hover .fan.f2 { transform: rotate(14deg) translateX(6px); }
.seccard .sic { position: absolute; top: 24px; inset-inline-end: 24px; margin: 0; background: rgba(var(--c1), 0.16); color: rgb(var(--c1)); }
.seccard h2 { font-size: 22px; }
.sfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(var(--c1), 0.16); }
.seccard .scount { margin: 0; font-size: 13px; color: rgb(var(--c2)); font-weight: 600; }
.cta { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: rgb(var(--c1)); white-space: nowrap; }
.cta svg { width: 17px; height: 17px; transition: transform 0.2s; }
.seccard:hover .cta svg { transform: translateX(4px); }
[dir="rtl"] .cta svg { transform: scaleX(-1); }
[dir="rtl"] .seccard:hover .cta svg { transform: scaleX(-1) translateX(4px); }
[dir="rtl"] .seccard .fanbox { margin-inline-start: 0; }
@media (max-width: 760px) {
  .home .hero { padding-top: 44px; }
  .home .secgrid { margin-top: 40px; gap: 16px; }
  .seccard { flex-direction: row; align-items: center; gap: 16px; padding: 20px 18px; }
  .seccard .fanbox { width: 96px; height: 116px; margin: 0; }
  .seccard .fan, .seccard .fan .cover { width: 64px; }
  .seccard .fan.f0 { left: 16px; } .seccard .fan.f1 { left: 0; } .seccard .fan.f2 { left: 32px; }
  .seccard .sic { display: none; }
  .seccard h2 { font-size: 18px; }
  .seccard p { font-size: 13.5px; }
  .sfoot { margin-top: 12px; padding-top: 10px; }
  .cta span, .cta { font-size: 13px; }
  .searchbar.big .sicon { margin-inline-start: 10px; }
  .searchbar.big .btn { padding: 11px 16px; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.home .hero > *, .home .resume, .home .seccard { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.home .hero > :nth-child(2) { animation-delay: 0.06s; } .home .hero > :nth-child(3) { animation-delay: 0.12s; } .home .hero > :nth-child(4) { animation-delay: 0.18s; } .home .hero > :nth-child(n + 5) { animation-delay: 0.24s; }
.home .seccard:nth-child(1) { animation-delay: 0.3s; } .home .seccard:nth-child(2) { animation-delay: 0.38s; } .home .seccard:nth-child(3) { animation-delay: 0.46s; }
@media (prefers-reduced-motion: reduce) { .home *, .home *::before, .home *::after { animation: none !important; transition: none !important; } .seccard:hover { transform: none; } }
.home .hero::after { width: min(900px, 100vw); }
.seccard .scount { white-space: nowrap; }
@media (max-width: 760px) {
  .cta { font-size: 0; width: 32px; height: 32px; justify-content: center; border-radius: 50%; background: rgba(var(--c1), 0.14); flex: none; }
}
.home .hero { isolation: isolate; }
.home .hero::before { opacity: 0.09; }
.home .hero::before { opacity: 0.16; }
.home .hero::after { background: radial-gradient(closest-side, rgba(79, 140, 255, 0.26), rgba(212, 175, 95, 0.07) 55%, transparent); }
.home .hero::before { opacity: 0.12; }

/* ---------- Quran */
.cal.sm { font-size: clamp(38px, 6vw, 56px); }
.qhead { text-align: center; }
.suras { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 30px; }
.sura { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(160deg, rgba(212, 175, 95, 0.07), rgba(11, 18, 34, 0.7) 60%); border: 1px solid var(--line); color: var(--text); transition: border-color 0.2s, transform 0.2s; }
.sura:hover { border-color: rgba(212, 175, 95, 0.45); transform: translateY(-2px); }
.sn { flex: 0 0 40px; height: 40px; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #e6cf8f; background: rgba(212, 175, 95, 0.1); border: 1px solid rgba(212, 175, 95, 0.35); border-radius: 12px; }
.sura .sn { font-variant-numeric: tabular-nums; }
.snm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.snm b { font-size: 21px; font-weight: 700; line-height: 1.3; text-align: start; }
.snm small { color: var(--muted); font-size: 13px; }
.sc { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.qbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin: 22px auto 0; max-width: 860px; }
.qhint { font-size: 13px; }
.trtoggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14.5px; }
.trtoggle input { position: absolute; opacity: 0; pointer-events: none; }
.trtoggle .sw { width: 40px; height: 22px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); position: relative; transition: background 0.2s; }
.trtoggle .sw::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: #c7d4f2; transition: transform 0.2s; }
.trtoggle input:checked + .sw { background: var(--accent); }
.trtoggle input:checked + .sw::after { transform: translateX(18px); background: #fff; }
[dir="rtl"] .trtoggle input:checked + .sw::after { transform: translateX(-18px); }
.trtoggle input:focus-visible + .sw { outline: 2px solid var(--accent2); outline-offset: 2px; }
.mushaf { max-width: 860px; margin: 18px auto 0; padding: clamp(18px, 4vw, 44px); border-radius: 18px; color: var(--ink); background: radial-gradient(120% 80% at 50% 0%, #fbf4e2, var(--paper) 60%, var(--paper2)); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(122, 75, 20, 0.25), inset 0 0 0 7px var(--paper), inset 0 0 0 8px rgba(122, 75, 20, 0.35); }
.sh { margin-bottom: 18px; }
.shframe { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-radius: 12px; border: 1.5px solid rgba(122, 75, 20, 0.45); background: linear-gradient(90deg, rgba(122, 75, 20, 0.07), rgba(122, 75, 20, 0.14), rgba(122, 75, 20, 0.07)); }
.shframe h1 { margin: 0; font-size: clamp(24px, 4vw, 32px); color: var(--ink2); font-weight: 700; }
.shside { font-size: 12.5px; color: #8a6a3d; flex: 1; }
.shside:last-child { text-align: end; }
.bism { text-align: center; font-family: "Amiri Quran", var(--ar); font-size: clamp(24px, 3.6vw, 30px); color: var(--ink2); margin: 8px 0 18px; }
.qtext { font-family: "Amiri Quran", var(--ar); font-size: clamp(25px, 3.4vw, 31px); line-height: 2.25; text-align: justify; text-align-last: center; word-spacing: 1px; }
.an { display: inline-grid; place-items: center; min-width: 1.45em; height: 1.45em; padding: 0 0.15em; margin: 0 0.1em; font: 700 0.58em/1 var(--ar); color: var(--ink2); background: radial-gradient(circle, #fff7e0 55%, transparent 57%), conic-gradient(from 22.5deg, rgba(122, 75, 20, 0.55) 0 12.5%, transparent 0 25%, rgba(122, 75, 20, 0.55) 0 37.5%, transparent 0 50%, rgba(122, 75, 20, 0.55) 0 62.5%, transparent 0 75%, rgba(122, 75, 20, 0.55) 0 87.5%, transparent 0); border: 1px solid rgba(122, 75, 20, 0.5); border-radius: 50%; vertical-align: 0.1em; cursor: pointer; }
.an:hover, .an:focus-visible { background: #f3dfa6; outline: none; }
.withtr .qtext { text-align: start; text-align-last: auto; line-height: 2.05; }
.trnote { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: rgba(122, 75, 20, 0.08); font-size: 13.5px; line-height: 1.55; color: #5b4630; }
.trnote .muted { color: #8a6a3d; }
.ayrow { padding: 14px 0 12px; border-bottom: 1px solid rgba(122, 75, 20, 0.18); }
.ayrow:last-of-type { border-bottom: 0; }
.tr { margin-top: 6px; font-family: var(--ui); font-size: 15.5px; line-height: 1.65; color: #3d3226; text-align: start; }
.trl { display: inline-block; margin-inline-end: 8px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #7a4b14; background: rgba(212, 175, 95, 0.25); vertical-align: 1px; }
.ayact { margin-top: 8px; display: flex; justify-content: flex-end; }
.mushaf .btn.ghost { background: transparent; border-color: rgba(122, 75, 20, 0.35); color: var(--ink2); }
.qsrc { margin: 22px 0 0; text-align: center; font-size: 12px; color: #9a7d55; }
.snav { max-width: 860px; margin: 26px auto 0; display: flex; justify-content: space-between; gap: 10px; }
.tshade { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 49; }
.tshade.open { opacity: 1; pointer-events: auto; }
.tsheet { position: fixed; z-index: 50; inset-inline-end: 0; top: 0; bottom: 0; width: min(520px, 100vw); display: flex; flex-direction: column; background: var(--bg2); border-inline-start: 1px solid var(--line); transform: translateX(105%); transition: transform 0.25s ease; }
[dir="rtl"] .tsheet { transform: translateX(-105%); }
.tsheet.open { transform: none !important; }
.tsh { display: flex; gap: 8px; align-items: center; padding: 12px; border-bottom: 1px solid var(--line); }
.ttabs { display: flex; gap: 6px; flex: 1; overflow-x: auto; }
.ttab { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 16px; white-space: nowrap; cursor: pointer; }
.ttab.on { color: #fff; background: var(--accent); border-color: transparent; }
.tref { padding: 12px 16px 0; color: var(--muted); font-size: 14px; }
.tay { margin-top: 6px; font-family: "Amiri Quran", var(--ar); color: #e6cf8f; font-size: 21px; line-height: 1.9; }
.tbody { flex: 1; overflow-y: auto; padding: 8px 16px 16px; font-size: 20px; line-height: 2; text-align: start; }
.tbody p { margin: 0 0 12px; }
.tcov { font-family: var(--ui); font-size: 13px; direction: ltr; }
[dir="rtl"] .tcov { direction: rtl; }
.tsrc { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .mushaf { border-radius: 12px; } .shside { display: none; } .shframe { justify-content: center; } .qbar { padding: 0 2px; } .qtext { font-size: 24px; line-height: 2.15; } .tsheet { top: auto; height: 82dvh; width: 100vw; border-radius: 18px 18px 0 0; border-top: 1px solid var(--line); transform: translateY(105%) !important; } .tsheet.open { transform: none !important; } }
@media (prefers-reduced-motion: reduce) { .tsheet, .tshade, .sura { transition: none; } }
.seccard[data-s="quran"] { --c1: 212, 175, 95; --c2: 72, 200, 140; }
.home .secgrid { grid-template-columns: repeat(2, 1fr); max-width: 900px; margin-left: auto; margin-right: auto; }
.home .seccard { flex-direction: row; align-items: center; gap: 26px; }
.home .seccard .fanbox { margin: 0; }
.home .seccard:nth-child(4) { animation-delay: 0.54s; }
@media (max-width: 760px) { .home .secgrid { grid-template-columns: 1fr; } .home .seccard { gap: 16px; } }
.home .seccard .sic { position: static; margin: 0 0 10px; }
.home .seccard .fanbox { width: 124px; height: 132px; }
.home .seccard .fan, .home .seccard .fan .cover { width: 76px; }
.home .seccard .fan.f0 { left: 24px; } .home .seccard .fan.f1 { left: 2px; } .home .seccard .fan.f2 { left: 46px; }
.home .seccard h2 { font-size: 21px; }
@media (max-width: 760px) { .home .seccard .sic { display: none; } .home .seccard .fanbox { width: 96px; height: 116px; } .home .seccard .fan, .home .seccard .fan .cover { width: 64px; } .home .seccard .fan.f0 { left: 16px; } .home .seccard .fan.f1 { left: 0; } .home .seccard .fan.f2 { left: 32px; } }
.snm b { text-align: left; }
[dir="rtl"] .snm b { text-align: right; }
/* axtarış nəticələri: «Kitabda aç» və kitab adı uyğunluqları */
div.hit a { color: inherit; }
div.hit .h1 { display: flex; }
div.hit .s { display: block; }
.hit .openb.sm { display: inline-flex; margin-top: 8px; font-size: 13px; padding: 5px 11px; }
.via { margin: -4px 0 14px; font-size: 13.5px; }
.via .ar { font-size: 17px; color: #e6cf8f; }
.bookhits { display: flex; flex-wrap: wrap; gap: 10px; }
.bookhit { display: flex; gap: 10px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--text); max-width: 340px; }
.bookhit .mini { width: 34px; height: 48px; flex: none; }
.bookhit b { display: block; font-size: 17px; }
.bookhit small { color: var(--muted); font-size: 12.5px; }
.srcs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; } .srcs .sl { width: 100%; font-size: 12.5px; color: var(--muted); } .srcs .openb { margin-top: 0; }
