/* 창문 — 밤의 아파트 단지 */
:root {
  --accent: #ffd28a;
  --ghost: rgba(178, 198, 255, 0.78);
  --heart: #ffb4a2;
  --bg: #05060d;
}

canvas.stage {
  touch-action: none;
  -webkit-touch-callout: none;
  cursor: default;
}

/* ───────── 인트로 ───────── */
.intro {
  background:
    radial-gradient(ellipse 120% 70% at 50% 42%, rgba(5, 6, 13, 0.78), rgba(5, 6, 13, 0.42) 62%, rgba(5, 6, 13, 0.12));
}
.intro .title {
  color: var(--ink);
  text-shadow: 0 0 28px rgba(255, 210, 138, 0.22);
}
.intro .lede { margin-top: 2px; }
.intro .live { transition: opacity 0.6s ease; }
.intro .live.wait { opacity: 0; }
.intro .note { margin-top: 10px; }
.intro .btn.primary {
  background: var(--accent);
  color: #1b1408;
  box-shadow: 0 0 28px rgba(255, 210, 138, 0.28);
}
.intro .btn.primary:hover { background: #ffe0aa; }

/* ───────── HUD ───────── */
.hud-top {
  position: absolute; top: 0; left: 0; right: 0;
  padding: calc(env(safe-area-inset-top) + var(--bar-h) + 14px) 20px 26px;
  text-align: center;
  background: linear-gradient(rgba(5, 6, 13, 0.62), rgba(5, 6, 13, 0.28) 70%, rgba(5, 6, 13, 0));
}
.eyebrow {
  font-size: 13px; color: var(--dim); letter-spacing: 0.03em; word-break: keep-all;
}
.count {
  margin-top: 2px;
  font-size: clamp(42px, 12vw, 66px); font-weight: 200; line-height: 1.12;
  color: var(--accent);
  text-shadow: 0 0 22px rgba(255, 210, 138, 0.38);
  font-variant-numeric: tabular-nums;
}
.count .unit { font-size: 0.42em; margin-left: 4px; color: var(--dim); text-shadow: none; font-weight: 300; }
.conn { margin-top: 4px; font-size: 12px; color: var(--faint); }
.ghostline {
  margin: 6px auto 0; max-width: 23em; min-height: 3.2em;
  font-size: 12.5px; line-height: 1.6; color: var(--ghost);
  word-break: keep-all;
  transition: opacity 0.8s ease;
}
.ghostline:empty { opacity: 0; }

.hud-bottom {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 44px 16px calc(env(safe-area-inset-bottom) + 16px);
  background: linear-gradient(rgba(5, 6, 13, 0), rgba(5, 6, 13, 0.62) 48%, rgba(5, 6, 13, 0.78));
}
.clock {
  font-size: 13px; color: var(--dim); letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums; min-height: 1.4em;
}
.hud-bottom .row { gap: 8px; }
.hud-bottom .btn.small { min-width: 132px; }
.hint {
  font-size: 12px; color: var(--faint); text-align: center; word-break: keep-all; line-height: 1.5;
}

/* 토스트는 위쪽 숫자 바로 아래에: 아래쪽은 내 창과 버튼 자리라서 */
.toast { top: calc(env(safe-area-inset-top) + var(--bar-h) + 190px); bottom: auto; }

@media (min-width: 720px) {
  .eyebrow { font-size: 14px; }
  .ghostline { font-size: 13px; }
}

/* 3D (windows-3d.js): the HUD floats over the scene, so its veils are lighter and the buttons are glass */
html.scene-3d .intro { background: radial-gradient(ellipse 120% 70% at 50% 42%, rgba(5, 6, 13, 0.7), rgba(5, 6, 13, 0.34) 62%, rgba(5, 6, 13, 0.06)); }
html.scene-3d .hud-top { background: linear-gradient(rgba(5, 6, 13, 0.55), rgba(5, 6, 13, 0.16) 70%, rgba(5, 6, 13, 0)); }
html.scene-3d .hud-bottom { background: linear-gradient(rgba(5, 6, 13, 0), rgba(5, 6, 13, 0.42) 55%, rgba(5, 6, 13, 0.6)); }
html.scene-3d .hud-bottom .btn.small { background: rgba(14, 16, 30, 0.5); border-color: rgba(255, 214, 150, 0.32); }
html.scene-3d .count, html.scene-3d .eyebrow, html.scene-3d .ghostline { text-shadow: 0 1px 14px rgba(0, 0, 0, 0.75); }

/* '배경음도 켜 보세요' 말풍선은 시계 줄 위로 (시계·버튼을 가리지 않게) */
.hud-bottom .row .snd--up .snd__hint { bottom: calc(100% + 38px); }
