/* KaraDom Locandine — stile */
:root {
  --bg: #060c1c;
  --bg2: #08101f;
  --panel: #0b1226;
  --panel2: #111a33;
  --panel3: #18244a;
  --line: #1e2b4d;
  --text: #ffffff;
  --muted: #a9b4d6;
  --cyan: #1ec8ff;
  --blu: #2b6cff;
  --vio: #b44dff;
  --vio2: #8a3cff;
  --mag: #ff2bd6;
  --ok: #3ef0a1;
  --warn: #ffb020;
  --err: #ff4d6d;
  --grad: linear-gradient(135deg, #1ec8ff 0%, #2b6cff 50%, #8a3cff 100%);
  --r: 10px;
  --top-h: 56px;
  --tabs-w: 76px;
  --panel-w: 300px;
  --props-w: 300px;
  --shadow: 0 10px 40px rgba(0,0,0,.55);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: "Poppins", system-ui, sans-serif; font-size: 14px; }
body.editor { overflow: hidden; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: var(--cyan); }
[hidden] { display: none !important; }

/* Protezione: niente selezione/trascinamento nell'area di lavoro */
#stageWrap, #stage, #toolTabs, #topbar, .grid-modelli, .grid-img, .grid-forme, .grid-widget, .livelli {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
img { -webkit-user-drag: none; user-drag: none; }
#stage img, .grid-img img, .grid-modelli img { pointer-events: none; }

/* ---------- Barra superiore ---------- */
#topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--top-h); z-index: 50;
  display: flex; align-items: center; gap: 6px; padding: 0 10px;
  background: rgba(6,12,28,.97); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); margin-right: 8px; white-space: nowrap; }
.brand img.scritta { height: 34px; width: auto; display: block; }
.brand span { font-family: "Righteous", sans-serif; font-size: 17px; letter-spacing: .3px; }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 400; }
.tb-group { display: flex; align-items: center; gap: 2px; padding: 0 6px; border-right: 1px solid var(--line); }
.tb-spacer { flex: 1; }
.tb-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px;
  border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text);
  text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s;
}
.tb-btn:hover:not(:disabled) { background: var(--panel2); }
.tb-btn:disabled { opacity: .35; cursor: default; }
.tb-btn.icon { padding: 0 8px; }
.tb-btn.ghost { border-color: var(--line); }
.tb-btn.primary { background: var(--grad); font-weight: 600; box-shadow: 0 0 18px rgba(180,77,255,.35); }
.tb-btn.primary:hover { filter: brightness(1.1); background: var(--grad); }
.zoomval { min-width: 62px; justify-content: center; font-variant-numeric: tabular-nums; color: var(--muted); }
.sel-formato select {
  height: 36px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; max-width: 210px;
}
.tb-menu-wrap { position: relative; }
.tb-menu {
  position: absolute; top: 42px; left: 0; min-width: 250px; background: var(--panel2); border: 1px solid var(--line);
  border-radius: 10px; padding: 6px; box-shadow: var(--shadow); z-index: 60;
}
.tb-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 7px; background: transparent; }
.tb-menu button:hover { background: var(--panel3); }

/* Tooltip */
[data-tip] { position: relative; }
@media (hover: hover) {
  [data-tip]:hover::after {
    content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
    background: #000; color: #fff; font-size: 12px; padding: 5px 8px; border-radius: 6px; white-space: nowrap; z-index: 100;
    pointer-events: none; border: 1px solid var(--line);
  }
  .pb-icons [data-tip]:hover::after, .livelli [data-tip]:hover::after { top: auto; bottom: calc(100% + 6px); }
}

