/*
 * Dhangaa Torbanii — member console styles (docs/14).
 * Standalone: the shared app.css build belongs to the landing workstream.
 * Dark institutional surfaces, ember accents, motion-safe transitions.
 */

.my-console-hero {
  position: relative;
  border: 1px solid rgba(255, 196, 110, 0.22);
  border-radius: 1.25rem;
  background:
    radial-gradient(28rem 18rem at 18% 12%, rgba(138, 200, 160, 0.10), transparent 60%),
    radial-gradient(26rem 16rem at 88% 90%, rgba(168, 58, 58, 0.12), transparent 60%),
    linear-gradient(160deg, rgba(8, 20, 15, 0.92), rgba(5, 11, 8, 0.96));
  overflow: hidden;
}

.my-console-hero[data-rhythm-ring] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  padding: 1.25rem;
}

@media (min-width: 640px) {
  .my-console-hero[data-rhythm-ring] { grid-template-columns: 15rem minmax(0, 1fr); padding: 1.75rem; align-items: center; }
}

.my-console-ring-wrap { display: flex; justify-content: center; }

.my-console-id .kicker { letter-spacing: 0.22em; }

.my-console-name {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: #f4faf5;
  letter-spacing: 0.01em;
}

.my-console-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.my-console-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(6, 14, 10, 0.55);
  border-radius: 0.7rem;
  padding: 0.4rem 0.7rem;
}

.my-console-stat b { font-size: 1.05rem; color: #a8d8b4; font-variant-numeric: tabular-nums; }
.my-console-stat span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(220, 235, 224, 0.55); }

.my-console-verify {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(255, 196, 110, 0.35);
  background: rgba(255, 196, 110, 0.07);
  border-radius: 0.75rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.8rem;
  color: #ffe6c2;
}

.my-console-digest {
  margin-top: 1.1rem;
  border-left: 2px solid rgba(224, 133, 133, 0.65);
  padding-left: 0.9rem;
}

.my-console-digest h2 { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: #e8a0a0; }

.my-rail { display: grid; gap: 0.7rem; grid-template-columns: 1fr; }

@media (min-width: 640px) { .my-rail { grid-template-columns: 1fr 1fr; } }

.my-rail-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(8, 18, 13, 0.72);
  border-radius: 0.85rem;
  padding: 0.65rem 0.8rem;
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.2s ease, background 0.2s ease;
}

.my-rail-item:hover { transform: translateY(-2px); border-color: rgba(138, 200, 160, 0.45); background: rgba(10, 24, 17, 0.85); }

@media (prefers-reduced-motion: reduce) { .my-rail-item { transition: none; } }

.my-rail-item img { border-radius: 0.5rem; object-fit: cover; }

.my-digest-answer {
  border: 1px solid rgba(138, 200, 160, 0.28);
  background: rgba(138, 200, 160, 0.07);
  border-radius: 0.75rem;
  padding: 0.6rem 0.8rem;
  font-size: 0.82rem;
  color: #d9ecdd;
  text-decoration: none;
  display: block;
}

.my-digest-answer:hover { border-color: rgba(138, 200, 160, 0.55); }

