body.painted-room{margin:0;background:#160f0c;overflow-x:hidden}
.painted-room main#home{max-width:none;width:100%;min-height:100svh;display:grid;place-items:center;margin:0;padding:0;background:radial-gradient(ellipse,#38261c,#160f0c 75%)}
.room{position:relative;width:min(100vw,calc(100svh * 1.59879));aspect-ratio:1586/992;container-type:inline-size;isolation:isolate;overflow:hidden;box-shadow:0 0 90px #0007}
.room-art{display:block;width:100%;height:100%;object-fit:fill;user-select:none;-webkit-user-drag:none}
.room-shade{position:absolute;inset:0;pointer-events:none;background:#140b05;opacity:0;transition:opacity .4s}
.hotspot{position:absolute;display:block;border:0;background:none;padding:0;border-radius:10px;z-index:2;isolation:isolate;touch-action:manipulation;-webkit-tap-highlight-color:transparent;cursor:pointer;overflow:visible;--tilt:0deg;--lift:-3%;--brightness:.83}
.hotspot::after{content:'✦';position:absolute;top:38%;left:48%;z-index:3;font-size:clamp(14px,2vw,30px);color:#fff0c3;text-shadow:0 0 15px #ffcd73;opacity:0;transform:translateY(8px) scale(.7);transition:opacity .35s,transform .45s;pointer-events:none}
.item-sprite{display:block;width:100%;height:100%;object-fit:contain;user-select:none;pointer-events:none;-webkit-user-drag:none;transform:rotate(var(--tilt));transform-origin:50% 85%;filter:brightness(var(--brightness)) saturate(.86) drop-shadow(3px 7px 4px #080401a0);transition:transform .42s cubic-bezier(.2,.75,.25,1),filter .42s}
.hotspot.is-entering{z-index:4}
.hotspot-label{position:absolute;left:50%;top:82%;z-index:4;transform:translate(-50%,-50%);white-space:nowrap;font-size:clamp(9px,1.15cqw,16px);line-height:1.6;letter-spacing:2.5px;color:#f3dcb0;padding:5px 16px;background:linear-gradient(90deg,transparent,#1c1008eb 14%,#27170cf2 50%,#1c1008eb 86%,transparent);border-top:1px solid #c99f5466;border-bottom:1px solid #c99f5466;box-shadow:0 4px 14px #0009;text-shadow:0 1px 3px #000;pointer-events:none;opacity:.9;transition:opacity .35s,color .35s,transform .35s,border-color .35s}
.hotspot-label::before,.hotspot-label::after{content:'';display:block;width:34px;height:1px;margin:0 auto 3px;background:linear-gradient(90deg,transparent,#dab266cc,transparent)}.hotspot-label::after{margin:3px auto 0}
.hotspot-label small{display:block;max-height:0;overflow:hidden;font-size:clamp(8px,.72vw,10px);letter-spacing:1.2px;opacity:0;transition:max-height .4s,opacity .4s;color:#cfb992}
/* Loose diagonal placement keeps the tabletop full without stacking any keepsakes. */
.h-tarot{left:4%;top:50%;width:20%;height:27%;--tilt:-7deg}
.h-lenormand{left:84%;top:46%;width:14%;height:27%;--tilt:4deg}
.h-oracle{left:26%;top:57%;width:18%;height:22%;--tilt:8deg}
.h-words{left:64%;top:60%;width:18%;height:21%;--brightness:.8;--tilt:-9deg}.h-words .hotspot-label{top:77%;left:46%}
.h-profile{left:46%;top:66%;width:16%;height:14%;--tilt:-7deg}.h-profile .hotspot-label{top:93%;left:40%}
.shelf-scene{position:absolute;left:70%;top:.5%;width:27%;height:42.5%;z-index:1;perspective:900px}
.shelf-scene::before{content:'';position:absolute;left:13%;right:6%;bottom:0;height:2%;z-index:0;border-radius:50%;background:radial-gradient(ellipse,#080401bb 0%,#08040170 45%,transparent 75%);filter:blur(3px);pointer-events:none}
.shelf-scene .h-library{inset:0;width:100%;height:100%;z-index:1;--brightness:.68}.h-library .hotspot-label{top:69%}.h-library .item-sprite{object-fit:contain;transform-origin:50% 100%}
.shelf-journal{position:absolute;left:50.6%;top:42.3%;width:5.3%;height:18.5%;padding:0;border:0;border-radius:2px;background:linear-gradient(90deg,#251412,#60372a 24%,#422020 65%,#221210);z-index:6;box-shadow:2px 0 3px #000a;transform-origin:50% 80%;transition:left .75s cubic-bezier(.2,.8,.2,1),top .75s,width .75s,height .75s,transform .75s,box-shadow .75s;touch-action:manipulation}
.shelf-journal::after{content:'';position:absolute;inset:-8px;z-index:3}
.shelf-book-spine{position:absolute;inset:3% 10%;display:flex;flex-direction:column;justify-content:space-around;align-items:center;border-top:2px double #b28b4f99;border-bottom:2px double #b28b4f99;background:repeating-linear-gradient(0deg,transparent 0 22%,#b28b4f55 23%,transparent 24% 25%);color:#cfac70;transition:opacity .25s}
.shelf-book-spine b{writing-mode:vertical-rl;font:clamp(5px,.7cqw,10px) 'SimSun',serif;letter-spacing:2px;font-weight:400}.shelf-book-spine i{font:clamp(5px,.7cqw,10px) Georgia,serif}
.shelf-book-front{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:space-around;padding:15% 8%;border:1px solid #c1a05e;outline:1px solid #9c7638;outline-offset:-5px;border-radius:3px;background:radial-gradient(ellipse at 40% 30%,#81514044,transparent),repeating-linear-gradient(120deg,#54302a,#54302a 2px,#4d2927 3px,#54302a 4px);box-shadow:inset 6px 0 7px #140705aa,3px 3px #ccb88f,5px 5px #382219;opacity:0;transform:rotateY(-75deg);transform-origin:left;transition:opacity .35s .12s,transform .6s .12s;color:#dcc28c;pointer-events:none}
.shelf-book-front::before{content:'';position:absolute;inset:10px;border:1px solid #b5945770;pointer-events:none}.shelf-book-front small{font:clamp(3px,.4cqw,7px) Georgia,serif;letter-spacing:1px}.shelf-book-front i{font:clamp(18px,3cqw,44px) Georgia,serif;text-shadow:0 0 12px #bd8f3933}.shelf-book-front b{font:clamp(7px,1.1cqw,16px) 'SimSun',serif;letter-spacing:1px;white-space:nowrap;font-weight:400}.shelf-book-front em{font-style:normal;font-size:clamp(5px,.6cqw,9px);letter-spacing:1px}
.shelf-journal.is-pulled{left:27%;top:32%;width:26%;height:36%;transform:translateZ(45px) rotate(-8deg);box-shadow:9px 20px 18px #0009}
.shelf-journal.is-pulled .shelf-book-spine{opacity:0}.shelf-journal.is-pulled .shelf-book-front{opacity:1;transform:rotateY(0)}
.shelf-scene:has(.is-pulled) .h-library .hotspot-label{opacity:0}
.shelf-return{position:absolute;left:22%;top:77%;padding:6px 12px;border:1px solid #c9a66488;outline:1px solid #ecd09629;outline-offset:-3px;border-radius:2px;background:linear-gradient(135deg,#2a1b12eb,#180f0af5);color:#ebd2a4;font-size:clamp(7px,.75cqw,11px);letter-spacing:1px;white-space:nowrap;z-index:5;box-shadow:0 4px 12px #0009}.shelf-return[hidden]{display:none}
/* Independent flame sits precisely on the cleaned candle wick. */
.candle-flame{position:absolute;left:6.47%;top:29.4%;width:1.2%;height:6%;z-index:2;pointer-events:none;transform-origin:50% 100%}
.candle-flame span{position:absolute;display:block;transform-origin:50% 100%}
.flame-halo{left:-200%;bottom:-25%;width:500%;height:210%;border-radius:50%;background:radial-gradient(ellipse,#ffca5b32,transparent 68%);mix-blend-mode:screen;animation:candle-halo 2.6s ease-in-out infinite alternate}
.flame-outer{left:15%;bottom:0;width:70%;height:100%;border-radius:55% 40% 45% 40% / 80% 70% 30% 20%;background:linear-gradient(0deg,#e18b21 0%,#ffd761 20%,#ffefaf 65%,#fff5d5);box-shadow:0 0 5px #ffcf57,0 0 15px #ffb22c77;filter:blur(.35px);animation:candle-sway .83s ease-in-out infinite alternate}
.flame-inner{left:31%;bottom:4%;width:39%;height:70%;border-radius:50% 45% 45% 45% / 80% 75% 25% 25%;background:linear-gradient(0deg,#fff1ac,#fffce5 65%,#fff9d6);animation:candle-dance .51s ease-in-out infinite alternate}
.flame-core{left:40%;bottom:1%;width:20%;height:27%;border-radius:50%;background:linear-gradient(#fff6bb,#d9ae74 70%,#66718a);filter:blur(.5px);animation:candle-dance .67s ease-in-out infinite alternate-reverse}
.flame-wick{left:46%;bottom:-5%;width:8%;height:14%;border-radius:50%;background:#3a241b;transform:rotate(5deg)}
@keyframes candle-sway{0%{transform:rotate(-5deg) skewX(-2deg) scale(1,.94);opacity:.94}35%{transform:rotate(3deg) skewX(2deg) scale(.95,1.04)}70%{transform:rotate(-2deg) scale(1.06,.97)}100%{transform:rotate(4deg) skewX(-3deg) scale(.94,1.08);opacity:1}}
@keyframes candle-dance{from{transform:translateX(-6%) rotate(-4deg) scale(.95,.95)}to{transform:translateX(7%) rotate(4deg) scale(1.06,1.04)}}
@keyframes candle-halo{from{opacity:.7;transform:scale(.96)}to{opacity:1;transform:scale(1.08)}}
.room-invitation{position:absolute;bottom:1.2%;left:50%;transform:translateX(-50%);white-space:nowrap;font-size:clamp(9px,.82vw,12px);letter-spacing:2px;color:#ecd3a5d9;background:linear-gradient(90deg,transparent,#1c1109cc 18%,#1c1109cc 82%,transparent);border-top:1px solid #c5a36344;border-bottom:1px solid #c5a36344;text-shadow:0 1px 5px #000,0 1px 10px #000;margin:0;z-index:4;cursor:pointer}.room-invitation span{margin:0 12px}
.room-label-toggle{position:absolute;top:14px;right:15px;z-index:9;border:1px solid #c9a66488;outline:1px solid #ecd09629;outline-offset:-3px;border-radius:2px;padding:7px 14px;color:#ebd2a4;background:linear-gradient(135deg,#2b1c12d9,#180f0ae6);font-size:11px;letter-spacing:1.5px;box-shadow:0 4px 14px #0009,inset 0 1px #f5da9e22;backdrop-filter:blur(5px)}
.room.labels-hidden .hotspot-label{opacity:0}
.room.entering .room-shade{z-index:2;opacity:.12}.room.entering .hotspot:not(.is-entering){pointer-events:none}.hotspot.is-entering::after{opacity:1;animation:room-spark .4s ease-out}.hotspot.is-entering .hotspot-label{color:#fff1ca;opacity:1}
.hotspot.is-entering .item-sprite{animation:item-awaken .68s cubic-bezier(.2,.7,.25,1) both}
.h-words.is-entering .item-sprite{animation-name:letter-awaken}.h-profile.is-entering .item-sprite{animation-name:watch-awaken}
@keyframes room-spark{0%{transform:scale(.7);opacity:.3}65%{transform:scale(1.5);opacity:1}100%{transform:scale(1.8);opacity:0}}
@keyframes item-awaken{0%,100%{transform:rotate(var(--tilt))}45%{transform:translateY(-9%) rotate(calc(var(--tilt) - 5deg)) scale(1.09);filter:brightness(1.13) drop-shadow(6px 22px 10px #000a)}}
@keyframes letter-awaken{0%,100%{transform:rotate(0)}35%{transform:translateY(-8%) rotate(-5deg)}70%{transform:translateY(-4%) rotate(3deg)}}
@keyframes watch-awaken{0%,100%{transform:rotate(0)}30%{transform:translateY(-8%) rotate(-14deg) scale(1.08)}65%{transform:translateY(-5%) rotate(9deg) scale(1.05)}}
/* Portrait composition keeps each illustrated object large enough to touch. */
.room-heading{display:none}
@media(max-width:600px), (max-width:900px) and (orientation:portrait){
 .painted-room main#home{display:block;min-height:100svh}
 .room{width:100%;height:max(780px,100svh);aspect-ratio:auto;box-shadow:none}
 .room-art{position:absolute;inset:0;object-fit:cover;object-position:27% center}
 .room::before{content:'';position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(180deg,#130e0966,transparent 28%,transparent 78%,#130e09d9)}
 .room-heading{display:block;position:absolute;left:6%;top:calc(60px + env(safe-area-inset-top,0px));z-index:2;pointer-events:none;text-shadow:0 2px 12px #000}
 .room-heading>span{font:10px 'Cormorant Garamond',Georgia,serif;letter-spacing:4px;color:#e5c48a}
 .room-heading h1{margin:7px 0 0;font-size:34px;font-weight:400;letter-spacing:5px;color:#f0d9ad}
 .room-heading p{margin:8px 0 0;font-size:13px;letter-spacing:1px;color:#d6c0a1}
 .room .hotspot{min-width:44px;min-height:44px}
 .room .item-sprite{filter:brightness(.95) saturate(.94) drop-shadow(3px 8px 5px #080401b0)}
 .room .hotspot-label{font-size:15px;line-height:1.65;letter-spacing:1px;padding:5px 12px;opacity:1;color:#ffe4b4;max-width:100%}
 .hotspot-label small,.hotspot-label::before,.hotspot-label::after{display:none}
 .room-label-toggle{top:calc(10px + env(safe-area-inset-top,0px));right:max(12px,env(safe-area-inset-right,0px));min-width:44px;min-height:44px;font-size:12px;padding:8px 13px;border-color:#c9a66499;background:linear-gradient(135deg,#2b1c12eb,#180f0af5)}
 .h-tarot{left:6%;top:46%;width:32%;height:15%;--tilt:-4deg}
 .h-lenormand{left:65%;top:48%;width:30%;height:14%;--tilt:3deg}
 .h-oracle{left:17%;top:63%;width:30%;height:15%;--tilt:7deg}
 .h-words{left:70%;top:66%;width:27%;height:13%;--brightness:.8;--tilt:-8deg}
 .h-words .hotspot-label{left:50%;top:86%}
 .h-profile{left:50%;top:67%;width:16%;height:10%;--tilt:-7deg}
 .h-profile .hotspot-label{left:50%;top:94%;font-size:14px}
 /* Match the shelf image's contained bounds so the spine stays on its shelf. */
 .shelf-scene{left:74.5%;top:29.2%;width:min(47%,calc(max(780px,100svh) * .29 * 1199 / 1312));height:auto;aspect-ratio:1199/1312;transform:translate(-50%,-50%);container-type:inline-size;z-index:2}
 .h-library .hotspot-label{top:79%;font-size:14px}
 .shelf-journal{left:50.6%;top:42.3%;width:5.3%;height:18.5%}
 .shelf-journal::after{inset:auto;left:50%;top:50%;width:max(100%,44px);height:max(100%,44px);transform:translate(-50%,-50%)}
 .shelf-book-spine{border-top-width:1px;border-bottom-width:1px}
 .shelf-book-spine b{font-size:3cqw;line-height:1;letter-spacing:.3cqw}.shelf-book-spine i{font-size:3cqw;line-height:1}
 .shelf-journal.is-pulled{left:7%;top:0;width:75%;height:auto;aspect-ratio:3/4;transform:translateZ(45px) rotate(-6deg)}
 .shelf-scene:has(.is-pulled){z-index:8}
 .shelf-book-front{line-height:1.2}
 .shelf-book-front b{font-size:clamp(14px,7cqw,17px)}.shelf-book-front small{font-size:clamp(6px,3.5cqw,8px);letter-spacing:.5px}.shelf-book-front i{font-size:clamp(24px,14cqw,36px)}.shelf-book-front em{font-size:clamp(10px,5cqw,12px)}
 .shelf-return{left:7%;top:105%;min-height:44px;padding:8px 12px;font-size:13px;background:#21150df0}
 .candle-flame{display:none}
 .room #daily-invitation{left:5%;bottom:calc(10px + env(safe-area-inset-bottom,0px));width:90%;max-width:90%;min-height:48px;transform:none;display:flex;align-items:center;justify-content:center;gap:8px;padding:10px 14px;font-size:13px;line-height:1.6;letter-spacing:.5px;white-space:normal;background:linear-gradient(135deg,#2a1b11f0,#180f0af5);border:1px solid #c7a46288;outline:1px solid #ecd09626;outline-offset:-4px;border-radius:2px;color:#f0d5a3;text-shadow:none;box-shadow:0 6px 18px #000a}
 .room #daily-invitation span{margin:0;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .room .w-unread{min-width:24px;height:24px;font-size:12px;line-height:22px}
 .room.labels-hidden .hotspot-label{opacity:0}

}
@media(prefers-reduced-motion:reduce){.item-sprite,.hotspot,.hotspot::after,.hotspot-label,.hotspot-label small,.room-shade,.shelf-journal,.shelf-book-spine,.shelf-book-front,.candle-flame span{transition:none!important;animation:none!important}}
@media(max-width:600px) and (max-height:779px) and (orientation:portrait){
 .room{height:max(568px,100svh)}
 .room-heading{top:calc(52px + env(safe-area-inset-top,0px))}
 .room-heading h1{font-size:30px}
 .shelf-scene{top:28.8%;width:min(43%,calc(max(568px,100svh) * .27 * 1199 / 1312))}
 .h-tarot{top:46%;height:15%}
 .h-lenormand{top:48%;height:14%}
 .h-oracle{top:63%;height:15%}
 .h-words{top:66%;height:13%}
 .h-profile{top:67%;height:10%}
 .room .hotspot-label{font-size:13px;padding:3px 8px}
 .room #daily-invitation{min-height:44px;bottom:calc(6px + env(safe-area-inset-bottom,0px))}
}
/* Hover adds a warm candlelight amber silhouette; geometry, text and stacking stay unchanged. */
.room .hotspot:hover .item-sprite,.room .hotspot:focus-visible .item-sprite{filter:brightness(var(--brightness)) saturate(.9) drop-shadow(0 0 1px #f6d998) drop-shadow(0 0 6px #e6b85eb8) drop-shadow(3px 7px 4px #080401a0)}
.room .hotspot:hover .hotspot-label,.room .hotspot:focus-visible .hotspot-label{color:#fff0cb;border-color:#dfb76a99}
.room .shelf-journal:hover,.room .shelf-journal:focus-visible{outline:1px solid #f2cf88;outline-offset:1px;box-shadow:2px 0 3px #000a,0 0 9px #e6b85eb8}
.room .room-label-toggle:hover,.room .room-label-toggle:focus-visible,.room .shelf-return:hover,.room .shelf-return:focus-visible,.room #daily-invitation:hover,.room #daily-invitation:focus-visible{outline:1px solid #f2cf88;outline-offset:1px;box-shadow:0 0 10px #e6b85eb8}
@media(max-width:600px), (max-width:900px) and (orientation:portrait){.room .hotspot:hover .item-sprite,.room .hotspot:focus-visible .item-sprite{filter:brightness(.95) saturate(.94) drop-shadow(0 0 1px #f6d998) drop-shadow(0 0 6px #e6b85eb8) drop-shadow(3px 8px 5px #080401b0)}}
.room .shelf-journal.is-pulled:hover,.room .shelf-journal.is-pulled:focus-visible{box-shadow:9px 20px 18px #0009,0 0 10px #e6b85eb8}

.room-load{position:fixed;z-index:12;left:50%;bottom:calc(18px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);display:flex;align-items:center;gap:12px;max-width:95vw;width:max-content;padding:4px 10px 4px 16px;background:#271d16;color:#f0d9ac;border:1px solid #b89860;border-radius:5px;box-shadow:0 3px 18px #0007;font-size:13px}
.room-load[hidden],.room-load button[hidden]{display:none}
.room-load button{padding:8px;color:inherit;background:transparent;border:0;text-decoration:underline;white-space:nowrap}
