/* AEVON · visor IFC. Maqueta y piezas propias del visor; colores, radios y botones salen del sistema de diseño de la plataforma
   (aevon-base.css, aevon-ui.css, aevon-page.css), así que sigue el modo oscuro y la marca del estudio sin nada más. */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
.vw { position: fixed; inset: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); background: var(--bg, #f5f6f8); color: var(--ink, #050505); }
.vw svg { flex: none; }

/* Barra superior */
.vw-top { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--white, #fff); border-bottom: 1px solid var(--line, #05050517); min-width: 0; z-index: 5; }
.vw-brand { display: flex; align-items: center; gap: 10px; flex: none; text-decoration: none; }
.vw-top > .btn.ghost { flex: 0 1 auto; min-width: 0; overflow: hidden; }
.vw-brand img { max-height: 28px; max-width: 150px; object-fit: contain; display: block; }
.vw-brand .logo { font: 800 19px/1 Archivo, sans-serif; letter-spacing: -.04em; display: inline-flex; align-items: flex-end; gap: 2px; }
.vw-brand .logo i { width: 6px; height: 6px; border-radius: 50%; background: #548cff; margin-bottom: 2px; }
.vw-brand small { color: var(--secondary, #505050); font-size: 11.5px; white-space: nowrap; }
.vw-name { min-width: 0; display: grid; line-height: 1.25; }
.vw-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vw-name small { color: var(--secondary, #505050); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vw-top .sp { flex: 1; }
.vw-ib { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: var(--r-s, 8px); border: 1px solid transparent; background: none; cursor: pointer; color: var(--ink, #050505); flex: none; transition: background .15s, border-color .15s; }
.vw-ib:hover { background: var(--surface, #eef0f5); } .vw-ib[aria-pressed=true] { background: var(--ink, #050505); color: var(--bg, #fff); }
.vw-ib:disabled { opacity: .4; cursor: default; }

/* Aviso de demostración: una franja entre la barra y el modelo, y la etiqueta «Demo» junto al nombre */
.vw-beta { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 7px 12px; background: color-mix(in srgb, var(--blue, #548cff) 14%, var(--white, #fff)); border-bottom: 1px solid var(--line, #05050517); font-size: 12.5px; line-height: 1.4; text-align: center; z-index: 5; }
.vw-beta[hidden] { display: none; } .vw-beta span { flex: 0 1 auto; min-width: 0; text-align: left; } .vw-beta .btn.sm { min-height: 26px; flex: none; }
.vw-top > .vw-demo { flex: none; font-weight: 700; letter-spacing: .02em; }
html[data-aw-theme="dark"] .vw-top > .vw-demo { background: color-mix(in srgb, var(--blue, #548cff) 30%, transparent); color: var(--ink); }

/* Escena */
.vw-top { grid-row: 1; } .vw-beta { grid-row: 2; }
/* El modelo va siempre en la tercera fila, la que se queda con el alto que sobra. Sin esto, al ocultarse el aviso de demostración subía a la segunda (de alto automático) y se quedaba con altura cero: abierto, pero sin verse ni poder moverse. */
.vw-stage { grid-row: 3; position: relative; min-height: 0; overflow: hidden; background: #e9ecf2; }
html[data-aw-theme="dark"] .vw-stage { background: #0e1014; }
.vw-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#gl { touch-action: none; outline: none; cursor: default; } #gl.tool { cursor: crosshair; } #ov { pointer-events: none; }

/* Paneles laterales */
.vw-side { position: absolute; top: 10px; bottom: 74px; width: min(310px, calc(100vw - 20px)); display: flex; flex-direction: column; background: var(--white, #fff); border: 1px solid var(--line, #05050517); border-radius: var(--r, 12px); box-shadow: var(--pop, 0 24px 70px -10px #05050540); z-index: 3; min-height: 0; overflow: hidden; animation: vw-in .22s var(--ease, ease) both; }
.vw-left { left: 10px; } .vw-right { right: 10px; width: min(330px, calc(100vw - 20px)); }
.vw-side[hidden] { display: none; }
.vw-ph { display: flex; align-items: center; gap: 8px; padding: 10px 10px 8px 14px; } .vw-ph b { flex: 1; font-weight: 600; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vw-ph small { display: block; font-weight: 400; color: var(--secondary, #505050); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.vw-pb { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 10px; scrollbar-width: thin; }
.vw-search { margin: 0 10px 8px; display: flex; } .vw-search input { flex: 1; min-width: 0; min-height: 32px; padding: 0 10px; border: 1px solid var(--line, #05050517); border-radius: var(--r-s, 8px); background: var(--bg, #f5f6f8); }
.vw-tabs { display: flex; gap: 2px; margin: 0 10px 8px; padding: 2px; background: var(--surface, #eef0f5); border-radius: var(--r-s, 8px); }
.vw-tabs button { flex: 1; min-height: 28px; border: 0; background: none; border-radius: 6px; font-weight: 600; font-size: 12.5px; color: var(--secondary, #505050); cursor: pointer; }
.vw-tabs button[aria-pressed=true] { background: var(--white, #fff); color: var(--ink, #050505); box-shadow: var(--shadow, 0 1px 2px #0505050d); }

/* Árbol */
.tr { display: flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 4px 0 6px; border-radius: 7px; cursor: pointer; user-select: none; -webkit-user-select: none; }
.tr:hover { background: var(--surface, #eef0f5); } .tr.on { background: color-mix(in srgb, var(--blue, #548cff) 18%, transparent); }
.tr.lv1 { padding-left: 22px; } .tr.lv2 { padding-left: 42px; } .tr.off .tl { opacity: .42; }
.tr .tw { width: 16px; display: grid; place-items: center; color: var(--secondary, #505050); transition: transform .15s; } .tr[aria-expanded=true] .tw { transform: rotate(90deg); }
.tr .tl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tr.lv0 .tl { font-weight: 600; }
.tr .tn { color: var(--secondary, #505050); font-size: 12px; font-variant-numeric: tabular-nums; }
.tr .ti { width: 26px; height: 26px; display: grid; place-items: center; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--secondary, #505050); opacity: 0; }
.tr:hover .ti, .tr.off .ti[data-act=eye], .tr .ti:focus-visible { opacity: 1; } .tr .ti:hover { background: var(--white, #fff); color: var(--ink, #050505); }
@media (hover: none) { .tr .ti { opacity: 1; } }
.vw-more { display: block; width: calc(100% - 42px); margin: 2px 0 6px 42px; min-height: 28px; border: 0; background: none; color: var(--secondary, #505050); text-align: left; cursor: pointer; font-size: 12.5px; }

/* Propiedades */
.pp-act { display: flex; gap: 6px; padding: 0 6px 10px; flex-wrap: wrap; } .pp-act .btn { flex: 1; }
.pp-sec { border-top: 1px solid var(--line, #05050517); } .pp-sec > summary { list-style: none; cursor: pointer; padding: 9px 6px; font-weight: 600; font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.pp-sec > summary::-webkit-details-marker { display: none; } .pp-sec > summary::before { content: '›'; display: inline-block; width: 10px; color: var(--secondary, #505050); transition: transform .15s; } .pp-sec[open] > summary::before { transform: rotate(90deg); }
.pp-sec > summary .tag { margin-left: auto; font-weight: 600; }
.pp-kv { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 2px 10px; padding: 0 6px 10px; font-size: 12.5px; }
.pp-kv dt { color: var(--secondary, #505050); overflow-wrap: break-word; word-break: break-word; } .pp-kv dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.pp-empty { padding: 18px 10px; color: var(--secondary, #505050); text-align: center; }
table.qt { width: 100%; border-collapse: collapse; font-size: 12.5px; } table.qt th, table.qt td { padding: 6px; text-align: right; border-bottom: 1px solid var(--line, #05050517); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.qt th { color: var(--secondary, #505050); font-weight: 600; font-size: 11.5px; position: sticky; top: 0; background: var(--white, #fff); } table.qt th:first-child, table.qt td:first-child { text-align: left; white-space: normal; }
table.qt tfoot td { font-weight: 600; border-bottom: 0; }

/* Barra de herramientas */
.vw-tools { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 5px; background: var(--white, #fff); border: 1px solid var(--line, #05050517); border-radius: 14px; box-shadow: var(--pop, 0 24px 70px -10px #05050540); z-index: 4; max-width: calc(100vw - 16px); overflow-x: auto; scrollbar-width: none; }
.vw-tools::-webkit-scrollbar { display: none; }
.vw-tb { min-width: 46px; height: 46px; padding: 0 6px; display: grid; place-items: center; gap: 0; border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--ink, #050505); font-size: 10.5px; font-weight: 600; line-height: 1; flex: none; transition: background .15s; }
.vw-tb span { color: var(--secondary, #505050); } .vw-tb:hover { background: var(--surface, #eef0f5); }
.vw-tb[aria-pressed=true] { background: var(--ink, #050505); color: var(--bg, #fff); } .vw-tb[aria-pressed=true] span { color: inherit; opacity: .8; }
.vw-tb.dot { position: relative; } .vw-tb.dot::after { content: ''; position: absolute; top: 6px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue, #548cff); }
.vw-sepv { width: 1px; height: 26px; background: var(--line, #05050517); margin: 0 4px; flex: none; }
.vw-hint { position: absolute; left: 50%; bottom: 80px; transform: translateX(-50%); background: var(--ink, #050505); color: var(--bg, #fff); padding: 7px 12px; border-radius: 10px; font-size: 12.5px; z-index: 3; max-width: calc(100vw - 24px); text-align: center; pointer-events: none; box-shadow: var(--pop); }
.vw-hint[hidden] { display: none; }

/* Menús de las herramientas */
.vw-pop { position: absolute; bottom: 78px; left: 50%; transform: translateX(-50%); width: min(330px, calc(100vw - 20px)); max-height: min(70vh, calc(100% - 100px)); overflow-y: auto; background: var(--white, #fff); border: 1px solid var(--line, #05050517); border-radius: var(--r, 12px); box-shadow: var(--pop, 0 24px 70px -10px #05050540); padding: 8px; z-index: 6; animation: vw-up .18s var(--ease, ease) both; }
.vw-pop[hidden] { display: none; }
.vw-pop h3 { margin: 6px 8px 6px; font-size: 11.5px; font-weight: 600; color: var(--secondary, #505050); }
.mi { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 8px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; color: var(--ink, #050505); }
.mi:hover { background: var(--surface, #eef0f5); } .mi[aria-pressed=true] { background: color-mix(in srgb, var(--blue, #548cff) 18%, transparent); }
.mi .g { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mi small { color: var(--secondary, #505050); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mi:disabled { opacity: .55; cursor: default; background: none; }
.mi .x { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; color: var(--secondary, #505050); } .mi .x:hover { background: var(--white, #fff); color: var(--ink, #050505); }
.sw { width: 34px; height: 20px; border-radius: 99px; background: #05050526; position: relative; flex: none; transition: background .15s; } html[data-aw-theme="dark"] .sw { background: #ffffff30; }
.sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px #0005; }
[aria-checked=true] .sw { background: var(--blue, #548cff); } [aria-checked=true] .sw::after { transform: translateX(14px); }
.cut { padding: 6px 8px 8px; } .cut .mi { padding: 0; } .cut input[type=range] { width: 100%; accent-color: var(--blue, #548cff); margin: 2px 0 0; }
.cut .row2 { display: flex; align-items: center; gap: 8px; } .cut .row2 small { color: var(--secondary, #505050); font-variant-numeric: tabular-nums; min-width: 54px; text-align: right; }
.vw-sep { height: 1px; background: var(--line, #05050517); margin: 6px 0; }
.dev { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; background: color-mix(in srgb, var(--blue, #548cff) 16%, transparent); font-size: 11.5px; font-weight: 600; white-space: nowrap; }

/* Carga, vacío y avisos */
.vw-load, .vw-empty { position: absolute; inset: 0; display: grid; place-items: center; z-index: 7; background: color-mix(in srgb, var(--bg, #f5f6f8) 88%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); padding: 16px; overflow-y: auto; }
.vw-load[hidden], .vw-empty[hidden] { display: none; }
.vw-card { width: min(420px, 100%); background: var(--white, #fff); border: 1px solid var(--line, #05050517); border-radius: 14px; box-shadow: var(--pop); padding: 22px; text-align: center; display: grid; gap: 10px; }
.vw-card h2 { margin: 0; font-size: 17px; } .vw-card p { color: var(--secondary, #505050); margin: 0; }
.vw-bar { height: 6px; background: #05050512; border-radius: 99px; overflow: hidden; } html[data-aw-theme="dark"] .vw-bar { background: #ffffff1c; } .vw-bar i { display: block; height: 100%; width: 0; background: var(--blue, #548cff); border-radius: 99px; transition: width .2s; }
.vw-pick { width: min(880px, 100%); align-self: start; margin: 24px 0; display: grid; gap: 14px; }
.vw-pick h2 { font-size: 20px; margin: 0; } .vw-pick .sub { margin: 4px 0 0; }
.vw-pick .grid { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.pj { background: var(--white, #fff); border: 1px solid var(--line, #05050517); border-radius: var(--r, 12px); box-shadow: var(--shadow); padding: 12px 14px; display: grid; gap: 8px; align-content: start; }
.pj h3 { font-size: 14px; color: var(--ink, #050505); margin: 0; font-weight: 600; } .pj .fi { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; margin: 0 -8px; border: 0; border-radius: 8px; background: none; cursor: pointer; text-align: left; }
.pj .fi:hover { background: var(--surface, #eef0f5); } .pj .fi span { flex: 1; min-width: 0; } .pj .fi b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pj .fi small { color: var(--secondary, #505050); }
.vw-chip { position: absolute; left: 12px; bottom: 16px; z-index: 3; background: var(--white, #fff); border: 1px solid var(--line, #05050517); border-radius: 99px; padding: 5px 12px; font-size: 12px; cursor: pointer; box-shadow: var(--shadow); max-width: calc(50vw - 150px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vw-chip[hidden] { display: none; }
.vw-stick { position: absolute; left: 22px; bottom: 96px; width: 104px; height: 104px; border-radius: 50%; background: color-mix(in srgb, var(--white, #fff) 70%, transparent); border: 1px solid var(--line, #05050517); z-index: 4; touch-action: none; box-shadow: var(--pop); }
.vw-stick[hidden] { display: none; } .vw-stick i { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px; border-radius: 50%; background: var(--ink, #050505); opacity: .85; }
.sh-link { display: flex; gap: 8px; width: 100%; flex-wrap: wrap; } .sh-link .btn { flex: none; white-space: nowrap; } .sh-link input { flex: 1; min-width: 0; min-height: 36px; padding: 0 10px; border: 1px solid var(--control-border, #05050538); border-radius: var(--r-s, 8px); background: var(--bg, #f5f6f8); font-size: 13px; }
.sh-list > div { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line, #05050517); } .sh-list .t { flex: 1; min-width: 0; } .sh-list .t b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sh-list .t small { display: block; color: var(--secondary, #505050); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-brand { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--bg, #f5f6f8); font-size: 12.5px; } .sh-brand p { flex: 1; color: var(--secondary, #505050); }
kbd { font: 600 11px ui-monospace, monospace; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line, #05050517); background: var(--bg, #f5f6f8); white-space: nowrap; }
.help { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; padding: 4px 8px 8px; font-size: 12.5px; align-items: center; } .help span { color: var(--secondary, #505050); }
@keyframes vw-in { from { opacity: 0; transform: translateY(8px); } } @keyframes vw-up { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (max-width: 720px) {
  .vw-top { padding: 6px 8px; gap: 4px; } .vw-brand small, .vw-top .lbl, .vw-name small, .vw-top > .tag:not(.vw-demo) { display: none; } .vw-beta { justify-content: flex-start; text-align: left; padding: 8px 10px; } .vw-brand img { max-width: 96px; } .vw-side { top: 6px; left: 6px; right: 6px; width: auto; bottom: 70px; }
  .vw-right { top: auto; height: min(52%, 420px); } .vw-tb { min-width: 44px; } .vw-tools { bottom: 8px; } .vw-hint { bottom: 70px; } .vw-pop { bottom: 68px; } .vw-chip { display: none; }
}
@media (prefers-reduced-motion: reduce) { .vw-side, .vw-pop { animation: none; } }
