/* Kokani Connect book reader (0.37.0). Stand-alone page: no theme styles here. */
*{box-sizing:border-box}
html,body{margin:0}
body.kcr{background:#2A2A2F;color:#EFEDE8;font:15px/1.5 Archivo,"Helvetica Neue",Arial,sans-serif;display:grid;grid-template-rows:auto 1fr auto;min-height:100vh;min-height:100dvh;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
button{font:inherit}
:focus-visible{outline:2px solid #FF5A52;outline-offset:2px}
.kcr-top{position:sticky;top:0;z-index:5;background:#121214;display:flex;align-items:center;gap:10px;padding:10px 16px;padding-top:calc(10px + env(safe-area-inset-top))}
.kcr-title{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:15px}
.kcr-tag{background:#DCEFEC;color:#0F6B63;font-weight:700;font-size:12px;padding:3px 8px;white-space:nowrap}
.kcr-ic{background:none;border:1px solid #3A3A40;color:#EFEDE8;padding:7px 10px;font-weight:600;font-size:13px;white-space:nowrap;text-decoration:none;cursor:pointer;line-height:1.2}
.kcr-ic:hover{border-color:#77757A}
.kcr-stage{display:flex;justify-content:center;align-items:flex-start;padding:20px 14px;min-width:0;overflow-x:hidden}
.kcr-page{position:relative;width:100%;max-width:760px;min-height:60vh;background:#FFFEFA;box-shadow:0 18px 40px -16px rgba(0,0,0,.7)}
.kcr-page img{display:block;width:100%;height:auto;pointer-events:none;-webkit-user-drag:none}
.kcr-page.kcr-on{min-height:0}
/* "Fit page": the whole page on screen (reading width otherwise, with scrolling) */
body.kcr-fit .kcr-page.kcr-on{width:auto}
body.kcr-fit .kcr-page img{width:auto;max-width:100%;max-height:calc(100vh - 150px);max-height:calc(100dvh - 150px)}
.kcr-ic[aria-pressed="true"]{background:#EFEDE8;color:#121214;border-color:#EFEDE8}
.kcr-shield{position:absolute;inset:0;z-index:2;cursor:pointer;-webkit-touch-callout:none}
.kcr-msg{position:absolute;inset:0;z-index:3;display:flex;align-items:flex-start;justify-content:center;padding:12% 18px;background:#FFFEFA}
.kcr-card{background:#fff;border:1px solid #E6DFD2;color:#1A1A1C;padding:20px;display:grid;gap:12px;max-width:440px;width:100%;box-shadow:0 10px 30px -14px rgba(0,0,0,.4)}
.kcr-card b{font-size:18px}
.kcr-card span{font-size:14.5px;color:#4A4844}
.kcr-warn{background:#FFF6E5;border-color:#F0DDAE}
.kcr-warn span,.kcr-warn b{color:#6B4E00}
.kcr-small{font-size:13px!important;color:#6B6862}
.kcr-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:11px 16px;font-weight:700;font-size:14px;border:1px solid #3A3A40;background:transparent;color:#fff;cursor:pointer;text-decoration:none;min-height:44px}
.kcr-btn:disabled{opacity:.35;cursor:default}
.kcr-card .kcr-btn{color:#1A1A1C;border-color:#1A1A1C}
.kcr-card .kcr-pri,.kcr-pri{background:#D6151D;border-color:#D6151D;color:#fff}
.kcr-pri:hover{background:#B3120F}
.kcr-link{color:#C2131A;font-weight:600;font-size:14px}
.kcr-spin{position:absolute;left:50%;top:80px;width:34px;height:34px;margin-left:-17px;border:3px solid #E6DFD2;border-top-color:#D6151D;border-radius:50%;animation:kcr-s .8s linear infinite;z-index:4}
@keyframes kcr-s{to{transform:rotate(360deg)}}
.kcr-nav{position:sticky;bottom:0;z-index:5;background:#121214;color:#C9C6C0;display:flex;align-items:center;gap:12px;padding:10px 16px;padding-bottom:calc(10px + env(safe-area-inset-bottom));font-size:13px}
.kcr-num{white-space:nowrap;font-variant-numeric:tabular-nums}
.kcr-prog{flex:1;height:6px;background:#3A3A40;min-width:40px}
.kcr-prog span{display:block;height:100%;width:0;background:#D6151D;transition:width .2s}
.kcr-toc{position:fixed;left:0;top:0;bottom:0;width:min(86vw,330px);background:#fff;color:#1A1A1C;z-index:10;box-shadow:12px 0 30px -12px rgba(0,0,0,.6);padding:16px;overflow-y:auto;display:grid;align-content:start;gap:0}
.kcr-toc h2{margin:0 0 8px;font-size:17px}
.kcr-toc button{display:flex;justify-content:space-between;gap:10px;text-align:left;padding:11px 6px;font-size:14.5px;border:0;border-bottom:1px solid #E6DFD2;background:none;color:#1A1A1C;cursor:pointer}
.kcr-toc button span{color:#6B6862;font-size:13px}
.kcr-toc button.on{font-weight:700;color:#C2131A}
.kcr-toast{position:fixed;left:50%;bottom:72px;transform:translateX(-50%);background:#121214;color:#fff;padding:10px 14px;font-size:13.5px;z-index:9;box-shadow:0 8px 24px rgba(0,0,0,.4);max-width:90vw}
[hidden]{display:none!important}
@media (max-width:600px){
  .kcr-stage{padding:10px 6px}
  .kcr-top{padding:8px 10px;gap:8px}
  .kcr-wide,.kcr-ic span,.kcr-btn span,#kcr-fit{display:none}
  .kcr-nav{padding:8px 10px}
}
@media print{body *{display:none!important}body::after{content:"Printing is not available for this book.";display:block;font:16px Arial;color:#000;padding:40px}}
