
/* ═══════════ ROMO · sistema visual común (ROMO Planos y ROMO Proyectos) ═══════════
   Fondos neutros, azul corporativo para acciones y selección, bordes suaves, sombras discretas.
   Iconos: una sola familia (trazo 2 px, extremos redondeados, rejilla de 24). */
:root {
  --bg: #f1f2ef;
  --paper: var(--bg);
  --surface: #ffffff;
  --raised: #ffffff;
  --subtle: #f7f8f6;
  --sunken: #e9ebe7;
  --ink: #1b211f;
  --ink-2: #47504b;
  --ink-3: #636c66;
  --line: #e5e8e3;
  --line-strong: #c6ccc5;
  --accent: #3d5a73;
  --accent-hover: #2c4458;
  --accent-ink: #ffffff;
  --accent-soft: #e9f0fa;
  --accent-line: #b8cce9;
  --cota: #c8102e;
  --danger: #b3261e;
  --danger-soft: #fcecea;
  --ok: #23714a;
  --ok-soft: #e4f2e9;
  --warn: #8a5300;
  --warn-soft: #fcf3e2;
  --warn-line: #ebd2a4;
  --sheet: #ffffff;
  --d-compacta: #b5523b;
  --d-comoda: #b8862b;
  --d-amplia: #4f7a94;
  --d-premium: #74597f;
  --f-display: "Archivo", "Arial Narrow", Helvetica, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --f-mono: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --f-code: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 14px;
  --sh-1: 0 1px 2px rgba(20, 28, 24, .04), 0 1px 1px rgba(20, 28, 24, .02);
  --sh-2: 0 4px 14px rgba(20, 28, 24, .08);
  --sh-3: 0 18px 50px rgba(20, 28, 24, .24);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 26%, transparent);
  --h: 38px;
  --h-sm: 32px;
  --maxw: 1680px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121614; --surface: #1a1f1d; --raised: #1f2523; --subtle: #171c1a; --sunken: #262c29; --ink: #e6ebe7; --ink-2: #b6bfb9; --ink-3: #95a098;
    --line: #2d3431; --line-strong: #46504b; --accent: #7eb0ee; --accent-hover: #9cc3f3; --accent-ink: #0d1a2b; --accent-soft: #1c2a3c; --accent-line: #35516f;
    --cota: #ff6b7d; --danger: #ff8a80; --danger-soft: #3a1d1b; --ok: #6cc391; --ok-soft: #17291f; --warn: #f0b04f; --warn-soft: #2e2617; --warn-line: #5a4720; --sheet: #ffffff;
    --d-compacta: #ff7a66; --d-comoda: #f5ad3c; --d-amplia: #6db3f0; --d-premium: #c08ae0;
    --sh-1: 0 1px 2px rgba(0, 0, 0, .3); --sh-2: 0 2px 10px rgba(0, 0, 0, .35); --sh-3: 0 18px 50px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121614; --surface: #1a1f1d; --raised: #1f2523; --subtle: #171c1a; --sunken: #262c29; --ink: #e6ebe7; --ink-2: #b6bfb9; --ink-3: #95a098;
  --line: #2d3431; --line-strong: #46504b; --accent: #7eb0ee; --accent-hover: #9cc3f3; --accent-ink: #0d1a2b; --accent-soft: #1c2a3c; --accent-line: #35516f;
  --cota: #ff6b7d; --danger: #ff8a80; --danger-soft: #3a1d1b; --ok: #6cc391; --ok-soft: #17291f; --warn: #f0b04f; --warn-soft: #2e2617; --warn-line: #5a4720; --sheet: #ffffff;
  --d-compacta: #ff7a66; --d-comoda: #f5ad3c; --d-amplia: #6db3f0; --d-premium: #c08ae0;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .3); --sh-2: 0 2px 10px rgba(0, 0, 0, .35); --sh-3: 0 18px 50px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* ── base ── */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.app[data-mode="conv"] .pro { display: none !important; }
