/* SEMBLANZIA — MIXED PHOTOREAL / VECTOR DECORATIONS */
.poster{position:relative}
.semblanzia-decoration-layer{position:absolute;inset:0;z-index:auto!important;pointer-events:none;overflow:visible}
.semblanzia-decoration-item{position:absolute;pointer-events:none;transform-origin:center;box-sizing:border-box;touch-action:pan-y}
.semblanzia-decoration-hit-layer{position:absolute;inset:0;z-index:80;pointer-events:none;overflow:visible}
.semblanzia-decoration-hit{position:absolute;pointer-events:auto;transform-origin:center;box-sizing:border-box;touch-action:pan-y;background:transparent}
.semblanzia-floating-decoration{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;user-select:none;-webkit-user-select:none;overflow:hidden}
.semblanzia-floating-decoration>img,.semblanzia-floating-decoration>svg,.decoration-art img,.decoration-art svg{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:fill;overflow:hidden;pointer-events:none;user-select:none;-webkit-user-drag:none;box-sizing:border-box}
.semblanzia-floating-decoration>img,.decoration-art img{filter:drop-shadow(0 4px 7px rgba(0,0,0,.10)) saturate(.98) contrast(1.02)}
.semblanzia-floating-decoration>img[src*="papel-rasgado"],
.semblanzia-floating-decoration>img[src*="marco-encaje-"]{filter:saturate(.98) contrast(1.02)}
.decoration-art{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}
.semblanzia-decoration-hit.selected{outline:2px dashed rgba(181,138,53,.88);outline-offset:6px}
.decoration-handle,.decoration-delete,.decoration-order-toolbar{display:none}
.semblanzia-decoration-hit.selected .decoration-handle,.semblanzia-decoration-hit.selected .decoration-delete,.semblanzia-decoration-hit.selected .decoration-order-toolbar{display:flex}
.decoration-handle,.decoration-delete{position:absolute;z-index:6;box-sizing:border-box;align-items:center;justify-content:center;touch-action:none}
.decoration-handle{width:32px;height:32px;border:2px solid #fff;border-radius:50%;background:#b58a35;box-shadow:0 3px 10px rgba(0,0,0,.26)}
.decoration-handle.resize-left,.decoration-handle.resize-right{top:50%;cursor:ew-resize}
.decoration-handle.resize-left{left:8px;transform:translateY(-50%)}
.decoration-handle.resize-right{right:8px;transform:translateY(-50%)}
.decoration-handle.resize-left:after,.decoration-handle.resize-right:after{content:'↔';color:#fff;font:700 14px/1 sans-serif}
.decoration-handle.resize-top,.decoration-handle.resize-bottom{left:50%;cursor:ns-resize}
.decoration-handle.resize-top{top:8px;transform:translateX(-50%)}
.decoration-handle.resize-bottom{bottom:8px;transform:translateX(-50%)}
.decoration-handle.resize-top:after,.decoration-handle.resize-bottom:after{content:'↕';color:#fff;font:700 14px/1 sans-serif}
.decoration-handle.rotate{left:50%;top:-48px;transform:translateX(-50%);border:2px solid #b58a35;border-radius:50%;background:#fff;color:#b58a35;box-shadow:0 3px 10px rgba(0,0,0,.24);font:700 14px/1 sans-serif;cursor:grab}
.decoration-delete{left:50%;bottom:-52px;transform:translateX(-50%);min-width:62px;height:30px;padding:0 10px;border:1px solid #fff;border-radius:999px;background:#9d544f;color:#fff;box-shadow:0 3px 10px rgba(0,0,0,.24);font:700 10px/1 Montserrat,sans-serif;cursor:pointer}
.decoration-order-toolbar{position:absolute;left:50%;top:-88px;transform:translateX(-50%);z-index:8;align-items:center;gap:6px;padding:6px;border:1px solid rgba(181,138,53,.35);border-radius:999px;background:rgba(255,253,247,.97);box-shadow:0 8px 22px rgba(0,0,0,.18);white-space:nowrap}
.decoration-order-toolbar button{height:30px;border:0;border-radius:999px;padding:0 10px;background:#fff;color:#5b4523;font:600 10px/1 Montserrat,sans-serif;box-shadow:inset 0 0 0 1px rgba(181,138,53,.22)}
.decoration-order-toolbar .decoration-controller-close{width:30px;padding:0;font-size:18px;line-height:1;background:#17372f;color:#fff;box-shadow:none}
.semblanzia-decoration-controls{position:fixed;left:50%;top:10px;bottom:auto;transform:translateX(-50%);z-index:10020;width:min(95vw,520px);font-family:Montserrat,sans-serif;pointer-events:none}
.decoration-add,.decoration-library{pointer-events:auto}
.decoration-add{display:block;margin:auto;padding:11px 18px;border:1px solid #b58a35;border-radius:26px;background:#fffdf8;color:#5b4523;font-weight:600;box-shadow:0 7px 24px rgba(0,0,0,.17)}
.decoration-library{margin-top:10px;padding:12px;border-radius:20px;background:rgba(255,255,255,.985);box-shadow:0 12px 38px rgba(0,0,0,.2);max-height:58vh;overflow:auto;-webkit-overflow-scrolling:touch}
.decoration-library[hidden]{display:none}
.decoration-library-head{position:sticky;top:-12px;z-index:2;display:flex;align-items:center;justify-content:space-between;margin:-12px -12px 10px;padding:12px;background:rgba(255,255,255,.985);border-bottom:1px solid rgba(181,138,53,.16)}
.decoration-library-head strong{font-size:13px;color:#433b32}
.decoration-library-close{width:32px;height:32px;border:0;border-radius:50%;background:#17372f;color:#fff;font:500 20px/1 sans-serif}
.decoration-library-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.decoration-library-grid>button{position:relative;border:1px solid #e7ddca;border-radius:15px;background:#fff;padding:8px;color:#433b32;min-height:142px;overflow:hidden}
.decoration-thumb{position:relative;display:flex;align-items:center;justify-content:center;height:106px;border-radius:11px;background:linear-gradient(145deg,#faf8f3,#fff);overflow:hidden}
.decoration-thumb img,.decoration-thumb svg{display:block;max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain;pointer-events:none}
.decoration-thumb img{filter:drop-shadow(0 5px 8px rgba(0,0,0,.13))}
.decoration-library-grid>button small{display:block;font-size:10px;line-height:1.25;margin-top:7px;font-weight:600;color:#62594d}
.decoration-library-grid>button:active{transform:scale(.985)}
.decoration-plus-locked .decoration-thumb img{opacity:.48;filter:grayscale(.15) drop-shadow(0 4px 7px rgba(0,0,0,.09))}
.decoration-plus-locked{border-color:rgba(93,59,74,.22)!important;background:#fffafb!important}
.decoration-plus-badge{position:absolute;right:7px;top:7px;z-index:2;padding:4px 7px;border-radius:999px;background:#5d3b4a;color:#fff;font:700 8px/1 Montserrat,sans-serif;letter-spacing:.08em;box-shadow:0 2px 7px rgba(0,0,0,.14)}
@media(max-width:600px){.semblanzia-decoration-controls{top:8px;width:min(96vw,500px)}.decoration-library{padding:10px;max-height:56vh}.decoration-library-head{top:-10px;margin:-10px -10px 8px;padding:10px}.decoration-library-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.decoration-library-grid>button{min-height:132px;padding:7px}.decoration-thumb{height:96px}.decoration-handle{width:38px;height:38px}.decoration-handle.resize-left{left:8px}.decoration-handle.resize-right{right:8px}.decoration-handle.resize-top{top:8px}.decoration-handle.resize-bottom{bottom:8px}.decoration-handle.rotate{top:-52px}.decoration-order-toolbar{top:-94px}.decoration-order-toolbar button{height:32px;padding:0 9px;font-size:9px}.decoration-order-toolbar .decoration-controller-close{width:32px;font-size:19px}}
/* Sent-back decorations must not create an invisible touch/click wall over editable sections. */




