/**
 * 8bitflow — "Define the Logic" Premium Visual Workflow Builder Styles
 */

/* ═══ Root Layout ═══ */
.dl-root {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 0;
  width: 100%;
  height: 100%;
  font-family: 'Geist', sans-serif;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* ═══ Mobile V2: premium decision studio ═══ */
@media (max-width: 767.98px) {
  .dl-mobile-root.dl-mobile-v2 {
    min-height: 420px;
    padding: 14px;
    background:
      radial-gradient(circle at 12% 8%, rgba(167,139,250,0.24), transparent 30%),
      radial-gradient(circle at 88% 28%, rgba(52,211,153,0.16), transparent 32%),
      linear-gradient(145deg, #08080a 0%, #101019 48%, #09090b 100%);
  }

  .dl-mobile-root.dl-mobile-v2::before {
    background-image:
      linear-gradient(rgba(167,139,250,0.034) 1px, transparent 1px),
      linear-gradient(90deg, rgba(167,139,250,0.026) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 82%);
  }

  .dlm-v2-aurora {
    position: absolute;
    inset: 38px 24px auto;
    height: 210px;
    border-radius: 999px;
    background: conic-gradient(from 230deg, rgba(167,139,250,0), rgba(167,139,250,0.28), rgba(52,211,153,0.18), rgba(96,165,250,0.18), rgba(167,139,250,0));
    filter: blur(34px);
    opacity: 0.82;
    animation: dlmV2Aurora 8s ease-in-out infinite alternate;
    pointer-events: none;
  }

  @keyframes dlmV2Aurora {
    from { transform: translate3d(-6px, 6px, 0) rotate(-8deg) scale(0.94); opacity: 0.58; }
    to { transform: translate3d(8px, -8px, 0) rotate(10deg) scale(1.06); opacity: 0.9; }
  }

  .dlm-v2-topbar {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .dlm-v2-topbar span {
    display: block;
    margin-bottom: 4px;
    color: #a78bfa;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .dlm-v2-topbar strong {
    display: block;
    max-width: 210px;
    color: #fafafa;
    font-size: 15px;
    line-height: 1.1;
    letter-spacing: -0.035em;
  }

  .dlm-v2-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border: 1px solid rgba(52,211,153,0.26);
    border-radius: 999px;
    color: #bbf7d0;
    background: rgba(52,211,153,0.08);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .dlm-v2-live i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 12px rgba(52,211,153,0.7);
    animation: dlmV2Pulse 1.6s ease-in-out infinite;
  }

  @keyframes dlmV2Pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.62; }
  }

  .dlm-v2-canvas {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 108px;
    gap: 10px;
    margin-top: 12px;
  }

  .dlm-v2-phone {
    position: relative;
    min-height: 278px;
    padding: 10px;
    overflow: hidden;
    border: 1px solid rgba(167,139,250,0.18);
    border-radius: 24px;
    background:
      linear-gradient(180deg, rgba(24,23,29,0.92), rgba(9,9,11,0.9)),
      radial-gradient(circle at 50% 0%, rgba(167,139,250,0.16), transparent 60%);
    box-shadow: 0 24px 58px -34px rgba(167,139,250,0.65), inset 0 1px 0 rgba(255,255,255,0.05);
  }

  .dlm-v2-phone::before {
    content: "";
    position: absolute;
    inset: 40px 26px 64px;
    border: 1px solid rgba(167,139,250,0.12);
    border-radius: 999px;
    transform: rotate(-18deg);
    pointer-events: none;
  }

  .dlm-v2-phone-head {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #71717a;
    font-family: 'Geist Mono', ui-monospace, monospace;
    font-size: 12px;
  }

  .dlm-v2-phone-head span {
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: rgba(113,113,122,0.34);
  }

  .dlm-v2-phone-head b {
    font-weight: 600;
  }

  .dlm-v2-phone-head em {
    margin-left: auto;
    color: #34d399;
    font-style: normal;
    font-weight: 900;
  }

  .dlm-v2-signal-card,
  .dlm-v2-rule,
  .dlm-v2-score-ring {
    position: relative;
    z-index: 2;
    transition: transform 0.32s cubic-bezier(0.16,1,0.3,1), border-color 0.32s ease, box-shadow 0.32s ease, background 0.32s ease;
  }

  .dlm-v2-signal-card {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 12px;
    padding: 10px;
    border: 1px solid rgba(96,165,250,0.18);
    border-radius: 16px;
    background: rgba(96,165,250,0.07);
  }

  .dlm-v2-signal-card .material-symbols-outlined {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #bfdbfe;
    background: rgba(96,165,250,0.16);
    font-size: 19px;
    font-variation-settings: 'FILL' 1;
  }

  .dlm-v2-signal-card strong,
  .dlm-v2-route span {
    display: block;
    color: #fafafa;
    font-size: 12px;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .dlm-v2-signal-card small,
  .dlm-v2-route small {
    display: block;
    margin-top: 4px;
    color: #9d9db5;
    font-size: 12px;
    line-height: 1.25;
  }

  .dlm-v2-rule-stack {
    display: grid;
    gap: 7px;
    margin-top: 10px;
  }

  .dlm-v2-rule {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px 9px;
    border: 1px solid rgba(39,39,42,0.72);
    border-radius: 13px;
    background: rgba(18,18,25,0.66);
  }

  .dlm-v2-rule i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a78bfa;
    box-shadow: 0 0 10px rgba(167,139,250,0.5);
  }

  .dlm-v2-rule span {
    color: #d4d4d8;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dlm-v2-rule b {
    color: #34d399;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
  }

  .dlm-v2-rule.is-hot {
    border-color: rgba(52,211,153,0.2);
    background: rgba(52,211,153,0.055);
  }

  .dlm-v2-score-ring {
    width: 106px;
    height: 106px;
    margin: 11px auto 0;
  }

  .dlm-v2-score-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
  }

  .dlm-v2-score-ring circle {
    fill: none;
    stroke: rgba(63,63,70,0.62);
    stroke-width: 8;
  }

  .dlm-v2-score-ring .dlm-v2-score-progress {
    stroke: url(#dlm-wire-grad, #34d399);
    stroke: #34d399;
    stroke-dasharray: 289;
    stroke-dashoffset: 24;
    stroke-linecap: round;
    filter: drop-shadow(0 0 10px rgba(52,211,153,0.32));
    transition: stroke-dashoffset 0.8s cubic-bezier(0.16,1,0.3,1);
  }

  .dlm-v2-score-ring div {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
  }

  .dlm-v2-score-ring span {
    color: #fafafa;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.05em;
    font-variant-numeric: tabular-nums;
  }

  .dlm-v2-score-ring small {
    margin-top: 4px;
    color: #9d9db5;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .dlm-v2-route-panel {
    display: grid;
    align-content: center;
    gap: 8px;
  }

  .dl-mobile-branch.dlm-v2-route {
    position: relative;
    min-height: 104px;
    padding: 10px;
    border-radius: 17px;
    transform: none;
    text-align: left;
  }

  .dl-mobile-branch.dlm-v2-route b {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 0.12em;
  }

  .dl-mobile-branch.dlm-v2-route.is-selected {
    transform: translateY(-2px);
    border-color: rgba(167,139,250,0.46);
    box-shadow: 0 18px 42px -24px rgba(167,139,250,0.72), inset 0 1px 0 rgba(255,255,255,0.05);
  }

  .dl-mobile-root[data-route="yes"] .dlm-v2-route[data-route="yes"] {
    background: linear-gradient(145deg, rgba(52,211,153,0.12), rgba(18,18,25,0.88));
  }

  .dl-mobile-root[data-route="no"] .dlm-v2-route[data-route="no"] {
    background: linear-gradient(145deg, rgba(251,113,133,0.12), rgba(18,18,25,0.88));
  }

  .dlm-v2-orbit {
    position: absolute;
    inset: 74px 90px auto auto;
    width: 74px;
    height: 74px;
    border: 1px solid rgba(167,139,250,0.1);
    border-radius: 50%;
    animation: dlmV2Spin 14s linear infinite;
    pointer-events: none;
  }

  .dlm-v2-orbit span {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a78bfa;
    box-shadow: 0 0 12px rgba(167,139,250,0.7);
  }

  .dlm-v2-orbit span:nth-child(1) { left: 50%; top: -3px; }
  .dlm-v2-orbit span:nth-child(2) { right: 4px; bottom: 11px; background: #34d399; box-shadow: 0 0 12px rgba(52,211,153,0.65); }
  .dlm-v2-orbit span:nth-child(3) { left: 8px; bottom: 10px; background: #60a5fa; box-shadow: 0 0 12px rgba(96,165,250,0.65); }

  @keyframes dlmV2Spin {
    to { transform: rotate(360deg); }
  }

  .dlm-v2-signal-card.is-live,
  .dlm-v2-rule.is-live,
  .dlm-v2-score-ring.is-live {
    transform: translateY(-2px);
    border-color: rgba(167,139,250,0.5);
    box-shadow: 0 18px 42px -24px rgba(167,139,250,0.78), 0 0 0 1px rgba(167,139,250,0.1);
  }

  .dlm-v2-result {
    margin-top: 10px;
    padding: 12px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(18,18,25,0.88), rgba(12,12,15,0.76));
  }

  .dlm-v2-result strong {
    font-size: 13px;
  }

  .dlm-v2-aurora {
    animation: none !important;
  }

  .dlm-v2-orbit {
    animation: none !important;
  }
}

@media (max-width: 374.98px) {
  .dlm-v2-canvas {
    grid-template-columns: 1fr;
  }

  .dlm-v2-route-panel {
    grid-template-columns: 1fr 1fr;
  }

  .dl-mobile-branch.dlm-v2-route {
    min-height: 78px;
  }
}

/* Mobile Story: compact logic flow */
@media (max-width: 767.98px) {
  .dl-mobile-root.dl-mobile-story {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 14px;
    overflow: hidden;
    border-radius: inherit;
    background:
      radial-gradient(circle at 50% 16%, rgba(167,139,250,0.14), transparent 34%),
      radial-gradient(circle at 82% 78%, rgba(52,211,153,0.10), transparent 32%),
      linear-gradient(145deg, #08080a 0%, #101016 52%, #09090b 100%);
    font-family: 'Geist', sans-serif;
  }

  .dl-mobile-root.dl-mobile-story::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(167,139,250,0.055) 1px, transparent 1px);
    background-size: 18px 18px;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 86%);
    pointer-events: none;
  }

  .dlm-story-glow {
    position: absolute;
    inset: 70px 36px auto;
    height: 118px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(96,165,250,0.18), rgba(167,139,250,0.20), rgba(52,211,153,0.13));
    filter: blur(30px);
    opacity: 0.66;
    pointer-events: none;
  }

  .dlm-story-head {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .dlm-story-head span {
    color: #a78bfa;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
  }

  .dlm-story-head strong {
    max-width: 250px;
    color: #fafafa;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: 0;
  }

  .dlm-story-rail {
    position: absolute;
    z-index: 1;
    top: 132px;
    left: 58px;
    right: 58px;
    height: 2px;
    pointer-events: none;
  }

  .dlm-story-line,
  .dlm-story-pulse {
    position: absolute;
    inset: 0;
    display: block;
  }

  .dlm-story-line {
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(96,165,250,0.22), rgba(167,139,250,0.32), rgba(52,211,153,0.24));
  }

  .dlm-story-pulse {
    top: -4px;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #a78bfa;
    box-shadow: 0 0 16px rgba(167,139,250,0.72);
    animation: dlmStoryPulse 3.6s cubic-bezier(0.16,1,0.3,1) infinite;
  }

  @keyframes dlmStoryPulse {
    0%, 12% { left: 0; opacity: 0.35; }
    42%, 54% { left: calc(50% - 5px); opacity: 1; }
    84%, 100% { left: calc(100% - 10px); opacity: 0.55; }
  }

  .dlm-story-nodes {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
  }

  .dlm-story-node,
  .dlm-story-chip,
  .dlm-story-result {
    border: 1px solid rgba(39,39,42,0.74);
    background: linear-gradient(145deg, rgba(18,18,25,0.88), rgba(9,9,12,0.82));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 18px 38px -32px rgba(0,0,0,0.9);
  }

  .dlm-story-node {
    display: flex;
    min-height: 92px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 7px;
    border-radius: 14px;
    text-align: center;
    transition: transform 0.28s cubic-bezier(0.16,1,0.3,1), border-color 0.28s ease, background 0.28s ease;
  }

  .dlm-story-node .material-symbols-outlined {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid rgba(63,63,70,0.58);
    border-radius: 11px;
    color: #c4b5fd;
    background: rgba(24,24,31,0.72);
    font-size: 18px;
    font-variation-settings: 'FILL' 1;
  }

  .dlm-story-node strong {
    color: #f4f4f5;
    font-size: 12px;
    line-height: 1.1;
  }

  .dlm-story-node small {
    color: #a1a1aa;
    font-size: 11px;
    line-height: 1.15;
  }

  .dlm-story-node.is-live {
    transform: translateY(-2px);
    border-color: rgba(167,139,250,0.45);
    background: linear-gradient(145deg, rgba(167,139,250,0.12), rgba(11,11,16,0.88));
  }

  .dlm-story-node.is-live .material-symbols-outlined {
    border-color: rgba(167,139,250,0.52);
    box-shadow: 0 0 16px rgba(167,139,250,0.18);
  }

  .dlm-story-chip {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding: 9px 10px;
    border-color: rgba(167,139,250,0.22);
    border-radius: 999px;
  }

  .dlm-story-chip span {
    color: #c4b5fd;
    font-size: 12px;
    font-weight: 700;
  }

  .dlm-story-chip b {
    color: #6ee7b7;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
  }

  .dlm-story-result {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-color: rgba(52,211,153,0.24);
    border-radius: 14px;
    color: #d1fae5;
    background: linear-gradient(145deg, rgba(52,211,153,0.10), rgba(9,12,12,0.86));
  }

  .dlm-story-result .material-symbols-outlined {
    color: #34d399;
    font-size: 18px;
    font-variation-settings: 'FILL' 1;
  }

  .dlm-story-result strong {
    font-size: 13px;
    line-height: 1.1;
  }
}

