/* Diagramador · propuesta de diseño sobre Café Referido.
   Tema Espresso por defecto; data-theme="crema" en .dg cambia a claro. */
.dg {
  --surface: #1b1410; --surface-raised: #2a1f19; --surface-sunk: #140f0c;
  --line: #4a3a2f; --line-strong: #9a8473;
  --ink: #f4ebdd; --ink-muted: #c4b3a1;
  --espresso: #5a3a2a; --navy: #2b3a5c; --crema: #efe2cb; --ink-fixed: #1c1714; --on-dark: #fbf5ea;
  --sky-100: #dbe9f7; --sky-300: #a9c8ea; --sky-500: #6f9fd6; --sky-700: #3a679f;
  --latte: #c99a72; --latte-text: #dcb48f;
  --action: #a9c8ea; --on-action: #1c1714; --focus: #a9c8ea;
  --success: #7fc8b0; --danger: #f0a07e;
  --today-bg: rgba(201,154,114,0.16);
  --scrim: rgba(10,7,5,0.62);
  --shadow-paper: 0 1px 2px rgba(0,0,0,0.5), 0 10px 24px rgba(0,0,0,0.45);
  --shadow-lift: 0 6px 0 rgba(0,0,0,0.9);
  --font-poster: "Lilita One", "Arial Black", system-ui, sans-serif;
  --font-editorial: "Young Serif", Georgia, serif;
  --font-sans: "Figtree", system-ui, -apple-system, sans-serif;
  --font-mono: "DM Mono", ui-monospace, Menlo, monospace;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;
  --radius-paper: 3px; --radius-soft: 12px; --radius-poster: 24px; --radius-pill: 999px;
  font-family: var(--font-sans); color: var(--ink); background: var(--surface);
  box-sizing: border-box; position: relative; overflow: hidden;
}
.dg[data-theme="crema"] {
  --surface: #f6efe3; --surface-raised: #fffdf8; --surface-sunk: #efe5d4;
  --line: #d9cbb5; --line-strong: #8a7462; --ink: #1c1714; --ink-muted: #62534a;
  --espresso: #4a2f22; --navy: #1f2a44; --latte: #a87b56; --latte-text: #7d5236;
  --action: #1f2a44; --on-action: #fbf5ea; --focus: #3a679f; --success: #24614f; --danger: #a33d17;
  --today-bg: rgba(168,123,86,0.14); --scrim: rgba(28,23,20,0.45);
  --shadow-paper: 0 1px 2px rgba(28,23,20,0.14), 0 10px 24px rgba(28,23,20,0.12);
  --shadow-lift: 0 6px 0 rgba(28,23,20,0.9);
}
.dg *, .dg *::before, .dg *::after { box-sizing: border-box; }
.dg button { font: inherit; color: inherit; cursor: pointer; }
.dg h1, .dg h2, .dg h3, .dg p, .dg ul { margin: 0; }
.dg ul { padding: 0; list-style: none; }

/* Íconos de trazo, estilo Lucide, 2px */
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.i.s { width: 14px; height: 14px; }
.i.l { width: 22px; height: 22px; }
.spark { fill: var(--latte); flex-shrink: 0; }

/* ---------- Barra superior (escritorio) ---------- */
.tb { height: 60px; display: flex; align-items: center; gap: 8px; padding: 0 16px; background: var(--surface-raised); border-bottom: 1px solid var(--line); position: relative; z-index: 5; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-editorial); font-size: 20px; letter-spacing: -0.01em; margin-right: 6px; white-space: nowrap; }
.tbtn { height: 36px; min-width: 36px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: transparent; border: 1px solid var(--line); border-radius: var(--radius-soft); font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.tbtn.icon { padding: 0; width: 36px; }
.tbtn.quiet { border-color: transparent; }
.tbtn.primary { background: var(--action); color: var(--on-action); border-color: var(--action); }
.tbtn.open { border-color: var(--focus); box-shadow: 0 0 0 2px var(--surface-raised), 0 0 0 4px var(--focus); }
.tbtn.dim { color: var(--line-strong); }
.sel { height: 36px; display: inline-flex; align-items: center; gap: 10px; padding: 0 10px 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-soft); background: var(--surface); font-size: 14px; font-weight: 600; max-width: 300px; white-space: nowrap; }
.sel span { overflow: hidden; text-overflow: ellipsis; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius-soft); background: var(--surface); }
.seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-muted); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--navy); color: var(--on-dark); }
.vsep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.grow { flex: 1 1 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--sky-300); color: var(--ink-fixed); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--surface-raised); box-shadow: 0 0 0 1px var(--line-strong); }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-muted); white-space: nowrap; }
.sync .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

