/* ECOS v0.12.1 — deliberate editorial spacing, zero floating text obstructions. */

/* Compact scene controls are part of each chapter's reading column. They never float on top of the story. */
#chapter-overlay .chapter-inner > .v12-scene-dock.v121-inline-dock{
  position:relative!important;
  inset:auto!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  bottom:auto!important;
  width:100%!important;
  max-width:100%!important;
  min-height:0!important;
  margin:0 0 23px!important;
  padding:6px 8px!important;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(105px,1.06fr) minmax(0,1fr);
  gap:7px;
  border:1px solid rgba(176,199,217,.34);
  border-radius:8px;
  background:linear-gradient(115deg,#16283a,#101e2b);
  box-shadow:0 8px 23px rgba(0,0,0,.23);
  backdrop-filter:none;
  z-index:2;
  box-sizing:border-box;
}
#chapter-overlay .chapter-inner > .v12-scene-dock.v121-inline-dock[hidden]{display:none!important}
#chapter-overlay .chapter-inner > .v12-scene-dock.v121-inline-dock:before{opacity:.2}
#chapter-overlay .chapter-inner > .v12-scene-dock.v121-inline-dock button{
  min-height:34px!important;
  padding:6px 8px!important;
  gap:7px;
  border-radius:5px;
  font-size:9px;
  line-height:1.1;
  letter-spacing:.055em;
}
#chapter-overlay .chapter-inner > .v12-scene-dock.v121-inline-dock .v12-dock-current{gap:5px;align-content:center}
#chapter-overlay .chapter-inner > .v12-scene-dock.v121-inline-dock .v12-dock-current>span{font-size:9px;letter-spacing:.12em;line-height:1.2}
#chapter-overlay .chapter-inner > .v12-scene-dock.v121-inline-dock .v12-dock-track{gap:4px}
#chapter-overlay .chapter-inner > .v12-scene-dock.v121-inline-dock .v12-dock-track i{height:2px;max-width:20px}
/* The scene counter already exists in the dock; avoid a second full-width progress indicator. */
#chapter-overlay.v12-active-story .scene-progress{display:none!important}
#chapter-overlay.v12-active-story .chapter-inner{padding-bottom:35px!important}

/* The four memory nodes form a section divider AFTER the title, not an absolute overlay across it. */
#cinema-overlay .cinema-copy>.cinema-memories.v121-inline-memories{
  position:relative!important;
  display:none;
  inset:auto!important;
  top:auto!important;
  left:auto!important;
  right:auto!important;
  width:100%;
  min-height:31px;
  z-index:2;
  margin:0 0 21px;
  padding:0 0 16px;
  gap:10px;
  align-items:center;
  border-bottom:1px solid rgba(197,214,230,.19);
  pointer-events:none;
}
#cinema-overlay.cinema-finale .cinema-copy>.cinema-memories.v121-inline-memories{display:flex}
#cinema-overlay.cinema-finale .cinema-copy #cinema-heading{
  position:relative;
  z-index:2;
  font-size:clamp(29px,4vw,54px);
  line-height:1.17;
  max-width:950px;
  margin:12px 0 22px;
  letter-spacing:-.04em;
  overflow-wrap:break-word;
}
#cinema-overlay.cinema-finale .cinema-chapter-marker{
  top:83px!important;
  right:clamp(20px,4vw,65px);
  font-size:9px;
  max-width:225px;
  letter-spacing:.16em;
}
#cinema-overlay.cinema-finale .cinema-screen{
  overflow-x:hidden;
  overflow-y:auto;
}
#cinema-overlay.cinema-finale .cinema-copy{position:relative;z-index:3}
#cinema-overlay.cinema-finale .cinema-copy #cinema-text{position:relative;z-index:2}

@media(max-width:900px){
  #chapter-overlay .chapter-inner > .v12-scene-dock.v121-inline-dock{width:100%!important;left:auto!important;right:auto!important;bottom:auto!important;margin:0 0 20px!important}
  #cinema-overlay.cinema-finale .cinema-copy #cinema-heading{font-size:clamp(29px,5vw,47px)}
}
@media(max-width:620px){
  #chapter-overlay .chapter-inner > .v12-scene-dock.v121-inline-dock{
    grid-template-columns:minmax(0,1fr) 90px minmax(0,1fr)!important;
    padding:5px 6px!important;
    gap:4px;
    margin:0 0 17px!important;
    min-height:0!important;
  }
  #chapter-overlay .chapter-inner > .v12-scene-dock.v121-inline-dock button{
    min-height:33px!important;
    padding:5px 6px!important;
    font-size:8px;
    letter-spacing:.015em;
    gap:3px;
    white-space:normal;
  }
  #chapter-overlay .chapter-inner > .v12-scene-dock.v121-inline-dock .v12-dock-current>span{font-size:8px}
  #chapter-overlay.v12-active-story .chapter-inner{padding-bottom:24px!important}
  #cinema-overlay.cinema-finale .cinema-copy #cinema-heading{font-size:clamp(27px,7.7vw,39px);margin:9px 0 17px;line-height:1.16}
  #cinema-overlay .cinema-copy>.cinema-memories.v121-inline-memories{min-height:26px;padding-bottom:12px;margin-bottom:16px;gap:5px}
  #cinema-overlay .cinema-copy>.cinema-memories.v121-inline-memories .memory-node{width:24px;min-width:24px;height:24px}
  #cinema-overlay.cinema-finale .cinema-chapter-marker{top:81px!important;right:18px;font-size:8px;max-width:145px}
}
@media(prefers-reduced-motion:reduce){
  #cinema-overlay .cinema-copy>.cinema-memories.v121-inline-memories .memory-node{animation:none!important}
}
