/* Studio CREALO: pannello "Personalizza" accanto alla demo */
.bar-studio { border-color: color-mix(in srgb, var(--acc) 60%, transparent) !important; background: color-mix(in srgb, var(--acc) 14%, transparent) !important; }
body.studio-on .bar-studio { background: var(--acc) !important; color: #0b1020 !important; }

.st-panel { position: fixed; top: 52px; right: 0; bottom: 0; z-index: 40; width: 400px; display: flex; flex-direction: column; background: var(--bg); border-left: 1px solid var(--line);
  box-shadow: -30px 0 60px -30px rgba(0,0,0,.7); transform: translateX(105%); visibility: hidden; transition: transform .45s var(--ease-out), visibility 0s linear .45s; font-size: 14px; color: var(--ink); }
.st-panel.on { transform: none; visibility: visible; transition: transform .45s var(--ease-out); }
body.studio-on.full .demo-box { margin-right: 400px; transition: margin-right .45s var(--ease-out); }
.full .demo-box { transition: margin-right .45s var(--ease-out); }
.st-panel svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.st-panel button { font: inherit; color: inherit; cursor: pointer; }
.st-panel button:disabled { opacity: .35; cursor: default; }

.st-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; }
.st-head b { display: block; font-size: 16px; }
.st-save { display: block; font-size: 11.5px; color: var(--ink-3); min-height: 1.3em; }
.st-save.ok { color: #3ddc97; } .st-save.err { color: #ff8a80; }
.st-hbtn { display: flex; gap: 6px; }
.st-hbtn button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.03); display: grid; place-items: center; }
.st-hbtn button:not(:disabled):hover { border-color: var(--acc); }
.st-guarda { margin: 0 16px 8px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--acc) 16%, transparent); font-size: 13px; line-height: 1.5; }
.st-guarda button { display: block; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--acc); text-decoration: underline; text-underline-offset: 3px; font-size: 12.5px; }

.st-tabs { display: flex; gap: 0; padding: 0 10px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex: none; }
.st-tabs button { flex: none; padding: 10px 7px 11px; letter-spacing: -.01em; border: 0; background: none; color: var(--ink-2); font-size: 13px; border-bottom: 2px solid transparent; white-space: nowrap; }
.st-tabs button.on { color: var(--ink); border-bottom-color: var(--acc); }

