@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500;600&display=swap');
.room-dialog.book-dialog,.room-dialog:has(.sint-book-scene){width:min(1450px,96vw);max-height:96svh;background:transparent;border:0;box-shadow:none;overflow:visible;padding:0;color:#493526}
.room-dialog.book-dialog>#dialog-content,.room-dialog:has(.sint-book-scene)>#dialog-content{max-height:none;overflow:visible}
.room-dialog:has(.sint-book-scene)::backdrop{background:#061b21d9;backdrop-filter:blur(9px)}
.room-dialog:has(.sint-book-scene)>.dialog-close{right:40px;top:41px;background:#f6e9cd;color:#6d4831;border:1px solid #b9945f;box-shadow:0 2px 10px #4a2a1e16}
.sint-book-scene{position:relative;padding:30px 22px 27px;perspective:2000px;isolation:isolate}
.book-desk-glow{position:absolute;inset:10% -3% -5%;border-radius:50%;background:radial-gradient(ellipse,#c29a5f24,transparent 67%);filter:blur(22px);pointer-events:none;z-index:-2}
.book-spread{position:relative;display:grid;grid-template-columns:50% 50%;grid-template-rows:minmax(0,1fr);align-items:stretch;height:min(760px,calc(94svh - 74px));min-height:0;border:8px solid #712d2d;border-left-width:10px;border-right-width:11px;border-radius:16px 22px 22px 15px;background:#e9d7b4;box-shadow:0 7px 0 #451c20,0 11px 0 #b48d55,0 14px 0 #4c2022,0 25px 45px #0007,0 70px 100px #0005;transform-style:preserve-3d}
.book-spread::before{content:'';position:absolute;inset:5px -5px -6px -5px;background:repeating-linear-gradient(0deg,#c3aa7e 0,#c3aa7e 1px,#ead8b5 1px,#ead8b5 3px);border-radius:12px 18px 17px 12px;z-index:-1;box-shadow:0 1px 0 #f5e7ca}
.book-page{position:relative;background-color:#f7edd6;background-image:radial-gradient(ellipse at 10% 20%,#e0c99b22,transparent 55%),repeating-linear-gradient(15deg,#96764203 0,#96764203 1px,transparent 1px,transparent 5px);min-width:0}
.book-page-left{height:100%;min-height:0;border-radius:7px 0 0 8px;background-image:linear-gradient(90deg,#c9a87522,transparent 6%,transparent 86%,#c4aa7777 100%),radial-gradient(ellipse at 30% 20%,#fff9e9,#f1e3c5);box-shadow:inset 2px 0 5px #5c371b12;overflow:visible}
.book-page-left::before,.book-page-left::after{content:'';position:absolute;width:41px;height:41px;border:1px solid #be985b77;pointer-events:none;z-index:2}
.book-page-left::before{left:20px;top:20px;border-right:0;border-bottom:0}.book-page-left::after{left:20px;bottom:20px;border-right:0;border-top:0}
.book-page-right{height:100%;min-height:0;border-radius:0 11px 11px 0;max-height:none;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;background-image:linear-gradient(90deg,#b4996c77 0,#ddc9a122 5%,transparent 12%,transparent 96%,#bd9a6233),radial-gradient(ellipse at 60% 40%,#fff9eb,#f4e7cb);scrollbar-color:#b99a70 #eddfc5;scrollbar-width:thin}
.book-spine{position:absolute;left:50%;top:0;bottom:0;width:25px;transform:translateX(-50%);background:linear-gradient(90deg,transparent,#553d272b 34%,#f4e9cb45 49%,#543b2b35 51%,transparent);z-index:3;pointer-events:none}
.book-writing-panel{position:relative;height:100%;min-height:0;padding:35px 38px 24px;display:flex;align-items:center;flex-direction:column;text-align:center;color:#735334}
.book-page-emblem{color:#b18a45;width:35px;height:43px;margin:0 auto 13px}.book-page-emblem svg{width:100%;height:100%}
.book-page-kicker{font-family:var(--font,'DM Sans',sans-serif);font-size:11px;letter-spacing:2.6px;text-transform:uppercase;color:#aa844d;margin-bottom:18px}
.book-writing-title{font-family:var(--serif,Georgia,serif);font-weight:400;font-size:clamp(31px,3.1vw,44px);line-height:1.17;color:#6c3c2f;margin:0}
.book-flourish{width:160px;height:25px;color:#b49358;margin:17px auto 12px}.book-flourish svg{width:100%;height:100%}
.book-writing-caption{font-size:13px;line-height:1.7;color:#9a8060;max-width:265px;margin:0 auto}
.book-writing-area{position:relative;width:100%;min-height:180px;margin:23px auto 15px;padding:15px 8px 22px}
.book-name-label{font-family:var(--font,'DM Sans',sans-serif);font-size:12px;letter-spacing:1px;color:#9c8059;margin:0 0 15px;text-transform:uppercase;min-height:14px}
.book-handwriting{position:relative;color:#4d362b;font-family:'Caveat','Segoe Print','Bradley Hand',cursive;font-weight:500;line-height:1.23;letter-spacing:-.02em;text-align:center;overflow-wrap:anywhere;white-space:pre-wrap;text-shadow:0 .3px .3px #77482544;min-height:65px}
.book-written-letter{display:inline-block;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.book-name-placeholder{font-family:'Caveat','Segoe Print','Bradley Hand',cursive;font-size:clamp(29px,2.6vw,38px);line-height:1.5;color:#ac92716b;padding:9px 0 15px}
.book-writing-line{width:80%;height:1px;background:linear-gradient(90deg,transparent,#ba995c80 20%,#ba995c80 80%,transparent);margin:11px auto 0;position:relative}
.book-writing-line::after{content:'✧';position:absolute;left:calc(50% - 7px);top:-6px;color:#bc9b63;background:#f4e6ca;font-size:11px;line-height:13px;width:14px}
.book-pen{position:absolute;left:0;top:0;width:clamp(185px,20vw,275px);height:auto;aspect-ratio:275/245;pointer-events:none;opacity:0;z-index:7;transform-origin:10.91% 89.8%;transition:opacity .3s;will-change:transform;filter:none}
.book-pen-visible{opacity:1}.book-quill-svg{width:100%;height:100%;overflow:visible}
.book-name-accessible{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.book-page-bottom{width:100%;display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-top:auto;padding-top:24px;color:#ac8d5c}
.book-page-bottom p{font-family:'Caveat',cursive;font-size:22px;line-height:1.15;margin:0;color:#a58a63;transform:rotate(-4deg)}
.book-page-number,.book-right-page-number{font-family:var(--serif,Georgia,serif);font-size:11px;color:#aa8d5e}.book-right-page-number{position:absolute;left:0;right:0;bottom:12px;display:block;text-align:center;margin:0;pointer-events:none}.book-tiny-star{font-size:14px}
.book-bookmark{position:absolute;left:52%;top:-3px;width:22px;height:68px;background:linear-gradient(90deg,#8a3030,#b4493b 50%,#84302e);clip-path:polygon(0 0,100% 0,100% 100%,50% 84%,0 100%);z-index:5;box-shadow:2px 3px 3px #0003;pointer-events:none}
.book-bookmark::before{content:'';position:absolute;top:0;bottom:7px;left:4px;right:4px;border-left:1px solid #daaf6a77;border-right:1px solid #daaf6a77}
.book-cover{position:absolute;left:50%;right:0;top:-6px;bottom:-7px;border-radius:4px 16px 16px 4px;z-index:9;transform-origin:0 50%;transform-style:preserve-3d;backface-visibility:hidden;pointer-events:none;background:radial-gradient(ellipse at 30% 15%,#a7463c55,transparent 80%),repeating-linear-gradient(35deg,#fff1 0,#fff1 .4px,transparent .4px,transparent 3px),#752d2d;border:3px solid #b28a49;box-shadow:inset 0 0 0 7px #68292a,inset 0 0 0 8px #ba945155,8px 4px 20px #0003;animation:book-cover-opening 2.1s cubic-bezier(.32,.04,.21,1) .12s forwards}
.book-cover-inner{position:absolute;inset:30px;border:1px solid #c59c5677;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#dfbd78;text-align:center;box-shadow:inset 0 0 35px #3b142833}
.book-cover-inner::before,.book-cover-inner::after{content:'✦';position:absolute;font-size:16px;color:#d1a75d}.book-cover-inner::before{top:-9px;left:-7px}.book-cover-inner::after{bottom:-9px;right:-7px}
.book-cover-mitre{width:58px;height:72px;margin-bottom:30px}.book-cover-mitre svg{width:100%;height:100%}
.book-cover-inner>span{font-family:var(--serif,Georgia,serif);font-size:clamp(20px,2vw,29px);line-height:1.5;text-shadow:0 1px 0 #351521}
.book-cover-inner>strong{font-family:var(--serif,Georgia,serif);font-size:clamp(66px,7vw,100px);font-weight:400;line-height:1.3;text-shadow:0 2px 1px #351521;letter-spacing:2px}
.book-cover-flourish{width:200px;margin:25px 0}.book-cover-flourish svg{width:100%;height:30px}.book-cover-inner>small{font-size:8px;letter-spacing:2px;text-transform:uppercase;max-width:200px;line-height:1.8}
.sint-book-scene .room-body{padding:48px clamp(30px,4vw,65px) 40px;min-height:0}
.sint-book-scene .room-body h2{font-size:clamp(31px,3.1vw,44px);line-height:1.14;max-width:460px}
.sint-book-scene .room-body>.eyebrow,.sint-book-scene .eyebrow{font-size:9px;letter-spacing:2px}
.sint-book-scene .form-field label{font-size:14px}.sint-book-scene .form-field input,.sint-book-scene .form-field select{min-height:54px;font-size:18px}
.sint-book-scene .form-row{gap:18px}.sint-book-scene .form-field{margin-bottom:20px}.sint-book-scene .gold-button{font-size:16px;padding:17px 23px}
.sint-book-scene .child-card{padding:20px;background:#eadcbe66}.sint-book-scene .registration-note{background:#ead8ae55}
.book-page-changing::after{content:'';position:absolute;inset:0;z-index:6;pointer-events:none;background:linear-gradient(105deg,transparent 15%,#fff8dcaa 35%,#b7996933 47%,transparent 58%);animation:book-page-light .42s ease-out both}
.book-prank{position:absolute;left:36px;right:36px;bottom:104px;padding:13px 18px 11px;border:1px solid #cfb480;background:#fff7e3;box-shadow:0 5px 20px #684c2220;border-radius:4px 13px 13px 13px;text-align:left;z-index:8;animation:book-prank-pop .28s ease-out both}
.book-prank::after{content:'';position:absolute;left:25px;bottom:-7px;width:12px;height:12px;background:#fff7e3;border-right:1px solid #cfb480;border-bottom:1px solid #cfb480;transform:rotate(45deg)}
.book-prank p{font-family:'Caveat',cursive;font-size:22px;line-height:1.2;margin:0 0 7px;color:#8f5f3a}.book-prank-cookie{position:absolute;right:15px;top:-10px;width:25px;height:25px;border:2px solid #aa753b;background:radial-gradient(circle at 30% 30%,#73502c 2px,transparent 3px),radial-gradient(circle at 70% 70%,#73502c 2px,transparent 3px),#c99553;border-radius:50%;color:transparent;transform:rotate(20deg)}
.book-shoo-piet{font-size:10px!important;background:transparent;border:0;padding:4px 0;color:#8c4d31!important;text-decoration:underline;text-decoration-color:#cba37a;text-underline-offset:3px;font-family:var(--font,'DM Sans',sans-serif);position:relative;z-index:1}
.book-crumbs{position:absolute;inset:40% 0 0;z-index:4;pointer-events:none}.book-crumbs i{position:absolute;width:6px;height:5px;background:#b98a4d;border-radius:45% 20% 35% 50%;box-shadow:1px 1px 2px #69451c55;animation:book-crumb-drop .5s ease-out both}.book-crumbs i:nth-child(1){left:38%;top:20%;transform:rotate(32deg)}.book-crumbs i:nth-child(2){left:48%;top:42%;width:4px;height:4px}.book-crumbs i:nth-child(3){left:57%;top:29%;transform:rotate(74deg);animation-delay:.1s}.book-crumbs i:nth-child(4){left:62%;top:57%;width:3px;height:3px;animation-delay:.14s}.book-crumbs i:nth-child(5){left:45%;top:70%;width:3px;height:3px;animation-delay:.08s}
.book-confirmed .book-page-emblem{color:#977839}.book-confirmed .book-writing-caption{color:#697340}
@keyframes book-cover-opening{0%{transform:rotateY(0);opacity:1}65%{opacity:1}100%{transform:rotateY(-170deg);opacity:0;visibility:hidden}}
@keyframes book-page-light{from{opacity:.6;transform:translateX(25%)}to{opacity:0;transform:translateX(-30%)}}
@keyframes book-prank-pop{from{opacity:0;transform:translateY(8px) rotate(-2deg)}to{opacity:1;transform:none}}
@keyframes book-crumb-drop{from{opacity:0;translate:0 -20px}to{opacity:1;translate:0 0}}
@media(min-width:1500px){.book-writing-panel{padding-top:48px}.book-writing-area{margin-top:40px}.book-writing-title{font-size:48px}}
@media(max-width:1000px) and (min-width:701px){.book-writing-panel{padding:35px 25px 24px}.book-writing-title{font-size:32px}.book-page-kicker{font-size:10px;letter-spacing:1.8px}.book-writing-area{padding-left:0;padding-right:0}.sint-book-scene .room-body{padding:45px 30px 30px}.book-prank{left:20px;right:20px}.book-prank p{font-size:19px}.book-page-bottom p{font-size:19px}}
@media(max-width:700px){
 .room-dialog.book-dialog,.room-dialog:has(.sint-book-scene){width:97vw;max-height:94svh;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;border-radius:12px;background:transparent}
 .room-dialog:has(.sint-book-scene)>.dialog-close{right:23px;top:23px;position:absolute;z-index:12}
 .sint-book-scene{padding:14px 9px 24px;perspective:1300px;overflow:hidden}
 .book-spread{display:block;height:auto;border-width:6px;border-radius:13px;min-height:0;box-shadow:0 5px 0 #471e20,0 8px 0 #af8c59,0 11px 0 #472020,0 16px 30px #0005}
 .book-page-left{height:auto;border-radius:6px 6px 0 0;overflow:hidden;background-image:radial-gradient(ellipse at 50% 10%,#fff8e4,#efdfbd);border-bottom:1px solid #c8ab7666}
 .book-writing-panel{height:auto;min-height:0;padding:22px 24px 18px}
 .book-page-emblem{width:22px;height:28px;margin:0 auto 6px}.book-page-kicker{font-size:9px;letter-spacing:2px;margin-bottom:8px}.book-writing-title{font-size:25px;line-height:1.1}.book-writing-title br{display:none}.book-flourish{width:100px;height:15px;margin:9px auto 5px}.book-writing-caption{font-size:11px;max-width:270px}
 .book-writing-area{min-height:105px;margin:7px auto 0;padding:8px 5px 11px}.book-name-label{font-size:10px;margin-bottom:5px}.book-name-placeholder{font-size:28px;padding:3px 0 5px}.book-handwriting{min-height:43px}.book-writing-line{margin-top:5px}.book-pen{width:185px}
 .book-page-bottom{display:none}.book-page-left::before{top:13px;left:13px;width:27px;height:27px}.book-page-left::after{left:auto;right:13px;bottom:13px;width:27px;height:27px;border-left:0;border-right:1px solid #be985b77}
 .book-page-right{height:auto;border-radius:0 0 7px 7px;max-height:none;overflow:visible;background-image:radial-gradient(ellipse at 50% 40%,#fff9eb,#f4e7cb)}
 .book-spine{display:none}.book-bookmark{left:calc(100% - 35px);width:15px;height:49px}
 .book-cover{left:0;right:-2px;top:-3px;bottom:-3px;border-radius:8px;animation-duration:2.1s}.book-cover-inner{inset:18px;justify-content:flex-start;padding-top:70px}.book-cover-mitre{width:44px;height:57px;margin-bottom:20px}.book-cover-inner>strong{font-size:76px}.book-cover-inner>span{font-size:25px}
 .sint-book-scene .room-body{padding:29px 22px 25px;min-height:0}.sint-book-scene .room-body h2{font-size:31px}.sint-book-scene .form-row{gap:12px}.sint-book-scene .form-field label{font-size:12px}.sint-book-scene .form-field input,.sint-book-scene .form-field select{font-size:18px;min-height:52px}.sint-book-scene .child-card{padding:14px}.sint-book-scene .gold-button{font-size:15px;padding:15px 18px}
 .book-prank{bottom:20px;left:25px;right:25px;padding:10px 14px;background:#fff7e3ed}.book-prank p{font-size:19px;margin-bottom:3px}.book-shoo-piet{font-size:9px!important}
}
@media(prefers-reduced-motion:reduce){.book-cover{display:none}.sint-book-scene *{animation:none!important;transition:none!important}.book-pen{display:none}}

.book-closing .book-cover{animation:book-cover-closing 1.55s cubic-bezier(.45,0,.6,1) forwards;opacity:1;visibility:visible}
.book-closing .book-page-left{transform-origin:right center;backface-visibility:hidden;animation:book-left-page-closing 1.55s cubic-bezier(.45,0,.6,1) forwards;z-index:8}
.book-closing .book-spread{animation:book-base-closing 1.55s cubic-bezier(.45,0,.6,1) forwards}
@keyframes book-cover-closing{from{transform:rotateY(-180deg);opacity:1;visibility:visible}to{transform:rotateY(0);opacity:1;visibility:visible}}
@keyframes book-left-page-closing{from{transform:rotateY(0)}to{transform:rotateY(180deg)}}
@keyframes book-base-closing{from{clip-path:inset(-15% -15% -15% -15%)}to{clip-path:inset(-15% -15% -15% 50%)}}
@media(max-width:700px){.book-closing .book-page-left{animation:none}.book-closing .book-spread{animation:none}}
@media(prefers-reduced-motion:reduce){.book-closing .book-cover,.book-closing .book-page-left,.book-closing .book-spread{animation:none!important}}

@media(min-width:701px) and (max-height:820px){
 .book-writing-panel{padding:22px 30px 18px}
 .book-page-emblem{height:28px;width:24px;margin-bottom:8px}
 .book-page-kicker{margin-bottom:8px}
 .book-writing-title{font-size:34px}
 .book-flourish{height:15px;margin:8px auto 6px}
 .book-writing-area{min-height:145px;margin:10px auto 8px;padding-top:10px;padding-bottom:16px}
 .book-name-label{margin-bottom:8px}
 .book-page-bottom{padding-top:10px}
 .book-page-bottom p{font-size:19px}
}
@media(min-width:701px) and (max-height:650px){
 .book-page-emblem,.book-page-bottom{display:none}
 .book-writing-panel{padding-top:20px}
 .book-flourish{margin-top:6px;margin-bottom:5px}
 .book-writing-area{margin-top:6px}
}
