.chapter-view-tools:not([hidden]){
 display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:0 0 10px
}
#chapter-views{display:flex;gap:6px}
#chapter-views [aria-pressed="true"]{background:#21433f;border-color:#8bc3af;color:#e7fff5}
#game[data-page-mode] #viewport{height:clamp(185px,48svh,420px);touch-action:pan-y;user-select:none}
#game[data-page-mode] .playfoot{display:none!important}
.classic-pages:not([hidden]){
 display:flex;align-items:center;justify-content:space-between;gap:8px;
 width:min(100%,620px);margin:10px auto;color:var(--text);font-size:13px
}
.classic-pages button{min-height:40px}
.classic-pages button:disabled{opacity:.42;cursor:default}
#game[data-explore]:not([data-page-mode]) #viewport{cursor:grab;touch-action:none;user-select:none}
#game[data-explore] #viewport.is-dragging{cursor:grabbing}
#game[data-explore] #viewport [data-i]{pointer-events:auto}
#game[data-explore] #viewport:not(.is-dragging) [data-i]{cursor:text}
.book-progress{width:min(100%,72ch);margin:26px auto 18px;padding:0 10px;color:#d9c8a5;font-size:13px}
#book-progress-label{display:block;margin-bottom:13px}
.book-progress-rail{position:relative}
#book-progress-track{height:8px;position:relative;overflow:hidden;border-radius:9px;background:#293f46}
#book-progress-track>div{position:absolute;min-width:1px;height:100%;background:#f2cc73}
#book-progress-marker{
 position:absolute;top:-10px;width:0;height:0;transform:translateX(-50%);
 border-left:4px solid transparent;border-right:4px solid transparent;border-top:7px solid #fff2cb
}

/* PLAY footer: share one row only when there is room. The book progress
   remains a sibling of .playfoot so Classic mode can hide controls alone. */
#game .game-bottom-row{display:flex;flex-wrap:wrap;align-items:center;column-gap:clamp(14px,2vw,24px)}
#game .game-bottom-row>.playfoot{flex:1 1 650px;min-width:0;padding-bottom:12px}
#game .game-bottom-row>.book-progress:not([hidden]){
 flex:1 1 410px;min-width:min(100%,280px);max-width:72ch;width:auto;
 margin:8px 0 12px;padding:0 6px;
}
#game .game-bottom-row #book-progress-label{margin-bottom:8px}
#game[data-page-mode] .game-bottom-row>.book-progress:not([hidden]){
 flex:1 1 100%;width:min(100%,72ch);margin:12px auto 16px;
}
