:root{--red:#F6020E;--red-hover:#d9000a;--black:#050505;--panel:#111112;--panel-2:#171719;--line:#2a2a2d;--muted:#8f8f96;--text:#f7f7f8;--white:#fcfbfc;--green:#65d6a5;--shadow:0 12px 35px rgba(0,0,0,.22);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:#080809;font-synthesis:none;text-rendering:optimizeLegibility}
*{box-sizing:border-box}.is-hidden{display:none!important}html,body{margin:0;min-height:100%;background:#080809}body{font-size:14px}button,input{font:inherit}button{cursor:pointer}button:disabled{opacity:.4;cursor:not-allowed}.app-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 24px;border-bottom:1px solid #28282b;background:#050505;min-height:112px}.brand-lockup{display:flex;align-items:center;gap:16px;min-width:0}.brand-logo{width:104px;height:84px;object-fit:contain;object-position:center;background:#000;flex-shrink:0}.brand-copy .eyebrow,.eyebrow{font-size:9px;font-weight:800;letter-spacing:.19em;color:#aaa9ad}.brand-copy h1{font-size:clamp(21px,2vw,28px);letter-spacing:-.045em;line-height:1.15;margin:5px 0 4px;font-weight:850}.brand-copy h1 span{color:var(--red)}.brand-copy p{margin:0;color:#aaa9ad;font-size:12px}.header-actions{display:flex;align-items:center;gap:12px}.local-pill{display:inline-flex;gap:7px;align-items:center;border:1px solid #27272b;border-radius:999px;color:#c5c5ca;padding:8px 12px;font-size:11px;white-space:nowrap}.status-dot{width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 0 3px rgba(101,214,165,.12)}.app-shell{display:grid;grid-template-columns:265px minmax(380px,1fr) 270px;gap:14px;padding:14px;max-width:1920px;margin:auto;align-items:start}.left-sidebar,.right-sidebar{display:flex;flex-direction:column;gap:12px;min-width:0}.panel-card{border:1px solid var(--line);background:linear-gradient(155deg,#141416,#101011);border-radius:13px;padding:15px;box-shadow:0 6px 16px rgba(0,0,0,.08)}.section-heading{display:flex;align-items:flex-start;gap:10px;margin-bottom:15px}.section-heading h2{font-size:13px;margin:0 0 4px;font-weight:750;letter-spacing:-.01em}.section-heading p{font-size:10px;color:var(--muted);margin:0;line-height:1.45}.section-icon{display:grid;place-items:center;flex-shrink:0;width:27px;height:27px;background:rgba(246,2,14,.12);color:var(--red);border:1px solid rgba(246,2,14,.22);border-radius:8px;font-size:16px;font-weight:700}.input-pair{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:11px}label{display:block;font-size:10px;font-weight:700;color:#cacacf}input[type=number]{display:block;width:100%;margin-top:6px;background:#09090a;border:1px solid #343438;border-radius:7px;color:#f7f7f8;padding:9px 9px;outline:none;min-width:0;font-variant-numeric:tabular-nums}input[type=number]:focus{border-color:var(--red);box-shadow:0 0 0 2px rgba(246,2,14,.15)}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid transparent;border-radius:8px;padding:10px 12px;font-size:11px;font-weight:750;letter-spacing:.005em;transition:background .15s,border-color .15s,transform .15s;white-space:nowrap}.button:active{transform:translateY(1px)}.button-primary{background:var(--red);color:#fff}.button-primary:hover{background:var(--red-hover)}.button-secondary{background:#252528;border-color:#39393e;color:#f0f0f2}.button-secondary:hover,.button-quiet:hover{border-color:#5a5a61;background:#2a2a2e}.button-outline{background:transparent;border-color:#3b3b40;color:#dddde1}.button-outline:hover{border-color:var(--red);color:#fff}.button-quiet{background:transparent;border-color:transparent;color:#d0d0d4}.button-full{width:100%}.button-icon{font-size:15px;line-height:1;font-weight:500}.icon-button{width:34px;padding:8px 0;font-size:17px}.danger-icon{color:#ff686e}.button-danger-soft{background:rgba(246,2,14,.09);border-color:rgba(246,2,14,.25);color:#ff6a72}.button-danger-soft:hover{background:rgba(246,2,14,.18)}.microcopy{font-size:10px;color:#898990;line-height:1.5;margin:9px 0 0}.resolution-box{margin-top:11px;padding:10px 11px;background:#09090a;border:1px solid #29292d;border-radius:8px;display:flex;flex-direction:column;gap:4px}.resolution-box span{font-size:10px;color:var(--muted)}.resolution-box strong{font-size:13px;color:#fff;font-variant-numeric:tabular-nums}.toggle-row{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-top:13px;position:relative;cursor:pointer}.toggle-row span{display:flex;flex-direction:column;gap:3px;min-width:0}.toggle-row strong{font-size:11px;color:#e5e5e8;font-weight:700}.toggle-row small{font-size:9px;color:#85858c;font-weight:400;line-height:1.45}.toggle-row input{position:absolute;opacity:0;pointer-events:none}.toggle-row i{width:33px;height:19px;border-radius:30px;flex-shrink:0;background:#39393e;border:1px solid #4a4a4f;position:relative;transition:.15s}.toggle-row i:after{content:"";position:absolute;width:13px;height:13px;left:2px;top:2px;border-radius:50%;background:#a3a3aa;transition:.15s}.toggle-row input:checked+i{background:rgba(246,2,14,.36);border-color:var(--red)}.toggle-row input:checked+i:after{left:16px;background:#fff}.toggle-row input:focus-visible+i{outline:2px solid var(--red);outline-offset:3px}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.segmented-control{display:grid;grid-template-columns:1fr;gap:6px}.background-option{display:flex;align-items:center;gap:8px;text-align:left;border:1px solid #313136;border-radius:7px;background:#0b0b0c;color:#bdbdc3;font-size:10px;padding:9px 10px}.background-option.is-active{border-color:var(--red);background:rgba(246,2,14,.09);color:#fff;box-shadow:inset 2px 0 var(--red)}.checker-swatch,.white-swatch,.black-swatch{width:17px;height:17px;border:1px solid #555;border-radius:4px;flex-shrink:0}.checker-swatch{background-color:white;background-image:linear-gradient(45deg,#999 25%,transparent 25%),linear-gradient(-45deg,#999 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#999 75%),linear-gradient(-45deg,transparent 75%,#999 75%);background-size:6px 6px;background-position:0 0,0 3px,3px -3px,-3px 0}.white-swatch{background:#fcfbfc}.black-swatch{background:#050505}.export-card .section-heading{margin-bottom:9px}.threshold-row{display:flex;align-items:center;justify-content:space-between;color:#a4a4aa;font-size:10px;margin:13px 0 6px}.threshold-row output{color:white;font-weight:800;font-variant-numeric:tabular-nums}.range-input{width:100%;accent-color:var(--red);margin:0 0 15px}.export-card .button+.button{margin-top:8px}.privacy-note{display:flex;gap:9px;align-items:center;padding:4px 8px 8px;color:#8e8e94}.privacy-shield{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;background:rgba(101,214,165,.1);color:var(--green);font-weight:900;flex-shrink:0}.privacy-note p{margin:0;font-size:9px;line-height:1.6}.privacy-note strong{color:#c9c9ce;font-size:10px}.workspace{min-width:0;border:1px solid #2b2b2f;border-radius:13px;background:#101011;box-shadow:var(--shadow);overflow:hidden}.mobile-upload-row,.mobile-empty-state{display:none}.workspace-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px 16px;border-bottom:1px solid #29292d;background:#141416}.workspace-title h2{font-size:14px;margin:0 0 5px;font-weight:800}.workspace-title p{font-size:10px;color:#99999f;margin:0;display:flex;align-items:center;gap:8px}.toolbar-divider{color:var(--red)}.toolbar-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.toolbar-actions .button{padding:9px 10px}.stage-viewport{position:relative;min-height:610px;height:min(74vh,880px);overflow:auto;display:flex;align-items:safe center;justify-content:safe center;padding:45px 24px 28px;background:#0a0a0b;background-image:radial-gradient(#28282b .75px,transparent .75px);background-size:16px 16px}.stage-viewport.drag-over{outline:2px dashed var(--red);outline-offset:-8px;background-color:#1a0a0b}.stage-hint{position:absolute;top:15px;left:16px;right:16px;color:#7e7e85;font-size:10px;display:flex;align-items:center;gap:7px;pointer-events:none}.hint-dot{width:6px;height:6px;background:var(--red);border-radius:50%}.sheet{position:relative;flex-shrink:0;box-shadow:0 15px 45px rgba(0,0,0,.4);border:1px solid rgba(255,255,255,.22);overflow:hidden;transition:width .12s,height .12s}.sheet-transparent{background-color:#f3f3f3;background-image:linear-gradient(45deg,#d7d7d7 25%,transparent 25%),linear-gradient(-45deg,#d7d7d7 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#d7d7d7 75%),linear-gradient(-45deg,transparent 75%,#d7d7d7 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}.sheet-white{background:#fcfbfc}.sheet-black{background:#050505}.design-layer{position:absolute;inset:0}.design-object{position:absolute;box-sizing:border-box;cursor:move;user-select:none;touch-action:none;outline:1px solid transparent}.design-object img{display:block;width:100%;height:100%;object-fit:fill;pointer-events:none;user-select:none;-webkit-user-drag:none}.design-object.is-selected{outline:1.5px solid var(--red);z-index:4}.design-object.is-selected:before{content:"";position:absolute;inset:-1px;border:1px solid rgba(246,2,14,.18);pointer-events:none}.design-size-label{position:absolute;bottom:calc(100% + 4px);left:-1px;white-space:nowrap;font-size:9px;background:var(--red);padding:3px 5px;border-radius:4px;color:white;font-weight:800;pointer-events:none;box-shadow:0 2px 8px rgba(0,0,0,.2)}.resize-handle{display:none;position:absolute;right:-6px;bottom:-6px;width:13px;height:13px;background:var(--red);border:2px solid #fff;border-radius:3px;cursor:nwse-resize;touch-action:none;z-index:5}.design-object.is-selected .resize-handle{display:block}.empty-state{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;text-align:center;color:#272727;padding:14px;pointer-events:none}.empty-state .button{pointer-events:auto}.empty-icon{display:grid;place-items:center;width:44px;height:44px;background:rgba(246,2,14,.08);color:var(--red);border:1px solid rgba(246,2,14,.25);border-radius:13px;font-size:25px}.empty-state h3{margin:4px 0 0;font-size:14px;color:#2f2f2f}.empty-state p{margin:0 0 5px;font-size:10px;line-height:1.5;color:#686868;max-width:210px}.workspace-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 15px;background:#141416;border-top:1px solid #29292d}.zoom-controls{display:flex;align-items:center;gap:5px}.zoom-controls button{border:1px solid #343438;border-radius:6px;color:#d8d8dc;background:#202023;padding:5px 9px;font-size:11px}.zoom-controls button:hover{border-color:#63636a}.zoom-controls span{font-size:9px;color:#aaaab0;min-width:49px;text-align:center}.zoom-controls #fitView{margin-left:3px}.footer-tip{font-size:9px;color:#88888f;display:flex;align-items:center;gap:6px}.tip-star{color:var(--red);font-size:14px}.status-bar{padding:9px 15px;border-top:1px solid #27272b;color:#aaaab0;background:#0d0d0e;font-size:10px}.status-bar.is-error{color:#ff8b91}.status-bar.is-success{color:#7ce0b0}.selected-panel{min-height:180px}.selected-empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:12px 10px 18px;color:#77777e}.selected-empty span{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#202023;color:#adadb4;font-size:21px;margin-bottom:9px}.selected-empty p{font-size:10px;line-height:1.5;max-width:180px;margin:0}.inspector.is-hidden{display:none}.inspector-preview{height:115px;border-radius:8px;background-color:#222;background-image:linear-gradient(45deg,#3d3d3d 25%,transparent 25%),linear-gradient(-45deg,#3d3d3d 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#3d3d3d 75%),linear-gradient(-45deg,transparent 75%,#3d3d3d 75%);background-size:14px 14px;background-position:0 0,0 7px,7px -7px,-7px 0;display:flex;align-items:center;justify-content:center;overflow:hidden;margin-bottom:8px}.inspector-preview img{max-width:100%;max-height:100%;object-fit:contain}.inspector-filename{font-size:10px;color:#bdbdc3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:11px}.compact-toggle{margin:3px 0 13px}.inspector-actions{display:grid;gap:7px;margin-top:3px}.list-panel{min-height:160px}.list-heading{margin-bottom:10px}.design-list{display:flex;flex-direction:column;gap:6px;max-height:335px;overflow:auto;padding-right:2px}.list-empty{color:#72727a;font-size:10px;text-align:center;padding:14px 8px;border:1px dashed #37373c;border-radius:8px}.design-list-item{display:flex;gap:9px;align-items:center;min-width:0;padding:7px;border:1px solid #303035;border-radius:8px;background:#0c0c0d;cursor:pointer;transition:border-color .15s,background .15s}.design-list-item:hover{border-color:#5a5a60}.design-list-item.is-active{border-color:var(--red);background:rgba(246,2,14,.075)}.design-thumb{width:42px;height:42px;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:5px;background-color:#242427;background-image:linear-gradient(45deg,#444 25%,transparent 25%),linear-gradient(-45deg,#444 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#444 75%),linear-gradient(-45deg,transparent 75%,#444 75%);background-size:8px 8px;background-position:0 0,0 4px,4px -4px,-4px 0;overflow:hidden}.design-thumb img{max-width:100%;max-height:100%;object-fit:contain}.design-list-copy{min-width:0;flex:1}.design-list-copy strong{display:block;color:#e5e5e8;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.design-list-copy span{display:block;font-size:9px;color:#86868e;margin-top:4px;font-variant-numeric:tabular-nums}.list-delete{border:0;background:transparent;color:#76767d;font-size:16px;padding:4px 3px}.list-delete:hover{color:#ff7a81}.text-button{border:0;background:transparent;color:#ff777d;font-size:10px;font-weight:700;padding:13px 0 0}.text-button:hover{color:#ffb0b4}.help-dialog{width:min(560px,calc(100vw - 28px));border:1px solid #39393f;border-radius:16px;padding:22px;background:#121214;color:#f4f4f6;box-shadow:0 25px 100px rgba(0,0,0,.6)}.help-dialog::backdrop{background:rgba(0,0,0,.72);backdrop-filter:blur(3px)}.dialog-heading{display:flex;justify-content:space-between;gap:15px;align-items:flex-start;margin-bottom:16px}.dialog-heading h2{font-size:20px;letter-spacing:-.03em;margin:6px 0 0}.close-dialog{border:1px solid #333338;border-radius:8px;background:#202023;color:#eee;font-size:23px;width:34px;height:34px;line-height:1}.help-steps{padding-left:22px;display:grid;gap:11px;color:#bcbcc3;font-size:12px;line-height:1.55}.help-steps strong{color:#fff}.help-steps li::marker{color:var(--red);font-weight:800}.help-warning{font-size:11px;line-height:1.6;color:#cacacf;background:rgba(246,2,14,.075);border:1px solid rgba(246,2,14,.2);border-radius:9px;padding:12px;margin:16px 0}.help-warning strong{color:#fff}.busy-overlay{position:fixed;z-index:1000;inset:0;display:grid;place-items:center;background:rgba(0,0,0,.64);backdrop-filter:blur(4px)}.busy-overlay.is-hidden{display:none}.busy-card{width:min(310px,calc(100vw - 30px));padding:25px;border:1px solid #3b3b41;border-radius:15px;background:#141416;box-shadow:0 18px 60px #000;text-align:center}.spinner{width:31px;height:31px;border:3px solid #3b3b40;border-top-color:var(--red);border-radius:50%;animation:spin .8s linear infinite;margin:0 auto 14px}.busy-card strong{font-size:13px}.busy-card p{font-size:10px;line-height:1.5;color:#9999a0;margin:7px 0 0}@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:1370px){.app-shell{grid-template-columns:245px minmax(360px,1fr) 245px;gap:10px;padding:10px}.panel-card{padding:12px}.workspace-toolbar{padding:13px}.stage-viewport{min-height:560px;height:68vh}.header-actions .local-pill{display:none}}
@media(max-width:1100px){.app-shell{grid-template-columns:240px minmax(0,1fr)}.right-sidebar{grid-column:1 / -1;display:grid;grid-template-columns:1fr 1fr;align-items:start}.design-list{max-height:260px}.workspace{grid-column:2;grid-row:1 / span 1}.left-sidebar{grid-column:1;grid-row:1}.stage-viewport{height:70vh;min-height:560px}.header-actions{gap:5px}}
@media(max-width:760px){#emptyState{display:none!important}.mobile-empty-state:not(.is-hidden){display:flex;z-index:5;pointer-events:auto;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;text-decoration:none}.mobile-upload-row{display:block;padding:10px 12px;border-bottom:1px solid #29292d;background:#141416}.mobile-upload-row .button{width:100%;min-height:42px;font-size:12px}.mobile-file-picker{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.app-header{padding:10px 13px;min-height:88px}.brand-lockup{gap:9px}.brand-logo{width:65px;height:62px}.brand-copy .eyebrow{font-size:7px}.brand-copy h1{font-size:19px}.brand-copy p{font-size:10px}.header-actions .button{font-size:0;width:34px;padding:8px}.header-actions .button-icon{font-size:15px}.app-shell{display:flex;flex-direction:column;padding:8px;gap:9px}.workspace{order:0;width:100%}.left-sidebar{order:1;width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.right-sidebar{order:2;width:100%;display:grid;grid-template-columns:1fr}.panel-card{padding:12px}.stage-viewport{min-height:440px;height:62vh;padding:38px 12px 18px;justify-content:flex-start}.workspace-toolbar{align-items:flex-start;flex-direction:column;gap:10px}.toolbar-actions{width:100%}.toolbar-actions .button:first-child{flex:1}.workspace-footer{align-items:flex-start;flex-direction:column}.footer-tip{line-height:1.5}.selected-panel{min-height:auto}.design-list{max-height:260px}}
@media(max-width:470px){.left-sidebar{grid-template-columns:1fr}.brand-copy h1{font-size:17px}.brand-logo{width:58px;height:54px}.brand-copy p{max-width:175px}.local-pill{display:none}.stage-viewport{min-height:390px;height:55vh}.stage-hint{font-size:9px;top:12px}.workspace-toolbar{padding:12px}.toolbar-actions .button{font-size:10px}.panel-card{padding:13px}.header-actions{margin-left:auto}}


/* Orden exclusivo para celulares: vista del pliego → diseño seleccionado → medidas.
   Fuera de esta media query, el orden de escritorio permanece intacto. */
@media (max-width: 760px) {
  .app-shell {
    display: flex;
    flex-direction: column;
  }
  .left-sidebar,
  .right-sidebar {
    display: contents;
  }
  .workspace {
    order: 0;
    width: 100%;
  }
  .right-sidebar > .selected-panel {
    order: 1;
    width: 100%;
    grid-column: auto;
  }
  .left-sidebar > .panel-card:first-child {
    order: 2;
    width: 100%;
  }
  .left-sidebar > .panel-card:nth-child(2) {
    order: 3;
    width: 100%;
  }
  .left-sidebar > .panel-card:nth-child(3) {
    order: 4;
    width: 100%;
  }
  .left-sidebar > .export-card {
    order: 5;
    width: 100%;
  }
  .left-sidebar > .privacy-note {
    order: 6;
    width: 100%;
  }
  .right-sidebar > .list-panel {
    order: 7;
    width: 100%;
  }
}
