@font-face{font-family:'Rouge Script';src:url('../assets/fonts/rouge-script/RougeScript.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
#modal.guestbook-modal>.panel:not(#guestbookPanel){display:none}
#modal #guestbookPanel[hidden]{display:none}
#modal.guestbook-modal #guestbookPanel{display:block;max-width:1260px;width:96vw;max-height:94dvh;overflow:auto;padding:20px 25px;background:#f8edd7;border:10px solid #755242;border-radius:12px;box-shadow:0 22px 90px #0009,inset 0 0 25px #b3986780;font-family:'Rouge Script','Times New Roman',serif;font-size:26px;color:#49372d}
#guestbookPanel h2,#guestbookPanel h3,#guestbookPanel button,#guestbookPanel input,#guestbookPanel textarea{font-family:'Rouge Script','Times New Roman',serif;letter-spacing:normal;font-weight:400}
#guestbookPanel h2{color:#6a4632;font-size:46px;text-align:center;margin:0 0 12px}
.book-spread{display:grid;grid-template-columns:1fr 1fr;gap:0;box-shadow:0 2px 12px #50331e40}
.book-page{position:relative;padding:22px 28px 40px;background:linear-gradient(90deg,#d9c5a7,#fff9e9 7%,#fffaed 93%,#e8d8bc);display:grid;grid-template-rows:repeat(4,minmax(135px,auto));align-content:start;min-width:0}
.book-page+.book-page{border-left:2px solid #a48c67}
.guest-entry{border-bottom:1px solid #c7b58e;padding:7px 0 13px;overflow-wrap:anywhere}
#guestbookPanel .guest-signature{font-size:32px;color:#684332;margin:0 0 3px}
.guest-date{font-size:21px;line-height:1.2;color:#756248;display:block}
.guest-message{font-size:27px;line-height:1.2;white-space:pre-wrap;margin:9px 0 0}
.page-number{position:absolute;bottom:7px;left:50%;font-size:23px}
.book-navigation{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:18px 0 4px;font-size:23px}
#guestbookPanel button{font-size:26px;background:#77533c;color:#fff6e8;border:1px solid #b69a64;padding:8px 18px}
#guestbookPanel button:disabled{opacity:.4;cursor:default}
.book-return{text-align:center;font-size:22px;margin:14px 0 0;color:#705d49}
.signing-page{max-width:760px;margin:auto;background:#fff9e9;padding:18px 34px;box-shadow:inset 12px 0 24px #d9c4a355}
.signing-page>p{margin:0 0 18px;line-height:1.25}
.guest-form{display:grid;gap:9px}
.guest-form input,.guest-form textarea{width:100%;border:1px solid #bda57c;background:#fffdf5;color:#49372d;padding:8px 12px;font-size:28px;box-sizing:border-box}
.guest-form textarea{resize:vertical;min-height:130px}
.privacy-note{font-size:23px;line-height:1.25;margin:6px 0}
.guest-trap{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important}
.book-status{font-size:26px;line-height:1.3;color:#71462f;margin:12px 0}
.empty-book{text-align:center;font-size:28px;padding:24px 0}
.submission-thanks{font-size:34px;line-height:1.3;padding:25px 10px}
@media(max-width:700px){#modal.guestbook-modal{padding:8px}#modal.guestbook-modal #guestbookPanel{width:100%;padding:14px 10px;border-width:5px}#guestbookPanel h2{font-size:38px}.book-spread{grid-template-columns:1fr;gap:18px}.book-page{padding:18px 20px 34px}.book-navigation{flex-wrap:wrap;justify-content:center}.signing-page{padding:14px}.book-return{font-size:23px}}
#modal.guestbook-modal #guestbookPanel p{font-family:'Rouge Script','Times New Roman',serif;font-size:26px;line-height:1.25}
#modal.guestbook-modal #guestbookPanel .guest-message{font-size:27px}
#modal.guestbook-modal #guestbookPanel .privacy-note{font-size:23px}
#modal.guestbook-modal #guestbookPanel .book-return{font-size:22px}
#modal.guestbook-modal #guestbookPanel .submission-thanks{font-size:34px}
#guestbookPanel .guest-form input,#guestbookPanel .guest-form textarea{font-family:'Times New Roman',Georgia,serif;font-size:20px;line-height:1.5}

#guestbookPanel .guest-form input,#guestbookPanel .guest-form textarea{font-family:"Lora",Georgia,serif}

/* Faceted page-turn jewels, with readable labels and generous touch targets. */
#guestbookPanel .book-navigation .book-turn{
 min-height:48px;min-width:170px;padding:11px 27px;border:0;
 color:#513c55;background:linear-gradient(145deg,#ffffff 0%,#d5effb 27%,#f7fcff 49%,#bad9ed 73%,#f5fbff 100%);
 box-shadow:inset 0 0 0 2px #bdd5e8,inset 0 5px 9px #ffffffb0;
 transition:filter .2s,background .2s;
 clip-path:polygon(14px 0,calc(100% - 14px) 0,100% 50%,calc(100% - 14px) 100%,14px 100%,0 50%);
}
#guestbookPanel .book-turn-previous::before{content:'‹';margin-right:9px}
#guestbookPanel .book-turn-next::after{content:'›';margin-left:9px}
#guestbookPanel .book-turn:hover:not(:disabled){filter:brightness(1.08)}
#guestbookPanel .book-turn:focus-visible{outline:none;box-shadow:inset 0 0 0 3px #e12885}
@media(max-width:420px){#guestbookPanel .book-navigation .book-turn{min-width:140px;font-size:23px;padding:10px 20px}}

/* Keep the open book and page controls within the viewport. */
#modal.guestbook-modal #guestbookPanel.book-reading{height:94dvh;overflow:hidden;box-sizing:border-box;display:flex;flex-direction:column}
.book-reading-content{min-height:0;flex:1;display:flex;flex-direction:column}
.book-reading .book-spread{min-height:0;flex:1;overflow:hidden}
.book-reading .book-page{min-height:0;grid-template-rows:repeat(4,minmax(0,1fr));padding:12px 22px 28px}
.book-reading .guest-entry{min-height:0;overflow:auto;padding:5px 0}
.book-reading .book-navigation{flex:none;flex-wrap:nowrap;margin:10px 0 0}
#guestbookPanel .book-close-hint{font-family:'Lora',Georgia,serif;font-size:14px;color:#777;text-align:center;line-height:1.3}
.book-reading .guest-signature{font-size:clamp(23px,3dvh,32px)!important}
.book-reading .guest-date{font-size:clamp(14px,2.1dvh,21px)}
#modal.guestbook-modal .book-reading .guest-message{font-size:clamp(20px,2.8dvh,27px);margin-top:4px}
@media(max-width:700px){
 .book-reading .book-spread{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:0}
 .book-reading .book-page{flex:0 0 100%;box-sizing:border-box;scroll-snap-align:start}
 #guestbookPanel .book-navigation .book-turn{min-width:0;padding:10px 14px;font-size:21px}
 #guestbookPanel .book-close-hint{font-size:11px}
 .book-reading .book-navigation{gap:6px}
 #guestbookPanel.book-reading h2{font-size:clamp(25px,5vw,38px)}
}
/* Directional jewel silhouettes: one clear outward point per page button. */
#guestbookPanel .book-navigation .book-turn-previous{
 clip-path:polygon(0 50%,20% 0,90% 0,100% 25%,100% 75%,90% 100%,20% 100%);
 padding-left:34px;padding-right:20px;
 background:linear-gradient(155deg,#fff 0%,#cceafb 28%,#f9fdff 49%,#a9cde5 51%,#e5f6ff 78%,#fff 100%);
}
#guestbookPanel .book-navigation .book-turn-next{
 clip-path:polygon(0 25%,10% 0,80% 0,100% 50%,80% 100%,10% 100%,0 75%);
 padding-left:20px;padding-right:34px;
 background:linear-gradient(205deg,#fff 0%,#cceafb 28%,#f9fdff 49%,#a9cde5 51%,#e5f6ff 78%,#fff 100%);
}
#guestbookPanel .book-turn-previous::before,#guestbookPanel .book-turn-next::after{content:none}

#guestbookPanel .book-navigation .book-turn{
 min-width:64px;width:72px;height:54px;min-height:48px;padding:2px 4px;
 clip-path:none;background:transparent;border:0;box-shadow:none;display:grid;place-items:center;
}
.page-crystal{display:block;width:64px;height:48px;filter:drop-shadow(0 2px 2px #758d9c40)}
.book-turn-previous .page-crystal{transform:scaleX(-1)}
#guestbookPanel .book-turn:focus-visible{outline:2px solid #e12885;outline-offset:2px;box-shadow:none;border-radius:6px}
#guestbookPanel .book-turn:hover:not(:disabled) .page-crystal{filter:brightness(1.13) drop-shadow(0 2px 3px #8bc1dc70)}

.book-reading .book-inside-cover,.book-reading .book-introduction{display:flex;align-items:center;justify-content:center;text-align:center}
#modal.guestbook-modal #guestbookPanel .inside-cover-title{font-size:clamp(30px,4vw,54px);color:#816649;max-width:85%}
#modal.guestbook-modal #guestbookPanel .book-welcome{font-size:clamp(26px,3vw,36px);line-height:1.45;max-width:90%}


#modal.guestbook-modal #guestbookPanel .guest-form p{font-family:"Lora",Georgia,serif;font-size:15px;line-height:1.5}
