/* Presenter + player chrome. Loaded on every deck; inert without
   ?present=1 / ?replay=. */

.kslide .ed-ink { position: absolute; inset: 0; z-index: 60;
  width: 100%; height: 100%; pointer-events: none; touch-action: none;
  cursor: crosshair; }

#pr-bar, #pl-bar { position: fixed; left: 50%; bottom: 10px;
  transform: translateX(-50%); z-index: 420; display: flex;
  align-items: center; gap: 6px; padding: 6px 10px;
  background: #1d1f24ee; color: #dfe2ea; border-radius: 10px;
  box-shadow: 0 4px 18px #000a;
  font: 13px/1.3 system-ui, -apple-system, sans-serif; }
#pr-bar button, #pl-bar button, #pl-bar select {
  font: inherit; color: #dfe2ea; background: #33363e; border: 0;
  border-radius: 6px; padding: 4px 9px; cursor: pointer; }
#pr-bar button:hover, #pl-bar button:hover { background: #454955; }
#pr-bar .pr-sep { width: 1px; height: 18px; background: #454955; }
#pr-bar #pr-rec { background: #7a2018; color: #fff; font-weight: 600; }
#pr-bar #pr-rec.rec-on { background: #d02020;
  animation: pr-pulse 1.4s infinite; }
@keyframes pr-pulse { 50% { filter: brightness(1.35); } }
#pr-clock { min-width: 40px; text-align: center; color: #ffb0a8;
  font-variant-numeric: tabular-nums; }
#pr-bar .pr-tool.on, #pr-bar .pr-size.on { background: #3d6adf;
  color: #fff; }
#pr-bar .pr-color { width: 20px; height: 20px; border-radius: 50%;
  padding: 0; border: 2px solid transparent; }
#pr-bar .pr-color.on { border-color: #fff; }
#pr-bar .pr-size { width: 28px; }

#pl-bar { min-width: 480px; }

/* The player's controls are a shelf UNDER the deck, not a raft on top of
   it (Fredo, 2026-09-11). A floating bar covers the bottom of every
   slide, which on this deck is where the captions and the demo controls
   sit, and a viewer reaching for the scrubber is reaching across the
   slide. The deck gives up the height instead: --cp-playbar is measured
   from the real bar after it is built, because its height depends on
   what is in it (the version note appears only when the deck has moved
   on), and Reveal.layout() rescales the slides to what is left. */
html.cp-playbar #pl-bar { left: 0; right: 0; bottom: 0; width: 100%;
  transform: none; border-radius: 0; min-width: 0; box-sizing: border-box;
  padding: 7px 14px; background: #1d1f24; box-shadow: 0 -3px 14px #0007;
  border-top: 1px solid #33363e; }
html.cp-playbar .reveal {
  height: calc(100% - var(--cp-playbar, 44px)); }

/* The presenter's bar gets the same shelf (Fredo, 2026-09-15: "put toolbar
   below slides, not on top of them, so it doesn't overlap content"). It
   floated over the bottom of the slide, where the notes links, captions
   and demo controls are. --cp-prbar is measured the way --cp-playbar is. */
html.cp-prbar #pr-bar { left: 0; right: 0; bottom: 0; width: 100%;
  transform: none; border-radius: 0; box-sizing: border-box;
  justify-content: center; flex-wrap: wrap; padding: 7px 14px;
  background: #1d1f24; box-shadow: 0 -3px 14px #0007;
  border-top: 1px solid #33363e; }
html.cp-prbar .reveal { height: calc(100% - var(--cp-prbar, 44px)); }
/* both at once: the player's shelf stands on the presenter's */
html.cp-prbar.cp-playbar .reveal {
  height: calc(100% - var(--cp-prbar, 44px) - var(--cp-playbar, 44px)); }
html.cp-prbar.cp-playbar #pl-bar { bottom: var(--cp-prbar, 44px); }
#pl-bar #pl-seek { flex: 1; accent-color: #3d6adf; }
#pl-bar #pl-rec { max-width: 150px; }
#pl-bar #pl-one { color: #aab2c4; }   /* the one recording, named not offered */
#pl-bar #pl-silent { color: #ffb0a8; font-size: 12px; }
#pl-time, #pl-dur { font-variant-numeric: tabular-nums; color: #aab2c4; }
#pl-follow { display: flex; gap: 4px; align-items: center;
  color: #aab2c4; }