/* ---------- Layout ---------- */
#app { position: fixed; inset: var(--top-h) 0 0 0; display: flex; }
#toolTabs {
  width: var(--tabs-w); flex: none; background: var(--bg2); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 8px 6px; gap: 4px; overflow-y: auto;
}
.tt {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); font-size: 11px;
}
.tt svg { width: 22px; height: 22px; }
.tt:hover { color: var(--text); background: var(--panel); }
.tt.active { color: var(--text); background: var(--panel2); box-shadow: inset 3px 0 0 var(--vio); }
#toolPanel {
  width: var(--panel-w); flex: none; background: var(--panel); border-right: 1px solid var(--line);
  overflow-y: auto; padding: 14px; scrollbar-width: thin;
}
#props {
  width: var(--props-w); flex: none; background: var(--panel); border-left: 1px solid var(--line);
  overflow-y: auto; padding: 14px; scrollbar-width: thin;
}
.sheet-handle { display: none; }
.tpanel { display: none; }
.tpanel.active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
h3.mt { margin-top: 22px; }
.hint { color: var(--muted); font-size: 12px; margin: -4px 0 12px; }
.empty { color: var(--muted); font-size: 12.5px; text-align: center; padding: 18px 10px; border: 1px dashed var(--line); border-radius: var(--r); line-height: 1.6; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Stage */
#stageWrap {
  flex: 1; min-width: 0; position: relative; overflow: auto; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 20% 10%, rgba(180,77,255,.06), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(30,200,255,.06), transparent 40%),
    var(--bg);
  touch-action: none;
}
#stage { margin: auto; padding: 24px; flex: none; }
#stage .canvas-container { box-shadow: 0 0 0 1px var(--line), 0 20px 60px rgba(0,0,0,.6); border-radius: 2px; }
#stageInfo { position: absolute; left: 12px; bottom: 10px; font-size: 11.5px; color: var(--muted); pointer-events: none; background: rgba(0,0,0,.4); padding: 3px 8px; border-radius: 6px; }

