/* Edition Three — One Book reading flow.
   All manuscript content remains private in the authorized Supabase catalog. */
#panel-read .reader-heading{
  margin-bottom:11px;
  padding:clamp(16px,2.5vw,29px) clamp(17px,3.2vw,36px);
}
#panel-read .reader-heading h2{
  font-size:clamp(2rem,3.4vw,3.5rem);
  margin:5px 0 8px;
}
#panel-read .reader-description{line-height:1.65}
#panel-read .reader-tools #readerFocusToggle{
  background:#fff;
  border:2px solid #aaa;
  box-shadow:0 0 0 3px rgba(0,0,0,0.041),0 7px 21px rgba(0,0,0,0.085);
  color:#202020;
  font-weight:800;
  letter-spacing:.055em;
  padding:11px 17px;
  min-height:45px;
}
#panel-read .reader-tools #readerFocusToggle:hover{
  background:#efefef;
  color:#202020;
  box-shadow:0 0 0 4px rgba(0,0,0,0.088);
}
#panel-read .reader-entry-actions{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:space-between;
  padding:0 0 15px;
}
#panel-read .reader-open-fullscreen{
  display:flex;align-items:center;gap:12px;
  padding:15px 23px;min-height:60px;
  background:linear-gradient(130deg,#fff,#fff);
  border:1px solid #aaa;
  border-radius:13px;
  color:#202020;
  font:800 .86rem/1.2 'IM Fell French Canon',Arial,sans-serif;
  letter-spacing:.045em;
  cursor:pointer;
  box-shadow:0 8px 29px rgba(0,0,0,0.054);
}
#panel-read .reader-open-fullscreen>span{font-size:1.7rem;font-weight:400}
#panel-read .reader-open-fullscreen small{
  color:#555;
  font-size:.62rem;
  font-weight:500;
  letter-spacing:0;
  margin-left:6px;
  white-space:normal;
}
#panel-read .reader-open-fullscreen:hover{background:#efefef;box-shadow:0 11px 35px rgba(0,0,0,0.092)}
#panel-read .reader-start-over{
  min-height:44px;
  padding:10px 16px;
  color:#202020;
  font:700 .76rem/1.2 'IM Fell French Canon',Arial,sans-serif;
  border:1px solid rgba(0,0,0,0.304);
  border-radius:10px;
  background:rgba(0,0,0,0.010);
  cursor:pointer;
}
#panel-read .reader-start-over:hover{background:rgba(0,0,0,0.045)}
#panel-read .book-frame.reading-leaves{
  overflow:visible!important;
}
#panel-read .book-frame.reading-leaves .book-page{
  height:auto!important;
  min-height:clamp(500px,65vh,810px)!important;
  max-height:none!important;
  overflow:visible!important;
}
#panel-read .book-frame.reading-leaves .book-page>*{
  max-width:31em;
}
#panel-read .book-bottom{
  padding:15px clamp(12px,3vw,30px);
  gap:10px;
  border-top:1px solid rgba(0,0,0,0.150);
}
#panel-read .book-bottom button{
  min-height:50px;
  padding:13px 17px;
  font-size:.8rem;
  font-weight:700;
  border-radius:9px;
  border:1px solid rgba(0,0,0,0.192);
  color:inherit;
  background:rgba(0,0,0,0.013);
  cursor:pointer;
  line-height:1.3;
}
#panel-read .book-bottom button:hover:not(:disabled){background:rgba(0,0,0,0.045)}
#panel-read .book-bottom button:disabled{opacity:.33;cursor:default}
#panel-read #pageCount{
  font:600 .7rem/1.3 'IM Fell French Canon',Arial,sans-serif;
  letter-spacing:.08em;
  text-align:center;
  opacity:.7;
}
#panel-read #nextPage:not(:disabled){
  background:#fff;
  color:#202020;
  border-color:#aaa;
}
#panel-read #nextPage:hover:not(:disabled){background:#efefef}
#panel-read .reader-turn-dock{display:none}
.site-shell.reader-immersive #panel-read .reader-turn-dock:not([hidden]){
  display:flex!important;
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  z-index:43;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  min-height:72px;
  padding:9px max(14px,env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-right));
  background:rgba(255,255,255,0.97);
  border-top:1px solid rgba(0,0,0,0.240);
  box-shadow:0 -7px 37px rgba(0,0,0,0.129);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