/* ---------- Lienzo ---------- */
.canvas { position: relative; overflow: hidden; background-color: var(--surface); background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 24px 24px; }
.float { position: absolute; display: flex; align-items: center; gap: 2px; padding: 4px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-soft); box-shadow: var(--shadow-paper); }
.float .lbl { min-width: 52px; text-align: center; font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.hint { position: absolute; font-size: 12px; color: var(--ink-muted); display: flex; gap: 14px; align-items: center; }
.kbd { font-family: var(--font-mono); font-size: 11px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); }

/* ---------- Nodo raíz ---------- */
.root { background: var(--crema); color: var(--ink-fixed); border-radius: var(--radius-paper); box-shadow: var(--shadow-paper); padding: 24px 28px; display: flex; gap: 20px; }
.root-ico { width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 4px; }
.root-ico .spark { fill: var(--ink-fixed); }
.root-title { font-family: var(--font-editorial); font-size: 34px; line-height: 1.04; letter-spacing: -0.01em; text-transform: lowercase; }
.root-sub { font-family: var(--font-mono); font-size: 11px; line-height: 18px; letter-spacing: 0.06em; text-transform: uppercase; color: #4f4037; margin-top: 10px; }
.root-foot { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.root .bar { background: #d9cbb5; }
.root .bar .doing { background: #a87b56; }
.root .bar .done { background: #24614f; }
.root .pct { color: var(--ink-fixed); }
.root .pct small { color: #4f4037; }

/* Barra de progreso */
.bar { height: 8px; border-radius: var(--radius-pill); background: var(--line); display: flex; overflow: hidden; flex: 1 1 120px; min-width: 80px; }
.bar .done { background: var(--success); }
.bar .doing { background: var(--latte); }
.pct { font-size: 12px; font-weight: 700; white-space: nowrap; }
.pct small { font-size: 12px; font-weight: 400; color: var(--ink-muted); }

/* Navegador de prioridades de hoy */
.todaynav { display: inline-flex; align-items: center; gap: 2px; background: var(--navy); color: var(--on-dark); border-radius: var(--radius-pill); padding: 3px; }
.todaynav .lbl { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 8px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.todaynav .lbl .i { color: #e7c39f; fill: #e7c39f; }
.todaynav button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(251,245,234,0.12); color: var(--on-dark); display: inline-flex; align-items: center; justify-content: center; }

/* Conectores */
.wire { position: absolute; background: var(--line-strong); }
.arrow { position: absolute; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid var(--line-strong); }

/* ---------- Área ---------- */
.area { display: flex; flex-direction: column; gap: 12px; }
.area-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--latte-text); }
.area-head { display: flex; align-items: flex-end; gap: 10px; }
.area-title { font-family: var(--font-poster); font-size: 30px; line-height: 0.95; text-transform: uppercase; letter-spacing: 0.01em; flex: 1; }
.area-prog { display: flex; align-items: center; gap: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* Sección */
.sec { display: flex; flex-direction: column; gap: 8px; border-radius: var(--radius-paper); position: relative; }
.sec-head { background: var(--navy); color: var(--on-dark); border-radius: var(--radius-paper); padding: 7px 10px; display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; min-height: 36px; }
.sec-head .t { flex: 1; }
.sec-ico { width: 24px; height: 24px; border-radius: 50%; background: var(--latte); color: var(--ink-fixed); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border: 0; padding: 0; }
.sec-ico .i { width: 14px; height: 14px; }
.sec-ico.open { box-shadow: 0 0 0 2px var(--navy), 0 0 0 4px var(--sky-300); }
.sec-body { font-size: 13px; line-height: 20px; color: var(--ink); padding: 0 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 2px; }
.chip { background: var(--sky-300); color: var(--ink-fixed); border-radius: var(--radius-pill); padding: 3px 10px; font-size: 12px; font-weight: 600; }
.chip-add { border: 1px dashed var(--line-strong); color: var(--ink-muted); border-radius: var(--radius-pill); padding: 2px 10px; font-size: 12px; background: transparent; display: inline-flex; align-items: center; gap: 4px; }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.col { padding: 6px 10px 8px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; border-radius: var(--radius-paper); }
.col:first-child { border-left: 0; }
.item-t { display: flex; align-items: flex-start; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; line-height: 16px; }
.item-t.done span { text-decoration: line-through; color: var(--ink-muted); }
.bul { font-size: 12px; line-height: 18px; color: var(--ink-muted); display: flex; flex-direction: column; gap: 2px; }
.bul li::before { content: "– "; }

/* Círculo de estado */
.chk { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: transparent; flex-shrink: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.chk.doing { border-color: var(--latte); background: linear-gradient(90deg, var(--latte) 50%, transparent 50%); }
.chk.done { border-color: var(--success); background: var(--success); color: var(--ink-fixed); }
.chk.done .i { width: 12px; height: 12px; stroke-width: 3; }
.chk.big { width: 28px; height: 28px; }
.chk.big.done .i { width: 16px; height: 16px; }

/* Hoy */
.today { background: var(--today-bg); box-shadow: inset 0 0 0 1.5px var(--latte); }
.hoy { display: inline-flex; align-items: center; gap: 4px; background: var(--crema); color: var(--ink-fixed); border-radius: var(--radius-pill); padding: 2px 8px 2px 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.hoy .i { width: 11px; height: 11px; fill: #a87b56; stroke: #a87b56; }

/* Solo lectura (no cuenta) */
.ro { opacity: 0.62; }
.ro-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; letter-spacing: 0.06em; color: var(--on-dark); border: 1px solid rgba(251,245,234,0.5); border-radius: var(--radius-pill); padding: 1px 8px; text-transform: uppercase; }

/* Botones flotantes de una sección (al pasar el mouse / tocar) */
.tools { position: absolute; display: flex; gap: 2px; padding: 3px; background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow-paper); z-index: 3; }
.tools button { width: 30px; height: 30px; border-radius: 7px; border: 0; background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.tools button.on { background: var(--crema); color: var(--ink-fixed); }
.tools .div { width: 1px; background: var(--line); margin: 4px 2px; }
.add-row { display: flex; gap: 6px; flex-wrap: wrap; }
.add { border: 1px dashed var(--line); border-radius: 8px; background: transparent; color: var(--ink-muted); font-size: 11px; padding: 3px 9px; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Menús y popovers ---------- */
.pop { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-soft); box-shadow: var(--shadow-paper); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.pop-h { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); padding: 8px 10px 4px; }
.mi { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: 8px; border: 0; background: transparent; color: var(--ink); font-size: 14px; text-align: left; width: 100%; }
.mi .k { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); }
.mi.hl { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.mi.cur { font-weight: 700; }
.mi.danger { color: var(--danger); }
.mi small { display: block; font-size: 12px; color: var(--ink-muted); font-weight: 400; }
.pop-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.tpl-ico { width: 32px; height: 32px; border-radius: 8px; background: var(--navy); color: var(--on-dark); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mini-prog { width: 54px; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; display: flex; margin-left: auto; flex-shrink: 0; }
.mini-prog i { display: block; background: var(--success); }
.field { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-paper); background: var(--surface); color: var(--ink-muted); font-size: 14px; }
.ig { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.ig button { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; padding: 0; }
.ig button.on { background: var(--latte); color: var(--ink-fixed); border-color: var(--latte); }
.tabs { display: flex; gap: 4px; padding: 0 2px; }
.tabs button { height: 30px; padding: 0 12px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: transparent; color: var(--ink-muted); font-size: 12px; font-weight: 600; }
.tabs button.on { background: var(--sky-300); border-color: var(--sky-300); color: var(--ink-fixed); }
.spec-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--latte-text); }
.spec-note { font-size: 13px; line-height: 20px; color: var(--ink-muted); max-width: 300px; }

/* ---------- Celular ---------- */
.phone { width: 390px; height: 844px; display: flex; flex-direction: column; }
.mtb { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface-raised); border-bottom: 1px solid var(--line); flex-shrink: 0; }
.mbtn { width: 44px; height: 44px; border-radius: var(--radius-soft); border: 1px solid var(--line); background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mbtn.primary { background: var(--action); border-color: var(--action); color: var(--on-action); }
.msel { flex: 1; min-width: 0; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-soft); background: var(--surface); font-size: 15px; font-weight: 600; }
.msel span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mscroll { flex: 1; overflow: hidden; padding: 16px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.mcard { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-paper); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.mcard.closed { gap: 10px; }
.mrow { display: flex; align-items: center; gap: 12px; }
.mtap { display: flex; align-items: flex-start; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.mtap:last-child { border-bottom: 0; }
.mtap .chk { width: 26px; height: 26px; margin-top: -2px; }
.mtap .chk.done .i { width: 15px; height: 15px; }
.mtap .tt { font-size: 13px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; line-height: 20px; }
.mtap .tt.done { text-decoration: line-through; color: var(--ink-muted); }
.mtap .bul { font-size: 14px; line-height: 21px; }
.bottom { display: flex; align-items: center; gap: 8px; padding: 10px 12px 14px; background: var(--surface-raised); border-top: 1px solid var(--line); flex-shrink: 0; }
.scrim { position: absolute; inset: 0; background: var(--scrim); z-index: 8; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 9; background: var(--surface-raised); border-radius: var(--radius-poster) var(--radius-poster) 0 0; padding: 8px 12px 18px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 -10px 30px rgba(0,0,0,0.35); }
.grab { width: 40px; height: 5px; border-radius: 99px; background: var(--line-strong); align-self: center; margin: 2px 0 8px; }
.srow { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 10px; border-radius: 10px; border: 0; background: transparent; color: var(--ink); font-size: 15px; width: 100%; text-align: left; }
.srow .k { margin-left: auto; color: var(--ink-muted); font-size: 13px; }
.srow.danger { color: var(--danger); }
.sgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 4px 2px 8px; }
.sgrid button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: var(--radius-soft); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 600; }

/* ---------- Escena póster (acceso) ---------- */
.sky { background: linear-gradient(var(--sky-100) 0 26%, var(--sky-300) 26% 54%, var(--sky-500) 54% 80%, var(--sky-700) 80%); color: var(--ink-fixed); position: relative; overflow: hidden; }
.sky .sp { position: absolute; fill: var(--on-dark); }
.poster-xl { font-family: var(--font-poster); font-size: 72px; line-height: 0.92; letter-spacing: 0.01em; text-transform: uppercase; }
.poster-xl em { font-style: normal; color: #a87b56; font-size: 0.6em; }
.poster-sm { font-family: var(--font-poster); font-size: 22px; line-height: 1.1; letter-spacing: 0.03em; text-transform: uppercase; }
.gbtn { height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 20px; border-radius: var(--radius-paper); border: 1.5px solid #8a7462; background: #fffdf8; color: #1c1714; font-size: 15px; font-weight: 600; width: 100%; }
.gbtn svg { width: 20px; height: 20px; }
.crema-card { background: var(--crema); color: var(--ink-fixed); border-radius: var(--radius-paper); box-shadow: var(--shadow-paper); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.ed-lg { font-family: var(--font-editorial); font-size: 34px; line-height: 1.1; letter-spacing: -0.01em; text-transform: lowercase; }
.caption { font-family: var(--font-mono); font-size: 11px; line-height: 16px; letter-spacing: 0.04em; text-transform: uppercase; }
.note-ok { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 20px; color: #24614f; }
.note-err { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 20px; color: #a33d17; padding: 10px 12px; border: 1.5px solid #a33d17; border-radius: var(--radius-paper); background: #fffdf8; }

/* ---------- Barra superior premium (v2) ---------- */
.tb { height: 64px; margin: 12px 12px 0; padding: 0 12px 0 10px; gap: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-raised); box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 12px 32px rgba(0,0,0,0.28); }
.dg[data-theme="crema"] .tb { box-shadow: 0 12px 32px rgba(28,23,20,0.10); }
.tb .brand { gap: 10px; font-size: 19px; margin-right: 4px; }
.tb .brand .spark { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--crema); fill: #a87b56; }
.tbtn { height: 38px; border-color: transparent; border-radius: 10px; color: var(--ink-muted); font-weight: 600; }
.tbtn:hover { background: var(--surface); color: var(--ink); }
.tbtn.icon { width: 38px; }
.tbtn.primary { color: var(--on-action); background: var(--action); border-color: var(--action); padding: 0 16px; box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 2px 8px rgba(0,0,0,0.25); }
.sel { height: 40px; border: 0; border-radius: 10px; background: var(--surface); padding: 0 12px 0 14px; font-family: var(--font-editorial); font-weight: 400; font-size: 17px; text-transform: lowercase; letter-spacing: -0.01em; }
.sel .i { color: var(--ink-muted); }
.seg { border: 0; padding: 4px; border-radius: 12px; background: var(--surface); }
.seg button { height: 32px; border-radius: 8px; padding: 0 14px; }
.seg button.on { background: var(--crema); color: var(--ink-fixed); box-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.vsep { height: 20px; margin: 0 6px; }
.sync { height: 30px; padding: 0 12px; border-radius: 999px; background: var(--surface); font-weight: 600; }
.avatar { width: 38px; height: 38px; border: 2px solid var(--surface-raised); box-shadow: 0 0 0 2px var(--latte); margin-left: 4px; }

/* Grupos de la barra: nada suelto */
.tgroup { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface); }
.tgroup .tbtn { height: 34px; }
.tgroup .tbtn.icon { width: 34px; }
.acct { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px 0 3px; border-radius: 999px; background: var(--surface); border: 0; color: var(--ink-muted); }
.acct .avatar { width: 34px; height: 34px; margin: 0; border: 0; box-shadow: none; }

/* Más aire en la barra (v3) */
.tb { height: 68px; margin: 16px 16px 0; padding: 0 16px 0 14px; gap: 10px; flex-wrap: nowrap; }
.tb .brand { margin-right: 14px; }
.tb .vsep { margin: 0 8px; }
.tb .seg { margin-left: 4px; }
.tb .sync { margin-right: 6px; }
.tb .acct { margin-left: 6px; }
.tb .sel { flex-shrink: 1; min-width: 140px; }

/* Compartir y Compartidos (v4) */
.tbtn { position: relative; }
.tbtn.outline { border-color: var(--line-strong); color: var(--ink); }
.badge-dot { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--latte); color: var(--ink-fixed); font: 700 10px/16px var(--font-sans); text-align: center; box-shadow: 0 0 0 2px var(--surface-raised); }
.share-pop { position: absolute; z-index: 20; width: 420px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,0.45); overflow: hidden; }
.dg[data-theme="crema"] .share-pop { box-shadow: 0 24px 60px rgba(28,23,20,0.18); }
.sp-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; }
.sp-title { font-family: var(--font-editorial); font-size: 22px; text-transform: lowercase; margin: 0; flex: 1; }
.sp-tabs { display: flex; gap: 4px; padding: 0 16px 12px; border-bottom: 1px solid var(--line); }
.sp-tabs button { height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: transparent; color: var(--ink-muted); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.sp-tabs button.on { background: var(--crema); color: var(--ink-fixed); }
.sp-tabs .c { min-width: 18px; height: 18px; border-radius: 9px; background: var(--line); color: var(--ink); font-size: 11px; line-height: 18px; text-align: center; padding: 0 5px; }
.sp-tabs button.on .c { background: #a87b56; color: #1c1714; }
.sp-list { padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.sp-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; }
.sp-item.new { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.sp-thumb { width: 44px; height: 44px; border-radius: 8px; background: var(--crema); flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.sp-thumb i { display: block; height: 3px; border-radius: 2px; background: #1f2a44; }
.sp-meta { flex: 1; min-width: 0; }
.sp-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-sub { font-size: 12px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-btn { height: 34px; padding: 0 12px; border-radius: 8px; border: 0; background: var(--action); color: var(--on-action); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.sp-icon { width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-muted); display: inline-flex; align-items: center; justify-content: center; }
.sp-foot { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-muted); display: flex; gap: 8px; align-items: center; }
.who { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.who .avatar { width: 32px; height: 32px; font-size: 13px; margin: 0; box-shadow: none; border: 0; }
.role { margin-left: auto; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink-muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }

/* Que nada se salga (v5) */
.tb { gap: 8px; }
.tb > * { flex-shrink: 0; }
.tb > .sel { flex-shrink: 1; min-width: 120px; }
.tb > .grow { flex-shrink: 1; min-width: 0; }
.acct .avatar { position: relative; }
.acct .avatar::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 2px var(--surface); }
.item-t span, .sec-head .t, .mtap .tt, .area-title, .sp-name { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.item-t { letter-spacing: 0.03em; }
.cols .col { min-width: 0; }

/* v6 · Felix: logo y nutria */
.logo { display: block; flex-shrink: 0; border-radius: 28%; box-shadow: 0 1px 2px rgba(0,0,0,0.35); }
.tb .brand .logo { width: 34px; height: 34px; border-radius: 10px; }
.brand { font-family: var(--font-editorial); }
.fx { --fx-bg: #f8f1e8; flex-shrink: 0; display: block; overflow: hidden; background: var(--fx-bg); border-radius: 24px; }
.fx img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fx.round { border-radius: 50%; }
.fx.ring { box-shadow: 0 0 0 4px var(--surface-raised), 0 0 0 5px var(--line); }
.fx-bubble { position: relative; background: var(--surface-raised); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; font-size: 13.5px; line-height: 19px; box-shadow: var(--shadow-paper); }
.fx-bubble b { font-weight: 700; }
.fx-tip { position: absolute; display: flex; align-items: flex-end; gap: 10px; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 32px 24px; }
.empty h3 { font-family: var(--font-poster); font-size: 26px; line-height: 1; text-transform: uppercase; letter-spacing: 0.01em; }
.empty p { color: var(--ink-muted); font-size: 14.5px; line-height: 22px; max-width: 34ch; }
.empty .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.confetti { position: absolute; width: 10px; height: 4px; border-radius: 2px; }

/* v7 · tarjetas crema y botones con esquinas suaves */
.crema-card { border-radius: 20px; }
.gbtn { border-radius: 12px; }
.crema-card .note-ok, .crema-card .note-err { border-radius: 12px; }
/* v8 · fondo de Felix con puntitos café suaves; la imagen se funde en los bordes */
.fx-dots { background-color: #f8f1e8; background-image: radial-gradient(rgba(125,82,54,0.20) 1.2px, transparent 1.7px); background-size: 14px 14px; background-position: 7px 7px; }
.fx-fade { -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); }
/* v9 · movimiento amigable y sutil para Felix */
@keyframes fx-flota { 0%, 100% { transform: translateY(0) rotate(0deg); } 30% { transform: translateY(-6px) rotate(-1.5deg); } 60% { transform: translateY(-3px) rotate(1deg); } }
.fx-float { animation: fx-flota 4.5s ease-in-out infinite; transform-origin: 50% 90%; }
@media (prefers-reduced-motion: reduce) { .fx-float { animation: none; } }
/* DEV: .avatar debe mostrar la foto de perfil de Google (img redonda, object-fit: cover); la inicial es solo el respaldo. */
/* v10 · cielo suave compartido (login) y tarjeta con sombra cálida */
.sky.soft { background: transparent; }
.sky.soft .sp { fill: #c99a72; opacity: 0.45; }
.bg-soft { background: radial-gradient(90% 70% at 20% 0%, rgba(169,200,234,0.45) 0%, rgba(169,200,234,0) 60%), linear-gradient(180deg, #f8f1e8 0%, #f3ede6 60%, #e9eff6 100%) !important; color: #1c1714; }
.bg-soft .crema-card { background: #fffdf8; box-shadow: 0 1px 2px rgba(90,58,42,0.08), 0 24px 48px rgba(90,58,42,0.14); border: 1px solid #ece2d3; }
/* v11 · login más cálido: crema tostado a la izquierda, latte detrás de la tarjeta */
.bg-soft { background: radial-gradient(90% 70% at 20% 0%, rgba(169,200,234,0.35) 0%, rgba(169,200,234,0) 60%), linear-gradient(180deg, #f2e4cf 0%, #ead8bf 70%, #e2d3c0 100%) !important; }
.bg-soft .latte-side { background: radial-gradient(120% 90% at 100% 0%, #d8b48f 0%, rgba(216,180,143,0) 60%), linear-gradient(160deg, #c99a72 0%, #a87b56 100%); }
.dg.phone.bg-soft { background: linear-gradient(180deg, #f2e4cf 0%, #ead8bf 46%, #c99a72 46%, #a87b56 100%) !important; }
.bg-soft .crema-card { background: #fbf5ea; border-color: rgba(90,58,42,0.12); box-shadow: 0 2px 4px rgba(60,36,22,0.10), 0 28px 56px rgba(60,36,22,0.28); }
/* v12 · accesibilidad en Compartidos: objetivos de 40-44 px, texto 14 px, foco visible */
.sp-btn { height: 40px; min-width: 44px; padding: 0 16px; font-size: 14px; border-radius: 10px; box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 2px 6px rgba(0,0,0,0.2); }
.sp-icon { width: 40px; height: 40px; border-radius: 10px; }
.sp-btn:focus-visible, .sp-icon:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sp-icon:hover { background: var(--surface); color: var(--ink); }
.sp-sub { color: var(--ink-muted); }
