/* کتابخانه — هیرو تصویری (خط‌نگاری نورون) + تم روز/شب */
.lbp-hero{position:relative;width:100%;max-width:none;margin-block:0 22px;border-radius:0;overflow:hidden;border:0;border-block:1px solid var(--lb-line);
  background:
    radial-gradient(900px 380px at 78% -10%,rgba(217,166,111,.16),transparent 62%),
    radial-gradient(760px 360px at 4% 112%,rgba(125,211,252,.10),transparent 62%),
    linear-gradient(140deg,#141b24 0%,#0f151d 60%,#0b1016 100%);
  box-shadow:none;min-height:372px;
  display:grid;grid-template-columns:minmax(0,1.02fr) minmax(0,.98fr);align-items:center;
  padding:clamp(20px,3vw,34px) max(18px,calc((100vw - 1200px)/2));gap:clamp(14px,3vw,44px);isolation:isolate}
.lbp-copy{grid-column:1;grid-row:1;position:relative;z-index:3;max-width:560px;justify-self:start}
.lbp-figure{grid-column:2;grid-row:1;position:relative;z-index:2;display:flex;align-items:center;justify-content:center;width:100%;height:320px;min-width:0}
.lbp-figure svg{display:block;width:auto;height:100%;max-height:320px;margin:0 auto;overflow:visible;will-change:transform}
.lbp-eyebrow{display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:700;letter-spacing:.04em;
  color:#e6c08a;background:rgba(217,166,111,.10);border:1px solid rgba(217,166,111,.30);padding:6px 12px;border-radius:999px}
.lbp-eyebrow i{width:6px;height:6px;border-radius:50%;background:#e6b95c;box-shadow:0 0 12px #e6b95c;animation:lbpPulse 2s infinite}
@keyframes lbpPulse{50%{opacity:.35;transform:scale(.8)}}
.lbp-slides{position:relative;margin-top:8px;min-height:136px}
.lbp-slide{position:absolute;inset:0;opacity:0;transform:translateY(10px);transition:opacity .6s ease,transform .6s ease;pointer-events:none}
.lbp-slide.on{position:relative;opacity:1;transform:none;pointer-events:auto}
.lbp-slide h1{margin:0 0 10px;font-size:clamp(23px,2.9vw,36px);line-height:1.3;letter-spacing:-.5px;color:#f7f2e8}
.lbp-slide h1 b{color:#e6b95c;font-weight:800}
.lbp-slide p{margin:0 0 18px;font-size:clamp(13px,1.05vw,14.5px);line-height:1.95;color:#b9c3d1;max-width:52ch}
.lbp-cta{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.lbp-btn{display:inline-flex;align-items:center;gap:8px;height:44px;padding:0 18px;border-radius:12px;font-size:13px;font-weight:700;
  text-decoration:none;border:1px solid rgba(255,255,255,.18);color:#f2ece0;background:rgba(255,255,255,.06);transition:.2s;cursor:pointer}
.lbp-btn:hover{transform:translateY(-1px);background:rgba(255,255,255,.12)}
.lbp-btn.pri{background:linear-gradient(135deg,#e8bd77,#c99355);color:#231a0f;border-color:transparent;box-shadow:0 18px 36px -22px rgba(230,185,92,.95)}
.lbp-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.lbp-nav{position:relative;z-index:3;display:flex;align-items:center;gap:10px;margin-top:16px}
.lbp-dot{width:26px;height:4px;border-radius:99px;background:rgba(255,255,255,.18);border:0;padding:0;cursor:pointer;transition:.3s}
.lbp-dot.on{width:44px;background:linear-gradient(90deg,#e6b95c,#f3d9a6);box-shadow:0 0 14px rgba(230,185,92,.55)}
.lbp-theme{position:absolute;top:16px;left:18px;z-index:5;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;
  border:1px solid rgba(255,255,255,.20);background:rgba(12,17,24,.55);color:#ffe6ad;cursor:pointer;backdrop-filter:blur(8px);transition:.2s}
.lbp-theme:hover{background:rgba(12,17,24,.8);transform:rotate(-12deg)}
.lbp-theme svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

/* روز */
html:not(.ph-night) .lbp-hero{background:
  radial-gradient(680px 420px at 86% 8%,rgba(235,178,104,.55),transparent 64%),
  radial-gradient(760px 460px at 10% 96%,rgba(96,196,236,.34),transparent 66%),
  radial-gradient(520px 340px at 98% 94%,rgba(167,138,240,.22),transparent 68%),
  radial-gradient(380px 260px at 62% 0%,rgba(255,255,255,.85),transparent 70%),
  linear-gradient(120deg,#fdfaf3 0%,#fbf5ea 46%,#f4ecdd 100%);border-color:#e7dcc9}
html:not(.ph-night) .lbp-slide h1{color:#20180f}
html:not(.ph-night) .lbp-slide h1 b{color:#b8843c}
html:not(.ph-night) .lbp-slide p{color:#5d6472}
html:not(.ph-night) .lbp-eyebrow{color:#8a5a1e;background:rgba(230,185,92,.16);border-color:rgba(200,150,70,.45)}
html:not(.ph-night) .lbp-btn{color:#2a2116;border-color:rgba(60,48,32,.22);background:rgba(255,255,255,.75)}
html:not(.ph-night) .lbp-btn:hover{background:#fff}
html:not(.ph-night) .lbp-btn.pri{background:linear-gradient(135deg,#e8bd77,#c99355);color:#241a0d;border-color:transparent}
html:not(.ph-night) .lbp-theme{background:rgba(255,255,255,.85);border-color:rgba(60,48,32,.2);color:#7a5420}
html:not(.ph-night) .lbp-dot{background:rgba(40,52,72,.22)}
html:not(.ph-night) .lbp-dot.on{background:linear-gradient(90deg,#d9a662,#efcf9a)}

/* فوتر واقعی سایت */
.lbp-foot{width:100%}
.lbp-foot-host{min-height:120px}
.lbp-foot-skel{padding:40px;text-align:center;color:#8b93a1;font-size:13px}
.lbp-foot-note{margin-top:8px;font-size:12px;color:#5a6472;min-height:16px}
.lbp-foot-note.ok{color:#15803d}
.lbp-foot-note.err{color:#b3261e}

@media(max-width:900px){
  .lbp-hero{grid-template-columns:1fr;gap:4px;min-height:0;padding:22px 18px 24px}
  .lbp-copy{grid-column:1;grid-row:1;max-width:none}
  .lbp-figure{grid-column:1;grid-row:2;width:100%;max-width:360px;margin:2px auto 0}
  .lbp-figure{height:auto}
  .lbp-figure svg{width:100%;height:auto;max-height:250px}
  .lbp-slides{min-height:170px}
  .lbp-theme{top:14px;left:14px;right:auto}
}
@media(max-width:520px){
  .lbp-hero{border-radius:0}
  .lbp-slide h1{font-size:26px}
  .lbp-slide p{font-size:13px;line-height:1.95}
  .lbp-btn{height:42px;padding:0 16px;font-size:12.5px}
  .lbp-theme{width:34px;height:34px}
  .lbp-slides{min-height:186px}
  .lbp-figure{max-width:278px}
  .lbp-hero{margin-block:0 16px}
}

/* ===== تم روز برای کل کتابخانه ===== */
html:not(.ph-night) body.phlib{background:#f8f5ef;color:#241d14}
html:not(.ph-night) .phlib{
  --lb-bg:#f8f5ef;--lb-bg2:#efe9de;--lb-s1:#ffffff;--lb-s2:#f3eee4;
  --lb-line:rgba(60,44,24,.12);--lb-line2:rgba(60,44,24,.22);
  --lb-tx:#241d14;--lb-mu:#5f6673;--lb-dim:#7d8492;
  --lb-shadow:0 26px 60px -40px rgba(72,54,26,.45);
}
html:not(.ph-night) .lb-sec-h,html:not(.ph-night) .lb-pagehead h1,html:not(.ph-night) .lb-detail-info h1,
html:not(.ph-night) .lb-rb-title,html:not(.ph-night) .lb-room-info h2{color:#1e1810}
html:not(.ph-night) .lb-card,html:not(.ph-night) .lb-cont,html:not(.ph-night) .lb-coll,
html:not(.ph-night) .lb-toolbar,html:not(.ph-night) .lb-mine-panel,html:not(.ph-night) .lb-mine-row,
html:not(.ph-night) .lb-chapter,html:not(.ph-night) .lb-hub,html:not(.ph-night) .lb-room,
html:not(.ph-night) .lb-noteform,html:not(.ph-night) .lb-rs-note,html:not(.ph-night) .lb-pager{
  background:#fff;border-color:#e7ded0;box-shadow:0 18px 40px -34px rgba(72,54,26,.5)}
html:not(.ph-night) .lb-card:hover,html:not(.ph-night) .lb-cont:hover,html:not(.ph-night) .lb-coll:hover{border-color:#d8c9b0}
html:not(.ph-night) .lb-card-art{background:linear-gradient(160deg,#efe6d6,#e2d6c1);border-color:#e3d8c6}
html:not(.ph-night) .lb-coll-art{background:linear-gradient(150deg,#efe6d6,#e3d7c2);border-color:#e3d8c6}
html:not(.ph-night) .lb-cont-art{background:#efe7d8;border-color:#e3d8c6}
html:not(.ph-night) .lb-card-meta,html:not(.ph-night) .lb-card-body,html:not(.ph-night) .lb-cont-body,
html:not(.ph-night) .lb-coll-body{color:#2b2318}
html:not(.ph-night) .lb-chip{background:#f5efe4;border-color:#e2d7c6;color:#6a5a41}
html:not(.ph-night) .lb-stat{background:#fff;border-color:#e7ded0;color:#5f6673}
html:not(.ph-night) .lb-btn{background:#fff;border-color:#dfd3c0;color:#2a2116!important}
html:not(.ph-night) .lb-btn:hover{background:#fdf8ef;border-color:#cbb995}
html:not(.ph-night) .lb-btn.pri{background:linear-gradient(135deg,#e6bd77,#c99355);color:#241a0d!important;border-color:transparent}
html:not(.ph-night) .lb-tabs a{color:#5f6673}
html:not(.ph-night) .lb-tabs a:hover{background:#f4eee2}
html:not(.ph-night) .lb-tabs a.on,html:not(.ph-night) .lb-tabs a[aria-current]{background:#241d14;color:#fdf8ef!important}
html:not(.ph-night) .lb-filters,html:not(.ph-night) .lb-searchbig,html:not(.ph-night) .lb-searchsm,
html:not(.ph-night) .lb-noteform input,html:not(.ph-night) .lb-noteform textarea,
html:not(.ph-night) .lb-reader-search input{background:#fff;border-color:#e2d7c6;color:#241d14}
html:not(.ph-night) .lb-empty{background:#fffdf8;border-color:#ddd0ba}
html:not(.ph-night) .lb-hero{background:linear-gradient(135deg,#fffdf8 0%,#f7f1e5 55%,#f1e9da 100%);border-color:#e6dccb}
html:not(.ph-night) .lb-hero::after{background:radial-gradient(600px 300px at 88% 12%,rgba(230,185,92,.28),transparent 70%)}
html:not(.ph-night) .lb-hero-frame{background:#fbf6ec;border-color:#e2d6c3;box-shadow:0 30px 60px -40px rgba(72,54,26,.6)}
html:not(.ph-night) .lb-hero-sub{color:#6a5a41}
html:not(.ph-night) .lb-hero-text{color:#5f6673}
html:not(.ph-night) .lb-sec{border-color:#efe7da}
html:not(.ph-night) .lb-cont-bar{background:#e9e0d0}
html:not(.ph-night) .lb-reader-side,html:not(.ph-night) .lb-reader-bar{background:#fff;border-color:#e7ded0}
html:not(.ph-night) .lb-reader-body{background:#f3ede1}

/* =====================================================================
   قالب یکسان و زیباسازی بخش‌های کتابخانه (پنل + سرتیتر + کارت)
   ===================================================================== */
body.phlib main .lb-sec{
  margin-top:26px;padding:18px clamp(14px,1.6vw,22px) clamp(16px,1.8vw,22px);
  border-radius:20px;border:1px solid var(--lb-line);position:relative;
  background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.008));
  box-shadow:0 30px 70px -60px rgba(0,0,0,.9);
}
body.phlib main .lb-sec-h{
  align-items:center;gap:12px;margin:0 0 16px;padding:0 2px 14px;
  border-bottom:1px solid var(--lb-line);
}
body.phlib main .lb-sec-h h2{
  position:relative;padding-inline-start:15px;font-size:clamp(16.5px,1.7vw,21px);
  letter-spacing:-.2px;line-height:1.5;
}
body.phlib main .lb-sec-h h2::before{
  content:'';position:absolute;inset-inline-start:0;top:50%;transform:translateY(-50%);
  width:4px;height:22px;border-radius:99px;
  background:linear-gradient(180deg,#f0c57c,#c98b3a);
  box-shadow:0 0 14px rgba(217,166,111,.45);
}
body.phlib main .lb-more{
  padding:7px 13px;border-radius:999px;border:1px solid var(--lb-line2);
  font-weight:700;font-size:12px;transition:.2s ease;background:transparent;
}
body.phlib main .lb-more:hover{
  background:linear-gradient(135deg,#e8bd77,#c99355);color:#241a0d!important;
  border-color:transparent;gap:5px;box-shadow:0 12px 24px -16px rgba(230,185,92,.9);
}
body.phlib main .lb-sec .lb-grid{gap:clamp(12px,1.4vw,18px)}
body.phlib main .lb-card-art{border-radius:12px;box-shadow:0 14px 30px -26px #000}
body.phlib main .lb-card-body strong{font-size:13.4px}
body.phlib main .lb-card-pct{
  display:inline-flex;align-items:center;gap:6px;font-size:10.6px;font-weight:700;
  color:var(--lb-muted,#9d8a6a);
}
body.phlib main .lb-continue-row > a,
body.phlib main .lb-continue-row > *{
  border-radius:16px;border:1px solid var(--lb-line);background:rgba(255,255,255,.03);
  padding:12px;transition:.2s ease;
}
body.phlib main .lb-continue-row > *:hover{border-color:rgba(217,166,111,.5);transform:translateY(-2px)}
body.phlib main .lb-hubs{
  margin-top:18px;padding:14px;border-radius:18px;border:1px solid var(--lb-line);
  background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.008));
}
body.phlib main .lb-hubs a{border-radius:14px;transition:.2s ease}
body.phlib main .lb-hubs a:hover{transform:translateY(-2px);border-color:rgba(217,166,111,.45)}

/* روز */
html:not(.ph-night) body.phlib main .lb-sec{
  background:linear-gradient(180deg,#ffffff,#fdfaf4);
  border-color:rgba(60,44,24,.10);
  box-shadow:0 26px 60px -52px rgba(60,44,24,.55);
}
html:not(.ph-night) body.phlib main .lb-sec-h{border-bottom-color:rgba(60,44,24,.10)}
html:not(.ph-night) body.phlib main .lb-more{color:#8a5a1e!important;border-color:rgba(60,44,24,.18)}
html:not(.ph-night) body.phlib main .lb-more:hover{color:#241a0d!important}
html:not(.ph-night) body.phlib main .lb-hubs{
  background:linear-gradient(180deg,#ffffff,#fbf7ef);border-color:rgba(60,44,24,.10);
}
html:not(.ph-night) body.phlib main .lb-continue-row > *{
  background:#fff;border-color:rgba(60,44,24,.11);
}

@media(max-width:640px){
  body.phlib main .lb-sec{padding:14px 12px 16px;border-radius:16px;margin-top:18px}
  body.phlib main .lb-sec-h{padding-bottom:11px;margin-bottom:13px}
  body.phlib main .lb-more{padding:6px 10px;font-size:11px}
}

/* هاب‌های بخش‌ها: آیکن‌چیپ و کنتراست روز */
body.phlib main .lb-hub{padding:14px 15px 14px;border-radius:14px}
body.phlib main .lb-hub-ic{
  display:inline-grid;place-items:center;width:36px;height:36px;border-radius:11px;
  background:color-mix(in srgb,var(--h1) 18%,transparent);
  border:1px solid color-mix(in srgb,var(--h1) 30%,transparent);
  margin-bottom:6px;font-size:17px;
}
html:not(.ph-night) body.phlib main .lb-hub{background:#fff;border-color:rgba(60,44,24,.10)}
html:not(.ph-night) body.phlib main .lb-hub:hover{border-color:rgba(60,44,24,.22);background:#fffdf8}
html:not(.ph-night) body.phlib main .lb-hub.h1{--h1:#b8843c}
html:not(.ph-night) body.phlib main .lb-hub.h2{--h1:#0e7490}
html:not(.ph-night) body.phlib main .lb-hub.h3{--h1:#047857}
html:not(.ph-night) body.phlib main .lb-hub.h4{--h1:#6d28d9}
html:not(.ph-night) body.phlib main .lb-hub b{color:#2a2116}
html:not(.ph-night) body.phlib main .lb-hub small{color:#6b6152}
