/* PRR Portfolio flipbook — INL. No external resources. */
:root {
  --bg: #0e0a2b;
  --bg-2: #1b1452;
  --ink: #ffffff;
  --ink-dim: #b9b5d6;
  --accent: #ed1e2b;
  --bar-h: 56px;
  --radius: 999px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  background: radial-gradient(120% 90% at 50% 10%, var(--bg-2) 0%, var(--bg) 70%) fixed, var(--bg);
  color: var(--ink);
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- toolbar ---------- */
.bar {
  height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 16px;
}
.bar__group { display: flex; align-items: center; gap: 4px; }

.btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background-color .15s ease;
}
.btn--text { font-size: 14px; letter-spacing: .02em; white-space: nowrap; }
.btn:hover { background: rgba(255, 255, 255, .1); }
.btn:focus-visible, .hot:focus-visible, .skip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn:disabled { opacity: .3; cursor: default; background: transparent; }
.btn[hidden] { display: none; }
#download { border: 1px solid rgba(255, 255, 255, .35); margin-left: 4px; }

.count {
  min-width: 88px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  color: var(--ink-dim);
}

/* ---------- stage ---------- */
.stage {
  height: calc(100vh - var(--bar-h));
  height: calc(100dvh - var(--bar-h));
  padding: 8px 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.book { width: 100%; height: 100%; margin: 0 auto; }

.page {
  background: #fff;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
.page img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  pointer-events: none;
  background: #f3f2f8;
}

/* clickable areas over the page image (positions set by app.js from data-box) */
.hot {
  position: absolute;
  display: block;
  border-radius: 3px;
  z-index: 2;
}
@media (hover: hover) {
  .hot:hover { background: rgba(237, 30, 43, .12); box-shadow: 0 0 0 1px rgba(237, 30, 43, .45); }
}

.sr-only, .skip:not(:focus) {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip { position: absolute; top: 8px; left: 8px; z-index: 10; background: #fff; color: #161040; padding: 8px 12px; border-radius: 6px; }

.nojs { color: var(--ink); text-align: center; }
.nojs a { color: var(--ink); }

/* ---------- small screens ---------- */
@media (max-width: 599px) {
  :root { --bar-h: 52px; }
  .bar { padding: 0 8px; }
  #first, #last { display: none; }
  .count { min-width: 64px; }
  .btn--text { padding: 0 8px; font-size: 13px; }
  .wide { display: none; }
  .stage { padding: 4px 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

/* ---------- page-flip 2.0.7 base styles (moved here from the library so a strict CSP can block inline styles) ---------- */
.stf__parent { position: relative; display: block; box-sizing: border-box; transform: translateZ(0); -ms-touch-action: pan-y; touch-action: pan-y; }
.sft__wrapper { position: relative; width: 100%; box-sizing: border-box; }
.stf__parent canvas { position: absolute; width: 100%; height: 100%; left: 0; top: 0; }
.stf__block { position: absolute; width: 100%; height: 100%; box-sizing: border-box; perspective: 2000px; }
.stf__item { display: none; position: absolute; transform-style: preserve-3d; }
.stf__outerShadow, .stf__innerShadow, .stf__hardShadow, .stf__hardInnerShadow { position: absolute; left: 0; top: 0; }
