@font-face {
  font-family: "Dioni Gallery Gelica";
  src: url("assets/gallery/gelica-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* This section owns its layout; the earlier sections and native scroll stay intact. */
.book-gallery {
  --font-gallery-heading: "Dioni Doodle Serif";
  position: relative;
  isolation: isolate;
  direction: ltr;
  width: 100%;
  background: #fdfbf9;
  color: #2b1a07;
}

.book-gallery h2 { margin: 0; }
/* Keep the original heading footprint when the copy changes to Arabic. */
.book-gallery .gallery-title { width: 7.789em; }
.book-gallery :where(img, svg) { display: block; vertical-align: middle; }
.book-gallery img { max-width: 100%; height: auto; }

/* Scoped equivalents of the source layout utilities. */
.gallery-relative { position: relative; }
.gallery-absolute { position: absolute; }
.gallery-sticky { position: sticky; }
.gallery-inset-0 { inset: 0; }
.gallery-top-0 { top: 0; }
.gallery-bottom-0 { bottom: 0; }
.gallery-w-full { width: 100%; }
.gallery-w-screen { width: 100vw; }
.gallery-h-full { height: 100%; }
.gallery-h-screen { height: 100vh; }
.gallery-h-auto { height: auto; }
.gallery-flex { display: flex; }
.gallery-shrink-0 { flex-shrink: 0; }
.gallery-justify-between { justify-content: space-between; }
.gallery-m-0 { margin: 0; }
.gallery-p-0 { padding: 0; }
.gallery-hidden { display: none; }
.gallery-overflow-hidden { overflow: hidden; }
.gallery-overflow-visible { overflow: visible; }
.gallery-overflow-x-auto { overflow-x: auto; }
.gallery-overflow-y-hidden { overflow-y: hidden; }
.gallery-pointer-events-none { pointer-events: none; }
.gallery-pointer-events-auto { pointer-events: auto; }
.gallery-select-none { -webkit-user-select: none; user-select: none; }
.gallery-object-contain { object-fit: contain; }
.gallery-scale-75 { scale: 0.75; }
.gallery-origin-top-left { transform-origin: top left; }

.book-gallery [data-gallery-mobile] { display: none; }
.book-gallery [data-gallery-desktop] { height: 100vh; }
.book-gallery [data-gallery-sticky] {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.book-gallery[data-gallery-motion="scroll"] [data-gallery-desktop] { height: 400vh; }
.book-gallery[data-gallery-motion="scroll"] [data-gallery-sticky] {
  position: sticky;
  overflow: hidden;
}
.book-gallery [data-gallery-swipe] { -webkit-overflow-scrolling: touch; }
.gallery-no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.gallery-no-scrollbar::-webkit-scrollbar,
.book-gallery [data-gallery-sticky]::-webkit-scrollbar { display: none; }
.book-gallery [data-gallery-swipe]:focus-visible,
.book-gallery [data-gallery-sticky]:focus-visible {
  outline: 2px solid #2b1a07;
  outline-offset: -4px;
}

.gallery-cursor-grab {
  cursor: url("assets/cursors/drag-cursor.svg") 14 12, url("assets/cursors/drag-cursor.png") 14 12, grab;
}
.book-gallery [data-gallery-sticker] {
  --gallery-drag-x: 0px;
  --gallery-drag-y: 0px;
  transform: translate(var(--gallery-drag-x), var(--gallery-drag-y));
  scale: 1;
  filter: drop-shadow(-12px 40px 20px rgb(0 0 0 / 0));
  touch-action: none;
  transition: scale 350ms cubic-bezier(0.2, 1.5, 0.5, 1), filter 300ms;
}
.book-gallery [data-gallery-sticker][data-dragging="true"] {
  scale: 1.03;
  filter: drop-shadow(16px 32px 12px rgb(0 0 0 / 0.12));
  cursor: url("assets/cursors/grab-cursor.svg") 14 8, url("assets/cursors/grab-cursor.png") 14 8, grabbing;
}

@media (min-width: 768px) {
  .gallery-md-block { display: block; }
  .gallery-md-hidden { display: none; }
  .gallery-md-scale-70 { scale: 0.7; }
  .gallery-md-scale-75 { scale: 0.75; }
  .gallery-md-scale-80 { scale: 0.8; }
  .gallery-md-scale-90 { scale: 0.9; }
  .gallery-md-origin-center { transform-origin: center; }
  .gallery-md-origin-top-left { transform-origin: top left; }
  .gallery-md-origin-bottom-left { transform-origin: bottom left; }
}

@media (max-width: 1023px) {
  .book-gallery [data-gallery-desktop] { display: none; }
  .book-gallery [data-gallery-mobile] { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .book-gallery [data-gallery-track] { transform: none !important; }
  .book-gallery [data-gallery-sticker],
  .book-gallery .gallery-sticker-main,
  .book-gallery .gallery-sticker-flap { transition: none; }
}

/* Original mobile composition: <500, 500–767, and 768–1023px. */
  .book-gallery [data-gallery-layout="m0"] { margin-left: initial; width: 387.294svh; }
  .book-gallery [data-gallery-layout="m1"] { left: -10.0243%; }
  .book-gallery [data-gallery-layout="m2"] { left: 11.1786%; }
  .book-gallery [data-gallery-layout="m3"] { left: 12.9101%; }
  .book-gallery [data-gallery-layout="m4"] { left: 0px; }
  .book-gallery [data-gallery-layout="m5"] { width: min(30vw, 129px); }
  .book-gallery [data-gallery-layout="m6"] { font-size: min(6vw, 28px); }
  .book-gallery [data-gallery-layout="m7"] { left: 6.68287%; }
  .book-gallery [data-gallery-layout="m8"] { left: 2.12637%; z-index: 30; }
  .book-gallery [data-gallery-layout="m9"] { left: 11.9988%; }
  .book-gallery [data-gallery-layout="m10"] { left: 20.0486%; }
  .book-gallery [data-gallery-layout="m11"] { left: 9.41677%; }
  .book-gallery [data-gallery-layout="m12"] { left: 22.9344%; }
  .book-gallery [data-gallery-layout="m13"] { left: 25.2126%; }
  .book-gallery [data-gallery-layout="m14"] { left: 26.8834%; }
  .book-gallery [data-gallery-layout="m15"] { left: 24.3013%; }
  .book-gallery [data-gallery-layout="m16"] { left: 26.1239%; }
  .book-gallery [data-gallery-layout="m17"] { left: 30.5893%; }
  .book-gallery [data-gallery-layout="m18"] { left: 37.0595%; }
  .book-gallery [data-gallery-layout="m19"] { left: 42.5273%; }
  .book-gallery [data-gallery-layout="m20"] { left: 43.5905%; }
  .book-gallery [data-gallery-layout="m21"] { left: 46.4763%; }
  .book-gallery [data-gallery-layout="m22"] { left: 47.5395%; }
  .book-gallery [data-gallery-layout="m23"] { left: 50.4253%; }
  .book-gallery [data-gallery-layout="m24"] { left: 56.4702%; }
  .book-gallery [data-gallery-layout="m25"] { left: 65.6136%; }
  .book-gallery [data-gallery-layout="m26"] { left: 60.7533%; }
  .book-gallery [data-gallery-layout="m27"] { left: 71.3852%; }
  .book-gallery [data-gallery-layout="m28"] { left: 86.7254%; }
  .book-gallery [data-gallery-layout="m29"] { left: 74.1191%; }
  .book-gallery [data-gallery-layout="m30"] { left: 87.2114%; }
@media (min-width: 500px) {
  .book-gallery [data-gallery-layout="m0"] { margin-left: initial; width: 396.706svh; }
  .book-gallery [data-gallery-layout="m1"] { left: -8.80923%; }
  .book-gallery [data-gallery-layout="m2"] { left: 12.3937%; }
  .book-gallery [data-gallery-layout="m3"] { left: 14.1252%; }
  .book-gallery [data-gallery-layout="m4"] { left: 0px; }
  .book-gallery [data-gallery-layout="m5"] { width: min(30vw, 129px); }
  .book-gallery [data-gallery-layout="m6"] { font-size: min(6vw, 28px); }
  .book-gallery [data-gallery-layout="m7"] { left: 9.113%; }
  .book-gallery [data-gallery-layout="m8"] { left: 3.34143%; z-index: 30; }
  .book-gallery [data-gallery-layout="m9"] { left: 14.4289%; }
  .book-gallery [data-gallery-layout="m10"] { left: 22.4787%; }
  .book-gallery [data-gallery-layout="m11"] { left: 10.6318%; }
  .book-gallery [data-gallery-layout="m12"] { left: 25.3645%; }
  .book-gallery [data-gallery-layout="m13"] { left: 27.6428%; }
  .book-gallery [data-gallery-layout="m14"] { left: 29.3135%; }
  .book-gallery [data-gallery-layout="m15"] { left: 26.7315%; }
  .book-gallery [data-gallery-layout="m16"] { left: 28.5541%; }
  .book-gallery [data-gallery-layout="m17"] { left: 33.0194%; }
  .book-gallery [data-gallery-layout="m18"] { left: 39.4897%; }
  .book-gallery [data-gallery-layout="m19"] { left: 44.9575%; }
  .book-gallery [data-gallery-layout="m20"] { left: 46.0207%; }
  .book-gallery [data-gallery-layout="m21"] { left: 48.9064%; }
  .book-gallery [data-gallery-layout="m22"] { left: 49.9696%; }
  .book-gallery [data-gallery-layout="m23"] { left: 52.8554%; }
  .book-gallery [data-gallery-layout="m24"] { left: 58.9004%; }
  .book-gallery [data-gallery-layout="m25"] { left: 68.0437%; }
  .book-gallery [data-gallery-layout="m26"] { left: 63.1835%; }
  .book-gallery [data-gallery-layout="m27"] { left: 73.8153%; }
  .book-gallery [data-gallery-layout="m28"] { left: 89.1555%; }
  .book-gallery [data-gallery-layout="m29"] { left: 76.5492%; }
  .book-gallery [data-gallery-layout="m30"] { left: 89.6416%; }
}
@media (min-width: 768px) {
  .book-gallery [data-gallery-layout="m0"] { margin-left: calc(-384px + 50vw); width: 413.176svh; }
  .book-gallery [data-gallery-layout="m1"] { left: -6.98663%; }
  .book-gallery [data-gallery-layout="m2"] { left: 14.2163%; }
  .book-gallery [data-gallery-layout="m3"] { left: 15.9478%; }
  .book-gallery [data-gallery-layout="m4"] { left: calc(384px - 50vw); }
  .book-gallery [data-gallery-layout="m5"] { width: min(20vw, 140px); }
  .book-gallery [data-gallery-layout="m6"] { font-size: min(5vw, 36px); }
  .book-gallery [data-gallery-layout="m7"] { left: 13.3657%; }
  .book-gallery [data-gallery-layout="m8"] { left: 5.16403%; z-index: 20; }
  .book-gallery [data-gallery-layout="m9"] { left: 18.6817%; }
  .book-gallery [data-gallery-layout="m10"] { left: 26.7315%; }
  .book-gallery [data-gallery-layout="m11"] { left: 12.4544%; }
  .book-gallery [data-gallery-layout="m12"] { left: 29.6173%; }
  .book-gallery [data-gallery-layout="m13"] { left: 31.8955%; }
  .book-gallery [data-gallery-layout="m14"] { left: 33.5662%; }
  .book-gallery [data-gallery-layout="m15"] { left: 30.9842%; }
  .book-gallery [data-gallery-layout="m16"] { left: 32.8068%; }
  .book-gallery [data-gallery-layout="m17"] { left: 37.2722%; }
  .book-gallery [data-gallery-layout="m18"] { left: 43.7424%; }
  .book-gallery [data-gallery-layout="m19"] { left: 49.2102%; }
  .book-gallery [data-gallery-layout="m20"] { left: 50.2734%; }
  .book-gallery [data-gallery-layout="m21"] { left: 53.1592%; }
  .book-gallery [data-gallery-layout="m22"] { left: 54.2224%; }
  .book-gallery [data-gallery-layout="m23"] { left: 57.1081%; }
  .book-gallery [data-gallery-layout="m24"] { left: 63.1531%; }
  .book-gallery [data-gallery-layout="m25"] { left: 72.2965%; }
  .book-gallery [data-gallery-layout="m26"] { left: 67.4362%; }
  .book-gallery [data-gallery-layout="m27"] { left: 78.068%; }
  .book-gallery [data-gallery-layout="m28"] { left: 93.4083%; }
  .book-gallery [data-gallery-layout="m29"] { left: 80.8019%; }
  .book-gallery [data-gallery-layout="m30"] { left: 93.8943%; }
}

/* Source sticker folds and paper lighting. */
.book-gallery{--sticker-p:10px;--sticker-peel-easing:2s linear(0,.002 0.4%,.008 0.9%,.02 1.4%,.035 1.9%,.055 2.4%,.083 3%,.11 3.5%,.146 4.1%,.214 5.1%,.297 6.2%,.624 10.2%,.756 11.9%,.821 12.8%,.874 13.6%,.93 14.5%,.975 15.3%,1.016 16.1%,1.053 16.9%,1.085 17.7%,1.116 18.6%,1.139 19.4%,1.16 20.3%,1.176 21.2%,1.187 22.1%,1.195 23.2%,1.197 24.4%,1.193 25.6%,1.183 26.9%,1.17 28.1%,1.153 29.4%,1.055 35.6%,1.031 37.3%,1.012 38.8%,.994 40.6%,.98 42.3%,.97 44.1%,.964 45.9%,.961 48.3%,.964 51.1%,.97 53.7%,.997 62.7%,1.003 66%,1.007 69.3%,1.007 74.4%,1 89.2%,1);--sticker-peel-hover-easing:1s linear(0,.008 1.1%,.031 2.2%,.129 4.8%,.257 7.2%,.671 14.2%,.789 16.5%,.881 18.6%,.957 20.7%,1.019 22.9%,1.063 25.1%,1.094 27.4%,1.114 30.7%,1.112 34.5%,1.018 49.9%,.99 59.1%,1);--sticker-start:calc(-1*var(--sticker-p));--sticker-end:calc(100% + var(--sticker-p))}
.gallery-sticker-container{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;z-index:100;--main-p1-x:var(--sticker-start);--main-p1-y:var(--sticker-start);--main-p2-x:var(--sticker-end);--main-p2-y:var(--sticker-start);--main-p3-x:var(--sticker-end);--main-p3-y:var(--sticker-end);--main-p4-x:var(--sticker-start);--main-p4-y:var(--sticker-end);--flap-p1-x:var(--sticker-start);--flap-p1-y:var(--sticker-start);--flap-p2-x:var(--sticker-end);--flap-p2-y:var(--sticker-start);--flap-p3-x:var(--sticker-end);--flap-p3-y:var(--sticker-start);--flap-p4-x:var(--sticker-start);--flap-p4-y:var(--sticker-start);--flap-top:calc(-100% - var(--sticker-p)*2);--flap-left:0px;--flap-scale-x:1;--flap-scale-y:-1;position:relative}
.gallery-sticker-main{width:100%;height:100%;clip-path:polygon(var(--main-p1-x)var(--main-p1-y),var(--main-p2-x)var(--main-p2-y),var(--main-p3-x)var(--main-p3-y),var(--main-p4-x)var(--main-p4-y));transition:clip-path var(--sticker-peel-hover-easing);will-change:clip-path}
.gallery-sticker-flap{width:100%;height:100%;left:var(--flap-left);top:var(--flap-top);clip-path:polygon(var(--flap-p1-x)var(--flap-p1-y),var(--flap-p2-x)var(--flap-p2-y),var(--flap-p3-x)var(--flap-p3-y),var(--flap-p4-x)var(--flap-p4-y));transform:scaleX(var(--flap-scale-x))scaleY(var(--flap-scale-y));transition:clip-path var(--sticker-peel-hover-easing),top var(--sticker-peel-hover-easing),left var(--sticker-peel-hover-easing);will-change:clip-path,transform,top,left;position:absolute}
.gallery-sticker-container.gallery-no-transition .gallery-sticker-main,.gallery-sticker-container.gallery-no-transition .gallery-sticker-flap{transition:none!important}