.st-body { flex: 1; overflow-y: auto; padding: 14px 16px 24px; scrollbar-width: thin; overscroll-behavior: contain; }
.st-body section { margin-bottom: 18px; }
.st-body h4 { font-size: 11px; font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin: 0 0 8px; }
.st-hint { font-size: 12.5px; line-height: 1.5; color: var(--ink-2); margin: 0 0 10px; }
.st-in { width: 100%; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink); font: inherit; font-size: 13.5px; min-width: 0; }
.st-in:focus { outline: none; border-color: var(--acc); }
select.st-in { appearance: none; -webkit-appearance: none; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
select.st-in option { background: #161829; color: var(--ink); }
.st-sel { width: auto; max-width: 100%; }
.st-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--acc) 50%, transparent); background: color-mix(in srgb, var(--acc) 12%, transparent); color: var(--ink); font-size: 13px; }
.st-btn:hover { background: color-mix(in srgb, var(--acc) 22%, transparent); }
.st-btn.ghost { border-color: var(--line); background: none; }
.st-btn.small { padding: 5px 10px; font-size: 12px; } .st-btn.small svg { width: 13px; height: 13px; }
.st-btn.wide { width: 100%; justify-content: center; margin-top: 4px; }
.st-ib { width: 32px; height: 32px; flex: none; border-radius: 9px; border: 1px solid transparent; background: none; color: var(--ink-2); display: grid; place-items: center; }
.st-ib:not(:disabled):hover { border-color: var(--line); color: var(--ink); }
.st-row { display: flex; align-items: center; gap: 4px; } .st-row.gap { gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.st-grow { flex: 1; min-width: 0; }

.st-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.st-list li { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.st-list li.off { opacity: .5; }
.st-list li .st-in { flex: 1; }
.st-sez li, .st-campi li { display: block; padding: 8px 8px 8px 10px; }
.st-tipo { display: block; font-size: 10.5px; color: var(--ink-3); margin: 0 0 5px 2px; letter-spacing: .02em; }
.st-opz { margin-top: 6px; font-size: 12.5px; }

.st-logo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-logo-i { width: 52px; height: 52px; border-radius: 14px; background: #fff; color: #0b1020; display: grid; place-items: center; font-weight: 700; overflow: hidden; }
.st-logo-i img { max-width: 86%; max-height: 86%; object-fit: contain; }
.st-styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.st-sty { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); font-size: 12px; }
.st-sty i { width: 100%; height: 28px; border-radius: 7px; }
.st-sty.on { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }
.st-sty-aurora i { background: linear-gradient(120deg, #0f1730, #1fb5c9 60%, #2f7cf6); }
.st-sty-industriale i { background: linear-gradient(#15171b, #15171b) padding-box, repeating-linear-gradient(-45deg, #f5b301 0 8px, #15171b 8px 16px); border-top: 5px solid transparent; }
.st-sty-natura i { background: linear-gradient(120deg, #f2eee3 45%, #9cbf8b 75%, #c8a77a); }
.st-sty-lusso i { background: linear-gradient(120deg, #0c0b09 55%, #c9a96e); }
.st-sty-corporate i { background: linear-gradient(90deg, #0f1f3d 28%, #eef2f7 28%); }
.st-sty-editoriale i { background: linear-gradient(120deg, #f6f1e7 60%, #b4532a); }
.st-sty-clinico i { background: linear-gradient(120deg, #f3f7fb 55%, #1f8fe5); }
.st-sty-neon i { background: linear-gradient(120deg, #05060a 55%, #22f0a6); }
.st-sty-pastello i { background: linear-gradient(120deg, #fbf5f0, #b8e6d4 60%, #f7c6b8); }
.st-sw { display: flex; flex-wrap: wrap; gap: 8px; }
.st-sw button { width: 32px; height: 32px; border-radius: 10px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.st-sw button.on { border-color: #fff; }
.st-sw-pick { position: relative; width: 32px; height: 32px; border-radius: 10px; border: 1px dashed rgba(255,255,255,.35); display: grid; place-items: center; color: var(--ink-2); overflow: hidden; cursor: pointer; }
.st-sw-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.st-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.st-seg button { padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255,255,255,.02); font-size: 12.5px; color: var(--ink-2); }
.st-seg button.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 18%, transparent); color: var(--ink); }

.st-back { display: inline-flex; align-items: center; gap: 6px; padding: 0; margin-bottom: 12px; border: 0; background: none; color: var(--ink-2); font-size: 13px; }
.st-back:hover { color: var(--ink); }
.st-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.04); margin-bottom: 14px; }
.st-search input { flex: 1; padding: 10px 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 13.5px; outline: none; }
.st-cat { margin-bottom: 16px; }
.st-cat > b { display: block; font-size: 13.5px; } .st-cat > small { display: block; font-size: 12px; color: var(--ink-3); margin: 2px 0 8px; }
.st-cat-l { display: grid; gap: 6px; }
.st-cat-l button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.02); text-align: left; font-size: 13px; }
.st-cat-l button:hover { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 10%, transparent); }
.st-cat-l svg { color: var(--acc); }
.st-cat-l em { display: block; font-style: normal; font-size: 11px; color: var(--ink-3); }

.st-sugg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.st-sugg small { color: var(--ink-3); font-size: 12px; margin-right: 2px; width: 100%; }
.st-sugg button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; border: 1px dashed color-mix(in srgb, var(--acc) 55%, transparent); background: none; font-size: 12.5px; text-align: left; }
.st-sugg button:hover { background: color-mix(in srgb, var(--acc) 10%, transparent); }
.st-sugg button svg { width: 13px; height: 13px; color: var(--acc); }
.st-sugg.col button { border-radius: 12px; width: 100%; }

.st-rule { padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.025); margin-bottom: 10px; }
.st-rule.off { opacity: .6; }
.st-rule p { margin: 8px 0 0; font-size: 13px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.st-rule .st-q { color: var(--acc); font-size: 12.5px; margin-top: 4px; }
.st-rule-h { display: flex; align-items: center; gap: 6px; }
.st-tog { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.st-tog input { position: absolute; opacity: 0; pointer-events: none; }
.st-tog i { width: 34px; height: 20px; border-radius: 99px; background: rgba(255,255,255,.12); position: relative; transition: background .2s; }
.st-tog i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.st-tog input:checked + i { background: var(--acc); } .st-tog input:checked + i::after { transform: translateX(14px); }

.st-roles { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.st-roles button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255,255,255,.02); font-size: 13px; }
.st-roles button.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 18%, transparent); }
.st-roles button.add { border-style: dashed; color: var(--ink-2); } .st-roles button.add svg { width: 13px; height: 13px; }
.st-chk { display: flex; align-items: center; gap: 10px; width: 100%; padding: 2px 0; cursor: pointer; font-size: 13.5px; }
.st-chk input { position: absolute; opacity: 0; pointer-events: none; }
.st-chk i { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--ink-3); display: grid; place-items: center; color: transparent; flex: none; }
.st-chk i svg { width: 13px; height: 13px; stroke-width: 2.6; }
.st-chk input:checked + i { background: var(--acc); border-color: var(--acc); color: #0b1020; }

.st-foot { display: flex; gap: 6px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: none; }
.st-foot button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 6px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.03); font-size: 12px; white-space: nowrap; }
.st-foot button:hover { border-color: var(--acc); }
.st-foot button svg { width: 14px; height: 14px; }

/* sul telefono: il pannello sale dal basso, la demo resta visibile sopra */
@media (max-width: 760px) {
  .st-panel { top: auto; left: 0; width: 100%; height: 62dvh; border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; transform: translateY(105%); box-shadow: 0 -30px 60px -30px rgba(0,0,0,.8); }
  body.studio-on.full .demo-box { margin-right: 0; height: calc(38dvh - 52px); }
  .st-styles { grid-template-columns: repeat(2, 1fr); }
  .st-foot button { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .st-panel, .full .demo-box { transition: none !important; } }

/* scheda «Dal tuo sito»: contenuti letti dall'agente CREALO */
.st-ta { resize: vertical; min-height: 64px; line-height: 1.45; }
.st-prod li { gap: 6px; padding-left: 6px; }
.st-prod img { width: 38px; height: 30px; object-fit: cover; border-radius: 6px; background: #fff; flex: none; }
.st-prod .st-prezzo { flex: 0 0 76px; text-align: right; }
.st-check { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink); cursor: pointer; }
.st-check input { width: 16px; height: 16px; accent-color: var(--acc); }

/* aree del menu */
.st-gname { margin-bottom: 6px; }
.st-grp { flex: 0 0 112px; width: 112px; padding: 9px 8px; font-size: 12px; }

/* icona dell'app sul telefono */
.st-icone { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.st-icone button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line); background: none; color: var(--ink-2); font: inherit; font-size: 11.5px; cursor: pointer; }
.st-icone button.on { border-color: var(--acc); color: var(--ink); background: color-mix(in srgb, var(--acc) 12%, transparent); }
.st-icone img { width: 48px; height: 48px; border-radius: 12px; background: #fff; }
