/* Birthday dreams reuse the game's ordinary MorningDigest / SceneFrame.
   There is no alternate white-card story layout. */
body[data-game='palace'] #game.scene-frame[data-page='birthday-dream'][data-dream-time='night'] .scene-background::after{
 content:'';position:absolute;inset:0;background:rgba(16,24,34,.19);pointer-events:none;
}
body[data-game='palace'] #game.scene-frame[data-page='birthday-dream'] .birthday-dream-clock{
 position:absolute;z-index:9;top:clamp(9px,1.4cqw,18px);
 right:clamp(12px,1.8cqw,24px);max-width:42%;
 padding:5px 12px;text-align:right;
 font-size:var(--font-note);font-family:var(--palace-story-font,'Noto Serif SC',serif);
 color:#634a2e;background:rgba(253,246,227,.84);
 border:1px solid rgba(159,123,77,.55);border-radius:6px;
 box-shadow:0 1px 8px rgba(55,38,17,.12);pointer-events:none;
}
@media (orientation:landscape) and (max-height:500px){
 body[data-game='palace'] #game.scene-frame[data-page='birthday-dream'] .birthday-dream-clock{
  top:6px;right:10px;padding:3px 8px;
 }
}

/* The dream keeps the standard dialogue art and typography. Nudge its
   caption closer to the bottom and scroll only when a long line needs room:
   flex-safe alignment prevents the first line being clipped on large fonts. */
html body[data-game='palace'] #game.scene-frame[data-page='birthday-dream'].dialogue-stage{
 --dialogue-bottom:1.4cqh;
}
html body[data-game='palace'] #game.scene-frame[data-page='birthday-dream'].dialogue-stage > .dialogue-box > .scene-text{
 align-items:safe center;
 justify-content:safe center;
 overflow-x:hidden;
 overflow-y:auto;
 scrollbar-width:thin;
}
html body[data-game='palace'] #game.scene-frame[data-page='birthday-dream'].dialogue-stage .dialogue-box .dialogue-content{
 flex-shrink:0;
}
