/* Isolated rendering of the same physical LoveBook V1 engine inside the
   couple page. @scope prevents selectors such as .book and .workspace from
   altering the other Ziarama pages and global navigation. */
/* Pages are paper in every mode: dark ink on light paper, even where a
   browser ignores @scope (the dark mode's light text would make them
   unreadable). */
.zi-love-book .book-page{color:#332521}
.zi-love-book .book-face{background-color:var(--book-paper,#fbf5ea)}
/* Shown once built, in one piece (see love_book_v1.js). */
.zi-love-book .book{transition:opacity .35s ease}
.zi-love-book:not(.is-built) .book{opacity:0}
@media (prefers-reduced-motion:reduce){.zi-love-book .book{transition:none}}

@scope (.zi-love-book) {
/* Love Book V1: preserves the supplied gold-foil cover, textured paper,
   3D leaf-turn, 30-tone palette, safe areas and one/two-page layout. */
:scope {
  --book-bg1:#fff1ee; --book-bg2:#efc4c8; --book-ui:#5a2231;
  --book-heart:#d9576f; --book-c1:#7a1830; --book-c2:#3b0a17;
  --book-ac:#8a1c33; --book-gold:#d9b46a; --book-paper:#fbf5ea;
  --pw:360px; --ph:511px;
  --grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .3 0 0 0 0 .2 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
* { box-sizing:border-box }
:scope { height:100%; }
:scope {
  margin:0; min-height:100dvh; display:flex; flex-direction:column; overflow:hidden;
  padding:env(safe-area-inset-top,0) env(safe-area-inset-right,0)
      env(safe-area-inset-bottom,0) env(safe-area-inset-left,0);
  background:radial-gradient(ellipse at 50% 35%,var(--book-bg1),var(--book-bg2));
  color:var(--book-ui);font-family:"Cormorant Garamond",Georgia,serif;
}
:scope button,:scope input,:scope select,:scope textarea{font:inherit}
button {cursor:pointer}
button:disabled {opacity:.3;cursor:default}
.hearts{position:fixed;inset:0;overflow:hidden;pointer-events:none}
.hearts span{position:absolute;bottom:-2rem;opacity:0;color:var(--book-heart);font-size:var(--s);animation:up var(--d) linear infinite}
@keyframes up{10%{opacity:.45}100%{transform:translateY(-110vh) rotate(40deg);opacity:0}}
.book-header{display:flex;gap:14px;align-items:center;justify-content:space-between;padding:14px clamp(16px,4vw,38px);z-index:4;font:600 13px/1.3 system-ui,sans-serif}
.book-header a{color:inherit;text-decoration:none}
.book-header .return{display:inline-flex;align-items:center;gap:8px}
.book-header .return:first-letter{font-size:25px}
.book-header .preview{font-size:12px}
.book-brand{text-align:center;letter-spacing:.2em}
.book-brand small{display:block;font-size:9px;letter-spacing:.25em;opacity:.65;margin-top:4px}
.book-edit-toolbar{position:relative;z-index:4;display:flex;gap:8px;overflow-x:auto;padding:8px 14px;scrollbar-width:none}
.book-edit-toolbar[hidden]{display:none}
.book-edit-toolbar button{flex:none;padding:9px 14px;border:1px solid rgba(90,34,49,.22);border-radius:20px;background:rgba(255,255,255,.55);color:inherit}
.book-edit-toolbar .danger{color:#9d243a}
.workspace{display:flex;flex:1;min-height:0;position:relative;gap:12px;padding:0 clamp(8px,2vw,22px)}
.book-stage{position:relative;display:grid;place-items:center;flex:1;min-width:0;min-height:0;perspective:2600px;touch-action:pan-y;outline:0}
.book{position:relative;width:calc(var(--pw)*2);height:var(--ph);transform-style:preserve-3d;transition:transform .9s cubic-bezier(.4,.1,.2,1)}
.book.port{width:var(--pw)}
.book-ground{position:absolute;left:0;right:0;bottom:-20px;height:26px;background:radial-gradient(closest-side,rgba(0,0,0,.5),transparent);filter:blur(8px)}
.book:not(.port).at-cover .book-ground{left:50%}
.book:not(.port).at-end .book-ground{right:50%}
.book-edge{position:absolute;top:3px;bottom:3px;width:7px;background:repeating-linear-gradient(90deg,#d9ccb2 0 1px,#fbf3e2 1px 2px);border-radius:1px}
.book-edge.left{left:-6px}.book-edge.right{right:-6px}.book.port .book-edge{display:none}
.book-leaf{position:absolute;left:50%;top:0;width:50%;height:100%;transform-origin:left center;transform-style:preserve-3d;-webkit-transform-style:preserve-3d;transition:transform .9s cubic-bezier(.45,.05,.2,1);will-change:transform}
.book.port .book-leaf{left:0;width:100%}
.book-face{position:absolute;inset:0;overflow:hidden;background:var(--book-paper);backface-visibility:hidden;-webkit-backface-visibility:hidden}
.book-face.front{border-radius:0 7px 7px 0;background-image:linear-gradient(90deg,rgba(60,20,20,.17),transparent 9%),var(--grain)}
.book-face.back{transform:rotateY(180deg);border-radius:7px 0 0 7px;background-image:linear-gradient(270deg,rgba(60,20,20,.17),transparent 9%),var(--grain)}
.book.port .book-face.front{border-radius:7px}
.book-cover{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#f3dca0;background:var(--grain),linear-gradient(135deg,var(--book-c1),var(--book-c2));box-shadow:inset 12px 0 14px -10px rgba(0,0,0,.7);padding:12% 9%}
.book-cover:before{content:"";position:absolute;inset:6%;border:1px solid rgba(217,180,106,.7);border-radius:4px;outline:1px solid rgba(217,180,106,.3);outline-offset:5px;pointer-events:none}
.book-cover svg{width:calc(var(--pw)*.17);fill:var(--book-gold);filter:drop-shadow(0 2px 6px rgba(0,0,0,.45));animation:beat 2.4s ease-in-out infinite}
.book-cover h1{margin:.1em 0 0;font:400 calc(var(--pw)*.23)/1.1 "Great Vibes",cursive;background:linear-gradient(100deg,#8a6a2c,#f6e3a6 30%,#c49a45 50%,#f6e3a6 70%,#8a6a2c) 0 0/200% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:foil 5s linear infinite}
.book-cover b{display:block;margin:.5em 0 .35em;font:600 calc(var(--pw)*.065)/1.2 "Cormorant Garamond",Georgia,serif;letter-spacing:.12em;text-transform:uppercase}
.book-cover p{margin:0;font-size:calc(var(--pw)*.064);font-style:italic}
.book-cover small{position:absolute;bottom:10%;font-size:calc(var(--pw)*.039);letter-spacing:.2em;opacity:.75;animation:pulse 2.4s infinite}
@keyframes beat{50%{transform:scale(1.09)}}@keyframes foil{to{background-position:-200% 0}}@keyframes pulse{50%{opacity:.25}}
.book-page{height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;position:relative;padding:9% 11%;color:#3a1a22;font-size:max(12.5px,calc(var(--pw)*.055));overflow:hidden}
.book-page h2{font:400 2.3em/1.1 "Great Vibes",cursive;color:var(--book-ac);margin:0 0 .35em}
.book-page p{margin:.4em 0;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.book-page p.drop:first-letter{float:left;font-size:3em;line-height:.8;color:var(--book-ac);padding:.06em .1em 0 0}
.book-page ul{list-style:none;padding:0;margin:0;line-height:1.5}
.book-page li{margin:.4em 0;overflow-wrap:anywhere}
.book-page li:before{content:"♥ ";color:var(--book-ac)}
.book-page figure{margin:.5em auto;width:78%;max-height:54%;background:white;padding:.4em .4em .2em;box-shadow:0 .3em .9em rgba(60,20,20,.28);transform:rotate(var(--r,-2deg))}
.book-page figure img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover}
.book-page figcaption{font-size:.8em;font-style:italic;padding:.35em 0 .1em;color:#6a3a46}
.book-page .page-number{position:absolute;bottom:4%;left:0;right:0;font-size:.75em;opacity:.5}
.book-page.bleed{padding:0}
.book-page.bleed img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.book-page.bleed:before{content:"";position:absolute;inset:0;background:linear-gradient(transparent 50%,rgba(26,10,16,.8));z-index:1}
.book-page.bleed .bleed-label{z-index:2;color:white;position:absolute;left:8%;right:8%;bottom:10%}
.book-page.bleed h2{color:white}
.book-page.bleed .page-number{color:white;z-index:3}
.book-page img{filter:blur(15px);transition:filter .55s ease,opacity .55s ease}
.book-page img.ready{filter:blur(0)}
.book-page img.no-image{filter:none;background:#e6d9c5}
.book-footer{position:relative;z-index:5;display:flex;align-items:center;justify-content:center;gap:12px;padding:6px 18px 16px}
.book-footer>button{width:46px;height:46px;flex:none;border-radius:50%;border:1px solid rgba(90,34,49,.25);background:rgba(255,255,255,.55);backdrop-filter:blur(10px);color:var(--book-ui);font-size:1.7rem;line-height:1}
.book-counter{flex:0 1 320px;text-align:center;font-size:1.05rem;min-width:80px}
.progress{height:3px;border-radius:3px;background:rgba(90,34,49,.2);margin-bottom:6px;overflow:hidden}
.progress i{display:block;height:100%;width:0;background:var(--book-heart);transition:width .5s}
.book-palette{position:fixed;bottom:calc(84px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);z-index:20;display:grid;grid-template-columns:repeat(6,34px);gap:9px;padding:14px;background:rgba(255,255,255,.9);border:1px solid rgba(90,34,49,.2);border-radius:20px;box-shadow:0 9px 35px #0002}
.book-palette[hidden]{display:none}
.book-palette button{width:34px;height:34px;border:2px solid white;border-radius:50%}
.book-editor{flex:0 0 clamp(280px,28vw,375px);align-self:stretch;overflow:auto;padding:16px 19px;background:rgba(255,255,255,.86);backdrop-filter:blur(16px);border:1px solid rgba(90,34,49,.1);border-radius:18px;box-shadow:0 10px 30px #0001;font:14px/1.45 system-ui,sans-serif}
.book-editor h2{font:500 29px "Cormorant Garamond",Georgia,serif;margin:0 0 5px}
.book-editor p{font-size:12px;opacity:.85;line-height:1.6}
.book-editor label{display:block;font-weight:600;font-size:12px;margin:10px 0}
.book-editor input,.book-editor textarea,.book-editor select{display:block;width:100%;margin-top:5px;background:white;color:#3a1a22;border:1px solid #d8bbc2;border-radius:10px;padding:9px 10px;resize:vertical}
.book-editor .book-editor-actions{display:grid;gap:8px;margin-top:12px}
.book-editor-actions button{border:1px solid #93515d;background:transparent;color:#5a2231;border-radius:10px;padding:10px}
.book-editor-actions .primary{background:var(--book-c1);color:white}
.book-editor .feedback{min-height:26px;color:#5a2231;font-weight:600}
.book-plain{position:fixed;inset:50px 10px 70px;z-index:9;background:#fbf5ea;overflow:auto;padding:22px max(18px,calc((100vw - 680px)/2));border-radius:12px;box-shadow:0 10px 45px #0004;font-size:20px;line-height:1.7}
.book-plain article{border-bottom:1px solid #c8ac98;padding:20px 0}
.book-plain img{max-width:100%;border-radius:8px}
.book-plain h2{font:32px "Great Vibes",cursive;color:var(--book-ac)}
@media(max-width:820px){.workspace:has(.book-editor){flex-direction:column}.workspace:has(.book-editor) .book-stage{min-height:40dvh}.book-editor{flex:0 1 auto;min-height:20vh;max-height:38vh}.book-header{padding:8px 14px}.book-header .preview{font-size:10px}}
@media(max-width:520px){.book-brand{font-size:10px}.book-header .return span{display:none}.book-footer{gap:7px;padding:5px 8px 13px}.book-footer>button{width:40px;height:40px}.book-palette{grid-template-columns:repeat(6,30px)}}
@media(max-height:520px){.book-footer{padding:3px 10px}.book-counter span{display:none}.book-header{padding:5px 12px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important}.book,.book-leaf{transition-duration:.01s!important}.hearts{display:none}}

:scope.zi-love-book--inline {
  box-sizing:border-box; position:relative; isolation:isolate;
  display:flex; flex-direction:column; align-items:stretch;
  width:100%; min-height:0; overflow:hidden;
  padding:clamp(15px,2vw,35px) 0 clamp(20px,4vw,55px);
  border:0; border-radius:0; margin:0;
  background:transparent!important;
  color:var(--zi-text,#3a2c2c);
  --book-bg1:transparent; --book-bg2:transparent;
  --book-ui:var(--zi-text,#3a2c2c);
  --book-gold:#d9b46a;
  --book-paper:#fbf5ea;
}
:scope.zi-love-book--inline .hearts {display:none}
:scope.zi-love-book--inline .workspace {
  min-height:0; height:clamp(340px,67vw,690px); width:100%;
  max-width:1160px; padding:0 clamp(4px,3vw,24px);
  margin:0 auto; overflow:hidden; flex:none;
}
:scope.zi-love-book--inline .book-stage {min-height:0; width:100%}
:scope.zi-love-book--inline .book-footer {
  width:min(560px,100%); margin:auto; padding:16px 10px 8px;
}
:scope.zi-love-book--inline .book-inline-top {
  text-align:center; padding:0 12px clamp(10px,2vw,23px); color:inherit;
}
:scope.zi-love-book--inline .book-inline-kicker {
  font:600 11px/1.5 "DM Sans",system-ui,sans-serif; letter-spacing:.19em;
}
:scope.zi-love-book--inline .book-inline-decoration {
  display:block; font:22px/1.2 "Cormorant Garamond",Georgia,serif;
  color:var(--book-gold); padding-top:6px;
}
:scope.zi-love-book--inline .book-loading {
  position:absolute; inset:0; display:grid;place-items:center;
  color:inherit; font:17px "Cormorant Garamond",serif;
}
:scope.zi-love-book--inline .book-counter {font-size:15px}
:scope.zi-love-book--inline .book-plain {
  position:absolute; inset:40px min(10px,2vw) 80px;
  overflow:auto; z-index:11;
}
:scope.zi-love-book--inline .book-leaf {cursor:pointer}
:scope.zi-love-book--inline .book-page img {object-fit:cover}
:scope.zi-love-book--inline .book-page.bleed img {height:100%;width:100%}
:scope.zi-love-book--inline .book {transform-origin:center center}
@media(max-width:540px) {
  :scope.zi-love-book--inline .workspace {height:min(520px,105vw)}
  :scope.zi-love-book--inline .book-footer {padding-top:8px}
  :scope.zi-love-book--inline .book-inline-kicker {font-size:10px}
}
}
/* The cover colour is editorial data and must never follow light/dark mode. */
html[data-zi-theme="dark"] .zi-love-book--inline {
  color:var(--zi-text,#f4eadc); background:transparent;
}
html[data-zi-theme="light"] .zi-love-book--inline {
  color:var(--zi-text,#4e302f); background:transparent;
}
@media(prefers-color-scheme: dark) {
  html:not([data-zi-theme]) .zi-love-book--inline {color:#f4eadc}
}

@scope (.zi-love-book) {

/* Original physical model: textured leaves, tactile turning, visible edges. */
.book-leaf{transform-style:preserve-3d;-webkit-transform-style:preserve-3d;filter:none!important}
.book-face.front,.book-face.back{box-shadow:inset 0 0 11px rgba(57,30,22,.09)}
.book-face.front::after,.book-face.back::after{
  content:"";position:absolute;inset:0;pointer-events:none;z-index:7;
  background:linear-gradient(90deg,rgba(24,13,13,.7),transparent 70%);
  opacity:var(--fold-shadow,0)
}
.book-face.back::after{background:linear-gradient(270deg,rgba(24,13,13,.7),transparent 70%)}
.book-page{color:#332521;line-height:1.35}
.book-page-blocks .book-block-quote{font-style:italic;line-height:1.5}
.book-page-blocks .book-block-caption{font-style:italic;opacity:.94}
.book-page-blocks .book-block-heart{font-size:3.5em;animation:beat 2.4s ease-in-out infinite}
.book-page.bleed.pending-photo{background:linear-gradient(135deg,#f7c6b0,#c9506e)}
.book-page.bleed.pending-photo[data-index="5"]{background:linear-gradient(145deg,#e9b8d8,#7a3b8c)}
.book-page.bleed.pending-photo[data-index="8"]{background:linear-gradient(145deg,#f3c98b,#c2506a)}
.book-page.bleed.pending-photo::before{
  content:"";position:absolute;inset:0;z-index:1;
  background:radial-gradient(circle at 75% 26%,rgba(255,255,255,.5) 0 9%,transparent 9.5%),
    linear-gradient(180deg,transparent 40%,rgba(28,13,17,.78))
}
.book-page.bleed.pending-photo .book-bleed-content{
  position:absolute;inset:0;padding:10% 8%;z-index:2;
  display:flex;flex-direction:column;align-items:center;justify-content:flex-end;
  color:#fff;background:transparent
}
.book-page.bleed .book-bleed-content .book-block,
.book-page.bleed .book-bleed-content h2{color:#fff;text-shadow:0 1px 6px rgba(0,0,0,.28)}
.book-demo-photo{padding:5px;background:#fff}
.book-photo-placeholder{
  display:grid;place-items:center;position:relative;
  width:100%;aspect-ratio:4/3;min-height:90px;
  color:rgba(255,255,255,.85);font-size:clamp(32px,7vw,62px);
  background:linear-gradient(145deg,#f6b7a8,#d96a85)
}
.book-photo-placeholder::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(circle at 72% 23%,rgba(255,255,255,.35) 0 11%,transparent 11.5%),
    linear-gradient(165deg,transparent 50%,rgba(62,28,50,.2) 51%)
}
.book-cover-date{
  font-size:clamp(13px,calc(var(--pw)*.044),21px);
  font-weight:600;letter-spacing:.08em;opacity:1;color:#f3dca0
}
.book-cover-initials{letter-spacing:.15em}
.book-cover h1{max-width:100%;overflow-wrap:anywhere}
.book-page .book-block-paragraph{line-height:1.55}
.book-page-blocks .book-block-date{opacity:1;color:#654533}
@media(prefers-reduced-motion:reduce){.book-page-blocks .book-block-heart{animation:none}}

:scope.zi-love-book--inline{height:auto;min-height:0;overflow:hidden;background:transparent!important}
:scope.zi-love-book--inline .workspace{
  width:100%;max-width:1480px;height:clamp(590px,72vw,860px);
  min-height:0;overflow:visible;padding:0 clamp(8px,2vw,28px)
}
:scope.zi-love-book--inline .book-stage{height:100%;min-height:0;perspective:2600px}
:scope.zi-love-book--inline .book-footer{padding:18px 10px 12px}
:scope.zi-love-book--inline .book-page{color:#332521}
@media(max-width:620px){
  :scope.zi-love-book--inline .workspace{
    height:clamp(520px,145vw,760px);padding:0 6px
  }
  :scope.zi-love-book--inline .book-footer{padding:8px 5px 14px}
}
}

/* Browser 3D: CSS filter on the leaf flattened its front/back faces and
   made the front cover appear mirrored on the inside of the open book. */
.zi-love-book--inline .book-leaf{filter:none!important;transform-style:preserve-3d!important}

/* Dark mode: the pages stay paper, so their words keep the paper's ink (as in
   light mode); the cover keeps its gold foil. A global dark rule painted the
   page titles and lines light on the ivory paper. Words over a full-page
   photo (.bleed) keep their own light colour. */
.zi-love-book .book-cover h1{-webkit-text-fill-color:transparent}
html[data-zi-theme="dark"] .zi-love-book .book-cover :is(p,b,small,.book-cover-date){color:#f3dca0!important}
html[data-zi-theme="dark"] .zi-love-book .book-page:not(.bleed) :is(.lb-line,p,li,blockquote,.book-block-quote){color:#332521!important}
html[data-zi-theme="dark"] .zi-love-book .book-page:not(.bleed) :is(h1,h2,h3,h4,.book-block-title){color:#643e2b!important}
@media (prefers-color-scheme:dark){
  html:not([data-zi-theme="light"]) .zi-love-book .book-cover :is(p,b,small,.book-cover-date){color:#f3dca0!important}
  html:not([data-zi-theme="light"]) .zi-love-book .book-page:not(.bleed) :is(.lb-line,p,li,blockquote,.book-block-quote){color:#332521!important}
  html:not([data-zi-theme="light"]) .zi-love-book .book-page:not(.bleed) :is(h1,h2,h3,h4,.book-block-title){color:#643e2b!important}
}
