/* Mi mundo — Estudio creativo de scrapbook v14 */
.sb-overlay{position:fixed;z-index:190;inset:0;background:#271c26d6;display:flex;align-items:center;justify-content:center;font-family:system-ui,-apple-system,sans-serif}
.sb-shell{width:min(1350px,100%);height:min(95dvh,970px);background:#fffaf8;color:#624956;display:flex;flex-direction:column;overflow:hidden;border-radius:22px;box-shadow:0 16px 85px #110b14a6}
.sb-top{padding:14px 20px;background:#fff;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #eddddc;gap:9px;flex-shrink:0}
.sb-top small{display:block;font-size:10px;letter-spacing:1.3px;text-transform:uppercase;color:#b18c9b;font-weight:800}
.sb-top strong{display:block;font:500 22px Georgia,serif;color:#734357;margin-top:4px}
.sb-top-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.sb-top-actions button,.sb-toolbar button,.sb-inspector button{background:#fff;color:#784e60;border:1px solid #e3d2d5;border-radius:10px;padding:9px 11px;font-weight:650;font-size:12px;min-height:39px;touch-action:manipulation}
.sb-top-actions button:hover,.sb-toolbar button:hover,.sb-inspector button:hover{background:#f5e9e9}
.sb-top-actions button:disabled{opacity:.38;pointer-events:none}
.sb-top-actions .sb-top-close{font-size:23px;padding:1px;width:41px;height:39px;background:#f8eaea}
.sb-toolbar{display:flex;gap:6px;flex-wrap:nowrap;overflow-x:auto;padding:10px 16px;background:#fdf4f2;flex-shrink:0;border-bottom:1px solid #e9d6d8;scrollbar-width:thin}
.sb-toolbar button{flex:0 0 auto;white-space:nowrap;background:white}
.sb-workspace{min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 300px;flex:1;overflow:hidden}
.sb-canvas-wrap{min-width:0;min-height:0;overflow:auto;padding:20px;display:flex;flex-direction:column;align-items:center;background:radial-gradient(#d8cbd0 1px,transparent 1px),#f2eef0;background-size:21px 21px;overscroll-behavior:contain}
.sb-stage-container{width:min(100%,610px);flex-shrink:0;box-shadow:0 12px 40px #664c6055;background:#fff}
.sb-stage{position:relative;width:100%;overflow:hidden;isolation:isolate;background:#fff;container-type:inline-size}
.sb-stage .sb-item{position:absolute;box-sizing:border-box;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.1;display:block}
.sb-stage.editing .sb-item{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
.sb-stage.editing .sb-item:active{cursor:grabbing}
.sb-stage.editing .sb-item.selected{outline:2px dashed #973f69;outline-offset:3px}
.sb-stage.editing .sb-item.selected .sb-size-handle{opacity:1}
.sb-size-handle{position:absolute;bottom:-12px;right:-12px;width:27px;height:27px;background:#713b58;color:white;border:2px solid #fff;border-radius:50%;display:grid;place-items:center;z-index:3;opacity:0;font-size:15px;cursor:nwse-resize}
.sb-stage .sb-item.sb-photo{overflow:visible;background:#fff;border-radius:4px}
.sb-stage .sb-photo img{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none;user-select:none;-webkit-user-drag:none}
.sb-stage .frame-white{padding:5px;background:white!important;box-shadow:0 2px 12px #30212a35}
.sb-stage .frame-polaroid{padding:5px 5px 20px;background:white!important;box-shadow:0 3px 16px #30212a3d}
.sb-stage .frame-round{overflow:hidden!important;border-radius:13px;box-shadow:0 2px 9px #30212a33}
.sb-stage .frame-shadow{box-shadow:0 7px 24px #30212a80}
.sb-photo-caption{position:absolute;display:block;left:0;right:0;text-align:center;font:italic 11px/1.1 Georgia,serif;color:#795b67;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sb-photo-caption.bottom{bottom:0;background:#ffffffd9}
.sb-photo-caption.overlay{bottom:0;color:white;background:#372135bc;padding:4px 2px}
.sb-stage .sb-title{font-weight:650;line-height:1.12;text-align:center;overflow:hidden}
.sb-stage .sb-text{line-height:1.28;overflow:hidden}
.sb-stage .sb-sticker{line-height:1;display:grid;place-items:center;overflow:visible}
.sb-stage .shape-stamp{border-radius:15px;box-shadow:0 3px 12px #4b354a2e}
.sb-canvas-wrap>p{font-size:11px;line-height:1.6;color:#967b88;text-align:center;margin:16px 0 5px;max-width:600px}
.sb-inspector{background:#fffdfb;overflow-y:auto;padding:18px 17px;border-left:1px solid #e6d6d7;overscroll-behavior:contain}
.sb-inspector h3{font:500 24px Georgia,serif;margin:0 0 13px;color:#714657}
.sb-panel-section{border:1px solid #ebdddd;background:#fdf8f6;padding:14px;border-radius:14px;margin-bottom:14px;display:flex;flex-direction:column;gap:12px}
.sb-panel-section>strong{font:600 16px Georgia,serif;color:#6e4657}
.sb-panel-section label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#80596b;font-weight:700;min-width:0}
.sb-panel-section label.sb-check{flex-direction:row;align-items:center;line-height:1.45}
.sb-panel-section select,.sb-panel-section textarea,.sb-panel-section input:not([type=checkbox]):not([type=color]):not([type=range]){width:100%;max-width:100%;min-height:39px;border:1px solid #d9bfc5;background:white;border-radius:10px;padding:9px;font:400 16px system-ui,sans-serif;color:#603f50}
.sb-panel-section input[type=color]{width:100%;height:40px;border:0;background:transparent;padding:0}
.sb-panel-section input[type=range]{width:100%;accent-color:#955a74}
.sb-panel-section input[type=checkbox]{width:19px;height:19px;accent-color:#955a74}
.sb-panel-section select:focus-visible,.sb-panel-section button:focus-visible,.sb-top-actions button:focus-visible,.sb-toolbar button:focus-visible{outline:2px solid #a87389;outline-offset:1px}
.sb-panel-section button{width:100%;min-height:42px}
.sb-edit-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.sb-inspector-empty{font-size:12px;line-height:1.6;color:#99818b;background:#f9f0ed;padding:16px;border-radius:12px;margin:13px 0}
.sb-muted{font-size:11px;color:#9b808c;line-height:1.6;margin:0}
.sb-bottom{padding:11px 20px;border-top:1px solid #ead8d8;background:white;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}
.sb-bottom span{font-size:11px;color:#947985;line-height:1.5}
.sb-bottom .sb-apply{background:#78435c;color:#fff;border:0;padding:12px 19px;border-radius:12px;font-size:13px;min-height:44px;font-weight:750;touch-action:manipulation}
.sb-bottom .sb-apply:hover{background:#633048}
.sb-design-launch{display:flex;flex-direction:column;gap:10px;padding:16px;border:1px solid #dcb9c4;border-radius:15px;background:linear-gradient(130deg,#fcf5f0,#f7e8e7);margin:12px 0 16px}
.sb-design-launch strong{font:500 20px Georgia,serif;color:#6b3e54}
.sb-design-launch p{margin:0;font-size:12px;color:#957480;line-height:1.55}
.sb-design-launch button{background:#78435c;color:#fff;padding:12px;border:0;border-radius:10px;font-weight:750;min-height:46px}
.sb-detail-buttons{display:flex;gap:9px;flex-wrap:wrap;margin:13px 0}
.sb-detail-buttons button{font-size:12px;padding:10px 12px;background:#faf0ed;border:1px solid #e3cdd4;color:#72485b;border-radius:11px;min-height:43px}
.sb-page-detail{margin:13px auto 22px;max-width:700px}
.sb-page-detail>.sb-stage{box-shadow:0 7px 26px #69485c33}
@media(max-width:830px){
 .sb-shell{height:100dvh;border-radius:0}
 .sb-top{padding:calc(9px + env(safe-area-inset-top,0px)) 12px 10px;align-items:start}
 .sb-top strong{font-size:17px}
 .sb-top-actions{gap:4px;justify-content:flex-end}
 .sb-top-actions button{font-size:10px;padding:8px;min-height:35px}
 .sb-toolbar{padding:9px 9px}
 .sb-workspace{grid-template-columns:1fr;display:flex;flex-direction:column;overflow:hidden}
 .sb-canvas-wrap{padding:12px 10px 7px;flex:1;min-height:0}
 .sb-stage-container{width:min(100%,440px)}
 .sb-canvas-wrap>p{font-size:10px;margin:9px 0 1px}
 .sb-inspector{border-left:0;border-top:1px solid #ddc7cf;flex:0 0 auto;height:min(29dvh,255px);padding:12px;overflow:auto}
 .sb-inspector h3{font-size:17px;margin:0 0 7px}
 .sb-panel-section{padding:11px;gap:8px}
 .sb-panel-section label{font-size:12px}
 .sb-bottom{padding:9px 11px calc(10px + env(safe-area-inset-bottom,0px))}
 .sb-bottom span{font-size:10px}
 .sb-bottom .sb-apply{padding:11px 13px;font-size:12px}
}
@media(max-width:440px){
 .sb-top{flex-direction:column;gap:7px}
 .sb-top-actions{width:100%;justify-content:space-between}
 .sb-top-actions button{flex:0 0 auto;font-size:11px}
 .sb-inspector{height:min(31dvh,240px)}
}
@media(prefers-reduced-motion:reduce){.sb-shell button{transition:none!important}}

/* Imagen de fondo privada: se sitúa detrás del lienzo interactivo. */
.sb-photo-background{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none;z-index:0}
.sb-sticker-palette{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.sb-inspector .sb-sticker-palette button{min-width:0;min-height:42px;font-size:23px;line-height:1;padding:6px;border-radius:10px;background:#fff9f6}
.sb-inspector .sb-sticker-palette button:active{background:#f2dfe5}

.sb-stage .sb-title.boxed{display:flex;align-items:center;justify-content:center;padding:6px 10px;border-radius:12px;box-shadow:0 4px 18px #48354028;overflow:hidden}


/* v14.1 — Papeles de scrapbooking, rotación y decoración ampliada */
.sb-stage.editing .sb-item.selected .sb-rotate-handle{opacity:1;pointer-events:auto}
.sb-rotate-handle{position:absolute;top:-17px;right:-17px;width:32px;height:32px;background:#f5e6f0;color:#78405f;border:2px solid #824960;border-radius:50%;display:grid;place-items:center;z-index:6;opacity:0;pointer-events:none;font-size:24px;line-height:1;cursor:grab;touch-action:none;box-shadow:0 4px 12px #52394b45}
.sb-rotate-handle:active{cursor:grabbing;background:#dfb9d2}
.sb-stage.editing .sb-item.selected .sb-size-handle{z-index:7}
.sb-paper-panel>.sb-paper-subtitle,.sb-deco-panel>.sb-paper-subtitle{font-size:15px;color:#734457;margin-top:6px}
.sb-color-swatches{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.sb-inspector .sb-color-swatches button{width:100%;min-height:31px;padding:0;border:2px solid #fff;border-radius:9px;background:var(--sb-swatch);box-shadow:0 0 0 1px #c7b2b6}
.sb-inspector .sb-color-swatches button.chosen{outline:3px solid #854b66;outline-offset:1px}
.sb-paper-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.sb-inspector .sb-paper-grid .sb-paper-choice{min-height:91px;padding:0;display:flex;flex-direction:column;align-items:stretch;justify-content:end;overflow:hidden;border:2px solid #d8c2c7;background-size:auto;background-repeat:repeat;border-radius:12px;box-shadow:inset 0 0 0 1px #ffffff52;touch-action:manipulation}
.sb-inspector .sb-paper-grid .sb-paper-choice.active{border-color:#80445f;outline:2px solid #80445f;outline-offset:1px}
.sb-paper-choice span{font-size:10px;color:#63394d;background:#fffaf3e9;padding:8px 5px;display:block;width:100%;text-align:center;line-height:1.2}
.sb-paper-options{display:grid;gap:11px;padding:12px;border:1px solid #e3cdd4;border-radius:11px;background:#fff}
.sb-rotation-controls{display:grid;gap:9px;padding:13px;border:1px solid #e5cdd9;border-radius:13px;background:linear-gradient(140deg,#fff,#f7e9f1)}
.sb-rotation-controls>strong{font-size:14px;color:#74415a}
.sb-rotate-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.sb-inspector .sb-rotate-buttons button{font-size:11px;min-width:0;padding:8px 4px;min-height:42px;border-color:#d8b7ca;background:#fff}
.sb-deco-categories{display:flex;gap:5px;overflow-x:auto;padding:2px 0 8px;scrollbar-width:thin}
.sb-inspector .sb-deco-categories button{width:auto;flex:0 0 auto;padding:8px 10px;border-radius:999px;min-height:36px;font-size:11px;white-space:nowrap}
.sb-inspector .sb-deco-categories button.active{background:#793c5c;color:white;border-color:#793c5c}
.sb-deco-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}
.sb-inspector .sb-deco-grid button{width:100%;min-height:46px;font-size:24px;padding:4px;background:#fff;border:1px solid #e6d3d8;border-radius:11px;line-height:1.3;touch-action:manipulation}
.sb-inspector .sb-deco-grid button:hover{background:#f7e7f0}
.sb-deco-extra{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.sb-inspector .sb-deco-extra button{width:100%;font-size:12px;padding:8px 6px}
.sb-shape-tape{border-radius:4px!important;background-image:repeating-linear-gradient(125deg,#ffffff80 0 6px,#ffffff10 6px 15px)!important;box-shadow:0 3px 8px #6c53632c;opacity:.9}
.sb-shape-circle{border-radius:50%!important}
.sb-shape-ticket{border:2px dashed #ffffff99;border-radius:5px!important;box-shadow:0 2px 12px #57435036}
@media(max-width:830px){
 .sb-deco-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
 .sb-color-swatches{grid-template-columns:repeat(7,minmax(0,1fr))}
 .sb-inspector .sb-paper-grid .sb-paper-choice{min-height:78px}
 .sb-inspector .sb-deco-grid button{min-height:45px}
 .sb-rotate-handle{height:35px;width:35px;top:-18px;right:-18px}
}
@media(max-width:390px){
 .sb-deco-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
 .sb-inspector .sb-deco-grid button{font-size:22px}
}
