/* 2.2 Real Night (slices 10 and 11, night.js): the HUD clock, the bedtime card, the "waiting in bed" card and Pause's
   gentle-nights switch. The clock is its own element outside #explore-hud (which redraws); night.js puts it in the
   first free spot under or beside the hearts, never over a button or a touch control. */

/* The HUD clock: a white face, black hands, 12 · 3 · 6 · 9 and a dot for every other hour. Long press: the time. */
.hud-clock { position:absolute; left:16px; top:96px; z-index:12; width:52px; height:52px; border-radius:50%; pointer-events:auto; cursor:pointer;
  user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; touch-action:manipulation; filter:drop-shadow(0 3px 0 rgba(0,0,0,.45)); }
.hud-clock .clock-face { display:block; width:100%; height:100%; overflow:visible; }
.hud-clock.saying { filter:brightness(1.2) drop-shadow(0 0 8px #fff6b0); }
.clock-rim { fill:#fff; stroke:#f2b53a; stroke-width:5; }
.hud-clock.dusk .clock-rim { stroke:#ff8a4c; }
.hud-clock.night .clock-rim { stroke:#5b70d8; }
.clock-num { font:900 17px var(--body, sans-serif); fill:#18181c; text-anchor:middle; dominant-baseline:central; }
.clock-dot { fill:#55555c; }
.clock-hour { stroke:#111; stroke-width:6.5; stroke-linecap:round; }
.clock-min { stroke:#111; stroke-width:4; stroke-linecap:round; }
.clock-pin { fill:#111; }
.clock-lit { fill:#ffd23f; stroke:#fff6b0; stroke-width:2.5; animation:clock-lit 1s ease-in-out infinite alternate; }
.clock-lit-num { font:900 15px var(--body, sans-serif); fill:#3a2600; text-anchor:middle; dominant-baseline:central; }
.clock-bed { font-size:22px; text-anchor:middle; dominant-baseline:central; }
@keyframes clock-lit { from { opacity:.65; } to { opacity:1; } }
.game-paused .hud-clock, .quiz-open .hud-clock { visibility:hidden; }
/* Explore parked under a Games Hall round (games-hall.js hides #explore-hud inline): its night pieces go too. */
#explore-hud[style*="none"] ~ .hud-clock, #explore-hud[style*="none"] ~ .bed-clock, #explore-hud[style*="none"] ~ .bed-wait { display:none; }
@media (max-width:700px), (max-height:600px) { .hud-clock { width:42px; height:42px; } }

/* Tapping a bed before 19:00: a big clock with the bedtime hour glowing gold (outer element placed, inner one pops). */
.bed-clock { position:absolute; left:0; right:0; top:16%; width:max-content; margin:0 auto; z-index:24; display:none; pointer-events:none; }
.bed-clock.show { display:block; }
.bed-clock-box { display:flex; align-items:center; gap:6px; padding:8px 18px 8px 8px; border-radius:26px; background:#0f1d33ee; border:3px solid #ffd23f;
  box-shadow:0 8px 26px #0008; animation:bed-clock-pop .35s cubic-bezier(.2,1.6,.4,1); }
.bed-clock .clock-face { width:168px; height:168px; overflow:visible; }
.bed-clock .bed-moon { font-size:46px; filter:drop-shadow(0 3px 0 #0007); }
@keyframes bed-clock-pop { from { transform:scale(.6); opacity:0; } to { transform:none; opacity:1; } }
@media (max-width:700px), (max-height:600px) { .bed-clock { top:12%; } .bed-clock .clock-face { width:128px; height:128px; } .bed-clock .bed-moon { font-size:34px; } }

/* In bed, waiting for friends (or the room's clock): 🛏️💤, and ✖ to get up again. */
.bed-wait { position:absolute; left:0; right:0; top:22%; width:max-content; margin:0 auto; z-index:24; display:none; pointer-events:none; }
.bed-wait.show { display:block; }
.bed-wait-box { display:flex; align-items:center; gap:12px; padding:8px 10px 8px 18px; border-radius:22px; background:#0f1d33ee; border:3px solid #8fa4ff;
  box-shadow:0 8px 24px #0008; color:#fff; font-size:36px; line-height:1; pointer-events:auto; animation:bed-clock-pop .35s cubic-bezier(.2,1.6,.4,1); }
.bed-wait-friends { font-size:28px; opacity:.9; }
.bed-wake { min-width:44px; min-height:44px; font-size:20px; }
@media (max-width:700px), (max-height:600px) { .bed-wait-box { font-size:28px; } .bed-wait-friends { font-size:22px; } }

/* Pause → 🌙 gentle nights. */
.night-switch { display:inline-flex; align-items:center; gap:10px; margin-top:10px; }
.night-switch .night-moon { font-size:24px; line-height:1; }
.night-switch .night-track { position:relative; width:58px; height:30px; border-radius:15px; background:#b8402e; box-shadow:inset 0 2px 0 #0004; transition:background .2s; }
.night-switch .night-track i { position:absolute; top:2px; left:30px; width:26px; height:26px; border-radius:50%; background:#fff; font-style:normal; font-size:17px;
  line-height:26px; text-align:center; transition:left .2s; }
.night-switch.gentle .night-track { background:#3fae5a; }
.night-switch.gentle .night-track i { left:2px; }
.night-switch .night-word { font-weight:900; }