#pl-none { position: fixed; left: 50%; top: 40%;
  transform: translateX(-50%); z-index: 420; background: #1d1f24ee;
  color: #dfe2ea; padding: 16px 26px; border-radius: 10px;
  font: 15px system-ui, sans-serif; }

/* replay: ink shows but never intercepts, viewer drives the demos */
body.replaying .kslide .ed-ink { pointer-events: none; }

/* pdf-export screenshot mode: no chrome at all */
body.pdfshot #ed-fsview, body.pdfshot .reveal .controls,
body.pdfshot .reveal .progress { display: none !important; }

/* play the last recording: green against the record button's red, and
   shut while a recording is running */
#pr-bar #pr-play { background: #24503a; color: #cfe9d8; }
#pr-bar #pr-play:hover { background: #2f6a4c; }
#pr-bar button[disabled], #pr-bar button[disabled]:hover {
  opacity: .4; cursor: default; }

/* editing and presenting are different jobs: the recording bar stands
   down while the editor's own bar is up (editor.js sets body.editing) */
body.editing #pr-bar { display: none; }
body.editing.recording #pr-bar { display: flex; }

/* player: step a slide at a time, and say which deck this is */
#pl-bar #pl-prev, #pl-bar #pl-next, #pl-bar #pl-secprev, #pl-bar #pl-secnext { padding: 4px 7px; }
#pl-bar #pl-sec { max-width: 190px; }
#pl-bar button[disabled], #pl-bar button[disabled]:hover {
  opacity: .35; cursor: default; }
#pl-took { color: #ffd58a; font-size: 12px; white-space: nowrap; }
#pl-ver { color: #8f97a8; font-size: 12px; white-space: nowrap;
  text-decoration: none; }
#pl-bar a#pl-ver.moved { color: #ffd58a; background: #3a3320;
  border-radius: 6px; padding: 3px 7px; }
#pl-bar a#pl-ver.moved:hover { background: #4a4128; }

/* ---- presenter view (?second=1) -------------------------------------
   The second screen. The deck itself is hidden: this window is the
   previews, and no demo ever runs in it. */
body.presenter-view .reveal, body.presenter-view #ed-nav,
body.presenter-view #ed-insp, body.presenter-view #ed-bar,
body.presenter-view #ed-fsview { display: none !important; }
body.presenter-view { background: #16181c; }

#p2 { position: fixed; inset: 0; z-index: 500; display: flex;
  flex-direction: column; gap: 10px; padding: 12px 14px;
  background: #16181c; color: #dfe2ea;
  font: 14px/1.35 system-ui, -apple-system, sans-serif; }

#p2-top { display: flex; align-items: center; gap: 16px; }
#p2-warn { background: #7a1f1f; color: #fff; padding: 6px 12px; border-radius: 4px;
           font-size: 15px; }
#p2-warn[hidden] { display: none; }
#p2-clocks { display: flex; align-items: baseline; gap: 14px;
  font-variant-numeric: tabular-nums; }
#p2-wall { font-size: 30px; font-weight: 600; }
#p2-el { font-size: 22px; color: #9fe0b4; }
#p2-on { font-size: 16px; color: #8f97a8; }
#p2-where { flex: 1; color: #aab2c4; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
#p2-acts { display: flex; gap: 8px; }
#p2 button { font: inherit; color: #dfe2ea; background: #33363e;
  border: 0; border-radius: 7px; padding: 5px 11px; cursor: pointer; }
#p2 button:hover { background: #454955; }
#p2-rec { background: #7a2018; color: #fff; font-weight: 600; }
#p2-rec.on { background: #d02020; }

#p2-main { display: flex; gap: 14px; align-items: flex-start;
  flex: 0 0 auto; width: 100%; }
