@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  --ink: #0a0c0f;
  --paper: #e8edf3;
  --dim: #6b7684;
  --live: #34d399;
  --cached: #fbbf24;
  --dead: #f43f5e;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  background: var(--ink);
  overflow: hidden;
  cursor: none;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#stage {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: var(--ink);
}

#slide-img, #slide-vid {
  max-width: 100%; max-height: 100%;
  width: 100%; height: 100%;
  object-fit: contain;
  animation: rise .5s ease-out;
}

@keyframes rise { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #slide-img, #slide-vid { animation: none; } }

/* ── Caption ───────────────────────────────────────────────── */
#caption {
  position: fixed; left: 0; right: 0; bottom: 0;
  padding: 20px 200px 20px 28px;
  font-size: 26px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--paper);
  background: linear-gradient(to top, rgba(10,12,15,.94), rgba(10,12,15,0));
  text-shadow: 0 2px 12px rgba(0,0,0,.7);
}

/* ── QR ────────────────────────────────────────────────────── */
#qr {
  position: fixed; right: 20px; bottom: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 10px 8px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.55);
}
#qr-box img, #qr-box canvas { display: block; }
#qr-label {
  font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: #2a323d;
}

/* ── Boot / error ──────────────────────────────────────────── */
#boot {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  background: var(--ink);
  text-align: center; padding: 40px;
}
.boot-mark {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px; font-weight: 500; letter-spacing: .42em;
  color: var(--dim);
  padding-left: .42em;
}
.boot-msg { font-size: 17px; color: var(--paper); max-width: 32ch; line-height: 1.5; }
.boot-fail .boot-mark { color: var(--dead); }

/* ── HUD (hidden unless ?debug) ────────────────────────────── */
#hud { display: none; }
.is-debug #hud {
  display: flex; gap: 14px;
  position: fixed; top: 0; left: 0; z-index: 30;
  padding: 7px 12px;
  background: rgba(10,12,15,.85);
  border-bottom-right-radius: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px; color: var(--dim);
}
.net-ok     { color: var(--live); }
.net-cached { color: var(--cached); }
