/*
Theme Name: Корекційна бібліотека
Theme URI: https://example.org/
Author: Electronic Library
Description: Україномовна тема-каталог публічних матеріалів Google Drive.
Version: 2.7.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: korekciina-biblioteka
*/
:root{--navy:#163c66;--blue:#246bb1;--bg:#f4f7fb;--text:#243247;--muted:#64748b}*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,'Segoe UI',Arial,sans-serif;background:var(--bg);color:var(--text)}a{color:var(--blue);text-decoration:none}a:hover{text-decoration:underline}.site-header{background:var(--navy);color:white;padding:26px 20px}.wrap{max-width:1120px;margin:auto}.brand{font-size:27px;font-weight:800;color:white}.tagline{margin:6px 0 0;opacity:.85}.hero{padding:36px 0 22px}.hero h1{font-size:clamp(27px,4vw,43px);margin:0 0 12px}.hero p{color:var(--muted);font-size:17px}.search{width:100%;padding:16px;border:1px solid #cbd5e1;border-radius:12px;font-size:17px;margin:14px 0 20px}.panel{background:white;border-radius:16px;padding:24px;box-shadow:0 8px 24px #193d6410;margin:18px 0}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(225px,1fr));gap:14px}.item{display:block;border:1px solid #e3e9f0;border-radius:12px;padding:20px;background:#fff;min-height:125px}.item:hover{border-color:#8cb6df;box-shadow:0 4px 14px #193d6415;text-decoration:none}.item .symbol{font-size:30px}.item strong{display:block;color:var(--text);margin:12px 0 6px;overflow-wrap:anywhere}.item small{color:var(--muted)}.crumbs{margin:14px 0;color:var(--muted)}.crumbs button{border:0;background:none;color:var(--blue);cursor:pointer;font-size:15px}.site-footer{text-align:center;padding:30px 20px;color:var(--muted)}.viewer{width:100%;height:70vh;border:1px solid #e2e8f0;border-radius:10px}.btn{background:var(--blue);color:white;padding:11px 18px;border-radius:9px;display:inline-block;margin:8px 8px 8px 0}.btn:hover{color:white}.notice{padding:16px;background:#fff7df;border:1px solid #e9d49b;border-radius:10px}.hidden{display:none!important}@media(max-width:600px){.panel{padding:15px}.hero{padding:25px 0 12px}.viewer{height:60vh}}

/* Document cover cards */
.item{padding:12px;overflow:hidden}.item .cover{height:245px;display:flex;align-items:center;justify-content:center;background:#f1f5f9;border-radius:9px;overflow:hidden}.item .cover img{display:block;width:100%;height:100%;object-fit:contain;background:white}.item .cover .symbol{font-size:64px}.item strong{margin:12px 4px 5px}.item small{margin:0 4px 6px;display:block}.item:hover .cover img{transform:scale(1.025);transition:transform .2s ease}@media(max-width:600px){.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.item .cover{height:195px}.item{padding:8px}.item strong{font-size:13px}}

/* Public sample library landing page */
.kbl-offers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:12px 0 24px}.kbl-offer{background:#fff;border:1px solid #dce6f2;border-radius:16px;padding:26px;display:flex;flex-direction:column;align-items:flex-start}.kbl-offer-featured{border:2px solid #246bb1;background:#f1f7ff}.kbl-eyebrow{font-size:14px;font-weight:700;color:#4c6685}.kbl-price{font-size:clamp(30px,5vw,45px);font-weight:800;color:#163c66;margin:12px 0 4px}.kbl-offer p{line-height:1.6;flex:1}.kbl-action{display:inline-block;padding:12px 17px;border-radius:9px;background:#246bb1;color:white;font-weight:700;text-decoration:none}.kbl-action:hover{color:white;background:#163c66;text-decoration:none}.kbl-action-outline{background:white;color:#246bb1;border:1px solid #246bb1}.kbl-action-outline:hover{color:white}.kbl-muted{color:#64748b}.kbl-info ul{padding-left:23px;line-height:1.9}.kbl-faq details{border-top:1px solid #e4eaf2;padding:16px 0}.kbl-faq summary{font-weight:700;cursor:pointer;line-height:1.5}.kbl-faq details p{line-height:1.7;margin-bottom:0}.kbl-contact{scroll-margin-top:25px}.kbl-contact p{line-height:1.75}.kbl-contact-number{font-size:24px;font-weight:800}@media(max-width:650px){.kbl-offers{grid-template-columns:1fr}.kbl-offer{padding:20px}}

/* v1.3: окрема сторінка перегляду */
.kbl-material-page{max-width:1120px;margin:24px auto;padding:0 18px}.kbl-back-link{display:inline-block;margin:8px 0 12px;font-weight:600}.kbl-material-view h1{font-size:clamp(22px,3vw,34px);margin:0 0 12px;overflow-wrap:anywhere}.kbl-material-view .viewer{height:min(82vh,1000px);min-height:500px;display:block}.kbl-material-prices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0}.kbl-material-prices>div{padding:18px;border:1px solid #dbe6f2;border-radius:12px;background:#f6faff}.kbl-material-prices strong{font-size:27px;display:block;color:#163c66}.kbl-material-prices span{display:block;margin-top:5px}@media(max-width:600px){.kbl-material-view .viewer{height:72vh;min-height:350px}.kbl-material-prices{grid-template-columns:1fr}}


/* v1.4: барвистий дружній дизайн для корекційно-розвиткової бібліотеки */
:root{--navy:#24467c;--blue:#3569df;--bg:#fffaf3;--text:#29344d;--muted:#66728b}
body{background:radial-gradient(circle at 5% 6%,#ffe6ef 0,transparent 24%),radial-gradient(circle at 95% 15%,#e0f6ff 0,transparent 24%),linear-gradient(180deg,#fffdf8,#f7f8ff 65%,#fffaf3);min-height:100vh}
.site-header{position:relative;overflow:hidden;background:linear-gradient(110deg,#3569df 0%,#7757d9 55%,#ef70a0 100%);border-bottom:5px solid #ffd46a;padding:26px 20px 29px}
.site-header:after{content:"✦  ✿  ★  ✦";position:absolute;right:5%;top:18px;font-size:35px;letter-spacing:14px;color:#fff6;pointer-events:none}
.brand{font-size:clamp(25px,3.5vw,36px);text-shadow:0 2px 7px #253e7240}
.tagline{font-size:15px;opacity:.96}
.hero{position:relative;overflow:hidden;background:linear-gradient(120deg,#e9f7ff,#fff0f7 55%,#fff5d7);border:1px solid #f2e4f2;border-radius:26px;padding:38px 36px 32px;margin:26px 0 20px;box-shadow:0 12px 35px #5668a115}
.hero:before{content:"✏️ 📚 🌈";display:block;font-size:35px;margin-bottom:10px}
.hero:after{content:"✦";position:absolute;right:30px;top:20px;font-size:80px;color:#ffd26e88}
.hero h1{color:#293f8b;max-width:850px;line-height:1.16}
.hero p{max-width:850px;line-height:1.65;color:#495673}
.panel{border:1px solid #e9e9f8;border-radius:23px;box-shadow:0 10px 30px #495d9b12}
.panel h2{color:#354c98}
.kbl-offer{border-radius:23px;box-shadow:0 10px 25px #3e4b7c10;transition:transform .2s,box-shadow .2s}
.kbl-offer:hover{transform:translateY(-3px);box-shadow:0 14px 32px #3e4b7c1d}
.kbl-offer:first-child{background:linear-gradient(145deg,#fff5e0,#fff);border:2px solid #ffd48b}
.kbl-offer-featured{background:linear-gradient(145deg,#e9f6ff,#f4eaff)!important;border:2px solid #a39af8}
.kbl-offer:first-child .kbl-price{color:#dc7828}
.kbl-offer-featured .kbl-price{color:#7350c9}
.kbl-eyebrow{font-size:15px}
.kbl-action,.btn{background:linear-gradient(100deg,#426de4,#835be1);border:0;border-radius:14px;box-shadow:0 5px 13px #5268cc26}
.kbl-action:hover,.btn:hover{background:linear-gradient(100deg,#2f55c3,#6b44c6);transform:translateY(-1px)}
.kbl-action-outline{background:#fff;color:#4b63bd;border:1px solid #b9baf0;box-shadow:none}
.kbl-action-outline:hover{background:#eceaff;color:#4b63bd}
.search{border:2px solid #d7dafa;background:#fbfcff;border-radius:16px;outline-offset:2px}
.search:focus{border-color:#7968e5;box-shadow:0 0 0 4px #7968e51b}
.grid{gap:18px}
.item{border:1px solid #e1e5f7;border-radius:19px;box-shadow:0 5px 18px #5366a10c;transition:transform .18s,box-shadow .18s,border-color .18s}
.item:nth-child(4n+1) .cover{background:#fff0e2}
.item:nth-child(4n+2) .cover{background:#e8f7ff}
.item:nth-child(4n+3) .cover{background:#f1eaff}
.item:nth-child(4n+4) .cover{background:#e8f9eb}
.item:hover{transform:translateY(-4px);border-color:#a9a2ed;box-shadow:0 12px 26px #5266a128}
.item .cover{border-radius:13px}
.item strong{line-height:1.4}
.kbl-faq details{border-color:#e8e8f6}
.kbl-faq summary:hover{color:#5c57cb}
.kbl-contact{background:linear-gradient(115deg,#eff8ff,#fff0f5)}
.kbl-material-view .viewer{background:white;border:2px solid #e1e7fa;border-radius:17px}
.kbl-material-prices>div:first-child{background:#fff6e7;border-color:#ffe0a7}
.kbl-material-prices>div:last-child{background:#f1edff;border-color:#d4c6ff}
.site-footer{color:#64708a}
@media(max-width:650px){.hero{padding:25px 19px;border-radius:18px}.hero:after{font-size:44px;right:12px}.site-header:after{display:none}.panel{border-radius:17px}.item{border-radius:14px}}

/* v1.5 — тематичний дизайн, без пошуку та рекламних блоків у каталозі */
:root{--blue:#5a55db;--navy:#31377c;--text:#303454}
body{background:radial-gradient(ellipse at 12% 17%,#fff0d9 0,transparent 32%),radial-gradient(ellipse at 90% 35%,#e4f4ff 0,transparent 38%),linear-gradient(160deg,#fefaff,#f4faff 55%,#fffaf1);}
.site-header{background:linear-gradient(105deg,#3d62d8 0%,#7559db 50%,#eb78ae 100%);border-bottom:6px solid #ffcc68;box-shadow:0 8px 30px #5654a026}
.site-header .wrap{position:relative;z-index:1}
.site-header:after{content:'✦   ✿   ✦   ✿';font-size:28px;color:#ffffff55}
.hero{display:grid;grid-template-columns:minmax(0,1fr) 230px;align-items:center;gap:24px;min-height:275px;background:linear-gradient(120deg,#e8f5ff 0%,#fff1f8 55%,#fff1c8 100%);border:2px solid #fff;box-shadow:0 16px 42px #5864a31b;padding:30px 40px}
.hero:before,.hero:after{display:none}
.kbl-hero-copy{grid-column:1;grid-row:1;position:relative;z-index:2}
.kbl-hero-eyebrow{font-size:14px!important;font-weight:800!important;color:#8754ad!important;letter-spacing:.015em}
.hero h1{font-weight:850;letter-spacing:-.035em;color:#34459e;line-height:1.1}
.hero p{font-size:16px;line-height:1.7}
.kbl-hero-decoration{grid-column:2;grid-row:1;display:grid;grid-template-columns:repeat(2,1fr);gap:12px;transform:rotate(4deg);position:relative;z-index:1}
.kbl-hero-decoration span{height:93px;display:grid;place-items:center;font-size:51px;border-radius:25px;background:#ffffffa6;box-shadow:0 10px 22px #5e5e9d20;transform:rotate(-8deg)}
.kbl-hero-decoration span:nth-child(2){background:#fff1c9;transform:rotate(9deg)}
.kbl-hero-decoration span:nth-child(3){background:#e6f8e6;transform:rotate(7deg)}
.kbl-hero-decoration span:nth-child(4){background:#ffe6f1;transform:rotate(-6deg)}
.panel[aria-label="Каталог зразків"]{padding:25px 26px 32px;border:2px solid #e9e6ff;background:linear-gradient(180deg,#ffffff,#fffefe);box-shadow:0 16px 35px #535ba417}
.crumbs{padding:10px 14px;border-radius:13px;background:#f3f0ff;margin:0 0 22px;display:inline-flex;flex-wrap:wrap;gap:8px}
.crumbs button{font-weight:700;color:#6252bc}
.grid{grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:20px}
.item{background:white;border:2px solid #e8e9fa;border-radius:20px;padding:12px;box-shadow:0 7px 19px #42468d10}
.item:nth-child(4n+1){border-bottom:5px solid #f5bf67}
.item:nth-child(4n+2){border-bottom:5px solid #85caec}
.item:nth-child(4n+3){border-bottom:5px solid #bba4f2}
.item:nth-child(4n+4){border-bottom:5px solid #98d9ae}
.item:hover{transform:translateY(-5px);box-shadow:0 17px 30px #42468d24;border-color:#a6a0ed}
.item .cover{height:255px;border-radius:13px}
.item strong{font-size:15px;color:#353e73}
.item small{font-weight:600;color:#8276a8}
.kbl-material-page .panel{background:#fff}
.kbl-material-view .viewer{border:2px solid #e4e5fa;box-shadow:0 7px 24px #4b50a015}
.kbl-material-purchase{background:linear-gradient(135deg,#fff7e6,#f3eeff)!important;border:2px solid #e7ddfb}
.kbl-material-prices>div:first-child{background:#fff4d8}
.kbl-material-prices>div:last-child{background:#ebe9ff}
@media(max-width:700px){.hero{grid-template-columns:1fr;padding:26px 20px;gap:12px}.kbl-hero-copy{grid-column:1;grid-row:1}.kbl-hero-decoration{grid-column:1;grid-row:2;display:flex;transform:none;justify-content:center}.kbl-hero-decoration span{width:65px;height:60px;font-size:31px;border-radius:16px}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.item .cover{height:195px}.panel[aria-label="Каталог зразків"]{padding:15px}}
@media(prefers-reduced-motion:reduce){.item,.item:hover{transition:none;transform:none}}


/* v1.6 — дитячі усмішки, світлі кольори та виразні картки */
body{background:
radial-gradient(ellipse at 4% 8%,#ffe2ed 0,transparent 28%),
radial-gradient(ellipse at 95% 12%,#dcf8ff 0,transparent 26%),
radial-gradient(ellipse at 20% 85%,#fff0bc 0,transparent 22%),
linear-gradient(160deg,#fffefa 0%,#f4f6ff 58%,#fff9ee 100%)}
.site-header{background:linear-gradient(115deg,#4d9eea 0%,#7069e6 53%,#f88bb4 100%);border-bottom:6px solid #ffcf64}
.site-header .brand{color:#fff;text-shadow:0 2px 8px #33448845}
.site-header .tagline{color:#fff9f2}
.hero{position:relative;background:linear-gradient(115deg,#e0f7ff 0%,#fff0f7 52%,#fff4cd 100%);border:2px solid #fff;border-radius:32px;box-shadow:0 15px 40px #5263b520;overflow:hidden;padding-top:46px;padding-bottom:46px}
.hero:before{content:"";position:absolute;width:200px;height:200px;right:-65px;bottom:-110px;background:#ffcf6a66;border-radius:50%;pointer-events:none}
.hero h1{color:#38498f;font-weight:850;text-shadow:0 2px 0 #fff9}
.hero p{color:#43536d}
.kbl-hero-decoration{display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap}
.kbl-hero-decoration span{display:inline-flex;align-items:center;justify-content:center;width:76px;height:76px;border-radius:24px;background:#ffffffba;box-shadow:0 8px 22px #6c81bc24;font-size:43px;transform:rotate(-6deg);border:2px solid #fff}
.kbl-hero-decoration span:nth-child(even){transform:rotate(7deg)}
.kbl-hero-decoration span:nth-child(2){background:#fff2c9}
.kbl-hero-decoration span:nth-child(3){background:#e5f8ff}
.kbl-hero-decoration span:nth-child(4){background:#ffe4ef}
.kbl-smile-bubbles{position:absolute;right:22px;top:14px;display:flex;gap:12px;font-size:25px;opacity:.9;pointer-events:none}
.kbl-smile-bubbles span{display:inline-block;transform:rotate(12deg)}
.kbl-smile-bubbles span:nth-child(2){transform:translateY(14px) rotate(-15deg)}
.panel{background:#fffefa;border:1px solid #e6e9fa;border-radius:24px;box-shadow:0 10px 32px #576ab112}
.grid{gap:20px}
.item{border:2px solid #edf0ff;border-radius:22px;background:white;box-shadow:0 6px 19px #5e75b615}
.item:hover{border-color:#b2a7ff;box-shadow:0 15px 34px #6371b32b;transform:translateY(-5px)}
.item .cover{border-radius:15px}
.crumbs{color:#5661a3;font-weight:650}
.kbl-material-view{border-top:6px solid #8fcdf5}
.kbl-material-purchase{border-top:6px solid #ffce7a}
.kbl-material-view h1{color:#374e9c}
.kbl-material-prices>div{border-radius:18px}
@media(max-width:650px){.hero{padding:26px 16px;border-radius:22px}.kbl-hero-decoration{gap:8px}.kbl-hero-decoration span{width:53px;height:53px;font-size:31px;border-radius:16px}.kbl-smile-bubbles{font-size:17px;right:8px;top:8px}.panel{border-radius:18px}}


/* v1.7 — повноцінне адаптивне оформлення для смартфонів і планшетів */
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{overflow-x:hidden}
.wrap{width:min(100% - 36px,1120px)}
img,iframe,video,embed,object{max-width:100%}
button,a{-webkit-tap-highlight-color:transparent}
button{font-family:inherit}
a:focus-visible,button:focus-visible{outline:3px solid #ffae39;outline-offset:3px}
.item{min-width:0}
.item strong,.kbl-material-view h1{overflow-wrap:anywhere;word-break:normal}
.kbl-material-page{width:min(100% - 36px,1120px);padding:0}
.kbl-material-view .viewer{width:100%;max-width:100%;height:min(78dvh,850px)}
.kbl-material-prices{min-width:0}
@media(min-width:769px) and (max-width:1024px){
 .wrap{width:calc(100% - 40px)}
 .hero{grid-template-columns:minmax(0,1fr) 190px;padding:30px}
 .kbl-hero-decoration{gap:9px}
 .kbl-hero-decoration span{width:72px;height:72px;font-size:37px}
 .grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}
 .item .cover{height:230px}
}
@media(max-width:768px){
 .wrap{width:calc(100% - 28px)}
 .site-header{padding:17px 14px 20px}
 .site-header .brand{display:inline-block;font-size:clamp(21px,5.6vw,28px);line-height:1.25;overflow-wrap:anywhere}
 .site-header .tagline{font-size:13px;line-height:1.45;margin-top:7px}
 .hero{display:flex;flex-direction:column;align-items:stretch;gap:14px;min-height:0;margin:17px 0 15px;padding:23px 20px 22px;border-radius:22px}
 .kbl-hero-copy{order:1}
 .kbl-hero-decoration{order:0;display:flex;transform:none;gap:9px;justify-content:flex-start;flex-wrap:wrap}
 .kbl-hero-decoration span{width:54px;height:54px;font-size:29px;border-radius:15px;transform:none!important}
 .kbl-smile-bubbles{right:13px;top:14px;font-size:19px}
 .hero h1{font-size:clamp(25px,6.2vw,37px);line-height:1.15;letter-spacing:-.02em}
 .hero p{font-size:14px;line-height:1.6}
 .kbl-hero-eyebrow{font-size:12px!important}
 .panel[aria-label="Каталог зразків"]{padding:17px 13px 21px;border-radius:19px}
 .crumbs{display:flex;max-width:100%;font-size:13px;padding:9px 10px;margin-bottom:14px}
 .crumbs button{min-height:36px;padding:5px 7px;touch-action:manipulation}
 .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .item{padding:8px;border-radius:15px;min-height:0}
 .item .cover{height:auto;aspect-ratio:3/4;border-radius:11px}
 .item .cover img{object-fit:contain}
 .item strong{font-size:13px;line-height:1.35;margin:9px 3px 5px}
 .item small{font-size:11px;margin:0 3px 5px}
 .kbl-material-page{width:calc(100% - 28px);margin:15px auto}
 .kbl-material-page .panel{padding:15px 12px;border-radius:17px}
 .kbl-material-view h1{font-size:clamp(21px,5vw,29px)}
 .kbl-material-view .viewer{height:65dvh;min-height:320px;border-radius:12px}
 .kbl-material-prices{grid-template-columns:1fr;gap:11px}
 .kbl-material-prices>div{padding:14px}
 .kbl-contact-number{font-size:clamp(18px,5vw,24px);overflow-wrap:anywhere}
 .btn,.kbl-action{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
 .site-footer{font-size:12px;padding:20px 14px}
}
@media(max-width:380px){
 .wrap,.kbl-material-page{width:calc(100% - 20px)}
 .hero{padding:18px 14px}
 .kbl-hero-decoration span{width:46px;height:46px;font-size:25px}
 .kbl-smile-bubbles{display:none}
 .panel[aria-label="Каталог зразків"]{padding:12px 9px}
 .grid{gap:8px}
 .item{padding:6px}
 .item strong{font-size:12px}
 .kbl-material-view .viewer{height:58dvh;min-height:290px}
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}
}

/* 2.0 — illustration, categories, class filters, favorites, new labels */
.kbl-v2-hero{display:grid;grid-template-columns:42% 58%;gap:0;align-items:stretch;min-height:320px;padding:0!important;background:#fff4dc!important;overflow:hidden;position:relative}
.kbl-v2-hero:before,.kbl-v2-hero:after{display:none!important}.kbl-v2-hero-copy{padding:35px 24px 35px 35px;position:relative;z-index:1;display:flex;flex-direction:column;justify-content:center}
.kbl-v2-hero-copy h1{font-size:clamp(29px,3.6vw,49px);color:#6041a2;margin:7px 0}.kbl-v2-hero-copy p{color:#50466a;font-size:15px;line-height:1.55}.kbl-v2-banner{display:block;width:100%;height:100%;min-height:320px;object-fit:cover;object-position:47% center;max-width:none}
.kbl-v2-toolbar{display:flex;flex-direction:column;gap:14px;margin-bottom:20px}.kbl-v2-categories{display:flex;flex-wrap:wrap;gap:8px}.kbl-v2-chip{border:1px solid #ded5ff;background:#f7f3ff;color:#51448b;padding:9px 13px;border-radius:99px;font-size:13px;font-weight:700;cursor:pointer;min-height:40px}.kbl-v2-chip.active{background:#6651d2;color:white;border-color:#6651d2}.kbl-v2-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-weight:700;color:#45446f}.kbl-v2-controls select,.kbl-v2-controls button{min-height:43px;border:1px solid #c9d3ee;background:#fff;padding:8px 12px;border-radius:12px;color:#444b85;font:inherit;cursor:pointer}.kbl-v2-controls button.active{background:#ffe6ef;color:#b3316b;border-color:#ffa9ca}.kbl-v2-tile{position:relative;min-width:0}.kbl-v2-tile .item{height:100%;display:flex;flex-direction:column}.kbl-v2-tile .item small{margin-top:auto}.kbl-v2-favorite{position:absolute;right:10px;top:10px;z-index:2;width:38px;height:38px;border-radius:50%;background:#fffffff2;border:1px solid #f1c8dc;color:#b63c75;font-size:26px;cursor:pointer;box-shadow:0 3px 8px #0002}.kbl-v2-favorite.selected{background:#ffe1ed}.kbl-v2-new{position:absolute;left:8px;top:9px;background:#ffca44;color:#53371b;padding:5px 8px;border-radius:8px;font-weight:800;font-size:11px;box-shadow:0 2px 7px #0002}.kbl-v2-telegram{position:fixed;bottom:20px;right:20px;z-index:20;display:flex;align-items:center;gap:7px;border-radius:99px;padding:12px 18px;background:#238acb;color:#fff!important;font-weight:800;text-decoration:none;box-shadow:0 7px 24px #2076ac5e}.kbl-v2-telegram:hover{background:#136caa}
@media(max-width:768px){.kbl-v2-hero{display:flex;flex-direction:column;min-height:0}.kbl-v2-hero-copy{padding:22px 19px 12px}.kbl-v2-hero-copy h1{font-size:30px}.kbl-v2-banner{height:auto;min-height:0;max-height:240px;object-fit:cover;object-position:center 44%}.kbl-v2-chip{font-size:12px;padding:8px 11px}.kbl-v2-controls{gap:7px;font-size:13px}.kbl-v2-telegram{bottom:12px;right:12px;padding:11px 14px}.kbl-v2-telegram span{display:none}.kbl-v2-favorite{width:34px;height:34px;right:6px;top:6px;font-size:23px}.kbl-v2-new{font-size:10px;left:5px;top:7px;padding:4px 6px}}

/* 2.1: PDF без стандартної панелі завантаження і друку */
.kbl-pdf-reader{width:100%;max-width:100%;background:#f2f5fc;border:1px solid #dce4f4;border-radius:18px;padding:14px 10px;overflow:hidden}
.kbl-pdf-status{text-align:center;color:#53627e;font-size:14px;margin:0 0 14px}
.kbl-pdf-pages{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%;min-width:0}
.kbl-pdf-sheet{display:flex;justify-content:center;width:100%;max-width:100%;overflow:hidden}
.kbl-pdf-sheet canvas{display:block;max-width:100%;height:auto!important;background:white;box-shadow:0 6px 20px #273e6822;border-radius:3px}
@media(max-width:650px){.kbl-pdf-reader{padding:9px 5px;border-radius:12px}.kbl-pdf-pages{gap:10px}}

/* 2.2: освітній портал, добірки, збільшення обкладинок, поради */
.kbl-v22-portal,.kbl-v22-collections{margin:20px 0 25px;padding:23px;border-radius:24px;background:#fff;border:2px solid #e9e6ff;box-shadow:0 9px 28px #5c6db018}
.kbl-v22-portal h2,.kbl-v22-collections h2{margin:0 0 6px;color:#5746a3;font-size:clamp(20px,2.6vw,28px)}
.kbl-v22-portal p,.kbl-v22-collections p{margin:0 0 16px;color:#67708b}
.kbl-v22-portal-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.kbl-v22-portal-grid button{border:0;border-radius:20px;padding:24px 12px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;font-size:33px;cursor:pointer;min-height:132px;transition:transform .18s,box-shadow .18s}
.kbl-v22-portal-grid strong{font-size:16px;color:#334061;text-align:center}
.kbl-v22-portal-grid button:nth-child(6n+1){background:#e2f6ff}.kbl-v22-portal-grid button:nth-child(6n+2){background:#fff0c9}.kbl-v22-portal-grid button:nth-child(6n+3){background:#f1e8ff}.kbl-v22-portal-grid button:nth-child(6n+4){background:#ffe5ee}.kbl-v22-portal-grid button:nth-child(6n+5){background:#e5f8e7}.kbl-v22-portal-grid button:nth-child(6n+6){background:#e8eeff}
.kbl-v22-portal-grid button:hover,.kbl-v22-collection-grid button:hover{transform:translateY(-3px);box-shadow:0 8px 20px #5365a323}
.kbl-v22-tip{margin:22px 0;padding:20px 23px;border-radius:24px;background:linear-gradient(105deg,#fff3d6,#ffeaf3);display:flex;align-items:center;gap:17px;border:2px solid #ffe4a9}
.kbl-v22-tip h2{font-size:19px;color:#8a5081;margin:0 0 5px}.kbl-v22-tip p{margin:0;color:#574d68}.kbl-v22-owl{font-size:55px;flex:none}.kbl-v22-tip>div{flex:1}.kbl-v22-tip button,.kbl-v22-share{background:#6659cf;color:white;border:0;border-radius:13px;padding:12px 16px;cursor:pointer;font-weight:700;min-height:44px}
.kbl-v22-collection-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}.kbl-v22-collection-grid button{background:#f3f0ff;border:1px solid #dcd7ff;border-radius:15px;padding:16px 12px;color:#51468c;font-weight:700;cursor:pointer;min-height:70px}
.kbl-v2-tile{position:relative}.kbl-v22-zoom{display:block;width:100%;padding:9px 5px;background:#eef3ff;color:#4350a1;border:1px solid #dce4ff;border-radius:12px;cursor:pointer;margin-top:5px;font-weight:600}
.kbl-v22-dialog{border:0;border-radius:22px;padding:26px;max-width:min(94vw,760px);max-height:92vh;box-shadow:0 20px 80px #15234e77;text-align:center}.kbl-v22-dialog::backdrop{background:#1e254aaf}.kbl-v22-dialog img{display:block;max-height:75vh;width:auto;max-width:100%;object-fit:contain;margin:auto}.kbl-v22-dialog p{color:#404d70;overflow-wrap:anywhere}.kbl-v22-close{position:absolute;top:7px;right:9px;border:0;background:#ffe5e8;border-radius:50%;width:36px;height:36px;cursor:pointer}.kbl-v22-share{margin:8px 0 15px}
@media(max-width:768px){.kbl-v22-portal,.kbl-v22-collections{padding:16px 12px;border-radius:18px}.kbl-v22-portal-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.kbl-v22-portal-grid button{min-height:108px;font-size:27px;padding:14px 7px}.kbl-v22-portal-grid strong{font-size:13px}.kbl-v22-tip{flex-wrap:wrap;padding:15px;gap:10px}.kbl-v22-tip h2{font-size:17px}.kbl-v22-owl{font-size:40px}.kbl-v22-tip button{width:100%}.kbl-v22-collection-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.kbl-v22-collection-grid button{font-size:13px}.kbl-v22-zoom{font-size:12px}.kbl-v22-dialog{padding:24px 10px 10px}}

/* v2.2.2: придбання під матеріалом */
.kbl-buy-modern{padding:clamp(20px,4vw,40px)!important;border-top:6px solid #ffcf78}
.kbl-buy-heading{text-align:center;max-width:660px;margin:0 auto 24px}
.kbl-buy-heading>span{font-size:32px}.kbl-buy-heading h2{margin:7px 0 8px;font-size:clamp(22px,3vw,30px);color:#344d98}
.kbl-buy-heading p{color:#59657e;line-height:1.6;margin:0}
.kbl-buy-prices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0 26px}
.kbl-buy-prices>div{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:7px;padding:22px 16px;border-radius:22px;min-width:0}
.kbl-buy-prices .kbl-buy-single{background:#fff1d9;border:2px solid #ffd68c}
.kbl-buy-prices .kbl-buy-full{background:#eeebff;border:2px solid #c9c1ff}
.kbl-buy-prices .kbl-buy-eyebrow{font-size:12px;font-weight:800;letter-spacing:.07em;color:#6c6070}
.kbl-buy-prices strong{font-size:clamp(30px,5vw,42px);line-height:1.2;color:#ad6617}
.kbl-buy-prices .kbl-buy-full strong{color:#6551c9}
.kbl-buy-prices span:not(.kbl-buy-eyebrow){font-size:14px;line-height:1.5}
.kbl-buy-prices small{font-size:12px;color:#62558b}
.kbl-buy-contact{text-align:center}.kbl-buy-contact h3{margin:0 0 15px;font-size:19px;color:#344d87}
.kbl-buy-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:650px;margin:0 auto}
.kbl-buy-button{display:flex;align-items:center;justify-content:center;min-height:54px;padding:12px;border-radius:15px;color:#fff!important;font-weight:800;text-decoration:none!important;box-shadow:0 8px 18px #5966a52c;transition:transform .15s,filter .15s}
.kbl-buy-button:hover{transform:translateY(-2px);filter:brightness(.96)}
.kbl-buy-viber{background:#7360c5}.kbl-buy-telegram{background:#259bd4}
.kbl-buy-phone{margin:15px 0 5px;color:#59657e}.kbl-buy-phone a{font-weight:800;color:#3f559c}
#kbl-copy-phone{border:1px solid #c7d2f1;border-radius:9px;background:white;padding:6px 10px;margin-left:5px;cursor:pointer;color:#3f559c;font-size:12px}
.kbl-buy-note{font-size:12px;color:#68758c;max-width:630px;margin:8px auto 0;line-height:1.5}
.kbl-buy-help{display:flex;align-items:flex-start;gap:13px;background:#f0f8ff;border:1px solid #d6eafc;border-radius:17px;padding:17px;margin-top:24px;line-height:1.6}
.kbl-buy-help>span{font-size:24px}.kbl-buy-help p{margin:0;overflow-wrap:anywhere}
@media(max-width:600px){.kbl-buy-modern{padding:19px 12px!important}.kbl-buy-prices{gap:9px}.kbl-buy-prices>div{padding:16px 8px;border-radius:15px}.kbl-buy-prices .kbl-buy-eyebrow{font-size:10px}.kbl-buy-prices span:not(.kbl-buy-eyebrow){font-size:12px}.kbl-buy-buttons{grid-template-columns:1fr}.kbl-buy-help{padding:12px}}

/* Тестовий перегляд зображень */
.kbl-image-preview{display:grid;gap:16px;margin:18px auto;max-width:920px}
.kbl-image-page{margin:0;background:#fff;border:1px solid #e4e6f1;border-radius:12px;overflow:hidden;box-shadow:0 5px 20px #1e356014}
.kbl-image-page img{display:block;width:100%;height:auto;object-fit:contain}
.kbl-image-page figcaption{text-align:center;font-size:12px;color:#647089;padding:9px}
.kbl-test-panel{margin-top:22px;padding:18px;background:#fff9df;border:1px solid #e8c779;border-radius:12px}
.kbl-test-panel button{background:#5a60c9;color:white;padding:12px 16px;border:0;border-radius:10px;cursor:pointer}
.kbl-test-error{color:#a02525;font-weight:700}
@media(max-width:600px){.kbl-image-preview{gap:9px}.kbl-image-page{border-radius:7px}.kbl-test-panel{padding:12px}}

/* v2.3.1: компактний переглядач окремого матеріалу */
.kbl-material-view .viewer{display:block;width:100%;max-width:760px;height:540px;min-height:0;margin:18px auto;border-radius:14px}
.kbl-material-view .kbl-image-preview{max-width:760px;margin:18px auto}
@media(max-width:650px){.kbl-material-view .viewer{width:100%;max-width:100%;height:430px;min-height:0;margin:12px auto}.kbl-material-view .kbl-image-preview{max-width:100%}}

/* v2.4: improved discovery, responsive cards and viewer */
.kbl-v24-intro{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:18px 0;padding:20px 24px;background:linear-gradient(110deg,#fff7d9,#e7f8ff);border:1px solid #e2e7f6;border-radius:22px}.kbl-v24-intro strong{font-size:20px;color:#344d87}.kbl-v24-intro p{margin:7px 0 0;line-height:1.6}.kbl-v24-intro a{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-height:46px;padding:10px 18px;background:#6357bd;color:#fff;border-radius:14px;text-decoration:none;font-weight:750}.kbl-v24-catalog{scroll-margin-top:24px}.kbl-v24-catalog-heading h2{margin-bottom:6px}.kbl-v24-catalog-heading p{margin-top:0;color:#52617d}.kbl-v24-search-label{display:block;font-weight:750;margin:16px 0 8px;color:#344d87}#kbl-search{display:block;width:100%;max-width:720px;min-height:50px;border:2px solid #cbd7f2;border-radius:14px;padding:12px 15px;font:inherit;background:#fff;color:#243450;margin-bottom:18px}#kbl-search:focus{outline:3px solid #c7bafa;outline-offset:2px}.kbl-v24-description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;line-height:1.45;color:#59647a;margin:7px 0}.kbl-v2-tile .item{min-width:0;overflow-wrap:anywhere}.kbl-v2-tile .item strong{line-height:1.35}.kbl-v24-catalog button,.kbl-v22-portal button{min-height:42px}.kbl-material-view .viewer{height:clamp(380px,65vh,540px);max-width:720px}.kbl-material-view .kbl-image-preview{max-width:720px}.kbl-buy-modern .kbl-buy-full{box-shadow:0 8px 22px #6255bd22}.kbl-buy-modern .kbl-buy-button:focus-visible{outline:3px solid #243d8c;outline-offset:3px}
@media(max-width:650px){.kbl-v24-intro{flex-direction:column;align-items:stretch;padding:16px;gap:12px}.kbl-v24-intro strong{font-size:17px}.kbl-v24-intro a{width:100%}#kbl-search{font-size:16px;min-height:48px}.kbl-material-view .viewer{height: min(62vh,440px);min-height:300px;border-radius:10px}.kbl-buy-prices{grid-template-columns:1fr}.kbl-buy-prices>div{padding:17px 12px}.kbl-v2-tile .item{min-height:0}}


/* v2.5 — visual refresh only; no changes to Drive or document logic */
:root{--kbl-ink:#303b64;--kbl-purple:#6952c8;--kbl-border:#e7e4f5}
body{background:linear-gradient(180deg,#f5f8ff 0%,#fff9f2 55%,#f7f9ff 100%);color:var(--kbl-ink)}
.wrap{max-width:1180px}
.kbl-v2-hero{border-radius:28px!important;border:1px solid #f3e1bd;box-shadow:0 18px 45px #7963ad19;isolation:isolate}
.kbl-v2-hero-copy{padding:clamp(24px,4vw,50px)}
.kbl-v2-hero-copy h1{letter-spacing:-.035em;line-height:1.08;text-wrap:balance;text-shadow:0 2px 0 #ffffff88}
.kbl-v2-hero-copy p:last-child{max-width:40ch}
.kbl-hero-eyebrow{display:inline-block;align-self:flex-start;background:#ffffffb8;border:1px solid #f2d9b6;border-radius:99px;padding:8px 13px!important;font-weight:800;letter-spacing:.01em}
.kbl-v25-intro{border-radius:23px;box-shadow:0 8px 24px #546ca20d;border-color:#e8dffa}
.kbl-v25-intro a{box-shadow:0 7px 18px #6152b13b;transition:transform .18s,box-shadow .18s}
.kbl-v25-intro a:hover{transform:translateY(-2px);box-shadow:0 10px 22px #6152b14a}
.kbl-v22-portal,.kbl-v22-collections,.kbl-v25-catalog{border-radius:26px;border-color:var(--kbl-border);box-shadow:0 10px 30px #49558c10}
.kbl-v22-portal h2,.kbl-v22-collections h2,.kbl-v24-catalog-heading h2{letter-spacing:-.02em}
.kbl-v25-portal .kbl-v22-portal-grid button{border:2px solid #ffffffc9;box-shadow:inset 0 1px 0 #fff,0 5px 13px #6677a211;transition:transform .2s,box-shadow .2s,border-color .2s}
.kbl-v25-portal .kbl-v22-portal-grid button:hover{border-color:#b6a9ff;transform:translateY(-4px);box-shadow:0 12px 24px #6959bd26}
.kbl-v25-portal .kbl-v22-portal-grid button:focus-visible,.kbl-v22-collection-grid button:focus-visible,.kbl-v22-tip button:focus-visible{outline:3px solid #6552b9;outline-offset:3px}
.kbl-v22-tip{box-shadow:0 9px 24px #d8a87c16}
.kbl-v25-catalog{padding:clamp(16px,3vw,32px)}
.kbl-v24-catalog-heading{border-bottom:1px solid #ece9f8;padding-bottom:12px;margin-bottom:16px}
#kbl-search{max-width:none;border-radius:17px;background:#fbfcff;box-shadow:0 4px 12px #4c69a10b;transition:border-color .2s,box-shadow .2s}
#kbl-search:focus{border-color:#8e78df;box-shadow:0 0 0 5px #8e78df18}
.kbl-v2-chip{transition:background .16s,transform .16s}
.kbl-v2-chip:hover{transform:translateY(-1px);background:#eee8ff}
.kbl-v2-chip.active:hover{background:#6651d2}
.kbl-v25-grid{gap:clamp(12px,2vw,22px)}
.kbl-v25-grid .kbl-v2-tile{border-radius:20px;transition:transform .18s,filter .18s}
.kbl-v25-grid .kbl-v2-tile:hover{transform:translateY(-4px)}
.kbl-v25-grid .item{border-radius:20px;border:1px solid #e9e8f5;background:#fff;box-shadow:0 6px 18px #354f8310;transition:box-shadow .2s,border-color .2s}
.kbl-v25-grid .item:hover{border-color:#d6c9ff;box-shadow:0 14px 26px #354f8321}
.kbl-v25-grid .item .cover{background:linear-gradient(135deg,#fff7e8,#eef5ff);border-radius:14px;overflow:hidden}
.kbl-v25-grid .item strong{color:#34406e;letter-spacing:-.01em}
.kbl-v25-grid .kbl-v22-zoom{background:#f1efff;border-color:#e0dafb;color:#5946ad;min-height:42px}
.kbl-v25-grid .kbl-v22-zoom:hover{background:#e6e0ff}
.kbl-material-page .panel{box-shadow:0 10px 28px #344f8014;border:1px solid #e7e7f4}
.kbl-material-view .viewer{border:1px solid #e2e5f1;box-shadow:0 12px 30px #293e7019;background:#f5f6fb}
.kbl-buy-modern{border-radius:24px!important;box-shadow:0 12px 35px #5d6da51a!important}
.kbl-buy-prices>div{transition:transform .2s,box-shadow .2s}
.kbl-buy-prices>div:hover{transform:translateY(-2px);box-shadow:0 9px 22px #4f56a21c}
.kbl-buy-button{min-height:56px}
.kbl-v2-telegram{box-shadow:0 10px 28px #2076ac45}
@media(max-width:768px){
 .kbl-v2-hero{border-radius:21px!important}
 .kbl-v2-hero-copy{padding:24px 19px 14px}
 .kbl-v2-hero-copy h1{font-size:clamp(29px,7.8vw,39px)}
 .kbl-hero-eyebrow{font-size:11px!important;line-height:1.35}
 .kbl-v22-portal,.kbl-v22-collections,.kbl-v25-catalog{border-radius:20px}
 .kbl-v25-grid .item{border-radius:15px}
 .kbl-v25-grid .kbl-v2-tile:hover{transform:none}
 .kbl-v25-grid .item:hover{box-shadow:0 6px 18px #354f8310}
 .kbl-v25-grid .item .cover{border-radius:11px}
 .kbl-v25-grid .kbl-v22-zoom{min-height:44px}
 .kbl-v2-telegram{bottom:16px;right:16px;min-width:48px;min-height:48px;justify-content:center}
}
@media(max-width:380px){.kbl-v25-grid{gap:9px}.kbl-v25-catalog{padding:12px 9px}.kbl-v25-portal .kbl-v22-portal-grid button{padding:12px 5px}}
@media(prefers-reduced-motion:reduce){.kbl-v25-grid .kbl-v2-tile,.kbl-v25-grid .item,.kbl-v25-intro a{transition:none}}

/* v2.6: clickable purchase cards and messenger selection */
.kbl-buy-prices .kbl-price-choice{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:5px;width:100%;font:inherit;cursor:pointer;appearance:none;border:2px solid transparent;border-radius:20px;padding:20px;min-height:165px;color:inherit}
.kbl-buy-prices .kbl-price-choice:focus-visible{outline:3px solid #6954d8;outline-offset:3px}
.kbl-buy-prices .kbl-price-choice em{font-style:normal;font-weight:750;margin-top:auto;text-decoration:underline;text-underline-offset:3px}
.kbl-price-dialog{position:fixed;inset:0;margin:auto;width:min(440px,calc(100vw - 28px));max-height:calc(100dvh - 30px);overflow:auto;padding:0;border:0;border-radius:22px;background:#fff;color:#293454;box-shadow:0 25px 85px #1a225755;z-index:99999}
.kbl-price-dialog::backdrop{background:#141c3a99;backdrop-filter:blur(3px)}
.kbl-price-dialog-inner{padding:32px 25px 25px;text-align:center}
.kbl-price-dialog-icon{font-size:34px;display:block;margin-bottom:8px}
.kbl-price-dialog h2{font-size:clamp(21px,5vw,27px);line-height:1.25;margin:0 0 10px}
.kbl-price-dialog p{margin:0 0 20px}
.kbl-price-messengers{display:grid;gap:11px}
.kbl-price-messengers a{display:flex;align-items:center;justify-content:center;text-align:center;text-decoration:none;min-height:54px}
.kbl-price-dialog .kbl-price-hint{font-size:12px;line-height:1.5;color:#6b7084;margin:16px 0 0}
.kbl-price-close{position:absolute;right:12px;top:9px;border:0;background:#f1f2f8;color:#303c61;border-radius:50%;font-size:27px;line-height:1;width:38px;height:38px;cursor:pointer}
@media(max-width:600px){.kbl-buy-prices .kbl-price-choice{min-height:140px;padding:17px}.kbl-price-dialog-inner{padding:32px 17px 20px}}

/* 2.6.1: cover Google Drive embedded viewer open-in-new-window control. Google controls are cross-origin. */
.kbl-drive-preview-wrap{position:relative;width:100%;max-width:720px;margin:18px auto}.kbl-drive-preview-wrap .viewer{margin:0 auto}.kbl-drive-open-mask{position:absolute;z-index:2;right:3px;top:3px;width:57px;height:55px;background:#303030;pointer-events:auto;border-radius:0 10px 0 0}.kbl-drive-preview-wrap:has(.viewer) .kbl-drive-open-mask{display:block}@media(max-width:650px){.kbl-drive-preview-wrap{margin:12px auto}.kbl-drive-open-mask{width:53px;height:52px}}