@media (max-width: 374.98px) {
  .dl-mobile-root.dl-mobile-story { padding: 12px; }
  .dlm-story-head strong { max-width: 220px; font-size: 13px; }
  .dlm-story-node { min-height: 78px; padding: 8px 5px; }
  .dlm-story-node .material-symbols-outlined { width: 28px; height: 28px; font-size: 16px; }
  .dlm-story-chip { margin-top: 8px; padding: 8px 9px; }
  .dlm-story-result { padding: 8px; }
  .dlm-story-node strong,
  .dlm-story-chip span,
  .dlm-story-chip b,
  .dlm-story-result strong { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .dlm-story-pulse {
    animation: none !important;
    left: calc(100% - 10px);
  }

  .dlm-story-node,
  .dlm-story-pulse {
    transition: none !important;
  }
}

/* Mobile V3: focused logic review */
@media (max-width: 767.98px) {
  .dl-mobile-root.dl-mobile-v3 {
    min-height: 420px;
    padding: 14px;
    background:
      radial-gradient(circle at 14% 10%, rgba(167,139,250,0.24), transparent 32%),
      radial-gradient(circle at 88% 26%, rgba(96,165,250,0.16), transparent 34%),
      radial-gradient(circle at 52% 96%, rgba(52,211,153,0.14), transparent 36%),
      linear-gradient(145deg, #08080a 0%, #101019 48%, #09090b 100%);
  }

  .dl-mobile-root.dl-mobile-v3::before {
    background-image:
      linear-gradient(rgba(167,139,250,0.032) 1px, transparent 1px),
      linear-gradient(90deg, rgba(96,165,250,0.024) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(circle at 50% 38%, #000 0%, transparent 84%);
  }

  .dlm-v3-aurora {
    position: absolute;
    inset: 58px 16px auto;
    height: 210px;
    border-radius: 999px;
    background: conic-gradient(from 210deg, rgba(167,139,250,0), rgba(167,139,250,0.24), rgba(96,165,250,0.18), rgba(52,211,153,0.14), rgba(167,139,250,0));
    filter: blur(34px);
    opacity: 0.84;
    animation: dlmV3Aurora 8s ease-in-out infinite alternate;
    pointer-events: none;
  }

  @keyframes dlmV3Aurora {
    from { transform: translate3d(-8px, 6px, 0) rotate(-8deg) scale(0.95); opacity: 0.58; }
    to { transform: translate3d(8px, -8px, 0) rotate(10deg) scale(1.05); opacity: 0.9; }
  }

  .dlm-v3-header {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .dlm-v3-header span {
    display: block;
    margin-bottom: 4px;
    color: #a78bfa;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .dlm-v3-header strong {
    display: block;
    max-width: 220px;
    color: #fafafa;
    font-size: 15px;
    line-height: 1.1;
    letter-spacing: -0.04em;
  }

  .dlm-v3-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border: 1px solid rgba(52,211,153,0.26);
    border-radius: 999px;
    color: #bbf7d0;
    background: rgba(52,211,153,0.08);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .dlm-v3-badge i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 12px rgba(52,211,153,0.7);
    animation: dlmV3BadgePulse 1.6s ease-in-out infinite;
  }

  @keyframes dlmV3BadgePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.32); opacity: 0.62; }
  }

  .dlm-v3-shell {
    position: relative;
    z-index: 3;
    display: grid;
    gap: 10px;
    margin-top: 12px;
  }

  .dlm-v3-intake,
  .dlm-v3-scorecard,
  .dlm-v3-rule,
  .dlm-v3-router,
  .dlm-v3-outcome {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(39,39,42,0.76);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(18,18,25,0.88), rgba(10,10,14,0.86));
    box-shadow: 0 20px 48px -34px rgba(0,0,0,0.92), inset 0 1px 0 rgba(255,255,255,0.04);
    transition: transform 0.32s cubic-bezier(0.16,1,0.3,1), border-color 0.32s ease, box-shadow 0.32s ease, background 0.32s ease;
  }

  .dlm-v3-intake,
  .dlm-v3-router,
  .dlm-v3-outcome {
    padding: 12px;
  }

  .dlm-v3-intake {
    background:
      linear-gradient(145deg, rgba(24,24,31,0.94), rgba(10,12,18,0.9)),
      radial-gradient(circle at 0% 0%, rgba(96,165,250,0.12), transparent 48%);
  }

  .dlm-v3-intake-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }

  .dlm-v3-intake-head .material-symbols-outlined {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #bfdbfe;
    background: rgba(96,165,250,0.14);
    font-size: 19px;
    font-variation-settings: 'FILL' 1;
    flex-shrink: 0;
  }

  .dlm-v3-intake-head strong,
  .dlm-v3-rule strong,
  .dlm-v3-route strong,
  .dlm-v3-outcome strong {
    display: block;
    color: #fafafa;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .dlm-v3-intake-head strong {
    font-size: 13px;
  }

  .dlm-v3-intake-head small,
  .dlm-v3-rule small,
  .dlm-v3-route small,
  .dlm-v3-scorecard small,
  .dlm-v3-outcome p {
    display: block;
    color: #9d9db5;
    line-height: 1.35;
  }

  .dlm-v3-intake-head small {
    margin-top: 4px;
    font-size: 12px;
  }

  .dlm-v3-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
  }

  .dlm-v3-chip-row span,
  .dlm-v3-chip-row b {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .dlm-v3-chip-row span {
    border: 1px solid rgba(63,63,70,0.6);
    color: #c4c4d0;
    background: rgba(18,18,25,0.58);
  }

  .dlm-v3-chip-row b {
    color: #6ee7b7;
    background: rgba(52,211,153,0.1);
    border: 1px solid rgba(52,211,153,0.2);
  }

  .dlm-v3-eval {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
  }

  .dlm-v3-scorecard {
    padding: 12px 10px;
    text-align: center;
    border-color: rgba(52,211,153,0.18);
    background:
      linear-gradient(165deg, rgba(16,22,20,0.94), rgba(10,12,16,0.88)),
      radial-gradient(circle at 50% 0%, rgba(52,211,153,0.14), transparent 54%);
  }

  .dlm-v3-scorecard span,
  .dlm-v3-router-head span,
  .dlm-v3-outcome span {
    display: block;
    color: #71717a;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .dlm-v3-scorecard strong {
    margin-top: 8px;
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.06em;
    font-variant-numeric: tabular-nums;
  }

  .dlm-v3-scorecard small {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
  }

  .dlm-v3-scorebar {
    height: 5px;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(63,63,70,0.56);
  }

  .dlm-v3-scorebar i,
  .dlm-v3-rulebar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #60a5fa, #a78bfa, #34d399);
    box-shadow: 0 0 14px rgba(167,139,250,0.28);
    transition: width 0.6s cubic-bezier(0.16,1,0.3,1);
  }

  .dlm-v3-scorebar i {
    width: 0;
  }

  .dlm-v3-rules {
    display: grid;
    gap: 7px;
  }

  .dlm-v3-rule {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px 10px 10px;
  }

  .dlm-v3-rule strong {
    font-size: 11px;
  }

  .dlm-v3-rule small {
    margin-top: 3px;
    font-size: 12px;
  }

  .dlm-v3-rule b {
    align-self: center;
    color: #34d399;
    font-size: 12px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
  }

  .dlm-v3-rulebar {
    grid-column: 1 / -1;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(63,63,70,0.46);
  }

  .dlm-v3-rulebar i {
    width: 0;
  }

  .dlm-v3-router-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
  }

  .dlm-v3-router-head b {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 999px;
    color: #c4b5fd;
    background: rgba(167,139,250,0.1);
    border: 1px solid rgba(167,139,250,0.16);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .dlm-v3-routes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .dlm-v3-route {
    padding: 10px;
    border: 1px solid rgba(39,39,42,0.82);
    border-radius: 14px;
    background: rgba(14,14,18,0.74);
    text-align: left;
    cursor: pointer;
    font: inherit;
    transition: transform 0.28s cubic-bezier(0.16,1,0.3,1), border-color 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .dlm-v3-route em {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 4px 7px;
    border-radius: 999px;
    color: #a1a1aa;
    background: rgba(63,63,70,0.36);
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .dlm-v3-route strong {
    font-size: 11px;
  }

  .dlm-v3-route small {
    margin-top: 5px;
    font-size: 12px;
  }

  .dlm-v3-route.is-selected {
    transform: translateY(-1px);
    border-color: rgba(167,139,250,0.44);
    box-shadow: 0 16px 36px -26px rgba(167,139,250,0.72);
  }

  .dl-mobile-root[data-route="yes"] .dlm-v3-route[data-route="yes"] {
    background: linear-gradient(145deg, rgba(52,211,153,0.12), rgba(18,18,25,0.88));
  }

  .dl-mobile-root[data-route="yes"] .dlm-v3-route[data-route="yes"] em {
    color: #6ee7b7;
    background: rgba(52,211,153,0.14);
  }

  .dl-mobile-root[data-route="no"] .dlm-v3-route[data-route="no"] {
    background: linear-gradient(145deg, rgba(251,113,133,0.12), rgba(18,18,25,0.88));
  }

  .dl-mobile-root[data-route="no"] .dlm-v3-route[data-route="no"] em {
    color: #fda4af;
    background: rgba(251,113,133,0.14);
  }

  .dlm-v3-outcome {
    position: relative;
    z-index: 3;
    margin-top: 10px;
  }

  .dlm-v3-outcome strong {
    margin-top: 8px;
    font-size: 14px;
  }

  .dlm-v3-outcome p {
    margin: 7px 0 0;
    font-size: 12px;
  }

  .dlm-v3-aurora {
    animation: none !important;
  }

  .dlm-v3-badge i {
    animation: none !important;
  }
}

  .dlm-v3-intake.is-live,
  .dlm-v3-scorecard.is-live,
  .dlm-v3-rule.is-live,
  .dlm-v3-router.is-live,
  .dlm-v3-outcome.is-live {
    transform: translateY(-1px);
    border-color: rgba(167,139,250,0.42);
    box-shadow: 0 22px 48px -26px rgba(167,139,250,0.62), 0 0 0 1px rgba(167,139,250,0.08);
  }

  .dlm-v3-scorecard.is-live {
    border-color: rgba(52,211,153,0.34);
    box-shadow: 0 22px 48px -26px rgba(52,211,153,0.5), 0 0 0 1px rgba(52,211,153,0.08);
  }
}

@media (max-width: 374.98px) {
  .dlm-v3-eval,
  .dlm-v3-routes {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dlm-v3-aurora,
  .dlm-v3-badge i {
    animation: none !important;
  }

  .dlm-v3-intake,
  .dlm-v3-scorecard,
  .dlm-v3-rule,
  .dlm-v3-router,
  .dlm-v3-route,
  .dlm-v3-outcome,
  .dlm-v3-scorebar i,
  .dlm-v3-rulebar i {
    transition: none !important;
  }
}

@media (max-width: 767.98px) {
  .dl-root {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
}

/* ═══ Canvas Area ═══ */
.dl-canvas-area {
  position: relative;
  overflow: hidden;
  padding: 36px 8px 8px;
  background:
    radial-gradient(ellipse at 40% 50%, rgba(167,139,250,0.04) 0%, transparent 60%),
    linear-gradient(145deg, #0a0a0d 0%, #0e0e13 50%, #0c0c10 100%);
}

.dl-canvas-area::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(167,139,250,0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 0;
}

/* ═══ Toolbar ═══ */
.dl-toolbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: rgba(14,14,17,0.85);
  border-bottom: 1px solid rgba(39,39,42,0.5);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.dl-tb-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dl-tb-icon {
  font-size: 14px;
  color: #a78bfa;
  font-variation-settings: 'FILL' 1;
}

.dl-tb-title {
  font-size: 12px;
  font-weight: 700;
  color: #9d9db5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dl-tb-sep {
  color: #3e3e4c;
  font-size: 12px;
}

.dl-tb-name {
  font-size: 12px;
  color: #6b6b80;
  font-weight: 500;
}

.dl-tb-right {
  display: flex;
  align-items: center;
}

.dl-badge-saved {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 600;
  color: #34d399;
  background: rgba(52,211,153,0.08);
  border: 1px solid rgba(52,211,153,0.2);
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: 0.02em;
}

.dl-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34d399;
  animation: dlDotPulse 2s ease-in-out infinite;
}

@keyframes dlDotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ═══ SVG Layer ═══ */
.dl-svg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.dl-conn-flow {
  stroke-dasharray: 8 6;
  animation: dlFlowDash 1.2s linear both infinite;
}

@keyframes dlFlowDash {
  to { stroke-dashoffset: -14; }
}

.dl-packet {
  opacity: 0.85;
}

/* ═══ Workflow Nodes ═══ */
.dl-node {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -50%);
  cursor: default;
  transition: filter 0.3s ease, transform 0.3s cubic-bezier(0.16,1,0.3,1);
}

@media (hover: hover) {
  .dl-node {
    cursor: grab;
  }
}

.dl-node:active, .dl-node.dl-dragging {
  cursor: grabbing;
  transition: filter 0.3s ease;
}

.dl-node:hover,
.dl-node.dl-active {
  filter: brightness(1.15);
  transform: translate(-50%, -50%) scale(1.04);
}

.dl-node.dl-processing {
  filter: brightness(1.2);
  box-shadow: 0 0 12px rgba(167,139,250,0.25);
  will-change: filter;
}

.dl-node.dl-selected {
  filter: brightness(1.15) drop-shadow(0 0 16px rgba(167,139,250,0.3));
  z-index: 10;
}

.dl-node.dl-node-clicked {
  transform: translate(-50%, -50%) scale(1.08);
}

.dl-node.dl-node-clicked .dl-node-header {
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(167,139,250,0.15);
}

/* ── Standard node (trigger, action, output) ── */
.dl-node-trigger .dl-node-header,
.dl-node-action .dl-node-header,
.dl-node-output .dl-node-header {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(18,18,21,0.92);
  border: 1px solid rgba(63,63,70,0.5);
  border-radius: 10px;
  padding: 7px 10px;
  min-width: 105px;
  border-top: 2px solid;
  backdrop-filter: blur(8px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  white-space: nowrap;
}

.dl-node:hover .dl-node-header,
.dl-node.dl-active .dl-node-header {
  background: rgba(22,22,28,0.95);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(167,139,250,0.1);
}

.dl-node.dl-processing .dl-node-header {
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), 0 0 20px rgba(167,139,250,0.12);
}

.dl-node.dl-selected .dl-node-header {
  border-color: #a78bfa;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(167,139,250,0.3);
}

.dl-node-icon-wrap {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid;
  flex-shrink: 0;
}

.dl-node-icon {
  font-size: 14px;
  font-variation-settings: 'FILL' 1;
}

.dl-node-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.dl-node-label {
  font-size: 12px;
  font-weight: 600;
  color: #dfdfe5;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.dl-node-sub {
  font-size: 8px;
  color: #505060;
  font-weight: 400;
  white-space: nowrap;
}

.dl-node-body {
  display: none;
}

.dl-node-port {
  display: none;
}

/* ── Diamond Condition Node ── */
.dl-diamond {
  z-index: 6;
}

.dl-node-diamond-inner {
  width: 44px;
  height: 44px;
  transform: rotate(45deg);
  background: rgba(18,18,21,0.92);
  border: 2px solid #f59e0b;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
  box-shadow: 0 0 20px rgba(245,158,11,0.12), inset 0 0 12px rgba(245,158,11,0.04);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.dl-diamond:hover .dl-node-diamond-inner,
.dl-diamond.dl-processing .dl-node-diamond-inner {
  box-shadow: 0 0 28px rgba(245,158,11,0.2), inset 0 0 16px rgba(245,158,11,0.06);
}

.dl-diamond.dl-selected .dl-node-diamond-inner {
  border-color: #fbbf24;
  box-shadow: 0 0 28px rgba(245,158,11,0.3), inset 0 0 16px rgba(245,158,11,0.1);
}

.dl-diamond .dl-node-icon {
  transform: rotate(-45deg);
  font-size: 18px;
}

.dl-diamond-meta {
  text-align: center;
}

.dl-diamond-meta .dl-node-label {
  font-size: 12px;
}

.dl-diamond-meta .dl-node-sub {
  font-size: 8px;
}

/* ── Branch Labels ── */
.dl-branch-label {
  position: absolute;
  z-index: 8;
  transform: translate(-50%, -50%);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 99px;
  pointer-events: none;
}

.dl-branch-yes {
  color: #34d399;
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.25);
}

.dl-branch-no {
  color: #fb7185;
  background: rgba(251,113,133,0.1);
  border: 1px solid rgba(251,113,133,0.25);
}

/* ═══ Rule Panel ═══ */
.dl-rule-panel {
  background: rgba(14,14,17,0.9);
  border-left: 1px solid rgba(39,39,42,0.5);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  z-index: 2;
}

@media (max-width: 767.98px) {
  .dl-rule-panel {
    border-left: none;
    border-top: 1px solid rgba(39,39,42,0.5);
    min-height: 140px;
    max-height: 45%;
    padding: 6px 8px;
    gap: 4px;
  }
}

.dl-rp-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.dl-rp-icon {
  font-size: 14px;
  color: #a78bfa;
  font-variation-settings: 'FILL' 1;
}

.dl-rp-title {
  font-size: 12px;
  font-weight: 700;
  color: #9d9db5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dl-rp-dynamic {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Node Info Badge ── */
.dl-rp-node-info {
  flex-shrink: 0;
}

.dl-rp-node-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 7px;
  border: 1px solid;
}

/* ── Rules ── */
.dl-rp-rules {
  flex-shrink: 0;
}

.dl-rp-rule {
  background: rgba(18,18,21,0.6);
  border: 1px solid rgba(39,39,42,0.4);
  border-radius: 7px;
  overflow: hidden;
}

.dl-rp-rule-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: rgba(167,139,250,0.06);
  border-bottom: 1px solid rgba(39,39,42,0.3);
}

.dl-rp-rule-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(167,139,250,0.15);
  color: #a78bfa;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dl-rp-rule-label {
  font-size: 12px;
  font-weight: 700;
  color: #c4b5fd;
  letter-spacing: 0.05em;
}