/* ---------- Controlli ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-weight: 500; transition: .15s;
}
.btn:hover { background: var(--panel3); border-color: #3a4260; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.primary { background: var(--grad); border: 0; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: var(--err); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
input[type=text], input[type=number], input[type=url], input[type=tel], input[type=date], input[type=time], input[type=email], input[type=password], select, textarea {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; outline: none; min-height: 36px;
}
input:focus, select:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(30,200,255,.15); }
textarea { resize: vertical; min-height: 70px; line-height: 1.4; }
input[type=color] { width: 40px; height: 32px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg2); cursor: pointer; }
input[type=range] { width: 100%; accent-color: var(--vio); }
label.mini { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
label.slider { display: grid; grid-template-columns: 82px 1fr 40px; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin: 8px 0; }
label.slider output { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; font-size: 12px; }

/* Pannelli strumenti */
.add-text { display: block; width: 100%; text-align: left; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 8px; transition: .15s; }
.add-text:hover { border-color: var(--vio); background: var(--panel3); }
.add-text.t1 { font-family: "Bebas Neue"; font-size: 30px; letter-spacing: 1px; }
.add-text.t2 { font-family: "Montserrat"; font-size: 18px; font-weight: 600; }
.add-text.t3 { font-size: 13px; }
.grid-stili { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stile-card { height: 72px; border-radius: var(--r); border: 1px solid var(--line); background: #08060f; font-size: 24px; transition: .15s; overflow: hidden; }
.stile-card:hover { transform: translateY(-2px); border-color: var(--cyan); }
.neon-p { font-family: "Monoton"; color: #ffd6f7; text-shadow: 0 0 4px #ff2bd6, 0 0 10px #ff2bd6, 0 0 20px #ff2bd6; font-size: 22px; }
.neon-c { font-family: "Pacifico"; color: #dffaff; text-shadow: 0 0 4px #19e6ff, 0 0 10px #19e6ff, 0 0 22px #19e6ff; }
.grad { font-family: "Anton"; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 30px; }
.retro { font-family: "Audiowide"; color: #ffe14d; text-shadow: 3px 3px 0 #ff2bd6, 6px 6px 0 #19e6ff; font-size: 18px; }
.outline { font-family: "Bungee"; color: transparent; -webkit-text-stroke: 1.5px #fff; font-size: 28px; }
.script { font-family: "Great Vibes"; color: #ffd27a; font-size: 24px; }

.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 12px; border: 2px dashed var(--line); border-radius: 12px; text-align: center; cursor: pointer; color: var(--muted); transition: .15s; }
.dropzone svg { width: 28px; height: 28px; color: var(--cyan); }
.dropzone b { color: var(--text); }
.dropzone span { font-size: 12px; }
.dropzone:hover, .dropzone.over { border-color: var(--cyan); background: rgba(30,200,255,.05); }
.dropzone.small { padding: 14px; flex-direction: row; justify-content: center; }
.grid-img { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.grid-img button { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; padding: 0; overflow: hidden; background: var(--bg2); }
.grid-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grid-img button:hover { border-color: var(--vio); }
.grid-forme { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid-forme button { aspect-ratio: 1; display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); color: var(--muted); font-size: 11px; }
.grid-forme button svg { width: 38px; height: 38px; stroke-width: 1.4; color: var(--text); }
.grid-forme button:hover { border-color: var(--cyan); color: var(--text); }
.grid-widget { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid-widget button { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); text-align: left; min-height: 92px; transition: .15s; }
.grid-widget button:hover { border-color: var(--vio); transform: translateY(-1px); }
.grid-widget .wi { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(180,77,255,.14); color: var(--vio); }
.grid-widget button:nth-child(even) .wi { background: rgba(30,200,255,.13); color: var(--cyan); }
.grid-widget b { font-size: 13px; font-weight: 600; }
.grid-widget small { color: var(--muted); font-size: 11px; line-height: 1.3; }
.grid-sw { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.grid-sw.big { grid-template-columns: repeat(3, 1fr); margin-top: 8px; }
.grid-sw button { aspect-ratio: 1; border-radius: 9px; border: 2px solid transparent; padding: 0; background-size: cover; position: relative; overflow: hidden; }
.grid-sw button:hover { border-color: #fff; }
.grid-sw button span { position: absolute; inset: auto 0 0 0; font-size: 10px; background: rgba(0,0,0,.6); padding: 2px; }
.grid-modelli { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mod-card { position: relative; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); padding: 0; overflow: hidden; text-align: left; transition: .15s; }
.mod-card:hover { border-color: var(--vio); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(180,77,255,.15); }
.mod-card .thumb { aspect-ratio: 9/16; display: grid; place-items: center; background: #000; }
.mod-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mod-card .thumb .spinner { width: 22px; height: 22px; border-width: 2px; }
.mod-card .nm { display: block; padding: 6px 8px; font-size: 12px; }
.mod-card .del { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 6px; border: 0; background: rgba(0,0,0,.7); color: var(--err); display: grid; place-items: center; }
.mod-card .del svg { width: 15px; height: 15px; }

/* Livelli */
.livelli { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.livelli li { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 8px; background: var(--panel2); border: 1px solid transparent; border-radius: 8px; cursor: grab; }
.livelli li.sel { border-color: var(--vio); background: rgba(180,77,255,.08); }
.livelli li.drag-over { border-top: 2px solid var(--cyan); }
.livelli li.nascosto .ln { opacity: .45; text-decoration: line-through; }
.livelli .lt { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; background: var(--bg2); color: var(--muted); flex: none; }
.livelli .lt svg { width: 15px; height: 15px; }
.livelli .ln { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.livelli .ln input { min-height: 26px; padding: 2px 6px; }
.livelli .lb { width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); display: grid; place-items: center; padding: 0; flex: none; }
.livelli .lb:hover { background: var(--panel3); color: var(--text); }
.livelli .lb svg { width: 15px; height: 15px; }
.livelli .lb.on { color: var(--warn); }

/* ---------- Pannello proprietà ---------- */
.pb-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.pb-title .tag { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; padding: 2px 7px; border-radius: 20px; background: rgba(30,200,255,.12); color: var(--cyan); font-weight: 600; }
.pb-sec { border-top: 1px solid var(--line); padding: 12px 0; }
.pb-sec:first-of-type { border-top: 0; padding-top: 0; }
.pb-sec > h4 { margin: 0 0 10px; font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.pb-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.pb-row > * { min-width: 0; }
.pb-row .grow { flex: 1; }
.pb-field { margin-bottom: 10px; }
.pb-field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.pb-icons { display: flex; gap: 4px; flex-wrap: wrap; }
.ib { width: 34px; height: 32px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel2); display: grid; place-items: center; padding: 0; color: var(--text); }
.ib:hover { background: var(--panel3); }
.ib.on { background: rgba(180,77,255,.2); border-color: var(--vio); }
.ib svg { width: 17px; height: 17px; }
.ib.txt { font-weight: 700; font-size: 13px; width: auto; padding: 0 9px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; margin: 6px 0; cursor: pointer; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 20px; background: var(--panel3); position: relative; cursor: pointer; transition: .15s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .15s; }
.switch input:checked { background: var(--vio); }
.switch input:checked::after { left: 18px; }
.font-sel { font-size: 16px; }
.sub { padding: 8px 0 2px 10px; border-left: 2px solid var(--line); margin: 4px 0 8px; }
.doc-info { background: var(--panel2); border-radius: 10px; padding: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.doc-info b { color: var(--text); }
.kbd { display: inline-block; padding: 0 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; font-size: 11px; color: var(--text); background: var(--bg2); }
.list-ed .li { display: grid; grid-template-columns: 70px 1fr 28px; gap: 4px; margin-bottom: 4px; }
.list-ed .li input { min-height: 30px; padding: 4px 6px; }
.logos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 6px 0; }
.logos div { position: relative; aspect-ratio: 1; background: #fff; border-radius: 6px; display: grid; place-items: center; overflow: hidden; }
.logos img { max-width: 90%; max-height: 90%; }
.logos button { position: absolute; top: 1px; right: 1px; border: 0; background: rgba(0,0,0,.7); color: #fff; border-radius: 4px; width: 18px; height: 18px; font-size: 11px; line-height: 1; padding: 0; }
.status { font-size: 12px; color: var(--muted); margin: 4px 0; min-height: 16px; }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 200; background: rgba(4,4,10,.72); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fadeIn .15s; }
.modal-box { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.modal-box.wide { width: min(820px, 100%); }
.modal-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 8px; border: 0; background: var(--panel2); display: grid; place-items: center; }
.modal h2 { margin: 0 0 6px; font-size: 20px; }
.modal p.sub2 { color: var(--muted); margin: 0 0 16px; }
.exp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.exp-opt { border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; background: var(--panel2); text-align: center; }
.exp-opt b { display: block; font-size: 16px; }
.exp-opt small { color: var(--muted); font-size: 11px; }
.exp-opt.on { border-color: var(--vio); background: rgba(180,77,255,.1); box-shadow: 0 0 0 1px var(--vio) inset; }
.exp-opt:disabled { opacity: .4; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.progress { height: 8px; background: var(--bg2); border-radius: 8px; overflow: hidden; margin-top: 12px; }
.progress div { height: 100%; width: 0; background: var(--grad); transition: width .2s; }
.form-grid { display: grid; gap: 10px; }
.form-grid label > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }

/* Toast */
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #000; border: 1px solid var(--line); border-left: 4px solid var(--cyan); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); animation: toastIn .25s ease; max-width: 90vw; font-size: 13px; }
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--err); }
.toast.warn { border-left-color: var(--warn); }
.toast.out { opacity: 0; transform: translateY(8px); transition: .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Caricamento */
#loading { position: fixed; inset: 0; z-index: 250; background: rgba(4,4,10,.75); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--vio); border-right-color: var(--cyan); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Oscuramento anti-cattura */
#blackout { position: fixed; inset: 0; z-index: 10000; background: #000; display: grid; place-items: center; padding: 20px; }
.bo-box { text-align: center; max-width: 420px; }
.bo-box h2 { margin: 14px 0 8px; }
.bo-box p { color: var(--muted); margin: 0 0 18px; }
body.oscurato #app, body.oscurato #topbar { visibility: hidden; }
#printMsg { display: none; }
@media print {
  body * { visibility: hidden !important; }
  #printMsg, #printMsg * { visibility: visible !important; }
  #printMsg { display: block !important; position: fixed; top: 40%; left: 0; right: 0; text-align: center; color: #000; font: 20px sans-serif; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1200px) {
  :root { --panel-w: 260px; --props-w: 270px; }
  .tb-btn span { display: none; }
  .tb-btn.primary span { display: inline; }
}

/* ---------- Telefono: pannelli come bottom sheet ---------- */
@media (max-width: 860px) {
  :root { --top-h: 52px; }
  .brand span, .hide-sm { display: none; }
  .tb-group { padding: 0 2px; border: 0; }
  .tb-group.zoom #btnZoomOut, .tb-group.zoom #btnZoomIn { display: none; }
  .sel-formato select { max-width: 92px; padding: 0 4px; font-size: 12px; }
  #topbar { gap: 2px; padding: 0 6px; overflow-x: auto; }
  #app { flex-direction: column; bottom: 64px; }
  #stageWrap { flex: 1; }
  #stage { padding: 12px; }
  #toolTabs {
    position: fixed; left: 0; right: 0; bottom: 0; height: 64px; width: auto; flex-direction: row; justify-content: space-around;
    border-right: 0; border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); z-index: 40; overflow-x: auto;
  }
  .tt { flex: 1; padding: 6px 0; font-size: 10px; min-width: 50px; }
  .tt.active { box-shadow: inset 0 3px 0 var(--vio); }
  .sheet {
    position: fixed; left: 0; right: 0; bottom: 64px; width: auto !important; max-height: 58vh; z-index: 45;
    border: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.6);
    transform: translateY(110%); transition: transform .25s ease; padding-top: 4px;
  }
  .sheet.aperto { transform: none; }
  #props { z-index: 46; }
  .sheet-handle { display: flex; justify-content: center; padding: 6px 0 10px; position: sticky; top: -4px; background: var(--panel); z-index: 2; cursor: pointer; }
  .sheet-handle span { width: 44px; height: 5px; border-radius: 4px; background: var(--panel3); }
  .grid-modelli { grid-template-columns: repeat(3, 1fr); }
  .grid-widget { grid-template-columns: repeat(2, 1fr); }
  .grid-forme { grid-template-columns: repeat(4, 1fr); }
  .exp-grid { grid-template-columns: repeat(2, 1fr); }
  input, select, textarea { font-size: 16px; }
  #stageInfo { display: none; }
}

/* ======================================================
   Pagina prezzi / landing
   ====================================================== */
body.landing { overflow-x: hidden; }
.l-nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px; padding: 12px 20px; background: rgba(6,12,28,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.l-nav .brand img.scritta { height: 34px; width: auto; display: block; }
.brand span { display: inline; }
.l-nav nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.l-nav nav a.lk { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 8px; }
.l-nav nav a.lk:hover { color: var(--text); background: var(--panel2); }
.l-wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.hero { padding: 80px 0 60px; position: relative; text-align: center; }
.hero::before { content: ""; position: absolute; inset: -40px 0 auto; height: 520px; background: radial-gradient(ellipse at 30% 30%, rgba(180,77,255,.25), transparent 55%), radial-gradient(ellipse at 70% 40%, rgba(30,200,255,.18), transparent 55%); z-index: -1; filter: blur(10px); }
.hero h1 { font-family: "Bebas Neue"; font-weight: 400; font-size: clamp(44px, 8vw, 92px); line-height: .95; margin: 0 0 16px; letter-spacing: 1px; }
.hero h1 .neon { color: #f1e6ff; text-shadow: 0 0 6px var(--vio), 0 0 18px var(--vio2), 0 0 40px var(--vio2); }
.hero h1 .neon2 { color: #e6fdff; text-shadow: 0 0 6px var(--cyan), 0 0 18px var(--cyan), 0 0 40px var(--cyan); }
.hero p.lead { font-size: clamp(15px, 2vw, 19px); color: var(--muted); max-width: 680px; margin: 0 auto 28px; }
.hero .cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn.lg { height: 48px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.feat { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 30px 0 70px; }
.feat div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.feat b { display: block; margin: 10px 0 4px; }
.feat p { margin: 0; color: var(--muted); font-size: 13px; }
.feat svg { width: 30px; height: 30px; color: var(--cyan); }
.sec-title { text-align: center; margin: 0 0 8px; font-family: "Bebas Neue"; font-weight: 400; font-size: 48px; letter-spacing: 1px; }
.sec-sub { text-align: center; color: var(--muted); margin: 0 0 26px; }
.toggle-per { display: flex; justify-content: center; margin-bottom: 30px; }
.toggle-per div { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 40px; padding: 4px; }
.toggle-per button { border: 0; background: transparent; padding: 9px 20px; border-radius: 40px; color: var(--muted); font-weight: 600; }
.toggle-per button.on { background: var(--grad); color: #fff; }
.toggle-per small { color: var(--ok); font-weight: 600; margin-left: 4px; }
.piani { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
.piano { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px 20px; }
.piano.top { border: 0; background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--grad) border-box; border: 2px solid transparent; box-shadow: 0 0 40px rgba(180,77,255,.25); transform: translateY(-8px); }
.piano .ribbon { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--grad); padding: 4px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.piano h3 { font-size: 15px; color: var(--text); letter-spacing: 2px; margin: 0 0 12px; }
.piano .prezzo { font-family: "Bebas Neue"; font-size: 54px; line-height: 1; }
.piano .prezzo small { font-family: "Poppins"; font-size: 14px; color: var(--muted); }
.piano .alt { color: var(--muted); font-size: 12.5px; min-height: 36px; margin: 6px 0 14px; }
.piano .alt b { color: var(--ok); }
.piano ul { list-style: none; padding: 0; margin: 0 0 20px; flex: 1; }
.piano li { padding: 6px 0 6px 26px; position: relative; font-size: 13.5px; }
.piano li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 10px; height: 6px; border-left: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan); transform: rotate(-45deg); }
.piano li.no::before { border-color: var(--muted); }
.piano li.no { color: var(--muted); }
.nota-kd { margin: 28px auto 0; max-width: 760px; text-align: center; background: rgba(30,200,255,.07); border: 1px solid rgba(30,200,255,.35); border-radius: 14px; padding: 14px 18px; }
.nota-iva { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 12px; }
.faq { max-width: 760px; margin: 0 auto 80px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; padding: 0 16px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--vio); font-size: 18px; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 14px; color: var(--muted); }
.l-foot { border-top: 1px solid var(--line); padding: 24px 20px; text-align: center; color: var(--muted); font-size: 12.5px; }
@media (max-width: 1000px) { .piani { grid-template-columns: repeat(2, 1fr); } .piano.top { transform: none; } }
@media (max-width: 600px) {
  .piani { grid-template-columns: 1fr; }
  .l-nav { padding: 10px 16px; }
  .l-nav .brand img.scritta { height: 34px; width: auto; display: block; }
.brand span { display: none; }
  .l-wrap { padding: 0 16px; }
  .hero { padding: 50px 0 40px; }
}

/* ---------- Logo e account ---------- */
.brand span b { font-family: "Righteous", sans-serif; font-size: 16px; }
.hero-logo { display: block; margin: 0 auto 18px; width: min(372px, 70vw); height: auto; filter: drop-shadow(0 0 30px rgba(30,200,255,.35)); }
.conto-box { display: flex; align-items: center; gap: 6px; }
.conto-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); max-width: 320px; }
.conto-chip .cn { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.conto-chip .cn b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conto-chip .cn small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.conto-chip .piano-tag { font-size: 10px; font-weight: 700; letter-spacing: .5px; padding: 2px 7px; border-radius: 20px; background: var(--grad); }
.conto-chip .piano-tag.off { background: var(--panel3); color: var(--muted); }
.modal .logo-modal { display: block; height: 64px; width: auto; margin: 0 auto 10px; }
.modal .errore { color: var(--err); font-size: 13px; min-height: 18px; }
.modal .msg-ok { color: var(--ok); font-size: 13px; }
@media (max-width: 860px) {
  .conto-chip .cn, .conto-box .lbl { display: none; }
  .brand img.scritta { height: 26px; }
}

.brand img.icona-sm { display: none; }
html { overflow-x: hidden; }
@media (max-width: 860px) {
  .editor .brand img.scritta { display: none; }
  .editor .brand img.icona-sm { display: block; }
  .editor .brand { margin-right: 2px; }
  #btnModelli, .tb-group.zoom { display: none !important; }
  .tb-btn { padding: 0 7px; }
  .tb-btn.primary span, .conto-box .tb-btn span, .conto-chip .piano-tag { display: none; }
  .conto-chip { padding: 0 8px; }
  .conto-box .tb-btn.primary { display: none; }
}
