/* Lettore riutilizzabile per Un cielo di storie — v22 */
.cielo-story-entry{max-width:930px;margin:16px auto 50px;color:#415b54}
.cielo-back{font-size:14px;color:#52746a;border:0;background:transparent;padding:8px 2px;cursor:pointer}
.cielo-entry-heading{text-align:center;margin:12px 0 20px}
.cielo-entry-heading small{font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:#8a9389}
.cielo-entry-heading h1{font:400 clamp(31px,4.6vw,49px)/1.15 Georgia,serif;margin:9px 0;color:#3a5852}
.cielo-entry-heading p{font-size:14px;color:#81918a;margin:0}
.cielo-closed-preview{display:block;position:relative;width:min(340px,75vw);aspect-ratio:11/14;overflow:hidden;border:0;border-radius:4px 13px 13px 4px;box-shadow:9px 16px 32px rgba(37,54,57,.18),inset 9px 0 rgba(255,255,255,.25);margin:8px auto 25px;cursor:pointer;background:#b9c7c1;text-align:left}
.cielo-closed-preview::before{content:"";position:absolute;inset:0 auto 0 0;width:10px;background:linear-gradient(90deg,rgba(39,55,58,.27),rgba(255,255,255,.17));z-index:2}
.cielo-closed-preview img{width:100%;height:100%;object-fit:cover;display:block}
.cielo-cover-shade{position:absolute;inset:0;background:linear-gradient(90deg,rgba(31,47,55,.54) 0%,rgba(31,47,55,.24) 56%,transparent 100%)}
.cielo-cover-lettering{position:absolute;top:11%;left:9%;max-width:80%;color:#fff9ec;text-shadow:0 1px 7px rgba(37,53,57,.3)}
.cielo-cover-lettering .series{font-size:clamp(10px,1.4vw,13px);text-transform:uppercase;letter-spacing:.13em;font-weight:600}
.cielo-cover-lettering h2{font:400 clamp(29px,4.1vw,45px)/1.09 Georgia,serif;margin:18px 0 12px;color:inherit}
.cielo-cover-lettering .subtitle{font:italic clamp(14px,1.7vw,17px)/1.4 Georgia,serif}
.cielo-cover-copy{position:absolute;bottom:5%;left:9%;font-size:11px;color:#fffae9;letter-spacing:.02em;text-shadow:0 1px 7px rgba(31,47,55,.4)}
.cielo-entry-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.cielo-entry-actions button{padding:13px 22px;border-radius:99px;border:1px solid #b7c9bf;background:#3f6259;color:#fffdf5;font-weight:700;font-size:15px;cursor:pointer}
.cielo-entry-actions button+button{color:#3e6057;background:#fffdf8}
.cielo-entry-note{font-size:12px;color:#84958c;text-align:center;margin:16px auto}
body.cielo-reader-locked{overflow:hidden!important}
.cielo-reader-overlay[hidden]{display:none!important}
.cielo-reader-overlay{position:fixed;inset:0;width:100%;height:100vh;height:100dvh;background:rgba(18,35,42,.95);z-index:2147483600;display:flex;flex-direction:column;align-items:center;overscroll-behavior:contain;color:#f5f1e5;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}
.cielo-reader-overlay :where(button,input){touch-action:manipulation}
.cielo-reader-header{display:flex;align-items:center;justify-content:space-between;width:100%;max-width:1300px;padding:10px clamp(15px,3vw,42px);flex:0 0 auto;min-height:61px;gap:12px}
.cielo-reader-header strong{font:400 clamp(16px,2vw,23px)/1.2 Georgia,serif;color:#fff8ec}
.cielo-reader-header span{display:block;font-size:11px;color:#c0c9c4;margin-top:3px}
.cielo-reader-x{display:grid;place-items:center;width:39px;height:39px;flex:0 0 39px;border:1px solid rgba(255,255,255,.34);border-radius:50%;background:rgba(255,255,255,.12);color:#fff;font-size:24px;font-weight:400;cursor:pointer}
.cielo-reader-workspace{flex:1 1 auto;min-height:0;min-width:0;width:100%;display:flex;align-items:center;justify-content:center;gap:clamp(5px,1.4vw,18px);padding:6px 12px}
.cielo-nav-arrow{border-radius:50%;display:grid;place-items:center;width:clamp(31px,3.6vw,45px);height:clamp(31px,3.6vw,45px);flex:0 0 auto;background:#f7f0df;color:#4a6860;border:1px solid #d8d6c9;box-shadow:0 3px 12px #101f2939;font-size:clamp(20px,2.4vw,30px);cursor:pointer;transition:background .2s}
.cielo-nav-arrow:disabled{opacity:.23;cursor:default}
.cielo-nav-arrow:not(:disabled):hover{background:white}
.cielo-book-shell{position:relative;min-width:0;display:flex;align-items:center;justify-content:center;max-width:100%;height:100%}
.cielo-cover-only{height:100%;max-height:min(75vh,760px);max-width:min(520px,68vw);aspect-ratio:11/14;overflow:hidden;border-radius:5px 16px 16px 5px;box-shadow:14px 18px 34px #05141bc2, inset 12px 0 rgba(255,255,255,.3);position:relative;background:#a6bab6;cursor:pointer}
.cielo-cover-only img{width:100%;height:100%;object-fit:cover;display:block}
.cielo-cover-only::before{content:"";position:absolute;inset:0 auto 0 0;width:13px;background:linear-gradient(90deg,#192b305e,#ffffff1f);z-index:2}
.cielo-cover-only .cielo-cover-lettering{top:10%;left:8%}
.cielo-cover-only .cielo-cover-lettering h2{font-size:clamp(31px,3.8vw,50px)}
.cielo-book-spread{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);height:100%;max-height:750px;aspect-ratio:1.58;max-width:min(1100px,calc(100vw - 124px));border-radius:11px;overflow:hidden;background:#fff9eb;box-shadow:0 16px 40px rgba(0,0,0,.45);position:relative;perspective:1400px}
.cielo-book-spread::after{content:"";position:absolute;top:0;bottom:0;left:50%;width:13px;transform:translateX(-50%);background:linear-gradient(90deg,#222e302b,transparent 35%,#222e3025);pointer-events:none;z-index:3}
.cielo-book-spread[hidden],.cielo-cover-only[hidden]{display:none!important}
.cielo-book-page{min-width:0;min-height:0;overflow:hidden;position:relative}
.cielo-book-text{background:linear-gradient(105deg,#faf5e9,#fffdf6);padding:clamp(17px,2.7vw,43px) clamp(18px,2.8vw,46px) clamp(14px,2vw,25px);display:flex;flex-direction:column;color:#43554f}
.cielo-book-text-content{flex:1 1 auto;min-height:0;overflow:hidden;font-family:Georgia,'Times New Roman',serif;font-size:var(--cielo-font,20px);line-height:var(--cielo-leading,1.52);overflow-wrap:break-word;hyphens:auto}
.cielo-book-text-content p{font-size:inherit;line-height:inherit;margin:0;white-space:normal}
.cielo-page-kicker{display:block;font:600 10px/1.3 'Segoe UI',Arial,sans-serif;letter-spacing:.1em;text-transform:uppercase;color:#ad9d88;margin-bottom:11px}
.cielo-page-footer{border-top:1px solid #d9d3c3;padding-top:8px;color:#a18f77;font:11px/1.2 'Segoe UI',Arial,sans-serif;display:flex;justify-content:space-between;gap:5px;margin-top:12px}
.cielo-book-image{background:#d7ddd4;display:flex;align-items:center;justify-content:center}
.cielo-book-image img{width:100%;height:100%;object-fit:cover;display:block}
.cielo-turn-forward .cielo-book-image,.cielo-turn-forward .cielo-book-text{animation:cielo-turn-forward .46s ease both}
.cielo-turn-backward .cielo-book-image,.cielo-turn-backward .cielo-book-text{animation:cielo-turn-backward .46s ease both}
@keyframes cielo-turn-forward{from{opacity:.68;transform:perspective(900px) rotateY(-8deg)}to{opacity:1;transform:perspective(900px) rotateY(0)}}
@keyframes cielo-turn-backward{from{opacity:.68;transform:perspective(900px) rotateY(8deg)}to{opacity:1;transform:perspective(900px) rotateY(0)}}
.cielo-reader-footer{flex:0 0 auto;padding:6px 17px 13px;width:100%;max-width:960px;text-align:center;min-height:55px;color:#e2e9e4}
.cielo-reader-footer .cielo-counter{font-size:12px;letter-spacing:.03em}
.cielo-reader-footer audio{width:min(600px,93%);height:37px;display:block;margin:5px auto 0;filter:brightness(.95)}
.cielo-reader-footer .cielo-sync{font-size:10px;color:#bfcbc5;margin-top:4px}
.cielo-reader-tip[hidden],.cielo-single-toggle[hidden]{display:none!important}
.cielo-reader-tip{position:absolute;z-index:5;inset:0;background:#182e35ed;display:flex;align-items:center;justify-content:center;padding:18px}
.cielo-tip-card{width:min(400px,90vw);border:1px solid #a5b9ac77;background:#f8f4ea;color:#365950;padding:25px;border-radius:19px;text-align:center;box-shadow:0 20px 70px #0007}
.cielo-tip-card .symbol{font-size:31px;margin:0 0 9px}.cielo-tip-card h3{font:400 25px/1.22 Georgia,serif;margin:0 0 9px}.cielo-tip-card p{font-size:14px;line-height:1.55;margin:0 0 18px;color:#64766e}
.cielo-tip-card button,.cielo-single-toggle button{border:1px solid #b7c8ba;border-radius:30px;padding:10px 14px;font-size:13px;font-weight:600;color:#395c51;background:#fffaf2;cursor:pointer}
.cielo-tip-card button.primary{background:#3e6157;color:white;border-color:#3e6157}
.cielo-tip-card .buttons{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.cielo-single-toggle{display:flex;gap:7px;justify-content:center;padding:5px 0 2px}
.cielo-single-toggle button{padding:6px 12px;font-size:12px}
.cielo-single-toggle button[aria-pressed=true]{background:#f6edda;border-color:#e9d8b9}
@media(max-width:760px){
 .cielo-reader-header{min-height:49px;padding:5px 11px}
 .cielo-reader-header strong{font-size:16px}
 .cielo-reader-x{width:34px;height:34px;flex-basis:34px;font-size:22px}
 .cielo-reader-workspace{gap:5px;padding:4px 6px}
 .cielo-nav-arrow{width:31px;height:31px;font-size:20px}
 .cielo-book-spread{max-width:calc(100vw - 79px)}
 .cielo-book-text{padding:15px 15px 11px}
 .cielo-book-text-content{font-size:var(--cielo-font,15px);line-height:var(--cielo-leading,1.42)}
 .cielo-page-kicker{font-size:8px;letter-spacing:.02em;margin-bottom:6px}
 .cielo-page-footer{font-size:9px;padding-top:5px;margin-top:7px}
 .cielo-reader-footer{min-height:48px;padding:4px 8px 5px}
 .cielo-reader-footer audio{height:33px}
 .cielo-reader-footer .cielo-sync{display:none}
}
@media(max-height:460px) and (orientation:landscape){
 .cielo-reader-header{min-height:35px;padding:3px 13px}
 .cielo-reader-header strong{font-size:14px}
 .cielo-reader-header span{display:none}
 .cielo-reader-x{width:31px;height:31px;flex-basis:31px}
 .cielo-reader-footer{padding:3px 8px;min-height:35px}
 .cielo-reader-footer .cielo-counter{font-size:10px}
 .cielo-reader-footer audio{height:27px}
 .cielo-reader-workspace{padding:1px 7px}
 .cielo-page-kicker{margin-bottom:4px}
 .cielo-book-text{padding:9px 12px 7px}
 .cielo-page-footer{margin-top:4px;padding-top:4px}
 .cielo-book-text-content{font-size:var(--cielo-font,13px);line-height:var(--cielo-leading,1.35)}
}
@media(max-width:700px) and (orientation:portrait){
 .cielo-reader-workspace{padding:4px 4px}
 .cielo-reader-header{padding:7px 12px}
 .cielo-book-shell{flex:1 1 auto;min-height:0}
 .cielo-cover-only{height:auto;max-height:85%;width:min(76vw,360px);max-width:100%;aspect-ratio:11/14}
 .cielo-book-spread{height:min(79vh,740px);max-height:100%;width:min(78vw,450px);max-width:100%;aspect-ratio:auto;display:block}
 .cielo-book-spread::after{display:none}
 .cielo-book-page{width:100%;height:100%}
 .cielo-book-image{display:none}
 .cielo-book-spread.show-art .cielo-book-image{display:block}
 .cielo-book-spread.show-art .cielo-book-text{display:none}
 .cielo-book-text{padding:25px 23px 21px}
 .cielo-book-text-content{font-size:var(--cielo-font,20px);line-height:var(--cielo-leading,1.55)}
 .cielo-reader-footer audio{width:min(490px,94%)}
}
@media(prefers-reduced-motion:reduce){.cielo-turn-forward .cielo-book-image,.cielo-turn-forward .cielo-book-text,.cielo-turn-backward .cielo-book-image,.cielo-turn-backward .cielo-book-text{animation:none}}

/* v29 – lettore quasi a tutto schermo, mantenendo proporzioni e testo leggibile */
.cielo-reader-overlay{background:#1b3035f5}
.cielo-reader-header{max-width:none;min-height:44px;padding:4px clamp(9px,1.7vw,24px)}
.cielo-reader-header strong{font-size:clamp(15px,1.55vw,21px)}
.cielo-reader-header span{font-size:10px;margin-top:1px}
.cielo-reader-x{width:35px;height:35px;flex-basis:35px}
.cielo-reader-workspace{gap:clamp(2px,.6vw,9px);padding:1px clamp(3px,.65vw,10px)}
.cielo-book-shell{flex:1 1 auto;width:100%;height:100%;min-width:0}
.cielo-book-spread{width:100%;height:100%;max-height:none;max-width:none;aspect-ratio:auto}
.cielo-cover-only{height:100%;width:auto;max-height:100%;max-width:min(650px,85vw);aspect-ratio:11/14}
.cielo-reader-footer{max-width:none;min-height:38px;padding:2px 8px 5px}
.cielo-reader-footer audio{height:34px;width:min(650px,94%)}
.cielo-reader-footer .cielo-sync{display:none}
.cielo-nav-arrow{width:clamp(30px,3vw,40px);height:clamp(30px,3vw,40px);font-size:clamp(20px,2vw,27px)}
.cielo-book-text{padding:clamp(12px,2.4vw,37px) clamp(13px,2.5vw,39px) clamp(10px,1.8vw,24px)}
.cielo-orientation-choices[hidden],.cielo-orientation-wait[hidden]{display:none!important}
.cielo-tip-card{width:min(470px,94vw);padding:clamp(16px,3vw,29px)}
.cielo-layout-choices{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}
.cielo-tip-card .cielo-layout-choices button{border:1px solid #cad6cb;background:#fffdf8;border-radius:15px;padding:16px 10px 14px;display:flex;flex-direction:column;align-items:center;gap:7px;box-shadow:0 2px 8px #1f3c3712;min-height:132px}
.cielo-layout-choices button .orientation-symbol{font:normal 51px/1 Georgia,serif;color:#54776c;display:block}
.cielo-layout-choices button .orientation-symbol.landscape{transform:translateY(-3px)}
.cielo-layout-choices button strong{font:600 16px/1.2 'Segoe UI',sans-serif}
.cielo-layout-choices button small{font-size:12px;line-height:1.35;color:#73837b}
.cielo-tip-card .buttons button:disabled{opacity:.4;cursor:not-allowed}
@media(max-width:760px){
 .cielo-reader-header{min-height:39px;padding:3px 8px}
 .cielo-reader-header strong{font-size:14px}
 .cielo-reader-header span{font-size:9px}
 .cielo-reader-x{width:30px;height:30px;flex-basis:30px}
 .cielo-reader-footer{min-height:31px;padding:1px 4px 3px}
 .cielo-reader-footer audio{height:32px;width:96%}
 .cielo-reader-workspace{gap:2px;padding:1px 2px}
 .cielo-nav-arrow{width:27px;height:27px;font-size:20px}
 .cielo-book-spread{max-width:none;width:100%;height:100%}
 .cielo-page-kicker{font-size:9px}
 .cielo-book-text{padding:10px 12px 9px}
 .cielo-reader-footer .cielo-counter{font-size:11px}
}
@media(max-height:460px) and (orientation:landscape){
 .cielo-reader-header{min-height:30px;padding:1px 10px}
 .cielo-reader-x{width:27px;height:27px;flex-basis:27px}
 .cielo-reader-footer{min-height:25px;padding:1px 4px}
 .cielo-reader-footer audio{height:27px}
 .cielo-reader-workspace{gap:2px;padding:1px 3px}
 .cielo-book-text{padding:8px 12px 6px}
 .cielo-nav-arrow{width:27px;height:27px}
}
@media(max-width:700px) and (orientation:portrait){
 .cielo-reader-workspace{padding:2px 1px;gap:1px}
 .cielo-nav-arrow{width:24px;height:30px;font-size:21px;border:0;background:transparent;color:#f8efde;box-shadow:none}
 .cielo-book-shell{height:100%;flex:1 1 auto;min-height:0;min-width:0}
 .cielo-cover-only{height:auto;max-height:100%;width:min(87vw,520px);max-width:100%;aspect-ratio:11/14}
 .cielo-book-spread{height:100%;width:100%;max-width:100%;max-height:100%;aspect-ratio:auto;display:block}
 .cielo-book-text{padding:clamp(14px,3vw,26px) clamp(14px,4vw,26px)}
 .cielo-book-text-content{font-size:var(--cielo-font,20px);line-height:var(--cielo-leading,1.52)}
 .cielo-reader-header{min-height:42px}
 .cielo-reader-footer{min-height:43px;padding:3px 4px}
 .cielo-reader-footer audio{height:33px}
}
/* Opzione verticale anche se il telefono è stato messo orizzontale */
.cielo-reader-overlay.cielo-force-single .cielo-book-spread{display:block;width:min(100%,600px);height:100%;aspect-ratio:auto;max-width:100%}
.cielo-reader-overlay.cielo-force-single .cielo-book-spread::after{display:none}
.cielo-reader-overlay.cielo-force-single .cielo-book-page{width:100%;height:100%}
.cielo-reader-overlay.cielo-force-single .cielo-book-image{display:none}
.cielo-reader-overlay.cielo-force-single .cielo-book-spread.show-art .cielo-book-image{display:block}
.cielo-reader-overlay.cielo-force-single .cielo-book-spread.show-art .cielo-book-text{display:none}
.cielo-reader-overlay.cielo-force-single .cielo-book-text-content{font-size:var(--cielo-font,20px);line-height:var(--cielo-leading,1.52)}

/* v30: Bluetooth / schermo TV, guida integrata senza promesse di collegamento automatico */
.cielo-reader-header-actions{display:flex;gap:7px;align-items:center;flex:0 0 auto}
.cielo-output-help-button{display:flex;align-items:center;justify-content:center;gap:5px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.08);color:#f5f0e7;border-radius:999px;padding:7px 10px;font-size:11px;font-weight:650;cursor:pointer;min-height:35px;white-space:nowrap}
.cielo-output-help-button:hover,.cielo-output-help-button:focus-visible{background:rgba(255,255,255,.2)}
.cielo-output-help-button svg{flex:0 0 auto}
.cielo-connection-help[hidden]{display:none!important}
.cielo-connection-help{position:absolute;z-index:9;inset:0;background:rgba(21,40,46,.91);display:flex;align-items:center;justify-content:center;padding:20px;overflow-y:auto}
.cielo-connection-card{position:relative;width:min(510px,96vw);max-height:calc(100dvh - 35px);overflow:auto;background:#fcf8ef;color:#374e49;border:1px solid #ddd6c8;box-shadow:0 24px 65px #09191c88;border-radius:17px;padding:25px 25px 20px}
.cielo-connection-close{position:absolute;right:11px;top:9px;background:transparent;border:0;color:#547368;font-size:29px;line-height:1;cursor:pointer;padding:6px}
.cielo-connection-eyebrow{font-size:10px;letter-spacing:.16em;color:#8c9d91;text-transform:uppercase;font-weight:700}
.cielo-connection-card h3{font:normal clamp(23px,3vw,31px)/1.15 Georgia,serif;margin:12px 40px 13px 0;color:#325449}
.cielo-connection-card p{font-size:14px;line-height:1.5;margin:9px 0}
.cielo-connection-card ol{margin:14px 0 16px;padding-left:23px}
.cielo-connection-card li{font-size:14px;line-height:1.5;margin:8px 0}
.cielo-connection-card .cielo-connection-note{font-size:12px;color:#6e8276;background:#eef0e8;border-radius:9px;padding:11px;margin:13px 0}
.cielo-connection-done{display:block;margin:15px auto 0;background:#3e6157;border:0;color:white;border-radius:25px;padding:10px 19px;font-size:13px;font-weight:700;cursor:pointer}
@media(max-width:700px){.cielo-reader-header-actions{gap:4px}.cielo-output-help-button{padding:6px;min-height:31px;min-width:32px;border-radius:50%}.cielo-output-help-button span{display:none}.cielo-connection-card{padding:20px 19px 16px}.cielo-connection-card li{margin:5px 0}.cielo-connection-card h3{font-size:24px}}
@media(max-height:420px) and (orientation:landscape){.cielo-output-help-button{min-height:27px;padding:3px 8px}.cielo-connection-card{max-height:calc(100dvh - 15px);padding:12px 17px}.cielo-connection-card h3{font-size:19px;margin:5px 28px 4px 0}.cielo-connection-card p,.cielo-connection-card li{font-size:11.5px;line-height:1.3;margin:3px 0}.cielo-connection-card ol{margin:6px 0}.cielo-connection-card .cielo-connection-note{font-size:11px;padding:6px;margin:6px 0}}

/* v31: Suggerimento Smart View non modale; la TV non può essere accesa/collegata dalla pagina web */
.cielo-tv-hint[hidden]{display:none!important}
.cielo-tv-hint{position:absolute;z-index:9;top:clamp(48px,9vh,68px);right:clamp(12px,3vw,32px);max-width:min(400px,calc(100vw - 28px));border:1px solid rgba(255,255,255,.4);border-radius:14px;box-shadow:0 8px 30px rgba(10,35,32,.3);padding:12px 39px 12px 14px;background:#fbf7ed;color:#31564e;font-size:13px;line-height:1.4;text-align:left}
.cielo-tv-hint-close{position:absolute;right:5px;top:3px;border:0;background:transparent;font-size:23px;color:#55736c;min-width:28px;min-height:28px;cursor:pointer}
@media(max-width:700px){.cielo-tv-hint{top:46px;right:6px;left:6px;max-width:none;font-size:12px;padding:10px 34px 10px 12px}}
