/* Unity catalogue flipbook — catalog.crystalbohemia.com/unity */
:root{
  --navy:#172448; --navy-2:#101a36; --navy-deep:#0a1124;
  --gold:#c6a15b; --gold-2:#d9bd85; --gold-soft:#e6d2a6;
  --ink:#20283a; --muted:#76808f; --paper:#f6f3ec; --paper-2:#efeadf; --line:#e2dccd;
  --serif:'Cormorant Garamond',Georgia,serif;
  --sans:'Manrope','Helvetica Neue',Arial,sans-serif;
  --top:64px; --bottom:56px;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{font-family:var(--sans);color:var(--ink);background:var(--navy-deep);-webkit-font-smoothing:antialiased;overflow:hidden;
  display:grid;grid-template-rows:var(--top) 1fr var(--bottom);height:100vh;height:100dvh}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
[hidden]{display:none!important}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
:focus-visible{outline:2px solid var(--gold);outline-offset:2px}

/* top bar */
.fb-top{display:flex;align-items:center;gap:18px;padding:0 20px;background:var(--paper);border-bottom:1px solid var(--line);z-index:5;min-width:0}
.fb-logo img{display:block;height:40px;width:auto}
.fb-title{min-width:0;border-left:1px solid var(--line);padding-left:18px;line-height:1.1}
.fb-eyebrow{display:block;font-size:10px;letter-spacing:.3em;text-transform:uppercase;color:var(--muted)}
.fb-title h1{font-family:var(--serif);font-weight:600;font-size:22px;color:var(--navy);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fb-title h1 span{font-weight:500;color:var(--muted)}
.fb-actions{margin-left:auto;display:flex;gap:8px}
.fb-btn{display:inline-flex;align-items:center;gap:8px;height:38px;padding:0 14px;border:1px solid var(--line);border-radius:999px;background:#fff;
  font-size:13px;font-weight:600;color:var(--navy);white-space:nowrap;transition:border-color .15s,background .15s}
.fb-btn:hover{border-color:var(--gold)}
.fb-btn small{font-weight:500;color:var(--muted);font-size:11px}

/* stage */
.fb-stage{position:relative;display:flex;align-items:center;justify-content:center;min-height:0;
  background:radial-gradient(ellipse at 50% 40%,#1d2a52 0%,var(--navy-2) 55%,var(--navy-deep) 100%)}
.fb-bookwrap{position:absolute;inset:18px 76px}
.fb-book{width:100%;height:100%}
.fb-book .stf__wrapper{height:100%}
.fb-book .stf__block{filter:drop-shadow(0 18px 30px rgba(0,0,0,.45))}
.page{background:#fff}
.page img{display:block;width:100%;height:100%;object-fit:cover;user-select:none;-webkit-user-drag:none;pointer-events:none;opacity:0;transition:opacity .25s}
.page img.in{opacity:1}
.page::before{content:"";position:absolute;inset:0;background:linear-gradient(110deg,#f1efe9 30%,#faf9f6 50%,#f1efe9 70%);background-size:300% 100%;animation:shimmer 1.4s linear infinite;z-index:-1}
@keyframes shimmer{from{background-position:100% 0}to{background-position:0 0}}
.fb-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:3;width:48px;height:48px;border-radius:50%;display:grid;place-items:center;
  color:var(--gold-soft);background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.14);transition:background .15s,opacity .15s}
.fb-arrow:hover{background:rgba(255,255,255,.14)}
.fb-arrow svg{width:22px;height:22px}
.fb-arrow.prev{left:16px}.fb-arrow.next{right:16px}
.fb-arrow[disabled]{opacity:.25;cursor:default}
.fb-noscript{color:#fff;text-align:center;padding:24px}.fb-noscript a{color:var(--gold-2);text-decoration:underline}

/* bottom bar */
.fb-bottom{display:flex;align-items:center;gap:16px;padding:0 20px;background:var(--navy-deep);border-top:1px solid rgba(255,255,255,.08);color:#d7dbe4}
.fb-btn.ghost{background:transparent;border-color:rgba(255,255,255,.18);color:#e8ebf1}
.fb-btn.ghost:hover{border-color:var(--gold)}
.fb-scrub{flex:1;display:flex;align-items:center;min-width:0}
.fb-scrub input{width:100%;accent-color:var(--gold);height:28px;cursor:pointer}
.fb-count{font-variant-numeric:tabular-nums;font-size:13px;font-weight:600;letter-spacing:.04em;min-width:86px;text-align:right}

/* contents drawer */
.fb-scrim{position:fixed;inset:0;background:rgba(5,9,20,.5);z-index:20}
.fb-toc{position:fixed;top:0;bottom:0;left:0;width:min(400px,100vw);z-index:21;background:var(--paper);display:flex;flex-direction:column;box-shadow:12px 0 40px rgba(0,0,0,.3)}
.toc-head{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 0 16px;border-bottom:1px solid var(--line)}
.toc-tabs{display:flex;gap:4px}
.toc-tabs button{padding:10px 12px 12px;font-size:13px;font-weight:600;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px}
.toc-tabs button[aria-selected=true]{color:var(--navy);border-color:var(--gold)}
.toc-close{width:40px;height:40px;font-size:26px;line-height:1;color:var(--muted);border-radius:50%}
.toc-close:hover{color:var(--navy);background:var(--paper-2)}
.toc-body{flex:1;overflow:auto;-webkit-overflow-scrolling:touch;padding:14px 16px 32px}
.toc-search input{width:100%;height:40px;border:1px solid var(--line);border-radius:10px;padding:0 12px;font:inherit;font-size:14px;background:#fff;margin-bottom:12px}
.toc-search input:focus{outline:none;border-color:var(--gold)}
.toc-sec{margin:6px 0 14px}
.toc-sec>button{display:flex;width:100%;justify-content:space-between;align-items:baseline;padding:8px 0 6px;border-bottom:1px solid var(--line);
  font-family:var(--serif);font-size:20px;font-weight:600;color:var(--navy);text-align:left}
.toc-sec ul{list-style:none;columns:2;column-gap:18px;padding-top:4px}
.toc-sec li button{display:flex;width:100%;justify-content:space-between;gap:8px;padding:5px 0;font-size:13.5px;text-align:left;color:var(--ink);break-inside:avoid}
.toc-sec li button:hover,.toc-sec>button:hover{color:var(--gold)}
.pg{font-variant-numeric:tabular-nums;color:var(--muted);font-size:12px;font-family:var(--sans);font-weight:500}
.toc-none{color:var(--muted);font-size:14px;padding:8px 0}
.thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:12px}
.thumbs button{display:flex;flex-direction:column;gap:4px;align-items:center;font-size:11px;color:var(--muted)}
.thumbs img{width:100%;aspect-ratio:1100/1555;object-fit:cover;background:#fff;border:1px solid var(--line);border-radius:2px}
.thumbs button:hover img,.thumbs button.cur img{border-color:var(--gold);box-shadow:0 0 0 2px var(--gold)}

/* enlarge */
.fb-zoom{position:fixed;inset:0;z-index:30;background:rgba(6,10,22,.97);display:flex;flex-direction:column}
.zoom-bar{display:flex;align-items:center;justify-content:space-between;padding:8px 8px 8px 20px;color:#e8ebf1;font-size:13px;font-weight:600}
.zoom-tip{font-weight:500;color:#9aa3b5}
.zoom-bar .toc-close{color:#e8ebf1}.zoom-bar .toc-close:hover{background:rgba(255,255,255,.1);color:#fff}
.zoom-body{flex:1;overflow:auto;-webkit-overflow-scrolling:touch;padding:0 12px 24px;display:flex;flex-direction:column;align-items:center;gap:14px}
.zoom-body img{display:block;width:100%;max-width:1100px;height:auto;background:#fff;cursor:zoom-in}
.zoom-body.big img{max-width:none;width:1600px;cursor:zoom-out}

@media (max-width:900px){
  .fb-title h1 span{display:none}
  .fb-bookwrap{inset:12px 60px}
  .fb-arrow{width:40px;height:40px}.fb-arrow.prev{left:10px}.fb-arrow.next{right:10px}
}
@media (max-width:640px){
  :root{--top:56px;--bottom:52px}
  .fb-top{gap:10px;padding:0 12px}
  .fb-logo img{height:30px}
  .fb-title{padding-left:10px}
  .fb-eyebrow{display:none}
  .fb-title h1{font-size:19px}
  .fb-btn{height:36px;padding:0 11px}
  .fb-actions .fb-btn span{display:none}
  .fb-bookwrap{inset:10px 12px}
  .fb-arrow{display:none}
  .fb-bottom{gap:10px;padding:0 12px}
  .fb-bottom .fb-btn span{display:none}
  .fb-count{min-width:70px}
  .toc-sec ul{columns:2}
}
@media (max-width:360px){.fb-title{display:none}}
@media (prefers-reduced-motion:reduce){.page::before{animation:none}}
