/* ============================================================================
   present.css — board / projector mode
   ----------------------------------------------------------------------------
   A dark stage so the white card reads as a lit slide from the back of a
   classroom. The card itself is untouched: it is the sheet's own element,
   moved here and scaled with a transform, so it keeps its colors and state.
   ========================================================================== */

.present{
  position:fixed; inset:0; z-index:200;
  display:flex; flex-direction:column;
  background:radial-gradient(120% 120% at 50% 0%, #1e2f42 0%, #101a26 60%, #0b131c 100%);
  color:#e8f0f8;
  overscroll-behavior:contain;
}
.present[hidden]{display:none;}

/* the sheet stays mounted but out of the way while presenting */
body.is-presenting{overflow:hidden;}
body.is-presenting .toolbar{display:none;}

/* ============ TOP BAR ============ */
.p-progress{height:3px; background:#ffffff14; flex:0 0 auto;}
.p-progress i{
  display:block; height:100%; width:0;
  background:var(--accent,#3d87d6);
  box-shadow:0 0 10px var(--accent,#3d87d6);
  transition:width .28s ease;
}
.p-bar{
  flex:0 0 auto;
  display:flex; align-items:center; gap:10px;
  padding:10px 18px;
  font-size:14px;
}
.p-lesson{font-weight:800; font-size:16px; color:#fff; opacity:.95;}
.p-spacer{flex:1;}
.p-count{
  font-weight:800; font-size:13px;
  background:#ffffff14; border-radius:999px; padding:3px 14px 4px;
  font-variant-numeric:tabular-nums;
  direction:ltr;   /* "1 / 9" must not be re-ordered by the RTL context */
}
.p-btn{
  border:none; background:#ffffff14; color:#e8f0f8;
  font:inherit; font-size:15px; line-height:1;
  width:34px; height:32px; border-radius:9px;
  cursor:pointer; transition:.15s;
}
.p-btn:hover{background:#ffffff2b;}

/* ============ STAGE ============ */
.p-stage{
  flex:1; min-height:0;
  display:grid; place-items:center;
  padding:8px 18px;
  cursor:default;
}
/* The slot keeps the card's natural box; transform scales it around center,
   so flex centering still lands it in the middle of the stage. */
.p-slot{
  transform-origin:center center;
  transition:transform .18s ease;
}
/* The staged element is the SHEET's own node, so it must keep the sheet's ink.
   `.present` paints its chrome near-white (#e8f0f8) and the card inherits from
   it once moved here — every rule that relies on inherited color (body copy,
   writing lines, `currentColor` icons, contenteditable text) would turn white
   on white. Re-assert the page ink on whatever lands in the slot; the cover is
   the one child that is genuinely on the dark stage, so it is excluded. */
.p-slot > :not(.p-cover){
  margin:0;
  color:var(--ink,#33415c);
  /* modest values on purpose — the transform scales the shadow too */
  box-shadow:0 5px 14px #00000075;
}
/* Slides that are containers of their own white cards (.dl-groups) must stay
   transparent, so the paper fill is listed per card type rather than blanket. */
.p-slot > .card,
.p-slot > .ic-card,
.p-slot > .ac-card,
.p-slot > .dl-card,
.p-slot > .dl-intro,
.p-slot > .dl-strip,
.p-slot > .gm-card,
.p-slot > .gm-vis{
  background:#fff;
}
.p-slot > .dl-groups{box-shadow:none;}

/* Fade + lift on each slide change. This runs on the CARD, not on the slot:
   the slot carries the inline scale transform and an animation would override
   it (animations outrank inline styles in the cascade). */
.present.p-anim .p-slot > *{animation:p-in .3s ease both;}
@keyframes p-in{
  from{opacity:0; transform:translateY(14px);}
}

/* ============ COVER SLIDE ============ */
.p-cover{
  text-align:center;
  max-width:min(900px,82vw);
  padding:10px;
}
.p-cover-badge{
  display:inline-block;
  background:var(--accent,#3d87d6); color:#fff;
  font-size:15px; font-weight:800;
  border-radius:999px; padding:4px 22px 6px;
  margin-bottom:16px;
}
.p-cover-title{
  font-size:clamp(30px,5.4vw,62px);
  font-weight:800; line-height:1.35; color:#fff;
}
.p-cover-sub{
  margin-top:10px;
  font-size:clamp(14px,1.8vw,21px);
  font-weight:600; color:#a9c0d6;
}
.p-cover-rows{
  margin-top:22px;
  display:flex; flex-wrap:wrap; gap:8px 22px; justify-content:center;
  font-size:15px; color:#c3d4e4;
}
.p-cover-rows b{color:#fff; font-weight:800;}
.p-cover-hint{
  margin-top:34px;
  font-size:13px; color:#7f97ad;
}
.p-cover-hint kbd{
  background:#ffffff17; border-radius:5px; padding:1px 7px;
  font-family:inherit; font-size:13px;
}

/* ============ SLIDE LABEL ============ */
.p-label{
  position:absolute; inset-inline-start:20px; bottom:64px;
  font-size:13px; font-weight:800;
  color:#9db4c9;
  background:#ffffff0f; border-radius:999px; padding:3px 14px 4px;
  pointer-events:none;
  max-width:38vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.p-label.is-empty{display:none;}

/* ============ BOTTOM NAV ============ */
.p-nav{
  flex:0 0 auto;
  display:flex; align-items:center; justify-content:center; gap:16px;
  padding:10px 18px 16px;
}
.p-arrow{
  border:none; background:#ffffff14; color:#e8f0f8;
  font:inherit; font-size:15px; line-height:1;
  width:46px; height:40px; border-radius:11px;
  cursor:pointer; transition:.15s;
  display:grid; place-items:center;
}
.p-arrow:hover{background:var(--accent,#3d87d6); color:#fff;}
.p-dots{display:flex; flex-wrap:wrap; gap:7px; justify-content:center; max-width:60vw;}
.p-dot{
  width:9px; height:9px; padding:0;
  border:none; border-radius:50%;
  background:#ffffff33; cursor:pointer;
  transition:.15s;
}
.p-dot:hover{background:#ffffff66;}
.p-dot.on{
  background:var(--accent,#3d87d6);
  transform:scale(1.4);
  box-shadow:0 0 8px var(--accent,#3d87d6);
}

/* ============ SMALL SCREENS ============ */
@media (max-width:640px){
  .p-bar{padding:8px 12px; font-size:13px;}
  .p-lesson{font-size:14px; max-width:44vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .p-label{inset-inline-start:12px; bottom:58px; max-width:60vw;}
  .p-dots{max-width:44vw;}
  .p-arrow{width:40px; height:36px; font-size:22px;}
}

@media (prefers-reduced-motion:reduce){
  .present.p-anim .p-slot > *{animation:none;}
  .p-slot{transition:none;}
  .p-progress i{transition:none;}
}

/* Presentation chrome must never reach the printer. */
@media print{
  .present{display:none !important;}
}
