/*
 * DHANGAA TORBANII — GLOBAL MEDIA SESSION STYLES (Wave 9)
 * ONE plate, many presentations: focused (hero hologram / standing
 * composition), docked (inside the listening dock), theater, fullscreen,
 * nav preview, attached (page slot). The plate is the ONLY video surface
 * in the application — geometry per state, identity forever.
 */

#dhangaa-media-root { font: 600 13px/1.3 ui-sans-serif, system-ui, sans-serif; }
#dhangaa-media-root.dm-idle { display: none; }

/* ---------------- the plate ---------------- */
.dm-plate {
  --dmw-accent: #8ac8a0;
  --dmw-warm: #e08585;
  position: fixed;
  left: 0; top: 0;
  width: 0; height: 0;
  z-index: 62;
  overflow: hidden;
  border-radius: 10px;
  background: #04100b;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.45);
  pointer-events: none;              /* focused: the stage's zones own input */
  touch-action: manipulation;        /* double-tap is OUR gesture, never zoom */
  transition: left .34s cubic-bezier(.22, 1, .32, 1), top .34s cubic-bezier(.22, 1, .32, 1),
              width .34s cubic-bezier(.22, 1, .32, 1), height .34s cubic-bezier(.22, 1, .32, 1),
              opacity .25s ease;
}
.dm-plate.is-interactive { pointer-events: auto; }
.dm-plate .dm-video, .dm-plate .dm-video iframe,
.dm-plate .dm-video audio { width: 100%; height: 100%; border: 0; display: block; }
.dm-plate .dm-tapshield {
  position: absolute; inset: 0; z-index: 4;
  background: none; border: 0; cursor: pointer; padding: 0;
}
.dm-plate:not(.is-interactive) .dm-tapshield { display: none; }
/* shimmer: bound to REAL loading/buffering only (never over playing) */
.dm-shimmer {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  width: 96px; height: 3px; border-radius: 3px;
  background: rgba(138, 200, 160, 0.15); overflow: hidden; z-index: 5;
}
.dm-shimmer[hidden] { display: none; }
.dm-shimmer i {
  position: absolute; inset: 0 auto 0 0; width: 38%; border-radius: 3px;
  background: linear-gradient(90deg, transparent, rgba(138, 200, 160, 0.85), transparent);
  animation: dm-sweep 1.15s ease-in-out infinite;
}
@keyframes dm-sweep { 0% { transform: translateX(-110%); } 100% { transform: translateX(300%); } }

/* ---------------- THE WAVEFIELD (Wave 12) ----------------
 * A dual-color (archive-green → warm-red), semi-transparent digital
 * waveform wherever content plays. Canvas-rendered (see dhangaa-media.js);
 * honest synchronization: real FFT for owned audio, timeline-phased
 * deterministic envelope for the provider. */
/* THE DIGITAL FLARE (Wave 15, owner direction + concept): a sound bar of
 * THIN LINES riding the player's crown (58% width — never full width,
 * never over the media) that RELEASES digital flare — streaks and square
 * sparks rising upward from the top of the player and fading into the
 * background. The strip is a SIBLING of the plate with its floor
 * EXACTLY on the plate's top border: nothing overlaps the content,
 * nothing steals the dock's title space. Layered above the theater so
 * the signature rides the crown in every presentation. */
.dm-flare {
  position: fixed;
  left: 0; top: 0;
  width: 0; height: 168px;
  z-index: 114;                /* above the theater overlay (110) — light over chrome, never over media */
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}
/* the nav preview hides it (the panel carries its own surfaces) */
#dhangaa-media-root[data-dm-present="navpreview"] .dm-flare { display: none; }

/* ---------------- THE KINETIC TITLE (Wave 12) ----------------
 * Overflowing titles slide in a seamless loop — hold, glide, hold — the
 * duplicated copy makes the loop invisible; the visitor reads the whole
 * dialogue name wherever media plays. Reduced-motion keeps the static
 * title (with tooltip). */
.is-kinetic {
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  min-width: 0;
}
.is-kinetic .k-a, .is-kinetic .k-b {
  display: inline-block;
  padding-right: 26px;
}
.is-kinetic .k-a {
  animation: k-glide var(--k-dur, 10s) cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}
@keyframes k-glide {
  0% { transform: translateX(0); }
  14% { transform: translateX(0); }              /* hold — read the start */
  86% { transform: translateX(-100%); }
  100% { transform: translateX(-100%); }         /* hold — read the end */
}
.is-kinetic:hover .k-a, .is-kinetic:focus-within .k-a { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .is-kinetic .k-a { animation: none; }
}

