/* Lifted clear of the floating scrubber bar (#ph-scrub at --hud-b, ~76px tall → top ~108px);
   card sits above it with a gap so the two never overlap. */
.dg-card { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--hud-b, 32px) + 92px);
  max-width: 340px; padding: 12px 14px; border-radius: 12px; z-index: 30;
  background: rgba(17,19,24,.86); color: #fff; backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.08);
  font: 14px/1.35 system-ui, sans-serif; pointer-events: none; }
.dg-card .dg-title { font-weight: 600; margin-bottom: 2px; }
.dg-card .dg-body { opacity: .85; }
.dg-card .dg-aud { margin-top: 7px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,.1);
  font-size: 12px; font-style: italic; opacity: .7; }
.dg-chip { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em;
  color: var(--dg-accent, #f5af1b); margin-bottom: 4px; text-transform: uppercase; }
/* Premium-feature badge (purple by default; rebrand via --dg-premium). */
.dg-premium { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .03em;
  color: #fff; background: var(--dg-premium, #a855f7); border-radius: 5px; padding: 2px 8px;
  margin-bottom: 5px; text-transform: uppercase; }
.dg-ch-premium { font-size: 8px; font-weight: 800; letter-spacing: .04em; color: #fff;
  background: var(--dg-premium, #a855f7); border-radius: 4px; padding: 1px 5px; text-transform: uppercase;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--dg-premium, #a855f7) 45%, transparent); }
.dg-card.dg-arrow::after { content: ''; position: absolute; bottom: -7px; left: 50%;
  transform: translateX(-50%) rotate(45deg); width: 12px; height: 12px;
  background: rgba(17,19,24,.86); border-right: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08); }
.dg-skip { position: absolute; top: 6px; right: 8px; background: none; border: none;
  color: rgba(255,255,255,.5); font-size: 13px; line-height: 1; cursor: pointer; padding: 2px 4px;
  pointer-events: auto; }
.dg-skip:hover { color: #fff; }
.dg-cta-btn { display: inline-block; margin-top: 9px; padding: 7px 12px; border-radius: 8px;
  background: var(--dg-accent, #f5af1b); color: #111; font-weight: 700; font-size: 13px;
  text-decoration: none; pointer-events: auto; }
.dg-cta-btn:hover { filter: brightness(1.06); }
.dg-rejoin { position: absolute; right: 16px; bottom: 96px; z-index: 31;
  padding: 8px 14px; border-radius: 999px; border: none; cursor: pointer;
  background: var(--dg-accent, #f5af1b); color: #111; font-weight: 700;
  box-shadow: 0 6px 18px rgba(0,0,0,.35); }
/* Prominent, pulsing rejoin during the free-camera "try it" beat. */
.dg-rejoin-prominent { padding: 12px 20px; font-size: 15px; bottom: 104px;
  animation: dg-rejoin-pulse 1.6s ease-in-out infinite; }
@keyframes dg-rejoin-pulse {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--dg-accent, #f5af1b) 32%, transparent), 0 8px 22px rgba(0,0,0,.45); }
  50%      { box-shadow: 0 0 0 10px color-mix(in srgb, var(--dg-accent, #f5af1b) 6%, transparent), 0 8px 22px rgba(0,0,0,.45); }
}
/* Free-camera control hints in the try-it overlay. */
.dg-ctls { margin-top: 9px; display: flex; flex-direction: column; gap: 6px; }
.dg-ctl { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.dg-ctl kbd { flex: none; min-width: 76px; text-align: center; font: 600 11px/1.7 system-ui, sans-serif;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); border-radius: 5px;
  padding: 2px 6px; color: #fff; }
.dg-ctl span { opacity: .85; }
.dg-rejoinhint { margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--dg-accent, #f5af1b); }
/* Wider box (free-camera helper) + an in-card rejoin button so it's easy to find. */
.dg-card.dg-wide { max-width: 400px; }
.dg-rejoin-inline { margin-top: 12px; display: inline-block; padding: 9px 16px; border-radius: 999px;
  border: none; cursor: pointer; pointer-events: auto; background: var(--dg-accent, #f5af1b); color: #111;
  font: 700 14px system-ui, sans-serif; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.dg-rejoin-inline:hover { filter: brightness(1.06); }
/* Demo chapters menu — expandable replay list, top-right (mirrors the POI rail). */
.dg-chapters { position: absolute; top: var(--hud-m, 24px); right: var(--hud-m, 24px); z-index: 31;
  width: 244px; font: 13px/1.3 system-ui, sans-serif; pointer-events: none; }
.dg-ch-head { display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); cursor: pointer;
  background: rgba(17,19,24,.86); color: #fff; font-weight: 700; pointer-events: auto;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.dg-ch-caret { opacity: .7; transition: transform .15s; }
.dg-ch-head[aria-expanded="true"] .dg-ch-caret { transform: rotate(180deg); }
.dg-ch-list { display: none; flex-direction: column; margin-top: 6px; border-radius: 10px; overflow: hidden;
  background: rgba(17,19,24,.92); border: 1px solid rgba(255,255,255,.1);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.dg-ch-list.open { display: flex; }
.dg-ch-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 9px 12px; background: none; border: 0; border-top: 1px solid rgba(255,255,255,.06);
  color: #e6eaf0; font: inherit; text-align: left; cursor: pointer; pointer-events: auto; }
.dg-ch-item:first-child { border-top: 0; }
.dg-ch-item:hover { background: rgba(255,255,255,.07); }
.dg-ch-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dg-ch-title { font-weight: 600; }
.dg-ch-desc { font-size: 11px; opacity: .6; line-height: 1.25; }
.dg-ch-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.dg-ch-time { font-variant-numeric: tabular-nums; opacity: .5; font-size: 12px; }
/* active "now playing" section — accent bar + tint so the viewer follows along */
.dg-ch-item.active { background: color-mix(in srgb, var(--dg-accent, #f5af1b) 16%, transparent);
  box-shadow: inset 3px 0 0 var(--dg-accent, #f5af1b); }
.dg-ch-item.active .dg-ch-title { color: var(--dg-accent, #f5af1b); }
.dg-ch-item.active .dg-ch-time { opacity: .85; }
/* Animated click-&-drag hint (free-camera try-it) — a cursor dragging between arrows, centered. */
.dg-drag-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none; z-index: 29; }
.dg-drag-stage { position: relative; display: flex; align-items: center; gap: 20px;
  padding: 20px 30px 28px; border-radius: 18px; background: rgba(17,19,24,.42);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.dg-drag-chev { font: 700 32px/1 system-ui, sans-serif; color: rgba(255,255,255,.75);
  text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.dg-drag-chev.dg-l { animation: dg-chev-l 2.4s ease-in-out infinite; }
.dg-drag-chev.dg-r { animation: dg-chev-r 2.4s ease-in-out infinite; }
.dg-drag-cursor { position: relative; width: 40px; height: 40px; display: flex; align-items: center;
  justify-content: center; animation: dg-drag-move 2.4s ease-in-out infinite; }
.dg-drag-cursor svg { filter: drop-shadow(0 2px 4px rgba(0,0,0,.55)); }
.dg-drag-ring { position: absolute; left: 7px; top: 6px; width: 16px; height: 16px;
  border-radius: 50%; border: 2px solid var(--dg-accent, #f5af1b); opacity: 0;
  animation: dg-drag-ring 2.4s ease-in-out infinite; }
.dg-drag-cap { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center;
  font: 600 13px system-ui, sans-serif; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
@keyframes dg-drag-move {
  0%, 8%  { transform: translateX(-46px) scale(1); }
  18%     { transform: translateX(-46px) scale(.82); }
  50%     { transform: translateX(46px) scale(.82); }
  60%     { transform: translateX(46px) scale(1); }
  100%    { transform: translateX(-46px) scale(1); }
}
@keyframes dg-drag-ring {
  0%, 14% { opacity: 0; transform: scale(.5); }
  20%     { opacity: .9; transform: scale(1); }
  50%     { opacity: .7; transform: scale(1); }
  60%, 100% { opacity: 0; transform: scale(.5); }
}
@keyframes dg-chev-l { 0%, 100% { opacity: .35; } 30% { opacity: .9; } }
@keyframes dg-chev-r { 0%, 100% { opacity: .9; } 30% { opacity: .35; } }
/* Simulated click cursor (POI-list demonstration) — travels to a control + ripples on "click". */
.dg-click-cursor { position: absolute; z-index: 32; pointer-events: none; width: 28px; height: 28px;
  margin: -2px 0 0 -4px; transition: left .45s ease, top .45s ease; filter: drop-shadow(0 2px 4px rgba(0,0,0,.55)); }
.dg-click-ring { position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--dg-accent, #f5af1b); opacity: 0; }
.dg-click-cursor.dg-click-go { animation: dg-click-press .35s ease; }
.dg-click-cursor.dg-click-go .dg-click-ring { animation: dg-click-ripple .55s ease-out; }
@keyframes dg-click-press { 0%, 100% { transform: scale(1); } 45% { transform: scale(.78); } }
@keyframes dg-click-ripple { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(2.6); } }
/* Rotating 3D avatar preview inside a note card (beat.model3d). */
.dg-card .dg-model { display:block; width:100%; height:132px; margin:-2px 0 10px;
  border-radius:10px; background:radial-gradient(120% 90% at 50% 20%, #1b2130, #0d1016);
  --poster-color:transparent; pointer-events:none; }

/* Small value note beside the POI rail during the intro reveal (intro.poiNote). Positioned in JS
   next to the rail; a left-pointing arrow ties it to the rail. Fades + slides in. */
.dg-rail-note { position:fixed; z-index:33; max-width:210px; padding:9px 12px;
  background:rgba(17,19,24,.9); border:1px solid rgba(255,255,255,.1); border-radius:10px;
  color:#eef2f7; font:500 12.5px/1.35 system-ui,-apple-system,sans-serif;
  box-shadow:0 8px 28px rgba(0,0,0,.42); backdrop-filter:blur(6px); pointer-events:none;
  opacity:0; transform:translateX(-6px); transition:opacity .35s ease, transform .35s ease; }
.dg-rail-note.show { opacity:1; transform:none; }
.dg-rail-note::before { content:''; position:absolute; left:-6px; top:13px; width:10px; height:10px;
  background:rgba(17,19,24,.9); border-left:1px solid rgba(255,255,255,.1);
  border-bottom:1px solid rgba(255,255,255,.1); transform:rotate(45deg); }

/* ===== MOBILE (body.mob) — demo surfaces layered over the mobile shell ===== */
.dg-mob-layer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }  /* above .mob-bottom(45), below <dialog> top-layer */
.dg-mob-layer > * { pointer-events: auto; }
#mob-hud > .dg-mob-layer { pointer-events: none; }   /* beat #mob-hud>*{auto}; children re-enable via .dg-mob-layer>* */
/* Card band: shared .dg-card, repositioned clear of the top chip/minimap + bottom stack.
   SIGNOFF (revised at UAT): Variant A — bottom-anchored above the .mob-bottom transport
   stack (mirrors desktop's bottom-center card; photos then move to center, pill above). */
body.mob .dg-card { position: fixed; left: 12px; right: 12px; transform: none; max-width: none;
  bottom: calc(150px + env(safe-area-inset-bottom)); top: auto; z-index: 61; }   /* variant A: above the bottom stack */
body.mob .dg-card.dg-arrow::after { display: none; }
/* Feature-tour chip (top-bar slot). */
.dg-mob-chip { height: 46px; padding: 0 14px; border-radius: 23px; border: 1px solid #3a4150;
  background: rgba(20,23,28,.92); color: #fff; font: 600 14px system-ui, sans-serif; cursor: pointer; }
/* Chapters sheet rows (inside .mob-card). */
.dg-mob-ch { display: flex; justify-content: space-between; gap: 12px; width: 100%; min-height: 54px;
  padding: 10px 6px; background: none; border: 0; border-top: 1px solid rgba(255,255,255,.07);
  color: #e6eaf0; text-align: left; cursor: pointer; }
.dg-mob-ch:first-child { border-top: 0; }
.dg-mob-ch-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dg-mob-ch-title { font: 600 15px system-ui, sans-serif; }
.dg-mob-ch-desc { font-size: 12px; color: #9aa4b2; }
.dg-mob-ch-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.dg-mob-ch-time { font-variant-numeric: tabular-nums; color: #9aa4b2; font-size: 12px; }
.dg-mob-ch.active { box-shadow: inset 3px 0 0 var(--dg-accent, #f5af1b); }
.dg-mob-ch.active .dg-mob-ch-title { color: var(--dg-accent, #f5af1b); }
.dg-mob-ch-premium { font: 800 8px system-ui, sans-serif; color: #fff; background: var(--dg-premium,#a855f7);
  border-radius: 4px; padding: 1px 5px; text-transform: uppercase; }
/* Value note near the minimap. */
.dg-mob-note { position: fixed; z-index: 61; max-width: 190px; padding: 9px 12px; border-radius: 10px;
  background: rgba(17,19,24,.92); border: 1px solid rgba(255,255,255,.1); color: #eef2f7;
  font: 500 12.5px/1.35 system-ui, sans-serif; box-shadow: 0 8px 28px rgba(0,0,0,.42);
  opacity: 0; transform: translateY(-6px); transition: opacity .35s ease, transform .35s ease; }
.dg-mob-note.show { opacity: 1; transform: none; }
/* Touch ripple (pointerFeedback). */
.dg-mob-ripple { position: fixed; z-index: 62; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%; border: 2px solid var(--dg-accent,#f5af1b); pointer-events: none; }
.dg-mob-ripple.go { animation: dg-mob-ripple .55s ease-out; }
@keyframes dg-mob-ripple { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(2.4); } }
/* Drag-to-look hint (try-it). */
.dg-mob-drag { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center;
  flex-direction: column; gap: 10px; pointer-events: none; }
.dg-mob-hand { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; background: rgba(255,255,255,.15);
  animation: dg-mob-swipe 2.2s ease-in-out infinite; }
.dg-mob-dcap { font: 600 13px system-ui, sans-serif; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
@keyframes dg-mob-swipe { 0%,100% { transform: translateX(-40px); } 50% { transform: translateX(40px); } }
/* Rejoin pill — sits ABOVE the Variant-A bottom card (card spans ~150-240px up from the
   bottom), so the try-it card + pill never overlap. */
body.mob .dg-rejoin { bottom: calc(258px + env(safe-area-inset-bottom)); right: 12px; }
body.mob .dg-rejoin-prominent { bottom: calc(266px + env(safe-area-inset-bottom)); }
/* Email-capture reopen chip collides with the transport stack on mobile — suppress it. */
body.mob .ec-chip { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  .dg-mob-ripple.go, .dg-mob-hand { animation: none; }
  .dg-mob-note { transition: none; }
  body.mob .dg-rejoin-prominent { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dg-rejoin-prominent { animation: none; }
  .dg-drag-cursor, .dg-drag-ring, .dg-drag-chev.dg-l, .dg-drag-chev.dg-r { animation: none; }
  .dg-click-cursor.dg-click-go, .dg-click-cursor.dg-click-go .dg-click-ring { animation: none; }
  .dg-rail-note { transition: none; }
  .dg-ch-caret { transition: none; }
}
