:root {
  --bg: #f4f0e8;
  --ink: #2a2723;
  --muted: rgba(42, 39, 35, .58);
  --paper: #fffdf8;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; overflow: hidden; }

.catalog-shell {
  width: 100vw;
  height: 100vh;
  min-height: 520px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.82) 0%, rgba(244,240,232,.94) 42%, #e8e0d2 100%);
}

.brandbar {
  position: fixed;
  z-index: 20;
  top: 22px;
  left: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.brand { letter-spacing: .08em; font-size: 13px; font-weight: 600; text-transform: uppercase; }
.fullscreen {
  pointer-events: auto;
  border: 1px solid rgba(42,39,35,.18);
  background: rgba(255,255,255,.34);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.book-stage {
  width: min(94vw, calc((100vh - 110px) * 1.414));
  height: min(calc(94vw / 1.414), calc(100vh - 110px));
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 30px 46px rgba(42, 39, 35, .20));
}
.book { width: 100%; height: 100%; }
.page {
  background: var(--paper);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: var(--paper);
  user-select: none;
  -webkit-user-drag: none;
}

.nav {
  position: fixed;
  z-index: 25;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.20);
  color: rgba(42,39,35,.65);
  font-size: 58px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .2s ease, color .2s ease, opacity .2s ease;
}
.nav:hover { background: rgba(255,255,255,.48); color: rgba(42,39,35,.92); }
.nav-left { left: 24px; }
.nav-right { right: 24px; }

.hint {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .05em;
  white-space: nowrap;
}

.fallback {
  width: 100%;
  height: 100%;
  position: relative;
  background: var(--paper);
  box-shadow: 0 22px 46px rgba(42, 39, 35, .18);
}
.fallback img { width: 100%; height: 100%; object-fit: contain; display: block; }

@media (max-width: 768px) {
  .catalog-shell { min-height: 100svh; }
  .brandbar { top: 14px; left: 16px; right: 16px; }
  .fullscreen { display: none; }
  .book-stage {
    width: 94vw;
    height: min(78svh, calc(94vw / 0.707));
    filter: drop-shadow(0 20px 34px rgba(42, 39, 35, .18));
  }
  .nav { width: 42px; height: 64px; font-size: 46px; background: transparent; }
  .nav-left { left: 2px; }
  .nav-right { right: 2px; }
  .hint { bottom: 14px; font-size: 11px; }
}
