:root{--ink:#15202c;--muted:#657387;--line:#e0e6ed;--cyan:#00b4d9;--pink:#ec208e;--yellow:#f5e900;--bg:#f5f7fa}*{box-sizing:border-box}body{margin:0;color:var(--ink);font:13px/1.5 "Segoe UI",Arial,sans-serif;background:var(--bg)}button,input{font:inherit}button{cursor:pointer;border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:8px;padding:8px 12px;transition:background .15s,border-color .15s}button:hover{background:#edf9fc;border-color:#8ad7e6}button:disabled{opacity:.4;cursor:default}button:focus-visible,input:focus-visible{outline:3px solid #00b4d940;outline-offset:2px}.primary{background:var(--ink);color:#fff;border-color:var(--ink)}.primary:hover{background:#263847;border-color:#263847}header{height:72px;display:flex;align-items:center;gap:20px;padding:12px 22px;background:#10151b;color:#fff;border-bottom:3px solid var(--cyan)}header img{width:180px;height:45px;object-fit:contain}header .brand{font-weight:700;letter-spacing:1px;font-size:12px;white-space:nowrap}header .brand span{display:block;font-weight:400;letter-spacing:0;color:#9dabbc;font-size:11px}.header-actions{display:flex;gap:7px;margin-left:auto}header button{background:#202b36;border-color:#384652;color:#e9f2fa}header button:hover{background:#344653;border-color:#00b4d9}header .primary{background:var(--cyan);color:#071f26;border-color:var(--cyan);font-weight:700}main{height:calc(100dvh - 72px);display:grid;grid-template-columns:275px minmax(280px,1fr) 275px}aside{background:#fff;overflow:auto;overscroll-behavior:contain}aside section{padding:20px 18px;border-bottom:1px solid var(--line)}.library{border-right:1px solid var(--line)}.inspector{border-left:1px solid var(--line)}.eyebrow{font-size:10px;letter-spacing:1.4px;font-weight:700;color:#8491a1;margin-bottom:9px}h2{font-size:16px;margin:0 0 12px;letter-spacing:-.3px}h2 small{font-size:11px;background:#edf2f6;color:var(--muted);padding:2px 7px;border-radius:20px}p{margin:8px 0}.muted{color:var(--muted);font-size:11px}.pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}label{display:block;font-size:11px;font-weight:600;color:#536376}.unit{display:flex;align-items:center;border:1px solid var(--line);border-radius:7px;margin:5px 0 10px;background:#fff}.unit input{border:0;background:transparent;width:100%;min-width:0;padding:8px;font-weight:600;color:var(--ink)}.unit span{padding-right:9px;color:#8996a6;font-size:11px}.wide{width:100%;margin:4px 0}.check{display:flex;align-items:center;gap:7px;margin:9px 0;font-weight:400;cursor:pointer}.check input{accent-color:var(--cyan)}.upload{width:100%;padding:20px 8px;border:1px dashed #78c8d8;background:#f0fbfd}.upload strong,.upload span{display:block}.upload strong{font-size:14px}.upload span{font-size:10px;color:var(--muted);margin-top:4px}.row{display:flex;align-items:center;gap:7px}.spread{justify-content:space-between}.grow{flex:1}.text{border:0;background:transparent;color:#087d99;font-size:11px;padding:5px}.row h2{margin:12px 0}.empty{color:#8c99a9;font-size:12px;line-height:1.7;text-align:center;padding:15px 5px}.object{display:flex;align-items:center;gap:10px;width:100%;text-align:left;margin:5px 0;padding:8px;border:1px solid transparent;background:#f7f9fb}.object.selected{background:#e8f9fc;border-color:var(--cyan)}.object img{width:42px;height:42px;object-fit:contain;background:repeating-conic-gradient(#e3e8ed 0% 25%,#fff 0% 50%) 0/10px 10px;border-radius:4px}.object .info{min-width:0;flex:1}.object .info b{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px}.object .info span{font-size:10px;color:var(--muted)}.workspace{min-width:0;display:flex;flex-direction:column}.workbar{height:49px;display:flex;align-items:center;justify-content:space-between;padding:0 17px;background:#fff;border-bottom:1px solid var(--line);gap:7px}.status-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--cyan);margin-right:7px}.swatch{width:24px;height:24px;border-radius:50%;padding:0}.swatch.active{outline:2px solid var(--cyan);outline-offset:2px}.swatch.white{background:white}.swatch.black{background:#111}#stage{position:relative;flex:1;min-height:200px;overflow:hidden;background:#e8edf3;background-image:radial-gradient(#c5cfdb .8px,transparent .8px);background-size:16px 16px}#welcome{position:absolute;top:45%;left:0;right:0;text-align:center;pointer-events:none;color:#536b7a;font-size:14px}#welcome span{font-weight:600}#welcome p{font-size:11px}footer{display:flex;justify-content:space-between;gap:10px;font-size:10px;color:#7b899a;background:#fff;padding:9px 14px;border-top:1px solid var(--line)}.zoom{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:3px;padding:4px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 3px 12px #172d4315}.zoom button{border:0;padding:5px 10px}.zoom span{font-size:10px;color:var(--muted);padding:0 8px}.danger{color:#bd246a}.alpha-panel{background:#fbfcfd}input[type=range]{width:100%;accent-color:var(--pink);margin:14px 0 3px}.small-number{width:56px;border:1px solid var(--line);border-radius:6px;padding:5px}.range-labels{display:flex;justify-content:space-between;font-size:9px;color:#8996a6}.alpha-help{padding:10px;background:#f1f5f8;color:#62758a;border-radius:6px;font-size:10px;line-height:1.7;margin-top:9px}.shortcuts{display:grid;grid-template-columns:1fr auto;gap:9px;font-size:11px;color:var(--muted)}kbd{background:#f5f7fa;border:1px solid var(--line);padding:1px 5px;border-radius:4px;font:10px "Segoe UI",sans-serif}#alphaIndicator{position:absolute;top:14px;left:50%;transform:translateX(-50%);background:var(--ink);color:white;padding:6px 12px;border-radius:20px;font-size:9px;letter-spacing:.5px;pointer-events:none}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#15202c;color:white;padding:12px 20px;border-radius:10px;box-shadow:0 8px 30px #15202c30;z-index:20;max-width:min(650px,90vw)}dialog{border:1px solid var(--line);border-radius:16px;padding:28px;width:460px;max-width:92vw;box-shadow:0 20px 80px #0003;color:var(--ink)}dialog::backdrop{background:#101c2970;backdrop-filter:blur(3px)}dialog h2{font-size:24px}.dialog-close{position:absolute;right:12px;top:10px;border:0;font-size:20px;padding:2px 9px}.export-options{display:flex;gap:10px;margin:20px 0 12px}.export-options button{flex:1;padding:14px 8px}.export-options strong,.export-options span{display:block}.export-options span{font-size:10px;font-weight:400;margin-top:5px;opacity:.75}.validation{font-size:12px;line-height:1.7;padding:12px;background:#f2f6f8;border-radius:8px;margin:14px 0;white-space:pre-line}.validation.error{background:#fff0f6;color:#ae2560}progress{width:100%;height:8px;accent-color:var(--cyan)}[hidden]{display:none!important}#busy{width:360px}#busy h2{font-size:19px}#selectedName{overflow-wrap:anywhere;font-size:14px}.arrange{margin-top:auto}@media(max-width:1150px){main{grid-template-columns:235px minmax(250px,1fr) 240px}.brand{display:none}.header-actions button{padding:7px 9px}aside section{padding:15px 12px}footer span:last-child{display:none}}@media(max-width:850px){header{height:auto;min-height:65px;flex-wrap:wrap;padding:10px 12px;gap:8px}header img{width:140px;height:35px}.header-actions{gap:4px}.header-actions button{font-size:10px}#saveProject,#openProject{display:none}main{height:auto;min-height:calc(100dvh - 65px);grid-template-columns:1fr 1fr}.workspace{grid-column:1/3;grid-row:1;height:60dvh;min-height:370px}.library,.inspector{overflow:visible}.library{border-right:1px solid var(--line)}.inspector{border-left:0}.workbar{padding:0 10px;font-size:11px}footer{font-size:9px}.zoom{bottom:12px}.workspace #welcome{font-size:11px}#alphaIndicator{font-size:8px;white-space:nowrap}}@media(max-width:480px){.header-actions #undo,.header-actions #redo{display:none}main{grid-template-columns:1fr}.library,.inspector{grid-column:1}.workspace{grid-column:1;grid-row:1}.workspace .workbar .muted{display:none}.workspace{height:58dvh}.pair{gap:8px}aside section{padding:18px}.export-options{flex-direction:column}}
header img{background:white;border-radius:7px;padding:5px 8px}
@media(max-width:850px){.header-actions{flex-wrap:wrap;justify-content:flex-end}#saveProject,#openProject{display:inline-flex}}
#backgroundDialog{width:940px;max-width:96vw;max-height:94dvh;overflow:auto}#backgroundDialog h2{font-size:21px;margin-bottom:0}.bg-layout{display:grid;grid-template-columns:minmax(0,1fr) 225px;gap:22px;margin-top:16px}.bg-preview{min-width:0}.bg-preview .row{justify-content:center;margin-bottom:10px}#backgroundDialog .active{background:#e7f9fc;border-color:var(--cyan);color:#007c95}#bgSurface{display:flex;align-items:center;justify-content:center;min-height:220px;height:48dvh;background:repeating-conic-gradient(#e5eaf0 0% 25%,#fff 0% 50%) 0/20px 20px;border:1px solid var(--line);border-radius:9px;padding:8px;overflow:hidden}#bgCanvas{display:block;max-width:100%;max-height:100%;width:auto;height:auto;touch-action:none;cursor:crosshair}#bgCanvas.comparing{cursor:default}.bg-settings select{width:100%;margin:5px 0 12px;border:1px solid var(--line);border-radius:7px;padding:9px;background:white;font:inherit;color:var(--ink)}.bg-settings .eyebrow{margin-top:18px}.bg-settings input[type=range]{margin:10px 0}.bg-footer{margin-top:18px;padding-top:15px;border-top:1px solid var(--line)}@media(max-width:700px){#backgroundDialog{padding:18px}.bg-layout{grid-template-columns:1fr;gap:12px}#bgSurface{height:35dvh;min-height:180px}.bg-settings{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px}.bg-settings .alpha-help,.bg-settings .eyebrow,.bg-settings>p,.bg-settings>#bgReset{grid-column:1/3}.bg-settings .eyebrow{margin-top:8px}#backgroundDialog h2{font-size:17px}} 

/* Cabecera de marca y contacto para impresión. */
header{background:#fff;color:var(--ink);gap:18px}header img{background:transparent;border-radius:0;padding:0;width:166px;height:50px}header .brand span{color:var(--muted)}header button{background:#f4f7fa;color:var(--ink);border-color:var(--line)}header button:hover{background:#e8f8fc}header .brand{border-left:1px solid var(--line);padding-left:18px}.whatsapp{display:flex;justify-content:center;align-items:center;gap:10px;background:#168344;color:#fff;border:1px solid #168344;border-radius:9px;padding:11px 15px;text-decoration:none;font-weight:600;line-height:1.35}.whatsapp:hover{background:#116735;border-color:#116735;color:#fff}.whatsapp svg{width:23px;height:23px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}.whatsapp small{display:block;font-size:10px;font-weight:400;margin-top:3px;opacity:.9}.header-contact{margin-left:auto;font-size:12px}.header-actions{margin-left:0;flex-shrink:0}.print-help{text-align:center;margin:8px 0 0}.print-file{overflow-wrap:anywhere;background:#f1f5f8;padding:10px;border-radius:6px;font-size:12px}#printDialog>p{line-height:1.7}#printDialog .whatsapp{margin-top:18px}#sharePNG{padding:12px}
@media(max-width:1300px){header{gap:12px;padding:10px 14px}header .brand{display:none}.header-contact{font-size:11px;padding:8px 11px}header img{width:150px}.header-actions button{font-size:11px;padding:8px}}
@media(max-width:850px){header{display:grid;grid-template-columns:140px minmax(0,1fr);gap:10px}header img{width:140px;height:43px}.header-contact{margin:0;justify-self:end;max-width:100%}.header-actions{grid-column:1/3;justify-content:flex-end;flex-wrap:wrap}header .header-contact small{font-size:9px}header .header-contact svg{width:20px;height:20px}}

/* Plegado accesible de la lista de archivos. */
.files-heading{display:flex;align-items:center;gap:3px;min-width:0}.files-heading h2{margin:0}.files-toggle{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;padding:5px;border:0;background:transparent;color:var(--muted);flex-shrink:0}.files-toggle:hover{background:#e8f8fc;color:var(--ink)}.files-toggle:focus-visible{outline:2px solid var(--cyan,#00b4d8);outline-offset:2px}.files-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s ease}.files-toggle[aria-expanded="false"] svg{transform:rotate(-90deg)}#filesList[hidden]{display:none}

/* Zoom y ajuste reversible del contorno. */
#bgSurface{position:relative;display:block;padding:0}#bgCanvas{position:absolute;left:0;top:0;max-width:none;max-height:none;transform-origin:0 0}.bg-preview .row{flex-wrap:wrap}.bg-navigation{text-align:center;margin:0 0 8px!important;font-size:10px}.bg-edge-control{margin:14px 0 8px;padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.bg-edge-control label{font-weight:600}.bg-edge-control output{display:block;color:var(--muted);font-size:11px;margin-top:4px}.bg-edge-control input{width:100%;accent-color:var(--cyan)}.bg-edge-directions{display:flex;justify-content:space-between;color:var(--muted);font-size:10px}.bg-edge-control p{font-size:10px;line-height:1.6;margin-bottom:0}#bgZoomLabel{min-width:36px;font-size:11px}@media(max-width:700px){.bg-edge-control{grid-column:1/3}}

.whatsapp svg.whatsapp-icon{fill:currentColor;stroke:none;width:22px;height:22px}.export-help{font-size:11px;line-height:1.6;margin:5px 0 14px}.export-alpha-check{margin-bottom:7px}

/* Collapsible numbered steps in the design library. */
.workflow-step>summary{display:flex;align-items:center;gap:10px;list-style:none;cursor:pointer;font-size:12px;font-weight:750;letter-spacing:.7px;color:#253d50;min-height:36px;border-radius:7px;user-select:none}
.workflow-step>summary::-webkit-details-marker{display:none}
.workflow-step>summary:hover{color:#007e98;background:#f0fbfd}
.workflow-step>summary:focus-visible{outline:3px solid #00b4d940;outline-offset:4px}
.step-number{display:inline-flex;align-items:center;justify-content:center;width:29px;height:29px;flex:none;border:1px solid #bce6ed;border-radius:8px;background:#e8f8fb;color:#007e98;font-size:12px;letter-spacing:0;font-weight:800}
.step-chevron{width:16px;height:16px;margin-left:auto;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transform:rotate(-90deg)}
.workflow-step[open]>summary .step-chevron{transform:rotate(0)}
.step-body{padding-top:14px}

.ai-learn{font-size:11px;color:var(--muted);margin:10px 0 16px}.ai-learn>summary{cursor:pointer;color:#007e98;font-weight:600}.ai-learn a{color:#007e98}.ai-learn>summary:focus-visible{outline:3px solid #00b4d940;outline-offset:3px}#aiConsentDialog p{margin:12px 0}#aiConsentDialog .row{margin-top:18px}
#aiConsentDialog{max-height:90dvh;overflow:auto}

/* Theme affects the interface; print canvas and export rendering stay unchanged. */
.theme-toggle{margin-left:auto;display:flex;align-items:center;gap:6px;border:0;background:transparent;padding:8px 4px;flex-shrink:0}.theme-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.theme-track{display:block;width:38px;height:22px;border:1px solid #a5b2c1;background:#e6edf4;border-radius:20px;padding:2px}.theme-thumb{display:block;width:16px;height:16px;background:#fff;border-radius:50%;box-shadow:0 1px 3px #0003;transition:transform .15s}.theme-toggle[aria-checked=true] .theme-track{background:#007f9b;border-color:#39c4e0}.theme-toggle[aria-checked=true] .theme-thumb{transform:translateX(16px)}.theme-toggle[aria-checked=false] .theme-moon,.theme-toggle[aria-checked=true] .theme-sun{opacity:.45}.header-contact{margin-left:0}
:root[data-theme=dark]{color-scheme:dark;--ink:#e7eef6;--muted:#a6b4c5;--line:#354354;--bg:#111820}
[data-theme=dark] header,[data-theme=dark] aside,[data-theme=dark] .workbar,[data-theme=dark] footer,[data-theme=dark] dialog,[data-theme=dark] .zoom{background:#19232e}
[data-theme=dark] header img{filter:brightness(0) invert(1)}
[data-theme=dark] button,[data-theme=dark] header button,[data-theme=dark] .unit,[data-theme=dark] .bg-settings select{background:#222f3d;color:var(--ink)}
[data-theme=dark] button:hover,[data-theme=dark] header button:hover,[data-theme=dark] .files-toggle:hover{background:#2b4052;border-color:#558099}
[data-theme=dark] .primary{background:#13b5d3;border-color:#13b5d3;color:#07202a}
[data-theme=dark] .primary:hover{background:#46cbe4;border-color:#46cbe4}
[data-theme=dark] .whatsapp{background:#168344;border-color:#168344;color:#fff}
[data-theme=dark] .whatsapp:hover{background:#116735;border-color:#116735;color:#fff}
[data-theme=dark] #stage{background-color:#101820;background-image:radial-gradient(#324353 .8px,transparent .8px)}
[data-theme=dark] label,[data-theme=dark] .eyebrow,[data-theme=dark] .empty,[data-theme=dark] #welcome,[data-theme=dark] footer,[data-theme=dark] .unit span{color:#a6b4c5}
[data-theme=dark] .workflow-step>summary{color:#dae7f3}
[data-theme=dark] .workflow-step>summary:hover{background:#223c48;color:#70dcef}
[data-theme=dark] .step-number{background:#163e49;border-color:#356572;color:#70dcef}
[data-theme=dark] .object,[data-theme=dark] kbd,[data-theme=dark] h2 small{background:#24313e}
[data-theme=dark] .object.selected,[data-theme=dark] .upload,[data-theme=dark] #backgroundDialog .active{background:#163b47;border-color:#2fb9d4;color:#a1e9f5}
[data-theme=dark] .alpha-panel{background:#17212c}
[data-theme=dark] .alpha-help,[data-theme=dark] .validation,[data-theme=dark] .print-file{background:#243340;color:#b4c5d7}
[data-theme=dark] .validation.error{background:#462436;color:#ffbad5}
[data-theme=dark] .text,[data-theme=dark] .ai-learn a,[data-theme=dark] .ai-learn>summary{color:#70dcef}
[data-theme=dark] .danger{color:#ff94c1}
[data-theme=dark] #alphaIndicator{background:#203246;color:#fff}
[data-theme=dark] .swatch.white{background:#fff}
[data-theme=dark] .swatch.black{background:#111}
[data-theme=dark] .theme-toggle{background:transparent}
@media(max-width:850px){header{grid-template-columns:140px minmax(60px,1fr) auto}.theme-toggle{margin:0;justify-self:end}.header-contact{grid-column:1/4;justify-self:stretch}.header-actions{grid-column:1/4}.theme-toggle{grid-column:3;grid-row:1}}
@media(prefers-reduced-motion:reduce){.theme-thumb{transition:none}}
[data-theme=dark] #welcome{color:#536b7a}