.p2-pane { display: flex; flex-direction: column; gap: 5px; }
.p2-lab { color: #8f97a8; font-size: 11px; text-transform: uppercase;
  letter-spacing: .06em; }
#p2-nextt { color: #aab2c4; font-size: 12.5px; }
.p2-pane { max-width: 50%; }
.p2-pane #p2-nextt { overflow: hidden; text-overflow: ellipsis; }

/* the whole deck, by section (2026-09-29) */
#p2-deck { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
#p2-secs { display: flex; flex-wrap: wrap; gap: 6px; }
#p2 .p2-chip { font-size: 12px; padding: 3px 9px; background: #262930; color: #aab2c4; }
#p2 .p2-chip.cur { background: #3d6adf; color: #fff; }
#p2-strip { overflow: auto; flex: 1; min-height: 0; padding-right: 4px; }
.p2-sechead { color: #cfd6e4; font-weight: 600; font-size: 13px; margin: 12px 0 6px;
  padding-bottom: 3px; border-bottom: 1px solid #2c2f37; }
.p2-sechead:first-child { margin-top: 0; }
.p2-row { display: flex; gap: 10px; flex-wrap: wrap; align-content: flex-start; }
.p2-ph { background: #22252c; border-radius: 5px; }
.p2-tile.cur { opacity: 1; }
.p2-tile.cur .ed-thumbbox, .p2-tile.cur .p2-ph { outline: 3px solid #3d6adf; outline-offset: 2px; }
.p2-tile.cur .p2-cap { color: #dfe2ea; }
.p2-tile { cursor: pointer; opacity: .78; }
.p2-tile.p2-above { display: none; }   /* shown in the big previews */
.p2-tile:hover { opacity: 1; }
.p2-cap { color: #8f97a8; font-size: 11px; margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#p2 .ed-thumbbox { background: #fff; border-radius: 5px;
  overflow: hidden; box-shadow: 0 1px 6px #0007; }
#p2-ctl { display: flex; gap: 22px; align-items: center; color: #8f97a8;
  font-size: 12px; }
#p2-ctl label { display: flex; align-items: center; gap: 7px; }
#p2-ctl input[type=range] { width: 130px; accent-color: #3d6adf; }
#p2-ctl span { font-variant-numeric: tabular-nums; min-width: 40px; }

#pr-bar #pr-second { background: #2a3a5c; color: #cfd9ee; }
#pr-bar #pr-second:hover { background: #364973; }
#pr-auto { color: #9fe0b4; font-size: 12px; white-space: nowrap; }

/* The magnifier (Fredo, 2026-09-22). The slide itself is scaled about the
   point under the pointer, so the glass works over a live demo as well as
   over a picture; the section clips what grows past its edge, and one
   transparent catcher over the stage keeps an iframe from swallowing the
   pointer. */
/* No clip on the section: a reveal section has no height of its own, so
   `overflow: hidden` there clipped the magnified slide away entirely. The
   slide is allowed to spill over the letterbox instead, which is what you
   want on a projector anyway. */
.cp-zoomed .kslide { will-change: transform; }
#pr-loupe { position: fixed; z-index: 60; cursor: zoom-in; }
#pr-loupe.held { cursor: grab; }

/* who gets a press over a demo: auto, the demo, or the pen (2026-09-29) */
#pr-bar .pr-seg { display: inline-flex; border-radius: 7px; overflow: hidden;
  border: 1px solid #454955; }
#pr-bar .pr-seg .pr-dm { border-radius: 0; margin: 0; padding: 4px 9px; font-size: 12px; }
#pr-bar .pr-seg .pr-dm + .pr-dm { border-left: 1px solid #454955; }
#pr-bar .pr-dm.on { background: #3d6adf; color: #fff; }

/* ink by build step: lit when the slide on screen is marked */
#pr-bar #pr-step.on, #pl-bar #pl-step.on { background: #3d6adf; color: #fff; }

/* a drawing tool in hand: nothing on the slides is text-selectable
   (2026-10-22, see clearTextSelection in presenter.js) */
body.cp-inking .reveal, body.cp-inking .reveal * {
  -webkit-user-select: none; user-select: none; }
