/* Menú de herramientas de la tienda: solo se ve lo que corresponde a la herramienta abierta. */
#tmPanel,.tm-hist{display:none}
.tm body.tm-design #tmPanel{display:block}
.tm body.tm-design .tm-hist{display:flex}
.tm body.tm-design #studioHub,.tm body.tm-design #studioSelection,.tm body.tm-design .history-controls,.tm body.tm-design #studioView,.tm #studioIconsDone,.tm .studio-icon-toolbar,.tm #iconsDetails>summary{display:none!important}
.tm #b-flat,.tm #markStrength,.tm #tonoBox,.tm .slider:has(#elRot),.tm .slider:has(#textRot),.tm #inspectorTabs{display:none!important}
.tm #tmPanel .tm-title{margin:0 0 4px;font-size:20px;font-weight:600;line-height:1.25;color:#22282d;text-wrap:balance}
.tm-lead{margin:0 0 14px;font-size:14px;line-height:1.45;color:#62666a;text-wrap:pretty}
.tm-lead:empty{display:none}
.tm-menu{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 12px}
.tm-tool{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-height:108px;padding:16px;border:1px solid #dcdad2;border-radius:14px;background:#fff;color:#22282d;font:inherit;text-align:left;cursor:pointer;transition:border-color .2s,background-color .2s,scale .12s ease-out}
.tm-tool:active{scale:.97}
@media(hover:hover){.tm-tool:hover{border-color:#b9a77a;background:#fbf8f0}}
.tm-tool:focus-visible,.tm-placed button:focus-visible,.tm-hist button:focus-visible{outline:2px solid #8a6a22;outline-offset:2px}
.tm-tool svg{width:26px;height:26px;margin-bottom:8px;fill:none;stroke:#8a6a22;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.tm-tool b{font-size:15px;font-weight:600;line-height:1.2}
.tm-tool span{font-size:12.5px;line-height:1.35;color:#62666a}
.tm-tool:last-child:nth-child(odd){grid-column:1/-1;min-height:84px}
.tm-placed{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px;padding-bottom:12px;border-bottom:1px solid #ebe8df}
.tm-placed:empty{display:none}
.tm-placed p{flex-basis:100%;margin:0;font-size:12.5px;font-weight:600;color:#5d6166}
.tm-placed button{min-height:44px;max-width:100%;padding:8px 14px;border:1px solid #d9cda9;border-radius:999px;background:#f6efde;color:#5d4718;font:500 13px/1.2 inherit;font-family:inherit;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tm-placed button[aria-pressed=true]{background:#1d2124;border-color:#1d2124;color:#fff}
.tm-back{display:none;margin:0 0 12px;padding:12px 14px;border:1px solid #e3dccb;border-radius:12px;background:#faf6ec;font-size:13px;line-height:1.45;color:#5d4f2e;text-wrap:pretty}
.tm-back b{display:block;font-weight:600}
.tm body[data-paso="3"]:not(.tm-open) .tm-back{display:block}
.tm body.tm-open .tm-menu{display:none}
/* QR del frente */
.tm-qr{display:none;margin:12px 0 16px}
.tm body.tm-qr-front .tm-qr{display:block}
.tm-qr label{display:block;margin-bottom:6px;font-size:13.5px;font-weight:600;color:#2b3034}
.tm-qr input{width:100%;box-sizing:border-box;min-height:48px;padding:11px 12px;border:1px solid #d5d5cc;border-radius:10px;background:#fff;font:400 16px/1.3 inherit;font-family:inherit}
.tm-qr .btn{width:100%;margin-top:10px}
.tm-qr .btn[hidden]{display:none}
.tm-qr .help{margin:10px 0 0;font-size:12.5px;color:#62666a}
/* Foto o logo */
.tm-img{display:none;gap:12px;margin:10px 0 16px}
.tm body.tm-image .tm-img{display:grid}
.tm-img-q{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13.5px;font-weight:600;color:#2b3034}
.tm-img-q[hidden],.tm-img-act button[hidden]{display:none}
.tm-seg{display:flex;gap:4px}
.tm-img button{min-height:44px;padding:8px 12px;border:1px solid #d2d4cb;border-radius:10px;background:#fffdf6;color:#313a2e;font:500 13px/1.2 inherit;font-family:inherit;cursor:pointer}
.tm-img button[aria-pressed=true]{background:#1d2124;border-color:#1d2124;color:#fff}
.tm-img-size{display:flex;align-items:center;gap:14px;font-size:13.5px;font-weight:600;color:#2b3034}
.tm-img-size input{flex:1;min-width:0;min-height:30px;accent-color:#8a6a22}
.tm-img-act{display:flex;flex-wrap:wrap;gap:6px}
.tm-img-act button{flex:1 1 auto}
.tm body.tm-image #studioImageTop,.tm body.tm-image #rowSize,.tm body.tm-image #b-delel,.tm body.tm-image #modeBox{display:none!important}
/* Controles del elemento: lo que acabas de elegir arriba y el tono al final. */
.tm #elCtl:not([hidden]){display:flex;flex-direction:column}
.tm #backgroundSection{order:3}.tm #elementActions{order:4}.tm #toneSection{order:5}
.tm body.tm-t-element #positionSection>summary,.tm body.tm-t-element #imageSection>summary,.tm body.tm-t-element #toneSection>summary,.tm body.tm-qr-front #positionSection>summary{display:none}
.tm body.tm-t-element #positionSection,.tm body.tm-t-element #imageSection,.tm body.tm-t-element #toneSection{border:0}
.tm body.tm-t-datos #freeTextControls,.tm body.tm-t-datos #geometryControls,.tm body.tm-t-datos #positionSection,.tm body.tm-t-datos #elementActions,.tm body.tm-t-datos [data-pane="2"]>h2:first-child,.tm body.tm-t-datos [data-pane="2"]>.lead,.tm body.tm-t-datos .text-targets-row{display:none!important}
.tm body.tm-t-icon #elCtl{display:none!important}
.tm body.tm-t-qr[data-paso="3"] #connectionSettings>summary{display:none}
.tm body.tm-t-qr[data-paso="3"] #rowSize,.tm body.tm-t-qr[data-paso="3"] #positionSection,.tm body.tm-t-qr[data-paso="3"] #elementActions{display:none!important}
/* Nombre y datos: primero los campos, después cómo se marcan. */
.tm body.tm-t-datos [data-pane="2"]:not([hidden]){display:flex;flex-direction:column}
.tm body.tm-t-datos #contactTextFields{order:1}.tm body.tm-t-datos #mountText{order:2}.tm body.tm-t-datos #textNotes{order:3}
/* Firma */
.tm #signatureControls .row-between h2{display:none}
.tm #signatureControls .row-between{display:block}
.tm #b-drawp{width:100%;min-height:44px;margin:6px 0 4px}
/* Vista plana al diseñar: la tarjeta no sigue al mouse, y solo gira al cambiar de cara. */
.tm body.tm-design .stage.flat .card3d{transition:transform .55s cubic-bezier(.16,1,.3,1)}
/* Abajo y junto a la tarjeta */
.tm-done{display:none}
.tm body.tm-open .foot-actions>*{display:none!important}
.tm body.tm-open .foot-actions>#tmDone{display:inline-flex!important;flex:1;justify-content:center;min-height:48px;background:#1d2124;border-color:#1d2124;color:#fff}
.tm body.tm-open .step-caption{display:none}
.tm-hist{align-items:center;gap:4px}
.tm-hist button{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:6px 10px;border:0;border-radius:10px;background:transparent;color:#4c5155;font:500 13px/1 inherit;font-family:inherit;cursor:pointer}
.tm-hist button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.tm-hist button:disabled{opacity:.35;cursor:default}
.tm-hist button[aria-pressed=true]{background:#ece8dc;color:#22282d}
@media(max-width:980px){.tm body.tm-design .toolbar{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:center;gap:6px}}
@media(max-width:480px){.tm-hist{gap:0}.tm-hist button{padding:6px 6px;font-size:12.5px}.tm-hist button svg{display:none}}
@media(prefers-reduced-motion:reduce){.tm-tool{transition:none}}