html, body { background: var(--bg); color: var(--ink); }
body { margin: 0; font-family: var(--f-body); font-variant-numeric: tabular-nums; font-size: 14px; line-height: 1.45; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 12px 32px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; text-wrap: balance; letter-spacing: -0.005em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
svg.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mut { color: var(--ink-3); }

/* ── botones ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: var(--h); padding: 0 14px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: var(--r); font-weight: 500; font-size: 14px; line-height: 1.2; cursor: pointer; text-align: center; transition: background-color .12s, border-color .12s, color .12s, box-shadow .12s; }
.btn:hover:not(:disabled) { background: var(--subtle); border-color: var(--ink-3); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover:not(:disabled) { background: var(--sunken); color: var(--ink); border-color: transparent; }
.btn.small { min-height: var(--h-sm); padding: 0 10px; font-size: 13px; border-radius: 7px; gap: 5px; }
.btn.icon { padding: 0; width: var(--h); }
.btn.small.icon { width: var(--h-sm); }
.btn.danger { color: var(--danger); }
.btn.danger:hover:not(:disabled) { background: var(--danger-soft); border-color: var(--danger); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn, .chip, .fc, .mc, .tc, .lc, .sz, .opt { transition: background-color .14s, border-color .14s, box-shadow .14s, color .14s, transform .14s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn svg.ic { width: 17px; height: 17px; }
.btn.small svg.ic { width: 16px; height: 16px; }
.btn.wide { width: 100%; }
.linkbtn { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 2px 0; font-size: 13px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.linkbtn:hover { text-decoration: underline; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* ── campos ── */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); min-height: var(--h); padding: 0 10px; color: var(--ink); min-width: 0; transition: border-color .12s, box-shadow .12s; }
textarea { padding: 8px 10px; font-family: var(--f-code); font-size: 12.5px; resize: vertical; line-height: 1.45; width: 100%; }
select { padding-right: 6px; cursor: pointer; }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: .85; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; }
input[type=range] { accent-color: var(--accent); width: 100%; }
input[type=number] { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label, .lbl { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.field input, .field select { width: 100%; }
.hint { color: var(--ink-3); font-size: 12.5px; margin: 0; line-height: 1.45; }
.hint.err { color: var(--warn); }
.hint.warn { color: var(--warn); }
.status { font-size: 13px; color: var(--ink-2); min-height: 1em; margin: 0; }
.status:empty { display: none; }
.status.err { color: var(--danger); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; min-height: 28px; }
.fh { display: block; color: var(--ink-3); font-size: 12px; line-height: 1.35; margin-top: 2px; font-weight: 400; }

/* control segmentado (opciones excluyentes) */
.seg { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--sunken); border-radius: 10px; }
.seg button { flex: 1 1 auto; min-height: 30px; border: 0; background: transparent; color: var(--ink-2); padding: 4px 10px; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 500; line-height: 1.2; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"], .seg button[aria-checked="true"] { background: var(--surface); color: var(--accent); font-weight: 600; box-shadow: var(--sh-2); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; font-size: 13px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 3px 12px; cursor: pointer; line-height: 1.25; text-align: left; transition: border-color .12s, background-color .12s; }
.chip:hover:not(:disabled) { border-color: var(--accent); }
.chip.sel { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.chip .n { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.chip.sel .n { color: var(--accent); }
.tag { font-family: var(--f-body); font-size: 11.5px; font-weight: 600; color: var(--ok); background: var(--ok-soft); padding: 1px 8px; border-radius: 999px; }
.brandtag { display: inline-flex; align-items: center; vertical-align: 1px; font-family: var(--f-body); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: #6d5c45; background: #f1ebe2; border-radius: 4px; padding: 1px 6px; line-height: 1.5; }
.brandtag.rom { color: var(--ink-2); background: var(--sunken); }
.newtag { display: inline-flex; align-items: center; vertical-align: 1px; font-family: var(--f-body); font-size: 10.5px; font-weight: 700; letter-spacing: .05em; color: #fff; background: var(--ok); border-radius: 4px; padding: 1px 6px; line-height: 1.5; }

/* plegables */
details.why { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
details.why > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: 12.5px; min-height: 26px; }
details.why > summary::-webkit-details-marker { display: none; }
details.why > summary::before { content: "?"; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 10.5px; font-weight: 800; line-height: 1; }
details.why[open] > summary { margin-bottom: 4px; }
details.why > div { border-left: 3px solid var(--accent-line); padding: 2px 0 2px 10px; line-height: 1.5; }
details.why > div p { margin: 0 0 4px; }
details.why ul { margin: 4px 0 0; padding-left: 16px; }

/* ═══════════ cabecera ═══════════ */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; max-width: var(--maxw); margin: 0 auto 12px; }
.brand { display: flex; align-items: center; gap: 8px 14px; min-width: 0; margin-right: auto; }
.brand .rclogo { display: block; flex: none; height: 30px; color: var(--ink); padding-right: 14px; border-right: 1px solid var(--line-strong); }
.brand .rclogo svg { display: block; height: 100%; width: auto; }
.brand .bt { display: flex; align-items: baseline; gap: 2px 12px; flex-wrap: wrap; min-width: 0; }
.brand h1 { font-size: 23px; font-weight: 800; white-space: nowrap; line-height: 1.1; }
.brand h1 span { color: var(--accent); }
.brand p { margin: 0; color: var(--ink-3); font-size: 13px; max-width: 46ch; }
.romo-ico { display: inline-block; width: 1.05em; height: 1.05em; margin-right: .3em; color: var(--accent); vertical-align: -0.17em; }
.romo-ico svg { display: block; width: 100%; height: 100%; }
.modewrap { position: relative; }
body[data-edition="proyectos"] .modewrap { display: none; }
.modes { display: flex; gap: 2px; padding: 3px; background: var(--sunken); border-radius: 11px; }
.modes button { border: 0; background: transparent; color: var(--ink-2); padding: 5px 14px 5px 11px; min-height: 40px; border-radius: 8px; cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 9px; text-align: left; line-height: 1.15; transition: background-color .12s, color .12s; }
.modes button > svg.ic { width: 20px; height: 20px; }
.modes button .mt { display: flex; flex-direction: column; }
.modes button small { font-weight: 400; font-size: 11.5px; opacity: .85; }
.modes button:hover { color: var(--ink); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.modes button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: var(--sh-2); }
.modes .mname { display: inline-flex; align-items: center; gap: 5px; }
.modes .lk { width: 13px; height: 13px; display: none; }
.modes button.locked { color: var(--ink-3); }
.modes button.locked .lk { display: inline-block; }
.modes button.justopen { animation: cfgopen 1.2s ease-out 2; }
@keyframes cfgopen { 0% { box-shadow: inset 0 0 0 0 var(--accent); background: var(--accent-soft); } 60% { box-shadow: inset 0 0 0 3px var(--accent); background: var(--accent-soft); } 100% { box-shadow: inset 0 0 0 0 var(--accent); } }
.modehint { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(420px, calc(100vw - 32px)); z-index: 30; background: var(--ink); color: var(--bg); padding: 9px 13px; border-radius: 10px; font-size: 13px; line-height: 1.4; box-shadow: var(--sh-3); }
.modehint[hidden] { display: none; }
.toolsr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.project { display: flex; align-items: center; gap: 8px; }
.project input { width: 210px; max-width: 60vw; }
body[data-mode="proj"] .project { display: none; }
.histbtns { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.histbtns .btn { white-space: nowrap; }
.histbtns .n:not(:empty) { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 0 6px; font-size: 11.5px; }
.histmsg { font-size: 12.5px; color: var(--ok); white-space: nowrap; }
.histmsg.err { color: var(--warn); white-space: normal; max-width: 260px; }

/* ═══════════ rejilla principal ═══════════ */
.app { display: grid; grid-template-columns: minmax(340px, 410px) minmax(0, 1fr); gap: 16px; max-width: var(--maxw); margin: 0 auto; align-items: start; }
.app[data-mode="config"] { grid-template-columns: minmax(330px, 380px) minmax(0, 1fr); }
.app[data-mode="proj"] { grid-template-columns: minmax(290px, 330px) minmax(0, 1fr); }

/* ═══════════ panel lateral (configurador y proyectos) ═══════════ */
.rail { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.sec > summary, .sec > .sh { list-style: none; padding: 12px 14px; display: flex; align-items: center; gap: 10px; min-height: 48px; }
.sec > summary { cursor: pointer; border-radius: var(--r-lg); }
.sec > summary:hover { background: var(--subtle); }
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary > svg.ic, .sec > .sh > svg.ic { color: var(--accent); }
.sec > summary h2, .sec > .sh h2 { font-size: 15px; font-weight: 700; flex: 1; min-width: 0; }
.sec > summary small, .sec > .sh small { color: var(--ink-3); font-size: 12px; font-family: var(--f-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48%; }
.sec > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg) translate(-2px, -2px); flex: none; margin: 0 2px 0 4px; transition: transform .15s; }
.sec[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.sec[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.sec .body { padding: 2px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.sec .lead { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.sec .blk { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 9px; }
.sec .body > .blk:first-child { border-top: 0; padding-top: 0; }
.sec .blk > h3 { margin: 0; font-size: 13.5px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.sec .blk > h3 small { margin-left: auto; font-family: var(--f-mono); font-weight: 400; font-size: 12px; color: var(--ink-3); }
.sec .blk[hidden] { display: none; }
.sec label.check:has(> span) { align-items: flex-start; }
.sec label.check:has(> span) > input { margin-top: 2px; }
.sec label.check > span { display: flex; flex-direction: column; }
.sec .hint b { color: var(--ink-2); font-weight: 600; }
details.sub { border: 1px solid var(--line); border-radius: var(--r); padding: 0 10px; background: var(--subtle); }
details.sub > summary { cursor: pointer; padding: 8px 0; font-size: 13px; font-weight: 600; color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 8px; min-height: 36px; }
details.sub > summary::-webkit-details-marker { display: none; }
details.sub > summary::before { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; flex: none; margin-right: 2px; }
details.sub[open] > summary::before { transform: rotate(45deg); }
details.sub > summary:hover { color: var(--accent); }
#pjCritSum { margin-left: auto; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
details.sub[open] { padding-bottom: 12px; display: flex; flex-direction: column; gap: 10px; }
details.sub table.dt { table-layout: fixed; font-size: 12.5px; }
details.sub .dt th:nth-child(1) { width: 27%; } details.sub .dt th:nth-child(2) { width: 19%; } details.sub .dt th:nth-child(3) { width: 26%; }
details.sub .dt th, details.sub .dt td { overflow-wrap: break-word; }
.undobar { position: sticky; top: 0; z-index: 4; display: flex; gap: 6px; align-items: center; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.undobar .btn { font-weight: 600; }
.undomsg { font-size: 12.5px; color: var(--ok); font-weight: 600; }
.btn.undo svg { width: 18px; height: 18px; flex: none; }
.btn.small.undo { padding-inline: 8px; }
.foldbtn { display: none !important; margin-left: auto; }
.filepick { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--subtle); cursor: pointer; transition: border-color .12s, background-color .12s; }
.filepick:hover, .filepick.over { border-color: var(--accent); background: var(--accent-soft); }
.filepick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.filepick > svg.ic { width: 26px; height: 26px; color: var(--accent); }
.filepick .fp-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.filepick .fp-t b { font-weight: 600; font-size: 13.5px; }
.filepick .fp-t small { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filepick input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.thumb { width: 52px; height: 52px; object-fit: contain; border-radius: 6px; border: 1px solid var(--line); flex: none; background: var(--sheet); }
table.dt { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.dt th, .dt td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.dt th { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.dt td:first-child { white-space: nowrap; }
.dt input, .dt select { min-height: 30px !important; padding: 0 6px !important; width: 100%; min-width: 0; font-family: var(--f-mono); font-size: 12.5px; border-radius: 6px !important; }
.dt td.n { text-align: right; font-family: var(--f-mono); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--dc); margin-right: 6px; }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.prodrow { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px 10px 8px 8px; }
.prodrow img, .prodrow .noimg { width: 72px; height: 72px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--line); }
.prodrow .noimg { display: grid; place-items: center; color: var(--ink-3); font-size: 11px; text-align: center; }
.prodrow b { font-family: var(--f-display); font-size: 14.5px; display: block; }
.prodrow small { display: block; color: var(--ink-3); font-size: 12px; line-height: 1.35; }
.prodrow small.pr { color: var(--ink-2); font-family: var(--f-mono); }
.prodrow select { margin-top: 6px; max-width: 100%; min-height: 30px; font-size: 12.5px; }
.cpanel-note { font-size: 12px; color: var(--ink-3); }

/* ═══════════ asistente ═══════════ */
.chat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); display: flex; flex-direction: column; height: min(86vh, 920px); min-width: 0; overflow: hidden; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 12px); }
.chat-h { display: flex; align-items: center; gap: 10px; padding: 11px 12px 9px 14px; }
.chat-h b { font-family: var(--f-display); font-size: 16px; display: block; }
.chat-h small { display: block; color: var(--ink-3); font-size: 12px; }
.chat-h .btn { margin-left: auto; white-space: nowrap; }
.chat-h .foldbtn { margin-left: 0; }
.romo-av { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.romo-av svg { width: 24px; height: 24px; display: block; }
.stepper { display: flex; flex-direction: column; gap: 4px; padding: 0 14px 10px; border-bottom: 1px solid var(--line); }
.stepper .bars { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
.stepper .bars > * { height: 18px; display: flex; align-items: center; background: none; border: 0; padding: 0; }
.stepper .bars > *::before { content: ""; flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.stepper .bars > .seen::before { background: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.stepper .bars > .done::before { background: var(--ok); }
.stepper .bars > .now::before { background: var(--accent); height: 7px; }
.stepper .bars > button { cursor: pointer; }
.stepper .bars > button:hover::before, .stepper .bars > button:focus-visible::before { height: 9px; }
.stepper .cap { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-3); }
.stepper .cap b { color: var(--ink); font-weight: 600; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; background: var(--subtle); }
.msg { display: flex; flex-direction: column; gap: 8px; max-width: 96%; min-width: 0; }
.msg.user { align-self: flex-end; max-width: 85%; }
.msg .bubble { padding: 10px 13px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); line-height: 1.5; }
.msg.romo .bubble { border-top-left-radius: 5px; }
.msg.user .bubble { background: var(--accent); color: var(--accent-ink); border-color: transparent; border-top-right-radius: 5px; }
.msg .bubble ul { margin: 6px 0 2px; padding-left: 18px; }
.msg .bubble p { margin: 0 0 6px; }
.msg .bubble .hi { display: block; font-family: var(--f-display); font-size: 17px; font-weight: 700; margin-bottom: 2px; }
.msg .bubble small.sub { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 4px; line-height: 1.4; }
.msg.user .bubble small.sub { color: inherit; opacity: .85; }
.msg.romo { animation: msgin .3s ease-out both; }
@keyframes msgin { from { opacity: 0; } }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick .chip:disabled, .cw button:disabled, .cw input:disabled, .cw select:disabled { opacity: .5; cursor: default; }
.cw { min-width: 0; }
.cw form { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; }
.cw .lbl { margin: 4px 0 0; font-weight: 600; font-size: 13px; color: var(--ink); }
.chat-in { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-in input { flex: 1; border-radius: 999px !important; padding: 0 16px !important; min-height: 40px !important; }
.chat-in .btn { border-radius: 999px; min-height: 40px; }
.chat-in .backbtn { padding-inline: 10px 14px; font-weight: 700; border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
.chat-in .backbtn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.chat-in .backbtn svg { width: 18px; height: 18px; }
.chat-in .backbtn:disabled { border-color: var(--line); color: var(--ink-3); background: var(--surface); }
.chat-in .sendbtn { padding-inline: 14px 16px; }
.msg.backflash .bubble { animation: backflash 1.2s ease; }
@keyframes backflash { 0% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.dots::after { content: "…"; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.bubble.thinking .trow { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.bubble.thinking .tmr { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bubble.file { display: flex; align-items: center; gap: 10px; }
.bubble.file img, .bubble.file .fico { width: 54px; height: 54px; border-radius: 6px; object-fit: cover; background: #fff; flex: none; display: grid; place-items: center; color: var(--accent); }
.bubble.file .fico svg { width: 30px; height: 30px; }
.bubble.file span { display: flex; flex-direction: column; min-width: 0; }
.bubble.file small { font-size: 11.5px; opacity: .85; word-break: break-all; }
.readbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; padding: 8px 12px 9px 14px; border-bottom: 1px solid var(--line); background: var(--accent-soft); }
.readbar[hidden] { display: none; }
.readbar .spin, .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--accent) 28%, transparent); border-top-color: var(--accent); animation: spin .9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.readbar .rb-t { display: flex; flex-direction: column; min-width: 0; }
.readbar .rb-t b { font-size: 13px; font-weight: 600; }
.readbar [data-t] { font-family: var(--f-mono); font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.readbar small { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.readbar .rb-p { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--accent) 16%, transparent); overflow: hidden; }
.readbar .rb-p i { display: block; width: 0; height: 100%; background: var(--accent); transition: width .6s ease; }

/* tarjetas visuales del asistente */
.cards { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.cards.two { grid-template-columns: 1fr 1fr; }
.vcard { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg); padding: 12px 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; color: var(--ink); transition: box-shadow .15s, border-color .15s; }
.vcard:hover:not(:disabled) { border-color: var(--accent); box-shadow: 0 4px 14px rgba(61, 90, 115, .12); }
.vcard[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.cw button[aria-pressed="true"]:disabled { opacity: 1; }
.vcard svg.ico { width: 44px; height: 44px; color: var(--accent); }
.vcard b { font-family: var(--f-display); font-size: 14.5px; }
.vcard small { color: var(--ink-3); font-size: 12px; line-height: 1.3; }
.vcard.wide { flex-direction: row; text-align: left; align-items: center; gap: 12px; padding: 10px; }
.vcard.wide img { width: 64px; height: 64px; border-radius: 8px; object-fit: contain; flex: none; background: #fff; }
.cards > .vcard.wide:has(.mixart) { grid-column: 1 / -1; }
.vcard .mini { display: flex; gap: 2px; height: 44px; align-items: flex-end; justify-content: center; }
.vcard .mini img { height: 44px; width: auto; max-width: 34px; object-fit: contain; background: #fff; border-radius: 4px; }
.vcard .mixart { flex: 0 0 52%; display: block; }
.vcard .mixtx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vcard .tag { color: var(--ok); background: var(--ok-soft); border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 600; }
.vcard img.pimg { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 8px; }
.cards.prod { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.cards.prod .vcard { padding: 8px; gap: 3px; }
.cards.prod .vcard b { font-size: 13.5px; }
.cards.prod .vcard small { font-size: 11.5px; }
.dcard { --dc: var(--accent); border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg); padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; text-align: left; min-width: 0; color: var(--ink); position: relative; transition: border-color .12s, box-shadow .12s; }
.dcard:hover:not(:disabled) { border-color: var(--dc); }
.dcard[aria-pressed="true"] { border-color: var(--dc); box-shadow: inset 0 0 0 1.5px var(--dc); background: color-mix(in srgb, var(--dc) 6%, var(--surface)); }
.dcard[aria-pressed="true"]::after { content: ""; position: absolute; top: 9px; right: 9px; width: 16px; height: 16px; border-radius: 50%; background: var(--dc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 12px no-repeat; }
.dcard .dn { font-family: var(--f-display); font-weight: 700; font-size: 15px; color: var(--dc); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dcard .da { font-size: 12px; color: var(--ink-2); }
.dcard svg { width: 100%; height: auto; border-radius: 6px; background: #faf8f4; }
.dcard .cap { font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dcard .cap b { font-family: var(--f-display); font-size: 20px; color: var(--ink); }
.sizes { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.sizes .dcard svg { background: #faf8f4; }
.rect-prev { display: block; width: 100%; height: auto; max-height: 220px; background: #faf8f4; border-radius: 8px; border: 1px solid var(--line); }
.rect-prev .side { cursor: pointer; }
.result { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.result .big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.result .big > b { font-family: var(--f-display); font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.result .big span { color: var(--ink-2); }
.result .big span b { color: var(--ink); font-variant-numeric: tabular-nums; }
.result .perfil { color: var(--ink-2); font-weight: 600; }
.zbar { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto; gap: 8px; align-items: center; font-size: 12.5px; }
.zbar .track { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.zbar .fill { height: 100%; background: var(--accent); border-radius: 4px; }
.zbar .fill.cap { background: var(--warn); }
.zbar .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.disclaimer { display: flex; gap: 10px; align-items: flex-start; background: var(--subtle); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.disclaimer svg { width: 18px; height: 18px; flex: none; color: var(--warn); margin-top: 1px; }
.aforo-rows { display: flex; flex-direction: column; gap: 6px; }
.aforo-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; align-items: center; }
.aforo-row small { display: block; color: var(--ink-3); font-size: 11.5px; }
.aforo-row input { width: 100%; }
.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.pages button { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: center; font-size: 12px; }
.pages button:hover { border-color: var(--accent); }
.pages img { width: 100%; height: 90px; object-fit: contain; background: #fff; border-radius: 4px; }
.dropzone { width: 100%; border: 1.5px dashed var(--line-strong); background: var(--surface); border-radius: var(--r-lg); padding: 16px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; color: var(--ink); transition: border-color .12s, background-color .12s; }
.dropzone svg.ico { width: 36px; height: 36px; color: var(--accent); }
.dropzone:hover:not(:disabled), .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone small { color: var(--ink-3); font-size: 12px; }
.zpick { display: flex; flex-direction: column; gap: 6px; }
.zpick label { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.zpick small { color: var(--ink-3); font-family: var(--f-mono); font-size: 12px; }
.zpick label.out { border-style: dashed; background: none; }
.zpick .zb.out { background: var(--accent); }
.zpick em { display: block; font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.zmsg:empty { display: none; }
.zmsg p { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ctxadd { display: flex; flex-direction: column; gap: 6px; }
.ctxadd > p { margin: 0; }
.zcfg { display: flex; flex-direction: column; gap: 10px; }
.zcfg .zc { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.zcfg .zc h4 { margin: 0; font-family: var(--f-display); font-size: 14px; display: flex; gap: 8px; align-items: center; }
.zcfg .zc h4 small { margin-left: auto; font-family: var(--f-mono); font-weight: 400; font-size: 11.5px; color: var(--ink-3); }
.zcfg .opts { display: flex; flex-wrap: wrap; gap: 6px; }
.zcfg .opts button { --dc: var(--accent); border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; padding: 5px 9px; cursor: pointer; font-size: 12.5px; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.zcfg .opts button b { color: var(--dc); font-family: var(--f-display); }
.zcfg .opts button small { color: var(--ink-3); font-family: var(--f-mono); font-size: 11.5px; }
.zcfg .opts button[aria-pressed="true"] { border-color: var(--dc); box-shadow: inset 0 0 0 1px var(--dc); }
.bcands { display: flex; flex-wrap: wrap; gap: 8px; }
.express { display: flex; flex-direction: column; gap: 10px; }
.express .xtipos .chip.sel { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.endbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.endbtns .btn { gap: 8px; padding: 10px 16px; font-size: 14.5px; font-weight: 700; border-radius: 12px; min-height: 44px; }
.endbtns .btn svg { width: 20px; height: 20px; flex: none; }
.picto { margin: 8px 0 2px; background: #faf8f4; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.picto svg { width: 100%; height: auto; max-height: 130px; display: block; }
.picto figcaption { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
.picto figcaption i { display: inline-block; width: 12px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: 0; }
.legend-x { display: flex; flex-direction: column; gap: 4px; }
.legend-x button { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: center; text-align: left; border: 1px solid transparent; background: var(--surface); border-radius: 8px; padding: 7px 8px; cursor: pointer; color: var(--ink); }
.legend-x button:hover, .legend-x button:focus-visible, .legend-x button.on { border-color: var(--accent); }
.legend-x .sw { width: 26px; height: 18px; border-radius: 4px; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; }
.legend-x .sw.dim { background: none; color: var(--ink-2); font-size: 15px; border: 1px solid var(--line-strong); }
.legend-x b { font-weight: 600; }
.legend-x small { display: block; color: var(--ink-3); font-size: 12px; line-height: 1.3; }
i.bn { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 999px; border: 2.5px solid #d9731a; color: #d9731a; background: #fff; font: 800 12px/1 var(--f-display); font-style: normal; vertical-align: middle; }
i.bn.on, .bchip.sel i.bn { background: #1f8a4c; border-color: #1f8a4c; color: #fff; }
.chip.bchip { gap: 7px; padding: 4px 11px 4px 5px; font-size: 13px; }
.chip.bchip.sel { background: #e3f3e9; border-color: #1f8a4c; color: #14301f; }
.chip.bchip.hl { box-shadow: 0 0 0 3px rgba(217, 115, 26, .35); }
.bcands .chip.bchip i.bn { min-width: 30px; height: 30px; font-size: 15px; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -12px; width: 7px; height: 12px; border-radius: 2px; animation: conf 1.7s cubic-bezier(.25, .6, .4, 1) forwards; }
@keyframes conf { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), 300px) rotate(var(--r)); opacity: 0; } }

/* ═══════════ lámina (plano) ═══════════ */
.stage { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.statbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.kpis { display: flex; flex: 3 1 540px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; }
.kpi { flex: 1 1 0; min-width: 0; padding: 7px 14px 8px; border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.kpi:first-child { border-left: 0; }
.kpi b { display: block; font-family: var(--f-display); font-size: 22px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi span { font-size: 12px; color: var(--ink-3); line-height: 1.25; }
.kpi small { display: block; font-size: 11.5px; color: var(--warn); line-height: 1.3; }
.kpi.dist-kpi { flex: 1.7 1 0; border-left: 3px solid var(--dc, var(--line)); }
.kpi.dist-kpi b { font-size: 16px; color: var(--dc); }
.kpi.dist-kpi small { color: var(--ink-2); font-size: 12px; }
#kChairNote { color: var(--ink-3); }
.notice { flex: 1 1 300px; display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 8px 12px; font-size: 13px; color: var(--ink-2); }
.notice svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.notice p { margin: 0; flex: 1 1 200px; min-width: 0; line-height: 1.35; }
.notice p b { color: var(--ink); }
.notice .pill { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--sunken); color: var(--ink-2); white-space: nowrap; }
.notice .pill.ok { color: var(--ok); background: var(--ok-soft); }
.notice .pill.lim { color: var(--warn); background: var(--warn-soft); box-shadow: inset 0 0 0 1px var(--warn-line); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; justify-content: space-between; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--sunken); border-radius: 11px; }
.tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font-weight: 500; cursor: pointer; white-space: nowrap; }
.tabs button svg.ic { width: 16px; height: 16px; }
.tabs button:hover { color: var(--ink); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.tabs button[aria-pressed="true"] { background: var(--surface); color: var(--accent); font-weight: 600; box-shadow: var(--sh-2); }
.tb-r { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-left: auto; }
.tbgrp { display: flex; align-items: center; gap: 4px; }
.tbgrp .tl { font-size: 12px; color: var(--ink-3); margin-right: 2px; }
.busy { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); }
.modepill { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px 0 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.modepill svg.ic { width: 15px; height: 15px; }
.modepill.man { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.banner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: var(--r-lg); padding: 8px 12px; font-size: 13px; }
.banner > svg.ic { color: var(--warn); }
.banner p { margin: 0; flex: 1 1 260px; }
.banner.furnb { background: var(--accent-soft); border-color: var(--accent-line); }
.banner.furnb > svg.ic { color: var(--accent); }
.editbar, .dibbar { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 8px 10px; }
.eb-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.eb-row .eb-l { font-family: var(--f-display); font-weight: 700; font-size: 13.5px; margin-right: 4px; }
.eb-row .sep { width: 1px; align-self: stretch; background: var(--line); margin: 2px 4px; }
.eb-row .status { margin-left: auto; font-size: 12.5px; }
.editbar .hint { font-size: 12.5px; }
.dibtools { display: flex; flex-wrap: wrap; gap: 4px; }
.dibtools button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; min-height: 52px; padding: 6px 6px 5px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--ink-2); cursor: pointer; font-size: 11.5px; font-weight: 600; line-height: 1.1; }
.dibtools button svg { width: 22px; height: 22px; }
.dibtools button:hover { background: var(--subtle); color: var(--ink); }
.dibtools button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.dibrow { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 8px; }
.dibrow .undos { display: flex; gap: 6px; margin-left: auto; }
.dibrow .btn.undo { font-weight: 600; }
.dibhint { margin: 0; font-size: 13px; color: var(--ink-2); flex: 1 1 220px; }
.dibhint.warn { color: var(--danger); font-weight: 600; }
.dibinsp { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 13px; background: var(--subtle); border-radius: 8px; padding: 8px 10px; }
.dibinsp:empty { display: none; }
.dibinsp .dchips { display: flex; flex-wrap: wrap; gap: 5px; }
.dibinsp .dnum { display: inline-flex; align-items: center; gap: 5px; }
.dibinsp .dnum input { width: 84px; min-height: 30px; }
.dibinsp small { color: var(--ink-3); }
.dibinsp .dkill { border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.sheet { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: auto; position: relative; min-height: 220px; }
.sheet svg { display: block; width: 100%; height: auto; max-height: calc(100vh - 210px); touch-action: pan-x pan-y pinch-zoom; }
.sheet.tables svg, .sheet.editing svg, .sheet.drawing svg { touch-action: none; }
.sheet.drawing svg { cursor: crosshair; user-select: none; }
.sheet img.orig { display: block; max-width: 100%; margin: 0 auto; }
.sheet .empty { margin: 24px; padding: 28px 20px; text-align: center; color: #5b625e; background: #fbfaf8; border: 1px dashed #d8d3cc; border-radius: 10px; line-height: 1.5; }
.sheet .rp-layer { transition: opacity .2s; }
.sheet[data-focus] .rp-layer { opacity: .12; }
.sheet[data-focus] .rp-floor { opacity: .45; }
.sheet[data-focus="zones"] .rp-zones, .sheet[data-focus="routes"] .rp-routes, .sheet[data-focus="doors"] .rp-doors,
.sheet[data-focus="obst"] .rp-obst, .sheet[data-focus="walls"] .rp-walls, .sheet[data-focus="ctx"] .rp-ctx,
.sheet[data-focus="dims"] .rp-dims, .sheet[data-focus="sets"] .rp-sets, .sheet[data-focus="cands"] .rp-cands { opacity: 1; }
.sheet.tables .rp-set { cursor: grab; }
.sheet.tables .rp-set:hover { filter: drop-shadow(0 0 2px rgba(61, 90, 115, .55)); }
.sheet.reveal .rp-set { animation: pop .45s cubic-bezier(.2, .8, .3, 1.2) both; animation-delay: calc(var(--i) * 28ms); transform-box: fill-box; transform-origin: center; }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
.sheet .rp-cand { cursor: pointer; }
.sheet .rp-cand .bdg { transition: transform .15s; }
.sheet .rp-cand:hover .bdg, .sheet .rp-cand.hl .bdg { transform: scale(1.25); }
.sheet .rp-cand.hl .band { stroke-width: .34; }
.sheet.benchpick .rp-sets, .sheet.benchpick .rp-stools, .sheet.benchpick .rp-routes { opacity: .4; }
/* superposición de edición: lo seleccionado lleva contorno, halo y etiqueta; los puntos editables son cuadrados; mover, un círculo con flechas */
.sheet .ov-h { cursor: move; }
.sheet .ov-h:hover rect, .sheet .ov-h:focus rect { fill: var(--accent-soft, #e9f0fa); }
.sheet .ov-mv { cursor: grab; }
.sheet .ov-door { cursor: grab; }
.sheet .ov-pick { cursor: pointer; }
.sheet .ov-pick:hover { stroke: #3d5a73; stroke-opacity: .7; }
.emptyplan { min-height: min(62vh, 600px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 40px 24px; color: #5b625e;
  background-color: #fbfaf8; background-image: linear-gradient(#efece7 1px, transparent 1px), linear-gradient(90deg, #efece7 1px, transparent 1px); background-size: 24px 24px; border-radius: 12px; }
.emptyplan svg { width: 76px; height: 76px; color: #3d5a73; background: #fff; border-radius: 16px; padding: 10px; box-shadow: 0 1px 0 #e2ddd6, 0 0 0 1px #e2ddd6; }
.emptyplan b { font-family: var(--f-display); font-size: 21px; color: #2b2723; }
.emptyplan p { margin: 0; max-width: 46ch; line-height: 1.5; }
.emptyplan.has img { max-width: min(100%, 560px); max-height: 52vh; object-fit: contain; background: #fff; border-radius: 8px; box-shadow: 0 0 0 1px #e2ddd6; }
.scanwrap { position: relative; max-width: min(100%, 560px); line-height: 0; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px #e2ddd6; background: #fff; }
.emptyplan.has .scanwrap img { max-width: 100%; }
.emptyplan.reading .scanwrap img { filter: saturate(.55) contrast(.95); }
.scan { position: absolute; left: 0; right: 0; top: 0; height: 22%; pointer-events: none; border-bottom: 2px solid #3d5a73;
  background: linear-gradient(to bottom, rgba(61, 90, 115,0), rgba(61, 90, 115,.10) 60%, rgba(61, 90, 115,.38)); animation: scan 2.8s cubic-bezier(.45,.05,.55,.95) infinite; }
@keyframes scan { from { transform: translateY(-100%); } to { transform: translateY(455%); } }
.emptyplan.reading { flex-direction: row; align-items: center; gap: 28px; padding: 32px; }
.emptyplan.reading .scanwrap { flex: 0 1 auto; max-width: 60%; }
.emptyplan.reading .scanwrap img { display: block; max-width: 100%; max-height: 60vh; width: auto; height: auto; box-shadow: none; }
.rcol { flex: 1 1 0; min-width: 240px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; }
.rcol > small { font-size: 13px; line-height: 1.45; color: #5b625e; }
.rprog { width: min(100%, 420px); height: 6px; border-radius: 3px; background: #e2ddd6; overflow: hidden; }
.rprog i { display: block; height: 100%; background: #3d5a73; border-radius: 3px; transition: width .6s ease; }
.found { list-style: none; margin: 2px 0 0; padding: 0; width: min(100%, 420px); display: flex; flex-direction: column; gap: 5px; text-align: left; font-size: 13.5px; color: #2b2723; }
.found li { display: flex; gap: 8px; align-items: baseline; }
.found li.new { animation: fadein .35s ease both; }
.found li.ok::before { content: "✓"; color: #2c7a4b; font-weight: 700; flex-shrink: 0; }
.found li.now { color: #6b736e; }
.found li.now::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3d5a73; flex-shrink: 0; align-self: center; animation: blink 1s infinite; }
@keyframes fadein { from { opacity: 0; transform: translateY(3px); } }
.legend { display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 12.5px; color: var(--ink-2); margin: 0; }
.legend > * { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px 2px 8px; border-radius: 999px; border: 1px solid transparent; background: none; color: var(--ink-2); font-size: 12.5px; }
.legend button { cursor: pointer; }
.legend button:hover, .legend button:focus-visible, .legend button.on { border-color: var(--accent); color: var(--ink); background: var(--surface); }
.legend i { display: inline-block; width: 18px; height: 10px; border-radius: 2px; margin-right: 6px; border: 1px solid var(--line-strong); }

/* ── 2D | 3D y vista 3D ── */
.dimseg { display: inline-flex; gap: 2px; padding: 3px; background: var(--ink); border-radius: 11px; }
.dimseg button { min-width: 42px; min-height: 32px; border: 0; border-radius: 8px; background: transparent; color: color-mix(in srgb, var(--bg) 78%, transparent); font: 700 13.5px/1 var(--f-display); letter-spacing: .02em; cursor: pointer; }
.dimseg button:hover { color: var(--bg); }
.dimseg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: var(--sh-2); }
.dimseg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
#v3img { display: none; }
#planStage.in3d #v3img { display: inline-flex; }
#planStage.in3d .tabs, #planStage.in3d #geoBar, #planStage.in3d #tblEditor, #planStage.in3d #dibBar, #planStage.in3d #geoEditor, #planStage.in3d #anaPanel { display: none !important; }
.v3 { position: relative; height: clamp(380px, calc(100vh - 220px), 900px); border: 1px solid var(--line); border-radius: var(--r-lg); background: #eceeea; overflow: hidden; box-shadow: var(--sh-1); color: #2b2f33; }
.v3 canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; cursor: grab; }
.v3 canvas:active { cursor: grabbing; }
.v3:has(canvas:focus-visible) { box-shadow: var(--ring); }
.v3 .ic { width: 17px; height: 17px; }
.v3 button, .v3 summary { font-family: var(--f-body); }
.v3nav { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 2px; padding: 5px; background: #fff; border-radius: 14px; box-shadow: 0 4px 18px rgba(20, 28, 24, .14); z-index: 2; }
.v3nav button { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: #3b4147; cursor: pointer; }
.v3nav button:hover { background: #eef2f7; color: #3d5a73; }
.v3nav button:focus-visible, .v3bar button:focus-visible, .v3layers summary:focus-visible, .v3card button:focus-visible { outline: 2px solid #3d5a73; outline-offset: 1px; }
.v3nav .sep { height: 1px; margin: 3px 6px; background: #e3e5e8; }
.v3bar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; z-index: 2; }
.v3mode { display: inline-flex; gap: 2px; padding: 4px; background: #fff; border-radius: 999px; box-shadow: 0 4px 18px rgba(20, 28, 24, .16); }
.v3mode button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: #4a5056; font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.v3mode button[aria-pressed="true"] { background: #3d5a73; color: #fff; font-weight: 600; }
.v3bar .btn { background: #fff; color: #23272b; border-color: transparent; border-radius: 999px; box-shadow: 0 4px 18px rgba(20, 28, 24, .16); min-height: 42px; padding: 0 16px; }
.v3bar .btn:hover:not(:disabled) { background: #f2f5f9; border-color: transparent; color: #3d5a73; }
.v3layers { position: absolute; left: 12px; top: 12px; z-index: 3; background: #fff; border-radius: 12px; box-shadow: 0 4px 18px rgba(20, 28, 24, .14); max-width: calc(100% - 90px); }
.v3layers summary { list-style: none; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: #2b2f33; border-radius: 12px; }
.v3layers summary::-webkit-details-marker { display: none; }
.v3layers[open] summary { color: #3d5a73; }
.v3lay { display: flex; flex-direction: column; gap: 7px; padding: 4px 14px 14px; width: 290px; max-width: 100%; font-size: 13px; color: #353a3f; }
.v3lay .ck { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; cursor: pointer; line-height: 1.3; }
.v3lay .ck input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: #3d5a73; }
.v3lay .ck small { grid-column: 2; display: block; color: #737a80; font-size: 11.5px; }
.v3lay hr { border: 0; border-top: 1px solid #e6e8ea; margin: 3px 0; width: 100%; }
.v3lay .num { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.v3lay .num input { width: 64px; min-height: 30px; padding: 2px 6px; border: 1px solid #c9ced3; border-radius: 6px; font: inherit; color: #23272b; background: #fff; }
.v3hint { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); margin: 0; z-index: 2; padding: 6px 12px; border-radius: 999px; background: rgba(30, 36, 42, .82); color: #fff; font-size: 12.5px; pointer-events: none; max-width: min(520px, calc(100% - 200px)); text-align: center; }
.v3hint:empty { display: none; }
.v3info { position: absolute; left: 12px; bottom: 12px; margin: 0; z-index: 1; font-size: 11.5px; color: #5f666c; background: rgba(255, 255, 255, .78); padding: 4px 9px; border-radius: 8px; max-width: calc(50% - 120px); line-height: 1.35; pointer-events: none; }
.v3msg { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 24px; background: #eceeea; color: #2b2f33; font-size: 14px; }
.v3msg small { color: #5f666c; font-size: 12.5px; max-width: 420px; }
.v3msg .spin { width: 26px; height: 26px; margin-bottom: 6px; }
.v3msg .btn { margin-top: 8px; }
.v3card { position: absolute; z-index: 3; width: 312px; max-width: calc(100% - 16px); max-height: calc(100% - 24px); overflow: auto; background: #fff; color: #23272b; border-radius: 14px; box-shadow: 0 10px 34px rgba(20, 28, 24, .2); padding: 12px 14px 12px; font-size: 13px; display: flex; flex-direction: column; gap: 9px; }
.v3card.dock { left: 8px !important; right: 8px; top: auto !important; bottom: 66px; width: auto; max-width: none; max-height: 48%; }
.v3card .v3x { position: absolute; right: 6px; top: 6px; min-height: 28px; width: 28px; padding: 0; border: 0; background: transparent; color: #5f666c; }
.v3card .v3h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding-right: 26px; }
.v3card .v3h b { font: 700 17px/1.2 var(--f-display); color: #16191c; }
.v3card .mut { color: #6b7278; font-size: 12.5px; }
.v3card .linkbtn { color: #3d5a73; }
.v3row { display: grid; grid-template-columns: 84px 1fr; gap: 10px; align-items: start; }
.v3row img, .v3row .v3noph { width: 84px; height: 84px; object-fit: contain; background: #f4f4f2; border-radius: 10px; }
.v3noph { display: grid; place-items: center; color: #8a9096; font-size: 11px; }
.v3row > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.v3row small { display: block; color: #40464c; font-size: 12.5px; line-height: 1.35; }
.v3sk { width: 84px; height: 84px; background: #f4f6f9; border-radius: 10px; padding: 6px; overflow: visible; }
.v3sk rect, .v3sk circle { fill: #fff; stroke: #3d5a73; stroke-width: 1.6; }
.v3sk text { font: 600 9px var(--f-body); fill: #40464c; }
.v3est { display: inline-block; width: fit-content; margin-top: 2px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 1.5; }
.v3est.validado { background: #e4f2e9; color: #23714a; }
.v3est.aproximado { background: #e9f0fa; color: #3d5a73; }
.v3est.generico { background: #f3efe6; color: #7a5a14; }
.v3est.falta { background: #fdeceb; color: #a1261b; }
.v3list { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.v3list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.v3list .v3est { margin: 0; }
.v3bad { margin: 0; display: flex; gap: 6px; align-items: flex-start; padding: 7px 9px; border-radius: 8px; background: #fdeceb; color: #a1261b; font-size: 12.5px; }
.v3bad svg.ic { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.warnc { color: #8a5300; }
.v3acts { display: flex; flex-wrap: wrap; gap: 5px; }
.v3acts .btn { min-height: 30px; padding: 0 10px; font-size: 12.5px; }
.v3card .btn { background: #fff; color: #23272b; border-color: #cfd4d8; }
.v3card .btn:hover:not(:disabled) { background: #f2f5f9; border-color: #9aa3ab; }
.v3card .btn.primary { background: #3d5a73; border-color: #3d5a73; color: #fff; }
.v3card .btn.danger { color: #b3261e; }
.v3card .btn.ghost { border-color: transparent; color: #3d5a73; }
.v3card .field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.v3card .lbl { font-size: 12px; color: #5f666c; font-weight: 600; }
.v3card .seg { background: #eef0f2; }
.v3card .seg button { color: #40464c; font-size: 12.5px; }
.v3card .seg button[aria-pressed="true"] { background: #fff; color: #3d5a73; }
.v3tip { margin: 0; font-size: 12px; color: #6b7278; }
.v3ask { border-top: 1px solid #e6e8ea; padding-top: 9px; display: flex; flex-direction: column; gap: 7px; }
.v3ask p { margin: 0; font-size: 12.5px; }
.v3ask .row { display: flex; flex-wrap: wrap; gap: 6px; }
.v3.editing canvas { cursor: default; }
.autoask { display: inline-flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; flex: 1 1 100%; font-size: 13px; }
.autoask > span { flex: 1 1 260px; }
@media (max-width: 760px) {
  .v3 { height: clamp(340px, 64vh, 640px); }
  .v3nav { top: auto; bottom: 66px; transform: none; right: 8px; padding: 4px; }
  .v3nav button { width: 34px; height: 34px; }
  .v3nav [data-v="l"], .v3nav [data-v="r"], .v3nav .sep:first-of-type { display: none; }
  .v3info { display: none; }
  .v3hint { top: 54px; max-width: calc(100% - 24px); }
  .v3bar { bottom: 10px; gap: 6px; }
  .v3mode button { padding: 0 11px; }
  .v3bar .btn { min-height: 42px; padding: 0 12px; }
  .v3layers { left: 8px; top: 8px; }
  .v3bar .btn { white-space: nowrap; }
  .v3w { display: none; }
}
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.panel h3 { font-size: 14px; font-weight: 700; }
.panel details > summary { cursor: pointer; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.editor { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px; }
.insp-empty { color: var(--ink-3); font-size: 13px; margin: 0; }
.tablewrap { overflow-x: auto; }
table.zt { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.zt th, .zt td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.zt th { font-size: 12px; color: var(--ink-3); font-weight: 600; background: var(--subtle); }
.zt th:first-child { border-top-left-radius: 8px; } .zt th:last-child { border-top-right-radius: 8px; }
.zt td.n, .zt th.n { text-align: right; font-family: var(--f-mono); }
.zt tfoot td { font-weight: 600; border-bottom: 0; }
.zt select, .zt input:not([type=checkbox]) { min-height: 30px !important; font-size: 13px; }
.zt input:not([type=checkbox]) { width: 76px; font-family: var(--f-mono); text-align: right; }
.zt small { color: var(--ink-3); font-size: 11.5px; }
.zt small.lim { color: var(--warn); }
.zt tr.off td { color: var(--ink-3); }
.zt td.mix { font-size: 12px; line-height: 1.35; white-space: nowrap; color: var(--ink-2); }
.zt th:first-child, .zt td:first-child { width: 1%; text-align: center; }
.zt tr.off .zb { background: #7a736b; }
.zb { display: inline-block; background: #3d5a73; color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; line-height: 1.5; vertical-align: 1px; }
.warns { margin: 0; padding: 10px 12px 10px 30px; background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: var(--r); font-size: 13px; }
.issues { margin: 0; padding-left: 18px; font-size: 13px; }
.issues li.error { color: var(--danger); }
.ana dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 13px; }
.ana dt { color: var(--ink-3); }
.ana dd { margin: 0; }
.zr { font-size: 12.5px; color: var(--ink-2); margin: 0; }
.zr .lim { color: var(--warn); }
.ztot { font-size: 13.5px; padding: 2px 2px 0; }
.ztot b { font-family: var(--f-display); font-size: 18px; }
.foot { margin: 2px 0 0; color: var(--ink-3); font-size: 12px; display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.foot svg.ic { width: 15px; height: 15px; margin-top: 1px; }

/* ═══════════ ventanas: catálogo e historial ═══════════ */
.catpick { position: fixed; inset: 0; z-index: 50; background: rgba(18, 22, 20, .48); display: grid; place-items: center; padding: 20px; }
.catpick[hidden] { display: none !important; }
.cp-box { background: var(--surface); border-radius: 16px; width: min(1180px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--sh-3); }
.cp-h { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px 10px; }
.cp-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cp-h h3 { margin: 0; font-family: var(--f-display); font-size: 18px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-sub { margin: 0; font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cp-sub img { width: 28px; height: 28px; object-fit: contain; background: #fff; border-radius: 5px; border: 1px solid var(--line); }
.cp-sub b { color: var(--ink); font-weight: 600; }
.cp-ctx { margin: 0 16px 10px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: start; background: var(--subtle); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 12px; }
.cp-ctx .cx-img { grid-row: span 2; width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--line); }
.cp-ctx .cx-noimg { grid-row: span 2; width: 64px; height: 64px; border-radius: 8px; border: 1px dashed var(--line-strong); display: grid; place-items: center; font-size: 11px; color: var(--ink-3); text-align: center; }
.cp-ctx .cx-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cp-ctx .cx-tag { font-family: var(--f-mono); font-weight: 700; font-size: 14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 7px; }
.cp-ctx .cx-q { font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-2); }
.cp-ctx .cx-sum { margin: 0; font-size: 13px; color: var(--ink); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cp-ctx details { grid-column: 2; font-size: 13px; }
.cp-ctx details > summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 12.5px; list-style: none; display: inline-flex; align-items: center; gap: 4px; }
.cp-ctx details > summary::-webkit-details-marker { display: none; }
.cp-ctx details[open] > summary { margin-bottom: 4px; }
.cp-ctx details p { margin: 0; max-height: 9em; overflow: auto; color: var(--ink-2); line-height: 1.45; white-space: pre-wrap; }
.cp-search { position: relative; margin: 0 16px; }
.cp-search > svg.ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-3); pointer-events: none; }
.cp-search input { width: 100%; min-height: 48px !important; padding: 0 46px 0 44px !important; font-size: 16px; border-radius: 12px !important; }
.cp-search input::-webkit-search-cancel-button { display: none; }
.cp-search .qx { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.cp-f { display: flex; flex-direction: column; gap: 8px; padding: 10px 16px 12px; border-bottom: 1px solid var(--line); }
.fbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fsel { position: relative; display: inline-flex; align-items: center; min-height: 34px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); padding: 0 6px 0 12px; gap: 6px; font-size: 13px; cursor: pointer; }
.fsel:hover { border-color: var(--ink-3); }
.fsel.on { border-color: var(--accent); background: var(--accent-soft); }
.fsel > span { color: var(--ink-3); font-weight: 500; white-space: nowrap; }
.fsel select { border: 0 !important; background: transparent !important; min-height: 30px !important; padding: 0 2px !important; font-weight: 600; color: var(--ink); box-shadow: none !important; max-width: 190px; }
.fsel.on select { color: var(--accent); }
.fsel:has(select:focus-visible) { box-shadow: var(--ring); border-color: var(--accent); }
.fcount { font-size: 13px; color: var(--ink-2); margin-left: auto; white-space: nowrap; }
.fcount b { font-family: var(--f-mono); color: var(--ink); }
.factive { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 0; }
.fstep { font-weight: 600; font-size: 14px; color: var(--ink); margin-right: auto; }
.fback { flex: none; }
.cp-grid.cats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ccard { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg); padding: 16px 10px 14px; display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; cursor: pointer; color: var(--ink); font: inherit; transition: border-color .12s, box-shadow .12s, color .12s; }
.ccard:hover, .ccard:focus-visible { border-color: var(--accent); box-shadow: 0 4px 14px rgba(61, 90, 115, .12); }
.ccard .cico { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.ccard .cico svg { width: 44px; height: 44px; }
.ccard b { font-family: var(--f-display); font-size: 15.5px; }
.ccard small { color: var(--ink-3); font-size: 12.5px; }
.ccard.all { background: var(--subtle); border-style: dashed; }
.ccard.all .cico { background: var(--surface); }
@media (max-width: 640px) { .cp-grid.cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.factive:empty { display: none; }
.factive .chip { min-height: 28px; padding: 2px 6px 2px 11px; background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); font-weight: 600; }
.factive .chip svg.ic { width: 14px; height: 14px; }
.factive .fnote { font-size: 12.5px; color: var(--ink-3); }
.fsum { margin: 0; font-size: 12.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.fsum.ed { color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 6px 10px; }
.cp-grid { overflow: auto; padding: 14px 16px 18px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); align-content: start; min-height: 200px; background: var(--subtle); }
.cp-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 16px; color: var(--ink-2); text-align: center; }
.cp-empty svg.ic { width: 40px; height: 40px; color: var(--ink-3); stroke-width: 1.6; }
.cp-empty b { font-family: var(--f-display); font-size: 16px; color: var(--ink); }
.cp-empty p { margin: 0; max-width: 44ch; font-size: 13px; }
.pcard { position: relative; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg); padding: 8px; display: flex; flex-direction: column; gap: 8px; text-align: left; cursor: pointer; color: var(--ink); min-width: 0; transition: border-color .12s, box-shadow .12s; }
.pcard:hover:not(:disabled) { border-color: var(--accent); box-shadow: var(--sh-2); }
.pcard[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.pcard .pimg { display: block; aspect-ratio: 1 / 1; background: #fff; border-radius: 8px; overflow: hidden; }
.pcard img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pcard .pbody { display: flex; flex-direction: column; gap: 3px; padding: 0 2px 2px; min-width: 0; }
.pcard b { font-family: var(--f-display); font-size: 14.5px; line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .pmeta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pcard small { color: var(--ink-3); font-size: 12px; line-height: 1.35; }
.pcard .pdim { color: var(--ink-2); }
.pcard .pr { margin-top: 2px; font-family: var(--f-mono); font-size: 13px; font-weight: 600; color: var(--ink); }
.pcard .pr.ask { font-family: var(--f-body); color: var(--warn); font-weight: 600; }
.pcard .pr .pk { font-family: var(--f-body); font-weight: 500; color: var(--ink-3); font-size: 12px; margin-right: 3px; }
.pcard .psel { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 4px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 11.5px; font-weight: 700; padding: 2px 9px 2px 6px; box-shadow: var(--sh-2); }
.pcard .psel svg.ic { width: 13px; height: 13px; stroke-width: 3; }
.pcard.edit { cursor: default; }
.pcard.hid { opacity: .55; }
.pcard .hidtag { position: absolute; top: 12px; left: 12px; background: var(--cota); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 4px; padding: 2px 6px; }
.pcard .eact { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pcard.more { align-items: center; justify-content: center; text-align: center; }
.pcard.more svg.ico { width: 40px; height: 40px; color: var(--accent); }
.pcards { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.hbox { width: min(980px, 100%); }
.hlist { overflow: auto; padding: 6px 16px 12px; display: flex; flex-direction: column; min-height: 120px; }
.hrow { display: grid; grid-template-columns: 76px minmax(0, 1fr) minmax(150px, 220px) auto; gap: 14px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.hrow:last-child { border-bottom: 0; }
.hrow.cur { background: var(--accent-soft); border-radius: 10px; border-bottom-color: transparent; }
.hth { width: 76px; height: 56px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; overflow: hidden; color: #3d5a73; }
.hth img { width: 100%; height: 100%; object-fit: contain; }
.hth svg { width: 34px; height: 34px; }
.hth.proyecto svg { color: #7a4e9e; }
.hmain { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hmain b { font-family: var(--f-display); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hmain small { color: var(--ink-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hmain small:empty { display: none; }
.hmain .meta { color: var(--ink-3); }
.hmain .kind { font-weight: 600; color: var(--accent); }
.hmain .kind.proyecto { color: var(--d-premium); }
.hmain .now { color: var(--ok); font-weight: 600; }
.hsum { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.hsum b { color: var(--ink); font-size: 14px; }
.hsum .warn { color: var(--warn); }
.hact { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.hact .q { font-size: 12.5px; color: var(--ink-2); }
.hempty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 36px 16px; color: var(--ink-2); }
.hempty svg { width: 56px; height: 56px; color: var(--accent); }
.hempty b { font-family: var(--f-display); font-size: 17px; color: var(--ink); }
.hempty p { margin: 0; max-width: 52ch; font-size: 13px; line-height: 1.5; }
.hfoot { margin: 0; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.hfoot:empty { display: none; }
.hbox .cp-search { margin-bottom: 10px; }
.hbox .cp-f { padding-top: 0; flex-direction: row; flex-wrap: wrap; }

/* ═══════════ ROMO Proyectos ═══════════ */
.pjfiles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pjfiles:empty { display: none; }
.pjfiles li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--subtle); border: 1px solid var(--line); border-radius: var(--r); padding: 7px 6px 7px 8px; font-size: 12.5px; }
.pjfiles li b { display: block; overflow-wrap: anywhere; font-weight: 600; font-size: 13px; line-height: 1.3; }
.pjfiles li small { color: var(--ink-3); display: block; line-height: 1.35; }
.pjfiles .ext { font-family: var(--f-mono); font-size: 10px; font-weight: 700; color: #fff; background: #1e7a46; border-radius: 5px; text-align: center; padding: 5px 0; }
.pjfiles .ext.pdf { background: #c8102e; }
.pjfiles .rm { width: 30px; height: 30px; border-radius: 7px; border: 1px solid transparent; background: none; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.pjfiles .rm:hover, .pjfiles .rm:focus-visible { border-color: var(--line-strong); color: var(--danger); background: var(--surface); }
.pjfiles .rm svg.ic { width: 16px; height: 16px; }
body[data-mode="proj"] .dropzone { flex-direction: row; justify-content: flex-start; text-align: left; gap: 12px; padding: 14px; }
body[data-mode="proj"] .dropzone .dz-t { display: flex; flex-direction: column; min-width: 0; }
.dropzone.compact { padding: 9px 12px !important; }
.dropzone.compact svg.ico { width: 24px; height: 24px; }
.dropzone.compact small { display: none; }
.pjreset { display: flex; flex-direction: column; gap: 6px; }
.pjreset > .btn { align-self: flex-start; }
.pjreset p { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.pjreset .row { display: flex; flex-wrap: wrap; gap: 6px; }
.pjacts { display: flex; flex-direction: column; gap: 8px; }
.pjacts .row .btn { flex: 1 1 auto; }
.pstage { gap: 10px; }
.pkpis { flex: none; }
.pkpis .kpi b.money { font-size: clamp(17px, 1.5vw, 22px); }
.pkpis .kpi small { color: var(--warn); font-weight: 600; }
.pkpis .kpi.net { background: var(--accent-soft); }
.pkpis .kpi.net b { color: var(--accent); }
.pjmsg { display: flex; align-items: flex-start; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r); padding: 9px 12px; box-shadow: var(--sh-1); }
.pjmsg:has(.status:empty) { display: none; }
.pjmsg:has(.status.err) { border-left-color: var(--danger); background: var(--danger-soft); }
.pjmsg > svg.ic { color: var(--accent); margin-top: 1px; }
.pjmsg:has(.status.err) > svg.ic { color: var(--danger); }
.pjmsg .status { flex: 1; font-size: 13.5px; color: var(--ink); }
.pbar { display: block; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 6px; }
.pbar i { display: block; height: 100%; background: var(--accent); transition: width .5s ease; }
.pjbar { position: sticky; top: 0; z-index: 3; display: flex; flex-direction: column; gap: 8px; padding: 8px 0; background: var(--bg); }
.pjbar .pjrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pjbar .pjrow > .chips { flex: 1 1 0; }
.pjbar .chips { flex: 1 1 auto; min-width: 0; }
.pjbar .chips:empty { display: none; }
.pjsearch { position: relative; flex: 0 1 300px; min-width: 200px; margin-left: auto; }
.pjsearch svg.ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-3); pointer-events: none; }
.pjsearch input { width: 100%; padding-left: 36px !important; border-radius: 999px !important; }
.pjstates .chip { min-height: 28px; font-size: 12.5px; }
.pjstates .chip[data-sf="rev"].sel, .pjstates .chip[data-sf="np"].sel, .pjstates .chip[data-sf="qd"].sel { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.pjstates .chip[data-sf="rev"].sel .n, .pjstates .chip[data-sf="np"].sel .n, .pjstates .chip[data-sf="qd"].sel .n { color: var(--warn); }
.pjfloor { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 10px 2px 2px; flex-wrap: wrap; }
.pjfloor h3 { font-size: 16px; }
.pjfloor small { color: var(--ink-3); font-family: var(--f-mono); font-size: 12px; }
.pjlist { display: flex; flex-direction: column; gap: 8px; }
.pjempty { min-height: 50vh; }
.pjread { min-height: 50vh; }
.pjread .scanwrap { max-width: 48%; }
.pjread .rcol .btn { margin-top: 4px; }
@media (max-width: 860px) { .emptyplan.pjread { flex-direction: column; align-items: stretch; padding: 18px; gap: 16px; } .pjread .scanwrap { max-width: 100%; } }
/* una línea: referencia del cliente | producto ofrecido y opciones | cantidades e importe */
.pl { display: grid; grid-template-columns: minmax(200px, 0.9fr) minmax(0, 2.1fr) 210px; gap: 0; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; }
.pl > * { padding: 12px 14px; min-width: 0; }
.pl .src { display: flex; flex-direction: column; gap: 8px; background: var(--subtle); border-right: 1px solid var(--line); }
.pl .src .sh { display: flex; gap: 10px; align-items: flex-start; }
.pl .src .sh .hd { flex-direction: column; align-items: flex-start; gap: 6px; }
.pl .cap { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.pl .th, .pl .noimg { width: 96px; height: 96px; flex: none; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--line); }
.pl .noimg { display: grid; place-items: center; font-size: 11px; color: var(--ink-3); text-align: center; padding: 4px; }
.pl .src .meta { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pl .hd { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pl .tag { white-space: nowrap; font-family: var(--f-mono); font-weight: 700; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 7px; }
.pl .qty { font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-2); }
.pl .qty.diff { color: var(--warn); font-weight: 600; background: var(--warn-soft); border-radius: 6px; padding: 0 6px; box-shadow: inset 0 0 0 1px var(--warn-line); }
.pl .src p { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pl .src p.open { -webkit-line-clamp: unset; display: block; }
.pl .src .more { align-self: flex-start; font-size: 12px; }
.pl .dst { display: flex; flex-direction: column; gap: 10px; }
.pl .dsel { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; }
.pl .dsel .dtx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pl .dsel .dtop { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pl .dst b { font-family: var(--f-display); font-size: 15px; line-height: 1.25; }
.pl .dst small { display: block; color: var(--ink-3); font-size: 12px; line-height: 1.35; }
.pl .dst small.why { color: var(--ink-2); font-style: normal; }
.pl .dst small.why::before { content: "ROMO: "; font-weight: 600; color: var(--ink-3); }
.pl.nosel .dsel .noimg { border-style: dashed; }
.pl .dsel select { margin-top: 5px; max-width: 240px; min-height: 30px; font-size: 12.5px; }
.pl .opts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.pl .optw { position: relative; min-width: 0; display: flex; }
.pl .optw > .opt { flex: 1; min-width: 0; }
.pl .opt { display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; min-width: 0; text-align: left; color: var(--ink); position: relative; transition: border-color .12s, box-shadow .12s; }
.pl .opt img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 6px; }
.pl .opt .onm { font-size: 11.5px; font-weight: 600; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.pl .opt .op { font-family: var(--f-mono); font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl .opt .op i { font-style: normal; }
.pl .opt .pim { position: relative; display: block; }
.pl .opt .pim .brandtag { position: absolute; left: 3px; bottom: 3px; font-size: 9.5px; padding: 0 4px; box-shadow: 0 0 0 1px #fff; }
.pl .opt:hover { border-color: var(--accent); }
.pl .opt.on, .pl .opt[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.pl .opt.on::after { content: ""; position: absolute; top: 8px; left: 8px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 13px no-repeat; box-shadow: 0 0 0 2px #fff; }
.pl .opt.more { align-items: center; justify-content: center; text-align: center; color: var(--accent); border-style: dashed; background: var(--subtle); }
.pl .opt.more svg { width: 24px; height: 24px; }
.pl .opt.more .onm { -webkit-line-clamp: 3; overflow-wrap: normal; }
.pl .opt.alt { border-color: #b7791f; box-shadow: inset 0 0 0 1px #b7791f; }
.pl .optalt { position: absolute; top: 4px; right: 4px; font-size: 10.5px; font-weight: 700; line-height: 1; padding: 4px 6px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.pl .optalt:hover:not(:disabled) { border-color: #b7791f; color: #8a5a12; }
.pl .optalt.on { background: #b7791f; border-color: #b7791f; color: #fff; }
.pl .optalt:disabled { opacity: .35; cursor: default; }
.pl .alts { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; padding: 7px 9px; border-radius: 8px; background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn); font-size: 12px; }
.pl .alts-h { font-weight: 600; font-size: 11.5px; }
.pl .alts .mut { font-weight: 400; }
.pl .alti { display: flex; gap: 7px; align-items: flex-start; }
.pl .alts b { flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; background: #b7791f; color: #fff; font-size: 10px; font-family: var(--f-body); }
.pl .altt { display: flex; flex-direction: column; min-width: 0; color: var(--ink); }
.pl .altt strong { font-weight: 600; }
.pl .altt small { color: var(--ink-2); font-size: 11.5px; line-height: 1.35; }
.pl .altcat { align-self: flex-start; font-size: 12.5px; }
.pl .pr { display: flex; flex-direction: column; gap: 8px; background: var(--subtle); border-left: 1px solid var(--line); }
.pl .pr .pl-l { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.pl .pr input { width: 100%; text-align: right; font-family: var(--f-mono); font-size: 14px; }
.pl .pr select { min-height: 32px; font-size: 13px; width: 100%; }
.pl .pr dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; font-size: 12.5px; }
.pl .pr dt { color: var(--ink-3); }
.pl .pr dd { margin: 0; text-align: right; font-family: var(--f-mono); color: var(--ink-2); }
.pl .pr dd.imp { font-size: 15px; font-weight: 600; color: var(--ink); }
.pl .pr .tot { font-family: var(--f-mono); font-size: 12.5px; text-align: right; color: var(--ink-2); }
.pl .pr .edited { font-size: 11px; color: var(--accent); font-weight: 600; font-family: var(--f-body); }
/* estados: breves y con icono, no solo color */
.st { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 9px 2px 6px; white-space: nowrap; line-height: 1.4; }
.st svg.ic { width: 13px; height: 13px; stroke-width: 2.6; }
.st.ok { background: var(--accent); color: var(--accent-ink); }
.st.auto { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-line); }
.st.rev { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.st.none { background: var(--sunken); color: var(--ink-2); }
.st.np { background: var(--surface); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.pl.rev .dsel b { color: var(--warn); }
/* estado de la línea de un vistazo: barra a la izquierda y una sola etiqueta */
.pl { border-left-width: 4px; }
.pl.ls-done { border-left-color: var(--ok); }
.pl.ls-rev, .pl.ls-cfg, .pl.ls-np { border-left-color: #e3b25d; }
.pl.ls-none { border-left-color: var(--line-strong); }
.lst { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 9px 2px 6px; white-space: nowrap; line-height: 1.4; }
.lst svg.ic { width: 13px; height: 13px; stroke-width: 2.6; }
.lst.done { background: var(--ok-soft); color: var(--ok); }
.lst.rev, .lst.cfg, .lst.np { background: var(--warn-soft); color: var(--warn); }
.lst.none { background: var(--sunken); color: var(--ink-2); }
@media (max-width: 960px) { .app[data-mode="proj"].haslines #projStage { order: -1; } }
.pl.none .dst { opacity: .9; }
.pl .pr dd.warn { color: var(--warn); font-weight: 600; }
.pl .pr dd.imp .st { font-size: 11px; }
.pl .dst > .cap, .pl .pr > .cap, .pl .src > .cap { margin-bottom: -2px; }
body.modal-open { overflow: hidden; }
/* ═════ ROMO Proyectos · propuesta paso a paso ═════ */
.app[data-mode="proj"].guide { grid-template-columns: minmax(0, 1fr); }
.app.guide #projRail { display: none !important; }
.app.guide #projStage > :not(.gd-switch):not(#pjGuide) { display: none !important; }
.pjundo { display: inline-flex; align-items: center; gap: 6px; }
body:not([data-mode="proj"]) .pjundo { display: none; }
.pjundo .btn svg { width: 17px; height: 17px; }
@media (max-width: 640px) { .pjundo .btn span { display: none; } .pjundo .btn { padding-inline: 8px; } }
.gd-switch { display: flex; justify-content: flex-end; }
.gd-switch .seg { flex: none; }
.guide-w[hidden] { display: none; }
.guide-w { display: grid; gap: 14px; max-width: 1180px; width: 100%; margin: 0 auto; }
.guide-w.over .gdrop { border-color: var(--accent); background: var(--accent-soft); }
.gd-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 6px 0; }
.gd-steps li { flex: 1 1 0; min-width: 120px; }
.gd-steps a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 13px; font-weight: 600; }
.gd-steps .gsl-s { display: none; }
.gd-steps .gsn { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); color: var(--ink-2); font-size: 12px; }
.gd-steps .gsn svg { width: 13px; height: 13px; stroke-width: 3; }
.gd-steps li.now a { border-color: var(--accent); color: var(--ink); box-shadow: 0 0 0 2px var(--accent-soft); }
.gd-steps li.now .gsn { background: var(--accent); color: #fff; }
.gd-steps li.done .gsn { background: var(--ok); color: #fff; }
.gd-steps li.skip a { opacity: .6; }
.gd-steps li.busy .gsn { animation: gpulse 1.4s ease-in-out infinite; }
@keyframes gpulse { 50% { box-shadow: 0 0 0 5px var(--accent-soft); } }
@media (prefers-reduced-motion: reduce) { .gd-steps li.busy .gsn { animation: none; } }
.gd-body { display: grid; gap: 14px; }
.gcard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--sh-1); scroll-margin-top: 64px; }
.gcard.now { border-color: var(--accent-line, var(--accent)); }
.gcard.wait .gbody { opacity: .78; }
.gh { display: flex; align-items: center; gap: 12px; padding: 14px 16px 6px; }
.gn { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--sunken); color: var(--ink-2); }
.gcard.now .gn, .gcard.busy .gn { background: var(--accent); color: #fff; }
.gcard.done .gn { background: var(--ok); color: #fff; }
.gn svg { width: 15px; height: 15px; stroke-width: 3; }
.ght { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ght h3 { margin: 0; font-family: var(--f-display); font-size: 17px; line-height: 1.25; }
.ght small { color: var(--ink-3); font-size: 13px; }
.gbody { padding: 6px 16px 16px 58px; display: grid; gap: 12px; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gf { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.gf input, .gf textarea { font: inherit; font-weight: 400; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 8px 10px; resize: vertical; }
.gf input:focus, .gf textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.gdrop { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 1.5px dashed var(--line-strong); background: var(--subtle); border-radius: 14px; padding: 22px 18px; cursor: pointer; color: var(--ink); font: inherit; }
.gdrop:hover, .gdrop:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.gdrop svg { flex: none; width: 34px; height: 34px; color: var(--accent); }
.gdrop span { display: flex; flex-direction: column; gap: 2px; }
.gdrop b { font-size: 16px; }
.gdrop small { color: var(--ink-3); font-size: 13px; }
.gdrop.compact { padding: 10px 14px; }
.gdrop.compact svg { width: 22px; height: 22px; }
.gdrop.compact b { font-size: 14px; }
.gsrcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.gsrc { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.gs-im { position: relative; display: block; height: 78px; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.gs-im img { width: 100%; height: 100%; object-fit: contain; }
button.gs-im { width: 100%; padding: 0; cursor: zoom-in; font: inherit; color: inherit; transition: border-color .12s, box-shadow .12s; }
button.gs-im:hover, button.gs-im:focus-visible { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.gs-zm { position: absolute; right: 4px; bottom: 4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); opacity: 0; transition: opacity .12s; }
.gs-zm svg.ic { width: 13px; height: 13px; }
button.gs-im:hover .gs-zm, button.gs-im:focus-visible .gs-zm { opacity: 1; }
@media (hover: none) { .gs-zm { opacity: .9; } }
/* vista previa en grande */
.gpvbox { width: min(1320px, 100%); height: calc(100vh - 40px); height: calc(100dvh - 40px); }
.gpvbox .cp-h { align-items: center; }
.gpvbox .cp-h .gtype { font-size: 12px; min-height: 28px !important; padding: 2px 22px 2px 10px !important; }
.gpv-stage { flex: 1; min-height: 0; overflow: hidden; background: #f3f1ed; display: flex; align-items: center; justify-content: center; position: relative; outline: none; touch-action: manipulation; }
.gpv-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.gpv-stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; cursor: zoom-in; user-select: none; -webkit-user-select: none; background: #fff; }
.gpv-stage.z { overflow: auto; display: block; touch-action: pan-x pan-y; }
.gpv-stage.z img { max-width: none; max-height: none; width: auto; height: auto; margin: 0 auto; cursor: grab; }
.gpv-stage.z.drag img { cursor: grabbing; }
.gpv-foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); }
.gpv-st { flex: 1; text-align: center; font-size: 12.5px; color: var(--ink-3); min-width: 0; }
button.gm { padding: 0; cursor: zoom-in; font: inherit; color: inherit; }
button.gm:hover:not(:disabled), button.gm:focus-visible { border-color: var(--accent); }
.gsrc figcaption { display: flex; flex-direction: column; align-items: stretch; gap: 3px; font-size: 11.5px; color: var(--ink-3); }
.gsrc figcaption .gtype { width: 100%; }
.gs-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gtype { flex: none; border: 0 !important; border-radius: 999px !important; min-height: 22px !important; padding: 1px 18px 1px 8px !important; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; background: var(--sunken) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2347504b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 5px center / 9px no-repeat; color: var(--ink-2); -webkit-appearance: none; appearance: none; max-width: 100%; }
.gtype.t-otro { background-color: var(--sunken); color: var(--ink-3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gtype { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b6bfb9' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); } }
:root[data-theme="dark"] .gtype { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b6bfb9' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
.gsrc { position: relative; }
.gsrc.t-otro .gs-im img, .gm.t-otro img { filter: blur(1.6px) grayscale(1); opacity: .45; }
.gsrc.t-otro .gs-im { border-style: dashed; }
.gs-off { position: absolute; left: 0; right: 0; top: 31px; text-align: center; font-size: 11px; font-weight: 700; color: var(--ink-2); pointer-events: none; text-shadow: 0 0 6px #fff, 0 0 2px #fff; }
.gpw { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.gpw > button:first-child { width: 100%; }
.gdis { align-self: center; font-size: 12px; color: var(--ink-3); }
.gdis:hover { color: var(--danger); }
.gdis svg { width: 13px; height: 13px; }
.gtype.t-plano { background-color: #e3ecf7; color: #3d5a73; }
.gtype.t-ambiente { background-color: #f4e9da; color: #7a5420; }
.gtype.t-producto { background-color: var(--ok-soft); color: var(--ok); }
.gtype:focus-visible { outline: 2px solid var(--accent) !important; box-shadow: none !important; }
.ghint, .gmut { margin: 0; font-size: 13px; color: var(--ink-3); }
.gmini { display: flex; flex-wrap: wrap; gap: 6px; }
.gm { position: relative; width: 64px; height: 52px; border-radius: 6px; border: 1px solid var(--line); background: #fff; overflow: hidden; }
.gm img { width: 100%; height: 100%; object-fit: contain; }
.gm i { position: absolute; left: 0; right: 0; bottom: 0; font-style: normal; font-size: 9.5px; font-weight: 700; text-align: center; padding: 1px 0; background: var(--sunken); color: var(--ink-2); }
.gm.t-plano i { background: #e3ecf7; color: #3d5a73; } .gm.t-ambiente i { background: #f4e9da; color: #7a5420; } .gm.t-producto i { background: var(--ok-soft); color: var(--ok); }
.gbody > .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gbody .btn svg { width: 15px; height: 15px; }
.gbusy { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.gout { margin: 0; font-size: 13.5px; color: var(--warn); }
.gok { margin: 0; font-size: 13.5px; color: var(--ok); font-weight: 600; }
.gq { margin: 0; font-weight: 600; }
.gread { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 14px; align-items: start; }
.gread .scanwrap { display: block; max-width: 100%; }
.gread .scanwrap img { width: 100%; display: block; }
.grt { display: flex; flex-direction: column; gap: 6px; }
.grt small { font-size: 13px; color: var(--ink-2); }
.grt .mut { color: var(--ink-3); }
.gread.err b { color: var(--warn); }
.gfound { font-size: 12.5px; color: var(--ink-2); gap: 3px; }
.gfound:empty { display: none; }
.gdone { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gdone button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--ok-soft); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink); }
.gdone svg { width: 14px; height: 14px; color: var(--ok); stroke-width: 3; }
.gdone small { color: var(--ink-3); }
.pages.gplans { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pages.gplans .pg-im { height: 120px; }
.pages button.used { opacity: .7; }
.gpcs { display: grid; gap: 12px; }
.gpc { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 8px; background: var(--surface); border-left: 4px solid #e3b25d; }
.gpc.ok { border-left-color: var(--ok); }
.gpc-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gpc-h b { font-size: 15px; }
.gpn { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--sunken); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.gqty { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.gqty input { width: 76px; font: inherit; font-size: 15px; font-weight: 600; text-align: right; border: 1px solid var(--line-strong); border-radius: var(--r); padding: 5px 8px; background: var(--surface); color: var(--ink); }
.gqty input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.gpq { font-size: 12px; color: var(--ink-3); margin-top: -4px; }
.gpc-b { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 14px; align-items: start; }
.gref { display: flex; flex-wrap: wrap; gap: 6px; }
.gref img { width: 100%; height: 160px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.gref img.more { width: calc(50% - 3px); height: 64px; }
.grefb { position: relative; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 10px; display: block; }
.grefb img { display: block; }
.grefz { position: absolute; right: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--accent-line); border-radius: 999px; padding: 2px 8px; }
.grefz svg.ic { width: 13px; height: 13px; }
.grefb:hover img, .grefb:focus-visible img { border-color: var(--accent); }
.gcfg .cfgsum { width: 100%; }
.gref .noimg { width: 100%; height: 120px; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--ink-3); font-size: 13px; }
.gref small { font-size: 12px; color: var(--ink-2); line-height: 1.35; }
.gopts-w { display: grid; gap: 6px; min-width: 0; }
.gopts-w .lbl { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.gopts { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.gopt { position: relative; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; align-items: stretch; text-align: left; font: inherit; color: var(--ink); min-height: 150px; }
.gopt:hover { border-color: var(--accent); }
.gopt .pim { position: relative; display: block; height: 96px; background: #fff; border-radius: 6px; }
.gopt .pim img { width: 100%; height: 100%; object-fit: contain; }
.gopt .pim .brandtag { position: absolute; left: 3px; bottom: 3px; }
.gopt .onm { font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.gopt small { font-size: 11.5px; color: var(--ink-3); }
.gopt.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.gbadge { position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-style: normal; font-weight: 700; font-size: 13px; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.gopt.more { align-items: center; justify-content: center; color: var(--accent); border-style: dashed; }
.gopt.more svg { width: 22px; height: 22px; }
.gopt.more .onm { text-align: center; }
.gflash { color: var(--warn); font-size: 12.5px; font-weight: 600; }
.gopts-w .why { font-size: 12px; color: var(--ink-3); }
.gadd { display: grid; gap: 6px; }
.gadd .lbl { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.gadd .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gadd .chip svg { width: 13px; height: 13px; }
.gtabs { display: flex; flex-wrap: wrap; gap: 6px; }
.g3box { width: min(1400px, 100%); height: calc(100vh - 40px); height: calc(100dvh - 40px); }
.g3body { flex: 1; min-height: 0; padding: 0 16px 16px; display: flex; }
.g3body .v3 { flex: 1; height: auto; min-height: 0; }
.guni { border: 1.5px solid var(--accent); background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; }
.guni p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.guni b { color: var(--ink); }
.gpside > .btn { justify-self: start; }
.gask { border: 1.5px solid var(--accent); background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px; }
.gask p { margin: 0; color: var(--ink-2); }
.gask-o { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.gask-o .btn { flex: 1 1 220px; flex-direction: column; align-items: flex-start; min-height: 56px; padding: 8px 14px; font-weight: 600; text-align: left; }
.gask-o .btn small { font-weight: 400; font-size: 12.5px; color: var(--ink-3); }
.gask-o .btn:first-child { border-color: var(--accent); }
.gplanbox { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.gplan { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px; line-height: 0; }
.gplan svg { width: 100%; height: auto; max-height: 560px; display: block; }
.gpside { display: grid; gap: 10px; align-content: start; }
.gpside .mut { font-size: 12.5px; color: var(--ink-3); }
.gdist { display: flex; flex-wrap: wrap; gap: 6px; }
.gcounts { display: grid; gap: 8px; }
.gcnt { display: grid; gap: 4px; font-size: 13.5px; }
.gcnt b { font-size: 17px; }
.gcnt select { font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--ink); }
.gsum { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gsum li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; }
.gsum li.warn { border-color: var(--warn-line, #e3b25d); background: var(--warn-soft); }
.gsum img, .gsum .noimg { flex: none; width: 46px; height: 46px; object-fit: contain; background: #fff; border-radius: 6px; border: 1px solid var(--line); }
.gsl { display: flex; flex-direction: column; min-width: 0; }
.gsl small { color: var(--ink-2); font-size: 12.5px; }
.gcheck { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.gcheck input { width: 18px; height: 18px; accent-color: var(--accent); }
.gchecks { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.gpres { margin: 8px 0 0; font-size: 13px; }
.gacts { display: flex; flex-wrap: wrap; gap: 8px; }
.gacts .btn svg { width: 16px; height: 16px; }
@media (max-width: 900px) { .gplanbox { grid-template-columns: minmax(0, 1fr); } .gread { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .gbody { padding: 4px 12px 14px; }
  .g2 { grid-template-columns: 1fr; }
  .gd-steps li { min-width: 0; flex: 1 1 18%; }
  .gd-steps { gap: 4px; padding: 4px 0; }
  .gd-steps a { flex-direction: column; gap: 2px; padding: 5px 2px; font-size: 10.5px; text-align: center; }
  .gd-steps .gsl-l { display: none; } .gd-steps .gsl-s { display: block; }
  .gd-steps .gsn { width: 20px; height: 20px; font-size: 11px; }
  .gpc-b { grid-template-columns: minmax(0, 1fr); }
  .gref img { height: 140px; }
  .gopts { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding: 8px 2px 6px; margin: -8px -2px 0; -webkit-overflow-scrolling: touch; }
  .gopt { flex: 0 0 116px; min-height: 132px; scroll-snap-align: start; }
  .gopt .pim { height: 80px; }
  .gd-switch { justify-content: stretch; } .gd-switch .seg { flex: 1; }
}

/* elegir el plano de un PDF con varios (página y recorte) */
.pagefield { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0 2px; font-size: 13px; color: var(--ink-2); }
.pagefield span { flex: 1; min-width: 0; }
.pagefield[hidden] { display: none; }
.hjbox { width: min(1240px, 100%); height: calc(100vh - 40px); height: calc(100dvh - 40px); }
.hj-pages { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 10px; flex: none; }
.hj-pages[hidden] { display: none; }
.hj-pages button { flex: none; width: 96px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 5px; display: flex; flex-direction: column; gap: 3px; align-items: center; font-size: 12px; cursor: pointer; color: var(--ink-2); }
.hj-pages button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); color: var(--ink); font-weight: 600; }
.hp-im, .pg-im { position: relative; display: block; width: 100%; height: 64px; background: #fff; border-radius: 4px; }
.pg-im { height: 90px; }
.hp-im img, .pg-im img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hp-im i, .pg-im i { position: absolute; left: 3px; bottom: 3px; font-style: normal; font-size: 10.5px; font-weight: 700; background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 6px; }
.pg-ld { position: absolute; inset: 0; background: linear-gradient(90deg, var(--sunken), var(--subtle), var(--sunken)); background-size: 200% 100%; animation: pgld 1.2s linear infinite; border-radius: 4px; }
@keyframes pgld { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .pg-ld { animation: none; } }
.pages.cands { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.pages.cands .pg-im { height: 110px; }
.pg-more { margin-top: 8px; }
.hj-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 16px; background: var(--sunken); overflow: hidden; }
.hj-wrap { position: relative; max-width: 100%; max-height: 100%; display: inline-block; line-height: 0; }
.hj-wrap img { display: block; max-width: 100%; max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); width: auto; height: auto; background: #fff; box-shadow: var(--sh-2); }
.hj-ov { position: absolute; inset: 0; cursor: crosshair; touch-action: none; overflow: hidden; }
.hj-c { position: absolute; border: 2px dashed var(--accent); border-radius: 4px; background: rgba(61, 90, 115, .06); pointer-events: none; }
.hj-c.on { border-style: solid; background: none; }
.hj-c button { pointer-events: auto; position: absolute; left: -2px; top: -2px; font-family: inherit; font-weight: 600; font-size: 12px; line-height: 1; background: var(--accent); color: #fff; border: 0; border-radius: 4px 0 6px 0; padding: 5px 8px; cursor: pointer; }
.hj-c button:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 1px; }
.hj-sel { position: absolute; border: 2px solid var(--accent); box-shadow: 0 0 0 9999px rgba(18, 22, 20, .38); pointer-events: none; border-radius: 2px; }
.hj-foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hj-st { flex: 1; min-width: 180px; font-size: 13px; color: var(--ink-2); }
@media (max-width: 640px) { .hj-st { flex-basis: 100%; } .hj-foot .btn { flex: 1; white-space: nowrap; justify-content: center; } .hj-wrap img { max-height: calc(100dvh - 300px); } .hj-pages button { width: 84px; } }
.foldbtn.ping { position: relative; border-color: var(--accent); color: var(--accent); }
.foldbtn.ping::after { content: ""; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--cota); box-shadow: 0 0 0 2px var(--surface); }
.foldbtn svg { transition: transform .15s; }

/* ═══════════ escritorio: cada columna se desplaza por su cuenta ═══════════ */
@media (min-width: 961px) {
  html, body { height: 100%; }
  body { display: flex; flex-direction: column; overflow: hidden; padding-block: 12px 0; }
  .top { flex: none; width: 100%; }
  .app { flex: 1 1 auto; min-height: 0; width: 100%; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  .rail, .stage, .pstage { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 6px 24px 2px; scrollbar-gutter: stable; }
  .rail > *, .stage > * { flex-shrink: 0; }
  .chat { position: static; height: auto; min-height: 0; margin-bottom: 14px; }
  .stage > .toolbar { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 4px 0 6px; margin-top: -4px; }
}
@media (max-width: 1820px) { .modes button small { display: none; } .modes button { min-height: 38px; } }
@media (max-width: 1560px) { .tbgrp .tl { display: none; } .brand p { display: none; } }
@media (max-width: 1180px) {
  .pl { grid-template-columns: minmax(0, 1fr) 200px; }
  .pl .src { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 14px; row-gap: 4px; align-items: start; }
  .pl .src > .cap { grid-column: 1 / -1; }
  .pl .src > .sh { grid-row: 2 / span 2; }
  .pl .src > p, .pl .src > .more { grid-column: 2; }
  .pl .dst { grid-column: 1; }
  .pl .opts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  body { padding-block: 10px 28px; }
  .top { gap: 10px; }
  .brand { width: 100%; }
  .modewrap { width: 100%; }
  .modes { width: 100%; }
  .modes button { flex: 1 1 0; justify-content: center; }
  .toolsr { width: 100%; }
  .project { flex: 1 1 auto; }
  .project input { width: 100%; max-width: none; }
  .app, .app[data-mode="config"], .app[data-mode="proj"] { grid-template-columns: minmax(0, 1fr); }
  .chat { position: static; height: 72vh; height: 72dvh; }
  .app[data-mode="config"] .stage { order: -1; }
  .editor { grid-template-columns: minmax(0, 1fr); }
  .foldbtn { display: inline-flex !important; }
  .chat-h small { display: none; }
  .chat-h #chatRestart .lbl { display: none; }
  .chat-h #chatRestart { margin-left: auto; padding: 0; width: var(--h-sm); }
  body.folded .chat { height: auto; }
  body.folded .chat > :not(.chat-h) { display: none !important; }
  body.folded .rail > :not(.undobar) { display: none !important; }
  .sheet svg { max-height: 78vh; }
  .pjsearch { flex: 1 1 100%; margin-left: 0; }
  .pjbar { position: static; }
  .pjbar .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
  .pjbar .chips .chip { flex: none; }
}
@media (max-width: 760px) {
  .pl { grid-template-columns: minmax(0, 1fr); }
  .pl .dst { grid-column: auto; }
  .pl .pr { border-left: 0; border-top: 1px solid var(--line); }
  .pl .opts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pl .th, .pl .noimg { width: 84px; height: 84px; }
  .pl .dsel { grid-template-columns: 84px minmax(0, 1fr); }
  .cp-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; padding: 12px; }
  .hrow { grid-template-columns: 60px minmax(0, 1fr); gap: 8px 12px; }
  .hth { width: 60px; height: 46px; }
  .hsum { grid-column: 2; }
  .hact { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 640px) {
  .kpis { flex-wrap: wrap; }
  .kpi { flex: 1 1 22%; padding: 7px 10px; }
  .kpi b { font-size: 19px; }
  .kpi span { font-size: 11.5px; }
  .kpi.dist-kpi { flex: 1 1 100%; border-left: 3px solid var(--dc, var(--line)); border-top: 1px solid var(--line); }
  .pkpis .kpi { flex: 1 1 45%; }
  .pkpis .kpi:nth-child(odd) { border-left: 0; }
  .pkpis .kpi:nth-child(-n+2) { border-top: 0; }
  .pkpis .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .pkpis .kpi:last-child { flex-basis: 100%; border-left: 0; }
  .catpick { padding: 0; place-items: stretch; }
  .cp-box { width: 100%; max-height: none; height: 100%; border-radius: 0; border: 0; }
  .cp-h { padding: 12px 12px 8px; }
  .cp-h h3 { font-size: 16px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .cp-search, .cp-ctx { margin-inline: 12px; }
  .cp-f { padding-inline: 12px; }
  .fbar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
  .fbar > * { flex: none; }
  .fcount { margin-left: 0; order: -1; }
  .modes button { padding: 5px 8px; gap: 6px; }
  .modes { overflow-x: auto; scrollbar-width: none; }   /* con cuatro modos (página interna «todo») se desliza en vez de desbordar */
  .modes button { flex: 1 0 auto; }
  .tb-r { margin-left: 0; width: 100%; justify-content: space-between; }
  .grid3 { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ═══════════ acabados y opciones de producto (Proyectos y Configurador de producto) ═══════════ */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.fgrid.sm { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.fgrid.xs { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.fc { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--subtle); color: var(--ink); cursor: pointer; text-align: center; min-width: 0; transition: border-color .12s, box-shadow .12s, transform .12s; }
.fc:hover:not(:disabled) { border-color: var(--ink-3); }
.fc:focus-visible { outline: none; box-shadow: var(--ring); }
.fc .fs { display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); color: #fff; }
.fc .fs svg.ic { width: 26px; height: 26px; stroke-width: 1.8; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
.fgrid.xs .fc { padding: 4px; border-radius: 10px; gap: 4px; }
.fgrid.xs .fc .fs { aspect-ratio: 1; border-radius: 7px; }
.fc .fn { font-size: 13px; font-weight: 500; line-height: 1.2; padding: 0 2px 2px; overflow-wrap: anywhere; }
.fgrid.xs .fc .fn { font-size: 11.5px; font-family: var(--f-mono); }
.fc .fx { position: absolute; top: 10px; left: 10px; font-size: 10.5px; font-weight: 700; background: rgba(255, 255, 255, .92); color: #3b3f43; border-radius: 999px; padding: 1px 7px; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.fc.on { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); background: var(--surface); }
.fc.on .fn { font-weight: 700; }
.fc.on::after { content: ""; position: absolute; right: 12px; top: 10px; width: 22px; height: 22px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e5aa8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/14px no-repeat; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.fgrid.xs .fc.on::after { right: 7px; top: 7px; width: 18px; height: 18px; background-size: 12px; }
.fc.off { opacity: .4; cursor: default; }
.fc .fpide { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); white-space: nowrap; font-size: 10.5px; font-weight: 700; color: #fff; background: var(--ok); border-radius: 999px; padding: 1px 8px; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.msw { display: inline-block; width: 16px; height: 16px; border-radius: 4px; vertical-align: -3px; margin-right: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.csub { margin: 14px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.csub:first-child { margin-top: 0; }
.csub .mut { text-transform: none; letter-spacing: 0; font-weight: 500; }
.cnote { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.cnote:empty { display: none; }
.cnote svg.ic { width: 14px; height: 14px; vertical-align: -2px; color: var(--warn); }
.cval { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); box-shadow: inset 0 0 0 1px var(--warn-line); font-size: 13px; color: var(--ink); }
.cval svg.ic { color: var(--warn); flex: none; margin-top: 1px; }
.cfx { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-top: 12px; }
.cfx input, .cfx textarea { font-weight: 400; font-size: 15px; }
.cpan { margin-top: 6px; padding: 2px 12px 12px; border-radius: 12px; background: var(--subtle); border: 1px solid var(--line); }
.csel { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 8px 10px; border-radius: 12px; background: var(--subtle); border: 1px solid var(--line); }
.csel img { width: 64px; height: 54px; object-fit: contain; background: #fff; border-radius: 8px; flex: none; }
.csel b { display: block; font-size: 13.5px; }
.csel small { color: var(--ink-3); font-size: 12px; }
.cext { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); }
.cext input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cext .sw-ui, .pc-3d .sw-ui { flex: none; width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .15s; }
.cext .sw-ui::after, .pc-3d .sw-ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .15s; }
.cext input:checked + .sw-ui, .pc-3d input:checked + .sw-ui { background: var(--accent); }
.cext input:checked + .sw-ui::after, .pc-3d input:checked + .sw-ui::after { transform: translateX(16px); }
.cext input:focus-visible + .sw-ui, .pc-3d input:focus-visible + .sw-ui { box-shadow: var(--ring); }
.cext > svg.ic { color: #c98a12; flex: none; }
.cext b { display: block; font-size: 13.5px; }
.cext small { display: block; font-size: 12px; color: var(--ink-3); }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.mc { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; text-align: left; color: var(--ink); min-width: 0; }
.mc:hover { border-color: var(--ink-3); }
.mc .mi { position: relative; display: block; }
.mc .mi img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 8px; }
.mc .mi .brandtag { position: absolute; left: 4px; bottom: 4px; }
.mc .mn { font-size: 13px; font-weight: 600; line-height: 1.2; }
.mc .mp { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-2); }
.mc.on { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.mc.on::after { content: ""; position: absolute; right: 10px; top: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/14px no-repeat; }
.mc.more { align-items: center; justify-content: center; text-align: center; border-style: dashed; color: var(--accent); background: var(--subtle); min-height: 120px; }
.mc.more svg.ic { width: 26px; height: 26px; }
.shp { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.shp .sh { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 500; }
.shp .sh svg { width: 26px; height: 26px; fill: var(--sunken); stroke: var(--ink-2); stroke-width: 1.6; }
.shp .sh.on { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); font-weight: 700; }
.shp .sh.on svg { fill: var(--accent-soft); stroke: var(--accent); }
.szs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.sz { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; }
.sz b { font-family: var(--f-mono); font-size: 15px; }
.sz small { font-size: 11.5px; color: var(--ink-3); }
.sz.on { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.sz.alt { border-style: dashed; }
.tgrid, .lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 10px; }
/* bancada por módulos: composición */
.mdlead { margin: 0 0 10px; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.mdgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.mdc, .mdpre { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 10px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; min-width: 0; transition: border-color .12s, box-shadow .12s; }
.mdc:hover, .mdpre:hover { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mdc .mdi { width: 44px; height: 44px; color: var(--ink-2); }
.mdc .mdi svg { width: 100%; height: 100%; display: block; }
.mdc b, .mdpre b { font-size: 13.5px; }
.mdc small, .mdpre small { font-size: 11.5px; color: var(--ink-3); line-height: 1.3; }
.mdp { font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.mdpre .mdsvg { width: 100%; height: 64px; background: #f6f3ee; border-radius: 8px; margin-bottom: 4px; }
.mdbox { display: flex; flex-direction: column; gap: 12px; }
.mdplan { background: #f6f3ee; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.mdplan .mdsvg { display: block; width: 100%; max-height: 220px; }
.mdsum { margin: 6px 0 0; font-size: 12.5px; color: #3b352f; text-align: center; }
.mdsum.lin { color: var(--ink); text-align: left; font-size: 13.5px; margin-top: 10px; }
.mdseq { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mdq { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 2px 4px 2px 4px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: 13px; }
.mdq.rc { background: var(--accent-soft); border-color: var(--accent-line); }
.mdq .mdn { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 50%; background: var(--sunken); font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.mdq .mdt { padding: 0 4px; font-weight: 600; }
.mdq button.mdt { border: 0; background: none; color: var(--ink); cursor: pointer; font: inherit; font-weight: 600; text-decoration: underline dotted var(--ink-3); text-underline-offset: 3px; min-height: 26px; }
.mdq .mdx { border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 17px; line-height: 1; width: 26px; height: 26px; border-radius: 50%; }
.mdq .mdx:hover { background: var(--sunken); color: var(--ink); }
.mdadd, .mdpuf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mdadd .mdl, .mdpuf .mdl { font-size: 12px; font-weight: 700; color: var(--ink-2); min-width: 108px; }
.mdab { display: flex; flex-wrap: wrap; gap: 6px; }
.mda svg.ic { width: 14px; height: 14px; }
.mda:disabled { opacity: .45; cursor: not-allowed; }
.mdst { display: inline-flex; align-items: center; gap: 8px; }
.mdst .chip { min-width: 34px; justify-content: center; font-size: 16px; padding: 0 10px; }
.mdst b { min-width: 18px; text-align: center; font-family: var(--f-mono); }
.mdpuf small { font-size: 11.5px; color: var(--ink-3); }
.mdtab { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mdtab caption { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); padding-bottom: 4px; }
.mdtab td, .mdtab th { padding: 5px 4px; border-top: 1px solid var(--line); text-align: right; font-family: var(--f-mono); }
.mdtab td:first-child, .mdtab th:first-child { text-align: left; font-family: inherit; }
.mdtab tfoot th, .mdtab tfoot td { font-weight: 700; border-top: 1px solid var(--line-strong); }
.mdmed summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--accent); min-height: 28px; display: flex; align-items: center; gap: 6px; }
.mdmg { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-top: 6px; }
.mdmi { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 6px; font-size: 12px; color: var(--ink-2); }
.mdmi span { grid-column: 1 / -1; font-weight: 600; }
.mdmi input { width: 100%; }
.mdmi small { color: var(--ink-3); }
.mdfoot { display: flex; justify-content: flex-end; }
.tc, .lc { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 6px 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; min-width: 0; }
.tmos { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--sunken); }
.tmos i { display: block; background-size: cover; background-position: center; }
.tmos i:only-child { grid-column: span 2; grid-row: span 2; }
.tmos.cli { display: grid; place-items: center; color: var(--ink-3); background: repeating-linear-gradient(45deg, var(--sunken) 0 6px, var(--subtle) 6px 12px); }
.tmos.cli svg.ic { width: 30px; height: 30px; }
.tc .tn, .lc .tn { font-size: 13.5px; font-weight: 700; padding: 0 2px; }
.lc .tf { font-size: 11.5px; color: var(--ink-3); padding: 0 2px; line-height: 1.3; }
.tc .tp, .lc .tp { font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-2); padding: 0 2px; }
.tc.on, .lc.on { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.tc.on::after, .lc.on::after { content: ""; position: absolute; right: 12px; top: 12px; width: 22px; height: 22px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e5aa8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/14px no-repeat; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.tfab { margin-top: 10px; }
.tfab .tfn { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
/* Proyectos: cualquier color de la carta de una tela, por su código (sin muestra) */
.tcod { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.tcod input { width: 110px; min-height: 30px !important; padding: 0 8px !important; font-size: 12.5px; border-radius: 7px !important; }
.tcod.on { color: var(--accent); font-weight: 600; }
.tcod.on input { border-color: var(--accent); box-shadow: var(--ring); }
.tmos.cli.tarifa { color: var(--accent); background: repeating-linear-gradient(45deg, var(--accent-soft) 0 6px, var(--surface) 6px 12px); }

/* Proyectos: resumen de la configuración en cada línea */
.pl .cfgsum { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; width: 100%; min-height: 44px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--subtle); color: var(--ink); cursor: pointer; text-align: left; }
.pl .cfgsum:hover { border-color: var(--accent); }
.pl .cfgsum.miss { background: var(--surface); border-style: dashed; border-color: var(--line-strong); }
.pl .cchs { display: flex; gap: 6px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.pl .cch { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px 2px 3px; white-space: nowrap; }
.pl .cch i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
.pl .cch.pend { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); padding-left: 7px; }
.pl .cch.pend svg.ic { width: 13px; height: 13px; }
.pl .cch.empty { padding-left: 9px; color: var(--ink-3); }
.pl .cmiss { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--warn); }
.pl .cmiss svg.ic { width: 10px; height: 10px; }
.pl .cgo { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 13px; font-weight: 600; color: var(--accent); }
.pl .cgo svg.ic { width: 15px; height: 15px; }

/* ficha técnica del tipo de tablero */
.tc .tu { font-size: 11px; font-weight: 600; color: var(--ink-3); padding: 0 2px; }
.tfi { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--subtle); display: flex; flex-direction: column; gap: 6px; }
.tfi-d { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.tfi-d b { color: var(--ink); }
.tfi dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 12px; font-size: 12.5px; }
.tfi dt { color: var(--ink-3); }
.tfi dd { margin: 0; color: var(--ink); }
.tfi .cnote { margin: 0; }
/* ── estado de guardado: solo dice «Guardado» después de guardarse de verdad ── */
details.sec[open] > :not(summary), details.sub[open] > :not(summary) { animation: secin .18s ease-out; }
@keyframes secin { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.savest { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.savest:empty { display: none; }
.savest::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.savest[data-st="saved"] { color: var(--ok); }
.savest[data-st="dirty"], .savest[data-st="new"] { color: var(--warn); }
.savest[data-st="saving"]::before { animation: savepulse 1s ease-in-out infinite; }
.savest[data-st="error"] { color: var(--danger); }
@keyframes savepulse { 50% { opacity: .2; } }
/* ── inicio sin plano: el plano invita a empezar (subir, dibujar o ejemplo); sin cifras ni barra hasta tener plano ── */
#planStage.noplan .statbar, #planStage.noplan .toolbar, #planStage.noplan #legend { display: none; }
.emptyplan.start { gap: 22px; padding: 40px 28px; }
.st-h { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.st-h b { font-family: var(--f-display); font-size: 24px; letter-spacing: -0.01em; }
.st-h p { margin: 0; color: var(--ink-2); font-size: 15px; }
.st-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: min(860px, 100%); }
.stc { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px 18px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--sh-1); text-align: left; color: var(--ink); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
button.stc:hover { border-color: var(--accent-line); box-shadow: var(--sh-2); transform: translateY(-1px); }
.emptyplan .stc svg.ico { width: 38px; height: 38px; color: var(--accent); margin: 0 0 4px; padding: 0; border: 0; background: none; box-shadow: none; border-radius: 0; }
.app[data-mode="config"].noplan { grid-template-columns: minmax(0, 1fr); }
.app[data-mode="config"].noplan #rail { display: none; }
.app.noplan #planStage .sheetwrap, .app.noplan #sheet { min-height: 62vh; }
.stc b { font-family: var(--f-display); font-size: 17px; }
.stc small { color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.stc.draw { cursor: default; }
.st-dims { display: flex; align-items: flex-end; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--ink-3); }
.st-dims label { display: flex; flex-direction: column; gap: 2px; }
.st-dims input { width: 64px; min-height: 32px !important; }
.stc.draw .btn { margin-top: 6px; }
.emptyplan.has [data-analyze] { margin-top: 10px; align-self: flex-start; }
#chatRestart.confirm { color: var(--danger); background: var(--danger-soft); }
#chatRestart.confirm .lbl { display: inline !important; }
/* en 3D la acción principal es la imagen 3D; el PDF (del plano 2D) queda como secundaria */
#planStage.in3d #dlPdf { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
/* «Más formatos» de descarga */
.tbmore { position: relative; }
.tbmore > summary { list-style: none; cursor: pointer; }
.tbmore > summary::-webkit-details-marker { display: none; }
.tbmore[open] > summary { background: var(--sunken); }
.tbmenu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: flex; flex-direction: column; gap: 2px; min-width: 200px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-3); }
.tbmenu .btn { justify-content: flex-start; flex-direction: column; align-items: flex-start; gap: 0; min-height: 44px; padding: 6px 10px; }
.tbmenu .btn small { font-size: 11.5px; color: var(--ink-3); font-weight: 400; }
@media (max-width: 760px) { .st-cards { grid-template-columns: minmax(0, 1fr); } .emptyplan.start { padding: 24px 14px; } .stc { padding: 14px; } }

/* ROMO: configurador de producto a página completa (la misma ficha que en Proyectos) */
.app[data-mode="prod"] { grid-template-columns: minmax(0, 1fr); }
.prodpage { min-width: 0; }
.prodpage[hidden] { display: none; }
.cfg-box.pc-box { width: 100%; height: calc(100vh - 100px); height: calc(100dvh - 100px); min-height: 560px; max-height: none; box-shadow: var(--sh-1); }
.pc-box .cfg-body { grid-template-columns: minmax(420px, 54%) minmax(0, 1fr); }
.cf-act { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cfg-foot .btn { min-height: 40px; padding: 0 18px; }
.pc-note { font-size: 12.5px; color: var(--ink-3); max-width: 340px; }
.pc-note:empty { display: none; }
.pc-fams { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.pc-tools { display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.pc-q { flex: 1 1 240px; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.pc-q svg.ic { width: 17px; height: 17px; color: var(--ink-3); flex: none; }
.pc-q input { flex: 1 1 auto; min-width: 0; border: 0; background: none; font: inherit; color: var(--ink); outline: none; min-height: 38px; }
.pc-q:focus-within { box-shadow: var(--ring); border-color: var(--accent); }
.pc-3d { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.pc-3d input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pc-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.mc .mi .p3-cap { position: absolute; right: 4px; top: 4px; }
.pc-more { display: flex; justify-content: center; margin-top: 12px; }
.pc-leg { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 12px; }
.pv-tg { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pchips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.pchips .cch { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px 1px 2px; }
.pchips .cch i { width: 15px; height: 15px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
.prodrow .pcfg { margin-top: 4px; font-size: 12.5px; }
.prodrow .pcfg svg.ic { width: 15px; height: 15px; }
.pc-fams .chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
@media (max-width: 1360px) { .modes .mlong { display: none; } }

/* Proyectos: ficha de configuración (vista previa fija + pasos) */
.cfgdlg { padding: 16px; }
.cfg-box { width: min(1240px, 100%); height: calc(100vh - 32px); height: calc(100dvh - 32px); }
.cfg-box > .cp-h { border-bottom: 1px solid var(--line); }
.cfg-cli { color: var(--ink-3); }
.cfg-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(400px, 46%) minmax(0, 1fr); }
.cfg-pv { overflow-y: auto; padding: 16px; border-right: 1px solid var(--line); background: var(--subtle); display: flex; flex-direction: column; gap: 12px; }
.pv-img { position: relative; background: #fff; border-radius: 14px; border: 1px solid var(--line); aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.pv-img img { width: 92%; height: 92%; object-fit: contain; }
.pv-img .brandtag { position: absolute; left: 10px; top: 10px; }
.pv-tx { display: flex; flex-direction: column; gap: 6px; }
.pv-tx > .brandtag { align-self: flex-start; }
.pv-info { display: flex; flex-direction: column; gap: 10px; }
/* vista del producto configurado (3D) */
.pv-stage { position: relative; aspect-ratio: 1; max-height: 66vh; max-height: 66dvh; border-radius: 16px; border: 0; background: #f3f1ed; overflow: hidden; flex: none; box-shadow: inset 0 0 0 1px rgba(20, 28, 24, .06); }
.p3pv canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline: none; }
.p3pv canvas:active { cursor: grabbing; }
.p3pv canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--accent); }
.p3-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 6% 6% 64px; }
.p3pv[data-cap="foto"] .p3-foto { padding: 6% 6% 6%; }
.p3pv.verfoto .p3-foto { cursor: pointer; }
.p3pv[data-cap="foto"] .p3-foto, .p3pv.verfoto .p3-foto:only-child { cursor: default; }
.p3pv.verfoto.con3d .p3-foto { box-shadow: inset 0 0 0 2px var(--line-strong); }
.p3pv.verfoto.con3d::after { content: "Foto real · no enseña lo elegido"; position: absolute; left: 50%; top: 10px; transform: translateX(-50%); font-size: 11.5px; background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--ink-2); white-space: nowrap; }
.p3-vs { display: contents; }
.p3-vs[hidden], .p3-th[hidden] { display: none; }
.p3-th { display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.p3-bar .p3-th button { min-height: 0; height: 52px; width: 46px; padding: 2px; border-radius: 9px; display: flex; flex-direction: column; align-items: center; gap: 1px; background: #fff; flex: none; }
.p3-th img { width: 38px; height: 34px; object-fit: contain; display: block; }
.p3-th span { font-size: 9.5px; font-weight: 600; line-height: 1.1; max-width: 42px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p3-bar .p3-th button[aria-pressed="true"] { background: #fff; color: var(--ink); border-color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent); }
.p3pv.verfoto.con3d .p3-bar { align-items: flex-end; }
.p3-cap { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; padding: 1px 6px 1px 4px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); white-space: nowrap; }
.p3-cap svg.ic { width: 12px; height: 12px; }
.p3-cap[data-cap="3d"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }
.p3-bar { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.p3-bar[hidden] { display: none; }
.p3-bar button { min-height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .94); color: var(--ink-2); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.p3-bar button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }
.p3-bar .p3-ft { margin-left: 6px; }
.p3-tag { position: absolute; left: 8px; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 1px; padding: 5px 9px; border-radius: 10px; background: rgba(255, 255, 255, .86); font-size: 11.5px; line-height: 1.35; color: var(--ink-2); pointer-events: none; }
.p3-tag:empty, .p3pv.verfoto .p3-tag { display: none; }
.p3-tag b { color: var(--ink); font-size: 12px; }
.p3pv[data-estado="parcial"] .p3-tag small { color: var(--warn); }
.p3-load { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--ink-2); background: rgba(243, 241, 237, .7); }
.p3-load[hidden], .p3-pend[hidden] { display: none; }
.p3-pend { position: absolute; left: 8px; right: 8px; top: 8px; display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn); font-size: 12.5px; line-height: 1.4; }
.p3-pend b { color: var(--warn); }
.p3-pend svg.ic { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.p3pv[data-estado="fotos"] .p3-pend { background: rgba(255, 255, 255, .94); border-color: var(--line); color: var(--ink-2); }
.p3pv[data-estado="vacio"] .p3-pend { inset: 0; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px 40px; background: none; border: 0; color: var(--ink-3); font-size: 14px; }
.p3pv[data-estado="vacio"] .p3-pend svg.ic { width: 44px; height: 44px; stroke-width: 1.3; color: var(--ink-3); }
.p3pv[data-estado="fotos"] .p3-pend b { color: var(--ink); }
.p3pv[data-estado="foto-color"] .p3-pend { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); color: var(--ink-2); }
.p3pv[data-estado="foto-color"] .p3-pend b, .p3pv[data-estado="foto-color"] .p3-pend svg.ic { color: var(--ok); }
.p3pv[data-estado="color-aplicado"] .p3-pend { background: rgba(255, 255, 255, .94); border-color: var(--line); color: var(--ink-2); }
.p3pv[data-estado="color-aplicado"] .p3-pend b { color: var(--ink); }
.p3pv[data-estado="foto-color"] .p3-foto, .p3pv[data-estado="color-aplicado"] .p3-foto { padding-top: 64px; }
.p3pv[data-estado="fotos"] .p3-foto, .p3pv[data-estado="pendiente"] .p3-foto { padding-top: 64px; }
.pv-n { font-family: var(--f-display); font-size: 19px; line-height: 1.2; }
.pv-ref { color: var(--ink-3); font-family: var(--f-mono); font-size: 12px; }
.pv-dl { margin: 4px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; font-size: 12.5px; }
.pv-dl dt { color: var(--ink-3); }
.pv-dl dd { margin: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.pv-pr { margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.pv-pr > span { font-size: 12px; color: var(--ink-3); }
.pv-pr > b { font-family: var(--f-mono); font-size: 22px; }
.pv-pr small { font-size: 12px; color: var(--ink-2); }
.pv-fl { color: var(--warn) !important; display: flex; gap: 5px; align-items: flex-start; }
.pv-fl svg.ic, .pv-val svg.ic { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.pv-val { margin: 0; display: flex; gap: 6px; font-size: 12px; color: var(--warn); }
.pv-chips { display: none; gap: 4px; flex-wrap: wrap; }
.pv-chips .cch { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px 1px 2px; }
.pv-chips .cch i { width: 15px; height: 15px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
.cfg-steps { overflow-y: auto; padding: 12px 16px 24px; display: flex; flex-direction: column; gap: 8px; }
.cs { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.cs.open { border-color: var(--line-strong); box-shadow: var(--sh-2); }
.cs-h { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 14px; border: 0; background: none; color: var(--ink); cursor: pointer; text-align: left; border-radius: 14px; }
.cs-h:focus-visible { outline: none; box-shadow: var(--ring); }
.cs-n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sunken); color: var(--ink-2); font-weight: 700; font-size: 13px; }
.cs-n svg.ic { width: 15px; height: 15px; stroke-width: 3; }
.cs.done .cs-n { background: var(--accent); color: var(--accent-ink); }
.cs.pend .cs-n { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.cs.open .cs-n { box-shadow: 0 0 0 3px var(--accent-soft); }
.cs-t { font-family: var(--f-display); font-size: 15.5px; font-weight: 600; white-space: nowrap; }
.cs-v { flex: 1 1 auto; min-width: 0; text-align: right; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-need { color: var(--accent); font-weight: 600; }
.cs-c { flex: none; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.cs.open .cs-v { display: none; }
.cs-b { padding: 4px 16px 16px 54px; }
/* «Siguiente» fijo al pie del paso abierto: siempre a mano aunque la lista de colores o telas sea larga */
.cs-nx { display: flex; justify-content: flex-end; margin: 16px -16px -16px -54px; padding: 12px 16px 14px; position: sticky; bottom: 0; z-index: 3; background: linear-gradient(to bottom, color-mix(in srgb, var(--surface) 0%, transparent), var(--surface) 34%); border-radius: 0 0 14px 14px; }
.cs-nx .btn { box-shadow: var(--sh-2); }
.cs-b input, .cs-b textarea, .cs-b button { scroll-margin-bottom: 76px; }   /* lo que se enfoca no queda debajo de «Siguiente» */
.cs-nx svg.ic { width: 15px; height: 15px; }
.cs-nxn { font-weight: 500; opacity: .85; margin-left: -2px; }
.cs.open.enter { animation: csin .22s ease-out; }
@keyframes csin { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cf-miss { font-size: 12.5px; color: var(--warn); max-width: 300px; text-align: right; }
.cf-miss:empty { display: none; }
.btn.soft { background: var(--surface); color: var(--ink); border-color: var(--line-strong); font-weight: 600; }
.btn.soft:hover:not(:disabled) { background: var(--subtle); border-color: var(--ink-3); }
.tparts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 10px; }
.tpart { padding: 10px 12px 12px; border-radius: 12px; background: var(--subtle); }
.tpart .csub { margin-top: 0; }
.cdos { margin-bottom: 4px; }
.cfg-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.cf-pr { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; font-size: 13px; color: var(--ink-2); }
.cf-pr b { font-family: var(--f-mono); font-size: 18px; color: var(--ink); }
@media (max-width: 860px) {
  .cfgdlg { padding: 0; }
  .cfg-box { height: 100vh; height: 100dvh; border-radius: 0; }
  .cfg-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .cfg-pv { flex-direction: column; gap: 8px; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .pv-stage { aspect-ratio: auto; height: 36vh; height: 36dvh; min-height: 210px; border-radius: 12px; }
  .pv-tx > .brandtag { display: none; }
  .p3-tag small { display: none; }
  .pv-n { font-size: 16px; }
  .pv-dl, .pv-pr, .pv-val { display: none; }
  .pv-chips { display: flex; }
  .cfgdlg .cp-sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .cs-b { padding: 4px 12px 14px; }
  .cs-h { padding: 8px 12px; gap: 10px; }
  .cs-t { font-size: 14.5px; white-space: normal; }
  .fgrid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
  .cfg-steps { padding: 10px 10px 20px; }
  /* como la ficha de Proyectos en el móvil: la vista arriba y los pasos se desplazan debajo, en una pantalla */
  .cfg-box.pc-box { height: calc(100vh - 16px); height: calc(100dvh - 16px); min-height: 520px; border-radius: 12px; }
  .pc-box .cfg-body { grid-template-columns: 1fr; }
  .pc-box .cfg-foot { flex-wrap: wrap; }
  .pc-note { flex-basis: 100%; }
  .pc-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
}

/* ═══════════ Proyectos · pedido por llamada ═══════════ */
.pjsrc button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.pjsrc button svg.ic { width: 15px; height: 15px; }
.tel { display: flex; flex-direction: column; gap: 12px; }
.tel .tblk { display: flex; flex-direction: column; gap: 9px; border-top: 1px solid var(--line); padding-top: 12px; }
.tel .tblk:first-child { border-top: 0; padding-top: 0; }
.tel .tblk > h3 { margin: 0; font-size: 13.5px; font-weight: 700; }
.tllinks { display: flex; flex-wrap: wrap; gap: 6px; }
.tllinks:empty { display: none; }
.tllinks a { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 600; text-decoration: none; max-width: 100%; }
.tllinks a:hover { border-color: var(--accent); }
.tllinks a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; color: var(--ink-2); }
.tllinks a.srch { background: var(--surface); border-color: var(--line-strong); color: var(--ink-2); }
.tlph { padding: 10px 12px; flex-direction: row; gap: 10px; text-align: left; }
.tlph svg.ico { width: 28px; height: 28px; flex: none; }
.tlph .dz-t { display: flex; flex-direction: column; }
.tlthumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.tlthumbs:empty { display: none; }
.tlth { position: relative; }
.tlth img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.tlth button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(20, 24, 22, .72); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.tlth button svg.ic { width: 13px; height: 13px; }
.tlkinds .chip { min-height: 28px; padding: 2px 10px; font-size: 12.5px; }
.tqs { display: flex; flex-direction: column; gap: 6px; background: var(--subtle); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px 10px; }
.tqs > .lbl { font-weight: 600; color: var(--ink); }
.tq { display: flex; flex-direction: column; gap: 4px; }
.tq .tql { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--warn); }
.tq .tql svg.ic { width: 14px; height: 14px; }
.tq.ok .tql { color: var(--ok); }
.tq .chips { gap: 4px; }
.tq .chip { min-height: 26px; padding: 2px 9px; font-size: 12px; }
.tq small { font-size: 11.5px; }
.tel .hint:empty { display: none; }
.tel .hint.err { color: var(--danger); }
.tel textarea { font-family: var(--f-body); font-size: 13.5px; line-height: 1.45; min-height: 96px; }
.tprep { background: var(--accent-soft); border: 1px solid var(--accent-line) !important; border-radius: var(--r-lg); padding: 12px !important; margin: 0 -4px; }
.tprep .btn.primary { flex: 1; }
.tlsteps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.tlsteps li { display: flex; align-items: flex-start; gap: 7px; color: var(--ink-3); line-height: 1.35; }
.tlsteps li::before { content: ""; width: 12px; height: 12px; flex: none; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line-strong); }
.tlsteps li.run { color: var(--ink); font-weight: 600; }
.tlsteps li.run::before { border-color: color-mix(in srgb, var(--accent) 28%, transparent); border-top-color: var(--accent); animation: spin .9s linear infinite; }
.tlsteps li.ok { color: var(--ok); }
.tlsteps li.ok::before { border-color: var(--ok); background: var(--ok); }
.tlsteps li.skip { color: var(--ink-3); }
.tlsteps li.skip::before { border-style: dashed; }
.tlsteps li.err { color: var(--warn); }
.tlsteps li.err::before { border-color: var(--warn); }
.tlsteps li { flex-wrap: wrap; }
.tlsteps li small { flex-basis: 100%; padding-left: 19px; font-weight: 400; color: var(--ink-3); }
.tlth em { position: absolute; left: 4px; bottom: 4px; font-style: normal; font-size: 10px; font-weight: 600; background: rgba(20, 24, 22, .72); color: #fff; padding: 0 5px; border-radius: 4px; }
.emptyplan svg.ic.big { width: 76px; height: 76px; stroke-width: 1.4; }
.pl .noimg.tel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.pl .noimg.tel svg.ic { width: 22px; height: 22px; }
.pl .telpend { display: flex; gap: 5px; align-items: flex-start; font-size: 11.5px; color: var(--warn); line-height: 1.35; }
.pl .telpend svg.ic { width: 13px; height: 13px; margin-top: 1px; }
.pl .pr dd:has(.qtyin) { white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.pl .pr input.qtyin { width: 66px !important; min-height: 30px !important; padding: 0 6px !important; text-align: right; }
.linkbtn.danger { color: var(--danger); margin-top: 6px; }
/* montaje en el local */
.mont { position: fixed; inset: 0; z-index: 80; background: rgba(12, 16, 14, .55); display: grid; place-items: center; padding: 16px; }
.mont[hidden] { display: none; }
.mont .mbox { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-3); width: min(1100px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.mont .mh { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.mont .mh b { font-family: var(--f-display); font-size: 16px; flex: 1; min-width: 0; }
.mont .mh small { display: block; font-family: var(--f-body); font-weight: 400; font-size: 12px; color: var(--ink-3); }
.mont .mb { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 14px; padding: 14px; overflow: auto; }
.mont .mcv { position: relative; background: var(--sunken); border-radius: 10px; min-height: 260px; display: grid; place-items: center; overflow: hidden; }
.mont canvas { max-width: 100%; max-height: calc(100dvh - 190px); display: block; touch-action: none; cursor: grab; }
.mont canvas.drag { cursor: grabbing; }
.mont .mside { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mont .mphotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.mont .mphotos button { padding: 0; border: 2px solid transparent; border-radius: 7px; overflow: hidden; cursor: pointer; background: #fff; aspect-ratio: 4 / 3; }
.mont .mphotos button[aria-pressed="true"] { border-color: var(--accent); }
.mont .mphotos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mont .mpieces { display: flex; flex-direction: column; gap: 4px; }
.mont .mpieces label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.mont .mpieces .btn { margin-left: auto; }
.mont .mst { font-size: 12.5px; color: var(--ink-2); margin: 0; line-height: 1.4; }
.mont .mst.err { color: var(--danger); }
.mont .mnote { font-size: 11.5px; color: var(--ink-3); margin: 0; line-height: 1.4; }
.pl .montbtn { margin-top: 6px; }
@media (max-width: 760px) { .mont .mb { grid-template-columns: 1fr; } }


/* ── KUBYKA: versión para Interihotel (sin 3D ni configurador de producto) ── */
.modes button[data-mode="prod"], #dimSeg, #v3img { display: none !important; }
/* ...ni las otras puertas al configurador, que sin 3D enseña la foto del catálogo con «Previsualización pendiente»:
   «Personalizar en 3D» del asistente (paso Mobiliario), «Configurar» de silla, mesa y taburete en el editor y
   «Módulos» de los bancos modulares (612 y 618 se colocan con su composición por defecto) */
.vcard[data-key="p3d"], [data-pcfg], #tMod { display: none !important; }
/* Contraste: el título de las tarjetas de inicio heredaba el color del botón y no se leía en modo oscuro */
.stc b { color: var(--ink); }
