:root{--bg:#eef2f5;--panel:#fff;--soft:#f8fafc;--text:#172033;--muted:#64748b;--line:#dbe3eb;--accent:#0f766e;--accent2:#2563eb;--red:#b91c1c;--ok:#047857;--radius:16px;--shadow:0 18px 45px rgba(15,23,42,.08),0 2px 8px rgba(15,23,42,.04)}*{box-sizing:border-box}html,body{height:100%;margin:0;font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text)}.topbar{height:72px;padding:14px 20px;display:flex;justify-content:space-between;align-items:center;background:rgba(255,255,255,.94);border-bottom:1px solid var(--line);backdrop-filter:blur(10px)}.brand{display:flex;align-items:center;gap:12px}.logo{width:36px;height:36px;border-radius:10px;background:#0f766e;color:white;display:grid;place-items:center;font-weight:900}h1{font-size:19px;margin:0}p{margin:4px 0 0;color:var(--muted);font-size:12px}.badge{font-size:12px;color:#334155;background:#f8fafc;border:1px solid var(--line);border-radius:999px;padding:8px 12px}.layout{display:grid;grid-template-columns:315px 1fr;height:calc(100% - 72px)}.controls{background:var(--panel);border-right:1px solid var(--line);overflow:auto;min-height:0;padding:16px 18px 12px}.controls section{border-bottom:1px solid #e9eef4;padding-bottom:15px;margin-bottom:15px}.controls section:last-child{border-bottom:0;margin-bottom:0;padding-bottom:0}h2{font-size:13px;letter-spacing:.04em;text-transform:uppercase;margin:0 0 13px;color:#0f172a}.grid2,.grid3{display:grid;gap:10px;margin-bottom:10px}.grid2{grid-template-columns:1fr 1fr}.grid3{grid-template-columns:1fr 1fr 1fr}.compact label span{display:block;margin-bottom:5px}label{font-size:12px;color:#334155;position:relative}label span,label[for]{font-weight:600;color:#334155}select,input[type=number],input[type=text]{width:100%;height:36px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;padding:0 9px;color:#111827;outline:none;font-size:13px}input:focus,select:focus{border-color:#7dd3fc;box-shadow:0 0 0 3px rgba(14,165,233,.13)}.controlRow{margin-bottom:13px}.rowHead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}.numberBox{position:relative;width:82px;flex:0 0 82px}.numberBox input{height:32px;padding-right:26px}.numberBox em{position:absolute;right:8px;top:9px;font-style:normal;color:#94a3b8;font-size:10px;pointer-events:none}.colorText{max-width:132px;height:34px}.checks{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0}.checks.stacked{display:grid;grid-template-columns:1fr 1fr;gap:8px}.checks label{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:500}.checks label span{font-weight:500;margin:0}.checks input[type=checkbox]{width:14px;height:14px;accent-color:var(--accent)}input[type=range]{width:100%;height:20px;accent-color:var(--accent);cursor:pointer}output{font-size:12px;color:#0f766e;font-weight:800}.buttons{display:grid;gap:9px}.buttons.two{grid-template-columns:1fr 1fr}button{height:38px;border-radius:11px;border:1px solid #cbd5e1;background:#fff;color:#1f2937;font-weight:800;cursor:pointer;font-size:13px}button:hover{border-color:#94a3b8;background:#f8fafc}#previewDxf,#exportDxf{background:#ecfdf5;border-color:#99f6e4;color:#0f766e}.preview{display:flex;flex-direction:column;overflow:hidden;min-width:0}.previewHead{height:64px;display:flex;justify-content:space-between;align-items:center;padding:12px 18px;border-bottom:1px solid #dde5ee;background:rgba(255,255,255,.75);backdrop-filter:blur(10px)}.previewHead h2{font-size:14px;text-transform:none;letter-spacing:0;margin:0}.status{border-radius:999px;padding:8px 12px;font-size:12px;max-width:560px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.status.ok{background:#ecfdf5;color:#065f46;border:1px solid #bbf7d0}.status.error{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}.canvasWrap{position:relative;flex:1;min-height:520px}#renderCanvas{position:absolute;inset:0;width:100%;height:100%;display:block}.modal{display:none;position:fixed;inset:0;background:rgba(15,23,42,.48);z-index:20;padding:28px}.modal.open{display:flex}.modalCard{margin:auto;width:min(1180px,100%);height:min(760px,100%);background:#fff;border-radius:22px;box-shadow:0 30px 100px rgba(0,0,0,.30);display:flex;flex-direction:column;overflow:hidden}.modalHead{height:76px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:14px 18px}.modalHead h2{text-transform:none;letter-spacing:0;font-size:16px}.modalHead button{width:40px;font-size:24px;line-height:1}#dxfCanvas{width:100%;height:calc(100% - 136px);display:block;background:#fff}.modalFoot{height:60px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:10px 18px;color:var(--muted);font-size:13px}@media(max-width:1050px){.layout{grid-template-columns:1fr;height:auto}.controls{max-height:none;border-right:0;border-bottom:1px solid var(--line)}.canvasWrap{min-height:560px}.grid3{grid-template-columns:1fr 1fr}}@media(max-width:640px){.topbar{height:auto;align-items:flex-start;gap:12px}.layout{display:block}.grid2,.grid3,.checks.stacked{grid-template-columns:1fr}.buttons.two{grid-template-columns:1fr}.modal{padding:10px}}

/* Integración del canvas y etiquetas originales de EMCAE_Box_Render_0.1.0 */
#renderCanvas{touch-action:none;cursor:grab;background:#dfe6ec}
#renderCanvas.dragging{cursor:grabbing}
.labelLayer{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:2}
.face-label{position:absolute;transform:translate(-50%,-50%);padding:4px 8px;border:1px solid rgba(51,65,85,.16);border-radius:999px;background:rgba(255,255,255,.82);box-shadow:0 3px 12px rgba(15,23,42,.12);color:#263444;font-size:11px;font-weight:700;line-height:1;white-space:nowrap;opacity:0;transition:opacity .15s ease;backdrop-filter:blur(5px)}
.face-label.visible{opacity:1}

/* Mejoras de interacción recuperadas del visor original v0.1.0 */
.fullWidth{max-width:none!important}
input:disabled{background:#f1f5f9;color:#94a3b8;cursor:not-allowed}
.viewChecks{margin-bottom:12px}
.viewButtons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:3px 0 10px}
.viewButtons button{height:34px;padding:0 5px;font-size:11px}
.buttons.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.viewActionButtons button{height:36px;font-size:11px;padding:0 5px}
@media(max-width:640px){.viewButtons,.buttons.three{grid-template-columns:1fr 1fr}}

/* Espesores independientes por pieza */
.thicknessGrid{gap:11px 9px}
.thicknessControl{min-width:0;padding:8px;border:1px solid #e2e8f0;border-radius:11px;background:#f8fafc}
.thicknessControl>span{min-height:29px;line-height:1.2}
.thicknessControl .numberBox{width:100%;margin-bottom:4px}
.thicknessControl .numberBox input{height:32px}
.thicknessControl input[type=range]{height:16px}

/* Ayuda contextual v0.0.11: sustituye textos permanentes por comentarios al pasar el puntero. */
[data-help]{cursor:help}
button[data-help],#renderCanvas[data-help]{cursor:pointer}
#renderCanvas[data-help]{cursor:grab}
#renderCanvas.dragging[data-help]{cursor:grabbing}
.helpTooltip{position:fixed;z-index:1000;left:0;top:0;max-width:min(320px,calc(100vw - 20px));padding:9px 11px;border:1px solid rgba(148,163,184,.6);border-radius:10px;background:rgba(15,23,42,.96);box-shadow:0 12px 30px rgba(15,23,42,.28);color:#f8fafc;font-size:12px;line-height:1.35;pointer-events:none;opacity:0;transform:translateY(3px);transition:opacity .12s ease,transform .12s ease}
.helpTooltip.visible{opacity:1;transform:translateY(0)}
.brand[data-help],#versionBadge[data-help],#previewTitleHelp[data-help],.modalHead h2[data-help]{cursor:help}
@media(max-width:640px){.helpTooltip{font-size:13px;max-width:calc(100vw - 24px)}}

/* Resumen SEO visible y discreto */
.seoSummary{background:#f8fafc;border:1px solid #e2e8f0!important;border-radius:12px;padding:12px!important;margin-top:14px!important;margin-bottom:4px!important}
.seoSummary h2{font-size:12px;margin-bottom:7px;text-transform:none;letter-spacing:0;color:#334155}
.seoSummary p{font-size:11px;line-height:1.5;margin:0;color:#64748b}
.seoSummary .seoEnglish{margin-top:6px;color:#7c8798}
