/* AudioBook Pro — grid + ad popup */
.abp-grid-wrap{max-width:1200px;margin:2rem auto;font-family:inherit}
.abp-grid-tools{display:flex;justify-content:flex-end;margin-bottom:1rem}
.abp-grid-search{width:100%;max-width:320px;padding:.65rem 1rem;border:1px solid #e2e8f0;border-radius:999px;font-size:.95rem;outline:none;background:#fff}
.abp-grid-search:focus{border-color:#6366f1;box-shadow:0 0 0 3px rgba(99,102,241,.15)}
.abp-grid{display:grid;grid-template-columns:repeat(var(--abp-cols,4),minmax(0,1fr));gap:1.25rem}
@media(max-width:1024px){.abp-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:768px){.abp-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.9rem}}
@media(max-width:420px){.abp-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.abp-card-link{display:flex;flex-direction:column;background:#fff;border:1px solid #eef0f4;border-radius:16px;overflow:hidden;text-decoration:none;color:inherit;box-shadow:0 2px 10px rgba(15,23,42,.05);transition:transform .18s ease,box-shadow .18s ease}
.abp-card-link:hover{transform:translateY(-4px);box-shadow:0 12px 28px rgba(15,23,42,.13)}
.abp-card-cover{position:relative;display:block;aspect-ratio:1/1;background:linear-gradient(135deg,#4f46e5,#0ea5e9);overflow:hidden}
.abp-card-cover img{width:100%;height:100%;object-fit:cover;display:block}
.abp-card-fallback{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:2.6rem}
.abp-card-play{position:absolute;right:.6rem;bottom:.6rem;width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.92);color:#4f46e5;display:flex;align-items:center;justify-content:center;font-size:.95rem;box-shadow:0 4px 12px rgba(0,0,0,.2);transition:transform .18s ease}
.abp-card-link:hover .abp-card-play{transform:scale(1.12)}
.abp-card-body{display:flex;flex-direction:column;gap:.2rem;padding:.8rem .9rem 1rem}
.abp-card-title{font-weight:700;font-size:.98rem;line-height:1.32;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.abp-card-author{font-size:.8rem;color:#64748b}
.abp-card-meta{margin-top:.25rem;font-size:.75rem;color:#4f46e5;font-weight:600}
.abp-empty{text-align:center;padding:2rem;color:#888}

/* Ad popup */
.abp-noscroll{overflow:hidden}
.abp-admodal{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:1rem}
.abp-admodal[hidden]{display:none}
.abp-admodal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.72);backdrop-filter:blur(2px)}
.abp-admodal-box{position:relative;width:100%;max-width:520px;background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 24px 60px rgba(0,0,0,.35)}
.abp-admodal-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.7rem 1rem;font-size:.78rem;color:#64748b;background:#f8fafc;border-bottom:1px solid #eef0f4}
.abp-admodal-close{border:0;background:#eef2ff;color:#4338ca;width:auto;min-width:34px;height:34px;padding:0 .7rem;border-radius:999px;font-size:.9rem;cursor:pointer;font-weight:700}
.abp-admodal-close:disabled{cursor:not-allowed;opacity:.75}
.abp-counting .abp-admodal-x{display:none}
.abp-admodal-body{padding:1rem;min-height:250px;display:flex;align-items:center;justify-content:center}
.abp-admodal-body ins{width:100%}
.abp-ad-zone{margin:1.25rem 0}
.abp-status{font-size:.85rem;color:#4f46e5;padding:.35rem 0}
.abp-audio{width:100%;border-radius:12px;margin:.5rem 0}

/* Login-to-save-progress popup */
.abp-loginmodal-box{max-width:400px}
.abp-loginmodal-body{padding:2rem 1.75rem 1.75rem;text-align:center}
.abp-loginmodal-icon{font-size:2.2rem;display:block;margin-bottom:.5rem}
.abp-loginmodal-body h3{margin:0 0 .5rem;font-size:1.15rem;font-weight:800;color:#1e1b4b;font-family:'Nunito',system-ui,sans-serif}
.abp-loginmodal-body p{margin:0 0 1.25rem;font-size:.88rem;line-height:1.55;color:#64748b}
.abp-loginmodal-actions{display:flex;flex-direction:column;gap:.6rem}
.abp-loginmodal-btn{display:block;padding:.75rem 1rem;border-radius:12px;background:#6366f1;color:#fff;font-weight:700;font-size:.92rem;text-decoration:none;transition:background .18s;box-shadow:0 4px 16px rgba(99,102,241,.35)}
.abp-loginmodal-btn:hover,.abp-loginmodal-btn:focus{background:#4f46e5;color:#fff}
.abp-loginmodal-skip{border:0;background:transparent;color:#94a3b8;font-size:.82rem;font-weight:600;cursor:pointer;padding:.4rem}
.abp-loginmodal-skip:hover{color:#64748b;text-decoration:underline}
.abp-loginmodal-btn-ghost{background:#eef2ff;color:#4338ca;box-shadow:none;font-size:.85rem}
.abp-loginmodal-btn-ghost:hover,.abp-loginmodal-btn-ghost:focus{background:#e0e7ff;color:#3730a3}