/* ---------------- THE THEATER CUE (transcript-follow) ---------------- */
.dm-theater .dm-th-cue {
  display: block;
  max-width: 100%;
  text-align: start;
  background: none; border: 0; padding: 6px 12px;
  border-left: 2px solid rgb(224 133 133 / 0.65);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(90deg, rgb(138 200 160 / 0.08), transparent 80%);
  color: #e7f5ec;
  font: 500 13px/1.45 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.dm-theater .dm-th-cue[hidden] { display: none; }
.dm-theater .dm-th-cue:hover { background: linear-gradient(90deg, rgb(138 200 160 / 0.16), transparent 80%); border-color: #e08585; }

/* THE SIGNAL LANGUAGE, EVERYWHERE (Wave 11): four corner data anchors mark
 * the one plate — the same grammar as the 3D projection, the theater slot,
 * the nav media card and the signal-web cards. They breathe with playback
 * (the honest readiness state drives them; still while paused). */
.dm-corners { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.dm-corners i {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: rgba(138, 200, 160, 0.9);
  box-shadow: 0 0 7px rgba(138, 200, 160, 0.6);
  opacity: .4;
  transition: opacity .3s ease;
}
.dm-corners i:nth-child(1) { left: 6px; top: 6px; }
.dm-corners i:nth-child(2) { right: 6px; top: 6px; }
.dm-corners i:nth-child(3) { left: 6px; bottom: 6px; }
.dm-corners i:nth-child(4) { right: 6px; bottom: 6px; }
#dhangaa-media-root[data-dm-ready="playing"] .dm-corners i { opacity: 1; animation: dm-corner-breathe 2.2s ease-in-out infinite; }
#dhangaa-media-root[data-dm-ready="buffering"] .dm-corners i,
#dhangaa-media-root[data-dm-ready="loading"] .dm-corners i { opacity: .8; animation: dm-corner-breathe 1s ease-in-out infinite; }
@keyframes dm-corner-breathe { 0%, 100% { transform: scale(0.75); opacity: .45; } 50% { transform: scale(1.15); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dm-corners i, #dhangaa-media-root[data-dm-ready] .dm-corners i { animation: none !important; } }
/* focused presentation: the stage's own chrome owns the surface */
#dhangaa-media-root[data-dm-present="focused"] .dm-corners, #dhangaa-media-root[data-dm-present="navpreview"] .dm-corners { display: none; }

/* ---------------- THE ATTACHED MEDIA BAR (Wave 11) ----------------
 * While the session rides a page slot, the innovative control bar lives
 * ON the media: title + time, seekable rail, ±10s, play, sound, speed,
 * theater. Glass over video, wakes on activity, sleeps when still. */
.dm-abar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; flex-direction: column;
  padding: 22px 10px 8px;
  background: linear-gradient(180deg, transparent, rgba(3, 9, 6, 0.55) 38%, rgba(3, 9, 6, 0.9));
  opacity: 0; transform: translateY(8px);
  transition: opacity .28s ease, transform .3s cubic-bezier(.22, 1, .32, 1);
  pointer-events: none;
}
.dm-abar[hidden] { display: none; }
.dm-abar.is-out { opacity: 1; transform: none; pointer-events: auto; }
.dm-abar-rail {
  position: relative; height: 14px; margin: 0 2px 4px;
  display: flex; align-items: center; cursor: pointer; touch-action: none;
}
.dm-abar-rail::before { content: ''; position: absolute; left: 0; right: 0; height: 4px; border-radius: 4px; background: rgb(138 200 160 / 0.22); }
.dm-abar-rail i { position: absolute; left: 0; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #8ac8a0, #e08585); width: 0; box-shadow: 0 0 8px rgb(224 133 133 / 0.4); }
.dm-abar-rail i::after {
  content: '';
  position: absolute; right: -4px; top: 50%;
  width: 10px; height: 10px; border-radius: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle at 35% 35%, #ffe0a8, #e08585 75%);
  border: 1.4px solid rgb(255 240 214 / 0.9);
  box-shadow: 0 0 10px rgb(224 133 133 / 0.6);
}
.dm-abar-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dm-abar-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dm-abar-info b { font-size: 12px; line-height: 1.25; color: #f0f7f2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-abar-info i { font-style: normal; font-size: 10px; color: rgba(196, 222, 206, 0.75); font-variant-numeric: tabular-nums; }
.dm-abar-btns { display: flex; align-items: center; gap: 5px; flex: none; }
.dm-abar-btns button {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgb(138 200 160 / 0.4);
  background: rgb(6 17 12 / 0.65); color: #dff2e6;
  cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background .18s ease, transform .15s ease, border-color .18s ease;
}
.dm-abar-btns button:active { transform: scale(0.92); }
.dm-abar-btns button:hover { background: rgb(138 200 160 / 0.2); border-color: rgb(138 200 160 / 0.65); }
.dm-abar-btns button svg { width: 14px; height: 14px; }
.dm-abar-btns [data-dm-toggle] { background: rgb(224 133 133 / 0.22); border-color: rgb(224 133 133 / 0.55); width: 40px; height: 40px; }
.dm-abar-btns [data-dm-rate] { font: 700 11px/1 ui-sans-serif, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.dm-abar-btns [data-dm-rate].is-active { background: rgb(255 224 168 / 0.2); border-color: rgb(255 224 168 / 0.55); }

/* ---------------- THE FULLSCREEN EXIT CHIP (Wave 16) ----------------
 * While the session plays fullscreen: a small ✕ wakes on ANY interaction
 * and fades to near-nothing when the visitor is still — chrome that only
 * earns its pixels when wanted. Native Esc always works too. */
.dm-fsx {
  position: fixed; top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right));
  z-index: 118;                              /* above everything in the media root */
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgb(224 133 133 / 0.55);
  background: rgb(6 17 12 / 0.72); color: #ffe9e2;
  cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transform: scale(0.85);
  transition: opacity .25s ease, transform .25s cubic-bezier(.22, 1, .32, 1), background .18s ease;
  pointer-events: auto;
}
.dm-fsx[hidden] { display: none; }
.dm-fsx.is-out { opacity: 1; transform: none; }
.dm-fsx:hover { background: rgb(224 133 133 / 0.3); }
.dm-fsx:active { transform: scale(0.92); }
.dm-fsx svg { width: 14px; height: 14px; }
@media (prefers-reduced-motion: reduce) { .dm-fsx { transition: opacity .12s linear; transform: none; } }
.dm-abar-btns [data-dm-theater] { border-color: rgb(224 133 133 / 0.4); }
@media (prefers-reduced-motion: reduce) { .dm-abar { transition: opacity .15s ease; transform: none; } }
@media (hover: none) {
  .dm-abar { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px) / 4); }
}

/* ---------------- docked ---------------- */
#dhangaa-media-root[data-dm-present="docked"] .dm-plate {
  left: calc(10px + env(safe-area-inset-left, 0px)) !important;
  top: auto !important;
  bottom: calc(9px + env(safe-area-inset-bottom, 0px));
  width: var(--dock-plate-w, 116px);
  height: var(--dock-plate-h, 65px);
  transform: none;
  z-index: 91;
  cursor: pointer;
}
:root { --dock-plate-w: 116px; --dock-plate-h: 65px; }
@media (max-height: 480px) { :root { --dock-plate-w: 96px; --dock-plate-h: 54px; } }
body.has-dock { padding-bottom: calc(var(--dock-plate-h) + 18px + env(safe-area-inset-bottom, 0px)); }
@media (max-height: 480px) {
  body.has-dock { padding-bottom: calc(var(--dock-plate-h) + 14px + env(safe-area-inset-bottom, 0px)); }
}

.dm-dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 89;
  display: flex; align-items: center; gap: 6px;
  min-height: calc(var(--dock-plate-h) + 18px);
  padding: 9px max(10px, env(safe-area-inset-right, 10px));
  padding-bottom: calc(9px + env(safe-area-inset-bottom, 0px));
  padding-left: calc(10px + env(safe-area-inset-left, 0px) + var(--dock-plate-w) + 10px);
  background: rgb(6 17 12 / 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgb(138 200 160 / 0.28);
  color: #e7f5ec;
  animation: dm-dock-in .32s ease-out both;
}
@keyframes dm-dock-in { from { transform: translateY(100%); } to { transform: none; } }
.dm-dock[hidden] { display: none; }
.dm-dock .dock-title { flex: 1; min-width: 0; text-align: start; }
.dm-dock .dock-title b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.dm-dock .dock-title i { display: block; font-style: normal; font-weight: 400; opacity: .72; font-size: 11px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-dock button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 999px; flex: none;
  border: 1px solid rgb(138 200 160 / 0.38);
  background: rgb(138 200 160 / 0.12); color: inherit;
  cursor: pointer; font-size: 14px;
  transition: background .18s ease, transform .18s ease;
}
.dm-dock button:active { transform: scale(.94); }
.dm-dock button:disabled { opacity: .3; pointer-events: none; }
.dm-dock button[data-dm-toggle] { width: 44px; height: 44px; background: rgb(224 133 133 / 0.18); }
.dm-dock button svg { width: 16px; height: 16px; }
.dm-dock button[data-dm-mute] { border-color: rgb(138 200 160 / 0.4); }
.dm-dock button[data-dm-mute].is-muted { border-color: rgb(255 214 140 / 0.65); color: #ffe0a8; }
.dm-dock button[data-dm-mute].is-attention { animation: dm-mute-attention 1.6s ease-in-out infinite; }
@keyframes dm-mute-attention { 0%, 100% { box-shadow: 0 0 0 0 rgb(255 224 168 / 0); } 50% { box-shadow: 0 0 0 5px rgb(255 224 168 / 0.16); } }
@media (prefers-reduced-motion: reduce) { .dm-dock button[data-dm-mute].is-attention { animation: none; } }
.dm-dock button[hidden] { display: none; }
/* (narrow screens once HID prev/next — they now live in the burger burst,
 * reachable everywhere; the title keeps the whole bar) */
@media (max-height: 480px) {
  .dm-dock button { width: 32px; height: 32px; }
  .dm-dock button[data-dm-toggle] { width: 38px; height: 38px; }
}

/* ---------------- THE DOCK BURST (Wave 22) ----------------
 * Four constants on the stick — sound, play/pause, ⋯, close — and the
 * secondary controls (prev/next, fullscreen, open the player) EXPLODE
 * from the burger in an upward fan: stacked at its origin when folded,
 * springing out with a stagger when wanted. The title reclaims the bar. */
.dm-burst { position: relative; flex: none; display: grid; place-items: center; }
.dm-burst .dm-burger { position: relative; z-index: 6; }
.dm-burger-dots {
  display: flex; gap: 3.5px; align-items: center; justify-content: center;
  transition: opacity .18s ease, transform .26s cubic-bezier(.22, 1.2, .32, 1);
}
.dm-burger-dots b { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.dm-burst .dm-burger-x {
  position: absolute; inset: 0; display: grid; place-items: center;
  opacity: 0; transform: scale(.5) rotate(-90deg);
  transition: opacity .18s ease, transform .26s cubic-bezier(.22, 1.2, .32, 1);
}
.dm-burst .dm-burger-x svg { width: 15px; height: 15px; }
.dm-burst.is-open .dm-burger-dots { opacity: 0; transform: scale(.4) rotate(90deg); }
.dm-burst.is-open .dm-burger-x { opacity: 1; transform: none; }
.dm-burger:focus-visible { outline: 2px solid var(--dmw-accent, #8ac8a0); }

.dm-burst-item {
  position: absolute; bottom: 50%; right: 50%;
  width: 42px; height: 42px; margin: 0 -21px -21px 0;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgb(138 200 160 / 0.5);
  background: rgb(6 17 12 / 0.92); color: #dff2e6;
  cursor: pointer; z-index: 5;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.5);
  opacity: 0; transform: translate(0, 0) scale(.25);
  pointer-events: none;
  transition:
    opacity .2s ease,
    transform .38s cubic-bezier(.22, 1.35, .32, 1);
}
.dm-burst-item svg { width: 17px; height: 17px; }
/* press feedback WITHOUT a transform: a pressed fan button must keep its
 * fan station (a transform override teleported it to the burger origin
 * mid-press — found in the Wave 23 sweep) */
.dm-burst-item:active { filter: brightness(1.4); }
.dm-burst-item:hover { border-color: rgb(224 133 133 / 0.7); color: #ffe9e2; }
.dm-burst-item:disabled { opacity: .3; pointer-events: none; }
/* the fan: four stations on an upward arc, staggered springs */
.dm-burst.is-open .dm-burst-item {
  opacity: 1; pointer-events: auto;
}
.dm-burst.is-open .dm-burst-item:nth-child(1) { transform: translate(-72px, -4px) scale(1);  transition-delay: 0ms; }
.dm-burst.is-open .dm-burst-item:nth-child(2) { transform: translate(-52px, -54px) scale(1); transition-delay: 40ms; }
.dm-burst.is-open .dm-burst-item:nth-child(3) { transform: translate(4px, -72px) scale(1);   transition-delay: 80ms; }
.dm-burst.is-open .dm-burst-item:nth-child(4) { transform: translate(50px, -52px) scale(1);  transition-delay: 120ms; }
/* the fifth station (Share a Moment, Wave 24's addition to the fan):
 * fanned upper-left when the composer arms it, stacked at the origin
 * with its siblings when the platform runs without it */
.dm-burst.is-open .dm-burst-item:nth-child(5) { transform: translate(-16px, -80px) scale(1); transition-delay: 160ms; }
.dm-burst.is-open .dm-burst-item:nth-child(1):disabled,
.dm-burst.is-open .dm-burst-item:nth-child(2):disabled { opacity: .3; }
@media (prefers-reduced-motion: reduce) {
  .dm-burst-item, .dm-burger-dots, .dm-burst .dm-burger-x { transition: opacity .12s ease; transform: none; }
  .dm-burst.is-open .dm-burst-item:nth-child(1) { transform: translate(-72px, -4px); }
  .dm-burst.is-open .dm-burst-item:nth-child(2) { transform: translate(-52px, -54px); }
  .dm-burst.is-open .dm-burst-item:nth-child(3) { transform: translate(4px, -72px); }
  .dm-burst.is-open .dm-burst-item:nth-child(4) { transform: translate(50px, -52px); }
  .dm-burst.is-open .dm-burst-item:nth-child(5) { transform: translate(-16px, -80px); }
}

/* (the signal strip retired — THE WAVEFIELD dock canvas carries the state) */

/* ---------------- theater ---------------- */
.dm-theater {
  position: fixed; inset: 0; z-index: 110;
  background: rgb(3 8 6 / 0.97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  display: flex; flex-direction: column;
  color: #e7f5ec;
  padding-top: max(8px, env(safe-area-inset-top, 0px));
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}
.dm-theater[hidden] { display: none; }
.dm-theater .dm-th-stage {
  flex: 1 1 auto; min-height: 0;
  display: grid; place-items: center;
  position: relative;
  padding: 8px 0;
}
.dm-theater .dm-th-slot {
  width: min(100vw, calc((100dvh - 300px) * 16 / 9));
  max-width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 100%;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
/* THEATER PRESENTATION — the plate is NEVER reparented into the slot (a
 * DOM move reloads the iframe); it stays a child of the media root and
 * is positioned over the slot's rect by the engine's tracker. These
 * rules only dress it while it lives there. */
#dhangaa-media-root[data-dm-present="theater"] .dm-plate,
#dhangaa-media-root[data-dm-present="fullscreen"] .dm-plate {
  z-index: 112;              /* above the theater overlay (110) */
  border-radius: 12px;
  box-shadow: 0 18px 60px rgb(0 0 0 / 0.6);
}
#dhangaa-media-root[data-dm-present="fullscreen"] .dm-plate { border-radius: 0; box-shadow: none; }
.dm-theater .dm-th-shimmer { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 3; }
/* DOUBLE-TAP RIPPLE SURFACES: since Wave 22 the gesture lives on the
 * stage itself (single = toggle, double-edges = ±10s, double-center =
 * fullscreen); these zones are pure VISUAL ripple layers — they sit
 * under the plate overlay and must never eat a pointer. */
.dm-theater .dm-th-seekzone {
  position: absolute; top: 0; bottom: 0; left: 0; width: 22%;
  z-index: 4; display: grid; place-items: center;
  pointer-events: none;
}
.dm-theater .dm-th-seekzone.is-right { left: auto; right: 0; }
.dm-theater .dm-th-seekzone i {
  font: 700 13px/1 ui-sans-serif, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  color: #e7f5ec; letter-spacing: 0.04em;
  padding: 9px 14px; border-radius: 999px;
  background: rgb(6 17 12 / 0.72);
  border: 1px solid rgb(138 200 160 / 0.4);
  opacity: 0; transform: scale(0.8);
  transition: opacity 0.18s ease, transform 0.26s cubic-bezier(0.22, 1.15, 0.32, 1);
}
.dm-theater .dm-th-seekzone.is-flash i { opacity: 1; transform: scale(1); }
@media (prefers-reduced-motion: reduce) {
  .dm-theater .dm-th-seekzone i { transition: opacity 0.12s ease; transform: none; }
}
.dm-theater .dm-th-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%;
  border: 1px solid rgb(138 200 160 / 0.5);
  background: rgb(6 17 12 / 0.8); color: #dff2e6;
  display: grid; place-items: center; cursor: pointer; z-index: 3;
  transition: opacity .2s ease, transform .2s ease;
}
.dm-theater .dm-th-play svg { width: 26px; height: 26px; }
.dm-theater .dm-th-stage:hover .dm-th-play { opacity: .92; }
.dm-theater .dm-th-stage .dm-th-play:focus-visible { outline: 2px solid var(--dmw-accent, #8ac8a0); }

.dm-theater .dm-th-body {
  flex: none;
  padding: 6px 14px 10px;
  display: flex; flex-direction: column; gap: 8px;
  max-width: 860px; width: 100%; margin: 0 auto;
}
.dm-theater .dm-th-meta b { display: block; font-size: 15px; line-height: 1.35; }
.dm-theater .dm-th-meta i { display: block; font-style: normal; font-size: 11.5px; opacity: .7; margin-top: 2px; }
/* THE INTELLIGENT SCRUB (Wave 10): wrapper carries the hover tooltip;
 * the rail carries chapter tick marks under the played bar */
.dm-theater .dm-th-railwrap { position: relative; }
.dm-theater .dm-th-tip {
  position: absolute; bottom: 26px; left: 0;
  padding: 4px 9px; border-radius: 8px;
  background: rgb(4 12 8 / 0.94);
  border: 1px solid rgb(138 200 160 / 0.4);
  font: 600 11px/1 ui-sans-serif, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  color: #e7f5ec; white-space: nowrap;
  pointer-events: none; z-index: 5;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.5);
}
.dm-theater .dm-th-tip[hidden] { display: none; }
.dm-theater .dm-th-marks { position: absolute; left: 0; right: 0; top: 50%; height: 10px; transform: translateY(-50%); pointer-events: none; }
.dm-theater .dm-th-marks i {
  position: absolute; top: 50%;
  width: 2px; height: 8px; border-radius: 1px;
  transform: translate(-1px, -50%);
  background: rgb(255 224 168 / 0.55);
}
.dm-theater .dm-th-rail {
  position: relative; height: 22px; display: flex; align-items: center;
  cursor: pointer; touch-action: none;
}
.dm-theater .dm-th-rail::before {
  content: ''; position: absolute; left: 0; right: 0; height: 4px; border-radius: 4px;
  background: rgb(138 200 160 / 0.18);
}
.dm-theater .dm-th-rail i {
  position: absolute; left: 0; height: 5px; border-radius: 5px;
}
.dm-theater .dm-th-rail [data-dm-railbuf] { background: rgb(138 200 160 / 0.22); width: 0; }
/* THE DUAL-TONE RAIL (Wave 12): the played span is the brand's two-color
 * signal — archive-green flowing into warm-red — with a breathing glow;
 * the buffered span stays translucent green. No white/gray anywhere. */
.dm-theater .dm-th-rail [data-dm-railplay] {
  background: linear-gradient(90deg, #8ac8a0 0%, #9fc79c 46%, #e08585 100%);
  width: 0;
  box-shadow: 0 0 10px rgb(224 133 133 / 0.35), 0 0 4px rgb(138 200 160 / 0.4);
}
.dm-theater .dm-th-rail b {
  position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe0a8, #e08585 75%);
  transform: translateX(-7px);
  left: 0;
  border: 1.5px solid rgb(255 240 214 / 0.9);
  box-shadow: 0 0 12px rgb(224 133 133 / 0.65);
  transition: transform .18s cubic-bezier(.22, 1.15, .32, 1), box-shadow .18s ease;
}
.dm-theater .dm-th-rail:hover b, .dm-theater .dm-th-rail:focus-visible b {
  transform: translateX(-7px) scale(1.25);
  box-shadow: 0 0 18px rgb(224 133 133 / 0.85);
}
.dm-theater .dm-th-time { display: flex; justify-content: space-between; font-size: 11px; opacity: .75; font-variant-numeric: tabular-nums; }
.dm-theater .dm-th-ctrl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dm-theater .dm-th-ctrl button, .dm-theater .dm-th-ext {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 10px; border-radius: 999px;
  border: 1px solid rgb(138 200 160 / 0.4);
  background: rgb(138 200 160 / 0.1); color: #dff2e6;
  cursor: pointer; font-size: 12px; text-decoration: none;
}
.dm-theater .dm-th-ctrl button:disabled { opacity: .3; pointer-events: none; }
.dm-theater .dm-th-ctrl button svg { width: 17px; height: 17px; }
.dm-theater .dm-th-ctrl [data-dm-toggle] { min-width: 50px; height: 50px; background: rgb(224 133 133 / 0.18); }
.dm-theater .dm-th-ctrl [data-dm-back10], .dm-theater .dm-th-ctrl [data-dm-fwd10] { min-width: 46px; }
.dm-theater .dm-th-ctrl [data-dm-rate] { min-width: 48px; font-variant-numeric: tabular-nums; font-weight: 700; }
.dm-theater .dm-th-ctrl [data-dm-rate].is-active { background: rgb(255 224 168 / 0.2); border-color: rgb(255 224 168 / 0.55); }
.dm-theater .dm-th-ctrl [data-dm-cc].is-on { background: rgb(255 224 168 / 0.22); border-color: rgb(255 224 168 / 0.6); }
.dm-theater .dm-th-ctrl .dm-th-ext { margin-left: auto; }
.dm-theater .dm-th-related {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 2px;
  scrollbar-width: thin;
}
.dm-rel-card {
  flex: none; width: 128px;
  border: 1px solid rgb(138 200 160 / 0.22); border-radius: 10px;
  background: rgb(6 17 12 / 0.8); color: #cfe4d6;
  padding: 0 0 6px; cursor: pointer; text-align: start; overflow: hidden;
}
.dm-rel-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; border-radius: 10px 10px 0 0; background: #06110c; }
.dm-rel-card .dm-rel-ph { display: block; width: 100%; aspect-ratio: 16/9; background: rgb(138 200 160 / 0.08); }
.dm-rel-card b { display: block; font-size: 10.5px; line-height: 1.3; padding: 5px 7px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-rel-card i { display: block; font-style: normal; font-size: 9.5px; opacity: .65; padding: 1px 7px 0; }

/* FULLSCREEN / landscape immersive: the stage swallows the screen */
.dm-theater.is-fs, .dm-theater.is-landscape-immersive { padding: 0; }
.dm-theater.is-fs .dm-th-stage, .dm-theater.is-landscape-immersive .dm-th-stage { padding: 0; }
.dm-theater.is-fs .dm-th-slot,
.dm-theater.is-landscape-immersive .dm-th-slot { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; aspect-ratio: auto; border-radius: 0; }
/* THE TRANSPARENT FULL MENU BAR (Wave 22, owner direction): in fullscreen
 * the control body no longer sits BELOW the stage (that scrolled it off
 * the screen — a fullscreen with no controls at all); it overlays the
 * video's foot as glass — title, rail, transport — the whole instrument
 * over the picture, never stealing a pixel from it. The dialog rises
 * ABOVE the plate and goes TRANSPARENT: the video (the plate, one level
 * below) shows through, while the stage's pointer surface keeps the
 * unified tap gesture (single = toggle, double = ±10 / fullscreen). */
.dm-theater.is-fs {
  z-index: 113;
  background: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.dm-theater.is-fs .dm-th-body {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 8;
  margin: 0; max-width: none;
  padding: 30px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  gap: 6px;
  background: linear-gradient(180deg, transparent, rgb(3 8 6 / 0.5) 26%, rgb(3 8 6 / 0.88));
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .3s ease, transform .32s cubic-bezier(.22, 1, .32, 1);
}
/* the bar wakes with the chip on any interaction, sleeps when still */
.dm-theater.is-fs .dm-th-body.is-out { opacity: 1; transform: none; pointer-events: auto; }
.dm-theater.is-fs .dm-th-slot { background: transparent; }
.dm-theater.is-fs .dm-th-slot::after { opacity: .25; }
.dm-theater.is-fs .dm-th-play { display: none; }   /* the transport bar + the gesture own play/pause in fullscreen */
.dm-theater.is-fs .dm-th-meta b { font-size: 13.5px; }
.dm-theater.is-fs .dm-th-related, .dm-theater.is-fs .dm-th-chapters { display: none; }
@media (orientation: landscape) and (max-height: 500px) {
  .dm-theater:not(:fullscreen) { padding: 0; }
  .dm-theater .dm-th-body { padding: 4px 12px 6px; gap: 4px; }
  .dm-theater .dm-th-related { display: none; }
  .dm-theater .dm-th-slot { width: 100vw; height: calc(100dvh - 118px); max-height: calc(100dvh - 118px); aspect-ratio: auto; border-radius: 0; }
  .dm-theater .dm-th-stage { padding: 0; }
}

/* ---------------- nav preview ---------------- */
.dm-plate.is-navpreview {
  border: 1px solid rgb(224 133 133 / 0.55);
  box-shadow: 0 14px 40px rgb(0 0 0 / 0.6);
  z-index: 99;
}

/* ---------------- attached (page slot) ---------------- */
#dhangaa-media-root[data-dm-present="attached"] .dm-plate {
  z-index: 35;
  border-radius: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .dm-plate, .dm-dock { animation: none !important; transition: none !important; }
  .dm-shimmer i { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; }
}


/* ---------------- the shell layer (Wave 9) ---------------- */
.ds-layer {
  position: fixed;
  inset: 0;
  z-index: 55;              /* above page content, below dock (89) and theater (110) */
  background: #0a1712;
  animation: ds-layer-in .3s cubic-bezier(.22, 1, .32, 1) both;
}
@keyframes ds-layer-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.ds-layer-surface {
  position: absolute; inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: calc(64px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(var(--dock-plate-h, 65px) + 34px + env(safe-area-inset-bottom, 0px));
}
html.has-ds-layer .site-header { z-index: 60; }   /* the header stays the chrome above the layer */
@media (prefers-reduced-motion: reduce) {
  .ds-layer { animation: none; }
}

/* program-page handoff: hand the dialogue into the global session */
.dm-handoff {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgb(138 200 160 / 0.45);
  background: rgb(138 200 160 / 0.12); color: #dff2e6;
  font: 600 12.5px/1 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}
.dm-handoff:hover { background: rgb(138 200 160 / 0.2); }


/* (the in-media wavefield retired — Wave 15's DIGITAL FLARE rides the crown instead) */

/* atmosphere switcher: SVG marks (the glyph class died on device fonts) */
.logo-atmo-btn svg { width: 14px; height: 14px; display: block; }

/* ---------------- Wave 9.4 additions ---------------- */

/* THE CHAPTER RAIL: the dialogue's editorial structure, playable */
.dm-th-chapters { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 2px; scrollbar-width: thin; }
.dm-th-chapters[hidden] { display: none; }
.dm-th-ch {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px;
  border: 1px solid rgb(138 200 160 / 0.3);
  background: rgb(138 200 160 / 0.08); color: #cfe4d6;
  font: 600 11px/1 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}
.dm-th-ch b { font: 600 10px/1 ui-monospace, monospace; color: #8ac8a0; font-variant-numeric: tabular-nums; }
.dm-th-ch.is-active { background: rgb(224 133 133 / 0.18); border-color: rgb(224 133 133 / 0.55); color: #f2e2e2; }
.dm-th-ch.is-active b { color: #e08585; }

/* ONE SIGNAL LANGUAGE: the archive's corner data anchors mark every
 * surface the session lives on — the dock plate and the theater slot
 * speak the same geometry as the 3D projection and the nav media card. */
.dm-plate::after,
.dm-theater .dm-th-slot::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 7px 7px, rgba(138,200,160,.85) 0 1.5px, transparent 2px),
    radial-gradient(circle at calc(100% - 7px) 7px, rgba(138,200,160,.85) 0 1.5px, transparent 2px),
    radial-gradient(circle at 7px calc(100% - 7px), rgba(138,200,160,.85) 0 1.5px, transparent 2px),
    radial-gradient(circle at calc(100% - 7px) calc(100% - 7px), rgba(138,200,160,.85) 0 1.5px, transparent 2px);
  opacity: .4;
}
.dm-theater .dm-th-slot { position: relative; }
#dhangaa-media-root[data-dm-ready='playing'] .dm-plate::after { animation: dm-corner-live 1.8s ease-in-out infinite; }
@keyframes dm-corner-live { 0%,100% { opacity: .3; } 50% { opacity: .8; } }

/* THE DATA-DRIVEN FIELD: the signal field breathes with REAL archive
 * signal intensity (--dm-field: chapter proximity + provider state) */
/* (--dm-field now feeds the wavefield engine's amplitude — dhangaa-media.js paintField) */
@media (prefers-reduced-motion: reduce) { .dm-plate::after, .dm-theater .dm-th-slot::after { animation: none !important; } }

/* session mode on program pages: the attached plate covers the slot */
.dt-media-session { aspect-ratio: 16 / 9; background: #04100b; border-radius: 10px; }

/* ---------------- THE HEAT STRIP (Wave 14) ----------------
 * The theater rail glows where the community actually listens —
 * cookieless position samples aggregated per 10-minute bucket. */
.dm-th-heat {
  position: absolute; left: 0; right: 0; top: 100%;
  height: 3px;
  pointer-events: none;
  margin-top: 1px;
}
.dm-th-heat i {
  position: absolute; top: 0; height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(224,133,133,0.55), rgba(255,224,168,0.75));
  box-shadow: 0 0 8px rgba(224,133,133,0.45);
  animation: dm-heat-breathe 2.8s ease-in-out infinite;
}
@keyframes dm-heat-breathe { 0%, 100% { filter: brightness(0.85); } 50% { filter: brightness(1.25); } }
@media (prefers-reduced-motion: reduce) { .dm-th-heat i { animation: none; } }

/* ================================================================ WAVE 22
 * SHARE A MOMENT — Moment Mode surfaces of the one media session:
 * the aperture rail (the full timeline, the interval unmistakable), the
 * moment badge, the Share-Moment affordance, the endcard, and the
 * composer/share-sheet (dhangaa-moment-link.js).
 * ==================================================================== */

/* THE APERTURE RAIL — the regions outside the moment recede; the
 * selected interval carries the dual-tone signal + corner anchors. */
.dm-moment-win { position: absolute; inset: 0; pointer-events: none; --dmw-l: 0%; --dmw-r: 0%; }
.dm-moment-win .dm-mwin-l,
.dm-moment-win .dm-mwin-r {
  position: absolute; top: 50%; height: 10px; transform: translateY(-50%);
  background: rgb(4 12 9 / 0.62);
  backdrop-filter: blur(1px);
  border-radius: 5px;
}
.dm-moment-win .dm-mwin-l { left: 0; width: var(--dmw-l); }
.dm-moment-win .dm-mwin-r { right: 0; width: var(--dmw-r); }
.dm-moment-win .dm-mwin-band {
  position: absolute; top: 50%; height: 8px; transform: translateY(-50%);
  left: var(--dmw-l); right: var(--dmw-r);
  border-radius: 5px;
  background: linear-gradient(90deg, rgb(138 200 160 / 0.5), rgb(224 133 133 / 0.55));
  box-shadow: 0 0 10px rgb(138 200 160 / 0.35), inset 0 0 0 1px rgb(244 247 245 / 0.28);
}
.dm-moment-win .dm-mwin-band::before,
.dm-moment-win .dm-mwin-band::after {
  content: ''; position: absolute; top: -4px; bottom: -4px; width: 2px;
  background: rgb(244 247 245 / 0.92);
  box-shadow: 0 0 6px rgb(244 247 245 / 0.5);
}
.dm-moment-win .dm-mwin-band::before { left: 0; }
.dm-moment-win .dm-mwin-band::after { right: 0; }

/* the attached bar's slim aperture band */
.dm-abar-rail .dm-abar-mwin {
  position: absolute; top: -2px; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, rgb(138 200 160 / 0.7), rgb(224 133 133 / 0.7));
  box-shadow: 0 0 8px rgb(138 200 160 / 0.4);
  pointer-events: none;
}

/* THE MOMENT BADGE — the theater's meta line announces the window */
.dm-theater .dm-th-mmbadge {
  display: inline-block; vertical-align: middle;
  font-size: 10px; letter-spacing: .14em; font-weight: 700;
  color: #9fd4b4; border: 1px solid rgb(138 200 160 / 0.45);
  padding: 2px 7px; border-radius: 999px; margin-right: 8px;
  background: rgb(138 200 160 / 0.08);
  font-variant-numeric: tabular-nums;
}
.dm-theater .dm-th-mmbadge[hidden] { display: none; }
.dm-theater .dm-th-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 0; }

/* THE SHARE-MOMENT AFFORDANCE (engine surfaces) */
.dm-momentbtn svg { width: 17px; height: 17px; }
.dm-momentbtn { color: #9fd4b4; }
.dm-momentbtn:hover { color: #c7ecd3; filter: drop-shadow(0 0 6px rgb(138 200 160 / 0.5)); }
.dm-momentbtn[hidden] { display: none; }

/* THE ENDCARD — a bounded moment completes into elegant next actions */
.dm-moment-end {
  position: absolute; inset: 0; z-index: 30;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(ellipse at 50% 40%, rgb(6 20 14 / 0.82), rgb(3 10 7 / 0.94));
  opacity: 0; transition: opacity .28s ease; pointer-events: none;
}
.dm-moment-end.is-out { opacity: 1; pointer-events: auto; }
.dm-moment-end[hidden] { display: none; }
.dme-kicker {
  margin: 0; font-size: 11px; letter-spacing: .34em; font-weight: 700; color: #e08585;
  text-transform: uppercase;
}
.dme-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: min(92%, 560px); }
.dme-actions button,
.dme-actions a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgb(138 200 160 / 0.4); background: rgb(138 200 160 / 0.07);
  color: #e9f5ee; font-size: 13.5px; font-weight: 600; text-decoration: none;
  transition: transform .16s cubic-bezier(.22, 1.2, .32, 1), border-color .16s ease, background .16s ease;
}
.dme-actions button:hover, .dme-actions a:hover {
  transform: translateY(-1px); border-color: rgb(138 200 160 / 0.8); background: rgb(138 200 160 / 0.14);
}
.dme-actions .is-primary {
  border-color: rgb(224 133 133 / 0.65); background: linear-gradient(120deg, rgb(138 200 160 / 0.18), rgb(224 133 133 / 0.18));
}
.dme-actions svg { width: 15px; height: 15px; }

/* ------------------------------------------------------------------ the
 * MOMENT COMPOSER + SHARE SHEET (dhangaa-moment-link.js). The composer
 * is an overlay of the media root: bottom sheet on phones, centered
 * panel on larger surfaces. The aperture timeline is the Dhangaa-native
 * range instrument — signal hairlines, corner-anchor handles, the rest
 * of the dialogue receding. */
.dml-composer, .dml-sheet {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgb(3 10 7 / 0.6);
  opacity: 0; transition: opacity .22s ease;
}
.dml-composer[hidden], .dml-sheet[hidden] { display: none; }
.dml-composer.is-out, .dml-sheet.is-out { opacity: 1; }
.dml-sheet { align-items: center; z-index: 210; }
@media (min-width: 720px) {
  .dml-composer { align-items: center; }
}
.dml-panel {
  width: min(100%, 620px); max-height: 88dvh; overflow-y: auto;
  background: linear-gradient(180deg, #0a1f16, #071510);
  border: 1px solid rgb(138 200 160 / 0.28);
  border-bottom: none; border-radius: 20px 20px 0 0;
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -18px 60px rgb(0 0 0 / 0.55);
  transform: translateY(14px); transition: transform .26s cubic-bezier(.22, 1.1, .32, 1);
}
.dml-composer.is-out .dml-panel { transform: translateY(0); }
@media (min-width: 720px) {
  .dml-panel { border-radius: 20px; border-bottom: 1px solid rgb(138 200 160 / 0.28); }
}
.dml-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dml-head b { display: block; font-size: 17px; color: #f2f7f4; }
.dml-head i { display: block; font-style: normal; font-size: 12px; color: #a9bfb2; margin-top: 2px; }
.dml-x {
  background: none; border: 1px solid rgb(138 200 160 / 0.3); border-radius: 10px;
  width: 34px; height: 34px; display: grid; place-items: center; color: #cfe2d6; cursor: pointer;
}
.dml-x svg { width: 14px; height: 14px; }
.dml-modes { display: flex; gap: 8px; margin: 14px 0 4px; }
.dml-mode {
  flex: 1; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgb(138 200 160 / 0.22); background: rgb(138 200 160 / 0.05);
  color: #cfe2d6; font-size: 13px; font-weight: 600;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.dml-mode.is-active {
  border-color: rgb(138 200 160 / 0.75); background: rgb(138 200 160 / 0.14); color: #eef7f1;
  box-shadow: 0 0 14px rgb(138 200 160 / 0.18);
}
.dml-timeline { margin: 14px 0 4px; }
.dml-rail {
  position: relative; height: 64px; border-radius: 12px; overflow: hidden;
  background:
    repeating-linear-gradient(90deg,
      rgb(138 200 160 / 0.13) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, rgb(8 24 17 / 0.9), rgb(5 15 11 / 0.95));
  border: 1px solid rgb(138 200 160 / 0.2);
  cursor: pointer; touch-action: none;
}
.dml-hairlines {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg,
      rgb(138 200 160 / 0.10) 0 1px, transparent 1px 7px,
      rgb(224 133 133 / 0.08) 7px 8px, transparent 8px 13px);
  mask-image: linear-gradient(180deg, transparent 30%, #000 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 30%, #000 100%);
}
.dml-dim { position: absolute; top: 0; bottom: 0; background: rgb(2 8 6 / 0.66); }
.dml-dim-l { left: 0; }
.dml-dim-r { right: 0; }
.dml-aperture {
  position: absolute; top: 14px; bottom: 14px;
  background: linear-gradient(90deg, rgb(138 200 160 / 0.30), rgb(224 133 133 / 0.30));
  border: 1px solid rgb(244 247 245 / 0.4); border-radius: 10px;
  box-shadow: 0 0 18px rgb(138 200 160 / 0.25), inset 0 0 22px rgb(244 247 245 / 0.05);
  pointer-events: none;
}
.dml-playhead {
  position: absolute; top: 6px; bottom: 6px; width: 2px; margin-left: -1px;
  background: rgb(255 224 168 / 0.95); box-shadow: 0 0 8px rgb(255 224 168 / 0.7);
  pointer-events: none;
}
.dml-handle {
  position: absolute; top: 50%; width: 30px; height: 52px; margin: -26px 0 0 -15px;
  background: none; border: none; padding: 0; cursor: ew-resize; touch-action: none;
}
.dml-handle i {
  display: block; width: 12px; height: 44px; margin: 4px auto 0;
  border-radius: 7px;
  background: linear-gradient(180deg, #f4f7f5, #cfe2d6);
  box-shadow: 0 0 0 1.5px rgb(6 20 14 / 0.9), 0 0 14px rgb(244 247 245 / 0.45);
  position: relative;
}
.dml-handle::before, .dml-handle::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 1px; background: rgb(6 20 14 / 0.8);
}
.dml-handle::before { top: 16px; box-shadow: 0 6px 0 rgb(6 20 14 / 0.8); }
.dml-handle::after { bottom: 16px; }
.dml-handle:focus-visible i { box-shadow: 0 0 0 2px #ffe0a8, 0 0 16px rgb(255 224 168 / 0.8); }
.dml-handle[hidden] { display: none; }
#dhangaa-media-root.dml-dragging { user-select: none; }
#dhangaa-media-root.dml-dragging * { cursor: ew-resize !important; }
.dml-times {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-size: 12.5px; color: #cfe2d6; font-variant-numeric: tabular-nums;
}
.dml-times b { color: #9fd4b4; font-variant-numeric: tabular-nums; }
.dml-marks { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.dml-marks button, .dml-actions button {
  padding: 9px 14px; border-radius: 11px; cursor: pointer; font-size: 12.5px; font-weight: 600;
  border: 1px solid rgb(138 200 160 / 0.3); background: rgb(138 200 160 / 0.06); color: #dcebe2;
}
.dml-marks button:hover, .dml-actions button:hover { border-color: rgb(138 200 160 / 0.7); }
.dml-warn { font-style: normal; font-size: 11.5px; color: #e08585; }
.dml-warn[hidden] { display: none; }
.dml-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.dml-actions .dml-share {
  flex: 1; min-width: 150px;
  border-color: rgb(224 133 133 / 0.6); color: #f6e2e0;
  background: linear-gradient(120deg, rgb(138 200 160 / 0.16), rgb(224 133 133 / 0.16));
}
.dml-actions .dml-share:hover { border-color: rgb(224 133 133 / 0.9); }
.dml-composer.is-over .dml-share { opacity: .55; }

/* THE SHARE SHEET */
.dml-sheet-panel {
  position: relative; width: min(92vw, 480px);
  background: linear-gradient(180deg, #0a1f16, #071510);
  border: 1px solid rgb(138 200 160 / 0.3); border-radius: 18px;
  padding: 22px 22px 18px;
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.6);
  transform: translateY(10px); transition: transform .24s cubic-bezier(.22, 1.1, .32, 1);
}
.dml-sheet.is-out .dml-sheet-panel { transform: translateY(0); }
.dml-sheet-k { margin: 0 0 6px; font-size: 11px; letter-spacing: .3em; color: #e08585; font-weight: 700; text-transform: uppercase; }
.dml-sheet-url {
  margin: 0 0 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16.5px; color: #eef7f1; word-break: break-all;
}
.dml-sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dml-sheet-actions button, .dml-sheet-actions a {
  padding: 11px 16px; border-radius: 12px; cursor: pointer; text-decoration: none;
  border: 1px solid rgb(138 200 160 / 0.35); background: rgb(138 200 160 / 0.06);
  color: #dcebe2; font-size: 13px; font-weight: 600;
}
.dml-sheet-actions .is-primary {
  border-color: rgb(224 133 133 / 0.65); color: #f6e2e0;
  background: linear-gradient(120deg, rgb(138 200 160 / 0.18), rgb(224 133 133 / 0.18));
}
.dml-sheet-intents { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.dml-sheet-intents a {
  flex: 1; text-align: center; padding: 9px 10px; border-radius: 10px; text-decoration: none;
  border: 1px solid rgb(138 200 160 / 0.2); color: #a9bfb2; font-size: 12px;
}
.dml-sheet-intents a:hover { border-color: rgb(138 200 160 / 0.6); color: #eef7f1; }
.dml-sheet .dml-x { position: absolute; top: 14px; right: 14px; }

@media (prefers-reduced-motion: reduce) {
  .dm-moment-end, .dml-composer, .dml-sheet, .dml-panel, .dml-sheet-panel { transition: none; }
}

/* ================================================================ WAVE 23
 * THE COMPOSER LIVES IN THE THEATER — the temporal instrument sits
 * directly beneath the LIVE media surface (the plate never moves, the
 * playback never resets). While composing, the theater's own body
 * chrome recedes; the stage carries a quiet grade so the controls
 * beneath read clearly while the dialogue stays present. Members
 * select THIS part of THIS conversation — visibly, audibly.
 * ==================================================================== */

/* the theater body yields to the composer */
#dhangaa-media-root.dm-composing .dm-th-meta,
#dhangaa-media-root.dm-composing .dm-th-cue,
#dhangaa-media-root.dm-composing .dm-th-railwrap,
#dhangaa-media-root.dm-composing .dm-th-time,
#dhangaa-media-root.dm-composing .dm-th-ctrl,
#dhangaa-media-root.dm-composing .dm-th-chapters,
#dhangaa-media-root.dm-composing .dm-th-related { display: none !important; }
#dhangaa-media-root.dm-composing .dm-th-body { overflow-y: auto; }

/* the quiet stage grade — light leans away from the instrument below */
#dhangaa-media-root.dm-composing .dm-th-stage::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background: linear-gradient(180deg, rgb(3 10 7 / 0) 46%, rgb(3 10 7 / 0.55) 100%);
  opacity: 0; transition: opacity .4s ease;
}
#dhangaa-media-root.dm-composing .dm-th-stage.is-graded::after,
#dhangaa-media-root.dm-composing .dm-th-stage:hover::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  #dhangaa-media-root.dm-composing .dm-th-stage::after { transition: none; }
}

/* the composer becomes an in-flow instrument of the theater body */
.dml-composer {
  position: static !important; inset: auto !important;
  display: block; width: 100%;
  background: none !important; opacity: 1 !important;
  padding: 4px 2px 10px;
  animation: dml-rise .34s cubic-bezier(.22, 1.1, .32, 1);
}
.dml-composer[hidden] { display: none !important; }
@keyframes dml-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dml-composer { animation: none; } }
.dml-panel-like-spacer { display: none; }

/* the composer's own frame — glass over the theater's dark */
.dml-head {
  border-radius: 16px 16px 0 0;
  padding: 14px 16px 10px;
  background: linear-gradient(180deg, rgb(6 18 13 / 0.0), rgb(4 12 9 / 0.0));
}
.dml-head b { display: block; font-size: 16.5px; color: #f2f7f4; letter-spacing: .01em; }
.dml-head i { display: block; font-style: normal; font-size: 12px; color: #a9bfb2; margin-top: 2px; }
.dml-x {
  background: none; border: 1px solid rgb(138 200 160 / 0.3); border-radius: 10px;
  width: 34px; height: 34px; display: grid; place-items: center; color: #cfe2d6; cursor: pointer;
}
.dml-x svg { width: 14px; height: 14px; }
.dml-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

/* TEMPORAL MODES — a segmented instrument with a traveling indicator */
.dml-modes {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  margin: 10px 0 6px; padding: 4px;
  border: 1px solid rgb(138 200 160 / 0.22); border-radius: 14px;
  background: rgb(4 14 10 / 0.55);
}
.dml-mode-ind {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  border-radius: 10px;
  background: linear-gradient(120deg, rgb(138 200 160 / 0.16), rgb(224 133 133 / 0.16));
  border: 1px solid rgb(138 200 160 / 0.55);
  box-shadow: 0 0 16px rgb(138 200 160 / 0.18);
  transition: transform .28s cubic-bezier(.22, 1.1, .32, 1);
}
@media (prefers-reduced-motion: reduce) { .dml-mode-ind { transition: none; } }
.dml-mode {
  position: relative; z-index: 1; background: none; border: none; cursor: pointer;
  padding: 10px 8px; border-radius: 10px; color: #cfe2d6; font-size: 13px; font-weight: 600;
  transition: color .2s ease;
}
.dml-mode.is-active { color: #f2f7f4; }

/* THE APERTURE TIMELINE v2 — BEFORE / SELECTED / AFTER */
.dml-timeline { margin: 12px 0 4px; }
.dml-rail {
  position: relative; height: 68px; border-radius: 12px; overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgb(138 200 160 / 0.13) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, rgb(8 24 17 / 0.92), rgb(5 15 11 / 0.96));
  border: 1px solid rgb(138 200 160 / 0.2);
  cursor: pointer; touch-action: none;
}
.dml-hairlines {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg,
      rgb(138 200 160 / 0.10) 0 1px, transparent 1px 7px,
      rgb(224 133 133 / 0.08) 7px 8px, transparent 8px 13px);
  mask-image: linear-gradient(180deg, transparent 26%, #000 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 26%, #000 100%);
}
/* the outside zones recede — BEFORE and AFTER read as archival dim */
.dml-zone { position: absolute; top: 0; bottom: 0; background: rgb(2 8 6 / 0.68); pointer-events: none; }
.dml-zone-l { left: 0; }
.dml-zone-r { right: 0; }
.dml-aperture {
  position: absolute; top: 13px; bottom: 13px;
  background: linear-gradient(90deg, rgb(138 200 160 / 0.32), rgb(224 133 133 / 0.32));
  border: 1px solid rgb(244 247 245 / 0.42); border-radius: 10px;
  box-shadow: 0 0 18px rgb(138 200 160 / 0.28), inset 0 0 22px rgb(244 247 245 / 0.05);
  pointer-events: none;
}
.dml-aperture b {
  position: absolute; inset: -1px; border-radius: 10px;
  box-shadow: 0 0 0 0 rgb(244 247 245 / 0.0);
}
.dml-aperture.is-pulse b { animation: dml-ap-pulse .55s cubic-bezier(.22, 1.2, .32, 1); }
@keyframes dml-ap-pulse {
  0% { box-shadow: 0 0 0 0 rgb(244 247 245 / 0.35); }
  100% { box-shadow: 0 0 0 14px rgb(244 247 245 / 0.0); }
}
@media (prefers-reduced-motion: reduce) { .dml-aperture.is-pulse b { animation: none; } }
/* the live playhead — a beacon while playing */
.dml-playhead {
  position: absolute; top: 6px; bottom: 6px; width: 2px; margin-left: -1px;
  background: rgb(255 224 168 / 0.95); box-shadow: 0 0 8px rgb(255 224 168 / 0.7);
  pointer-events: none;
}
.dml-playhead.is-live { animation: dml-ph-breathe 2.2s ease-in-out infinite; }
@keyframes dml-ph-breathe { 0%, 100% { box-shadow: 0 0 6px rgb(255 224 168 / 0.55); } 50% { box-shadow: 0 0 13px rgb(255 224 168 / 0.95); } }
@media (prefers-reduced-motion: reduce) { .dml-playhead.is-live { animation: none; } }
.dml-handle {
  position: absolute; top: 50%; width: 30px; height: 52px; margin: -26px 0 0 -15px;
  background: none; border: none; padding: 0; cursor: ew-resize; touch-action: none;
}
.dml-handle i {
  display: block; width: 12px; height: 44px; margin: 4px auto 0; border-radius: 7px;
  background: linear-gradient(180deg, #f4f7f5, #cfe2d6);
  box-shadow: 0 0 0 1.5px rgb(6 20 14 / 0.9), 0 0 14px rgb(244 247 245 / 0.45);
  position: relative;
}
.dml-handle::before, .dml-handle::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 1px; background: rgb(6 20 14 / 0.8);
}
.dml-handle::before { top: 16px; box-shadow: 0 6px 0 rgb(6 20 14 / 0.8); }
.dml-handle::after { bottom: 16px; }
.dml-handle:focus-visible i { box-shadow: 0 0 0 2px #ffe0a8, 0 0 16px rgb(255 224 168 / 0.8); }
.dml-handle[hidden] { display: none; }
#dhangaa-media-root.dml-dragging { user-select: none; }
#dhangaa-media-root.dml-dragging * { cursor: ew-resize !important; }

/* THE DRAG LOUPE — ±40s magnified boundary instrument */
.dml-loupe {
  position: relative; height: 40px; margin-top: 8px; border-radius: 10px;
  overflow: hidden; border: 1px solid rgb(255 224 168 / 0.35);
  background: linear-gradient(180deg, rgb(10 26 19 / 0.95), rgb(6 16 12 / 0.98));
  opacity: 0; transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease;
  --dml-tick: 6.25%;
}
.dml-loupe.is-out { opacity: 1; transform: none; }
.dml-loupe[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .dml-loupe { transition: none; } }
.dml-loupe-ticks {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg,
    rgb(138 200 160 / 0.22) 0 1px, transparent 1px var(--dml-tick));
}
.dml-loupe-win {
  position: absolute; top: 4px; bottom: 4px;
  background: linear-gradient(90deg, rgb(138 200 160 / 0.22), rgb(224 133 133 / 0.22));
  border-radius: 6px; border: 1px solid rgb(244 247 245 / 0.3);
}
.dml-loupe-stem {
  position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px;
  background: rgb(255 224 168); box-shadow: 0 0 8px rgb(255 224 168 / 0.8);
}
.dml-loupe b {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 15px; color: #ffe0a8; font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 6px rgb(3 10 7 / 0.9); pointer-events: none;
}
.dml-loupe span {
  position: absolute; bottom: 3px; font-size: 10px; color: #9fb8aa;
  font-variant-numeric: tabular-nums; pointer-events: none;
}
.dml-loupe span[data-dml-loupe-l] { left: 8px; }
.dml-loupe span[data-dml-loupe-r] { right: 8px; }

.dml-times {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-size: 12.5px; color: #cfe2d6; font-variant-numeric: tabular-nums;
}
.dml-times b { color: #9fd4b4; font-variant-numeric: tabular-nums; }

.dml-marks { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.dml-marks button, .dml-actions button {
  padding: 10px 14px; border-radius: 11px; cursor: pointer; font-size: 12.5px; font-weight: 600;
  border: 1px solid rgb(138 200 160 / 0.3); background: rgb(138 200 160 / 0.06); color: #dcebe2;
}
.dml-marks button:hover, .dml-actions button:hover { border-color: rgb(138 200 160 / 0.7); }
.dml-marks button i { font-style: normal; color: #9fd4b4; font-weight: 700; }
.dml-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.dml-actions .dml-share {
  flex: 1; min-width: 150px;
  border-color: rgb(224 133 133 / 0.6); color: #f6e2e0;
  background: linear-gradient(120deg, rgb(138 200 160 / 0.16), rgb(224 133 133 / 0.16));
  position: relative; overflow: hidden;
}
.dml-actions .dml-share:hover { border-color: rgb(224 133 133 / 0.9); }
/* THE RELEASE — the temporal address leaves through the network */
.dml-share.is-release::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgb(244 247 245 / 0.45);
  animation: dml-release .7s cubic-bezier(.22, 1, .32, 1);
}
@keyframes dml-release { to { box-shadow: 0 0 0 22px rgb(244 247 245 / 0); } }
@media (prefers-reduced-motion: reduce) { .dml-share.is-release::after { animation: none; } }
/* previewing: the instrument announces it is playing the interval */
.dml-composer.is-previewing .dml-preview { border-color: rgb(255 224 168 / 0.7); color: #ffe0a8; }

/* THE MEMBER DOOR */
.dml-gate {
  margin-top: 14px; padding: 20px 18px;
  border: 1px solid rgb(138 200 160 / 0.3); border-radius: 16px;
  background: radial-gradient(120% 140% at 50% 0%, rgb(138 200 160 / 0.10), rgb(4 14 10 / 0.4));
  text-align: center;
}
.dml-gate[hidden] { display: none; }
.dml-gate-k { margin: 0; font-size: 10.5px; letter-spacing: .32em; font-weight: 700; color: #e08585; }
.dml-gate-b { margin: 10px 0 14px; font-size: 13.5px; line-height: 1.55; color: #dcebe2; }
.dml-gate-cta {
  display: inline-block; padding: 12px 22px; border-radius: 12px; text-decoration: none;
  border: 1px solid rgb(224 133 133 / 0.65); color: #f6e2e0; font-weight: 700; font-size: 14px;
  background: linear-gradient(120deg, rgb(138 200 160 / 0.18), rgb(224 133 133 / 0.18));
}
.dml-gate-n { margin: 12px 0 0; font-size: 11.5px; color: #9fb8aa; }

/* ================================================================ WAVE 25
 * THE MOMENT EXPERIENCE EVOLUTION — the composer becomes a temporal
 * instrument: the corridor is the hero; boundaries are anchors in a
 * contextual strip; audition is temporal; RELEASE transforms the
 * aperture into its durable address (the capsule); the member
 * threshold is one elegant line. Plus: the marking light on the plate,
 * the boundary charge, the dialogue endcard, the portal entrance.
 * ==================================================================== */

/* ---- compact head (the title no longer competes with the passage) */
.dml-composer .dml-head { padding: 10px 14px 6px; }
.dml-composer .dml-head b { font-size: 13.5px; letter-spacing: .06em; text-transform: uppercase; color: #a9c9b4; font-weight: 700; }
.dml-composer .dml-head .dml-x { width: 30px; height: 30px; }

/* ---- the hero corridor (taller, the signature instrument) */
.dml-composer .dml-modes { margin: 6px 2px 8px; }
.dml-composer .dml-timeline { margin: 4px 0 0; }
.dml-composer .dml-rail { height: 84px; border-radius: 14px; }
/* the frequency field reads as archive material (denser at the base) */
.dml-composer .dml-hairlines {
  background:
    repeating-linear-gradient(90deg, rgb(138 200 160 / 0.10) 0 1px, transparent 1px 5px,
      rgb(224 133 133 / 0.07) 5px 6px, transparent 6px 11px),
    repeating-linear-gradient(90deg, rgb(138 200 160 / 0.14) 0 1px, transparent 1px 17px);
  mask-image: linear-gradient(180deg, transparent 8%, #000 90%);
  -webkit-mask-image: linear-gradient(180deg, transparent 8%, #000 90%);
}
.dml-composer .dml-zone { background: rgb(2 8 6 / 0.74); }
.dml-composer .dml-aperture {
  top: 10px; bottom: 10px; border-radius: 12px;
  /* THE BOUNDARY CHARGE: the far edge brightens as the audition
   * approaches it (--dml-charge 0→1, driven by the playhead) */
  --dml-charge: 0;
  border-right-color: rgb(244 247 245 / calc(0.42 + var(--dml-charge) * 0.5));
  box-shadow:
    0 0 calc(14px + var(--dml-charge) * 22px) rgb(255 224 168 / calc(var(--dml-charge) * 0.45)),
    0 0 18px rgb(138 200 160 / 0.28), inset 0 0 22px rgb(244 247 245 / 0.05);
}
/* the armed mark rides the corridor as a locked start line */
.dml-marklight {
  position: absolute; top: 4px; bottom: 4px; width: 2px; margin-left: -1px;
  background: #ffe0a8; box-shadow: 0 0 10px rgb(255 224 168 / 0.9);
  pointer-events: none;
}
.dml-marklight::after {
  content: ''; position: absolute; top: 6px; left: -3px;
  width: 8px; height: 8px; border-radius: 2px;
  background: #ffe0a8; opacity: .9;
  animation: dml-mark-breathe 1.6s ease-in-out infinite;
}
@keyframes dml-mark-breathe { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dml-marklight::after { animation: none; opacity: .9; } }

/* ---- THE CONTEXTUAL STRIP: anchors + duration, one quiet line */
.dml-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 8px 2px 2px; padding: 0 2px;
}
.dml-anchor {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer; padding: 6px 4px;
  color: #dcebe2; font-size: 14px; font-variant-numeric: tabular-nums;
  transition: color .16s ease;
}
.dml-anchor i { font-style: normal; color: #9fd4b4; font-size: 15px; line-height: 1; transition: transform .18s cubic-bezier(.22, 1.2, .32, 1); }
.dml-anchor.is-end i { color: #e08585; }
.dml-anchor:hover { color: #f2f7f4; }
.dml-anchor:hover i { transform: scaleX(1.35); }
.dml-anchor:focus-visible { outline: 1.5px solid #ffe0a8; outline-offset: 2px; border-radius: 6px; }
.dml-anchor b { font-weight: 600; }
.dml-dur { color: #9fd4b4; font-size: 12.5px; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.dml-markstate {
  font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: #ffe0a8;
  display: inline-flex; gap: 5px; align-items: center;
}
.dml-markstate::before { content: ''; width: 6px; height: 6px; border-radius: 2px; background: #ffe0a8; animation: dml-mark-breathe 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .dml-markstate::before { animation: none; } }
.dml-markstate b { color: #ffe0a8; font-variant-numeric: tabular-nums; }

/* ---- THE ACTION LANGUAGE: audition (temporal) + RELEASE (signal) */
.dml-actions, .dml-th-row { display: flex; gap: 8px; margin: 10px 2px 4px; align-items: stretch; }
.dml-aud {
  padding: 11px 12px; border-radius: 11px; cursor: pointer;
  border: 1px solid rgb(138 200 160 / 0.26); background: rgb(138 200 160 / 0.05);
  color: #cfe2d6; font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px;
  transition: border-color .16s ease, color .16s ease;
}
.dml-aud.is-edge { padding: 11px 10px; color: #9fd4b4; }
.dml-aud.is-edge span { font-size: 10px; opacity: .8; letter-spacing: .06em; }
.dml-aud:hover { border-color: rgb(138 200 160 / 0.65); color: #eef7f1; }
.dml-composer.is-previewing .dml-aud[data-dml-audf] { border-color: rgb(255 224 168 / 0.7); color: #ffe0a8; }
.dml-share {
  flex: 1; min-width: 140px; position: relative; overflow: hidden;
  padding: 11px 16px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgb(224 133 133 / 0.6); color: #f6e2e0; font-weight: 700; font-size: 13px;
  background: linear-gradient(120deg, rgb(138 200 160 / 0.16), rgb(224 133 133 / 0.16));
  /* the release origin: a quiet signal ring waiting to emit */
  box-shadow: inset 0 0 14px rgb(244 247 245 / 0.04);
}
.dml-share::after {
  content: ''; position: absolute; right: 10px; top: 50%; width: 7px; height: 7px;
  transform: translateY(-50%); border-radius: 50%;
  background: rgb(255 224 168 / 0.9); box-shadow: 0 0 0 0 rgb(255 224 168 / 0.35);
  animation: dml-release-origin 2.4s ease-in-out infinite;
}
@keyframes dml-release-origin { 0%, 100% { box-shadow: 0 0 0 0 rgb(255 224 168 / 0.0); } 50% { box-shadow: 0 0 0 6px rgb(255 224 168 / 0.22); } }
@media (prefers-reduced-motion: reduce) { .dml-share::after { animation: none; } }

/* ---- THE THRESHOLD: one elegant line — never a panel */
.dml-threshold { padding: 2px 2px 0; }
.dml-threshold[hidden] { display: none; }
.dml-th-line { margin: 8px 2px 0; font-size: 12.5px; color: #c9dcd0; }
.dml-th-line::before { content: '◈ '; color: #e08585; }
.dml-th-cta {
  flex: 1; min-width: 130px; text-align: center; text-decoration: none;
  padding: 11px 14px; border-radius: 12px; font-weight: 700; font-size: 13px;
  border: 1px solid rgb(224 133 133 / 0.6); color: #f6e2e0;
  background: linear-gradient(120deg, rgb(138 200 160 / 0.16), rgb(224 133 133 / 0.16));
  display: inline-flex; align-items: center; justify-content: center;
}
.dml-th-fine { margin: 7px 2px 0; font-size: 11px; color: #87a394; }

/* ---- THE RELEASE TRANSFORMATION */
.dml-composer.is-releasing .dml-modes,
.dml-composer.is-releasing .dml-timeline,
.dml-composer.is-releasing .dml-actions,
.dml-composer.is-releasing .dml-threshold { display: none; }
.dml-composer.is-releasing .dml-strip { opacity: 0; pointer-events: none; height: 0; margin: 0; overflow: hidden; }
.dml-release { padding: 4px 2px 6px; opacity: 0; transform: translateY(8px); transition: opacity .3s ease, transform .3s cubic-bezier(.22, 1.1, .32, 1); }
.dml-release.is-out { opacity: 1; transform: none; }
.dml-release[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .dml-release { transition: none; } }
.dmlr-k { margin: 2px 0 10px; font-size: 10.5px; letter-spacing: .3em; font-weight: 700; color: #e08585; }
/* THE CAPSULE — the passage as a durable address */
.dmlr-capsule {
  display: flex; flex-direction: column; gap: 5px;
  border: 1px solid rgb(244 247 245 / 0.3); border-radius: 16px;
  padding: 14px 16px;
  background:
    linear-gradient(90deg, rgb(138 200 160 / 0.12), rgb(224 133 133 / 0.12)),
    radial-gradient(120% 160% at 50% -20%, rgb(244 247 245 / 0.07), transparent 60%);
  box-shadow: 0 0 24px rgb(138 200 160 / 0.14);
  animation: dml-capsule-arrive .5s cubic-bezier(.22, 1.15, .32, 1);
}
@keyframes dml-capsule-arrive { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dmlr-capsule { animation: none; } }
.dmlr-time { font-size: 15px; color: #f2f7f4; font-variant-numeric: tabular-nums; }
.dmlr-time::after { content: ' ' attr(data-program); display: block; font-size: 11px; color: #9fb8aa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.dmlr-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15.5px; color: #ffe0a8; word-break: break-all;
}
/* THE PATHS — destinations radiating from the signal */
.dmlr-paths { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; justify-content: center; }
.dmlr-paths button, .dmlr-paths a {
  padding: 10px 14px; border-radius: 11px; cursor: pointer; text-decoration: none;
  border: 1px solid rgb(138 200 160 / 0.3); background: rgb(138 200 160 / 0.05);
  color: #dcebe2; font-size: 12.5px; font-weight: 600;
  transition: transform .16s cubic-bezier(.22, 1.2, .32, 1), border-color .16s ease;
}
.dmlr-paths button:hover, .dmlr-paths a:hover { transform: translateY(-1px); border-color: rgb(138 200 160 / 0.7); }
.dmlr-paths .is-primary {
  border-color: rgb(224 133 133 / 0.65); color: #f6e2e0;
  background: linear-gradient(120deg, rgb(138 200 160 / 0.18), rgb(224 133 133 / 0.18));
}
.dmlr-foot { display: flex; gap: 8px; margin-top: 12px; }
.dmlr-foot button {
  flex: 1; padding: 10px 12px; border-radius: 11px; cursor: pointer;
  border: 1px solid rgb(138 200 160 / 0.2); background: none; color: #9fb8aa; font-size: 12px;
}
.dmlr-foot button:hover { color: #eef7f1; border-color: rgb(138 200 160 / 0.5); }

/* ---- THE MARKING LIGHT on the plate (mark-while-watching) */
.dm-markchip {
  position: absolute; top: -3px; bottom: -3px; width: 2px;
  background: #ffe0a8; box-shadow: 0 0 12px rgb(255 224 168 / 0.85);
  pointer-events: none; z-index: 8;
}
.dm-markchip::before {
  content: attr(data-elapsed);
  position: absolute; top: 6px; left: 7px;
  font-size: 10px; letter-spacing: .08em; color: #ffe0a8;
  background: rgb(3 10 7 / 0.72); border-radius: 6px; padding: 2px 6px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
/* the moment affordance while marking: a live pulse */
.dm-momentbtn.is-marking { color: #ffe0a8 !important; animation: dml-mark-breathe 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .dm-momentbtn.is-marking { animation: none; } }

/* ---- CONTINUE RELEASES THE APERTURE (§17): the rail window opens */
.dm-moment-win.is-release .dm-mwin-band { transition: left .8s cubic-bezier(.22, 1.05, .32, 1), right .8s cubic-bezier(.22, 1.05, .32, 1), opacity .9s ease; left: 0 !important; right: 0 !important; opacity: 0; }
.dm-moment-win.is-release .dm-mwin-l, .dm-moment-win.is-release .dm-mwin-r { transition: width .8s cubic-bezier(.22, 1.05, .32, 1); width: 0 !important; }
@media (prefers-reduced-motion: reduce) { .dm-moment-win.is-release .dm-mwin-band, .dm-moment-win.is-release .dm-mwin-l, .dm-moment-win.is-release .dm-mwin-r { transition: none; } }

/* ---- THE DIALOGUE ENDCARD variant */
.dm-moment-end[data-mode="dialogue"] .dme-kicker { color: #9fd4b4; letter-spacing: .26em; }
.dm-moment-end[data-mode="dialogue"] { background: radial-gradient(ellipse at 50% 38%, rgb(9 26 19 / 0.86), rgb(3 10 7 / 0.96)); }
.dm-moment-end.is-dialogue [data-dm-mprogram] { max-width: min(84%, 480px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- THE MOMENT PORTAL entrance (the landing: resolve → locate →
 *      illuminate → open). SSR truth first; the sequence is a concise
 *      light layer, instant under reduced motion. */
.moment-hero .moment-aperture { transform-origin: left center; }
.is-portal .moment-hero { animation: dm-portal-open 1.4s cubic-bezier(.25, 1, .3, 1) both; }
@keyframes dm-portal-open {
  0%   { filter: brightness(0.55); }
  46%  { filter: brightness(0.75); }
  100% { filter: brightness(1); }
}
.is-portal .moment-hero .moment-aperture-window {
  animation: dm-portal-window 1.4s cubic-bezier(.25, 1, .3, 1) both;
}
@keyframes dm-portal-window {
  0%   { transform: scaleX(0.04); opacity: 0.4; }
  46%  { transform: scaleX(0.04); opacity: 0.7; }
  74%  { transform: scaleX(1.06); }
  100% { transform: scaleX(1); opacity: 1; }
}
.is-portal .moment-hero a[data-dml-play] { animation: dm-portal-cta 1.4s ease both; }
@keyframes dm-portal-cta { 0%, 55% { opacity: 0; transform: translate(-50%, -50%) scale(.9); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .is-portal .moment-hero, .is-portal .moment-aperture-window, .is-portal a[data-dml-play] { animation: none; }
}

/* WAVE 25 — THE TASK-PAGE LAW: the media instrument does not exist
 * visually on auth/setup/account pages — never over the page's purpose */
#dhangaa-media-root.dm-task-page { display: none !important; }

/* WAVE 29 — HEAT AS THE SUBSTRATE: the corridor's frequency field
 * answers the community's real replay heat (and the fingerprint energy
 * envelope when it exists). Data-driven, deterministic, reduced-motion
 * complete by construction (a static gradient, not an animation). */
.dml-heat {
  position: absolute; inset: 4px 2px 4px 2px;
  pointer-events: none;
  border-radius: 10px;
  mask-image: linear-gradient(180deg, transparent 4%, #000 96%);
  -webkit-mask-image: linear-gradient(180deg, transparent 4%, #000 96%);
  opacity: .85;
}