#panel-read .reader-turn-dock button{
  min-height:48px;
  min-width:112px;
  padding:10px 19px;
  border:1px solid rgba(0,0,0,0.480);
  border-radius:10px;
  color:#202020;
  background:rgba(0,0,0,0.015);
  font:700 .85rem/1.2 'IM Fell French Canon',Arial,sans-serif;
  cursor:pointer;
  white-space:nowrap;
}
#panel-read .reader-turn-dock button:hover:not(:disabled){
  border-color:#555;
  background:rgba(0,0,0,0.045)
}
#panel-read .reader-turn-dock button:disabled{
  opacity:.35;cursor:default
}
#panel-read .reader-turn-dock #readerFloatingNext:not(:disabled){
  background:#fff;
  color:#202020;
}
#panel-read .reader-turn-dock #readerFloatingNext:hover:not(:disabled){background:#efefef}
#readerFloatingProgress{
  font:700 .72rem/1.25 'IM Fell French Canon',Arial,sans-serif;
  letter-spacing:.08em;
  color:#202020;
  white-space:nowrap;
  text-align:center;
}
.site-shell.reader-immersive #panel-read .reader-entry-actions{
  display:none!important;
}
.site-shell.reader-immersive #panel-read{
  padding-bottom:calc(130px + env(safe-area-inset-bottom))!important;
  scroll-padding-bottom:calc(90px + env(safe-area-inset-bottom));
}
.site-shell.reader-immersive #panel-read .reader-heading{
  margin-bottom:0!important;
}
/* The full-screen reader should prioritize the actual page, not navigation panels. */
.site-shell.reader-immersive #panel-read .codex-experience{
  margin:10px auto 11px!important;
}
.site-shell.reader-immersive #panel-read .book-page.reading-leaves,
.site-shell.reader-immersive #panel-read .book-page.mode-continuous{overflow:visible!important}
@media(max-width:720px){
  #panel-read .reader-entry-actions{gap:9px;align-items:stretch}
  #panel-read .reader-open-fullscreen{
    flex:1 1 100%;
    padding:13px 15px;
    min-height:62px;
    font-size:.82rem;
  }
  #panel-read .reader-open-fullscreen small{
    display:block;
    margin-left:auto;
    text-align:right;
    max-width:48%;
    font-size:.59rem;
  }
  #panel-read .reader-start-over{flex:1 1 100%;text-align:center}
  #panel-read .book-bottom{padding:12px 9px}
  #panel-read .book-bottom button{padding:11px 10px;font-size:.7rem;min-height:48px}
  #panel-read #pageCount{font-size:.64rem;letter-spacing:0;min-width:72px}
  #panel-read .book-frame.reading-leaves .book-page{
    min-height:calc(76dvh - 130px)!important;
  }
  .site-shell.reader-immersive #panel-read .reader-turn-dock:not([hidden]){
    gap:6px;min-height:73px;padding-left:9px;padding-right:9px
  }
  #panel-read .reader-turn-dock button{
    min-width:84px;
    padding:9px 11px;
    font-size:1rem;
  }
  #panel-read .reader-turn-dock button span{font-size:.65rem}
  #readerFloatingProgress{font-size:.64rem;letter-spacing:0}
  .site-shell.reader-immersive #panel-read .reader-tools #readerFocusToggle{padding:8px 12px}
}
@media(max-width:370px){
  #panel-read .reader-turn-dock button{min-width:65px}
  #panel-read .reader-turn-dock button span{display:none}
}
@media(prefers-reduced-motion:reduce){
  #panel-read .reader-open-fullscreen,
  #panel-read .reader-start-over,
  #panel-read .reader-turn-dock button{transition:none}
}

/* Navigation is optional; the page itself comes first. Use the chapter menu or
   Contents & Notes when the reader chooses to browse. */
#panel-read .codex-jurisdictions{display:none!important}
