/* LIF Ranges — vista del dashboard. Todo bajo .lif-rg para no tocar estilos del resto.
   Cyan del dashboard (#6ECFF0); superficies translúcidas para asentar sobre el fondo navy de la vista.
   Colores de acción con la convención de los solvers (fold azul, call verde, subidas rojas, all-in violeta). */
.lif-rg {
  --rg-surface: rgba(255, 255, 255, .045);
  --rg-surface-2: rgba(255, 255, 255, .08);
  --rg-line: rgba(110, 207, 240, .16);
  --rg-line-hover: rgba(110, 207, 240, .38);
  --rg-muted: #8fa6c4;
  --rg-cyan: #6ECFF0;
  --rg-cyan-ink: #04213a;
  --rg-fold: #4a6fa5;
  --rg-call: #3fae6a;
  --rg-r1: #e8604c;
  --rg-r2: #c8413a;
  --rg-r3: #a32d3a;
  --rg-r4: #86223a;
  --rg-allin: #6c35a0;
  --rg-cell-empty: rgba(0, 0, 0, .28);
  --rg-display: 'Bebas Neue', 'Oswald', Impact, sans-serif;
  --rg-body: Montserrat, system-ui, -apple-system, 'Segoe UI', sans-serif;

  position: relative;
  container: lifrg / inline-size;
  font-family: var(--rg-body);
  font-size: 14px;
  line-height: 1.45;
  max-width: 1400px;
}
.lif-rg *, .lif-rg *::before, .lif-rg *::after { box-sizing: border-box; }
.lif-rg [hidden] { display: none !important; }
.lif-rg button { font: inherit; color: inherit; }
.lif-rg :focus-visible { outline: 2px solid var(--rg-cyan); outline-offset: 2px; }

/* Fila de arriba: título "LIF Ranges" a la izquierda y los controles a la derecha, a la misma altura */
.lif-rg .rg-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 1.25rem; }
.lif-rg .rg-toolbar .view-header { margin: 0; }
.lif-rg .rg-toolbar .view-title { line-height: normal; }
.lif-rg.is-blocked > .rg-toolbar.rg-toolbar { display: flex; } /* sin acceso: queda el título (le gana a la regla de is-blocked de abajo) */
.lif-rg.is-blocked .rg-tools { display: none; }
.lif-rg .rg-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }

/* Paleta: botón desplegable */
.lif-rg .rg-palette { position: relative; flex: 0 0 auto; }
.lif-rg .rg-pal-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--rg-line); background: var(--rg-surface);
}
.lif-rg .rg-pal-btn:hover, .lif-rg .rg-pal-btn[aria-expanded="true"] { border-color: var(--rg-line-hover); }
.lif-rg .rg-pal-chev { color: var(--rg-muted); font-size: 10px; display: grid; place-items: center; }
.lif-rg .rg-pal-ico { color: var(--rg-cyan); font-size: 12px; display: grid; place-items: center; }
.lif-rg .rg-pal-txt { font-size: 12px; font-weight: 600; }
.lif-rg .rg-pal-btn[aria-expanded="true"] .rg-pal-chev { transform: rotate(180deg); }
.lif-rg .rg-sw4 { display: inline-flex; gap: 2px; }
.lif-rg .rg-sw4 i { display: block; width: 10px; height: 14px; border-radius: 3px; }
.lif-rg .rg-pal-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 180px; padding: 6px;
  border-radius: 10px; border: 1px solid var(--rg-line-hover); background: #0f2240; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.lif-rg .rg-pal-title { padding: 4px 8px 6px; color: var(--rg-muted); font-size: 11px; }
.lif-rg .rg-pal-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 7px;
  background: transparent; cursor: pointer; text-align: left; font-size: 13px; font-weight: 600;
}
.lif-rg .rg-pal-item:hover { background: var(--rg-surface-2); }
.lif-rg .rg-pal-item[aria-checked="true"] { background: rgba(110, 207, 240, .14); color: var(--rg-cyan); }

