/* Keep the slide canvas intact; only the surrounding controls reflow. */
#presentation-app { height: 100vh; height: 100dvh; }
.stage-outer { min-height: 0; padding: 12px; }
.stage-viewport { flex: none; max-width: none; border: 0; outline: 1px solid var(--border-subtle); }
.slides-track { width: 1440px; height: 810px; flex: none; transform-origin: top left; }
.slide-panel { overflow: hidden; }
.showcase-header, .showcase-footer { flex-shrink: 0; }
button:focus-visible, a:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 4px; }
@media (max-width: 1024px) {
  .showcase-header { padding: 0 12px; gap: 8px; }
  .brand-badge, .header-center-info, .theme-picker-group, .timer-indicator { display: none; }
  .header-actions { gap: 6px; }
  .btn-icon { width: 44px; height: 44px; }
  .showcase-footer { height: auto; min-height: 100px; padding: 10px 12px; flex-wrap: wrap; gap: 10px; }
  .dots-track-wrap { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
  .btn-nav, .mode-pill-toggle { min-height: 44px; }
  .stage-outer { padding: 8px; }
  .stage-viewport { border-radius: 6px; }
}
@media (max-width: 380px) {
  .brand-name { font-size: 1rem; }
  .brand-wrapper { gap: 6px; }
  .header-actions { gap: 4px; }
  .showcase-header { padding: 0 8px; }
  .footer-nav-controls { gap: 6px; }
  .btn-nav { padding-inline: 8px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .showcase-header { height: 48px; }
  .showcase-footer { min-height: 52px; height: 52px; padding: 4px 12px; flex-wrap: nowrap; }
  .dots-track-wrap { order: 0; flex-basis: auto; margin: 0 12px; }
  .stage-outer { padding: 6px; }
}

/* Fixed purple theme shared with the frontend. */
:root {
 color-scheme: dark;
 --bg-deep: hsl(255 38% 6%); --bg-base: hsl(255 38% 6%);
 --bg-surface: hsl(256 30% 11%); --bg-card: hsl(256 30% 11%);
 --bg-card-hover: hsl(256 26% 16%); --bg-glass: hsl(256 30% 11% / .9);
 --text-main: hsl(260 35% 96%); --text-muted: hsl(258 18% 73%); --text-dim: hsl(258 18% 73%);
 --border-subtle: hsl(258 22% 28%); --border-medium: hsl(258 22% 35%);
 --accent-primary: hsl(263 66% 46%); --accent-hover: hsl(263 66% 40%);
 --accent-subtle: hsl(263 35% 19%); --accent-border: hsl(263 50% 40%);
}

/* Merkle proof walkthrough: labels distinguish each role without color alone. */
.merkle-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; width: 100%; align-items: start; }
.merkle-tree { margin: 0; padding: 24px; border: 1px solid var(--border-subtle); border-radius: 16px; background: var(--bg-glass); }
.merkle-tree figcaption { color: var(--text-muted); font-size: .75rem; letter-spacing: .08em; margin-bottom: 24px; line-height: 1.5; }
.merkle-level { display: grid; gap: 12px; }
.merkle-root { grid-template-columns: 1fr; width: 70%; margin: auto; }
.merkle-parents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.merkle-leaves { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.merkle-node { padding: 14px 6px; display: flex; flex-direction: column; gap: 8px; text-align: center; border: 1px solid var(--border-medium); border-radius: 10px; background: var(--bg-base); }
.merkle-node strong { font-family: var(--font-mono); font-size: .9rem; color: var(--text-main); }
.merkle-node small { color: var(--text-muted); font-size: .75rem; line-height: 1.4; }
.merkle-computed { background: var(--accent-subtle); border-color: var(--accent-border); }
.merkle-sibling { border-style: dashed; border-color: #c4b5fd; }
.merkle-target { background: var(--accent-primary); border-color: #c4b5fd; }
.merkle-target small { color: #fff; }
.merkle-branches { display: grid; grid-template-columns: repeat(2, 1fr); text-align: center; color: #c4b5fd; font-size: 1.8rem; line-height: 1.5; }
.merkle-four { grid-template-columns: repeat(4, 1fr); }
.merkle-caption { margin-top: 22px; font-size: .85rem; line-height: 1.6; color: var(--text-muted); }
.merkle-explanation { display: grid; gap: 16px; }
.merkle-step { display: flex; gap: 12px; padding: 14px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 12px; }
.merkle-step-number { color: #c4b5fd; font-family: var(--font-mono); font-size: .85rem; padding-top: 3px; }
.merkle-step h3 { font-size: 1rem; margin-bottom: 6px; }
.merkle-step p, .merkle-note { font-size: .88rem; line-height: 1.55; color: var(--text-muted); }
.merkle-step code, .merkle-caption code { color: #ddd6fe; font-size: .8rem; overflow-wrap: anywhere; }
.merkle-note { border-left: 3px solid var(--accent-primary); padding-left: 12px; }
.merkle-note strong { color: var(--text-main); }
.merkle-notation { font-size: .75rem; line-height: 1.5; color: var(--text-muted); }
