/* AP 5.28 — T1 Template Engine renderer contract.
   Geometry is injected only by APSE_Template_Manager::runtime_css().
   Structure: one connected .ap-template-row per semantic IT pair.
   Theme/Studio consume the same tokens; no production pixel geometry lives here. */
.ap-t1-family{position:relative;background:#f4efdf!important}
.ap-t1-family>.ap-template-row{
  position:relative!important;
  display:grid!important;
  min-width:0!important;
  min-height:0!important;
  gap:var(--ap-t1-gap)!important;
  overflow:hidden!important;
  background:#111!important;
  border:0!important;
  border-radius:3px!important;
  box-shadow:none!important;
  filter:none!important;
}
.ap-t1-family>.ap-template-row[data-pair-order="art-text"]{grid-template-columns:var(--ap-t1-art) var(--ap-t1-text)!important}
.ap-t1-family>.ap-template-row[data-pair-order="text-art"]{grid-template-columns:var(--ap-t1-text) var(--ap-t1-art)!important}
.ap-t1-family>.ap-template-row>.ap-six-zone{position:relative!important;min-width:0!important;min-height:0!important;width:auto!important;height:100%!important;margin:0!important;overflow:hidden!important;border:0!important;box-shadow:none!important;filter:none!important}
.ap-t1-family .ap-six-art{padding:0!important;background:#071827}
.ap-t1-family .ap-six-art>.ap-comic-image-box,.ap-t1-family .ap-six-art .ap-story-art{width:100%!important;height:100%!important;margin:0!important;padding:0!important;overflow:hidden!important}
.ap-t1-family .ap-six-art .ap-story-art img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;object-position:var(--ap-art-object-position,50% 50%)!important}
.ap-t1-family .ap-six-text{background:#fbfdf7!important}
.ap-t1-family .ap-six-text>.ap-six-text-content{box-sizing:border-box!important;width:100%!important;height:100%!important;padding:var(--ap-text-inner-padding,10px)!important;overflow:hidden!important;font-family:var(--ap-reader-font-family,"Segoe UI",Arial,sans-serif)!important;font-size:18px!important;line-height:var(--ap-reader-line-height,1.3)!important;color:#152015!important;background:rgba(251,253,247,.985)!important}

@media (min-width:768px){
  .ap-story-canvas.ap-t1-family.ap-layout-template-01{
    display:flex!important;
    flex-direction:column!important;
    width:var(--ap-t1-width)!important;
    height:var(--ap-t1-height)!important;
    max-width:none!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    gap:var(--ap-t1-row-gap)!important;
    overflow:hidden!important;
    background:#f4efdf!important;
  }
  .ap-t1-family>.ap-template-row{
    flex:0 0 var(--ap-t1-row)!important;
    height:var(--ap-t1-row)!important;
  }
}

@media (max-width:767px){
  .ap-story-canvas.ap-t1-family.ap-layout-template-01{display:flex!important;flex-direction:column!important;width:100%!important;height:auto!important;aspect-ratio:auto!important;gap:var(--ap-t1-row-gap)!important;overflow:visible!important;background:#f4efdf!important}
  .ap-t1-family>.ap-template-row{display:flex!important;flex-direction:column!important;width:100%!important;height:auto!important;gap:0!important;filter:none!important}
  .ap-t1-family>.ap-template-row[data-pair-order="text-art"]>.ap-six-art{order:1!important}
  .ap-t1-family>.ap-template-row[data-pair-order="text-art"]>.ap-six-text{order:2!important}
  .ap-t1-family>.ap-template-row>.ap-six-zone{width:100%!important;height:auto!important;max-height:none!important}
  .ap-t1-family .ap-six-art>.ap-comic-image-box,.ap-t1-family .ap-six-art .ap-story-art{height:auto!important;aspect-ratio:var(--ap-t1-art)/var(--ap-t1-row)!important}
  .ap-t1-family .ap-six-art .ap-story-art img{height:100%!important;object-fit:cover!important}
  .ap-t1-family .ap-six-text>.ap-six-text-content{height:auto!important;min-height:220px!important;overflow:visible!important;font-size:18px!important;line-height:var(--ap-reader-line-height,1.3)!important}
}