.dl-rp-rule-body {
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dl-rp-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dl-rp-field-label {
  font-size: 9px;
  color: #505060;
  font-weight: 500;
}

.dl-rp-field-value {
  font-size: 9px;
  color: #9d9db5;
  font-weight: 600;
  font-family: 'Geist Mono', 'SF Mono', monospace;
  background: rgba(18,18,21,0.5);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid rgba(39,39,42,0.3);
}

.dl-rp-op {
  color: #fbbf24 !important;
}

.dl-rp-val {
  color: #34d399 !important;
}

/* ── Then branches ── */
.dl-rp-then {
  margin-top: 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dl-rp-then-row {
  font-size: 9px;
  padding: 4px 8px;
  border-radius: 5px;
  color: #9d9db5;
}

.dl-rp-then-row strong {
  font-weight: 700;
}

.dl-rp-yes {
  background: rgba(52,211,153,0.06);
  border: 1px solid rgba(52,211,153,0.15);
}

.dl-rp-yes strong {
  color: #34d399;
}

.dl-rp-no {
  background: rgba(251,113,133,0.06);
  border: 1px solid rgba(251,113,133,0.15);
}

.dl-rp-no strong {
  color: #fb7185;
}

.dl-rp-arrow {
  opacity: 0.5;
}

/* ═══ Live Log ═══ */
.dl-rp-log {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: rgba(10,10,12,0.8);
  border: 1px solid rgba(39,39,42,0.3);
  border-radius: 7px;
  overflow: hidden;
}

.dl-rp-log-title {
  font-size: 9px;
  font-weight: 700;
  color: #505060;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 8px;
  border-bottom: 1px solid rgba(39,39,42,0.3);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.dl-log-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34d399;
  animation: dlDotPulse 1.5s ease-in-out infinite;
}

.dl-rp-log-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  scrollbar-width: none;
}

.dl-rp-log-body::-webkit-scrollbar {
  display: none;
}

.dl-log-line {
  font-family: 'Geist Mono', 'SF Mono', monospace;
  font-size: 8px;
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dl-log-dim { color: #3e3e4c; }
.dl-log-info { color: #60a5fa; }
.dl-log-success { color: #34d399; }
.dl-log-warn { color: #fbbf24; }

/* ═══ Reduced Motion ═══ */
@media (prefers-reduced-motion: reduce) {
  .dl-conn-flow,
  .dl-badge-dot,
  .dl-log-dot,
  .dl-packet {
    animation: none !important;
  }

  .dl-node,
  .dl-root,
  .dl-log-line,
  .dl-mobile-aurora,
  .dlm-wire-live,
  .dl-mobile-node,
  .dl-mobile-gate,
  .dl-mobile-branch {
    transition: none !important;
    animation: none !important;
  }
}

/* ═══ Mobile ═══ */
@media (max-width: 767.98px) {
  .dl-mobile-root {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    min-height: 250px;
    padding: 12px;
    overflow: hidden;
    border-radius: inherit;
    background:
      radial-gradient(circle at 22% 20%, rgba(167,139,250,0.14), transparent 34%),
      radial-gradient(circle at 82% 70%, rgba(52,211,153,0.11), transparent 35%),
      linear-gradient(145deg, #09090b 0%, #101016 54%, #0a0a0d 100%);
    font-family: 'Geist', sans-serif;
  }

  .dl-mobile-root::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(167,139,250,0.055) 1px, transparent 1px);
    background-size: 18px 18px;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 92%);
    pointer-events: none;
  }

  .dl-mobile-aurora {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 210px;
    height: 210px;
    transform: translate(-50%, -50%);
    background: conic-gradient(from 120deg, transparent, rgba(167,139,250,0.14), rgba(52,211,153,0.1), transparent 70%);
    filter: blur(32px);
    opacity: 0.72;
    animation: dlmAurora 9s ease-in-out infinite alternate;
    pointer-events: none;
  }

  @keyframes dlmAurora {
    from { transform: translate(-52%, -48%) rotate(-8deg) scale(0.92); opacity: 0.52; }
    to { transform: translate(-48%, -52%) rotate(10deg) scale(1.08); opacity: 0.78; }
  }

  .dl-mobile-header {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
  }

  .dl-mobile-header strong {
    display: block;
    color: #fafafa;
    font-size: 13px;
    line-height: 1.15;
    letter-spacing: -0.02em;
  }

  .dl-mobile-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: #a78bfa;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .dl-mobile-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border: 1px solid rgba(52,211,153,0.24);
    border-radius: 999px;
    color: #6ee7b7;
    background: rgba(52,211,153,0.08);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .dl-mobile-status span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 10px rgba(52,211,153,0.55);
  }

  .dl-mobile-stage {
    position: relative;
    z-index: 2;
    height: 166px;
  }

  .dl-mobile-wire {
    position: absolute;
    inset: -8px 0 0;
    width: 100%;
    height: 100%;
    overflow: visible;
  }

  .dlm-wire-base,
  .dlm-wire-live {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .dlm-wire-base {
    stroke: rgba(82,82,91,0.34);
    stroke-width: 1.2;
  }

  .dlm-wire-live {
    stroke: url(#dlm-wire-grad);
    stroke-width: 1.6;
    stroke-dasharray: 7 8;
    animation: dlmWireMove 1.6s linear infinite;
  }

  .dlm-wire-alt { opacity: 0.55; }
  .dl-mobile-root[data-route="no"] .dlm-wire-alt { opacity: 1; }
  .dl-mobile-root[data-route="no"] #dlm-route-yes { opacity: 0.48; }

  @keyframes dlmWireMove {
    to { stroke-dashoffset: -15; }
  }

  .dlm-packet {
    fill: #34d399;
    opacity: 0.9;
  }

  .dlm-packet-alt {
    fill: #fb7185;
    opacity: 0.65;
  }

  .dl-mobile-node,
  .dl-mobile-gate,
  .dl-mobile-branch {
    position: absolute;
    z-index: 3;
    border: 1px solid rgba(63,63,70,0.58);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(18,18,25,0.94), rgba(14,14,18,0.9));
    box-shadow: 0 14px 32px -22px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.04);
    cursor: pointer;
    font: inherit;
    transition: border-color 0.28s ease, transform 0.28s cubic-bezier(0.16,1,0.3,1), box-shadow 0.28s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .dl-mobile-node {
    left: 50%;
    width: min(245px, 82%);
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    transform: translateX(-50%);
    color: #fafafa;
  }

  .dlm-trigger { top: 1px; }
  .dlm-output { bottom: 0; }

  .dl-mobile-node .material-symbols-outlined {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    color: #a78bfa;
    background: rgba(167,139,250,0.13);
    font-size: 17px;
    font-variation-settings: 'FILL' 1;
    flex-shrink: 0;
  }

  .dl-mobile-node div {
    min-width: 0;
    text-align: left;
  }

  .dl-mobile-node strong,
  .dl-mobile-branch span,
  .dl-mobile-gate strong {
    display: block;
    color: #f4f4f5;
    font-size: 11px;
    line-height: 1.1;
    letter-spacing: -0.01em;
  }

  .dl-mobile-node small,
  .dl-mobile-branch small,
  .dl-mobile-gate small {
    display: block;
    margin-top: 3px;
    color: #71717a;
    font-size: 12px;
    line-height: 1;
  }

  .dl-mobile-node em {
    margin-left: auto;
    color: #34d399;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    text-transform: uppercase;
  }

  .dl-mobile-gate {
    left: 50%;
    top: 58px;
    width: 116px;
    min-height: 54px;
    padding: 8px;
    transform: translateX(-50%);
    text-align: center;
  }

  .dl-mobile-gate .material-symbols-outlined {
    color: #fbbf24;
    font-size: 16px;
    font-variation-settings: 'FILL' 1;
  }

  .dl-mobile-meter {
    height: 4px;
    margin: 6px auto 0;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(63,63,70,0.55);
  }

  .dl-mobile-meter i {
    display: block;
    width: 92%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #fbbf24, #34d399);
    box-shadow: 0 0 12px rgba(52,211,153,0.25);
  }

  .dl-mobile-branches {
    position: absolute;
    left: 0;
    right: 0;
    top: 115px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  .dl-mobile-branch {
    position: relative;
    min-height: 52px;
    padding: 8px;
    text-align: left;
  }

  .dl-mobile-branch b {
    display: inline-flex;
    margin-bottom: 5px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 0.12em;
  }

  .dl-mobile-branch[data-route="yes"] b {
    color: #34d399;
    background: rgba(52,211,153,0.12);
  }

  .dl-mobile-branch[data-route="no"] b {
    color: #fb7185;
    background: rgba(251,113,133,0.12);
  }

  .dl-mobile-branch.is-selected,
  .dl-mobile-node.is-live,
  .dl-mobile-gate.is-live {
    border-color: rgba(167,139,250,0.44);
    transform: translateX(-50%) translateY(-1px);
    box-shadow: 0 18px 38px -24px rgba(167,139,250,0.65), 0 0 0 1px rgba(167,139,250,0.08);
  }

  .dl-mobile-branch.is-selected {
    transform: translateY(-1px);
  }

  .dl-mobile-gate.is-live {
    border-color: rgba(251,191,36,0.46);
    box-shadow: 0 18px 38px -24px rgba(251,191,36,0.48), 0 0 0 1px rgba(251,191,36,0.08);
  }

  .dl-mobile-rule-card {
    position: relative;
    z-index: 3;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid rgba(167,139,250,0.18);
    border-radius: 14px;
    background: rgba(12,12,15,0.72);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  }

  .dl-mobile-rule-card span {
    display: block;
    margin-bottom: 4px;
    color: #71717a;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .dl-mobile-rule-card strong {
    display: block;
    color: #f4f4f5;
    font-size: 12px;
    line-height: 1.2;
  }

  .dl-mobile-rule-card p {
    margin: 6px 0 0;
    color: #a1a1aa;
    font-size: 12px;
    line-height: 1.45;
  }

  .dl-toolbar { height: 26px; }
  .dl-tb-name { display: none; }
  .dl-tb-sep { display: none; }
  .dl-node-header { padding: 5px 8px; min-width: 90px; gap: 5px; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
  .dl-node-icon-wrap { width: 22px; height: 22px; }
  .dl-node-icon { font-size: 13px; }
  .dl-node-label { font-size: 12px; }
  .dl-node-sub { display: none; }
  .dl-node-diamond-inner { width: 34px; height: 34px; }
  .dl-diamond .dl-node-icon { font-size: 14px; }
  .dl-branch-label { font-size: 12px; padding: 2px 8px; }

  /* Faster transitions on mobile */
  .dl-node {
    transition: filter 0.2s ease, transform 0.2s cubic-bezier(0.16,1,0.3,1);
  }

  /* Active press feedback for nodes */
  .dl-node:active {
    transform: translate(-50%, -50%) scale(0.96);
    transition: filter 0.08s ease, transform 0.08s ease;
  }

  /* Branch labels smoother */
  .dl-branch-label {
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  /* Rule panel swipe area hint */
  .dl-rule-panel {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  /* Smoother connection flow on mobile */
  .dl-conn-flow {
    animation-duration: 1.5s;
  }

  .dl-mobile-aurora {
    animation: none !important;
  }
}
;
  }
}
 }
}
