/* ed-actores.css · editores gráficos de actores (A1): Rich Picture, rueda CATWOE, carriles IB&PTA,
   tablero de agregación y cebolla C&V-PO/SO-PTM. Estilo orgánico y colorido de SSDM. */
:root {
  --hand: "Chalkboard SE", "Segoe Print", "Comic Neue", "Comic Sans MS", "Marker Felt", cursive;
  --rp-paper: #fffaf0; --rp-paper-2: #f6eedd; --rp-ink: #2b2622; --rp-dot: #e4d8bf; --rp-skin: #f3cfa6; --rp-sel: #e0761f;
  --ea-c: #e8853a; --ea-a: #3f8fc4; --ea-t: #c8402f; --ea-w: #e2b33c; --ea-o: #7bb661; --ea-e: #8a5bb8;
  --ea-stage: radial-gradient(ellipse at 50% 45%, #fff3df 0%, #fbe3c3 55%, #f2cf9f 100%);
  --on-c0: #c8402f; --on-c1: #e8853a; --on-c2: #e2b33c; --on-c3: #7bb661; --on-c4: #3f8fc4; --on-ink: #2b2622; --on-rel: #f7e64a;
  --on-bg: #fffaf0; --on-fact: #eef5fb; --on-fact-ink: #1d3f66; --on-arrow: #6b4fa0;
  --lane-ok: #2c6e31; --lane-rev: #c98a12; --lane-pen: #8b94a0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --rp-paper: #2a211b; --rp-paper-2: #33281f; --rp-ink: #f3e9dc; --rp-dot: #46382c; --rp-skin: #e9c39a; --rp-sel: #ffb066;
    --ea-stage: radial-gradient(ellipse at 50% 45%, #6a3a17 0%, #3a2314 50%, #1d1410 100%);
    --on-c0: #b23a2a; --on-c1: #d27a33; --on-c2: #c9a034; --on-c3: #5f9a4c; --on-c4: #2f74a6; --on-ink: #1e1a16; --on-rel: #f4e04a;
    --on-bg: #241b15; --on-fact: #1f3248; --on-fact-ink: #dbe9f7; --on-arrow: #c3a3ea;
  }
}
:root[data-theme="dark"] {
  --rp-paper: #2a211b; --rp-paper-2: #33281f; --rp-ink: #f3e9dc; --rp-dot: #46382c; --rp-skin: #e9c39a; --rp-sel: #ffb066;
  --ea-stage: radial-gradient(ellipse at 50% 45%, #6a3a17 0%, #3a2314 50%, #1d1410 100%);
  --on-c0: #b23a2a; --on-c1: #d27a33; --on-c2: #c9a034; --on-c3: #5f9a4c; --on-c4: #2f74a6; --on-ink: #1e1a16; --on-rel: #f4e04a;
  --on-bg: #241b15; --on-fact: #1f3248; --on-fact-ink: #dbe9f7; --on-arrow: #c3a3ea;
}

/* ---------- comunes ---------- */
.ea-tools { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.ea-grp { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ea-right { margin-left: auto; }
.ea-slot { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ea-tools .btn.sm { min-height: 32px; min-width: 32px; justify-content: center; }
.ea-colors { display: inline-flex; gap: 3px; padding: 0 4px; }
.ea-chip { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); background: var(--chip); cursor: pointer; padding: 0; }
.ea-chip[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--rp-sel); }
.ea-chip:disabled { opacity: .35; cursor: not-allowed; }
.ea-hint { font-size: .78rem; color: var(--muted); margin: 6px 2px 0; }
.ea-inline { position: absolute; z-index: 30; font: 15px/1.35 var(--hand); color: var(--ink); background: var(--surface); border: 2px solid var(--rp-sel); border-radius: 12px; padding: 8px 10px; box-shadow: 0 6px 22px rgba(0,0,0,.18); resize: none; }
.ea-ico { width: 18px; height: 18px; flex: none; fill: var(--accent); stroke: var(--accent); stroke-width: 1.4; }
.ea-ico.nh { fill: var(--ea-o); stroke: var(--ea-o); }
.ea-ilus { font-size: .68rem; letter-spacing: .06em; }

/* ---------- Rich Picture ---------- */
.rp-meta { font-size: .8rem; margin: 4px 0 0; }
.rp-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 8px; }
@media (min-width: 900px) { .rp-main { grid-template-columns: 156px minmax(0, 1fr); } .ro-ed .rp-main { grid-template-columns: minmax(0, 1fr); } }
.rp-pal { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; touch-action: pan-x; }
@media (min-width: 900px) { .rp-pal { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; align-content: start; padding: 0; touch-action: none; } }
.rp-pi { flex: none; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--rp-paper); color: var(--ink); cursor: grab; font-size: .64rem; line-height: 1.1; text-align: center; user-select: none; -webkit-user-select: none; }
@media (min-width: 900px) { .rp-pi { width: auto; } }
.rp-pi:hover { border-color: var(--rp-sel); transform: translateY(-1px); }
.rp-pi:active { cursor: grabbing; }
.rp-pi span { min-height: 1.1em; }
.rp-ico { width: 40px; height: 40px; overflow: visible; }
.rp-ghost { position: fixed; z-index: 100; width: 64px; height: 64px; margin: -32px 0 0 -32px; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.25)); }
.rp-ghost .rp-ico { width: 64px; height: 64px; }
.rp-stage { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--rp-paper); }
.rp-stage.drop-on { box-shadow: inset 0 0 0 3px var(--rp-sel); }
.rp-cv { display: block; width: 100%; height: min(68vh, 620px); min-height: 360px; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.rp-cv:active { cursor: grabbing; }
.rp-empty { position: absolute; inset: 40% 10% auto; text-align: center; font: 16px var(--hand); color: var(--muted); pointer-events: none; }
.rp-paper { fill: var(--rp-paper); }
.rp-dot { fill: var(--rp-dot); }
.rp-cv .ik { stroke: var(--rp-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.rp-ico .ik { stroke: #2b2622; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.rp-cv .ik.thin, .rp-ico .ik.thin { stroke-width: 1.8; fill: none; }
.ik:not([fill]):not(.sk):not(.pp):not(.cap):not(.refl):not(.roof):not(.bolt):not(.bub) { fill: none; }
.sk { fill: var(--rp-skin); }
.pp { fill: #fffdf7; }
.ikf { fill: #2b2622; }
.rp-cv .ikf { fill: var(--rp-ink); }
.rp-cv .rough .ikf { fill: #2b2622; }
.cap { fill: #2f4f7f; }
.refl { fill: #ffe14d; }
.roof { fill: #d0543f; }
.bolt { fill: #ffd23f; }
.bub { fill: #fffdf7; }
.star { fill: #ffd23f; stroke: #8a5a00; stroke-width: 1; }
.tear { fill: #5fa8d3; }
.ikt { font: 700 20px var(--sans); fill: #2b2622; }
.ikt.big { font-size: 26px; }
.ikt.hand { font: 700 34px var(--hand); }
.rp-cv .rough { filter: url(#rpRough); }
.rp-el { cursor: move; outline: none; }
.ro-ed .rp-el { cursor: default; }
.rp-el .hit { fill: transparent; }
.rp-ico .rp-ink { stroke: var(--rp-ink); }
.rp-ico text.rp-ink, .rp-ico .ikf.rp-ink { fill: var(--rp-ink); stroke: none; }
.rp-tx { font-size: 15px; fill: #2b2622; }
.rp-tx.big { font-size: 18px; }
.t-texto .rp-tx { paint-order: stroke; stroke: var(--rp-paper); stroke-width: 4px; stroke-linejoin: round; }
.hand { font-family: var(--hand); }
.rp-lbl { font-size: 14px; font-weight: 600; fill: var(--rp-ink); paint-order: stroke; stroke: var(--rp-paper); stroke-width: 4px; stroke-linejoin: round; }
.rp-alb { font-size: 13px; fill: var(--rp-ink); paint-order: stroke; stroke: var(--rp-paper); stroke-width: 4px; stroke-linejoin: round; font-style: italic; }
.rp-arr { cursor: pointer; outline: none; }
.arr-hit { fill: none; stroke: transparent; stroke-width: 18px; }
.arr-l { fill: none; stroke-width: 2.6px; stroke-linecap: round; }
.arr-h { stroke-width: 1.5px; stroke-linejoin: round; }
.rp-arr.is-sel .arr-l { stroke-width: 4px; }
.rp-cv [style*="stroke:#2b2622"] { stroke: var(--rp-ink) !important; }
.rp-cv .arr-h[style*="fill:#2b2622"] { fill: var(--rp-ink) !important; }
.rp-cv .t-texto [style*="fill:#2b2622"] { fill: var(--rp-ink) !important; }
.rp-el:focus-visible .hit, .rp-el.is-sel .hit { fill: rgba(224, 118, 31, .06); }
.rp-el:focus-visible { outline: none; }
.rp-el:focus-visible .rp-lbl, .rp-arr:focus-visible .arr-l { text-decoration: underline; stroke-width: 4px; }
.h-box { fill: none; stroke: var(--rp-sel); stroke-dasharray: 6 4; }
.h-ln { stroke: var(--rp-sel); }
.h-pt { fill: var(--surface); stroke: var(--rp-sel); stroke-width: 2px; vector-effect: non-scaling-stroke; cursor: pointer; }
.h-con { fill: var(--rp-sel); }
.h-g { cursor: pointer; }
.h-g[data-h="rs"] { cursor: nwse-resize; }
.h-tx { fill: var(--rp-ink); text-anchor: middle; dominant-baseline: central; pointer-events: none; font-family: var(--sans); }
.h-con + .h-tx { fill: #fff; font-weight: 700; }
.h-bend { fill: var(--rp-sel); }
.tmp-l { stroke: var(--rp-sel); stroke-width: 3; stroke-dasharray: 8 6; fill: none; }
.tmp-t { fill: rgba(224, 118, 31, .12); stroke: var(--rp-sel); stroke-width: 2; }
.rp-howto { margin: 0; padding-left: 18px; font-size: .86rem; display: grid; gap: 6px; }

/* ---------- IB&PTA: tarjetas de sección ---------- */
.ib-sub { font-size: .84rem; margin: 6px 0 10px; }
.flash-in { animation: eaFlash 1.2s ease-out; }
@keyframes eaFlash { 0% { box-shadow: 0 0 0 3px var(--rp-sel); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .flash-in { animation: none; } }

/* ---------- carriles CG → PL → W → RS → RD → CM ---------- */
.ln-wrap { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.ln-tray, .ln-zone { border-radius: 14px; padding: 10px; border: 1.5px dashed var(--line); background: var(--surface-2); transition: box-shadow .15s, border-color .15s; }
.ln-zone { background: var(--surface); border-style: solid; position: relative; }
.ln-tray-h, .ln-zone-h { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: .9rem; margin-bottom: 8px; }
.ln-tip { font-size: .76rem; }
.ln-pills { display: flex; flex-wrap: wrap; gap: 6px; max-height: 168px; overflow-y: auto; padding: 2px; }
.ln-pill { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 99px; padding: 4px 11px 4px 6px; font-size: .78rem; cursor: grab; text-align: left; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.ln-pill.nh { border-style: dashed; border-color: var(--ea-o); }
.ln-pill:hover { border-color: var(--rp-sel); }
.ln-pill:disabled { cursor: default; opacity: .8; }
.ln-pill .ea-ico { width: 15px; height: 15px; }
.ln-new { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ln-new input { flex: 1 1 200px; min-width: 0; }
.ln-ghost { position: fixed; z-index: 100; transform: translate(-50%, -60%); pointer-events: none; display: inline-flex; gap: 6px; align-items: center; background: var(--surface); color: var(--ink); border: 2px solid var(--rp-sel); border-radius: 99px; padding: 6px 12px; font-size: .84rem; box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.drag-to-zone .ln-zone, .drag-to-tray .ln-tray { border-color: var(--rp-sel); border-style: dashed; }
.ln-zone.drop-on, .ln-tray.drop-on { box-shadow: 0 0 0 3px var(--rp-sel); background: color-mix(in srgb, var(--rp-sel) 8%, var(--surface)); }
.ln-drop-hint { display: none; position: absolute; inset: 40px 10px 10px; border-radius: 12px; align-items: center; justify-content: center; font: 600 1rem var(--hand); color: var(--rp-sel); pointer-events: none; }
.drag-to-zone .ln-zone .ln-drop-hint { display: flex; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.ln-leg { margin-left: auto; font-size: .72rem; color: var(--muted); display: inline-flex; gap: 4px 8px; align-items: center; flex-wrap: wrap; }
.ln-leg i { display: inline-block; width: 14px; height: 6px; border-radius: 3px; vertical-align: middle; }
.ln-leg i.e-pendiente { background: var(--lane-pen); } .ln-leg i.e-en_revision { background: var(--lane-rev); } .ln-leg i.e-aprobado { background: var(--lane-ok); }
.ln-lanes { display: grid; gap: 10px; }
.ln-lane { --lc: var(--lane-pen); border: 1px solid var(--line); border-left: 6px solid var(--lc); border-radius: 12px; padding: 6px 10px 8px; background: linear-gradient(90deg, color-mix(in srgb, var(--lc) 9%, var(--surface)) 0, var(--surface) 55%); }
.ln-lane.e-en_revision { --lc: var(--lane-rev); }
.ln-lane.e-aprobado { --lc: var(--lane-ok); }
.ln-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: .88rem; }
.ln-grip { cursor: grab; color: var(--muted); font-size: 1.1rem; padding: 2px 4px; touch-action: none; user-select: none; }
.ln-i { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 50%; background: var(--lc); color: #fff; font-size: .74rem; font-weight: 700; }
.ln-name { flex: 1 1 200px; min-width: 0; }
.ln-name .chip { font-size: .64rem; padding: 1px 6px; }
.ln-acts .btn.sm { padding: 2px 8px; font-size: .74rem; }
.ln-acts .btn.bad { border-color: transparent; }
.ln-acts { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ln-chain { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 18px; }
@media (min-width: 1000px) { .ln-chain { grid-template-columns: .62fr .62fr 1fr 1fr 1fr .9fr; } }
.ln-chain > li { position: relative; min-width: 0; }
.ln-chain > li:not(:last-child)::after { content: ""; position: absolute; right: -15px; top: 50%; width: 12px; height: 2px; background: var(--muted); }
.ln-chain > li:not(:last-child)::before { content: ""; position: absolute; right: -15px; top: calc(50% - 4px); border: 5px solid transparent; border-left: 6px solid var(--muted); border-right: 0; transform: translateX(5px); }
@media (max-width: 999px) { .ln-chain > li:nth-child(3n)::after, .ln-chain > li:nth-child(3n)::before { display: none; } }
.ln-node { width: 100%; height: 100%; min-height: 46px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 2px solid var(--accent); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 5px 8px; cursor: pointer; font-size: .74rem; line-height: 1.25; }
.ln-node b { font-family: var(--serif); font-size: .95rem; color: var(--accent); }
.ln-node sub { font-size: .62rem; }
.ln-node .ln-pv { color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ln-node.empty { border-style: dashed; border-color: var(--line); background: var(--surface-2); }
.ln-node.pend { border-style: dashed; border-color: var(--ai-line); background: var(--ai-bg); }
.ln-node.pend b { color: var(--ai); }
.ln-node.f-cm.filled { background: color-mix(in srgb, var(--on-c2) 18%, var(--surface)); border-color: var(--on-c1); }
.ln-node.f-cm b { color: var(--ink); }
.ln-node.f-rd.filled { background: var(--accent-soft); }
.ln-node.is-open { box-shadow: 0 0 0 3px color-mix(in srgb, var(--rp-sel) 55%, transparent); }
.ln-node:hover { transform: translateY(-1px); }
.ln-mini { width: 30px; height: 20px; vertical-align: middle; margin-right: 4px; }
.ln-mini .m4 { fill: var(--on-c4); } .ln-mini .m2 { fill: var(--on-c2); } .ln-mini .m0 { fill: var(--on-c0); }
.ln-node.f-cm .ln-pv { display: flex; align-items: center; color: var(--ink); }
.ln-dots { display: inline-flex; flex-wrap: wrap; gap: 2px; }
@media (max-width: 600px) { .ln-chain { gap: 8px 14px; } .ln-chain > li:not(:last-child)::after, .ln-chain > li:not(:last-child)::before { right: -12px; } .ln-dots i { width: 13px; height: 13px; font-size: .5rem; } .ln-node { padding: 4px 6px; } .rp-cv { height: 62vh; } }
.ln-dots i, .cwk { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; font-style: normal; font-size: .62rem; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line); }
.cwk { width: 24px; height: 24px; font-size: .78rem; color: #fff; border: 0; }
.ln-dots i.on { color: #fff; border: 0; }
.cw-c.on, .cwk.cw-c { background: var(--ea-c); } .cw-a.on, .cwk.cw-a { background: var(--ea-a); } .cw-t.on, .cwk.cw-t { background: var(--ea-t); }
.cw-w.on, .cwk.cw-w { background: var(--ea-w); color: #3a2a00; } .cw-o.on, .cwk.cw-o { background: var(--ea-o); } .cw-e.on, .cwk.cw-e { background: var(--ea-e); }
.ln-ed { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--rp-sel); font-size: .86rem; }
.ln-ed-h { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; color: var(--muted); }
.ln-ed-h b { font-family: var(--serif); color: var(--accent); font-size: 1rem; }
.ln-x { margin-left: auto; }
.ln-ed .ib-txt { min-height: 1.6em; padding: 4px 6px; border-radius: 6px; }
.ib-txt.is-empty:empty::before { content: attr(data-ph); color: var(--muted); font-style: italic; }
.ln-cw { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); margin-top: 10px; }
@media (min-width: 700px) { .ln-cw { grid-template-columns: 1fr 1fr; } }
.ln-cw > div { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 2px 8px; align-items: start; }
.ln-cw > div > small { grid-column: 2; }
.ln-cw > div > .ib-txt { grid-column: 2; }
.ln-cw .cwk { grid-row: span 2; }
.ln-ed .ib-cm { padding-left: 0; list-style: none; display: grid; gap: 6px; margin: 0 0 8px; }
.ln-ed .ib-cm li { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ln-ed .ib-cm .ib-txt { flex: 1 1 200px; }
.ln-ed .ib-addt input { flex: 1 1 200px; min-width: 0; }

/* ---------- rueda de interpretaciones ---------- */
.rw-wrap { position: relative; }
.rw-stage { border-radius: 18px; overflow: hidden; background: var(--ea-stage); }
.rw-svg { display: block; width: 100%; height: auto; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.rw-bg { fill: transparent; }
.rw-g0 { stop-color: #ffffff; stop-opacity: .55; } .rw-g1 { stop-color: #ffffff; stop-opacity: 0; }
.rw-st0 { stop-color: #ffffff; } .rw-st1 { stop-color: #f4f1ec; } .rw-st2 { stop-color: #cfc7bd; }
.rw-ring { fill: none; stroke: #ffffff; stroke-width: 5; opacity: .95; }
.rw-side { fill: #8d8a86; } .rw-side2 { fill: #b9b6b1; }
.rw-facet { stroke: rgba(255,255,255,.75); stroke-width: 1.5; stroke-linejoin: round; }
.rw-rw { font: 800 30px var(--sans); fill: #3a2414; text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: rgba(255,244,228,.9); stroke-width: 6px; stroke-linejoin: round; }
.rw-cap { font: 600 14px var(--sans); fill: #5c3d24; }
.rw-ray { stroke: #c8402f; stroke-width: 2.2; }
.rw-w { fill: #f2d43a; stroke: #b08a00; stroke-width: 1.2; stroke-linejoin: round; }
.rw-wl { font: 700 22px var(--sans); fill: #3a2414; text-anchor: middle; dominant-baseline: middle; }
.rw-wl .sub, .rw-tp .sub { font-size: 62%; }
.rw-ball { cursor: pointer; outline: none; }
.rw-ball .rw-b { fill: url(#rwBall); stroke: rgba(0,0,0,.18); stroke-width: 1; filter: drop-shadow(0 6px 8px rgba(60,30,10,.35)); }
.rw-halo { fill: transparent; stroke: transparent; stroke-width: 4; }
.rw-ball:hover .rw-halo, .rw-ball:focus-visible .rw-halo { stroke: rgba(255,255,255,.85); stroke-dasharray: 5 5; }
.rw-ball.is-open .rw-halo { stroke: #e0761f; stroke-width: 5; stroke-dasharray: none; }
.rw-ball.dragging { opacity: .85; cursor: grabbing; }
.rw-seg { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 9; stroke-linecap: round; }
.rw-seg.on.cw-c { stroke: var(--ea-c); } .rw-seg.on.cw-a { stroke: var(--ea-a); } .rw-seg.on.cw-t { stroke: var(--ea-t); }
.rw-seg.on.cw-w { stroke: var(--ea-w); } .rw-seg.on.cw-o { stroke: var(--ea-o); } .rw-seg.on.cw-e { stroke: var(--ea-e); }
.rw-tp { font: 700 22px var(--sans); fill: #1d1d1d; text-anchor: middle; dominant-baseline: middle; }
.rw-nh { font: 600 12px var(--sans); fill: #2c6e31; text-anchor: middle; }
.rw-name { font: 700 16px var(--sans); fill: #2b1a0e; text-anchor: middle; paint-order: stroke; stroke: rgba(255,240,220,.85); stroke-width: 4px; stroke-linejoin: round; }
.rw-empty { font: 18px var(--hand); fill: #5c3d24; text-anchor: middle; }
.rw-ball.e-aprobado .rw-b { stroke: var(--lane-ok); stroke-width: 3; }
.rw-panel { position: absolute; z-index: 5; background: var(--surface); border: 2px solid var(--rp-sel); border-radius: 16px; padding: 10px 12px; box-shadow: 0 12px 30px rgba(0,0,0,.22); font-size: .84rem; max-height: 92%; overflow-y: auto; }
.rw-panel.below { position: static; margin-top: 10px; width: auto !important; max-height: none; }
.rw-ph { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; margin-bottom: 6px; }
.rw-note { font-size: .76rem; margin: 0 0 6px; }
.rw-f { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; align-items: start; padding: 5px 0; border-top: 1px dashed var(--line); }
.rw-f .ib-txt { min-height: 1.5em; padding: 2px 4px; border-radius: 6px; }
.rw-foot { margin-top: 8px; }
.rw-leg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .76rem; color: var(--muted); align-items: center; }
.rw-leg span { display: inline-flex; gap: 4px; align-items: center; }
.rw-leg .cwk { width: 18px; height: 18px; font-size: .64rem; }
:root[data-theme="dark"] .rw-rw, :root[data-theme="dark"] .rw-wl { fill: #fbe9d4; }
:root[data-theme="dark"] .rw-cap { fill: #e9cfb2; }
:root[data-theme="dark"] .rw-rw { stroke: rgba(40,20,8,.85); }
:root[data-theme="dark"] .rw-name { fill: #fff3e3; stroke: rgba(40,20,8,.85); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rw-rw, :root:not([data-theme="light"]) .rw-wl { fill: #fbe9d4; } :root:not([data-theme="light"]) .rw-cap { fill: #e9cfb2; } :root:not([data-theme="light"]) .rw-rw { stroke: rgba(40,20,8,.85); } :root:not([data-theme="light"]) .rw-name { fill: #fff3e3; stroke: rgba(40,20,8,.85); } }

/* ---------- tablero de agregación ---------- */
.ag-board { overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.ag-inner { position: relative; min-width: 920px; }
.ag-lines { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 2; overflow: visible; }
.ag-ln { fill: none; stroke: var(--ai-line); stroke-width: 2; stroke-dasharray: 5 4; }
.ag-lp { fill: var(--ai-line); }
.ag-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: start; }
.ag-col { --vc: var(--on-c1); background: color-mix(in srgb, var(--vc) 8%, var(--surface-2)); border-radius: 14px; padding: 6px 6px 10px; min-height: 140px; border: 2px solid transparent; transition: border-color .12s; }
.ag-col.v-beneficiar { --vc: var(--on-c0); } .ag-col.v-crear { --vc: var(--on-c3); } .ag-col.v-intentar { --vc: var(--on-c4); } .ag-col.v-descuidar { --vc: var(--on-c1); } .ag-col.v-considerar { --vc: var(--ea-e); }
.ag-col.drop-on { border-color: var(--rp-sel); border-style: dashed; }
.ag-ch { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; margin-bottom: 8px; border-radius: 10px; background: var(--vc); color: #fff; font-size: .9rem; }
.ag-ch small { background: rgba(255,255,255,.28); border-radius: 99px; padding: 0 8px; }
.ag-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 7px 9px; margin-bottom: 7px; font-size: .8rem; line-height: 1.3; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.ag-card.nh { border-style: dashed; }
.ag-card:hover { border-color: var(--vc); }
.ag-card.is-src { border-color: var(--ai-line); }
.ag-card.hl { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ai-line) 60%, transparent); }
.ag-card.is-drag { opacity: .35; }
.ag-from { display: flex; gap: 4px; align-items: center; font-size: .7rem; color: var(--muted); margin-top: 4px; }
.ag-from .ea-ico { width: 12px; height: 12px; }
.ag-ghost { position: fixed; z-index: 100; pointer-events: none; transform: rotate(-2deg); box-shadow: 0 12px 26px rgba(0,0,0,.25); margin: 0; }
.ag-move { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; align-items: center; }
.ag-move small { color: var(--muted); }
.ag-draft { position: relative; z-index: 3; background: var(--ai-bg); border: 2px dashed var(--ai-line); border-radius: 18px 22px 16px 20px; padding: 8px 10px; margin-bottom: 30px; font-size: .8rem; box-shadow: 0 4px 12px rgba(138, 90, 0, .12); }
.ag-dh { display: flex; justify-content: space-between; gap: 6px; font-size: .7rem; color: var(--ai); }
.ag-ia { font-weight: 700; letter-spacing: .02em; }
.ag-dt { font-weight: 700; margin: 4px 0; color: var(--ink); }
.ag-dt[contenteditable="true"] { background: var(--surface); outline: 2px solid var(--ai-line); border-radius: 6px; padding: 2px 4px; }
.ag-src { font-size: .7rem; color: var(--muted); }
.ag-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ag-acts .btn.sm { padding: 2px 8px; font-size: .74rem; }
.ag-acc { background: var(--ok-bg); border: 1.5px solid var(--ok); border-radius: 14px; padding: 7px 9px; margin-bottom: 8px; font-size: .8rem; }
.ag-acc .chip { font-size: .64rem; }
.ag-empty { font: .84rem var(--hand); color: var(--muted); text-align: center; padding: 18px 4px; margin: 0; }
.ib-mx summary { cursor: pointer; font-size: .84rem; color: var(--muted); }

/* ---------- cebolla C&V-PO/SO-PTM ---------- */
.on-tools { margin-bottom: 8px; }
.on-tray { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--ok-bg); margin-bottom: 8px; }
.on-tray-h { font-size: .8rem; font-weight: 600; color: var(--ok); }
.on-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.on-chip { border: 1.5px solid var(--ok); background: var(--surface); color: var(--ink); border-radius: 99px; padding: 4px 11px; font-size: .76rem; cursor: grab; text-align: left; touch-action: pan-y; user-select: none; }
.on-chip small { color: var(--ok); font-weight: 700; }
.on-chip.used { opacity: .55; cursor: default; border-style: dashed; }
.on-ghost { position: fixed; z-index: 100; pointer-events: none; transform: translate(-50%, -60%); box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.on-stage { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.on-svg { display: block; width: 100%; height: auto; aspect-ratio: 1100 / 760; touch-action: none; user-select: none; -webkit-user-select: none; }
.on-bg { fill: var(--on-bg); }
.on-lyr { stroke: rgba(0,0,0,.28); stroke-width: 1.5; transition: filter .12s; }
.on-lyr.hov { filter: brightness(1.12) saturate(1.15); stroke: var(--rp-sel); stroke-width: 3; }
.on-c0 { fill: var(--on-c0); background: var(--on-c0); } .on-c1 { fill: var(--on-c1); background: var(--on-c1); } .on-c2 { fill: var(--on-c2); background: var(--on-c2); }
.on-c3 { fill: var(--on-c3); background: var(--on-c3); } .on-c4 { fill: var(--on-c4); background: var(--on-c4); }
.on-tk { cursor: grab; outline: none; }
.on-bub { fill: #ffffff; stroke: #2b2622; stroke-width: 1.4; filter: url(#onSh); }
.on-tk.rel .on-bub { fill: var(--on-rel); stroke-width: 2.2; }
.on-tk.ag .on-bub { stroke: #2c6e31; stroke-dasharray: 5 3; stroke-width: 2; }
.on-tk.is-sel .on-bub, .on-tk:focus-visible .on-bub { stroke: var(--rp-sel); stroke-width: 3.5; stroke-dasharray: none; }
.on-btx { font: 10.6px var(--sans); fill: #1d1d1d; }
.on-agb { font: 700 13px var(--sans); fill: #2c6e31; text-anchor: middle; dominant-baseline: middle; }
.on-fact { cursor: grab; outline: none; }
.on-fbox { fill: var(--on-fact); stroke: var(--on-fact-ink); stroke-width: 1.5; }
.on-fact.is-sel .on-fbox, .on-fact:focus-visible .on-fbox { stroke: var(--rp-sel); stroke-width: 3; }
.on-ft { font: 12px var(--sans); fill: var(--on-fact-ink); }
.on-farr { fill: none; stroke: var(--on-arrow); stroke-width: 2; }
.on-arrh2 { fill: var(--on-arrow); }
.on-title { font: 600 16px var(--sans); fill: var(--ink); }
.on-title.b { font-weight: 800; font-size: 19px; }
.on-relh { font: 800 22px var(--sans); fill: var(--ink); }
.on-relt { font: 13.5px var(--sans); fill: var(--ink); }
.on-reldot { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 0.1 10; }
.on-relhead { fill: var(--ink); }
.on-ilus { font: 600 11px var(--sans); fill: var(--muted); letter-spacing: .08em; }
.on-under { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); margin-top: 10px; }
@media (min-width: 900px) { .on-under { grid-template-columns: 260px minmax(0, 1fr); } }
.on-legend { display: grid; gap: 4px; align-content: start; }
.on-lg { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: .84rem; }
.on-sw { display: inline-block; width: 16px; height: 16px; border-radius: 50% 45% 55% 40%; border: 1px solid rgba(0,0,0,.2); flex: none; }
.on-ln[contenteditable="true"], .on-lt[contenteditable="true"] { border-bottom: 1px dashed var(--line); outline: none; }
.on-ln[contenteditable="true"]:focus, .on-lt[contenteditable="true"]:focus { border-bottom-color: var(--accent); background: var(--accent-soft); }
.on-tlist { list-style: none; margin: 0; padding: 0; columns: 2 280px; column-gap: 18px; font-size: .82rem; }
.on-tlist li { break-inside: avoid; display: flex; gap: 6px; align-items: baseline; padding: 3px 4px; border-radius: 6px; cursor: pointer; }
.on-tlist li .on-sw { width: 11px; height: 11px; transform: translateY(1px); }
.on-tlist li.rel { background: color-mix(in srgb, var(--on-rel) 35%, transparent); }
.on-tlist .chip { font-size: .62rem; padding: 0 6px; }
