/* Šaber — katalog koji se lista kao knjiga */
:root { --bg: #0f0e0d; --bg2: #1a1816; --fg: #ece7df; --muted: #a49b8f; --accent: #c49a6c; --line: rgba(236,231,223,.12);
  --top: 64px; --bar: 72px; color-scheme: dark; }
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body { background: radial-gradient(120% 90% at 50% 45%, #262320 0%, var(--bg) 70%); color: var(--fg);
  font-family: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-weight: 300;
  display: grid; grid-template-rows: var(--top) 1fr var(--bar); height: 100dvh; overflow: hidden;
  -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* gornja traka */
.fb-top { display: flex; align-items: center; gap: 16px; padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line); background: rgba(15,14,13,.7); }
.fb-logo { display: flex; align-items: center; gap: 10px; }
.fb-logo svg { width: 26px; height: 26px; color: var(--accent); }
.fb-logo span { font-size: 17px; letter-spacing: .3em; font-weight: 500; line-height: 1; }
.fb-logo small { display: block; font-size: 8px; letter-spacing: .5em; color: var(--muted); font-weight: 300; margin-top: 4px; }
.fb-title { flex: 1; text-align: center; font-size: 13px; font-weight: 400; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.fb-tools { display: flex; gap: 6px; }
.fb-tool { display: inline-flex; align-items: center; gap: 8px; height: 40px; min-width: 40px; padding: 0 12px; justify-content: center;
  border: 1px solid var(--line); border-radius: 999px; font-size: 13px; letter-spacing: .08em; transition: border-color .2s, background .2s; }
@media (hover: hover) { .fb-tool:hover { border-color: var(--accent); background: rgba(196,154,108,.08); } }
.fb-tool svg { width: 18px; height: 18px; }

/* knjiga */
.fb-stage { position: relative; display: grid; place-items: center; padding: 22px 16px; min-height: 0; }
.fb-book { margin: 0 auto; transition: transform .7s cubic-bezier(.4,.1,.2,1); filter: drop-shadow(0 30px 40px rgba(0,0,0,.55)); }
.fb-book .page { background: #fff; overflow: hidden; }
.fb-book .page img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.fb-book .page.--left { box-shadow: inset -18px 0 24px -18px rgba(0,0,0,.35); }
.fb-book .page.--right { box-shadow: inset 18px 0 24px -18px rgba(0,0,0,.35); }
.fb-hint { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font-size: 12px; letter-spacing: .06em; color: var(--muted);
  transition: opacity .6s; pointer-events: none; }
.fb-hint.is-hidden { opacity: 0; }
.fb-hint a { color: var(--accent); pointer-events: auto; }

/* donja traka sa strelicama */
.fb-bar { display: flex; align-items: center; justify-content: center; gap: 6px; border-top: 1px solid var(--line); background: rgba(15,14,13,.7);
  padding-bottom: env(safe-area-inset-bottom); }
.fb-bar button { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; transition: background .2s, opacity .2s; }
@media (hover: hover) { .fb-bar button:hover:not(:disabled) { background: rgba(236,231,223,.08); } }
.fb-bar button:disabled { opacity: .3; cursor: default; }
.fb-bar svg { width: 22px; height: 22px; }
.fb-count { min-width: 104px; height: 38px; display: grid; place-items: center; margin: 0 8px; padding: 0 14px;
  background: var(--fg); color: var(--bg); font-size: 15px; font-weight: 400; letter-spacing: .04em; font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 760px) {
  :root { --top: 56px; --bar: 64px; }
  .fb-title { display: none; }
  .fb-top { justify-content: space-between; }
  .fb-tool span { display: none; }
  .fb-tool { padding: 0; width: 40px; }
  .fb-stage { padding: 12px 10px 22px; }
  .fb-bar { gap: 0; }
  .fb-count { min-width: 84px; font-size: 14px; margin: 0 4px; }
}