/* Estás mirando: la solución elegida (stack · modelo · ante) */
.lif-rg .rg-sol {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 12px; border-radius: 10px; border: 1px solid #1F3C72;
  background: linear-gradient(135deg, #0E2044, #0B1731);
}
.lif-rg .rg-sol-txt { display: grid; gap: 2px; min-width: 0; }
.lif-rg .rg-sol-k { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9FB3D1; }
.lif-rg .rg-sol-main { font-size: 20px; font-weight: 700; color: #fff; line-height: 1.3; }
.lif-rg .rg-sol-sub { font-size: 14px; color: #9FB3D1; }
.lif-rg .rg-sol-draft {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; vertical-align: 3px;
  border: 1px dashed var(--rg-line-hover); color: #9FB3D1; font-size: 12px; font-weight: 600;
}
.lif-rg .rg-sol-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px; border-radius: 10px; cursor: pointer;
  border: 1px solid #1F3C72; background: #0B1731; text-align: left;
}
.lif-rg .rg-sol-btn i { color: var(--rg-cyan); font-size: 18px; }
.lif-rg .rg-sol-btn:hover, .lif-rg .rg-sol-btn.is-open { border-color: var(--rg-cyan); }
.lif-rg .rg-sol-btn.is-open .rg-sol-bl { color: var(--rg-cyan); }
.lif-rg .rg-sol-btxt { display: grid; }
.lif-rg .rg-sol-bl { font-size: 15px; font-weight: 700; }
.lif-rg .rg-sol-bs { font-size: 12px; color: #9FB3D1; }
.lif-rg .rg-sol-btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* Tabla de risk premium (ICM): se abre y se cierra desde Estás mirando (handoff "Tabla de risk premium") */
/* Seis niveles: color lleno (--c, texto --tc) en la fila del que decide; tinte (--tint, borde --line) en el resto */
.lif-rg .rg-rp-b0 { --c: #8FA8C8; --tint: rgba(143, 168, 200, .34); --line: rgba(143, 168, 200, .6); --tc: #050B18; }
.lif-rg .rg-rp-b1 { --c: #3DDC97; --tint: rgba(61, 220, 151, .34); --line: rgba(61, 220, 151, .6); --tc: #050B18; }
.lif-rg .rg-rp-b2 { --c: #FFC49E; --tint: rgba(255, 196, 158, .34); --line: rgba(255, 196, 158, .6); --tc: #050B18; }
.lif-rg .rg-rp-b3 { --c: #FF7A45; --tint: rgba(255, 122, 69, .34); --line: rgba(255, 122, 69, .6); --tc: #050B18; }
.lif-rg .rg-rp-b4 { --c: #F0505A; --tint: rgba(240, 80, 90, .34); --line: rgba(240, 80, 90, .6); --tc: #050B18; }
.lif-rg .rg-rp-b5 { --c: #B01E3C; --tint: rgba(176, 30, 60, .34); --line: rgba(176, 30, 60, .6); --tc: #FFFFFF; }
.lif-rg .rg-rp-ink0 { color: #8FA8C8; }
.lif-rg .rg-rp-ink1 { color: #3DDC97; }
.lif-rg .rg-rp-ink2 { color: #FFC49E; }
.lif-rg .rg-rp-ink3 { color: #FF7A45; }
.lif-rg .rg-rp-ink4 { color: #F0505A; }
.lif-rg .rg-rp-ink5 { color: #B01E3C; }
.lif-rg .rg-rp-n { display: none; }
.lif-rg .rg-rp-cap, .lif-rg .rg-rp-note { margin: 0; font-size: 14px; line-height: 1.4; color: #9FB3D1; }
.lif-rg .rg-rp-note { font-size: 13px; line-height: 1.45; }
.lif-rg .rg-rp-even {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 14px;
  border-radius: 8px; background: #0B1731; border: 1px solid #1F3C72;
}
.lif-rg .rg-rp-even .rg-rp-num { font-size: 34px; }
.lif-rg .rg-rp-etxt { flex: 1 1 200px; font-size: 14px; line-height: 1.5; color: #fff; }
.lif-rg .rg-rp-body { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.lif-rg .rg-rp-left { flex: 0 1 auto; min-width: 0; max-width: 100%; display: flex; flex-direction: column; gap: 10px; }
.lif-rg .rg-rp-left:only-child { flex: 1 1 100%; }
.lif-rg .rg-rp-grid { --rp-lw: 60px; --rp-cw: 92px; display: flex; flex-direction: column; gap: 4px; }
.lif-rg .rg-rp-grid.has-st { --rp-lw: 70px; }
.lif-rg .rg-rp-body.is-big .rg-rp-grid { --rp-cw: 56px; }
.lif-rg .rg-rp-row {
  display: grid; grid-template-columns: var(--rp-lw) repeat(var(--rp-n), var(--rp-cw)); gap: 4px; align-items: center;
  padding: 3px; border-radius: 8px; border: 2px solid transparent;
}
.lif-rg .rg-rp-row.is-head { align-items: end; padding-top: 0; padding-bottom: 0; }
.lif-rg .rg-rp-row.is-dec { border-color: #6ECFF0; background: rgba(110, 207, 240, .06); }
.lif-rg .rg-rp-ch { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; padding-bottom: 2px; min-width: 0; }
.lif-rg .rg-rp-rh { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.lif-rg .rg-rp-pos { font: 18px/1 var(--rg-display); letter-spacing: .03em; color: #CFE3F5; white-space: nowrap; }
.lif-rg .rg-rp-ch.is-hi .rg-rp-pos, .lif-rg .rg-rp-row.is-dec .rg-rp-rh .rg-rp-pos { color: #6ECFF0; }
.lif-rg .rg-rp-st { font-size: 13px; font-weight: 600; color: #9FB3D1; }
.lif-rg .rg-rp-tag {
  display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border-radius: 3px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; background: #1F3C72; color: #CFE3F5; white-space: nowrap;
}
.lif-rg .rg-rp-tag.is-riv, .lif-rg .rg-rp-tag.is-dec { background: #6ECFF0; color: #050B18; }
.lif-rg .rg-rp-tag.is-empty { visibility: hidden; }
.lif-rg .rg-rp-cell { display: block; min-width: 0; }
.lif-rg .rg-rp-c {
  display: grid; place-items: center; width: 100%; height: 46px; min-width: 0; padding: 0; border-radius: 4px;
  border: 1px solid var(--line); background: var(--tint); color: #fff;
  font: 700 15px var(--rg-body); letter-spacing: -.02em; cursor: pointer;
}
.lif-rg .rg-rp-row.is-dec .rg-rp-c { background: var(--c); border-color: var(--c); color: var(--tc); }
.lif-rg .rg-rp-c.is-sel { position: relative; z-index: 2; box-shadow: 0 0 0 2px #121212, 0 0 0 4px #fff; }
.lif-rg .rg-rp-c.is-self, .lif-rg .rg-rp-row.is-dec .rg-rp-c.is-self { border-color: #1A3160; background: transparent; color: #5B6B85; cursor: default; }
.lif-rg .rg-rp-leg { display: grid; grid-template-columns: repeat(3, max-content); gap: 8px 16px; }
.lif-rg .rg-rp-li { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; color: #fff; }
.lif-rg .rg-rp-sw { flex: none; width: 18px; height: 18px; border-radius: 4px; background: var(--c); }
.lif-rg .rg-rp-lt { display: flex; flex-wrap: wrap; gap: 0 6px; min-width: 0; }
.lif-rg .rg-rp-lt span { color: #9FB3D1; }
.lif-rg .rg-rp-det, .lif-rg .rg-rp-card {
  display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 10px; background: #0B1731; border: 1px solid #1F3C72;
}
.lif-rg .rg-rp-det { flex: 1 1 0; min-width: 300px; box-sizing: border-box; }
.lif-rg .rg-rp-body.is-big .rg-rp-det { min-width: 220px; }
.lif-rg .rg-rp-duo { display: flex; gap: 12px; }
.lif-rg .rg-rp-card { flex: 1 1 0; min-width: 0; border: 2px solid #1F3C72; }
.lif-rg .rg-rp-card.is-dec { border-color: #6ECFF0; }
.lif-rg .rg-rp-dtitle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: #fff; }
.lif-rg .rg-rp-dtitle .rg-rp-tag { height: auto; padding: 2px 6px; }
.lif-rg .rg-rp-dval { display: flex; align-items: center; gap: 12px; }
.lif-rg .rg-rp-num { font: 48px/1 var(--rg-display); }
.lif-rg .rg-rp-card .rg-rp-num { font-size: 52px; }
.lif-rg .rg-rp-pill { padding: 4px 10px; border-radius: 999px; background: var(--c); color: var(--tc); font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.lif-rg .rg-rp-det p, .lif-rg .rg-rp-card p { margin: 0; }
.lif-rg .rg-rp-need, .lif-rg .rg-rp-dsum { font-size: 15px; line-height: 1.5; color: #fff; }
.lif-rg .rg-rp-card .rg-rp-need { font-size: 14px; }
.lif-rg .rg-rp-cover, .lif-rg .rg-rp-dhint { font-size: 14px; line-height: 1.5; color: #9FB3D1; }
.lif-rg .rg-rp-typ { font-size: 13px; line-height: 1.45; color: #9FB3D1; }
.lif-rg .rg-rp-dk { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9FB3D1; }

/* Tabla de premios del torneo (abajo del risk premium) y selector % · $ · US$ */
.lif-rg .rg-pz { margin-top: 20px; padding-top: 16px; border-top: 1px solid #1F3C72; max-width: 420px; }
.lif-rg .rg-pz-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lif-rg .rg-pz-head + * { margin-top: 10px; }
/* Premios: arranca cerrada; el título es el botón que la abre */
.lif-rg .rg-pz-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 14px; border-radius: 8px; cursor: pointer;
  border: 1px solid #1F3C72; background: #081226;
}
.lif-rg .rg-pz-toggle:hover, .lif-rg .rg-pz-toggle[aria-expanded="true"] { border-color: var(--rg-cyan); }
.lif-rg .rg-pz-sum { color: #A9BDD8; font-size: 14px; font-weight: 600; }
.lif-rg .rg-pz-toggle i { color: var(--rg-cyan); font-size: 13px; }
.lif-rg .rg-pz-title { margin: 0; font: 24px/1 var(--rg-display); letter-spacing: .03em; color: var(--rg-cyan); }
.lif-rg .rg-pz-units { display: inline-flex; padding: 3px; gap: 3px; border-radius: 9px; background: #0B1731; border: 1px solid #1F3C72; }
.lif-rg .rg-pz-u {
  min-width: 44px; min-height: 34px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: #9FB3D1;
  font-size: 14px; font-weight: 700; cursor: pointer;
}
.lif-rg .rg-pz-u[aria-pressed="true"] { background: #1481C0; color: #fff; }
.lif-rg .rg-pz-tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.lif-rg .rg-pz-tbl th {
  padding: 0 10px 6px; text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9FB3D1;
}
.lif-rg .rg-pz-tbl th:last-child, .lif-rg .rg-pz-tbl td:last-child { text-align: right; }
.lif-rg .rg-pz-tbl td { padding: 7px 10px; border-top: 1px solid #1A3160; color: #fff; font-variant-numeric: tabular-nums; }
.lif-rg .rg-pz-tbl tr.is-out td { color: #FF7A45; font-weight: 700; }
.lif-rg .rg-pz-note { margin: 8px 0 0; font-size: 13px; color: #9FB3D1; }

/* Panel Cambiar solución: una tarjeta por eje */
.lif-rg .rg-solpanel {
  margin-bottom: 12px; padding: 18px; border-radius: 10px; border: 1px dashed #2A5A9A; background: rgba(14, 32, 68, .35);
}
.lif-rg .rg-sp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.lif-rg .rg-sp-card { padding: 16px; border-radius: 10px; border: 1px solid #1F3C72; background: #0E1A33; }
.lif-rg .rg-sp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.lif-rg .rg-sp-head i { color: var(--rg-cyan); font-size: 18px; }
.lif-rg .rg-sp-title { margin: 0; flex: 1 1 auto; font: 28px/1 var(--rg-display); letter-spacing: .03em; color: var(--rg-cyan); }
.lif-rg .rg-sp-q {
  min-height: 36px; padding: 0 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid #1F3C72; background: transparent; color: #9FB3D1; font-size: 13px; font-weight: 600;
}
.lif-rg .rg-sp-q:hover, .lif-rg .rg-sp-q[aria-expanded="true"] { border-color: var(--rg-cyan); color: var(--rg-cyan); }
.lif-rg .rg-sp-help {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; font-size: 14px; line-height: 1.5;
  background: rgba(110, 207, 240, .06); border: 1px solid rgba(110, 207, 240, .25);
}
.lif-rg .rg-sp-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lif-rg .rg-sp-opt {
  display: grid; align-content: center; gap: 2px; min-height: 64px; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid #1F3C72; background: #0B1731; text-align: left;
}
.lif-rg .rg-sp-opt:hover { border-color: var(--rg-line-hover); }
.lif-rg .rg-sp-opt[aria-pressed="true"] { background: #6ECFF0; border-color: #6ECFF0; color: #050B18; }
.lif-rg .rg-sp-ol { font-size: 17px; font-weight: 700; }
.lif-rg .rg-sp-os { font-size: 14px; color: #9FB3D1; }
.lif-rg .rg-sp-opt[aria-pressed="true"] .rg-sp-os { color: #050B18; }
.lif-rg .rg-sp-os.is-warn { color: #FF7A45; }
.lif-rg .rg-sp-od { font-size: 12px; font-style: italic; opacity: .8; }
.lif-rg .rg-sp-foot { display: flex; justify-content: flex-end; margin-top: 16px; }
.lif-rg .rg-sp-done {
  min-height: 44px; padding: 4px 28px 0; border: 0; border-radius: 10px; cursor: pointer;
  background: #1481C0; color: #fff; font: 22px/1 var(--rg-display); letter-spacing: .05em;
  box-shadow: 0 0 0 4px rgba(20, 129, 192, .25);
}
.lif-rg .rg-sp-done:hover { background: #1890d6; }

/* Aviso naranja (combinación que no existe, spot más parecido, cambio de stack) */
.lif-rg .rg-notice {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid rgba(255, 122, 69, .45); background: rgba(255, 122, 69, .08);
}
.lif-rg .rg-notice > i { color: #FF7A45; font-size: 18px; }
.lif-rg .rg-notice-txt { margin: 0; flex: 1 1 220px; font-size: 15px; line-height: 1.45; }
.lif-rg .rg-notice-ok {
  min-height: 44px; padding: 0 16px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(255, 122, 69, .6); background: transparent; font-size: 14px; font-weight: 700;
}
.lif-rg .rg-notice-ok:hover { background: rgba(255, 122, 69, .14); }

/* Filtros */
.lif-rg .rg-filters { display: grid; gap: 8px; margin-bottom: 12px; }
.lif-rg .rg-frow { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 1px 2px; }
.lif-rg .rg-frow::-webkit-scrollbar { display: none; }
.lif-rg .rg-frow-label {
  flex: 0 0 auto; width: 72px; margin-right: 10px; color: #A9BDD8; font-size: 14px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase;
}
.lif-rg .rg-chip {
  flex: 0 0 auto; border: 1px solid var(--rg-line); background: var(--rg-surface); color: inherit;
  border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.lif-rg .rg-chip:hover { border-color: var(--rg-line-hover); }
.lif-rg .rg-chip[aria-pressed="true"] { background: var(--rg-cyan); border-color: var(--rg-cyan); color: var(--rg-cyan-ink); }
.lif-rg .rg-chip.is-stack {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 4px 18px 2px;
  font: 24px/1 var(--rg-display); letter-spacing: .04em; background: #0E2044; border-color: #1F3C72;
}
.lif-rg .rg-chip.is-stack[aria-pressed="true"] { background: var(--rg-cyan); border-color: var(--rg-cyan); color: var(--rg-cyan-ink); }
.lif-rg .rg-chip.is-desp i { font-size: 13px; }
.lif-rg .rg-chip.is-ev { margin-top: 4px; }
/* Stack que solo tiene borradores (vista previa de founders): borde punteado */
.lif-rg .rg-chip.is-draft { border-style: dashed; border-color: var(--rg-line-hover); }
.lif-rg .rg-chip.is-draft[aria-pressed="true"] { border-style: dashed; border-color: var(--rg-cyan-ink); }

/* Elegir el árbol: modelo ChipEV | ICM, Desparejos y lista ICM (handoff "ChipEV o ICM", versión 2A, 19/10) */
.lif-rg .rg-model { display: flex; align-items: center; gap: 0; }
/* Cada opción es un botón suelto, con su borde y espacio entre ellos (pedido de Richy 25/10: antes parecían uno solo) */
.lif-rg .rg-model-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(720px, 100%); }
.lif-rg .rg-model-opt {
  display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 10px 20px; border-radius: 8px; cursor: pointer;
  border: 1px solid #1F3C72; background: #081226; color: #A9BDD8; text-align: left;
}
.lif-rg .rg-model-seg:not(.is-ini) .rg-model-opt { justify-content: center; }
.lif-rg .rg-model-opt:hover { border-color: var(--rg-line-hover); }
.lif-rg .rg-model-opt[aria-pressed="true"] { background: #1481C0; border-color: #6ECFF0; color: #F4F9FF; }
.lif-rg .rg-model-ico {
  flex: 0 0 auto; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: #132A57; color: #8FA8C8; font-size: 20px;
}
.lif-rg .rg-model-opt[aria-pressed="true"] .rg-model-ico { background: #6ECFF0; color: #04182a; }
.lif-rg .rg-model-txt { display: grid; gap: 2px; min-width: 0; }
.lif-rg .rg-model-t { font: 28px/1 var(--rg-display); letter-spacing: 1px; }
.lif-rg .rg-model-s { font-size: 15px; font-weight: 500; }
.lif-rg .rg-model-ok { margin-left: auto; font-size: 22px; }
/* Avanzado: botoneras más chicas, Modelo más que Stack (pedido de Richy 19/10); Inicial queda grande */
.lif-rg .rg-filters.is-av .rg-model-seg { width: min(360px, 100%); gap: 8px; }
.lif-rg .rg-filters.is-av .rg-model-opt { min-height: 40px; padding: 4px 16px; }
.lif-rg .rg-filters.is-av .rg-model-t { font-size: 20px; }
.lif-rg .rg-filters.is-av .rg-chip.is-stack { min-height: 38px; padding: 3px 14px 1px; font-size: 20px; gap: 6px; }
.lif-rg .rg-zone { display: grid; gap: 8px; }

/* Soluciones propias (23/10): tercera opción del modelo, tarjetas de la solución (más de una, o staff) y un botón por rival */
.lif-rg .rg-model-seg.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(1080px, 100%); }
.lif-rg .rg-filters.is-av .rg-model-seg.is-3 { width: min(560px, 100%); }
.lif-rg .rg-prop-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lif-rg .rg-prop-chip { min-height: 48px; padding: 6px 20px; font-size: 17px; font-weight: 700; }
.lif-rg .rg-filters.is-av .rg-prop-chip { min-height: 38px; padding: 4px 14px; font-size: 15px; }
/* Tarjetas lo más chicas posible: solo el título (Richy, 26/10) */
.lif-rg .rg-prop-list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.lif-rg .rg-prop-card {
  display: grid; gap: 4px; max-width: 100%; padding: 8px 14px; border-radius: 10px; border: 1px solid #1A3160; background: #0B1731;
  color: #F4F9FF; text-align: left; cursor: pointer;
}
.lif-rg .rg-prop-card:hover { border-color: #2A5A9A; }
.lif-rg .rg-prop-card[aria-pressed="true"] {
  border: 2px solid #6ECFF0; padding: 7px 13px; background: linear-gradient(180deg, rgba(20, 129, 192, .30), rgba(20, 129, 192, .14));
}
.lif-rg .rg-prop-t { font-size: 16px; font-weight: 700; }
/* Staff: la tarjeta y, al lado, el ícono con los alumnos (como el "?" del EV: círculo chico en un botón de 44px) */
/* El recuadro lleva el borde y el fondo; adentro, el título (botón) y el círculo (Richy, 26/10) */
.lif-rg .rg-prop-item {
  display: inline-flex; align-items: center; max-width: 100%; padding-right: 4px; border-radius: 10px;
  border: 1px solid #1A3160; background: #0B1731;
}
.lif-rg .rg-prop-item:hover { border-color: #2A5A9A; }
.lif-rg .rg-prop-item.is-on {
  border: 2px solid #6ECFF0; padding-right: 3px; background: linear-gradient(180deg, rgba(20, 129, 192, .30), rgba(20, 129, 192, .14));
}
.lif-rg .rg-prop-item .rg-prop-card, .lif-rg .rg-prop-item .rg-prop-card[aria-pressed="true"] {
  padding: 7px 4px 7px 13px; border: 0; background: none;
}
.lif-rg .rg-prop-item:not(.is-on) .rg-prop-card { padding: 8px 4px 8px 14px; }
.lif-rg .rg-prop-who { position: relative; }
.lif-rg .rg-prop-whoq {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 6px; background: none; cursor: help;
}
.lif-rg .rg-prop-whoc {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; box-sizing: border-box;
  border: 1px solid #6ECFF0; color: #6ECFF0; font-size: 11px;
}
.lif-rg .rg-prop-whoq:hover .rg-prop-whoc, .lif-rg .rg-prop-whoq:focus-visible .rg-prop-whoc,
.lif-rg .rg-prop-whoq[aria-expanded="true"] .rg-prop-whoc { background: #6ECFF0; color: #050B18; }
.lif-rg .rg-prop-whoq:focus-visible { outline: 3px solid #6ECFF0; outline-offset: 2px; }
.lif-rg .rg-prop-tip {
  position: absolute; top: 40px; left: 0; z-index: 20; width: max-content; min-width: 200px; max-width: min(320px, calc(100vw - 48px));
  box-sizing: border-box; padding: 12px 16px; border-radius: 12px; background: rgba(13, 13, 13, .95);
  border: 1px solid rgba(110, 207, 240, .25); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .4); color: #e8eef7; font: 500 15px/1.5 var(--rg-body);
}
.lif-rg .rg-prop-tip-k { color: #A9BDD8; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.lif-rg .rg-prop-tip ul { margin: 4px 0 0; padding-left: 18px; }
.lif-rg .rg-guide-paso { font-weight: 800; } /* sobre la guía celeste: mismo color oscuro del texto */
/* Celular: las tres opciones una debajo de la otra, las tarjetas en una columna */
@container lifrg (max-width: 679px) {
  .lif-rg .rg-model-seg.is-3, .lif-rg .rg-filters.is-av .rg-model-seg.is-3 { grid-template-columns: 1fr; width: 100%; }
  .lif-rg .rg-prop-tip { left: auto; right: 0; } /* angosto: que no se salga por la derecha */
  .lif-rg .rg-prop-chip { flex: 1 1 auto; }
}

/* Stack (posición arriba, stack abajo) con la escala de intensidad: el color lo pone el JS (stackStyle) */
.lif-rg .rg-stk {
  display: inline-grid; place-items: center; min-width: 46px; height: 36px; padding: 0 6px; border-radius: 6px;
  font-size: 17px; font-weight: 700; white-space: nowrap;
}
.lif-rg .rg-stk.is-empty { background: transparent; border: 1px dashed #2A5A9A; color: #6E89AE; }
.lif-rg .rg-desp {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: fit-content; max-width: 100%;
  margin-left: 88px; padding: 14px 18px; border-radius: 10px; border: 1px solid #1A3160; background: #0B1731;
}
.lif-rg .rg-desp-t { margin-right: 6px; color: #A9BDD8; font-size: 14px; font-weight: 700; }
.lif-rg .rg-desp-seat { display: grid; justify-items: center; gap: 4px; }
.lif-rg .rg-desp-pos { font: 17px/1 var(--rg-display); letter-spacing: .03em; color: var(--rg-cyan); }
.lif-rg .rg-desp-t { display: grid; gap: 2px; }
.lif-rg .rg-desp-avg { color: #F4F9FF; font-size: 17px; }
/* Un solo "Desparejos": lista de árboles como la tabla ICM, sin la columna del torneo (pedido de Richy 21/10) */
.lif-rg .rg-desp-list { display: grid; gap: 10px; }
.lif-rg .rg-icm-cols.is-desp, .lif-rg .rg-icm-row.is-desp { grid-template-columns: 72px repeat(9, minmax(0, 1fr)); }

.lif-rg .rg-icm { display: grid; gap: 10px; }
.lif-rg .rg-icm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.lif-rg .rg-icm-title { margin: 0; color: #A9BDD8; font-size: 14px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.lif-rg .rg-icm-hint { color: #8FA8C8; font-size: 14px; }
.lif-rg .rg-icm-list { display: grid; gap: 8px; }
/* Torneo elegido: la lista se junta en una línea con "Cambiar torneo" (Inicial y Avanzado) */
.lif-rg .rg-icm-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap;
  padding: 8px 8px 8px 16px; border-radius: 10px; border: 1px solid #1A3160; background: #0B1731;
}
.lif-rg .rg-icm-strip-t { min-width: 0; font-size: 17px; font-weight: 700; }
/* Avanzado: tabla. Columnas: Prom. · 9 posiciones · Torneo */
.lif-rg .rg-icm-cols, .lif-rg .rg-icm-row {
  display: grid; grid-template-columns: 72px repeat(9, minmax(0, 1fr)) minmax(240px, 400px); gap: 6px; align-items: center;
}
.lif-rg .rg-icm-cols { padding: 0 13px; } /* = padding + borde de la fila, para que las columnas queden alineadas */
.lif-rg .rg-icm-ch { color: #A9BDD8; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.lif-rg .rg-icm-ct { padding-left: 14px; }
.lif-rg .rg-icm-cp { text-align: center; font: 19px/1 var(--rg-display); letter-spacing: .03em; color: var(--rg-cyan); }
.lif-rg .rg-icm-row, .lif-rg .rg-icm-card {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid #1A3160; background: #0B1731; cursor: pointer;
  text-align: left; transition: border-color .22s cubic-bezier(.2, .8, .25, 1), background .22s cubic-bezier(.2, .8, .25, 1);
}
.lif-rg .rg-icm-row { padding: 10px 12px; }
.lif-rg .rg-icm-row:hover, .lif-rg .rg-icm-card:hover { border-color: #2A5A9A; }
.lif-rg .rg-icm-row[aria-pressed="true"], .lif-rg .rg-icm-card[aria-pressed="true"] {
  border: 2px solid #6ECFF0; padding: 9px 11px;
  background: linear-gradient(180deg, rgba(20, 129, 192, .30), rgba(20, 129, 192, .14));
  box-shadow: 0 0 0 4px rgba(110, 207, 240, .12);
}
.lif-rg .rg-icm-row.is-draft:not([aria-pressed="true"]), .lif-rg .rg-icm-card.is-draft:not([aria-pressed="true"]) { border-style: dashed; }
.lif-rg .rg-icm-avg { display: flex; align-items: baseline; gap: 4px; }
.lif-rg .rg-icm-avgn { font: 30px/1 var(--rg-display); color: var(--rg-cyan); }
.lif-rg .rg-icm-avgu { display: none; color: #A9BDD8; font-size: 13px; }
.lif-rg .rg-icm-cells { display: contents; }
.lif-rg .rg-icm-cell { display: grid; min-width: 0; }
.lif-rg .rg-icm-cell .rg-stk { width: 100%; min-width: 0; height: 46px; padding: 0 2px; }
.lif-rg .rg-icm-cpos, .lif-rg .rg-icm-mesa, .lif-rg .rg-icm-tap { display: none; }
.lif-rg .rg-icm-tour { display: flex; align-items: center; gap: 12px; min-width: 0; padding-left: 14px; border-left: 1px solid #1A3160; }
.lif-rg .rg-icm-ttxt { display: grid; gap: 2px; min-width: 0; line-height: 1.3; }
.lif-rg .rg-icm-l1 { color: #fff; font-size: 15px; font-weight: 700; }
.lif-rg .rg-icm-left::before { content: ' · '; }
.lif-rg .rg-icm-l2 { color: #A9BDD8; font-size: 13px; }
.lif-rg .rg-icm-draft {
  justify-self: start; padding: 1px 8px; border-radius: 999px; border: 1px dashed var(--rg-line-hover);
  color: #9FB3D1; font-size: 13px; font-weight: 600;
}
.lif-rg .rg-icm-leg { display: flex; flex-wrap: wrap; gap: 10px 24px; color: #A9BDD8; font-size: 14px; }
.lif-rg .rg-icm-legi { display: inline-flex; align-items: center; gap: 6px; }
.lif-rg .rg-icm-legi .rg-stk { min-width: 40px; height: 28px; font-size: 14px; }
/* Insignia de la serie (después, el logo del mismo tamaño) */
.lif-rg .rg-badge {
  flex: 0 0 auto; display: inline-grid; place-items: center; min-width: 70px; height: 36px; padding: 2px 8px 0; border-radius: 6px;
  font: 20px/1 var(--rg-display); letter-spacing: 1px; color: #6ECFF0;
  background: rgba(110, 207, 240, .10); border: 1px solid rgba(110, 207, 240, .45);
}
.lif-rg .rg-badge.is-big { min-width: 86px; height: 44px; font-size: 24px; }
.lif-rg .rg-badge.is-none { background: transparent; border-style: dashed; border-color: #3D5F96; color: #CFE3F5; }
/* Inicial: tarjetas con la mesa en miniatura, de a dos */
.lif-rg .rg-icm.is-cards .rg-icm-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lif-rg .rg-icm-card { display: grid; gap: 12px; padding: 18px; border-radius: 10px; }
.lif-rg .rg-icm-card[aria-pressed="true"] { padding: 17px; }
.lif-rg .rg-icm-ctop { display: flex; align-items: center; gap: 14px; }
.lif-rg .rg-icm-ctxt { display: grid; gap: 2px; min-width: 0; }
.lif-rg .rg-icm-cl1 { color: #fff; font-size: 19px; font-weight: 700; line-height: 1.25; }
.lif-rg .rg-icm-cl2 { color: #A9BDD8; font-size: 14px; }
.lif-rg .rg-icm-ok { margin-left: auto; color: var(--rg-cyan); font-size: 26px; }
.lif-rg .rg-mini { position: relative; display: block; height: 230px; }
.lif-rg .rg-mini-felt {
  position: absolute; left: 9%; right: 9%; top: 18%; bottom: 18%; border-radius: 999px;
  border: 2px solid #244680; background: radial-gradient(ellipse at center, #132A57, #081226);
}
.lif-rg .rg-mini-mid {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center;
}
.lif-rg .rg-mini-k { color: #A9BDD8; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.lif-rg .rg-mini-v { font: 34px/1 var(--rg-display); color: var(--rg-cyan); }
.lif-rg .rg-mini-seat {
  position: absolute; transform: translate(-50%, 0); display: grid; justify-items: center; gap: 3px;
  min-width: 54px; padding: 5px 6px; border-radius: 6px; border: 1px solid rgba(110, 207, 240, .35);
}
.lif-rg .rg-mini-pos { font: 15px/1 var(--rg-display); letter-spacing: .03em; }
.lif-rg .rg-mini-stk { font-size: 15px; font-weight: 800; line-height: 1; }
/* Tabla ICM en pantallas medianas: el torneo pasa abajo de los stacks */
@container lifrg (max-width: 1099px) {
  .lif-rg .rg-icm-cols, .lif-rg .rg-icm-row { grid-template-columns: 72px repeat(9, minmax(0, 1fr)); }
  .lif-rg .rg-icm-cols .rg-icm-ct { display: none; }
  .lif-rg .rg-icm-tour { grid-column: 1 / -1; padding: 8px 0 0; border-left: 0; border-top: 1px solid #1A3160; }
}
/* Celular: modelo en una columna; tabla ICM → una tarjeta por árbol, la elegida se abre con los stacks */
@container lifrg (max-width: 679px) {
  .lif-rg .rg-model { flex-direction: column; align-items: stretch; gap: 6px; }
  .lif-rg .rg-model-seg { grid-template-columns: 1fr; width: 100%; }
  .lif-rg .rg-desp { margin-left: 0; width: 100%; }
  .lif-rg .rg-icm-cols { display: none; }
  .lif-rg .rg-icm-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 14px; border-radius: 10px; }
  .lif-rg .rg-icm-row[aria-pressed="true"] { padding: 13px; }
  .lif-rg .rg-icm-avg { order: 2; flex-direction: column; align-items: flex-end; gap: 0; }
  .lif-rg .rg-icm-avgu { display: inline; }
  .lif-rg .rg-icm-tour { order: 1; grid-column: auto; padding: 0; border: 0; align-items: flex-start; }
  .lif-rg .rg-icm-l1 { display: block; font-size: 16px; }
  .lif-rg .rg-icm-stage { display: block; }
  .lif-rg .rg-icm-left { color: #A9BDD8; font-size: 14px; font-weight: 500; }
  .lif-rg .rg-icm-left::before { content: none; }
  .lif-rg .rg-icm-mesa { display: inline; color: #A9BDD8; font-size: 14px; font-weight: 500; }
  .lif-rg .rg-icm-mesa::before { content: ' · '; }
  .lif-rg .rg-icm-row:not([aria-pressed="true"]) .rg-icm-l2 { display: none; }
  .lif-rg .rg-icm-row:not([aria-pressed="true"]) .rg-icm-tap { display: block; color: #8FA8C8; font-size: 13px; }
  .lif-rg .rg-icm-cells { order: 3; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 12px; border-top: 1px solid #1A3160; }
  .lif-rg .rg-icm-row:not([aria-pressed="true"]) .rg-icm-cells { display: none; }
  /* Desparejos: lo que distingue cada árbol son los stacks, así que se ven siempre (Prom. arriba) */
  .lif-rg .rg-icm-row.is-desp { grid-template-columns: 1fr; }
  .lif-rg .rg-icm-row.is-desp .rg-icm-avg { order: 0; flex-direction: row; align-items: baseline; gap: 4px; }
  .lif-rg .rg-icm-row.is-desp .rg-icm-cells { display: grid; grid-column: auto; }
  .lif-rg .rg-icm-cell { grid-template-columns: auto 1fr; align-items: center; gap: 6px; }
  .lif-rg .rg-icm-cell.is-out { display: none; }
  .lif-rg .rg-icm-cpos { display: block; min-width: 46px; font: 18px/1 var(--rg-display); color: var(--rg-cyan); }
  .lif-rg .rg-icm-cell .rg-stk { height: 36px; }
  .lif-rg .rg-icm.is-cards .rg-icm-list { grid-template-columns: 1fr; }
  .lif-rg .rg-icm-card { padding: 14px; }
  .lif-rg .rg-icm-card[aria-pressed="true"] { padding: 13px; }
  .lif-rg .rg-mini-seat { min-width: 44px; padding: 4px; }
}

/* Inicial | Avanzado: mismo formato chico y negro que "Colores", dos botones pegados; el elegido en blanco
   con una rayita celeste abajo (pedido de Richy 16/10: igual en todas las herramientas) */
.lif-rg .rg-nivel {
  display: inline-flex; align-self: center; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--rg-line); background: var(--rg-surface);
}
.lif-rg .rg-nv {
  padding: 5px 10px; border: 0; background: transparent; color: var(--rg-muted);
  font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.lif-rg .rg-nv + .rg-nv { border-left: 1px solid var(--rg-line); }
.lif-rg .rg-nv:hover { color: var(--rg-cyan); }
.lif-rg .rg-nv[aria-pressed="true"] { color: #fff; box-shadow: inset 0 -2px 0 var(--rg-cyan); }

/* Guía de Inicial, arriba de la mesa */
.lif-rg .rg-guide {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px;
  min-height: 62px; /* dos renglones: al cambiar el texto la mesa no se mueve */
  background: #6ECFF0; color: #050B18; font-size: 15px; font-weight: 700; line-height: 1.35;
}

/* Mesa */
.lif-rg .rg-table-wrap { position: relative; }
.lif-rg .rg-table {
  position: relative; width: 100%; aspect-ratio: 16 / 10.5; container-type: inline-size;
}
.lif-rg .rg-felt {
  position: absolute; inset: 15% 10%; border-radius: 50%; overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #123069 0%, #0E2044 55%, #0A1834 100%);
  border: 2px solid #2A6FA8;
  box-shadow: 0 0 0 10px rgba(14, 32, 68, .45), 0 18px 40px rgba(0, 0, 0, .40);
  display: grid; place-items: center;
}
/* Isotipo de LIF en el paño, detrás del bote (lif-isotipo.webp está en esta misma carpeta) */
.lif-rg .rg-felt::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 42%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: url('lif-isotipo.webp') center / contain no-repeat;
  opacity: .14; filter: saturate(.8); pointer-events: none; z-index: 0;
}
.lif-rg .rg-pot { position: relative; z-index: 1; display: grid; justify-items: center; line-height: 1; }
.lif-rg .rg-pot-lbl { font-size: clamp(9px, 2.6cqw, 15px); color: var(--rg-muted); }
.lif-rg .rg-pot-val { font: clamp(18px, 6cqw, 40px)/1 var(--rg-display); letter-spacing: .03em; color: var(--rg-cyan); margin-top: 2px; }
.lif-rg .rg-hint { margin-top: 6px; font-size: clamp(9px, 2.4cqw, 12px); color: var(--rg-muted); white-space: nowrap; }
.lif-rg .rg-felt { cursor: default; }

.lif-rg .rg-tseat {
  position: absolute; transform: translate(-50%, -50%); z-index: 2;
  min-width: clamp(44px, 16cqw, 104px); padding: 4px 6px 3px; border-radius: 8px; text-align: center;
  background: #1a2d4d; border: 1px solid rgba(110, 207, 240, .18); box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.lif-rg .rg-tseat button { all: unset; display: block; width: 100%; text-align: center; cursor: pointer; }
.lif-rg .rg-tpos { display: block; font: clamp(12px, 4cqw, 24px)/1 var(--rg-display); letter-spacing: .03em; white-space: nowrap; }
.lif-rg .rg-ps { display: none; }
/* Stack de cada asiento (solo en árboles con stacks desparejos: burbuja) */
.lif-rg .rg-tstk { display: block; margin-top: 2px; font: 700 clamp(8px, 2.5cqw, 13px)/1.2 var(--rg-body); letter-spacing: 0; color: var(--rg-cyan); }
.lif-rg .rg-tact { display: block; margin-top: 2px; min-height: 1.3em; font-size: clamp(8px, 2.5cqw, 14px); font-weight: 700; line-height: 1.3; white-space: nowrap; }
.lif-rg .rg-ttag { display: inline-block; padding: 0 5px; border-radius: 4px; color: #fff; }
.lif-rg .rg-tseat.is-folded { opacity: .45; }
.lif-rg .rg-tseat.is-folded .rg-tact { font-weight: 500; }
.lif-rg .rg-tseat.is-pending .rg-tact { font-weight: 600; color: #9FB3D1; } /* stack de los que faltan hablar */
.lif-rg .rg-tseat.is-clickable:hover { border-color: var(--rg-line-hover); opacity: 1; }
.lif-rg .rg-tseat.is-hero { background: var(--rg-cyan); border-color: var(--rg-cyan); color: var(--rg-cyan-ink); }
.lif-rg .rg-tseat.is-hero .rg-tstk { color: var(--rg-cyan-ink); }
.lif-rg .rg-tseat.is-nodata { opacity: .6; }
@keyframes rgPulse {
  0% { box-shadow: 0 0 0 0 rgba(110, 207, 240, .65), 0 2px 6px rgba(0, 0, 0, .35); }
  70% { box-shadow: 0 0 0 16px rgba(110, 207, 240, 0), 0 2px 6px rgba(0, 0, 0, .35); }
  100% { box-shadow: 0 0 0 0 rgba(110, 207, 240, 0), 0 2px 6px rgba(0, 0, 0, .35); }
}
@media (prefers-reduced-motion: no-preference) {
  .lif-rg .rg-tseat.is-pulse { animation: rgPulse 1.6s infinite; }
}

/* Botonera del que decide: siempre abajo de la mesa, de ancho completo (nunca tapa asientos).
   Si hay lugar, las opciones van en dos columnas. */
.lif-rg .rg-pop {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 6px;
  margin-top: 8px; padding: 8px; border-radius: 10px;
  background: rgba(8, 18, 38, .97); border: 1px solid #2A5A9A;
}
.lif-rg .rg-pop-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 4px; }
.lif-rg .rg-pop-tt { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
.lif-rg .rg-pop-nav { display: flex; gap: 4px; flex: none; }
.lif-rg .rg-ibtn {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 6px;
  background: none; color: #8fa6c4; font-size: 17px; cursor: pointer;
}
.lif-rg .rg-ibtn:hover, .lif-rg .rg-ibtn:focus-visible { color: #6ECFF0; background: rgba(110, 207, 240, .08); }
.lif-rg .rg-pop-pos { font: 22px/1 var(--rg-display); letter-spacing: .04em; color: #6ECFF0; }
.lif-rg .rg-pop-sub { color: #9FB3D1; font-size: 13px; font-weight: 600; }
.lif-rg .rg-pop-btn {
  display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid #1F3C72; background: #0E1A33;
  text-align: left; cursor: pointer;
}
.lif-rg .rg-pop-btn:hover { border-color: #6ECFF0; background: #13305E; }
.lif-rg .rg-pop-btn:focus-visible { outline: 3px solid #6ECFF0; outline-offset: 2px; }
.lif-rg .rg-pop-name { font-size: 15px; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lif-rg .rg-pop-pct { font-size: 14px; font-weight: 700; color: #9FB3D1; white-space: nowrap; }
.lif-rg .rg-tnote {
  margin: 8px 0 0; padding: 10px 14px; border-radius: 10px; border: 1px solid #2A5A9A; background: rgba(14, 32, 68, .6);
  color: #EAF3FB; font-size: 14px; font-weight: 600;
}

.lif-rg .rg-tchips {
  position: absolute; transform: translate(-50%, -50%); z-index: 1;
  display: flex; align-items: center; gap: 3px; font-size: clamp(9px, 2.6cqw, 15px); font-weight: 700; white-space: nowrap;
}
/* Pila de fichas (igual que el Constructor por spot, Richy 15/10): cada ficha asoma --cg por debajo; la de arriba con el punteado blanco. Nada de dorado. */
.lif-rg .rg-tchips i {
  --cs: clamp(10px, 3.2cqw, 14px); --cg: clamp(2px, .7cqw, 3px);
  position: relative; flex: none; width: var(--cs); height: calc(var(--cs) + (var(--n, 1) - 1) * var(--cg));
}
.lif-rg .rg-tchips i b { position: absolute; left: 0; top: calc((var(--n, 1) - 1 - var(--k, 0)) * var(--cg)); width: var(--cs); height: var(--cs); border-radius: 50%; box-sizing: border-box; border: 2px solid; }
.lif-rg .rg-tchips i b.v05 { background: #6ECFF0; border-color: #2b8fb5; }
.lif-rg .rg-tchips i b.v2 { background: #2FA6D6; border-color: #17698c; }
.lif-rg .rg-tchips i b.v5 { background: #2563EB; border-color: #163d94; }
.lif-rg .rg-tchips i b.v25 { background: #1e3a8a; border-color: #0f1f4d; }
.lif-rg .rg-tchips i b.is-top { border: 2px dashed #fff; }
.lif-rg .rg-tchips.is-dead { opacity: .45; }
.lif-rg .rg-dealer {
  position: absolute; transform: translate(-50%, -50%); z-index: 1;
  width: clamp(14px, 4.2cqw, 20px); height: clamp(14px, 4.2cqw, 20px); border-radius: 50%;
  display: grid; place-items: center; background: #f4f6fa; color: #0a1a2f; font-size: clamp(8px, 2.4cqw, 11px); font-weight: 800;
}
/* Volver (←) y Reiniciar (↺) en las esquinas de arriba de la mesa. Avanzado: solo íconos, iguales los dos.
   Inicial (.has-txt): "Volver" / "Reiniciar" con texto. */
.lif-rg .rg-back {
  position: absolute; left: 0; top: 0; z-index: 3; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; height: 44px; padding: 0; border: 0; border-radius: 6px; background: none; cursor: pointer;
  color: #8fa6c4; font-size: 18px;
}
.lif-rg .rg-reset { left: auto; right: 0; }
.lif-rg .rg-back[hidden] { display: none; }
.lif-rg .rg-back:hover, .lif-rg .rg-back:focus-visible { color: #6ECFF0; background: rgba(110, 207, 240, .08); }
.lif-rg .rg-back-txt { display: none; }
.lif-rg .rg-back.has-txt { padding: 0 8px; color: #6ECFF0; font-size: 15px; }
.lif-rg .rg-back.has-txt .rg-back-txt { display: inline; color: #c9d6e8; font: 700 15px var(--rg-body); }
.lif-rg .rg-back.has-txt:hover { background: none; }
.lif-rg .rg-back.has-txt:hover .rg-back-txt { color: #6ECFF0; }
.lif-rg .rg-back:focus-visible, .lif-rg .rg-ibtn:focus-visible { outline: 3px solid #6ECFF0; outline-offset: 2px; }
/* Mesa angosta + Inicial: con texto tapaban UTG+2 y LJ; van en una franja arriba de la mesa
   (siempre en Inicial, para que la mesa no salte cuando aparecen) */
.lif-rg .rg-table-wrap { container: rgwrap / inline-size; }
@container rgwrap (max-width: 429px) {
  .lif-rg .rg-table-wrap.is-txtnav > .rg-table { margin-top: 46px; }
}
/* Táctil: sin vista previa con el mouse, la fila de arriba de la grilla no necesita guardar lugar */
@media (hover: none) {
  .lif-rg .rg-fstate:empty { display: none; }
}

/* Grilla + panel */
.lif-rg .rg-stage { display: flex; flex-direction: column; gap: 14px; }
.lif-rg .rg-side { display: contents; }
.lif-rg .rg-guide, .lif-rg .rg-table-wrap { order: 0; }
.lif-rg .rg-grid-wrap { order: 2; }
.lif-rg .rg-detail { order: 3; }
.lif-rg .rg-grid-wrap { min-width: 0; }
.lif-rg .rg-grid { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 2px; aspect-ratio: 1 / 1; width: 100%; user-select: none; -webkit-user-select: none; }
.lif-rg .rg-grid.is-loading { opacity: .45; }
.lif-rg .rg-cell { position: relative; border: 0; padding: 0; border-radius: 3px; overflow: hidden; cursor: pointer; background: var(--rg-cell-empty); min-width: 0; }
.lif-rg .rg-fill { position: absolute; left: 0; right: 0; bottom: 0; display: flex; }
.lif-rg .rg-seg { height: 100%; }
.lif-rg .rg-lbl { position: absolute; left: 2px; top: 1px; z-index: 1; font-size: clamp(8px, 2.35vw, 12px); font-weight: 700; letter-spacing: -.02em; color: #fff; text-shadow: 0 0 2px rgba(0, 0, 0, .7); }
.lif-rg .rg-cell.is-out .rg-lbl { color: #4a6186; text-shadow: none; }
.lif-rg .rg-cell.is-sel::after { content: ''; position: absolute; inset: 0; z-index: 2; border: 2px solid var(--rg-cyan); border-radius: 3px; pointer-events: none; }
/* Grilla filtrada por una acción (vista previa o fijada): solo su franja; el resto, apagado */
.lif-rg .rg-grid.is-focus .rg-seg.is-off { background: #111B2F !important; }
.lif-rg .rg-grid.is-fold .rg-seg.is-on { background: #4E6390 !important; } /* fold suele ser oscuro: así se ve */
.lif-rg .rg-cell.is-dim { opacity: .22; }
.lif-rg .rg-cell.is-dim .rg-lbl { color: #5B6B85; text-shadow: none; }

/* Fila de abajo de la grilla: tarjetas Ver + menú Estrategia | EV con su "?" (handoff de limpieza, 12/10) */
.lif-rg .rg-arow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; }
.lif-rg .rg-arow .rg-actions { flex: 1 1 380px; min-width: 0; margin-top: 0; }
.lif-rg .rg-evbar { display: flex; align-items: center; gap: 0; margin-left: auto; align-self: flex-start; } /* arriba, alineado con las tarjetas (pedido de Richy 12/10) */
.lif-rg .rg-evbar[hidden] { display: none; }
.lif-rg .rg-evm, .lif-rg .rg-evq-wrap { position: relative; }
.lif-rg .rg-evm-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px; border: 0; background: none;
  color: #e8eef7; font: 700 16px var(--rg-body); cursor: pointer;
}
.lif-rg .rg-evm-btn:hover, .lif-rg .rg-evm-btn[aria-expanded="true"] { color: #6ECFF0; }
.lif-rg .rg-evm-menu {
  position: absolute; top: 46px; right: 0; z-index: 20; display: grid; min-width: 180px; padding: 6px; border-radius: 10px;
  background: rgba(13, 13, 13, .95); border: 1px solid rgba(110, 207, 240, .25);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 18px 40px rgba(0, 0, 0, .4);
}
.lif-rg .rg-evm-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: 6px; background: none; color: #e8eef7; font: 700 16px var(--rg-body); text-align: left; cursor: pointer;
}
.lif-rg .rg-evm-item:hover { background: rgba(110, 207, 240, .08); }
.lif-rg .rg-evm-item i { color: #6ECFF0; }
/* "?": círculo de 16px dentro de un botón de 44px (objetivo táctil) */
.lif-rg .rg-evq {
  display: grid; place-items: center; width: 44px; height: 44px; margin-left: -8px; padding: 0; border: 0; border-radius: 6px;
  background: none; cursor: help;
}
.lif-rg .rg-evq-c {
  display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; box-sizing: border-box;
  border: 1px solid #6ECFF0; color: #6ECFF0; font: 800 13px/1 var(--rg-body);
}
.lif-rg .rg-evq:hover .rg-evq-c, .lif-rg .rg-evq:focus-visible .rg-evq-c, .lif-rg .rg-evq[aria-expanded="true"] .rg-evq-c { background: #6ECFF0; color: #050B18; }
.lif-rg .rg-evtip {
  position: absolute; top: 40px; right: 6px; z-index: 20; width: 280px; max-width: calc(100vw - 48px); box-sizing: border-box;
  padding: 14px 16px; border-radius: 12px; background: rgba(13, 13, 13, .95); border: 1px solid rgba(110, 207, 240, .25);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 18px 40px rgba(0, 0, 0, .4);
  color: #e8eef7; font: 500 15px/1.5 var(--rg-body);
}
.lif-rg .rg-evm-btn:focus-visible, .lif-rg .rg-evm-item:focus-visible, .lif-rg .rg-evq:focus-visible { outline: 3px solid #6ECFF0; outline-offset: 2px; }

/* Modo EV: color por EV (pierde rojo · casi cero naranja · gana verde claro → verde fuerte; sin amarillo).
   El fondo y el color del texto los pone el JS en cada casilla. */
.lif-rg .rg-grid.is-ev .rg-cell { display: grid; place-content: center; justify-items: center; gap: 1px; color: inherit; }
.lif-rg .rg-grid.is-ev .rg-lbl { position: static; color: inherit; text-shadow: none; }
.lif-rg .rg-grid.is-ev .rg-cell.is-out .rg-lbl { color: #4a6186; }
.lif-rg .rg-evn { font-size: 11px; font-weight: 600; line-height: 1; }
.lif-rg .rg-cell.is-edge::before {
  content: ''; position: absolute; inset: 1px; border: 1.5px dashed #050B18; border-radius: 2px; pointer-events: none;
}

/* Arriba de la grilla: qué se está viendo (vacía sin filtro; guarda el alto para que la grilla no salte con la vista previa) */
.lif-rg .rg-fstate { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 44px; margin-bottom: 6px; }
.lif-rg .rg-fs-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.lif-rg .rg-fs-pill.is-preview { border: 1px dashed #2A5A9A; color: #6ECFF0; }
.lif-rg .rg-fs-pill.is-pinned { background: #6ECFF0; color: #050B18; }
.lif-rg .rg-fs-clear {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 8px;
  border: 1px solid #2A5A9A; background: transparent; color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.lif-rg .rg-fs-clear:hover { border-color: #6ECFF0; }


/* Tarjetas "Ver" abajo de la matriz (filtran la grilla; separadas de la botonera de la mesa, que es para jugar) */
.lif-rg .rg-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 6px; margin-top: 12px; }

/* Tarjeta de acción: la tarjeta entera es el botón "Ver" (fija el filtro). Se juega desde la mesa. */
.lif-rg .rg-acard {
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: center;
  border: 1px solid #1F3C72; background: #0E1A33; border-radius: 10px;
}
.lif-rg .rg-acard.is-preview { border-color: #1481C0; background: rgba(20, 129, 192, .12); }
.lif-rg .rg-acard.is-pinned { border-color: #6ECFF0; background: rgba(110, 207, 240, .10); box-shadow: inset 0 0 0 1px #6ECFF0; }
.lif-rg .rg-aview {
  display: grid; grid-template-columns: 50px minmax(0, 1fr); align-items: center; gap: 8px;
  min-width: 0; min-height: 68px; padding: 8px 8px 8px 4px; border: 0; border-radius: 10px;
  background: transparent; text-align: left; cursor: pointer;
}
.lif-rg .rg-eye { display: grid; justify-items: center; gap: 3px; color: #9FB3D1; font-size: 13px; font-weight: 700; }
.lif-rg .rg-eye i { font-size: 18px; }
.lif-rg .rg-acard.is-preview .rg-eye, .lif-rg .rg-acard.is-pinned .rg-eye { color: #6ECFF0; }
.lif-rg .rg-ainfo { display: grid; gap: 4px; min-width: 0; }
.lif-rg .rg-al1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lif-rg .rg-al2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.lif-rg .rg-sw { flex: none; width: 12px; height: 12px; border-radius: 3px; }
.lif-rg .rg-name { font-size: 16px; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lif-rg .rg-pct { font: 22px/1 var(--rg-display); letter-spacing: .03em; color: #fff; }
.lif-rg .rg-cmb { color: #9FB3D1; font-size: 13px; font-weight: 500; white-space: nowrap; }
.lif-rg .rg-aview:focus-visible, .lif-rg .rg-fs-clear:focus-visible { outline: 3px solid #6ECFF0; outline-offset: 2px; }

/* "Abrir en…": salidas a otras herramientas (mismo estilo que Colores). Cada opción: ícono, nombre y qué se carga. */
.lif-rg .rg-out-menu { min-width: 260px; max-width: min(340px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow-y: auto; }
.lif-rg .rg-out-item { align-items: flex-start; padding: 9px 8px; }
.lif-rg .rg-out-ico { flex: 0 0 18px; margin-top: 2px; color: var(--rg-cyan); text-align: center; }
.lif-rg .rg-out-txt { display: grid; gap: 2px; min-width: 0; }
.lif-rg .rg-out-line { color: #9FB3D1; font-size: 13px; font-weight: 500; }
.lif-rg .rg-out-item:disabled { cursor: not-allowed; background: transparent; }
.lif-rg .rg-out-item:disabled .rg-out-ico, .lif-rg .rg-out-item:disabled .rg-pal-name { color: #6F84A8; }
/* Grupo con varios spots: la fila abre el principal; "Ver N spots más" despliega los otros abajo, en el mismo menú */
.lif-rg .rg-out-morebtn {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 4px 34px; padding: 6px 8px; border: 0; border-radius: 7px;
  background: transparent; color: var(--rg-cyan); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.lif-rg .rg-out-morebtn:hover { background: var(--rg-surface-2); }
.lif-rg .rg-out-chev { font-size: 11px; transition: transform .15s; }
.lif-rg .rg-out-morebtn.is-open .rg-out-chev { transform: rotate(180deg); }
.lif-rg .rg-out-sub { display: grid; gap: 2px; margin: 0 0 4px 34px; padding-left: 8px; border-left: 2px solid rgba(110, 207, 240, .35); }
.lif-rg .rg-out-subitem { padding: 8px; }
.lif-rg .rg-out-subitem .rg-out-line { color: #DCE7F5; }

.lif-rg .rg-detail { border: 1px solid var(--rg-line); border-radius: 10px; padding: 12px; background: var(--rg-surface); min-height: 96px; }
.lif-rg .rg-hand { font: 700 28px/1.1 var(--rg-body); letter-spacing: -.01em; }
.lif-rg .rg-sub { color: var(--rg-muted); font-size: 12px; margin: 2px 0 10px; }
.lif-rg .rg-drow { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; margin-bottom: 8px; }
.lif-rg .rg-dn { font-weight: 600; }
.lif-rg .rg-dv { font-weight: 700; }
.lif-rg .rg-ev { margin-left: 10px; color: #fff; font-size: 14px; font-weight: 700; }
.lif-rg .rg-ev.is-neg { color: #9FB3D1; }
.lif-rg .rg-drow.is-best { margin-left: -6px; margin-right: -6px; padding: 4px 6px; border-radius: 6px; background: rgba(110, 207, 240, .08); }
.lif-rg .rg-best {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; vertical-align: 1px;
  background: #6ECFF0; color: #050B18; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.lif-rg .rg-indif {
  margin: 4px 0 0; padding: 10px 12px; border-radius: 8px; font-size: 14px; line-height: 1.45;
  background: rgba(110, 207, 240, .06); border: 1px dashed rgba(110, 207, 240, .4);
}
.lif-rg .rg-track { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--rg-cell-empty); overflow: hidden; }
.lif-rg .rg-track i { display: block; height: 100%; }

/* Mensaje de error / sin acceso: reemplaza el contenido de la herramienta */
.lif-rg.is-blocked > :not(.rg-msg) { display: none; }
.lif-rg .rg-msg { max-width: 420px; margin: 32px auto; text-align: center; }
.lif-rg .rg-msg h3 { font: 30px/1 var(--rg-display); letter-spacing: .03em; margin: 0 0 10px; }
.lif-rg .rg-msg p { color: var(--rg-muted); margin: 0 0 16px; }

@container lifrg (max-width: 519px) {
  .lif-rg .rg-hint { display: none; }
  /* Celular: Inicial | Avanzado corto a la izquierda; Colores y Abrir en… a su derecha (pedido de Richy 14/10) */
  .lif-rg .rg-tools { flex: 1 1 100%; flex-direction: row; align-items: center; gap: 6px 8px; }
  .lif-rg .rg-nivel { margin-right: auto; }
  /* Celular: Stack en grilla de 5 columnas, botones grandes; Estás mirando y su botón a lo ancho */
  .lif-rg .rg-frow { display: grid; grid-template-columns: repeat(5, 1fr); overflow: visible; }
  .lif-rg .rg-frow-label { grid-column: 1 / -1; width: auto; }
  .lif-rg .rg-chip.is-stack { min-height: 44px; font-size: 20px; padding: 8px 4px 6px; }
  .lif-rg .rg-chip.is-desp { grid-column: span 2; }
  .lif-rg .rg-sol-main { font-size: 18px; }
  .lif-rg .rg-sol-btns { width: 100%; }
  .lif-rg .rg-sol-btn { width: 100%; }
  /* Modo EV en celular: solo color, sin número */
  .lif-rg .rg-evn { display: none; }
  .lif-rg .rg-grid.is-ev .rg-lbl { font-size: 9px; }
  .lif-rg .rg-solpanel { padding: 12px; }
  .lif-rg .rg-sp-card { padding: 12px; }
}
/* Tabla de risk premium angosta (celular): columnas que se reparten el ancho, sin scroll horizontal; el 9×9 sin stacks
   ni etiquetas (con 3 jugadores sí van ABRIÓ / PAGÓ); detalle debajo de la tabla; nombres cortos UTG1 / UTG2 */
@container lifrg (max-width: 679px) {
  .lif-rg .rg-rp-w { display: none; }
  .lif-rg .rg-rp-n { display: inline; }
  .lif-rg .rg-rp-body { flex-direction: column; align-items: stretch; gap: 16px; }
  .lif-rg .rg-rp-left { width: 100%; }
  .lif-rg .rg-rp-det, .lif-rg .rg-rp-body.is-big .rg-rp-det { min-width: 0; }
  .lif-rg .rg-rp-grid, .lif-rg .rg-rp-grid.has-st { --rp-lw: 44px; gap: 2px; }
  .lif-rg .rg-rp-body.is-big .rg-rp-grid { --rp-lw: 34px; }
  .lif-rg .rg-rp-row { grid-template-columns: var(--rp-lw) repeat(var(--rp-n), minmax(0, 1fr)); gap: 2px; }
  .lif-rg .rg-rp-pos { font-size: 14px; }
  .lif-rg .rg-rp-st, .lif-rg .rg-rp-rh .rg-rp-tag, .lif-rg .rg-rp-body.is-big .rg-rp-ch .rg-rp-tag { display: none; }
  .lif-rg .rg-rp-c { height: 34px; font-size: 12px; }
  .lif-rg .rg-rp-leg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lif-rg .rg-rp-duo { flex-direction: column; }
}
/* Celular chico: los tres no entran en una fila; Colores y Abrir en… uno arriba del otro, a la derecha de Inicial | Avanzado */
@container lifrg (max-width: 399px) {
  .lif-rg .rg-tools { display: grid; grid-template-columns: auto auto; justify-content: space-between; }
  .lif-rg .rg-nivel { grid-row: 1 / span 2; margin-right: 0; }
  .lif-rg .rg-tools:has(> .rg-palette[hidden]) .rg-nivel { grid-row: auto; }
  .lif-rg .rg-tools > .rg-palette { grid-column: 2; }
  .lif-rg .rg-tools .rg-pal-btn { width: 100%; }
}
@container lifrg (max-width: 380px) {
  .lif-rg .rg-pl { display: none; }
  .lif-rg .rg-ps { display: inline; }
}
/* Pantallas anchas: Inicial | Avanzado, Colores y Abrir en… en una sola fila (apilados dejaban un hueco arriba) */
@container lifrg (min-width: 700px) {
  .lif-rg .rg-tools { flex-direction: row; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
}
@container lifrg (min-width: 860px) {
  /* Matriz con ancho propio (lo más grande que entre de alto en pantalla, hasta 56 % del ancho)
     y la columna de la mesa ocupa todo el resto: sin espacio vacío en el medio */
  .lif-rg .rg-stage { display: flex; flex-direction: row; gap: 24px; align-items: flex-start; }
  .lif-rg .rg-grid-wrap { order: 0; flex: 0 0 auto; width: min(56%, max(440px, calc(100vh - 280px))); }
  .lif-rg .rg-side { display: grid; gap: 12px; align-content: start; flex: 1 1 0; min-width: 0; order: 1; }
  .lif-rg .rg-lbl { font-size: clamp(11px, 1.05cqw, 15px); }
}
@media (prefers-reduced-motion: no-preference) {
  .lif-rg .rg-grid { transition: opacity .15s; }
  .lif-rg .rg-seg { transition: opacity .12s; }
  /* ChipEV | ICM: la zona nueva entra con fade y 8px hacia arriba; el selector no se mueve */
  .lif-rg .rg-zone.is-enter { animation: rg-zone-in .35s cubic-bezier(.2, .8, .25, 1); }
  .lif-rg .rg-model-opt { transition: background .22s cubic-bezier(.2, .8, .25, 1), border-color .22s cubic-bezier(.2, .8, .25, 1), color .22s; }
}
@keyframes rg-zone-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