.my-console-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: rgba(220, 235, 224, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: none;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.my-console-toggle:hover { border-color: rgba(138, 200, 160, 0.5); color: #cfe4d6; }
.my-console-toggle[aria-pressed="true"] { border-color: rgba(138, 200, 160, 0.6); color: #a8d8b4; }

/* ============================================================
 * WAVE 30 — MY DHANGAA v2 + THE PERSONAL SIGNAL MAP
 * Tokenized member-layer surfaces: dark identity (default) and the
 * designed Dhangaa Light reading surface. Tokens flip on
 * [data-dh-theme] at the <html> element; the immersive public archive
 * stays dark by design — the preference governs member surfaces.
 * ============================================================ */

.my-hero {
  --ml-surface: rgba(8, 20, 15, 0.92);
  --ml-surface-2: rgba(13, 30, 23, 0.9);
  --ml-line: rgba(255, 255, 255, 0.10);
  --ml-ink: #f4faf5;
  --ml-ink-dim: #a9b8ae;
  --ml-accent: #e08585;
  --ml-green: #8ac8a0;
  position: relative;
  border: 1px solid var(--ml-line);
  border-radius: 1.25rem;
  background:
    radial-gradient(30rem 18rem at 16% 8%, rgba(138, 200, 160, 0.10), transparent 60%),
    radial-gradient(26rem 16rem at 92% 92%, rgba(168, 58, 58, 0.13), transparent 62%),
    linear-gradient(160deg, var(--ml-surface), rgba(5, 11, 8, 0.96));
  padding: 1.25rem;
  overflow: hidden;
}

@media (min-width: 640px) { .my-hero { padding: 1.75rem; } }

.my-hero-grid { display: grid; gap: 1rem; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .my-hero-grid { grid-template-columns: minmax(0, 1fr) auto; } }

.my-id { display: flex; align-items: center; gap: 0.9rem; min-width: 0; }
.my-name { font-size: clamp(1.45rem, 4vw, 2.1rem); font-weight: 700; color: var(--ml-ink); letter-spacing: 0.01em; }
.my-since { margin-top: 0.15rem; font-size: 0.75rem; color: var(--ml-ink-dim); }

.my-avatar {
  width: 56px; height: 56px; border-radius: 999px; overflow: hidden; flex-shrink: 0;
  display: grid; place-items: center;
  background: radial-gradient(circle at 32% 28%, rgba(138,200,160,.3), rgba(168,58,58,.22));
  border: 1px solid rgba(255,255,255,.18); color: #f4faf5; font-weight: 700; font-size: 1.3rem;
}
.my-avatar img { width: 100%; height: 100%; object-fit: cover; }
.my-avatar-lg { width: 72px; height: 72px; font-size: 1.6rem; }

.my-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.my-chip, .my-theme-form select {
  border: 1px solid var(--ml-line); border-radius: 999px; padding: 0.4rem 0.9rem;
  font-size: 0.75rem; color: var(--ml-ink-dim); background: var(--ml-surface-2);
}
.my-chip:hover { color: var(--ml-ink); border-color: rgba(255,255,255,.25); }
.my-theme-form select { appearance: none; cursor: pointer; padding-right: 1.6rem; }

.my-verify { margin-top: 0.9rem; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  border: 1px solid rgba(255,196,110,.35); background: rgba(255,196,110,.08);
  border-radius: 0.75rem; padding: 0.55rem 0.85rem; font-size: 0.8rem; color: #ffd894; }

.my-continue-zone { margin-top: 1.25rem; border-top: 1px solid var(--ml-line); padding-top: 1.1rem; }

.my-continue-lead { max-width: 44rem; }
.my-continue-title { font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 600; color: var(--ml-ink); line-height: 1.3; }
.my-continue-title a:hover { color: #b9e2c8; }

.my-continue-rail { position: relative; height: 0.5rem; border-radius: 999px;
  background: rgba(255,255,255,.10); overflow: visible; }
.my-continue-rail-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px;
  background: linear-gradient(90deg, rgba(46,132,89,.85), rgba(168,58,58,.85)); }
.my-continue-rail-pos { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 999px;
  transform: translate(-50%, -50%); background: #f4faf5;
  box-shadow: 0 0 0 3px rgba(168,58,58,.5), 0 0 12px rgba(224,133,133,.65); }
.my-continue-meta { margin-top: 0.5rem; display: flex; gap: 0.5rem; font-size: 0.78rem; color: var(--ml-ink-dim); }
.my-continue-time { font-variant-numeric: tabular-nums; color: var(--ml-green); letter-spacing: 0.04em; }

.my-continue-more { margin-top: 0.85rem; display: grid; gap: 0.45rem; }
.my-continue-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.9rem; width: 100%;
  border: 1px solid var(--ml-line); background: var(--ml-surface-2); border-radius: 0.7rem;
  padding: 0.55rem 0.85rem; text-align: left; font-size: 0.8rem; color: var(--ml-ink);
}
.my-continue-row:hover { border-color: rgba(138,200,160,.5); }
.my-continue-row-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-continue-row-time { flex-shrink: 0; font-variant-numeric: tabular-nums; color: var(--ml-ink-dim); font-size: 0.72rem; }
.my-continue-empty { padding: 0.5rem 0 0.25rem; }

.my-stats-line { font-size: 0.72rem; color: var(--ml-ink-dim); letter-spacing: 0.08em; text-transform: uppercase; }
.my-new-item a { display: flex; align-items: center; gap: 0.75rem; border: 1px solid var(--ml-line);
  border-radius: 0.75rem; padding: 0.55rem 0.7rem; background: var(--ml-surface-2); }
.my-new-item a:hover { border-color: rgba(138,200,160,.45); }
.my-new-item img { border-radius: 0.4rem; width: 64px; height: 36px; object-fit: cover; }

/* ---- Member object rows (dense, temporal — not dashboard cards) ---- */
.my-object-row { display: flex; align-items: center; gap: 0.75rem;
  border: 1px solid var(--ml-line); background: var(--ml-surface-2);
  border-radius: 0.75rem; padding: 0.6rem 0.8rem; }
.my-object-time { font-size: 0.72rem; font-variant-numeric: tabular-nums; color: var(--ml-green); }
.my-object-body { min-width: 0; flex: 1; }
.my-object-body span { display: block; }
.my-object-actions { display: flex; align-items: center; gap: 0.25rem; flex-shrink: 0; }

.my-save-chip { display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1px solid rgba(138,200,160,.4); color: #b9e2c8; border-radius: 999px;
  padding: 0.35rem 0.8rem; font-size: 0.75rem; }
.my-save-chip:hover { background: rgba(138,200,160,.1); }
.my-save-chip.chip-red { border-color: rgba(224,133,133,.4); color: #f0b9b9; }

/* ============================ THE SIGNAL MAP ============================ */
.signal-map { margin-top: 1rem; position: relative; }
.my-map-empty { margin-top: 1rem; border: 1px dashed rgba(138,200,160,.35); border-radius: 1rem;
  padding: 2rem 1.5rem; text-align: center;
  background: radial-gradient(22rem 12rem at 50% 0%, rgba(138,200,160,.07), transparent 70%), var(--ml-surface-2); }

.sm-stage { position: relative; border: 1px solid var(--ml-line); border-radius: 1rem;
  background:
    radial-gradient(34rem 30rem at 50% 46%, rgba(46,132,89,.08), transparent 62%),
    radial-gradient(20rem 16rem at 84% 12%, rgba(168,58,58,.07), transparent 60%),
    linear-gradient(170deg, rgba(6,14,10,.96), rgba(4,9,7,.98));
  overflow: hidden; touch-action: none; }
.sm-canvas { display: block; width: 100%; aspect-ratio: 1 / 1; max-height: min(78vh, 640px); cursor: grab; }
.sm-canvas:active { cursor: grabbing; }

.sm-core { fill: rgba(15, 27, 22, 0.9); stroke: rgba(224,133,133,.6); stroke-width: 1.2; }
.sm-core-ring { fill: none; stroke: rgba(138,200,160,.35); stroke-width: 1; stroke-dasharray: 3 6; }
.sm-core-initial { fill: #f4faf5; font-size: 20px; font-weight: 700; font-family: Georgia, serif; }

.sm-node { cursor: pointer; outline: none; }
.sm-node:focus-visible .sm-node-halo { stroke: #f4faf5; stroke-width: 1.6; }
.sm-node-disc { fill: rgba(46,132,89,.14); stroke: #5fbf8f; stroke-width: 1.3; }
.sm-node-person .sm-node-disc { fill: rgba(168,58,58,.14); stroke: #e08585; }
.sm-node-topic .sm-node-disc { fill: rgba(255,196,110,.10); stroke: #ffc46e; }
.sm-node-collection .sm-node-disc { fill: rgba(220,220,210,.08); stroke: #cfcfc4; }
.sm-node-moment .sm-node-disc { fill: rgba(138,200,160,.2); stroke: #8ac8a0; stroke-dasharray: 0; }
.sm-node-room .sm-node-disc { fill: rgba(224,133,133,.2); stroke: #e08585; }
.sm-node-halo { fill: none; stroke: transparent; transition: stroke .2s ease; }
.sm-node:hover .sm-node-halo, .sm-node:focus-visible .sm-node-halo { stroke: rgba(244,250,245,.55); }
.sm-node.sm-focused .sm-node-halo { stroke: #f4faf5; stroke-width: 1.8; }
.sm-node.sm-near .sm-node-halo { stroke: rgba(138,200,160,.6); }
.sm-node-label { fill: #d7e4da; font-size: 12.5px; paint-order: stroke; stroke: rgba(4,9,7,.85); stroke-width: 3px;
  pointer-events: none; }
.sm-node.sm-focused .sm-node-label, .sm-node:hover .sm-node-label { fill: #fff; }

.sm-edge { stroke-width: 1; transition: stroke-width .2s ease; }
.sm-edge.sm-lit { stroke-width: 1.8; }
.sm-edge-path { stroke-width: 1.4; stroke-dasharray: 5 5; stroke: rgba(138,200,160,.4) !important; }

.sm-pathway { fill: none; stroke: rgba(138,200,160,.35); stroke-width: 0.8; stroke-dasharray: 2 4; }
.sm-pathway-t { fill: rgba(185,226,200,.8); font-size: 11px; pointer-events: none; }

.sm-pulse { fill: #ffd894; filter: drop-shadow(0 0 5px rgba(255,216,148,.9)); pointer-events: none; }

.sm-controls { position: absolute; top: 0.65rem; right: 0.65rem; display: flex; align-items: center; gap: 0.35rem; }
.sm-ctl { width: 34px; height: 34px; border-radius: 0.6rem; border: 1px solid var(--ml-line);
  background: rgba(6,14,10,.8); color: #d7e4da; font-size: 1rem; backdrop-filter: blur(6px); }
.sm-ctl:hover { border-color: rgba(138,200,160,.55); }
.sm-hint { margin-left: 0.5rem; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(169,184,174,.8); background: rgba(6,14,10,.75); border-radius: 999px; padding: 0.35rem 0.7rem;
  backdrop-filter: blur(6px); }
@media (max-width: 640px) { .sm-hint { display: none; } }

.sm-panel { display: none; margin-top: 0.75rem; border: 1px solid rgba(138,200,160,.3);
  border-radius: 0.9rem; padding: 0.9rem 1rem; background: var(--ml-surface-2); }
.sm-panel.sm-open { display: block; }
.sm-panel-kicker { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ml-accent); }
.sm-panel-title { margin-top: 0.2rem; font-size: 1.05rem; font-weight: 600; color: var(--ml-ink); }
.sm-panel-reason { margin-top: 0.3rem; font-size: 0.78rem; color: var(--ml-ink-dim); }
.sm-panel-meta { margin-top: 0.35rem; font-size: 0.78rem; font-variant-numeric: tabular-nums; color: var(--ml-green); }
.sm-panel-rail { margin-top: 0.5rem; height: 0.35rem; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.sm-panel-rail-fill { height: 100%; background: linear-gradient(90deg, rgba(46,132,89,.9), rgba(168,58,58,.9)); }
.sm-panel-actions { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sm-act { border: 1px solid var(--ml-line); border-radius: 999px; padding: 0.45rem 1rem; font-size: 0.8rem;
  background: transparent; color: var(--ml-ink); }
.sm-act:hover { border-color: rgba(138,200,160,.55); }
.sm-act.sm-primary { background: linear-gradient(120deg, rgba(168,58,58,.92), rgba(138,58,40,.92));
  border-color: transparent; color: #fff; font-weight: 600; }
.sm-act.sm-primary:hover { filter: brightness(1.1); }
.sm-act-link { display: inline-flex; align-items: center; }
a.sm-act { display: inline-flex; align-items: center; }
.sm-ghost { color: var(--ml-ink-dim); }

.sm-index { margin-top: 0.85rem; border: 1px solid var(--ml-line); border-radius: 0.8rem; background: var(--ml-surface-2); }
.sm-index summary { cursor: pointer; padding: 0.65rem 0.95rem; font-size: 0.8rem; color: var(--ml-ink-dim); }
.sm-index summary:hover { color: var(--ml-ink); }
.sm-index-list { margin: 0; padding: 0 0.75rem 0.8rem 2.2rem; columns: 2; column-gap: 1.5rem; }
@media (max-width: 640px) { .sm-index-list { columns: 1; } }
.sm-index-list li { break-inside: avoid; padding: 0.28rem 0; font-size: 0.8rem; }
.sm-index-list a { color: #b9e2c8; }
.sm-index-list a:hover { color: #fff; }
.sm-index-type { display: inline-block; min-width: 4.2rem; font-size: 0.64rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(169,184,174,.75); }
.sm-index-reason { display: block; margin-left: 4.3rem; margin-top: -0.15rem; font-size: 0.68rem; color: rgba(169,184,174,.55); }

/* ===================== THEME: DHANGAA LIGHT (member layer) =====================
 * A designed parchment reading surface — not an inversion. Deep Odaa green
 * ink, saffron/warm-red accents preserved, archive depth kept through
 * layered paper tones. Applied on member surfaces via [data-dh-theme]. */
html[data-dh-theme="light"] .my-hero,
html[data-dh-theme="light"] .my-object-row,
html[data-dh-theme="light"] .my-new-item a,
html[data-dh-theme="light"] .sm-index,
html[data-dh-theme="light"] .sm-panel,
html[data-dh-theme="light"] .card {
  --ml-surface: rgba(252, 251, 246, 0.96);
  --ml-surface-2: rgba(246, 244, 236, 0.96);
  --ml-line: rgba(23, 46, 35, 0.14);
  --ml-ink: #14261d;
  --ml-ink-dim: #55665c;
  --ml-green: #1f6a47;
  background-color: var(--ml-surface-2);
  border-color: var(--ml-line);
  color: var(--ml-ink);
}
html[data-dh-theme="light"] .my-hero {
  background:
    radial-gradient(30rem 18rem at 16% 8%, rgba(46,132,89,.10), transparent 60%),
    radial-gradient(26rem 16rem at 92% 92%, rgba(168,58,58,.08), transparent 62%),
    linear-gradient(160deg, #fbfaf4, #f3f1e8);
}
html[data-dh-theme="light"] .my-name,
html[data-dh-theme="light"] .my-continue-title,
html[data-dh-theme="light"] .sm-panel-title { color: #14261d; }
html[data-dh-theme="light"] .my-continue-title a:hover { color: #1f6a47; }
html[data-dh-theme="light"] .my-object-body .text-white,
html[data-dh-theme="light"] .my-object-row .font-medium { color: #14261d !important; }
html[data-dh-theme="light"] .my-continue-row,
html[data-dh-theme="light"] .my-chip,
html[data-dh-theme="light"] .my-theme-form select { background: #f4f2ea; color: #3c4f44; border-color: rgba(23,46,35,.18); }
html[data-dh-theme="light"] .my-continue-rail { background: rgba(23,46,35,.12); }
html[data-dh-theme="light"] .my-new-item small { color: #44604f; }
html[data-dh-theme="light"] .text-ink-400, html[data-dh-theme="light"] .text-ink-500, html[data-dh-theme="light"] .text-ink-300 { color: #55665c !important; }
html[data-dh-theme="light"] .sm-stage {
  background:
    radial-gradient(34rem 30rem at 50% 46%, rgba(46,132,89,.09), transparent 62%),
    linear-gradient(170deg, #fbfaf3, #efece1);
}
html[data-dh-theme="light"] .sm-node-label { fill: #2c4436; stroke: rgba(252,251,246,.9); }
html[data-dh-theme="light"] .sm-ctl { background: rgba(252,251,246,.85); color: #2c4436; }
html[data-dh-theme="light"] .sm-hint { background: rgba(252,251,246,.85); color: #55665c; }
html[data-dh-theme="light"] .sm-act { color: #14261d; }
html[data-dh-theme="light"] .sm-map-empty { background: #f6f4ec; color: #14261d; }

/* System/Auto: honor the device on member surfaces, CSS-only. */
@media (prefers-color-scheme: light) {
  html[data-dh-theme="system"] .my-hero,
  html[data-dh-theme="system"] .my-object-row,
  html[data-dh-theme="system"] .my-new-item a,
  html[data-dh-theme="system"] .sm-index,
  html[data-dh-theme="system"] .sm-panel,
  html[data-dh-theme="system"] .card {
    --ml-surface: rgba(252, 251, 246, 0.96);
    --ml-surface-2: rgba(246, 244, 236, 0.96);
    --ml-line: rgba(23, 46, 35, 0.14);
    --ml-ink: #14261d;
    --ml-ink-dim: #55665c;
    --ml-green: #1f6a47;
    background-color: var(--ml-surface-2);
    border-color: var(--ml-line);
    color: var(--ml-ink);
  }
  html[data-dh-theme="system"] .my-hero {
    background:
      radial-gradient(30rem 18rem at 16% 8%, rgba(46,132,89,.10), transparent 60%),
      radial-gradient(26rem 16rem at 92% 92%, rgba(168,58,58,.08), transparent 62%),
      linear-gradient(160deg, #fbfaf4, #f3f1e8);
  }
  html[data-dh-theme="system"] .my-name,
  html[data-dh-theme="system"] .my-continue-title,
  html[data-dh-theme="system"] .sm-panel-title { color: #14261d; }
  html[data-dh-theme="system"] .my-continue-title a:hover { color: #1f6a47; }
  html[data-dh-theme="system"] .my-object-body .text-white,
  html[data-dh-theme="system"] .my-object-row .font-medium { color: #14261d !important; }
  html[data-dh-theme="system"] .my-continue-row,
  html[data-dh-theme="system"] .my-chip,
  html[data-dh-theme="system"] .my-theme-form select { background: #f4f2ea; color: #3c4f44; border-color: rgba(23,46,35,.18); }
  html[data-dh-theme="system"] .my-continue-rail { background: rgba(23,46,35,.12); }
  html[data-dh-theme="system"] .my-new-item small { color: #44604f; }
  html[data-dh-theme="system"] .text-ink-400, html[data-dh-theme="system"] .text-ink-500, html[data-dh-theme="system"] .text-ink-300 { color: #55665c !important; }
  html[data-dh-theme="system"] .sm-stage {
    background:
      radial-gradient(34rem 30rem at 50% 46%, rgba(46,132,89,.09), transparent 62%),
      linear-gradient(170deg, #fbfaf3, #efece1);
  }
  html[data-dh-theme="system"] .sm-node-label { fill: #2c4436; stroke: rgba(252,251,246,.9); }
  html[data-dh-theme="system"] .sm-ctl { background: rgba(252,251,246,.85); color: #2c4436; }
  html[data-dh-theme="system"] .sm-hint { background: rgba(252,251,246,.85); color: #55665c; }
  html[data-dh-theme="system"] .sm-act { color: #14261d; }
  html[data-dh-theme="system"] .sm-map-empty { background: #f6f4ec; color: #14261d; }
}

@media (prefers-reduced-motion: reduce) {
  .sm-node, .sm-edge, .sm-pulse, .my-continue-rail-fill { transition: none !important; animation: none !important; }
}

/* ============================================================
 * WAVE 31 — THE LIVING LAYER
 * (1) THE CONTROL GRAMMAR: one instrument family for every member
 *     action (the fan-press law: press = brightness lift, never
 *     movement). (2) Mobile width contracts. (3) Aperture grammar
 *     for Moments + Continue. No browser-default controls.
 * ============================================================ */

.dh-ctl {
  --dh-ctl-line: rgba(255,255,255,.16);
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 38px; padding: .42rem 1rem;
  border: 1px solid var(--dh-ctl-line); border-radius: 999px;
  background: rgba(10,22,17,.55); color: #e7efe9;
  font-size: .8rem; font-weight: 600; letter-spacing: .02em;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: border-color .18s ease, background-color .18s ease, filter .12s ease;
  position: relative;
}
.dh-ctl::before { /* the corner tick — the house signal mark */
  content: ""; position: absolute; left: 10px; top: 50%; width: 5px; height: 5px;
  transform: translateY(-50%) rotate(45deg);
  background: rgba(138,200,160,.85); border-radius: 1px; opacity: 0;
  transition: opacity .18s ease;
}
.dh-ctl:hover { border-color: rgba(138,200,160,.55); }
.dh-ctl:active { filter: brightness(1.25); }           /* press lifts, never moves */
.dh-ctl:focus-visible { outline: 2px solid #f4faf5; outline-offset: 2px; }
.dh-ctl[disabled] { opacity: .45; pointer-events: none; }

.dh-ctl-primary {
  background: linear-gradient(120deg, rgba(168,58,58,.95), rgba(122,44,32,.95));
  border-color: transparent; color: #fff;
}
.dh-ctl-primary::before { background: #ffd894; }
.dh-ctl-primary:hover { filter: brightness(1.08); border-color: transparent; }

.dh-ctl-quiet { background: transparent; border-color: transparent; color: #a9b8ae; min-height: 34px; }
.dh-ctl-quiet:hover { color: #e7efe9; border-color: var(--dh-ctl-line); }
.dh-ctl-danger { color: #f0b9b9; }
.dh-ctl-danger:hover { border-color: rgba(224,133,133,.6); }

.dh-ctl-saved { border-color: rgba(138,200,160,.7); color: #b9e2c8; }
.dh-ctl-saved::before { opacity: 1; }

/* selects/files wear the same skin */
.dh-select {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--dh-ctl-line); border-radius: 999px;
  background: rgba(10,22,17,.55); color: #e7efe9;
  min-height: 38px; padding: .42rem 2.2rem .42rem 1rem;
  font-size: .8rem; font-weight: 600; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.6 6 6.6l5-5' stroke='%23a9b8ae' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .95rem center; background-size: 11px;
}
.dh-file { position: relative; overflow: hidden; }
.dh-file input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}

/* theme choices as instrument cards */
.dh-choice {
  display: inline-flex; flex-direction: column; gap: .5rem; padding: .8rem 1rem .9rem;
  border: 1px solid var(--dh-ctl-line); border-radius: 1rem; cursor: pointer;
  background: rgba(10,22,17,.45); min-width: 8.2rem;
  transition: border-color .18s ease, filter .12s ease;
}
.dh-choice:active { filter: brightness(1.2); }
.dh-choice input { position: absolute; opacity: 0; }
.dh-choice[data-on="1"] { border-color: rgba(138,200,160,.65); }
.dh-choice-swatch { height: 34px; border-radius: .5rem; border: 1px solid rgba(255,255,255,.08); }
.dh-choice-swatch--dark { background: radial-gradient(circle at 30% 30%, #16352a, #050b08 75%), linear-gradient(120deg,#0a1611,#08120d); }
.dh-choice-swatch--light { background: radial-gradient(circle at 30% 30%, #ffffff, #efece1 80%); }
.dh-choice-swatch--system { background: linear-gradient(100deg, #0a1611 49.5%, #efece1 50.5%); }
.dh-choice small { color: #a9b8ae; font-size: .68rem; font-weight: 500; }

/* inputs wear the family */
.dh-input {
  border: 1px solid var(--dh-ctl-line); border-radius: .8rem;
  background: rgba(10,22,17,.5); color: #e7efe9;
  padding: .55rem .9rem; font-size: .85rem; min-height: 40px;
  transition: border-color .18s ease;
}
.dh-input:focus { outline: none; border-color: rgba(138,200,160,.6); box-shadow: 0 0 0 3px rgba(138,200,160,.14); }
.dh-input::placeholder { color: #6f8177; }
html[data-dh-theme="light"] .dh-input { background: rgba(255,255,255,.8); color: #14261d; border-color: rgba(23,46,35,.18); }
@media (prefers-color-scheme: light) {
  html[data-dh-theme="system"] .dh-input { background: rgba(255,255,255,.8); color: #14261d; border-color: rgba(23,46,35,.18); }
}

/* ---- (2) MOBILE WIDTH CONTRACTS ---- */
@media (max-width: 419.98px) {
  .my-object-row { flex-wrap: wrap; row-gap: .45rem; }
  .my-object-row .my-object-body { flex: 1 1 100%; order: 2; min-width: 0; }
  .my-object-row .my-object-actions { order: 3; margin-left: auto; flex-wrap: wrap; }
  .my-object-row > .my-object-time { order: 1; }
  .my-continue-row { flex-wrap: wrap; }
  .my-continue-row-title { flex: 1 1 100%; }
}
.my-object-actions { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.my-object-time { max-width: 9.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- (3) APERTURE GRAMMAR: Moments + Continue as temporal shapes ---- */
.dh-aperture { position: relative; height: 26px; border-radius: .45rem; overflow: hidden;
  background: repeating-linear-gradient(90deg, rgba(138,200,160,.14) 0 1px, transparent 1px 7px);
  border: 1px solid rgba(255,255,255,.08); }
.dh-aperture-range { position: absolute; top: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(46,132,89,.55), rgba(168,58,58,.6));
  box-shadow: 0 0 10px rgba(224,133,133,.25); }
.dh-aperture-range::before, .dh-aperture-range::after { /* corner anchors */
  content: ""; position: absolute; top: 3px; bottom: 3px; width: 2px; background: #ffd894; border-radius: 2px; }
.dh-aperture-range::before { left: 0; } .dh-aperture-range::after { right: 0; }
.dh-aperture-from { position: absolute; top: 0; bottom: 0; left: 0;
  background: linear-gradient(90deg, rgba(255,216,148,.3), rgba(255,216,148,.05)); }
.dh-aperture-beacon { position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 999px;
  transform: translate(-50%, -50%); background: #f4faf5;
  box-shadow: 0 0 0 3px rgba(168,58,58,.45); }

/* The continuation instrument (the lead card) */
.dh-continue-card { position: relative; border: 1px solid rgba(255,255,255,.1);
  border-radius: 1.1rem; padding: 1.05rem 1.1rem 1.1rem;
  background: linear-gradient(165deg, rgba(10,24,18,.9), rgba(5,11,8,.94));
  overflow: hidden; }
.dh-continue-card::before, .dh-continue-card::after { /* corner data anchors (the theater grammar) */
  content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid rgba(138,200,160,.5);
  pointer-events: none; }
.dh-continue-card::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.dh-continue-card::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.dh-continue-rail { position: relative; height: 34px; margin-top: .9rem;
  border-radius: .5rem; overflow: hidden;
  background: repeating-linear-gradient(90deg, rgba(138,200,160,.13) 0 1px, transparent 1px 9px); }
.dh-continue-rail .dh-aperture-range { box-shadow: 0 0 16px rgba(224,133,133,.3); }
.dh-continue-times { display: flex; justify-content: space-between; margin-top: .4rem;
  font-size: .7rem; font-variant-numeric: tabular-nums; color: #a9b8ae; }

/* Toast — the member surfaces' honest feedback (no more silent saves) */
.dh-toast { position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom));
  transform: translate(-50%, 140%); z-index: 130;
  padding: .65rem 1.2rem; border-radius: 999px;
  background: rgba(8,20,15,.95); border: 1px solid rgba(138,200,160,.5); color: #dff0e4;
  font-size: .8rem; font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,.45);
  transition: transform .28s cubic-bezier(.22,1,.36,1); max-width: min(92vw, 26rem); text-align: center; }
.dh-toast.is-in { transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .dh-toast { transition: none; } }

html[data-dh-theme="light"] .dh-ctl { background: rgba(255,255,255,.7); color: #1d3328; --dh-ctl-line: rgba(23,46,35,.18); }
html[data-dh-theme="light"] .dh-ctl:hover { border-color: rgba(31,106,71,.55); }
html[data-dh-theme="light"] .dh-ctl-primary { background: linear-gradient(120deg, #a83a3a, #7a2c20); color: #fff; }
html[data-dh-theme="light"] .dh-select { background-color: rgba(255,255,255,.75); color: #1d3328; }
html[data-dh-theme="light"] .dh-choice { background: rgba(255,255,255,.65); }
html[data-dh-theme="light"] .dh-continue-card { background: linear-gradient(165deg, #fcfbf5, #f1eee3); border-color: rgba(23,46,35,.14); }
html[data-dh-theme="light"] .dh-continue-times { color: #55665c; }
html[data-dh-theme="light"] .dh-toast { background: rgba(252,251,246,.97); color: #14261d; }
@media (prefers-color-scheme: light) {
  html[data-dh-theme="system"] .dh-ctl { background: rgba(255,255,255,.7); color: #1d3328; --dh-ctl-line: rgba(23,46,35,.18); }
  html[data-dh-theme="system"] .dh-ctl:hover { border-color: rgba(31,106,71,.55); }
  html[data-dh-theme="system"] .dh-ctl-primary { background: linear-gradient(120deg, #a83a3a, #7a2c20); color: #fff; }
  html[data-dh-theme="system"] .dh-select { background-color: rgba(255,255,255,.75); color: #1d3328; }
  html[data-dh-theme="system"] .dh-choice { background: rgba(255,255,255,.65); }
  html[data-dh-theme="system"] .dh-continue-card { background: linear-gradient(165deg, #fcfbf5, #f1eee3); border-color: rgba(23,46,35,.14); }
  html[data-dh-theme="system"] .dh-continue-times { color: #55665c; }
  html[data-dh-theme="system"] .dh-toast { background: rgba(252,251,246,.97); color: #14261d; }
}

/* WAVE 31 — SIGNAL MAP v2: artwork nodes, recency breathing, edge travel */
.sm-node-art { opacity: .92; }
.sm-node-disc-art { fill: none; stroke: #5fbf8f; stroke-width: 1.4; }
.sm-node.sm-recent .sm-node-halo { animation: sm-breathe 3.2s ease-in-out infinite; }
@keyframes sm-breathe {
  0%, 100% { stroke: rgba(255, 216, 148, 0); stroke-width: 1; }
  50% { stroke: rgba(255, 216, 148, .6); stroke-width: 1.8; }
}
.sm-edge-pulse { fill: #b9e2c8; filter: drop-shadow(0 0 4px rgba(185, 226, 200, .9)); pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .sm-node.sm-recent .sm-node-halo { animation: none; stroke: rgba(255,216,148,.35); }
}
html[data-dh-theme="light"] .sm-node-disc-art { stroke: #1f6a47; }
html[data-dh-theme="light"] .sm-edge-pulse { fill: #1f6a47; }

/* WAVE 31 — the share sheet + the constellation room */
.sm-share-sheet { margin-top: .8rem; border: 1px solid var(--ml-line); border-radius: 1rem;
  background: var(--ml-surface-2); padding: .9rem; display: grid; gap: .8rem; }
.sm-share-sheet img { width: min(300px, 100%); border-radius: .8rem; margin: 0 auto; display: block;
  border: 1px solid rgba(255,255,255,.1); }
.sm-share-targets { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.sm-share-targets a, .sm-share-targets button { text-decoration: none; }
.sm-share-targets a { display: inline-flex; align-items: center; padding: .42rem 1rem; border-radius: 999px;
  border: 1px solid var(--ml-line); color: #b9e2c8; font-size: .78rem; font-weight: 600; }
.sm-share-targets a:hover { border-color: rgba(138,200,160,.55); }

.sm3d-host { position: relative; margin-top: .8rem; width: 100%; aspect-ratio: 16 / 10; max-height: 60vh;
  border: 1px solid var(--ml-line); border-radius: 1rem; overflow: hidden;
  background: radial-gradient(60% 60% at 50% 42%, rgba(46,132,89,.10), transparent 70%),
    linear-gradient(170deg, rgba(6,14,10,.97), rgba(4,9,7,.98)); }
.sm3d-host canvas { width: 100% !important; height: 100% !important; display: block; cursor: grab; }
.sm-ctl-xr { border-color: rgba(255,216,148,.5); color: #ffd894; }
html[data-dh-theme="light"] .sm-share-targets a { color: #1f6a47; }

/* WAVE 32 — ADAPTIVE DENSITY: a beginning path is a SEED, not a lost dot */
.sm-sparse .sm-canvas { aspect-ratio: 4 / 3; max-height: 380px; }
.sm-sparse .sm-node-label { font-size: 15px; }
.sm-sparse .sm-core-initial { font-size: 30px; }

/* Light-mode map tokens (the live-found pale-on-white class) */
html[data-dh-theme="light"] .sm-core { fill: rgba(20, 38, 29, .92); stroke: rgba(168, 58, 58, .7); }
html[data-dh-theme="light"] .sm-core-ring { stroke: rgba(31, 106, 71, .5); }
html[data-dh-theme="light"] .sm-core-initial { fill: #f4faf5; }
html[data-dh-theme="light"] .sm-node-disc { stroke: #1f6a47; fill: rgba(46, 132, 89, .16); }
html[data-dh-theme="light"] .sm-node-person .sm-node-disc { stroke: #a83a3a; fill: rgba(168, 58, 58, .14); }
html[data-dh-theme="light"] .sm-pathway { stroke: rgba(31, 106, 71, .4); }
html[data-dh-theme="light"] .sm-pathway-t { fill: rgba(31, 106, 71, .8); }
html[data-dh-theme="light"] .sm-pulse { fill: #a86a1f; }
@media (prefers-color-scheme: light) {
  html[data-dh-theme="system"] .sm-core { fill: rgba(20, 38, 29, .92); stroke: rgba(168, 58, 58, .7); }
  html[data-dh-theme="system"] .sm-core-ring { stroke: rgba(31, 106, 71, .5); }
  html[data-dh-theme="system"] .sm-core-initial { fill: #f4faf5; }
  html[data-dh-theme="system"] .sm-node-disc { stroke: #1f6a47; fill: rgba(46, 132, 89, .16); }
  html[data-dh-theme="system"] .sm-node-person .sm-node-disc { stroke: #a83a3a; fill: rgba(168, 58, 58, .14); }
  html[data-dh-theme="system"] .sm-pathway { stroke: rgba(31, 106, 71, .4); }
  html[data-dh-theme="system"] .sm-pathway-t { fill: rgba(31, 106, 71, .8); }
}

/* WAVE 32 — THE MOTION PASS (data-driven, reduced-motion aware) */
@keyframes dhg-breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(168,58,58,.0); } 50% { box-shadow: 0 0 0 6px rgba(168,58,58,.18); } }
.dh-continue-card .dh-aperture-beacon { animation: dhg-beacon 2.6s ease-in-out infinite; }
@keyframes dhg-beacon { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.5); } }
.sm-share-sheet:not([hidden]) { animation: dhg-spring .38s cubic-bezier(.22,1.35,.32,1); }
@keyframes dhg-spring { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.my-stat-num { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
  .dh-continue-card .dh-aperture-beacon, .sm-share-sheet:not([hidden]), .dh-toast { animation: none !important; }
}

/* THE LIVING-ROOM PULSE */
.my-object-row[data-room-code] .kicker [data-room-presence] { margin-left: .4rem; }
.my-object-row.is-live-now { border-color: rgba(224, 133, 133, .65) !important; }
.my-object-row.is-live-now::after {
  content: ""; position: absolute; inset: -1px; border-radius: .75rem; pointer-events: none;
  border: 1px solid rgba(224, 133, 133, .8); animation: dhg-ring 2.2s ease-out infinite; }
.my-object-row.is-live-now { position: relative; }
@keyframes dhg-ring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .my-object-row.is-live-now::after { animation: none; opacity: .4; } }

/* ============ THE YEAR WALK (the honest Wrapped) ============ */
.yw { max-width: 44rem; margin: 0 auto; padding: 3rem 1rem 5rem; }
.yw-station { min-height: 62vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; gap: 1rem;
  opacity: 0; transform: translateY(34px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,1,.36,1); }
.yw-station.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .yw-station { transition: none; transform: none; opacity: 1; } }
.yw-title { font-size: clamp(2rem, 7vw, 3.2rem); font-weight: 800; letter-spacing: .01em; }
.yw-sub { color: var(--ml-ink-dim); font-size: 1.05rem; }
.yw-scrollhint { margin-top: 2rem; font-size: 1.4rem; color: var(--ml-green); animation: yw-float 1.8s ease-in-out infinite; }
@keyframes yw-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
.yw-kicker { font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ml-accent); }
.yw-line { font-size: clamp(1.2rem, 4.5vw, 1.9rem); font-weight: 700; }
.yw-meta { font-size: .8rem; color: var(--ml-ink-dim); max-width: 30rem; }
.yw-art { width: min(420px, 92%); border-radius: 1rem; border: 1px solid var(--ml-line);
  box-shadow: 0 18px 60px rgba(0,0,0,.45); }
.yw-nums { display: flex; gap: 2.2rem; flex-wrap: wrap; justify-content: center; }
.yw-num b { display: block; font-size: 2.6rem; font-weight: 800; color: var(--ml-green); font-variant-numeric: tabular-nums; }
.yw-num span { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ml-ink-dim); }
.yw-weeks { display: flex; align-items: flex-end; gap: 5px; height: 120px; width: min(340px, 90%); margin-top: .6rem; }
.yw-week { flex: 1; height: var(--h, 10%); border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, rgba(168,58,58,.85), rgba(46,132,89,.7)); min-height: 6px; }
.yw-voices { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; max-width: 30rem; }
.yw-voice { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1.05rem;
  border: 1px solid var(--ml-line); border-radius: 999px; font-size: .85rem; }
.yw-voice:hover { border-color: rgba(224,133,133,.6); }
.yw-voice-glyph { color: var(--ml-accent); }
.yw-moments { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.yw-moment { display: flex; flex-direction: column; align-items: center; gap: .35rem; font-size: .68rem;
  color: var(--ml-ink-dim); font-variant-numeric: tabular-nums; }
.yw-topics { display: flex; flex-wrap: wrap; gap: .55rem; justify-content: center; }
.yw-card { width: min(300px, 88%); border-radius: 1rem; border: 1px solid var(--ml-line);
  box-shadow: 0 20px 70px rgba(0,0,0,.5); }
.yw-share { display: flex; flex-direction: column; align-items: center; gap: 1rem; }

/* THE SPOKEN SENTENCE (transcript anchor) */
.sm-panel-quote { margin: .55rem 0 0; padding: .55rem .8rem; border-left: 2px solid var(--ml-green);
  font-family: Georgia, serif; font-size: .92rem; line-height: 1.5; color: var(--ml-ink);
  background: rgba(138, 200, 160, .06); border-radius: 0 .5rem .5rem 0; }

/* WAVE 33 — THE LISTENING PULSE chip */
.dhg-presence { position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(.9rem + env(safe-area-inset-bottom)); z-index: 95;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .38rem 1rem; border-radius: 999px;
  background: rgba(8, 20, 15, .82); border: 1px solid rgba(138, 200, 160, .4);
  color: #cfe8d6; font-size: .74rem; font-weight: 600; letter-spacing: .04em;
  backdrop-filter: blur(8px); box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
  transition: opacity .3s ease; pointer-events: none; }
body.has-dock .dhg-presence { bottom: calc(6.5rem + env(safe-area-inset-bottom)); }
.dhg-presence-dot { width: 7px; height: 7px; border-radius: 999px; background: #8ac8a0;
  box-shadow: 0 0 0 0 rgba(138, 200, 160, .6); animation: dhg-pulse-dot 1.8s ease-out infinite; }
@keyframes dhg-pulse-dot { 0% { box-shadow: 0 0 0 0 rgba(138,200,160,.55); } 100% { box-shadow: 0 0 0 8px rgba(138,200,160,0); } }
@media (prefers-reduced-motion: reduce) { .dhg-presence-dot { animation: none; } }
html[data-dh-theme="light"] .dhg-presence { background: rgba(252,251,246,.9); color: #1f4231; border-color: rgba(31,106,71,.4); }

/* WAVE 33 — THE GUEST LENS (floating trace) */
.dhg-lens { position: fixed; left: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 94; display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem 1.05rem; border-radius: 999px; cursor: pointer;
  background: rgba(8, 20, 15, .85); border: 1px solid rgba(224, 133, 133, .4);
  color: #f0d9d9; font-size: .74rem; font-weight: 700; letter-spacing: .04em;
  backdrop-filter: blur(8px); box-shadow: 0 6px 24px rgba(0, 0, 0, .4);
  transition: border-color .18s ease, filter .12s ease; }
.dhg-lens:active { filter: brightness(1.25); }
.dhg-lens:hover { border-color: rgba(224, 133, 133, .8); }
.dhg-lens-dot { width: 7px; height: 7px; border-radius: 999px; background: #e08585;
  animation: dhg-pulse-dot 2.1s ease-out infinite; --dhg: 1; }
.dhg-lens[hidden] { display: none; }
.dhg-lens-drawer { position: fixed; left: 1rem; bottom: calc(4.2rem + env(safe-area-inset-bottom));
  z-index: 96; width: min(21rem, calc(100vw - 2rem));
  background: rgba(6, 14, 10, .96); border: 1px solid rgba(138, 200, 160, .35);
  border-radius: 1.1rem; padding: 1.05rem 1.1rem; backdrop-filter: blur(14px);
  display: flex; flex-direction: column; gap: .7rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
  animation: dhg-spring .34s cubic-bezier(.22,1.35,.32,1); }
.dhg-lens-drawer[hidden] { display: none; }
.dhg-lens-note { font-size: .74rem; line-height: 1.5; color: #a9b8ae; }
.dhg-lens-items { display: flex; flex-wrap: wrap; gap: .45rem; max-height: 9rem; overflow: auto; }
.dhg-lens-count { font-variant-numeric: tabular-nums; margin-left: .3rem; }
@media (prefers-reduced-motion: reduce) { .dhg-lens-drawer { animation: none; } .dhg-lens-dot { animation: none; } }

/* WAVE 34 — THE TONIGHT PULSE on the hero counters */
.hero-stat-live dd { color: #8ac8a0 !important; }
.hero-stat-live { position: relative; }
.hero-stat-live::after { content: ""; position: absolute; top: 6px; right: 8px; width: 6px; height: 6px;
  border-radius: 999px; background: #8ac8a0; animation: dhg-pulse-dot 1.8s ease-out infinite; }

/* THE CO-PRESENCE MARK */
.dhg-react[aria-pressed="true"] { border-color: rgba(224,133,133,.75) !important; color: #f0c9c9 !important; }
.dhg-react.has-marks [aria-hidden] { color: #e08585; }

/* ============================================================
 * WAVE 35 — THE WIDTH LAW (the live-found extreme-scroll class).
 * Long Oromo titles in nowrap truncate spans forced flex rows past
 * the viewport (min-content = full text). Two layers:
 * (1) STRUCTURAL: rows may never demand more than their container;
 * (2) GUARD: member surfaces clip stray overflow — a wide child can
 *     never scroll the whole application again.
 * ============================================================ */
.my-object-row, .my-continue-row, .my-digest-answer, .my-new-item a {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.my-object-body, .my-continue-row-title, .my-object-time, .my-object-actions {
  min-width: 0;
}
.my-object-body > span, .my-continue-row-title {
  max-width: 100%;
}
main[data-member-surface-root], section[data-my-dhangaa], section[data-profile-surface],
article[data-public-member], .yw {
  overflow-x: clip;
  max-width: 100vw;
}
/* images inside member surfaces can never blow the layout */
section[data-my-dhangaa] img, section[data-profile-surface] img, article[data-public-member] img {
  max-width: 100%;
}

/* ============ FIX 3: THE PUBLIC PROFILE — a real showcase ============ */
.pp { max-width: 46rem; margin: 0 auto; padding: 0 1rem 3rem; }
.pp-banner { position: relative; height: 11rem; border-radius: 1.25rem 1.25rem 0 0;
  overflow: hidden; border: 1px solid var(--ml-line); border-bottom: 0; }
.pp-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-banner::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5,11,8,.05), rgba(5,11,8,.55)); }
.pp-banner-field { position: absolute; inset: 0;
  background: radial-gradient(28rem 10rem at 20% 110%, rgba(168,58,58,.35), transparent 65%),
    radial-gradient(26rem 9rem at 85% -30%, rgba(46,132,89,.30), transparent 65%),
    linear-gradient(160deg, #0d211a, #081410); }
.pp-head { position: relative; border: 1px solid var(--ml-line); border-top: 0;
  border-radius: 0 0 1.25rem 1.25rem; background: linear-gradient(170deg, rgba(10,24,18,.94), rgba(5,11,8,.97));
  padding: 0 1.25rem 1.25rem; }
.pp-id { display: flex; align-items: flex-end; gap: 1rem; margin-top: -2.6rem; }
.pp-avatar { width: 84px; height: 84px; border-radius: 999px; overflow: hidden;
  border: 3px solid rgba(138,200,160,.65); box-shadow: 0 10px 30px rgba(0,0,0,.5);
  display: grid; place-items: center; background: radial-gradient(circle at 32% 28%, rgba(138,200,160,.3), rgba(168,58,58,.25));
  color: #f4faf5; font-size: 2rem; font-weight: 800; flex-shrink: 0; }
.pp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pp-name { font-size: 1.45rem; font-weight: 800; color: #f4faf5; line-height: 1.2; overflow-wrap: anywhere; }
.pp-stats { display: flex; flex-wrap: wrap; gap: 1.6rem; margin-top: .9rem; }
.pp-stat b { display: block; font-size: 1.5rem; font-weight: 800; color: #b9e2c8; font-variant-numeric: tabular-nums; }
.pp-stat span { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: #a9b8ae; }
.pp-bio { margin-top: 1rem; color: #d7e4da; font-size: .92rem; line-height: 1.6; overflow-wrap: anywhere; }
.pp-sec-title { display: flex; align-items: center; gap: .8rem; margin: 2rem 0 .9rem;
  font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ml-accent); }
.pp-sec-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(224,133,133,.4), transparent); }
.pp-moments { display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .pp-moments { grid-template-columns: 1fr 1fr; } }
.pp-moment { display: flex; align-items: center; gap: .8rem; padding: .7rem .85rem;
  border: 1px solid var(--ml-line); border-radius: .8rem; background: rgba(10,24,18,.5);
  min-width: 0; overflow: hidden; }
.pp-moment:hover { border-color: rgba(138,200,160,.5); }
.pp-moment .my-object-body { flex: 1 1 auto; }
.pp-foot { margin-top: 2.2rem; text-align: center; color: #6f8177; font-size: .7rem; }
html[data-dh-theme="light"] .pp-banner-field { background:
    radial-gradient(28rem 10rem at 20% 110%, rgba(168,58,58,.22), transparent 65%),
    radial-gradient(26rem 9rem at 85% -30%, rgba(46,132,89,.25), transparent 65%),
    linear-gradient(160deg, #e8e4d5, #dcd8c6); }
html[data-dh-theme="light"] .pp-head { background: linear-gradient(170deg, #fcfbf5, #f1eee3); border-color: rgba(23,46,35,.14); }
html[data-dh-theme="light"] .pp-name { color: #14261d; }
html[data-dh-theme="light"] .pp-stat span, html[data-dh-theme="light"] .pp-bio { color: #55665c; }
html[data-dh-theme="light"] .pp-stat b { color: #1f6a47; }
html[data-dh-theme="light"] .pp-moment { background: rgba(255,255,255,.7); }

/* ============================================================
 * WAVE 36 — MEDIA-FIRST MY DHANGAA (the artwork pass)
 * Every surface carries the dialogue's own image (same-origin
 * /media-thumb bytes), with the temporal aperture ON the art.
 * ============================================================ */
.rs-art { position: relative; border-radius: .9rem; overflow: hidden; aspect-ratio: 16 / 9; }
.rs-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rs-art-veil { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5,11,8,.15) 0%, rgba(5,11,8,.35) 55%, rgba(5,11,8,.88) 100%); }
.rs-art-rail { position: absolute; left: 6%; right: 6%; bottom: 10px; height: 5px; border-radius: 999px;
  background: rgba(255,255,255,.22); overflow: visible; }
.rs-rail-range { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px;
  background: linear-gradient(90deg, rgba(138,200,160,.95), rgba(224,133,133,.95));
  box-shadow: 0 0 10px rgba(224,133,133,.35); }
.rs-rail-beacon { position: absolute; top: 50%; width: 11px; height: 11px; border-radius: 999px;
  transform: translate(-50%, -50%); background: #f4faf5;
  box-shadow: 0 0 0 3px rgba(168,58,58,.55); }
.dh-continue-card { display: flex; flex-direction: column; }
.rs-body { position: relative; padding: .9rem 1rem 1.05rem; }
@media (min-width: 640px) {
  .dh-continue-card { flex-direction: row; align-items: stretch; }
  .rs-art { flex: 0 0 46%; max-width: 46%; border-radius: 1.1rem 0 0 1.1rem; aspect-ratio: auto; }
  .rs-body { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
}

.rs-art-chip { position: relative; width: 92px; height: 52px; border-radius: .5rem; overflow: hidden;
  background: rgba(255,255,255,.05); border: 1px solid var(--ml-line); flex-shrink: 0; }
.rs-art-chip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rs-art-chip-lg { width: 112px; height: 63px; }
.rs-chip-aperture { position: absolute; left: 4px; right: 4px; bottom: 3px; height: 4px; border: 0; border-radius: 2px; }
.rs-chip-time { font-size: .68rem; color: var(--ml-green); font-variant-numeric: tabular-nums; }
.rs-chip-art { width: 72px; height: 41px; object-fit: cover; border-radius: .4rem; flex-shrink: 0;
  border: 1px solid var(--ml-line); }
html[data-dh-theme="light"] .rs-art-veil { background: linear-gradient(180deg, rgba(252,251,246,.05), rgba(252,251,246,.72) 100%); }
html[data-dh-theme="light"] .rs-art-chip { background: rgba(23,46,35,.06); }

/* WAVE 37 — THE LIVING REEL chips */
.reel-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .8rem;
  border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-size: .72rem;
  font-weight: 600; text-decoration: none; backdrop-filter: blur(6px); }
.reel-chip:hover { background: rgba(255,255,255,.24); }
.reel-chip-live { background: rgba(46,132,89,.4); border: 1px solid rgba(138,200,160,.55); }
.reel-chip-live i { width: 6px; height: 6px; border-radius: 999px; background: #8ac8a0;
  animation: dhg-pulse-dot 1.8s ease-out infinite; }
.reel-chip-room.is-live { background: rgba(168,58,58,.45); border: 1px solid rgba(224,133,133,.7); }
#reel-mark[aria-pressed="true"] { background: rgba(224,133,133,.45); border: 1px solid rgba(224,133,133,.75); }

/* WAVE 38 — THE SENTENCE VEIL (kinetic words) + join chip */
.rv-word { display: inline-block; opacity: 0; transform: translateY(0.35em);
  animation: rv-rise .5s cubic-bezier(.22,1,.36,1) forwards; }
@keyframes rv-rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rv-word { animation: none; opacity: 1; transform: none; } }
#reel-sentence { text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.reel-chip-join { background: rgba(46,132,89,.5); border: 1px solid rgba(185,226,200,.7); color: #eafff2; }

/* ---------- WAVE 51.9 — THE REEL DECK REBUILT ----------
   Phones/tablets are FULL-BLEED (the centered portrait card with side
   gutters read as dead space); the identity layer is clamp-safe; the
   APERTURE BAR carries the controls — the moment's window in the whole
   dialogue as a live-progress ceiling with a moving playhead — attaching
   on touch/hover/pointer activity and receding when idle. */
.reel-stage {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 420px;
}
@media (min-width: 640px) { .reel-stage { max-width: 460px; } }
/* THE FULL-BLEED LAW: coarse pointers and small viewports fill the width;
   the centered card stays a large fine-pointer presentation */
@media (max-width: 767px), (pointer: coarse) and (max-width: 1024px) {
  .reel-stage { max-width: none; }
  .reel-stage #reel-frame-holder { border-radius: 0; }
}
.reel-stage:fullscreen { max-width: none; width: 100%; height: 100% !important; }
.reel-stage:-webkit-full-screen { max-width: none; width: 100%; height: 100% !important; }

/* the identity layer — always visible, clamped, never colliding */
.reel-info {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; flex-direction: column; gap: .2rem;
  padding: 3.4rem 1rem calc(.9rem + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0,0,0,.88), rgba(0,0,0,.45) 55%, transparent);
  color: #fff; pointer-events: none;
}
.reel-stage.bar-on .reel-info { padding-bottom: calc(4.7rem + env(safe-area-inset-bottom)); }
.reel-info-living { display: flex; flex-wrap: wrap; gap: .4rem; pointer-events: auto; margin-bottom: .25rem; }
.reel-caption { margin: 0; font-size: .8rem; opacity: .9;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.reel-title { margin: .1rem 0 0; font-size: 1.05rem; font-weight: 600; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.reel-program { margin-top: .15rem; font-size: .8rem; color: #fff; text-decoration: underline;
  opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: auto; }
.reel-program:hover, .reel-program:focus-visible { opacity: 1; }
.reel-sentence { margin: 0 0 .1rem; font-size: .92rem; font-style: italic; opacity: .95;
  max-width: 34ch; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reel-sentence.hidden { display: none; }

/* the aperture bar — attach on activity, recede when idle */
.reel-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  background: rgba(6,15,11,.78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 0 .5rem env(safe-area-inset-bottom);
  opacity: 0; transform: translateY(12px); visibility: hidden;
  transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s;
}
.reel-stage.bar-on .reel-bar {
  opacity: 1; transform: none; visibility: visible;
  transition: opacity .3s ease, transform .3s ease;
}
@media (prefers-reduced-motion: reduce) { .reel-bar { transition: none; transform: none; } }
.reel-bar-row { display: flex; align-items: center; gap: .35rem; padding: .4rem .25rem .5rem; }
.reel-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  min-width: 44px; min-height: 44px; padding: 0 .7rem;
  border: 0; border-radius: 999px; background: rgba(255,255,255,.14);
  color: #fff; font-size: .85rem; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: background .2s;
}
.reel-btn:hover { background: rgba(255,255,255,.26); }
.reel-btn:focus-visible { outline: 2px solid #ffc879; outline-offset: 2px; }
.reel-btn.hidden { display: none; }
/* author display rules must not defeat the hidden attribute (the end card
   and the feature-hidden fullscreen door both rely on [hidden]) */
.reel-end[hidden], .reel-btn[hidden] { display: none; }
.reel-btn svg { width: 18px; height: 18px; }
.reel-btn-space { flex: 1; }
@media (pointer: fine) { .reel-btn { min-width: 40px; min-height: 40px; } }
@media (max-width: 374px) { .reel-share-word { display: none; } }
/* icon swap: play/pause + fullscreen/exit are two glyphs, CSS picks */
#reel-play .ic-play, #reel-full .ic-full-exit { display: none; }
#reel-play:not(.is-playing) .ic-play { display: block; }
#reel-play.is-playing .ic-pause { display: none; }
#reel-full.is-fs .ic-full { display: none; }
#reel-full.is-fs .ic-full-exit { display: block; }
.reel-share-word { font-size: .8rem; }

/* the aperture — the bar's live-progress ceiling */
.reel-aperture { position: relative; height: 8px; margin: .55rem .5rem .1rem; }
.reel-ap-window { position: absolute; top: 2px; bottom: 2px; left: 0;
  border-radius: 999px; background: rgba(255,255,255,.18); overflow: hidden; }
.reel-ap-fill { position: absolute; top: 0; bottom: 0; left: 0; width: 0;
  background: linear-gradient(90deg, rgba(138,200,160,.95), rgba(224,133,133,.95));
  box-shadow: 0 0 10px rgba(224,133,133,.35); }
.reel-ap-beacon { position: absolute; top: 50%; width: 9px; height: 9px; border-radius: 999px;
  transform: translate(-50%,-50%); background: #f4faf5; box-shadow: 0 0 0 2px rgba(168,58,58,.55); }
.reel-ap-head { position: absolute; top: 50%; width: 5px; height: 5px; border-radius: 999px;
  transform: translate(-50%,-50%); background: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,.25), 0 0 12px rgba(255,255,255,.8); }

/* the side rail (prev/next) and the end card */
.reel-rail { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: .5rem; z-index: 2; }
.reel-end { position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(8,19,14,.92); color: #fff; text-align: center; padding: 1rem; }
@media (min-width: 640px) { .reel-end { border-radius: .75rem; } }

/* short viewports (landscape phones): the veil yields, the stack compacts */
@media (max-height: 480px) {
  .reel-info { padding-top: 1.4rem; gap: .1rem; }
  .reel-title { font-size: .95rem; -webkit-line-clamp: 1; line-clamp: 1; }
  .reel-sentence { display: none !important; }
}

/* WAVE 39 — THE LIVING CONSTELLATION (WebGL map) */
.sc-host { position: relative; width: 100%; aspect-ratio: 16 / 11; max-height: 66vh;
  border: 1px solid var(--ml-line); border-radius: 1rem; overflow: hidden;
  background:
    radial-gradient(60% 60% at 50% 40%, rgba(46,132,89,.10), transparent 70%),
    linear-gradient(170deg, rgba(6,14,10,.98), rgba(4,9,7,.99)); }
.sc-host canvas { width: 100% !important; height: 100% !important; display: block; cursor: grab; }
.sc-host canvas:active { cursor: grabbing; }
html[data-dh-theme="light"] .sc-host { background:
    radial-gradient(60% 60% at 50% 40%, rgba(46,132,89,.08), transparent 70%),
    linear-gradient(170deg, #fbfaf3, #eeebe0); }

/* WAVE 39 — chapter hop flash */
@keyframes hop-flash { 0% { box-shadow: 0 0 0 0 rgba(185,226,200,.75); } 100% { box-shadow: 0 0 0 22px rgba(185,226,200,0); } }
.hop-flash { animation: hop-flash .6s cubic-bezier(.22,1,.36,1); }
@media (prefers-reduced-motion: reduce) { .hop-flash { animation: none; } }
