
/* KitaDocument v1.2.7 - deliberately scoped to avoid Elementor/theme button overrides. */
.kd-library{--kd-primary:#0067AC;--kd-hover:#00A4E4;--kd-secondary:#FFC733;width:100%}
.kd-grid{display:grid;grid-template-columns:repeat(var(--kd-columns,3),minmax(0,1fr));gap:24px}
.kd-card{display:flex;flex-direction:column;align-items:center;min-width:0;gap:16px;text-align:center}
.kd-card .kd-cover{display:block;width:100%;aspect-ratio:3/4;border:0!important;padding:0!important;background:#f5f6f7!important;overflow:hidden;border-radius:9px;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.09)}
.kd-card .kd-cover-img{display:block;width:100%;height:100%;object-fit:contain;transition:transform .2s}
.kd-card .kd-cover:hover .kd-cover-img{transform:scale(1.018)}
.kd-no-cover{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#0067AC;gap:12px;font-size:22px;font-weight:700}
.kd-title{font-size:18px;line-height:1.4;margin:0!important;font-weight:600;text-align:center;width:100%}
.kd-card .kd-title-button,.kd-card .kd-title-button:hover,.kd-card .kd-title-button:focus{font:inherit!important;line-height:inherit!important;border:0!important;box-shadow:none!important;background:transparent!important;background-color:transparent!important;background-image:none!important;text-shadow:none!important;padding:0!important;margin:0!important;text-align:center!important;cursor:pointer;border-radius:0!important;text-decoration:none!important;min-height:0!important;white-space:normal!important}
.kd-card .kd-title-button{color:inherit!important;font-weight:600!important}
.kd-card .kd-title-button:hover,.kd-card .kd-title-button:focus-visible{color:#0067AC!important;font-weight:800!important}
.kd-card-actions{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:10px;width:100%;margin-top:auto}
.kd-library .kd-button,.kd-library .kd-download-button,.kd-button{display:inline-flex;align-items:center;justify-content:center;align-self:auto;min-height:42px;gap:8px;padding:10px 16px!important;border-radius:6px;font-size:14px;font-weight:650;line-height:1.35;cursor:pointer;text-align:center;text-decoration:none!important;transition:background .2s,color .2s,border-color .2s;box-shadow:none!important}
.kd-library .kd-button,.kd-button{background:#0067AC!important;border:1px solid #0067AC!important;color:#fff!important}
.kd-library .kd-button:hover,.kd-library .kd-button:focus-visible,.kd-button:hover,.kd-button:focus-visible{background:#00A4E4!important;border-color:#00A4E4!important;color:#fff!important}
.kd-library .kd-download-button{background:transparent!important;border:1px solid #C9A32D!important;color:#C9A32D!important}
.kd-library .kd-download-button:hover,.kd-library .kd-download-button:focus-visible{background:#FFC733!important;border-color:#FFC733!important;color:#000!important}
.kd-pagination{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:28px}
.kd-pagination a,.kd-pagination span{padding:7px 12px;border:1px solid #d4dce5;border-radius:5px;text-decoration:none}
.kd-pagination .current{background:#0067AC;color:#fff;border-color:#0067AC}
.kd-empty{grid-column:1/-1}
.kd-modal{position:fixed;inset:0;z-index:999999;display:none;color:#202b37;font-family:inherit}
.kd-modal.kd-open{display:flex;align-items:center;justify-content:center;padding:clamp(16px,4vh,42px) clamp(12px,4vw,48px);box-sizing:border-box}
.kd-backdrop{position:absolute;inset:0;background:rgba(12,20,32,.78)}
.kd-dialog{position:relative;z-index:1;width:min(var(--kd-reader-width,680px),90vw);height:min(88dvh,850px);max-width:100%;max-height:100%;background:#e6ebf0;border:1px solid rgba(255,255,255,.3);border-radius:10px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 18px 70px rgba(0,0,0,.35)}
.kd-pages{flex:1;overflow:auto;overscroll-behavior:contain;padding:15px 12px;display:flex;flex-direction:column;align-items:center;gap:14px;min-height:0}
.kd-page{background:#fff;position:relative;box-shadow:0 2px 12px rgba(0,0,0,.13);max-width:none;flex:none}
.kd-page canvas{width:100%;height:100%;display:block}
.kd-page-number{position:absolute;bottom:5px;right:9px;background:rgba(255,255,255,.88);font-size:11px;color:#666;padding:2px 5px;border-radius:3px;pointer-events:none}
.kd-toolbar{background:rgba(25,37,49,.92);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:9px 12px;gap:12px;min-height:56px;box-sizing:border-box;border-top:1px solid rgba(255,255,255,.15)}
.kd-reader-name{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1}
.kd-tools{display:flex;align-items:center;gap:5px;flex-shrink:0}
.kd-toolbar .kd-tool,.kd-toolbar .kd-tool:hover,.kd-toolbar .kd-tool:focus{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:7px!important;background:transparent!important;border:1px solid rgba(255,255,255,.50)!important;border-radius:6px;color:#fff!important;text-decoration:none!important;cursor:pointer;box-shadow:none!important;min-width:0;min-height:0;line-height:1}
.kd-toolbar .kd-tool:hover,.kd-toolbar .kd-tool:focus-visible{background:rgba(255,255,255,.20)!important}
.kd-tool svg{width:18px;height:18px;display:block;flex-shrink:0}
.kd-zoom,.kd-page-counter{font-size:11px;color:#fff;white-space:nowrap;min-width:34px;text-align:center}
.kd-page-counter{min-width:38px}
.kd-status{font-size:13px;text-align:center;color:#4a5967;padding:8px;display:none;background:#fff}
.kd-status:not(:empty){display:block}
.kd-native{border:0;width:100%;height:100%;min-height:100%;background:#fff}
body.kd-body-open{overflow:hidden!important}
.kd-auto-preview{display:block;width:100%;height:100%;overflow:hidden}
.kd-auto-preview .kd-generated-cover{width:100%;height:100%;object-fit:contain;background:#fff}
.kd-auto-preview .kd-no-cover{height:100%;font-size:14px}
.kd-file-icon{display:flex;align-items:center;justify-content:center;width:66px;height:82px;background:#fff;border:2px solid #0067AC;border-radius:5px;font-size:18px;font-weight:800}
@media(max-width:767px){
 .kd-grid{grid-template-columns:repeat(min(2,var(--kd-columns,3)),minmax(0,1fr));gap:18px}
 .kd-title{font-size:15px}
 .kd-modal.kd-open{padding:16px 12px}
 .kd-dialog{width:min(var(--kd-reader-width,680px),calc(100vw - 24px));height:calc(100dvh - 32px);max-height:860px;border-radius:8px}
 .kd-pages{padding:10px 6px;gap:10px}
 .kd-toolbar{padding:8px 7px;gap:5px;min-height:52px;flex-wrap:wrap;justify-content:center}
 .kd-reader-name{flex-basis:100%;text-align:center;max-width:100%;font-size:11px}
 .kd-tools{gap:5px;max-width:100%}
 .kd-toolbar .kd-tool,.kd-toolbar .kd-tool:hover,.kd-toolbar .kd-tool:focus{width:30px;height:30px;padding:6px!important}
 .kd-tool svg{width:16px;height:16px}
 .kd-zoom,.kd-page-counter{font-size:10px;min-width:27px}
 .kd-library .kd-button,.kd-library .kd-download-button{padding:9px 12px!important;font-size:12px;min-height:38px}
}
@media(max-width:390px){.kd-grid{grid-template-columns:1fr}.kd-card-actions{gap:7px}}



/* KitaDocument v1.2.8: robust standalone card styles (including [kitadocument id="..."]
   rendered without .kd-library). Desktop reader layout intentionally unchanged. */
.kd-card h3.kd-title,
.kd-card h3.kd-title button.kd-title-button {
  font-family:inherit!important;
  font-size:20px!important;
  line-height:1.4!important;
  font-weight:600!important;
  text-align:center!important;
}
.kd-card h3.kd-title button.kd-title-button:hover,
.kd-card h3.kd-title button.kd-title-button:focus-visible {
  color:#0067AC!important;
  font-weight:800!important;
  background:transparent!important;
}
@media (min-width:768px) and (max-width:1024px){
  .kd-card h3.kd-title,.kd-card h3.kd-title button.kd-title-button {font-size:19px!important}
}
@media (max-width:767px){
  .kd-card h3.kd-title,.kd-card h3.kd-title button.kd-title-button {font-size:18px!important}
}
/* Download link: all card modes, including individually inserted document shortcodes. */
.kd-card .kd-card-actions {
  display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;
  align-items:center!important;justify-content:center!important;
  column-gap:24px!important;row-gap:12px!important;
}
.kd-card .kd-card-actions a.kd-download-button,
.kd-card .kd-card-actions a.kd-download-button:visited {
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  flex-direction:row!important;align-self:center!important;
  width:auto!important;height:auto!important;min-width:0!important;min-height:0!important;
  margin:0!important;padding:0!important;gap:5px!important;
  color:#A4A6A9!important;background:transparent!important;background-color:transparent!important;
  background-image:none!important;border:0!important;border-radius:0!important;
  box-shadow:none!important;text-shadow:none!important;text-decoration:none!important;
  font-family:inherit!important;font-size:15px!important;font-weight:500!important;
  line-height:1.4!important;white-space:nowrap!important;vertical-align:middle!important;
  transition:color .18s ease!important;
}
.kd-card .kd-card-actions a.kd-download-button:hover,
.kd-card .kd-card-actions a.kd-download-button:focus-visible {
  color:#00A4E4!important;background:transparent!important;background-color:transparent!important;
  border:0!important;box-shadow:none!important;text-decoration:none!important;
}
.kd-card .kd-card-actions a.kd-download-button .kd-download-label {
  display:inline!important;font:inherit!important;line-height:inherit!important;
  color:inherit!important;white-space:nowrap!important;
}
/* CSS-mask icon, immune to third-party SVG width/height declarations. */
.kd-card .kd-card-actions a.kd-download-button .kd-download-icon {
  display:inline-block!important;position:static!important;vertical-align:middle!important;
  flex:0 0 19px!important;width:19px!important;height:19px!important;
  min-width:19px!important;max-width:19px!important;min-height:19px!important;max-height:19px!important;
  padding:0!important;margin:0!important;border:0!important;
  background-color:currentColor!important;
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M12 3v12m-5-5 5 5 5-5M5 17v3h14v-3'/%3E%3C/svg%3E")!important;
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M12 3v12m-5-5 5 5 5-5M5 17v3h14v-3'/%3E%3C/svg%3E")!important;
  -webkit-mask-size:contain!important;mask-size:contain!important;
  -webkit-mask-position:center!important;mask-position:center!important;
  -webkit-mask-repeat:no-repeat!important;mask-repeat:no-repeat!important;
}
/* Restore the mobile overlay dimensions from the known-good v1.2.6. */
@media(max-width:767px){
  .kd-modal.kd-open {
    padding:clamp(40px,10dvh,90px) 16px!important;
    box-sizing:border-box!important;
  }
  .kd-modal .kd-dialog {
    height:min(72dvh,650px)!important;
    max-height:calc(100dvh - 100px)!important;
    width:min(var(--kd-reader-width,680px),calc(100vw - 32px))!important;
  }
  .kd-card .kd-card-actions {column-gap:16px!important}
  .kd-card .kd-card-actions a.kd-download-button {font-size:14px!important}
  .kd-card .kd-card-actions a.kd-download-button .kd-download-icon {
    flex-basis:15px!important;width:15px!important;height:15px!important;
    min-width:15px!important;max-width:15px!important;
    min-height:15px!important;max-height:15px!important;
  }
}
