/* ===== FLIP BOOK (Tools page shelf) — goes with assets/flipbook.js ===== */
.flipbook { margin-top: 10px; }
.fb-hint { font-family: 'Caveat', cursive; font-size: 1.45rem; color: #f6c21b; text-align: center; margin: 14px 0 8px; }
.fb-stage { perspective: 2200px; touch-action: pan-y; user-select: none; -webkit-user-select: none; padding: 6px 0 4px; }
.fb-book { position: relative; margin: 0 auto; max-width: 900px; transition: transform .25s; --throw: 0; }
.fb-dragging { transition: none; cursor: grabbing; }
.fb-stage { cursor: grab; }

/* paper */
.fb-under, .fb-face { position: absolute; top: 0; bottom: 0; overflow: hidden; color: #2a2419; background: #fffdf2; }
.fb-face { backface-visibility: hidden; -webkit-backface-visibility: hidden; inset: 0; }
.fb-back { transform: rotateY(180deg); }
.fb-leaf { position: absolute; top: 0; bottom: 0; transform-style: preserve-3d; transform-origin: left center; z-index: 3; --shade: 0; will-change: transform; }
.fb-face::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: var(--shade);
  background: linear-gradient(90deg, rgba(60,40,0,.0) 0%, rgba(60,40,0,.55) 100%); }
.fb-back::after { background: linear-gradient(270deg, rgba(60,40,0,0) 0%, rgba(60,40,0,.55) 100%); }

/* WIDE: open book, spine in the middle, the right page turns */
.fb-spread .fb-book { border-radius: 8px 16px 16px 8px; box-shadow: 0 30px 70px rgba(0,0,0,.7); }
.fb-spread .fb-l { left: 0; width: 50%; border-radius: 8px 0 0 8px; background: linear-gradient(90deg, #f3ead2, #fffdf2 88%, #e7dcbf); }
.fb-spread .fb-r { left: 50%; width: 50%; border-radius: 0 16px 16px 0; background: linear-gradient(90deg, #e7dcbf, #fffdf2 12%, #f3ead2); }
.fb-spread .fb-leaf { left: 50%; width: 50%; }
.fb-spread .fb-front { border-radius: 0 16px 16px 0; background: linear-gradient(90deg, #e7dcbf, #fffdf2 12%, #f3ead2); }
.fb-spread .fb-back { border-radius: 16px 0 0 16px; background: linear-gradient(270deg, #e7dcbf, #fffdf2 12%, #f3ead2); }
.fb-spread .fb-r::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: var(--throw);
  background: linear-gradient(90deg, rgba(40,25,0,.6), rgba(40,25,0,0) 60%); }
.fb-spine { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: rgba(120,90,30,.35); z-index: 4; pointer-events: none; }
.fb-single .fb-spine { display: none; }

/* PHONE: one page, it peels away to the left */
.fb-single .fb-book { max-width: 460px; }
.fb-single .fb-under, .fb-single .fb-leaf { left: 0; width: 100%; }
.fb-single .fb-under, .fb-single .fb-face { border-radius: 6px 14px 14px 6px; box-shadow: 0 16px 40px rgba(0,0,0,.6); }
.fb-single .fb-l { display: none; }
.fb-single .fb-back { background: #efe4c6; }
.fb-single .fb-under::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: var(--throw); background: rgba(40,25,0,.35); }
.fb-probe { visibility: hidden; position: absolute; left: 0; top: 0; bottom: auto !important; height: auto; }

/* what's on a page */
.fb-cover { position: relative; display: flex; align-items: center; justify-content: center; padding: 26px 24px 10px; }
.fb-spread .fb-cover { height: 100%; box-sizing: border-box; padding: 34px; }
.fb-cover img { width: 100%; max-width: 330px; height: auto; display: block; border-radius: 3px 7px 7px 3px; box-shadow: 6px 8px 20px rgba(60,45,10,.4); transform: rotate(-1.2deg); background: #fff; pointer-events: none; }
.fb-cover img.wide { max-width: 100%; transform: none; }
.fb-single .fb-cover { padding: 16px 18px 4px; }
.fb-single .fb-cover img { max-width: 150px; max-height: 190px; width: auto; }
.fb-single .fb-desc { font-size: .9rem; line-height: 1.45; }
.fb-single .fb-details h4 { font-size: 1.3rem; margin-bottom: 6px; }
.fb-single .fb-price { font-size: 1.4rem; margin: 8px 0 2px; }
.fb-single .fb-note { display: none; }
.fb-single .fb-num { font-size: 1rem; }
.fb-single .fb-btn { padding: 8px 16px; min-width: 96px; font-size: .98rem; }
.fb-single .fb-cover img.wide { max-width: 100%; max-height: none; width: 100%; }
.fb-flag { position: absolute; top: 10px; left: 50%; transform: translateX(-50%) rotate(-2deg); background: #f6c21b; color: #111; font-family: 'Nunito', sans-serif; font-weight: 800; font-size: .72rem; letter-spacing: .05em; padding: 3px 12px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.35); white-space: nowrap; z-index: 2; }
.fb-details { padding: 30px 30px 26px; }
.fb-single .fb-details { padding: 4px 18px 18px; }
.fb-num { display: block; font-family: 'Caveat', cursive; font-size: 1.15rem; color: #9a8a62; margin-bottom: 2px; }
.fb-details h4 { font-family: 'Kaushan Script', cursive; font-weight: 400; font-size: clamp(1.35rem, 3.4vw, 1.85rem); line-height: 1.2; color: #7c2d12; margin: 0 0 10px; }
.fb-desc { font-family: 'Nunito', sans-serif; font-size: .97rem; line-height: 1.55; color: #3f382a; margin: 0; }
.fb-price { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 1.7rem; color: #166534; margin: 14px 0 4px; }
.fb-save { display: inline-block; background: #4ade80; color: #0b2013; font-family: 'Nunito', sans-serif; font-weight: 800; border-radius: 999px; padding: 4px 14px; margin-bottom: 8px; }
.fb-buy { display: inline-block; margin-top: 8px; }
.fb-note { margin: 14px 0 0; font-family: 'Nunito', sans-serif; font-size: .84rem; color: #6b6250; border-top: 1px dashed #c9bb96; padding-top: 10px; }

/* "press here" hand, until they touch it */
.fb-hand { position: absolute; right: 8%; bottom: 14%; z-index: 6; font-size: 2.4rem; pointer-events: none; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); animation: fbSwipe 2.2s ease-in-out infinite; }
.fb-hand.gone { display: none; }
@keyframes fbSwipe { 0%, 15% { transform: translateX(0) rotate(-10deg); opacity: 0; } 25% { opacity: 1; } 70% { transform: translateX(-120px) rotate(-25deg); opacity: 1; } 85%, 100% { transform: translateX(-140px) rotate(-25deg); opacity: 0; } }

/* buttons */
.fb-ctrl { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 6px 0 12px; }
.fb-btn { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 1.05rem; color: #111; background: #f6c21b; border: 3px solid #111; border-radius: 999px; padding: 10px 22px; box-shadow: 4px 4px 0 #9d4ee6; cursor: pointer; min-width: 112px; }
.fb-btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #9d4ee6; }
.fb-btn:disabled { opacity: .35; cursor: default; }
.fb-count { font-family: 'Caveat', cursive; font-size: 1.5rem; color: #f2f2f2; min-width: 64px; text-align: center; }

/* the strip: every cover at a glance, tap to jump */
.fb-strip { display: flex; gap: 14px; overflow-x: auto; padding: 14px 6px 12px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.fb-mini { --ac: #f6c21b; flex: 0 0 92px; scroll-snap-align: center; appearance: none; background: none; border: 0; padding: 0; cursor: pointer; text-align: center; font: inherit; transition: transform .15s; }
.fb-mini img { width: 100%; height: 118px; object-fit: cover; object-position: top; display: block; border-radius: 3px 6px 6px 3px; border: 2px solid #2e2e38; box-shadow: 4px 4px 0 var(--ac); background: #fff; }
.fb-mini .t { display: block; margin-top: 7px; font-family: 'Nunito', sans-serif; font-weight: 800; font-size: .74rem; line-height: 1.25; color: #f2f2f2; }
.fb-mini .s { display: block; font-family: 'Nunito', sans-serif; font-size: .68rem; color: #9ca3af; line-height: 1.25; }
.fb-mini .p { display: block; font-family: 'Nunito', sans-serif; font-weight: 800; font-size: .76rem; color: #f6c21b; }
.fb-mini:hover { transform: translateY(-3px); }
.fb-mini.on { transform: translateY(-6px); }
.fb-mini.on img { border-color: var(--ac); box-shadow: 0 0 0 3px var(--ac), 0 0 22px var(--ac); }
@media (prefers-reduced-motion: reduce) { .fb-hand { display: none; } }
.fb-single .fb-hand { bottom: auto; top: 16%; right: 10%; }
