.plan3d-cta { position: relative; display: block; margin-top: 10px; }
.plan3d-cta .plan3d-btn { display: flex; align-items: center; justify-content: center; width: 100%; text-align: center; box-sizing: border-box; }
.plan3d-cta .plan3d-tip { color: #fff !important; font-weight: 500; text-align: left; text-transform: none; letter-spacing: normal; }
.plan3d-tip { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 30; padding: 10px 12px; border-radius: 10px; background: #111827; color: #fff; font-size: 0.82rem; line-height: 1.35; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25); opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity 0.15s, transform 0.15s, visibility 0.15s; pointer-events: none; }
.plan3d-tip::after { content: ""; position: absolute; top: 100%; left: 24px; border: 6px solid transparent; border-top-color: #111827; }
.plan3d-cta:hover .plan3d-tip, .plan3d-cta:focus-within .plan3d-tip { opacity: 1; visibility: visible; transform: none; }
html.plan3d-lock { overflow: hidden; }
.plan3d-overlay { position: fixed; inset: 0; z-index: 2147483000; display: flex; flex-direction: column; background: #e3e7ed; color: #111827; font-size: 0.85rem; }
.plan3d-overlay[hidden] { display: none; }
.plan3d-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 12px; background: #fff; border-bottom: 1px solid rgba(0, 0, 0, 0.12); }
.plan3d-name { max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan3d-grp { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.plan3d-grp[hidden], .plan3d-fl[hidden] { display: none; }
.plan3d-end { margin-left: auto; }
.plan3d-bar button { min-height: 34px; padding: 6px 12px; border: 1px solid rgba(0, 0, 0, 0.18); border-radius: 8px; background: #f3f4f6; color: inherit; font-size: 0.85rem; cursor: pointer; }
.plan3d-bar button.is-on, .plan3d-bar button.is-primary { background: var(--brand, #0f6b4f); border-color: var(--brand, #0f6b4f); color: #fff; }
.plan3d-bar button.plan3d-tour { border-radius: 999px; padding: 6px 16px; background: #111827; border-color: #111827; color: #fff; font-weight: 600; }
.plan3d-bar button.plan3d-tour:hover { background: #1f2937; }
.plan3d-bar button[hidden] { display: none; }
.plan3d-bar button:disabled { opacity: 0.5; cursor: default; }
.plan3d-bar input[type="text"], .plan3d-bar select { min-height: 32px; padding: 4px 6px; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 6px; background: #fff; color: inherit; }
.plan3d-msg { margin: 0; padding: 4px 12px; min-height: 22px; background: #fff; font-size: 0.8rem; opacity: 0.85; }
.plan3d-msg.is-warn { color: #b91c1c; opacity: 1; }
.plan3d-stage { position: relative; flex: 1; min-height: 0; }
.plan3d-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.plan3d-pal { position: absolute; top: 10px; left: 10px; width: min(330px, calc(100% - 20px)); max-height: calc(100% - 20px); display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 12px; background: rgba(255, 255, 255, 0.97); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.plan3d-pal[hidden] { display: none; }
.plan3d-pal__head { display: flex; justify-content: space-between; align-items: center; }
.plan3d-pal__head button { border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; }
.plan3d-pal select { padding: 6px; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 6px; }
.plan3d-pal__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; overflow-y: auto; }
.plan3d-pal__grid button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px; border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 8px; background: #fff; font-size: 0.7rem; cursor: pointer; }
/* trascinamento dalla palette: in orizzontale il dito trascina l'arredo, in verticale scorre l'elenco */
.plan3d-pal__grid button { touch-action: pan-y; -webkit-user-drag: none; user-select: none; }
.plan3d-pal__grid button img { pointer-events: none; }
/* miniatura trascinata: senza riquadro, l'ombra segue la forma dell'arredo (PNG trasparente) */
.plan3d-dragchip { position: fixed; top: 0; left: 0; z-index: 2147483000; width: 64px; height: 64px; margin: -32px 0 0 -32px; object-fit: contain; background: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.28)); opacity: 0.95; pointer-events: none; }
.plan3d-dragchip[hidden] { display: none; }
.plan3d-overlay.is-dragging, .plan3d-overlay.is-dragging canvas { cursor: copy; }
.plan3d-pal__grid button.is-on { border-color: var(--brand, #0f6b4f); box-shadow: 0 0 0 2px rgba(15, 107, 79, 0.35); }
.plan3d-note { margin: 0; font-size: 0.72rem; opacity: 0.7; }
@media (max-width: 700px) { .plan3d-name { display: none; } .plan3d-end { margin-left: 0; } }
.plan3d-bar b { display: inline-block; min-width: 1ch; text-align: center; }
/* menu ridotto: restano nome, «Menu +», movimento e zoom, «Arreda», salva e chiudi */
.plan3d-overlay.is-min .plan3d-bar > .plan3d-fl, .plan3d-overlay.is-min #plan3d-selbox, .plan3d-overlay.is-min #plan3d-restart { display: none; }


.plan3d-credit{position:absolute;right:10px;bottom:6px;margin:0;font-size:11px;color:#475569;background:rgba(255,255,255,.7);padding:1px 6px;border-radius:4px;pointer-events:none;z-index:3}
