@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Tajawal:wght@400;500;700;800&display=swap');
:root{--gold:#eac9a0;--cream:#f6eddf;--plum:#633e54;--dark:#1b202e}*{box-sizing:border-box}html,body{margin:0;overflow:hidden;width:100%;height:100%;background:#172d38;color:var(--cream);font-family:'Tajawal',Tahoma,Arial,sans-serif;-webkit-tap-highlight-color:transparent}button{font-family:inherit;cursor:pointer}#world{width:100vw;height:100dvh;display:block;touch-action:none;position:fixed;inset:0}#vignette{pointer-events:none;position:fixed;inset:0;background:radial-gradient(ellipse at 50% 47%,transparent 25%,rgba(9,17,29,.49) 100%);mix-blend-mode:multiply}#flash{pointer-events:none;position:fixed;inset:0;background:#ead9c5;opacity:0;z-index:35;transition:opacity .7s}#loading,#unsupported{position:fixed;inset:0;z-index:100;background:radial-gradient(ellipse at 50% 42%,#425569,#15212e);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:18px;text-align:center;padding:24px}#loading strong{font:700 34px 'Amiri',serif;color:#fff4e7}#loading span{font-size:15px;color:#ddcdbf}.loading-heart{font-size:90px;color:#edc29e;animation:breathe 2.5s infinite}.loadbar{width:190px;height:3px;border-radius:10px;background:#ffffff26;overflow:hidden}.loadbar i{display:block;height:100%;width:20%;background:#e3c39c;transition:width .5s}@keyframes breathe{50%{transform:scale(1.15);opacity:.58}}[hidden]{display:none!important}.error-wrap{max-width:360px;text-align:center;line-height:1.9}.error-wrap span{font-size:80px}.error-wrap h2{font-family:Amiri,serif;font-size:33px}.error-wrap p{font-size:16px;color:#e6dbce}#hud{position:fixed;inset:0 0 auto;height:calc(83px + env(safe-area-inset-top));padding:calc(16px + env(safe-area-inset-top)) 21px 8px;z-index:12;display:flex;align-items:center;justify-content:space-between;gap:9px;background:linear-gradient(to bottom,#0b1925cf,#17253370,transparent);pointer-events:none}.brand{display:flex;flex-direction:column;gap:4px}.brand b{font-family:Amiri,serif;font-size:27px;line-height:1}.brand small{font-size:11px;color:#e2d5bf;opacity:.87}.quick{display:flex;gap:8px;pointer-events:auto}.quick button{height:38px;min-width:38px;border:1px solid #f6e6d75a;color:#f5e7d0;background:#0f253f7d;border-radius:50%;font-size:22px;backdrop-filter:blur(10px)}#heartMeter{position:fixed;z-index:10;top:calc(81px + env(safe-area-inset-top));left:19px;right:19px;pointer-events:none}#heartMeter>span{display:block;font-size:12px;text-shadow:0 2px 4px #172e4c;margin-bottom:5px;color:#ead7c4}#heartMeter b{padding-right:6px}.meter{height:3px;background:#fff5e25a;overflow:hidden;border-radius:30px}.meter i{display:block;background:linear-gradient(90deg,#e7b3ba,#f3dbad);width:0%;height:100%;transition:width .7s}#sceneTitle{position:fixed;z-index:9;top:calc(118px + env(safe-area-inset-top));right:0;left:0;text-align:center;pointer-events:none;text-shadow:0 2px 18px #09263a;display:flex;flex-direction:column;gap:0}#sceneTitle span{font-size:12px;letter-spacing:1px;color:#edd7ba}#sceneTitle strong{font:700 36px Amiri,serif;color:#fff6e9}#sceneTitle small{font-size:13px;color:#f9e9d8}#hotspots{position:fixed;inset:0;z-index:10;pointer-events:none}.hotspot{pointer-events:auto;position:absolute;transform:translate(-50%,-50%);background:#1b243dab;border:1px solid #e9c99bc2;color:#fff2db;backdrop-filter:blur(9px);border-radius:30px;padding:8px 11px;box-shadow:0 0 16px #f6dba34d,0 8px 20px #14233b40;max-width:155px;font:700 13px Tajawal,sans-serif;white-space:nowrap;display:flex;align-items:center;gap:7px;transition:opacity .3s}.hotspot .h-dot{background:#fff1c7;color:#674a52;border-radius:50%;width:22px;height:22px;display:flex;align-items:center;justify-content:center;font-size:13px}.hotspot.done{border-color:#83bda8;background:#1b574cbd}.hotspot.locked{opacity:.65}#orbitNote{position:fixed;bottom:calc(121px + env(safe-area-inset-bottom));left:15px;right:15px;text-align:center;z-index:8;pointer-events:none;font-size:12px;color:#f2ebe1;text-shadow:0 2px 5px #162536}#bottomNav{position:fixed;bottom:calc(21px + env(safe-area-inset-bottom));left:13px;right:13px;display:flex;justify-content:center;gap:8px;z-index:14;pointer-events:none}#bottomNav button{pointer-events:auto;border:1px solid #fff3e59e;padding:13px 18px;background:#1a2f43cc;backdrop-filter:blur(12px);color:#fff3e7;border-radius:30px;font-size:14px;font-weight:700;box-shadow:0 5px 16px #15212d40}#bottomNav .highlight{background:linear-gradient(135deg,#f4dcb4,#d597a9);color:#3a2734;border:0}#roseScore,#wipeScore{position:fixed;z-index:11;top:calc(194px + env(safe-area-inset-top));width:100%;text-align:center;text-shadow:0 3px 10px #12293d;color:#fff0df;font-size:15px;pointer-events:none}#wipeScore{top:auto;bottom:calc(184px + env(safe-area-inset-bottom));padding:10px 28px}.wipeBar{height:4px;border-radius:8px;background:#f7e4d0a0;width:210px;max-width:70vw;margin:12px auto;overflow:hidden}.wipeBar i{height:100%;width:0%;display:block;background:#f6bdce}.veil{position:fixed;inset:0;z-index:40;background:radial-gradient(ellipse at 40% 30%,#1724387d,#0d1d30eb);display:flex;align-items:center;justify-content:center;padding:18px}.welcome-inner{text-align:center;max-width:520px;width:100%;padding:18px;border:1px solid #fff6df35;border-radius:25px;background:#23334466;backdrop-filter:blur(9px)}.compass{font-size:27px;color:#e7c6ae;letter-spacing:12px;margin:20px 0 17px}.eyebrow{color:#dbbca8;letter-spacing:2px;font-size:11px}.welcome h1{font:700 clamp(29px,6.8vw,43px) Amiri,serif;line-height:1.6;margin:20px auto;color:#fff0df}.welcome p{line-height:2.2;font-size:15px;color:#f9ebde}.welcome button,.paper-button{margin:28px auto 15px;border:0;border-radius:30px;padding:14px 44px;color:#4a2c3a;background:linear-gradient(125deg,#eec1c8,#f7deb2);font-size:18px;font-weight:800;box-shadow:0 8px 30px #ba77995e}.welcome small{display:block;margin:12px 10px 18px;color:#d9cfc9;font-size:12px}.modal{padding:12px;background:#122235c2;backdrop-filter:blur(7px)}.paper{position:relative;width:min(620px,96vw);max-height:min(87dvh,880px);overflow:auto;border-radius:6px 26px 10px 26px;background:linear-gradient(125deg,#fff8e9,#f8e8d5 61%,#eddbc3);color:#60435a;box-shadow:10px 20px 80px #071524b9,0 0 0 1px #c1a27f;transform:perspective(1100px) rotateY(-1deg);padding:36px clamp(26px,6vw,50px) 24px;scrollbar-width:thin}.paper:before{content:"";position:absolute;inset:11px;border:1px solid #c9a78166;pointer-events:none}.paper .close{position:sticky;top:0;float:left;border:0;border-radius:50%;background:#623e5499;color:#fff7ea;font-size:26px;width:35px;height:35px;z-index:2}.letter-kicker{text-align:center;font-size:13px;color:#b58e82;margin-top:22px}.paper h2{text-align:center;font:700 32px Amiri,serif;margin:16px 0;color:#70465a}.letter-text{font-family:Amiri,Tahoma,serif;font-size:clamp(21px,4.2vw,26px);line-height:2.05;white-space:pre-wrap;text-align:right;word-break:normal}.paper-button{display:block;font-size:15px;margin:26px auto 11px}.paper-shadow{position:absolute;inset:10%;transform:rotate(-4deg);background:#aa826330;filter:blur(50px)}#bookModal{display:flex;flex-direction:column;justify-content:space-around;gap:8px;background:radial-gradient(ellipse at center,#6d5361eb,#152436ef);padding:calc(env(safe-area-inset-top) + 12px) 13px calc(env(safe-area-inset-bottom) + 10px)}.book-head{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#fff3df}.book-head h2{font:700 23px Amiri,serif;margin:0}.book-head button{border:1px solid #ffffff5c;background:#ffffff1f;border-radius:50%;color:white;font-size:25px;width:38px;height:38px}.book-head span{font-size:12px}.book-shell{perspective:1400px;display:flex;justify-content:center;flex:1;min-height:0}.book-page{position:relative;overflow:auto;width:min(490px,94vw);height:100%;max-height:69dvh;border-radius:9px 23px 23px 9px;color:#634759;background:linear-gradient(105deg,#dbc3a7 0%,#fff8ec 7%,#fff8eb 91%,#d4b998 100%);transform-style:preserve-3d;box-shadow:14px 13px 24px #1018279c,-12px 4px 12px #f5dcba57,inset -13px 0 12px #95746025}.book-page.turn-next{animation:bookFlip .6s cubic-bezier(.24,.65,.3,1)}.book-page.turn-prev{animation:bookFlipBack .6s cubic-bezier(.24,.65,.3,1)}@keyframes bookFlip{0%{transform:rotateY(0)}45%{transform:rotateY(28deg) translateX(-10px)}100%{transform:rotateY(0)}}@keyframes bookFlipBack{0%{transform:rotateY(0)}45%{transform:rotateY(-28deg) translateX(10px)}100%{transform:rotateY(0)}}.page-content{padding:36px 28px 28px;min-height:100%;border:1px solid #c4a17c7d;margin:9px;outline:1px solid #a98e6952;outline-offset:-16px;position:relative;text-align:center}.page-content h3{font:700 30px Amiri,serif;color:#754a61;margin:22px 0}.page-content .page-section{font-size:12px;color:#aa8574;letter-spacing:2px}.page-content .page-text{text-align:right;white-space:pre-wrap;font:21px/1.85 Amiri,Tahoma,serif;color:#604a52}.page-content img{width:78%;max-height:240px;object-fit:cover;border:8px solid #e6d3b6;box-shadow:0 8px 16px #4c29353a}.page-content .page-foot{font-size:12px;margin-top:24px;color:#b18a91}.page-cover{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;background:linear-gradient(145deg,#7c536b,#a77c8a,#663e60);margin:-27px -19px;color:#f6dbb1}.page-cover h2{font:700 46px Amiri,serif;color:#fff1dc;margin:0}.page-cover .cover-heart{font-size:110px;line-height:1}.book-controls,.book-export{display:flex;gap:12px;align-items:center;justify-content:center}.book-controls button,.book-export button,.book-export a{border:1px solid #edd0ad80;background:#f0d2b3;color:#4a3142;border-radius:24px;padding:10px 20px;font-size:14px;font-weight:700;text-decoration:none}.book-controls button:disabled{opacity:.3}.book-export{flex-direction:column;gap:5px}.book-export a{background:#f5ede6}.book-export #pdfMessage{font-size:12px;text-align:center;color:#fff3e6}#toast{position:fixed;z-index:200;bottom:calc(env(safe-area-inset-bottom) + 92px);left:12%;right:12%;pointer-events:none;color:#fff8e7;text-align:center;opacity:0;transition:opacity .3s;background:#2a3248c9;border:1px solid #f2d4b661;border-radius:30px;padding:12px}#toast.show{opacity:1}#previewBar{position:fixed;z-index:30;top:calc(147px + env(safe-area-inset-top));left:12px;display:flex;flex-direction:column;background:#1b223ccb;backdrop-filter:blur(8px);border:1px solid #f4dcb88c;padding:8px;border-radius:13px;gap:7px}#previewBar span{font-size:10px;text-align:center}#previewBar button{font-size:12px;border:0;color:#3c3441;border-radius:9px;padding:7px;background:#f7dfc8}@media(max-height:660px){#sceneTitle{top:100px}#orbitNote{bottom:88px}.welcome h1{font-size:26px}.welcome-inner{padding:6px}.welcome .compass{margin:3px 0}.welcome button{margin:11px auto}.paper{max-height:86dvh}}

.hotspot.tiny{padding:6px;border-radius:50%;width:40px;height:40px;justify-content:center;box-shadow:0 0 19px #f5d89c7d}.hotspot.tiny span:nth-child(2){display:none}.hotspot.tiny .h-dot{background:none;color:#ffdfce;width:auto;height:auto;font-size:24px}.hotspot.tiny.done{background:#426355df}.hotspot:focus-visible,.quick button:focus-visible{outline:3px solid #fbe1c0;outline-offset:2px}

#previewToggle{position:fixed;z-index:31;left:12px;bottom:calc(24px + env(safe-area-inset-bottom));border:1px solid #f4dcb88c;color:#fce7cb;border-radius:20px;padding:9px 13px;background:#1b223cc9;font-size:12px}#previewBar{top:auto;bottom:calc(73px + env(safe-area-inset-bottom))}#previewBar button{padding:8px 14px}
