/* Final visual-novel layout, independent of previous card layouts. */
#dialog[open]{display:block;--story-height:clamp(112px,27dvh,190px)}
#dialog .portrait{left:50%;right:auto;bottom:calc(var(--story-height) - 8px);top:3dvh;transform:translateX(-50%);width:min(58vw,530px);height:auto;max-height:none;min-height:0;z-index:1;overflow:hidden;pointer-events:none}
#dialog .portrait img{display:block;width:100%;height:100%;object-fit:contain;object-position:center bottom;border:0;border-radius:0}
#dialog .speech{left:max(18px,env(safe-area-inset-left));right:max(18px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom));height:var(--story-height);min-height:0;max-height:none;padding:20px 28px 34px;overflow:visible;z-index:2}
#dialog #speaker{position:absolute;left:26px;top:-17px;padding:5px 25px;min-width:120px;text-align:center;border:1px solid #b49b68;border-radius:12px;background:#294238;color:#f8e7bf;font:600 16px/1.3 Georgia,serif}
#dialog #context{display:none}
#dialog #line{margin:0;padding:0 4px;height:100%;min-height:0;overflow-y:auto;font:clamp(16px,2vw,24px)/1.65 Georgia,'Noto Serif TC',serif}
#dialog #dialogue-next{position:absolute;right:22px;bottom:9px;border:0;background:transparent;color:#586b58;font-size:14px;padding:4px 10px;min-height:26px}
#dialog #choices{position:absolute;left:50%;top:5dvh;bottom:calc(var(--story-height) + 28px);transform:translateX(-50%);width:min(66vw,700px);max-width:none;margin:0;display:flex;flex-direction:column;justify-content:center;gap:12px;overflow-y:auto;z-index:3;padding:5px}
#dialog #choices button{flex:none;width:100%;min-height:42px;text-align:center;border:2px solid #b79b66;border-radius:8px;padding:10px 22px;background:linear-gradient(100deg,#fffaf0f5,#f0e3cafa);box-shadow:0 3px 12px #14251f50;color:#30473b;font-size:clamp(15px,1.7vw,20px)}
#dialog [hidden],#dialog #choices[hidden]{display:none!important}
#hud-location .hud-room{left:29%;right:16%;top:29%;font-size:clamp(18px,2.25vw,27px)}
#clock .time-text{left:64%;width:22%;top:62%;text-align:center}
@media(max-height:360px){#dialog[open]{--story-height:104px}#dialog .speech{padding:17px 22px 31px}#dialog #choices{gap:7px;top:3dvh}#dialog #choices button{min-height:36px;padding:6px 18px;font-size:15px}#dialog #speaker{font-size:14px;top:-15px}#dialog #line{font-size:16px;line-height:1.45}}

.scene #room-layer .bath-hotspot{background:#283d32cc;color:#ffe4a6;border-color:#d4b775aa;z-index:700}
.scene #room-layer .bath-hotspot span{top:105%;background:#20312be8;color:#ffe9b2}
.map-list button[data-location="suite"]{background:#f4ead8;border-color:#a98955}
.scene #room-layer .bath-hotspot{background:transparent!important;border:0!important;box-shadow:none!important;color:transparent!important;border-radius:0}
.scene #room-layer .bath-hotspot span{display:none}
.scene .room-entry{position:absolute;background:transparent!important;border:0!important;box-shadow:none!important;color:transparent!important;border-radius:0;z-index:750;padding:0;min-width:0;cursor:pointer}
.scene .room-entry:focus-visible{outline:3px solid #e3bd72;outline-offset:3px}
#game-hud #hud-affection{display:none!important}
/* Wide artwork, uniformly scaled: ornaments must never stretch. */
#game-hud #hud-location{width:min(340px,40vw);height:auto;min-height:0;aspect-ratio:1875/839;container-type:inline-size;top:max(4px,env(safe-area-inset-top));left:max(6px,env(safe-area-inset-left))}
#game-hud #hud-location>img{width:100%;height:100%;object-fit:contain}
#game-hud #hud-location .hud-room{left:26%;right:16%;top:25%;height:17%;display:flex;align-items:center;justify-content:center;font-size:clamp(14px,5.3cqw,18px);line-height:1.2;letter-spacing:0;overflow:visible;text-overflow:clip;white-space:nowrap}
#game-hud #hud-location #clock{font-size:clamp(12px,4cqw,14px);letter-spacing:0;line-height:1.1}
#game-hud #hud-location #clock .date-text{left:26%;width:24%;top:50%;height:14%;display:flex;align-items:center;justify-content:center;overflow:visible}
#game-hud #hud-location #clock .time-text{left:61%;width:24%;top:50%;height:14%;display:flex;align-items:center;justify-content:center;overflow:visible}
