:root{color-scheme:light;--ink:#604936;--paper:#fff8ec;--edge:#ead7bf;--coral:#df785c;--world-width:max(100vw,150dvh);--world-height:max(100dvh,66.6667vw);font-family:"Noto Sans TC","PingFang TC","Microsoft JhengHei",system-ui,sans-serif;color:var(--ink);font-synthesis:none}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#8e6846}button,a{touch-action:manipulation;-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit}button:disabled{opacity:.55;cursor:default}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #f6c76c;outline-offset:4px}button,a{transition:background .18s,box-shadow .18s,transform .18s}a{color:inherit;text-underline-offset:4px}.game-viewport{height:100dvh;width:100vw;position:fixed;inset:0;isolation:isolate;overflow:clip}.world{position:absolute;width:var(--world-width);height:var(--world-height);top:0;left:50%;transform:translateX(-50%);z-index:-2}.room-picture,.room-picture img{display:block;width:100%;height:100%}.room-picture img{object-fit:fill}.sunlight{position:absolute;inset:0;background:linear-gradient(123deg,#fff6d01c 0%,#fff6ca09 35%,transparent 65%);mix-blend-mode:screen;pointer-events:none;animation:sunlight 13s ease-in-out infinite}.scene-sign{position:absolute;top:7.7%;left:38%;width:25%;height:10%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;transform:rotate(-.4deg);text-shadow:0 1px 1px #fff9dc99;pointer-events:none}.scene-sign h1{font-size:clamp(20px,2.35vw,42px);line-height:1.25;letter-spacing:.06em;white-space:nowrap;margin:0;font-weight:850;color:#644b2e}.scene-sign p{font-size:clamp(7px,.7vw,12px);margin:8px 0 0;letter-spacing:.2em;font-weight:600;color:#715230}.clerk-position{position:absolute;left:50%;bottom:33.8%;width:31%;aspect-ratio:1;transform:translateX(-50%)}.actor-contact{position:absolute;left:37.6%;top:62.8%;width:24.8%;height:3%;border-radius:50%;background:radial-gradient(ellipse,#49361e60,transparent 68%);filter:blur(4px)}.actor{position:absolute;inset:0;filter:drop-shadow(3px 5px 4px #4d3e2315);cursor:pointer;outline:none}.sprite-layer{position:absolute;inset:0;background-image:url('./director-dou-front-gaze.webp');background-repeat:no-repeat;background-size:200% 200%;background-position:0 0;pointer-events:none}.actor-body{clip-path:inset(60% 0 0 0)}.actor-chest{clip-path:polygon(32% 63%,67% 63%,78% 94%,25% 94%);animation:local-breath 4.9s ease-in-out infinite;transform-origin:50% 91%}.actor-head{position:absolute;inset:0;transform-origin:52% 64%;animation:head-rest 12s ease-in-out infinite}.face-base{clip-path:inset(0 0 36% 0)}.face-blink{z-index:3;background-position:100% 0;opacity:0;clip-path:ellipse(27% 14% at 52% 29%)}.face-talk{z-index:4;background-position:0 100%;opacity:0;clip-path:ellipse(19% 12% at 54% 52%);mask-image:radial-gradient(ellipse 20% 14% at 54% 52%,#000 62%,transparent 100%)}.face-happy{z-index:1;background-position:100% 100%;opacity:0;clip-path:inset(0 0 36% 0)}.actor.is-blinking .face-blink{opacity:1}.actor.is-speaking .face-talk{animation:talk-frame .28s steps(1) infinite}.actor.is-happy .face-happy{opacity:1}.actor.is-happy .face-base{opacity:0}.actor.is-listening .actor-head{animation:hello-nod 1.3s ease-in-out 1}.actor-name{position:absolute;left:66.5%;top:76%;width:10%;height:4%;font-size:clamp(6px,.6vw,10px);display:flex;align-items:center;justify-content:center;transform:rotate(-5deg);color:#765230;font-weight:700;letter-spacing:.03em;pointer-events:none}.ambient-leaf{position:absolute;inset:0;background:url('./registry-room-desktop.webp') center/100% 100%;clip-path:polygon(21% 8%,26% 8%,26% 21%,24% 27%,22% 32%,21% 25%,20% 18%);transform-origin:23% 10%;animation:leaf-sway 8s ease-in-out infinite;pointer-events:none}.floating-header{position:absolute;z-index:10;top:max(15px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:min(1180px,calc(100% - 40px));display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 13px 10px 16px;border:1px solid #fff9efdd;background:#fffaf0ef;box-shadow:0 7px 25px #563b2521;backdrop-filter:blur(12px);border-radius:24px}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;font-weight:750;font-size:16px;letter-spacing:.05em;white-space:nowrap}.brand img{width:42px;height:42px;background:#ffd2c3;padding:5px;border-radius:15px}.brand small{font-size:8px;display:block;letter-spacing:.21em;line-height:1.1;margin-top:2px}.header-actions{display:flex;align-items:center;gap:8px}.hud-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:42px;padding:9px 13px;background:#fffaf2;border:1px solid #e6cdb1;border-radius:16px;text-decoration:none;font-size:13px;font-weight:650;box-shadow:0 3px 10px #6344260b}.hud-button:hover{background:#fff1d9}.hud-button svg{height:16px;width:16px}.room-tag{position:absolute;top:100px;left:26px;border:1px solid #efd9b8aa;background:#fff6dfdf;border-radius:15px;padding:7px 12px;font-size:11px;box-shadow:0 4px 14px #76532819;display:flex;align-items:center;gap:7px}.room-tag:before{content:"";background:#79966b;box-shadow:0 0 0 3px #79966b19;height:6px;width:6px;border-radius:50%}.dialogue-dock{position:absolute;bottom:max(24px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(880px,calc(100% - 40px));z-index:5;transition:bottom .3s}.speech-panel{border-radius:26px;background:#fff9eef5;border:2px solid #fffdf5;box-shadow:0 12px 38px #4d331d2e;backdrop-filter:blur(12px);padding:19px 23px 17px;position:relative}.speaker-line{display:flex;align-items:center;gap:9px;margin-bottom:5px}.name-tag{font-size:13px;letter-spacing:.06em;color:#be684a;font-weight:800}.job-tag{font-size:10px;color:#9d8262}.speaker-dot{height:4px;width:4px;border-radius:50%;background:#d8bb98}.speech-text{font-size:17px;line-height:1.75;font-weight:650;margin:0;min-height:31px;letter-spacing:.02em;padding-right:28px}.continue-cue{position:absolute;right:18px;top:48px;width:30px;height:30px;min-height:0;background:none;border:none;color:#b49772;display:grid;place-items:center;font-size:12px}.dialogue-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:15px}.game-button{min-height:44px;padding:12px 22px;border:1px solid #edb091;border-radius:16px;background:linear-gradient(#ee9775,#df785c);color:#fffaf1;font-size:14px;font-weight:750;box-shadow:0 5px 15px #d7765333,inset 0 1px 0 #ffd5b9;display:inline-flex;gap:9px;justify-content:center;align-items:center;text-decoration:none}.game-button:hover{background:linear-gradient(#f0a181,#e58163);box-shadow:0 6px 18px #d7765355;transform:translateY(-1px)}.quiet-button{font-size:12px;font-weight:600;background:transparent;border:none;padding:10px 12px;min-height:40px;color:#8b7155}.quiet-button:hover{color:#ad6548;background:#ead7b92e;border-radius:12px}.dialogue-footnote{position:absolute;bottom:-18px;left:0;right:0;text-align:center;color:#fff2dbb3;font-size:9px;text-shadow:0 1px 4px #4b311b;pointer-events:none}.visit-hint{position:absolute;top:44%;left:calc(50% + 230px);background:#fff6e5ed;border:1px solid #e8cca6;border-radius:18px 18px 18px 3px;padding:10px 15px;font-size:12px;color:#816343;box-shadow:0 5px 18px #51391b15;animation:hint-appear .5s ease-out;pointer-events:none;max-width:160px}.visit-hint[hidden]{display:none}.selection-sheet{position:absolute;left:50%;bottom:max(22px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(920px,calc(100% - 36px));z-index:7;background:#fcf4e2;border:2px solid #e9cfaa;border-radius:25px;box-shadow:0 15px 55px #412b1955;overflow:hidden;animation:sheet-in .25s ease-out}.selection-sheet[hidden]{display:none}.book-heading{background:#78856a;color:#fff9e8;display:flex;justify-content:space-between;align-items:center;padding:13px 20px;gap:10px;border-bottom:4px solid #c6b18b}.book-heading h2{font-size:16px;margin:0;letter-spacing:.1em}.book-heading p{font-size:10px;margin:1px 0 0;color:#f4ecd7}.book-heading button{border:1px solid #ffffff55;background:#ffffff12;color:#fffaf1;border-radius:50%;width:34px;height:34px;font-size:17px}.species-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;padding:18px 20px;max-height:33dvh;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;background:linear-gradient(90deg,transparent 49.7%,#d2b88b33 50%,transparent 50.3%)}.pet-choice{display:flex;flex-direction:column;align-items:center;gap:4px;justify-content:center;min-height:76px;font-size:11px;padding:7px 3px;background:#fffdf6;border:1px solid #e5d1b1;border-radius:13px;position:relative;box-shadow:0 2px 0 #b99b6c0a}.pet-choice svg{width:38px;height:32px}.pet-choice:hover{background:#f8eed8}.pet-choice[aria-pressed="true"]{border:2px solid #839475;background:#e9eddb}.pet-choice[aria-pressed="true"]:after{content:"✓";position:absolute;top:1px;right:5px;color:#607950;font-weight:800}.book-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 20px;background:#f1e6cd;border-top:1px solid #dfc7a1}.book-bottom p{font-size:11px;margin:0}.book-bottom .game-button{font-size:12px;min-height:40px;padding:10px 17px}.game-viewport.book-open .dialogue-dock{bottom:calc(40dvh + 155px);width:min(760px,calc(100% - 40px))}.game-viewport.book-open .dialogue-actions,.game-viewport.book-open .dialogue-footnote{display:none}.game-viewport.book-open .speech-panel{padding:12px 18px}.game-viewport.book-open .speech-text{font-size:14px;min-height:24px}.game-viewport.book-open .continue-cue{top:37px}.game-viewport.book-open .job-tag{display:none}.game-viewport.book-open .speaker-line{margin-bottom:2px}.overlay-menu{position:absolute;right:max(25px,calc((100vw - 1180px)/2));top:88px;z-index:20;background:#fff9eef7;border:1px solid #fffdf5;border-radius:22px;width:320px;padding:22px;box-shadow:0 12px 35px #47301d40;backdrop-filter:blur(15px);max-height:calc(100dvh - 110px);overflow:auto}.overlay-menu[hidden]{display:none}.overlay-menu h2{font-size:18px;margin:0 0 12px}.overlay-menu p{font-size:12px;line-height:1.8;color:#8d7357}.overlay-menu nav{display:grid;gap:8px}.overlay-menu a,.overlay-menu .menu-restart{display:block;background:#f6ebd6;border:1px solid #e5d1b2;border-radius:12px;padding:10px 13px;font-size:13px;text-decoration:none;text-align:left}.overlay-menu a:hover{background:#eeddbf}.overlay-menu .small-link{font-size:11px;background:none;border:0;margin-top:7px;padding:3px}.menu-backdrop{position:absolute;inset:0;z-index:15;background:#34251530;border:0}.menu-backdrop[hidden]{display:none}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;margin:-1px;border:0;padding:0}.asset-fallback{display:none;position:absolute;left:50%;top:34%;transform:translateX(-50%);padding:22px;border-radius:18px;background:#fff9e8ed;max-width:340px;text-align:center}.assets-failed .asset-fallback{display:block}.assets-failed .actor{display:none}.prototype-status{position:fixed;left:14px;bottom:10px;color:#fff7e0c9;font-size:9px;z-index:3;text-shadow:0 1px 4px #3b281b;pointer-events:none}.no-motion *{animation:none!important;transition:none!important}.no-motion .face-talk{opacity:0}.paused *{animation-play-state:paused!important}
@keyframes sunlight{0%,100%{opacity:.3}50%{opacity:.7}}@keyframes local-breath{0%,100%{transform:translateY(0)}50%{transform:translateY(-1.2px)}}@keyframes head-rest{0%,65%,100%{transform:rotate(0)}76%,88%{transform:rotate(.35deg)}}@keyframes hello-nod{0%,100%{transform:rotate(0)}45%{transform:rotate(-1.1deg) translateY(1px)}}@keyframes talk-frame{0%,40%{opacity:1}41%,100%{opacity:0}}@keyframes leaf-sway{0%,100%{transform:rotate(0)}50%{transform:rotate(.2deg)}}@keyframes sheet-in{from{opacity:0;translate:0 20px}to{opacity:1;translate:0 0}}@keyframes hint-appear{from{opacity:0;translate:0 5px}to{opacity:1;translate:0 0}}
@media(min-aspect-ratio:19/10){.world{top:-5dvh}.scene-sign{top:9%}.clerk-position{width:27%;bottom:36%}.dialogue-dock{bottom:18px}.speech-panel{padding:13px 20px}.dialogue-actions{margin-top:8px}.room-tag{top:88px}}
@media(max-width:700px) and (orientation:portrait){:root{--world-width:max(100vw,66.6667dvh);--world-height:max(100dvh,150vw)}.scene-sign{top:13.2%;left:30%;width:40%;height:7%}.scene-sign h1{font-size:clamp(20px,5.8vw,28px);letter-spacing:.02em}.scene-sign p{font-size:7px;margin-top:6px;letter-spacing:.15em}.clerk-position{width:59%;bottom:37.2%}.actor-contact{left:26%;width:48%;top:60.2%;height:2%}.actor-name{font-size:7px}.ambient-leaf{background-image:url('./registry-room-mobile.webp');clip-path:polygon(16% 4%,26% 4%,25% 22%,22% 30%,15% 30%,17% 20%,15% 10%);transform-origin:22% 8%}.floating-header{top:max(9px,env(safe-area-inset-top));width:calc(100% - 20px);padding:7px 8px 7px 10px;border-radius:20px;gap:5px}.brand{gap:7px;font-size:12px;letter-spacing:0}.brand img{width:33px;height:33px;border-radius:12px;padding:4px}.brand small{font-size:6px}.header-actions{gap:5px}.hud-button{height:34px;min-height:34px;width:35px;padding:8px;border-radius:12px}.hud-button .button-label{display:none}.hud-button.return-link{display:none}.room-tag{top:76px;left:12px;font-size:9px;padding:5px 9px;border-radius:12px}.dialogue-dock{width:calc(100% - 24px);bottom:max(25px,calc(env(safe-area-inset-bottom) + 12px))}.speech-panel{padding:15px 17px 13px;border-radius:23px}.speaker-line{margin-bottom:5px}.name-tag{font-size:12px}.job-tag{font-size:9px}.speech-text{font-size:15px;line-height:1.8;min-height:54px;padding-right:12px}.continue-cue{top:43px;right:7px;font-size:10px;width:24px}.dialogue-actions{margin-top:10px;gap:5px;flex-direction:column-reverse;align-items:stretch}.game-button{font-size:13px;padding:11px 16px;min-height:44px;border-radius:14px}.quiet-button{padding:5px 10px;min-height:28px;font-size:11px}.visit-hint{top:35%;left:auto;right:8px;max-width:97px;padding:7px 10px;font-size:10px;border-radius:12px 12px 12px 2px}.dialogue-footnote{font-size:8px;bottom:-17px}.selection-sheet{bottom:max(16px,env(safe-area-inset-bottom));width:calc(100% - 22px);border-radius:21px}.book-heading{padding:10px 14px}.book-heading h2{font-size:14px}.book-heading p{font-size:9px}.book-heading button{height:29px;width:29px;font-size:15px}.species-grid{grid-template-columns:repeat(4,1fr);gap:6px;padding:12px;max-height:25dvh}.pet-choice{min-height:68px;font-size:9px;border-radius:11px}.pet-choice svg{width:33px;height:28px}.book-bottom{padding:9px 12px;gap:8px}.book-bottom p{font-size:9px}.book-bottom .game-button{font-size:11px;min-height:38px;padding:9px 12px;white-space:nowrap}.game-viewport.book-open .dialogue-dock{bottom:calc(25dvh + 158px);width:calc(100% - 28px)}.game-viewport.book-open .speech-panel{padding:10px 14px;border-radius:17px}.game-viewport.book-open .speech-text{font-size:12px;line-height:1.6;min-height:20px}.game-viewport.book-open .speaker-line{margin-bottom:2px}.game-viewport.book-open .name-tag{font-size:10px}.game-viewport.book-open .continue-cue{top:26px}.overlay-menu{top:72px;right:10px;width:min(320px,calc(100% - 20px));max-height:calc(100dvh - 90px);padding:20px}.prototype-status{display:none}}
@media(max-width:700px) and (orientation:portrait) and (max-height:720px){.clerk-position{width:54%;bottom:37%}.dialogue-dock{bottom:max(17px,env(safe-area-inset-bottom))}.speech-panel{padding:12px 14px 10px}.speech-text{font-size:14px;min-height:46px}.dialogue-actions{margin-top:6px}.game-button{min-height:40px;padding:9px 14px}.room-tag{display:none}.scene-sign p{margin-top:4px}.species-grid{max-height:23dvh}.game-viewport.book-open .dialogue-dock{bottom:calc(23dvh + 145px)}.game-viewport.book-open .speech-panel{padding:8px 12px}.game-viewport.book-open .speech-text{font-size:11px}.book-heading{padding:8px 12px}.book-bottom{padding:8px 10px}.dialogue-footnote{display:none}}
@media(max-height:500px) and (orientation:landscape){.floating-header{top:8px;padding:5px 10px;width:calc(100% - 30px)}.brand img{width:30px;height:30px}.hud-button{min-height:30px;padding:5px 10px}.brand{font-size:12px}.scene-sign{display:none}.world{top:-18dvh}.clerk-position{width:23%;bottom:41%}.dialogue-dock{bottom:12px;width:min(760px,calc(100% - 30px))}.speech-panel{padding:9px 15px}.speaker-line{margin:0}.speech-text{font-size:13px;min-height:22px}.dialogue-actions{margin-top:5px}.game-button{min-height:33px;font-size:11px;padding:7px 14px}.quiet-button{min-height:30px;font-size:11px}.room-tag,.dialogue-footnote,.prototype-status{display:none}.species-grid{grid-template-columns:repeat(7,1fr);max-height:36dvh;padding:8px;gap:5px}.pet-choice{min-height:55px;font-size:9px}.pet-choice svg{width:27px;height:22px}.book-heading{padding:7px 14px}.book-heading h2{font-size:13px}.book-heading p{display:none}.book-bottom{padding:7px 12px}.book-bottom .game-button{min-height:30px;padding:6px 12px}.selection-sheet{bottom:10px;width:calc(100% - 50px)}.game-viewport.book-open .dialogue-dock{display:none}.overlay-menu{top:58px;max-height:calc(100dvh - 72px)}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}.face-talk{opacity:0}}
/* Opening the book gently reframes the room; the HUD stays fixed. */
.world{transition:top .32s ease-in-out}
@media(min-width:701px) and (min-height:501px){.species-grid{max-height:22dvh}.game-viewport.book-open .dialogue-dock{bottom:calc(22dvh + 157px)}.game-viewport.book-open .world{top:-6dvh}}
@media(max-width:700px) and (orientation:portrait) and (max-height:720px){.game-viewport.book-open .world{top:-6dvh}}
@media(max-width:350px) and (orientation:portrait) and (max-height:600px){.game-viewport.book-open .world{top:-19dvh}}
