/* AIware.80 Studio: pannello dell'assistente e workspace /studio/ */
:root {
  --sx-bg: #0E1024;
  --sx-bg-2: #15183A;
  --sx-surface: rgba(255,255,255,.055);
  --sx-surface-2: rgba(255,255,255,.09);
  --sx-line: rgba(255,255,255,.11);
  --sx-text: #E6E8F5;
  --sx-muted: #9EA2C4;
  --sx-grad: linear-gradient(120deg, #E9498D 0%, #EE7C79 55%, #F6C06A 100%);
}

/* --------------------------------------------------------- elementi comuni */
.sx-log { overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 14px; padding: 18px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.sx-msg { display: flex; gap: 10px; align-items: flex-end; max-width: 100%; animation: sxIn .45s cubic-bezier(.22,1,.36,1) both; }
.sx-msg .sx-text { padding: 11px 15px; border-radius: 18px; font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.sx-assistant .sx-text { background: var(--sx-surface-2); color: var(--sx-text); border-bottom-left-radius: 6px; border: 1px solid var(--sx-line); }
.sx-assistant .sx-text strong { color: #fff; }
.sx-user { justify-content: flex-end; }
.sx-user .sx-text { background: var(--sx-grad); color: #fff; border-bottom-right-radius: 6px; max-width: 86%; box-shadow: 0 12px 30px -16px rgba(233,73,141,.8); }
.sx-avatar { width: 30px; height: 30px; flex: none; border-radius: 10px; background: var(--sx-grad); color: #14162B; display: grid; place-items: center; box-shadow: 0 8px 20px -10px rgba(233,73,141,.9); }
.sx-avatar .ic { width: 18px; height: 18px; }
.sx-assistant .sx-text { max-width: calc(100% - 40px); }
.sx-dots { display: inline-flex; gap: 5px; padding: 4px 2px; }
.sx-dots i { width: 7px; height: 7px; border-radius: 50%; background: #F6C06A; animation: sxDot 1.1s infinite ease-in-out; }
.sx-dots i:nth-child(2) { animation-delay: .15s; background: #EE7C79; }
.sx-dots i:nth-child(3) { animation-delay: .3s; background: #E9498D; }
@keyframes sxDot { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-5px); opacity: 1; } }
@keyframes sxIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sx-note { align-self: center; max-width: 92%; font-size: 13px; color: var(--sx-muted); text-align: center; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.04); }
.sx-note.is-error { color: #FFC4D8; background: rgba(233,73,141,.12); border: 1px solid rgba(233,73,141,.35); }
.sx-note.is-info { color: #FCE3B6; background: rgba(246,192,106,.1); }

.sx-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 12px; }
.sx-chips:empty { display: none; }
.sx-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); color: var(--sx-text); font: inherit; font-size: 13.5px; cursor: pointer; transition: background .25s, border-color .25s, transform .3s; animation: sxIn .5s cubic-bezier(.22,1,.36,1) both; }
.sx-chip:hover { background: rgba(255,255,255,.1); border-color: rgba(246,192,106,.6); transform: translateY(-1px); }
.sx-chip.is-send { background: var(--sx-grad); color: #14162B; border-color: transparent; font-weight: 700; }
.sx-chip .ic { width: 15px; height: 15px; }

.sx-composer { display: flex; align-items: flex-end; gap: 8px; margin: 0 14px 12px; padding: 8px 8px 8px 16px; border-radius: 20px; background: rgba(255,255,255,.07); border: 1px solid var(--sx-line); transition: border-color .25s, box-shadow .25s; }
.sx-composer:focus-within { border-color: rgba(246,192,106,.6); box-shadow: 0 0 0 4px rgba(233,73,141,.15); }
.sx-composer textarea { flex: 1; resize: none; border: 0; background: transparent; color: #fff; font: inherit; font-size: 15px; line-height: 1.45; padding: 8px 0; max-height: 180px; outline: none; }
.sx-composer textarea::placeholder { color: var(--sx-muted); }
.sx-icon, .sx-send { flex: none; width: 40px; height: 40px; border-radius: 14px; border: 0; display: grid; place-items: center; cursor: pointer; transition: transform .3s, background .3s; }
.sx-icon { background: transparent; color: var(--sx-muted); }
.sx-icon:hover { color: #fff; background: rgba(255,255,255,.08); }
.sx-icon.is-live { color: #fff; background: #E9498D; animation: sxLive 1.4s infinite; }
@keyframes sxLive { 0% { box-shadow: 0 0 0 0 rgba(233,73,141,.6); } 100% { box-shadow: 0 0 0 14px rgba(233,73,141,0); } }
.sx-send { background: var(--sx-grad); color: #14162B; }
.sx-send:hover { transform: scale(1.06); }
.sx-icon .ic, .sx-send .ic { width: 20px; height: 20px; }

.sx-btn-primary, .sx-btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 46px; padding: 0 22px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; transition: transform .3s, box-shadow .3s, background .3s, opacity .3s; }
.sx-btn-primary { border: 0; background: var(--sx-grad); color: #14162B; box-shadow: 0 16px 34px -16px rgba(233,73,141,.9); }
.sx-btn-primary:hover { transform: translateY(-2px); text-decoration: none; }
.sx-btn-primary[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.sx-btn-primary .ic { width: 18px; height: 18px; }
.sx-btn-primary.is-loading { opacity: .8; cursor: progress; }
.sx-btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.sx-btn-ghost { border: 1px solid var(--sx-line); background: transparent; color: var(--sx-text); }
.sx-btn-ghost:hover { background: rgba(255,255,255,.07); }

/* --------------------------------------------------------------- pannello */
.sx-panel { position: fixed; right: 18px; bottom: 18px; z-index: 160; width: min(420px, calc(100vw - 36px)); height: min(680px, calc(100dvh - 36px)); display: flex; flex-direction: column; border-radius: 26px; background: radial-gradient(120% 70% at 100% 0%, rgba(233,73,141,.22), transparent 55%), radial-gradient(100% 60% at 0% 100%, rgba(246,192,106,.14), transparent 60%), var(--sx-bg); color: var(--sx-text); box-shadow: 0 40px 90px -30px rgba(10,11,25,.85), 0 0 0 1px rgba(255,255,255,.08); overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(18px) scale(.97); transform-origin: bottom right; transition: opacity .35s cubic-bezier(.22,1,.36,1), transform .5s cubic-bezier(.22,1,.36,1), visibility 0s .35s; font-family: var(--font-body, "Montserrat", sans-serif); view-transition-name: studio-surface; }
.sx-panel.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.sx-panel.is-full { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; }
.sp-head { display: flex; align-items: center; gap: 12px; padding: 16px 14px 12px 18px; border-bottom: 1px solid var(--sx-line); }
.sp-mark { width: 40px; height: 40px; border-radius: 13px; background: var(--sx-grad); color: #14162B; display: grid; place-items: center; flex: none; box-shadow: 0 10px 26px -12px rgba(233,73,141,.9); }
.sp-mark .ic { width: 24px; height: 24px; }
.sp-head-text { flex: 1; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.sp-head-text strong { font-family: var(--font-head, "Outfit", sans-serif); color: #fff; font-size: 16px; }
.sp-head-text span { font-size: 12.5px; color: var(--sx-muted); }
.sp-head-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--sx-line); background: transparent; color: var(--sx-text); display: grid; place-items: center; cursor: pointer; flex: none; }
.sp-head-btn:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.sp-head-btn .ic { width: 17px; height: 17px; }
.sp-disclosure { margin: 0; padding: 8px 18px; font-size: 11.5px; line-height: 1.45; color: var(--sx-muted); background: rgba(255,255,255,.03); border-bottom: 1px solid var(--sx-line); }
.sp-disclosure a, .sw-legal a { color: #FCD9A4; }
.sx-panel .sx-log { flex: 1; }
.sp-progress { display: block; margin: 0 14px 10px; padding: 11px 14px; border-radius: 16px; border: 1px solid var(--sx-line); background: rgba(255,255,255,.05); color: var(--sx-text); text-align: left; cursor: pointer; font: inherit; transition: border-color .3s, background .3s; }
.sp-progress:hover { border-color: rgba(246,192,106,.55); background: rgba(255,255,255,.08); }
.sp-progress-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.sp-progress-top strong { color: #fff; font-family: var(--font-head, "Outfit", sans-serif); }
.sp-progress-top span { color: #FCD9A4; white-space: nowrap; }
.sp-bar { display: block; height: 5px; border-radius: 5px; background: rgba(255,255,255,.1); margin: 8px 0; overflow: hidden; }
.sp-bar i { display: block; height: 100%; border-radius: inherit; background: var(--sx-grad); transition: width .9s cubic-bezier(.22,1,.36,1); }
.sp-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.sp-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.07); font-size: 11.5px; color: var(--sx-text); }
.sp-pill .ic { width: 12px; height: 12px; }
.sp-pill.is-ai { background: rgba(233,73,141,.2); color: #FFD0E2; }
.sp-studio-card { position: relative; overflow: hidden; padding: 16px; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(246,192,106,.35); display: grid; gap: 8px; justify-items: start; animation: sxIn .6s cubic-bezier(.22,1,.36,1) both; }
.sp-studio-card strong { color: #fff; font-family: var(--font-head, "Outfit", sans-serif); font-size: 16px; }
.sp-studio-card p { margin: 0; font-size: 13.5px; color: var(--sx-muted); }
.sp-studio-glow { position: absolute; width: 160px; height: 160px; right: -60px; top: -80px; border-radius: 50%; background: radial-gradient(circle, rgba(233,73,141,.45), transparent 70%); pointer-events: none; }

/* --------------------------------------------------------- modulo di invio */
.sx-modal { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; font-family: var(--font-body, "Montserrat", sans-serif); }
.sx-modal-backdrop { position: absolute; inset: 0; background: rgba(6,7,15,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: sxFade .3s ease; }
@keyframes sxFade { from { opacity: 0; } }
.sx-modal-box { position: relative; width: min(620px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 30px; border-radius: 26px; background: radial-gradient(120% 60% at 100% 0%, rgba(233,73,141,.2), transparent 60%), var(--sx-bg-2); color: var(--sx-text); box-shadow: 0 40px 100px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.08); animation: sxPop .5s cubic-bezier(.22,1,.36,1) both; }
@keyframes sxPop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.sx-modal-x { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--sx-line); background: transparent; color: var(--sx-text); display: grid; place-items: center; cursor: pointer; }
.sx-modal-x .ic { width: 16px; height: 16px; }
.sx-modal-kicker { margin: 0 0 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #FCD9A4; font-weight: 700; }
.sx-modal-box h2 { margin: 0 0 10px; color: #fff; font-family: var(--font-head, "Outfit", sans-serif); font-size: clamp(22px, 3vw, 28px); line-height: 1.2; padding-right: 36px; }
.sx-modal-lead { margin: 0 0 16px; color: var(--sx-muted); font-size: 14.5px; }
.sx-modal-mods { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sx-modal-mods li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.07); font-size: 12.5px; }
.sx-modal-mods .ic { width: 14px; height: 14px; }
.sx-form { display: grid; gap: 14px; }
.sx-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sx-form-row > * { min-width: 0; }
.sx-field { display: grid; gap: 6px; }
.sx-field label { font-size: 13px; font-weight: 600; color: #fff; }
.sx-opt { font-weight: 400; color: var(--sx-muted); }
.sx-field input, .sx-field textarea { width: 100%; font: inherit; font-size: 15px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--sx-line); background: rgba(255,255,255,.06); color: #fff; outline: none; transition: border-color .25s, box-shadow .25s; }
.sx-field input:focus, .sx-field textarea:focus { border-color: rgba(246,192,106,.65); box-shadow: 0 0 0 4px rgba(233,73,141,.15); }
.sx-field textarea { resize: vertical; min-height: 80px; }
.sx-check label { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--sx-muted); cursor: pointer; }
.sx-check input { width: 19px; height: 19px; margin-top: 1px; accent-color: #E9498D; flex: none; }
.sx-check a { color: #FCD9A4; }
.sx-field-error, .sx-form-error { margin: 0; font-size: 12.5px; color: #FFB3CE; }
.sx-form-error { padding: 10px 12px; border-radius: 12px; background: rgba(233,73,141,.14); }
.sx-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sx-form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* --------------------------------------------------------- invio riuscito */
.sx-success { display: grid; gap: 12px; justify-items: start; padding: 8px 4px; animation: sxIn .6s cubic-bezier(.22,1,.36,1) both; }
.sx-success h2 { margin: 0; color: #fff; font-family: var(--font-head, "Outfit", sans-serif); font-size: clamp(24px, 3.4vw, 36px); line-height: 1.15; }
.sx-success.is-compact h2 { font-size: 22px; }
.sx-success-mark { width: 66px; height: 66px; border-radius: 22px; background: var(--sx-grad); color: #14162B; display: grid; place-items: center; box-shadow: 0 20px 50px -18px rgba(233,73,141,.9); animation: sxPop .7s cubic-bezier(.34,1.56,.64,1) both; }
.sx-success-mark .ic { width: 34px; height: 34px; }
.sx-success-lead { margin: 0; color: var(--sx-text); font-size: 15.5px; line-height: 1.6; max-width: 70ch; }
.sx-success-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.sx-success-list li { display: flex; gap: 9px; font-size: 14.5px; color: var(--sx-text); }
.sx-success-list .ic { width: 18px; height: 18px; flex: none; color: #F6C06A; margin-top: 2px; }
.sx-success-next { padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid var(--sx-line); max-width: 70ch; }
.sx-success-next strong { color: #fff; }
.sx-success-next p { margin: 4px 0 0; font-size: 14px; color: var(--sx-muted); }
.sx-success-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* ================================================================ STUDIO */
.studio-app { position: relative; min-height: calc(100dvh - var(--header-h, 78px)); background: var(--sx-bg); color: var(--sx-text); overflow: hidden; overflow: clip; isolation: isolate; font-family: var(--font-body, "Montserrat", sans-serif); }
.st-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.st-orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: stDrift 22s ease-in-out infinite alternate; }
.st-orb-1 { width: 620px; height: 620px; right: -160px; top: -240px; background: radial-gradient(circle, rgba(233,73,141,.75), transparent 70%); }
.st-orb-2 { width: 560px; height: 560px; left: -200px; bottom: -260px; background: radial-gradient(circle, rgba(246,192,106,.55), transparent 70%); animation-delay: -8s; }
.st-orb-3 { width: 380px; height: 380px; left: 42%; top: 48%; background: radial-gradient(circle, rgba(124,92,255,.35), transparent 70%); animation-delay: -14s; }
@keyframes stDrift { to { transform: translate(40px, 30px) scale(1.1); } }
.st-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 64px 64px; -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%); }

/* introduzione */
.st-intro { display: grid; place-items: center; min-height: calc(100dvh - var(--header-h, 78px)); padding: clamp(32px, 6vw, 80px) 20px; }
.st-intro-inner { width: min(860px, 100%); text-align: center; display: grid; justify-items: center; gap: 18px; }
.st-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 8px 16px 8px 14px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--sx-line); font-family: var(--font-head, "Outfit", sans-serif); font-weight: 600; color: #fff; }
.st-eyebrow img { height: 20px; width: auto; }
.st-badge { padding: 2px 8px; border-radius: 999px; background: var(--sx-grad); color: #14162B; font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.st-title { margin: 6px 0 0; color: #fff; font-family: var(--font-head, "Outfit", sans-serif); font-size: clamp(34px, 6vw, 68px); line-height: 1.04; letter-spacing: -.03em; }
.st-lead { margin: 0; max-width: 64ch; font-size: clamp(16px, 1.6vw, 18.5px); line-height: 1.6; color: var(--sx-muted); }
.st-start { width: 100%; margin-top: 10px; padding: 14px; border-radius: 26px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 30px 80px -40px rgba(233,73,141,.75); text-align: left; position: relative; }
.st-start::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; background: var(--sx-grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .55; pointer-events: none; }
.st-start textarea { width: 100%; resize: none; border: 0; background: transparent; color: #fff; font: inherit; font-size: clamp(16px, 1.8vw, 19px); line-height: 1.5; padding: 8px 10px; outline: none; min-height: 84px; }
.st-start textarea::placeholder { color: rgba(220,222,240,.55); }
.st-start-bar { display: flex; align-items: center; gap: 12px; padding: 4px 2px 0; }
.st-start-hint { flex: 1; font-size: 13px; color: var(--sx-muted); }
.st-icon-btn { width: 48px; height: 48px; border-radius: 16px; border: 1px solid var(--sx-line); background: rgba(255,255,255,.04); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.st-icon-btn .ic { width: 22px; height: 22px; }
.st-icon-btn.is-live { background: #E9498D; border-color: #E9498D; animation: sxLive 1.4s infinite; }
.st-go { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px; border: 0; border-radius: 18px; background: var(--sx-grad); color: #14162B; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; box-shadow: 0 18px 40px -16px rgba(233,73,141,.95); transition: transform .3s; }
.st-go:hover { transform: translateY(-2px); }
.st-go .ic { width: 18px; height: 18px; }
.st-examples { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 820px; }
.st-example { padding: 9px 15px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: var(--sx-text); font: inherit; font-size: 14px; cursor: pointer; transition: background .25s, border-color .25s, transform .3s; }
.st-example:hover { background: rgba(255,255,255,.1); border-color: rgba(246,192,106,.6); transform: translateY(-1px); }
.st-trust { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; font-size: 13.5px; color: var(--sx-text); }
.st-trust li { display: inline-flex; align-items: center; gap: 7px; }
.st-trust .ic { width: 16px; height: 16px; color: #F6C06A; }
.st-legal { margin: 6px 0 0; max-width: 72ch; font-size: 12px; line-height: 1.55; color: rgba(158,162,196,.85); }
.st-legal a { color: #FCD9A4; }
.st-noscript { padding: 40px 20px; text-align: center; }

/* workspace */
.st-workspace { display: grid; grid-template-rows: auto auto 1fr; grid-template-columns: minmax(0, 1fr); height: calc(100dvh - var(--header-h, 78px)); min-height: 560px; }
.studio-app.is-working .st-intro { display: none; }
.sw-top { display: flex; align-items: center; gap: 18px; padding: 14px clamp(16px, 2.4vw, 28px); border-bottom: 1px solid var(--sx-line); background: rgba(10,11,25,.45); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.sw-brand { display: flex; align-items: center; gap: 8px; flex: none; }
.sw-brand img { height: 18px; width: auto; }
.sw-brand-studio { font-family: var(--font-head, "Outfit", sans-serif); font-weight: 600; color: var(--sx-muted); font-size: 14px; padding-left: 8px; border-left: 1px solid var(--sx-line); }
.sw-head { flex: 1; min-width: 0; }
.sw-title { margin: 0; color: #fff; font-family: var(--font-head, "Outfit", sans-serif); font-size: clamp(17px, 1.7vw, 22px); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-tagline { margin: 2px 0 0; font-size: 13px; color: var(--sx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-status { display: flex; align-items: center; gap: 10px; flex: none; }
.sw-ring { position: relative; width: 56px; height: 56px; }
.sw-ring svg { display: block; }
.sw-ring-arc { transition: stroke-dashoffset 1s cubic-bezier(.22,1,.36,1); }
.sw-ring-num { font-family: var(--font-head, "Outfit", sans-serif); font-size: 13px; font-weight: 700; fill: #fff; }
.sw-ring.is-burst::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #F6C06A; animation: swBurst 1.1s ease-out; }
@keyframes swBurst { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.sw-status-text { display: flex; flex-direction: column; line-height: 1.2; }
.sw-status-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--sx-muted); }
.sw-level { font-family: var(--font-head, "Outfit", sans-serif); font-weight: 700; color: #FCD9A4; font-size: 15px; }
.sw-ingr-btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(246,192,106,.45); background: rgba(246,192,106,.08); color: #FCE3B6; font: inherit; font-weight: 700; cursor: pointer; flex: none; transition: background .3s, transform .3s; }
.sw-ingr-btn:hover { background: rgba(246,192,106,.16); transform: translateY(-1px); }
.sw-ingr-btn .ic { width: 20px; height: 20px; }
.sw-send.is-ready { animation: swReady 2.4s infinite; }
@keyframes swReady { 0%, 100% { box-shadow: 0 16px 34px -16px rgba(233,73,141,.9), 0 0 0 0 rgba(246,192,106,.5); } 50% { box-shadow: 0 16px 34px -16px rgba(233,73,141,.9), 0 0 0 10px rgba(246,192,106,0); } }
.sw-mtabs { display: none; }
.sw-body { display: grid; grid-template-columns: minmax(340px, 420px) 1fr; min-height: 0; }
.sw-body > * { min-width: 0; min-height: 0; }
.sw-chat { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--sx-line); background: rgba(10,11,25,.35); }
.sw-col-head { display: flex; align-items: center; gap: 8px; padding: 14px 18px 0; font-size: 13px; color: var(--sx-muted); }
.sw-col-head .ic { width: 18px; height: 18px; color: #F6C06A; }
.sw-col-head strong { color: #fff; font-family: var(--font-head, "Outfit", sans-serif); font-size: 15px; }
.sw-ai-tag { margin-left: auto; padding: 3px 9px; border-radius: 999px; background: rgba(233,73,141,.18); color: #FFD0E2; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.sw-log { flex: 1; min-height: 0; }
.sw-legal { margin: 0; padding: 0 18px 12px; font-size: 11px; color: rgba(158,162,196,.8); }
.st-workspace.is-busy .sw-canvas::after { opacity: 1; }

.sw-canvas { position: relative; display: flex; flex-direction: column; min-height: 0; }
.sw-canvas::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--sx-grad); opacity: 0; transition: opacity .3s; animation: swScan 1.6s linear infinite; background-size: 200% 100%; }
@keyframes swScan { from { background-position: 0 0; } to { background-position: 200% 0; } }
.sw-tabs { display: flex; gap: 6px; padding: 12px clamp(14px, 2vw, 24px) 0; flex-wrap: wrap; }
.sw-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--sx-muted); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: background .25s, color .25s; }
.sw-tab .ic { width: 17px; height: 17px; }
.sw-tab:hover { color: #fff; background: rgba(255,255,255,.05); }
.sw-tab[aria-selected="true"] { color: #fff; background: rgba(255,255,255,.09); border-color: var(--sx-line); }
.sw-stage { flex: 1; min-height: 0; overflow: auto; padding: clamp(12px, 2vw, 24px); }

/* mappa */
.sw-map { position: relative; height: 100%; min-height: 340px; display: flex; flex-direction: column; }
.sw-map-svg { flex: 1; width: 100%; height: 100%; min-height: 330px; overflow: visible; }
.sw-orbit { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 1; stroke-dasharray: 3 7; }
.sw-orbit-must { stroke: rgba(233,73,141,.28); stroke-dasharray: none; }
.sw-link { stroke: rgba(255,255,255,.14); stroke-width: 1.2; }
.sw-link.is-ai { stroke: rgba(246,192,106,.45); stroke-dasharray: 4 5; animation: swFlow 1.8s linear infinite; }
@keyframes swFlow { to { stroke-dashoffset: -18; } }
.sw-link.is-new { animation: swDraw .9s cubic-bezier(.22,1,.36,1) both; stroke-dasharray: 400; }
@keyframes swDraw { from { stroke-dashoffset: 400; } to { stroke-dashoffset: 0; } }
.sw-node { cursor: pointer; outline: none; transition: transform .4s; }
.sw-node-dot { fill: #1E2245; stroke: rgba(255,255,255,.28); stroke-width: 1.5; transition: fill .3s, stroke .3s; }
.sw-node.p-must .sw-node-dot { stroke: #EE7C79; stroke-width: 2; }
.sw-node.p-could .sw-node-dot { stroke-dasharray: 3 3; }
.sw-node.is-ai .sw-node-dot { fill: url(#swNodeAi); stroke: none; }
.sw-node-halo { fill: rgba(233,73,141,.45); animation: swHalo 3s ease-in-out infinite; }
@keyframes swHalo { 50% { opacity: .35; } }
.sw-node-ic { color: #fff; }
.sw-node.is-ai .sw-node-ic { color: #14162B; }
.sw-node-label { fill: #E6E8F5; font-size: calc(13px * var(--fs, 1)); font-weight: 600; font-family: var(--font-body, "Montserrat", sans-serif); paint-order: stroke; stroke: rgba(14,16,36,.85); stroke-width: 4px; stroke-linejoin: round; }
.sw-node:hover .sw-node-dot, .sw-node:focus-visible .sw-node-dot { stroke: #F6C06A; stroke-width: 2.5; }
.sw-node-user { fill: #F6C06A; stroke: #0E1024; stroke-width: 2; }
.sw-node.is-new { animation: swPopIn .8s cubic-bezier(.34,1.56,.64,1) both; transform-box: fill-box; transform-origin: center; }
.sw-node.is-new > * { animation: swPopIn .8s cubic-bezier(.34,1.56,.64,1) both; transform-box: fill-box; transform-origin: center; }
@keyframes swPopIn { from { opacity: 0; transform: scale(.2); } }
.sw-core-dot { stroke: rgba(255,255,255,.18); stroke-width: 1.5; }
.sw-core-pulse { fill: none; stroke: rgba(233,73,141,.5); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: swCore 3.2s ease-out infinite; }
@keyframes swCore { from { transform: scale(.85); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.sw-core-title { fill: #fff; font-family: var(--font-head, "Outfit", sans-serif); font-weight: 700; font-size: calc(16px * min(var(--fs, 1), 1.15)); }
.sw-map-edge { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sw-map-edge.is-top { order: -1; margin-bottom: 4px; }
.sw-map-edge.is-bottom { justify-content: center; margin-top: 4px; }
.sw-edge-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--sx-muted); margin: 0 4px 0 8px; }
.sw-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid var(--sx-line); font-size: 12.5px; color: var(--sx-text); }
.sw-pill .ic { width: 14px; height: 14px; color: #F6C06A; }
.sw-pill.is-data .ic { color: #9FD4FF; }
.sw-map-hint { position: absolute; left: 50%; bottom: 18%; transform: translateX(-50%); width: min(460px, 90%); text-align: center; font-size: 14px; color: var(--sx-muted); margin: 0; }
.sw-linkbtn { border: 0; background: none; padding: 0; font: inherit; color: #FCD9A4; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sw-linkbtn.is-danger { color: #FFB3CE; }
.sw-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; font-size: 12px; color: var(--sx-muted); margin-top: 8px; }
.sw-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw-legend i { width: 12px; height: 12px; border-radius: 50%; background: #1E2245; border: 1.5px solid rgba(255,255,255,.3); }
.sw-legend i.lg-must { border: 2px solid #EE7C79; }
.sw-legend i.lg-could { border-style: dashed; }
.sw-legend i.lg-ai { background: var(--sx-grad); border: 0; }
.sw-pop { position: absolute; z-index: 5; width: 330px; translate: -50% 0; padding: 16px; border-radius: 18px; background: #1A1D3D; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); display: grid; gap: 8px; animation: sxPop .35s cubic-bezier(.22,1,.36,1) both; }
.sw-pop strong { color: #fff; font-family: var(--font-head, "Outfit", sans-serif); font-size: 16px; padding-right: 28px; }
.sw-pop p { margin: 0; font-size: 13px; color: var(--sx-muted); line-height: 1.5; }
.sw-pop-x { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 10px; border: 1px solid var(--sx-line); background: transparent; color: var(--sx-text); display: grid; place-items: center; cursor: pointer; }
.sw-pop-x .ic { width: 14px; height: 14px; }
.sw-pop-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--sx-muted); }
.sw-pop-actions { display: grid; gap: 6px; justify-items: start; font-size: 13px; }
.sw-pop-foot { display: flex; align-items: center; gap: 6px; font-size: 12px !important; color: #A8E6C9 !important; }
.sw-pop-foot .ic { width: 15px; height: 15px; }
.sw-ai-badge { justify-self: start; display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--sx-grad); color: #14162B; font-size: 11px; font-weight: 800; font-style: normal; margin-left: 6px; vertical-align: 2px; }
.sw-pop .sw-ai-badge { margin-left: 0; }
.sw-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--sx-line); }
.sw-seg button { border: 0; background: transparent; color: var(--sx-muted); font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 11px; border-radius: 999px; cursor: pointer; }
.sw-seg button.is-on { background: #fff; color: #14162B; }

/* schermata */
.sw-screen { display: grid; gap: 14px; }
.sw-screen-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sw-screen-head strong { display: block; color: #fff; font-family: var(--font-head, "Outfit", sans-serif); font-size: 18px; }
.sw-screen-head span { font-size: 13px; color: var(--sx-muted); }
.sw-device-wrap { display: grid; place-items: center; padding: 10px 0; }
.sw-device-frame { position: relative; background: #0A0B17; border: 1px solid rgba(255,255,255,.16); box-shadow: 0 50px 100px -40px rgba(233,73,141,.55), 0 0 0 10px rgba(255,255,255,.03); }
.sw-device-frame.is-mobile { width: 300px; min-height: 580px; border-radius: 42px; padding: 40px 14px 18px; }
.sw-device-frame.is-desktop { width: min(760px, 100%); min-height: 440px; border-radius: 16px; padding: 0 0 16px; }
.sw-notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 90px; height: 22px; border-radius: 14px; background: #000; }
.sw-browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 14px; }
.sw-browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.18); }
.sw-browser-bar span { margin-left: 10px; padding: 4px 12px; border-radius: 8px; background: rgba(255,255,255,.06); font-size: 11.5px; color: var(--sx-muted); }
.sw-device-screen { display: grid; gap: 10px; }
.is-desktop .sw-device-screen { padding: 0 18px; grid-template-columns: repeat(6, 1fr); }
.is-desktop .sw-device-screen > .wf { grid-column: span 6; }
.is-desktop .sw-device-screen > .wf-cards, .is-desktop .sw-device-screen > .wf-chart, .is-desktop .sw-device-screen > .wf-map, .is-desktop .sw-device-screen > .wf-list, .is-desktop .sw-device-screen > .wf-chat, .is-desktop .sw-device-screen > .wf-calendar, .is-desktop .sw-device-screen > .wf-table { grid-column: span 3; }
.is-ghost .wf { opacity: .25; }
.wf { position: relative; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.07); animation: wfIn .6s cubic-bezier(.22,1,.36,1) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes wfIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.wf-cap { display: block; font-size: 11.5px; font-weight: 600; color: #FCD9A4; margin: 0 0 6px; }
.wf-row { display: flex; align-items: center; gap: 10px; }
.wf-logo { width: 22px; height: 22px; border-radius: 7px; background: var(--sx-grad); }
.wf-title { flex: 1; font-family: var(--font-head, "Outfit", sans-serif); font-weight: 700; color: #fff; font-size: 14px; }
.wf-avatar { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.18); }
.wf-avatar.is-lg { width: 44px; height: 44px; }
.wf-header { background: transparent; border: 0; padding: 4px 2px; }
.wf-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wf-nav b { width: 54px; height: 10px; border-radius: 6px; background: rgba(255,255,255,.14); }
.wf-nav b.is-on { background: var(--sx-grad); }
.wf-nav.is-tabbar { justify-content: space-around; }
.wf-nav.is-tabbar b { width: 22px; height: 22px; border-radius: 8px; }
.wf-nav .wf-cap { width: 100%; margin: 6px 0 0; text-align: center; }
.wf-input { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.08); color: var(--sx-muted); font-size: 13px; }
.wf-input .ic { width: 16px; height: 16px; }
.wf-input span { flex: 1; }
.wf-ai { width: 24px; height: 24px; border-radius: 8px; background: var(--sx-grad); display: grid; place-items: center; color: #14162B; }
.wf-ai .ic { width: 14px; height: 14px; }
.wf-bubble { height: 26px; border-radius: 12px; background: rgba(255,255,255,.12); width: 72%; margin-bottom: 6px; }
.wf-bubble.is-out { margin-left: auto; width: 55%; background: var(--sx-grad); opacity: .85; }
.wf-bubble.is-short { width: 40%; }
.wf-lines { display: grid; gap: 6px; flex: 1; }
.wf-lines i { display: block; height: 8px; border-radius: 5px; background: rgba(255,255,255,.14); }
.wf-li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.wf-li:last-child { border-bottom: 0; }
.wf-li b { width: 30px; height: 30px; border-radius: 10px; background: rgba(255,255,255,.12); flex: none; }
.wf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.is-desktop .wf-grid { grid-template-columns: repeat(3, 1fr); }
.wf-card { padding: 8px; border-radius: 10px; background: rgba(255,255,255,.06); display: grid; gap: 6px; }
.wf-card b { height: 48px; border-radius: 8px; background: linear-gradient(135deg, rgba(233,73,141,.45), rgba(246,192,106,.35)); }
.wf-map { position: relative; height: 120px; border-radius: 10px; background: radial-gradient(circle at 30% 40%, rgba(159,212,255,.18), transparent 50%), repeating-linear-gradient(35deg, rgba(255,255,255,.05) 0 2px, transparent 2px 22px), rgba(255,255,255,.05); }
.wf-map b { position: absolute; width: 14px; height: 14px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #E9498D; box-shadow: 0 0 0 4px rgba(233,73,141,.25); }
.wf-bars { display: flex; align-items: flex-end; gap: 8px; height: 90px; }
.wf-bars i { flex: 1; border-radius: 6px 6px 2px 2px; background: var(--sx-grad); opacity: .8; }
.wf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wf-stats div { padding: 8px; border-radius: 10px; background: rgba(255,255,255,.06); display: grid; gap: 6px; }
.wf-stats b { height: 16px; width: 60%; border-radius: 5px; background: var(--sx-grad); }
.wf-stats i { height: 7px; border-radius: 4px; background: rgba(255,255,255,.14); }
.wf-field { height: 34px; border-radius: 10px; background: rgba(255,255,255,.08); margin-bottom: 8px; }
.wf-btn { display: grid; place-items: center; height: 40px; border-radius: 12px; background: var(--sx-grad); color: #14162B; font-weight: 800; font-size: 13px; }
.wf-btn.is-small { width: 50%; height: 32px; }
.wf-button { background: transparent; border: 0; padding: 2px 0; }
.wf-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.wf-cal i { aspect-ratio: 1; border-radius: 6px; background: rgba(255,255,255,.08); }
.wf-cal i.is-on { background: var(--sx-grad); }
.wf-media { display: grid; place-items: center; height: 120px; border-radius: 10px; background: linear-gradient(135deg, rgba(233,73,141,.35), rgba(124,92,255,.25)); }
.wf-media b { width: 0; height: 0; border-left: 18px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; opacity: .85; }
.wf-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.06); }
.wf-tabs span { flex: 1; text-align: center; padding: 6px 4px; border-radius: 8px; font-size: 11.5px; color: var(--sx-muted); min-height: 26px; }
.wf-tabs span.is-on { background: rgba(255,255,255,.14); color: #fff; }
.wf-h { display: block; color: #fff; font-family: var(--font-head, "Outfit", sans-serif); font-size: 14px; margin-bottom: 8px; }
.wf-tr { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.wf-tr i { height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); }
.wf-tr.is-head i { background: rgba(246,192,106,.4); }
.wf-drop { display: grid; place-items: center; gap: 6px; padding: 18px; border-radius: 12px; border: 1.5px dashed rgba(255,255,255,.25); color: var(--sx-muted); font-size: 12.5px; }
.wf-drop .ic { width: 22px; height: 22px; }
.sw-screen-note { margin: 0; text-align: center; font-size: 12.5px; color: var(--sx-muted); }

/* scheda */
.sw-brief { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.sw-brief > * { min-width: 0; }
.sw-card { padding: 18px; border-radius: 20px; background: rgba(255,255,255,.05); border: 1px solid var(--sx-line); animation: sxIn .5s cubic-bezier(.22,1,.36,1) both; }
.sw-card.is-wide { grid-column: 1 / -1; }
.sw-card h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; color: #fff; font-family: var(--font-head, "Outfit", sans-serif); font-size: 16px; }
.sw-card h3 .ic { width: 20px; height: 20px; color: #F6C06A; }
.sw-card p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.6; color: var(--sx-text); }
.sw-card ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: 14.5px; }
.sw-kind { display: inline-block; padding: 3px 10px; border-radius: 999px; background: rgba(246,192,106,.14); color: #FCE3B6 !important; font-size: 12.5px !important; font-weight: 700; }
.sw-empty { color: var(--sx-muted) !important; font-size: 13.5px !important; }
.sw-modlist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sw-modlist > div { display: grid; gap: 8px; align-content: start; }
.sw-mod-prio { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.sw-mod-prio.p-must { color: #FFB3CE; }
.sw-mod-prio.p-should { color: #FCD9A4; }
.sw-mod-prio.p-could { color: var(--sx-muted); }
.sw-mod { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.04); }
.sw-mod > .ic { width: 20px; height: 20px; flex: none; color: #F6C06A; margin-top: 2px; }
.sw-mod strong { display: block; color: #fff; font-size: 14px; }
.sw-mod span { display: block; font-size: 12.5px; color: var(--sx-muted); line-height: 1.45; margin-top: 2px; }

/* percorso */
.sw-path { max-width: 720px; margin: 0 auto; display: grid; gap: 18px; }
.sw-path-lead { margin: 0; color: #fff; font-family: var(--font-head, "Outfit", sans-serif); font-size: 20px; }
.sw-path ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.sw-path ol::before { content: ""; position: absolute; left: 21px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(#E9498D, #F6C06A); opacity: .4; }
.sw-path li { display: flex; gap: 16px; padding: 10px 0; animation: sxIn .6s cubic-bezier(.22,1,.36,1) both; animation-delay: calc(var(--i) * 90ms); }
.sw-path-ic { position: relative; width: 44px; height: 44px; border-radius: 14px; background: #1A1D3D; border: 1px solid var(--sx-line); display: grid; place-items: center; flex: none; }
.sw-path-ic .ic { width: 20px; height: 20px; color: #F6C06A; }
.sw-path li.is-now .sw-path-ic { background: var(--sx-grad); border: 0; }
.sw-path li.is-now .sw-path-ic .ic { color: #14162B; }
.sw-path li strong { display: block; color: #fff; font-size: 15.5px; margin-top: 2px; }
.sw-path li p { margin: 2px 0 0; font-size: 14px; color: var(--sx-muted); }
.sw-path-box { padding: 18px; border-radius: 20px; background: rgba(255,255,255,.05); border: 1px solid rgba(246,192,106,.3); }
.sw-path-box strong { color: #fff; }
.sw-path-box ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 7px; }
.sw-path-box li { display: flex; gap: 8px; font-size: 14px; }
.sw-path-box .ic { width: 17px; height: 17px; color: #A8E6C9; flex: none; margin-top: 2px; }

/* compositore */
.sw-sheet { position: fixed; inset: 0; z-index: 380; display: grid; align-items: end; justify-items: center; font-family: var(--font-body, "Montserrat", sans-serif); }
.sw-sheet-backdrop { position: absolute; inset: 0; background: rgba(6,7,15,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: sxFade .3s; }
.sw-sheet-box { position: relative; width: min(1080px, 100%); max-height: min(78dvh, 760px); display: grid; grid-template-rows: auto auto auto 1fr; gap: 12px; padding: 22px clamp(16px, 3vw, 30px) 24px; border-radius: 28px 28px 0 0; background: radial-gradient(90% 60% at 100% 0%, rgba(246,192,106,.16), transparent 60%), var(--sx-bg-2); color: var(--sx-text); box-shadow: 0 -30px 80px -30px rgba(0,0,0,.7); animation: swSheet .5s cubic-bezier(.22,1,.36,1) both; }
@keyframes swSheet { from { transform: translateY(40px); opacity: 0; } }
.sw-sheet-head { display: flex; justify-content: space-between; gap: 14px; }
.sw-sheet-head strong { color: #fff; font-family: var(--font-head, "Outfit", sans-serif); font-size: 22px; }
.sw-sheet-head p { margin: 2px 0 0; font-size: 14px; color: var(--sx-muted); }
.sw-sheet-head .sw-pop-x { position: static; flex: none; }
.sw-sheet-box > input { width: 100%; font: inherit; font-size: 15px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--sx-line); background: rgba(255,255,255,.06); color: #fff; outline: none; }
.sw-ingr-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.sw-ingr-tabs button { flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--sx-line); background: transparent; color: var(--sx-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.sw-ingr-tabs button.is-on { background: #fff; color: #14162B; border-color: #fff; }
.sw-ingr-grid { overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; padding: 2px; align-content: start; }
.sw-ingr { position: relative; display: grid; gap: 6px; align-content: start; text-align: left; padding: 14px; border-radius: 18px; border: 1px solid var(--sx-line); background: rgba(255,255,255,.04); color: var(--sx-text); font: inherit; cursor: pointer; transition: transform .35s cubic-bezier(.22,1,.36,1), border-color .3s, background .3s; }
.sw-ingr:hover:not([disabled]) { transform: translateY(-3px); border-color: rgba(246,192,106,.55); background: rgba(255,255,255,.08); }
.sw-ingr[disabled] { opacity: .55; cursor: default; }
.sw-ingr-ic { width: 40px; height: 40px; border-radius: 13px; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; }
.sw-ingr.is-ai .sw-ingr-ic { background: var(--sx-grad); color: #14162B; }
.sw-ingr-ic .ic { width: 21px; height: 21px; }
.sw-ingr strong { color: #fff; font-size: 14.5px; line-height: 1.3; }
.sw-ingr-desc { font-size: 12.5px; color: var(--sx-muted); line-height: 1.45; }
.sw-ingr-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: #FCD9A4; }
.sw-ingr-tag .ic { width: 14px; height: 14px; }

/* esito e notifiche */
.sw-done { grid-row: 1 / -1; display: grid; place-items: center; padding: clamp(24px, 6vw, 80px) 20px; overflow-y: auto; }
.sw-done .sx-success { width: min(760px, 100%); }
.sw-toast { position: absolute; left: 50%; top: 86px; transform: translateX(-50%); z-index: 20; display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 12px; border-radius: 999px; background: #fff; color: #14162B; font-size: 14px; box-shadow: 0 20px 40px -18px rgba(0,0,0,.6); animation: sxPop .5s cubic-bezier(.34,1.56,.64,1) both; transition: opacity .5s, transform .5s; }
.sw-toast .ic { width: 22px; height: 22px; padding: 3px; border-radius: 8px; background: var(--sx-grad); }
.sw-toast.is-out { opacity: 0; transform: translate(-50%, -10px); }
.st-workspace { position: relative; }

/* sezione sotto lo Studio */
.page-studio .st-how { background: var(--paper, #F4F5FA); }

/* --------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .sw-top { flex-wrap: wrap; gap: 12px; }
  .sw-head { order: 5; flex-basis: 100%; }
  .sw-brand { margin-right: auto; }
  .sw-modlist { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .st-workspace { height: calc(100dvh - var(--header-h, 68px)); min-height: 0; }
  .sw-top { padding: 10px 14px; gap: 10px; }
  .sw-ring { width: 46px; height: 46px; }
  .sw-ring svg { width: 46px; height: 46px; }
  .sw-status-label { display: none; }
  .sw-ingr-btn { height: 40px; padding: 0 12px; }
  .sw-ingr-btn span { display: none; }
  .sw-send { height: 40px; padding: 0 14px; font-size: 14px; }
  .sw-mtabs { display: flex; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--sx-line); }
  .sw-mtabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px; border-radius: 12px; border: 0; background: transparent; color: var(--sx-muted); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
  .sw-mtabs button .ic { width: 18px; height: 18px; }
  .sw-mtabs button.is-active { background: rgba(255,255,255,.09); color: #fff; }
  .sw-body { grid-template-columns: 1fr; }
  .sw-body.is-chat .sw-canvas, .sw-body.is-canvas .sw-chat { display: none; }
  .sw-chat { border-right: 0; }
  .sw-brief { grid-template-columns: 1fr; }
  .sw-map { min-height: 340px; }
  .sw-map-edge.is-top { position: static; max-width: none; margin-bottom: 6px; }
  .sw-node-label { font-size: calc(16px * var(--fs, 1)); }
  .sx-form-row { grid-template-columns: 1fr; }
  .sw-device-frame.is-mobile { width: min(300px, 100%); }
}
@media (max-width: 560px) {
  .st-start-hint { display: none; }
  .st-start-bar { justify-content: flex-end; }
  .st-go { flex: 1; justify-content: center; }
  .sx-modal-box { padding: 24px 18px; }
  .sw-brand-studio { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .st-orb, .sw-link.is-ai, .sw-node-halo, .sw-core-pulse, .sw-send.is-ready, .sx-icon.is-live { animation: none !important; }
  .sx-msg, .sx-chip, .wf, .sw-node.is-new, .sw-node.is-new > *, .sw-path li { animation: none !important; }
}
@view-transition { navigation: auto; }
.st-workspace { view-transition-name: studio-surface; }

/* pannello: accesso evidente allo Studio a tutto schermo */
.sp-head-open { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px; border-radius: 12px; border: 1px solid rgba(246,192,106,.45); background: rgba(246,192,106,.08); color: #FCD9A4; font-size: 13px; font-weight: 600; white-space: nowrap; flex: none; transition: background .25s, border-color .25s; }
.sp-head-open:hover { background: rgba(246,192,106,.16); border-color: rgba(246,192,106,.8); color: #fff; text-decoration: none; }
.sp-head-open .ic { width: 15px; height: 15px; }
.sp-progress-cta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--sx-line); font-size: 12.5px; font-weight: 600; color: #FCD9A4; }
.sp-progress-cta .ic { width: 14px; height: 14px; flex: none; transition: transform .25s; }
.sp-progress:hover .sp-progress-cta .ic { transform: translateX(3px); }
.sx-chip.sp-chip-studio { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; border-color: rgba(246,192,106,.5); color: #FCD9A4; }
.sx-chip.sp-chip-studio .ic { width: 14px; height: 14px; }
@media (max-width: 420px) { .sp-head-open span { display: none; } .sp-head-open { padding: 0; width: 38px; justify-content: center; } }
.sp-head-text { min-width: 0; }
.sp-head-text strong, .sp-head-text span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Apertura automatica dello Studio dalla chat */
.sp-moment { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 5; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; padding: 18px; border-radius: 22px; background: radial-gradient(120% 120% at 0% 0%, rgba(233,73,141,.35), transparent 60%), radial-gradient(120% 120% at 100% 100%, rgba(246,192,106,.25), transparent 60%), #1B1E3A; border: 1px solid rgba(246,192,106,.45); box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); overflow: hidden; opacity: 0; transform: translateY(24px) scale(.96); transition: opacity .45s cubic-bezier(.22,1,.36,1), transform .55s cubic-bezier(.22,1,.36,1); }
.sp-moment.is-in { opacity: 1; transform: none; }
.sp-moment-glow { position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent, rgba(233,73,141,.25), transparent 30%, rgba(246,192,106,.2), transparent 60%); animation: spSpin 6s linear infinite; pointer-events: none; }
@keyframes spSpin { to { transform: rotate(360deg); } }
.sp-moment > *:not(.sp-moment-glow) { position: relative; }
.sp-moment-ring { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#E9498D, #EE7C79, #F6C06A, #E9498D); animation: spSpin 2.4s linear infinite; }
.sp-moment-num { width: 42px; height: 42px; border-radius: 50%; background: #14162B; display: grid; place-items: center; color: #fff; font-family: var(--font-head, "Outfit", sans-serif); font-weight: 700; font-size: 20px; animation: spSpin 2.4s linear infinite reverse; }
.sp-moment.is-paused .sp-moment-ring, .sp-moment.is-paused .sp-moment-num { animation-play-state: paused; }
.sp-moment-text strong { display: block; color: #fff; font-family: var(--font-head, "Outfit", sans-serif); font-size: 16px; line-height: 1.3; }
.sp-moment-text p { margin: 4px 0 12px; font-size: 13.5px; color: var(--sx-muted); line-height: 1.5; }
.sp-moment-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sx-panel.is-leaving { transform: scale(1.02); transition: transform .4s ease; }

/* Arrivo nello Studio dalla chat */
.studio-app.is-arriving .sw-top { animation: swArriveTop .7s cubic-bezier(.22,1,.36,1) both; }
.studio-app.is-arriving .sw-chat { animation: swArriveSide .8s cubic-bezier(.22,1,.36,1) .1s both; }
.studio-app.is-arriving .sw-canvas { animation: swArriveCanvas 1.1s cubic-bezier(.22,1,.36,1) .15s both; }
@keyframes swArriveTop { from { opacity: 0; transform: translateY(-16px); } }
@keyframes swArriveSide { from { opacity: 0; transform: translateX(-24px); } }
@keyframes swArriveCanvas { from { opacity: 0; transform: scale(.94); filter: blur(6px); } }
@media (prefers-reduced-motion: reduce) {
  .sp-moment-glow, .sp-moment-ring, .sp-moment-num { animation: none; }
  .studio-app.is-arriving .sw-top, .studio-app.is-arriving .sw-chat, .studio-app.is-arriving .sw-canvas { animation: none; }
}
.sw-toast { max-width: calc(100% - 28px); }
@media (max-width: 560px) {
  .sw-top { flex-wrap: nowrap; }
  .sw-brand { display: none; }
  .sw-head { flex: 1; min-width: 0; order: 0; flex-basis: auto; }
  .sw-send { width: 40px; padding: 0; justify-content: center; }
  .sw-send span { display: none; }
  .sw-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-top: 10px; }
  .sw-tabs::-webkit-scrollbar { display: none; }
  .sw-tab { padding: 8px 12px; font-size: 13px; flex: none; }
  .sw-toast { top: 72px; border-radius: 16px; padding: 10px 14px 10px 10px; font-size: 13.5px; line-height: 1.4; }
}
@media (max-width: 560px) {
  .sw-status-text { display: none; }
  .st-workspace, .sw-top, .sw-mtabs, .sw-body, .sw-chat, .sw-canvas { min-width: 0; max-width: 100%; }
  .sw-top { gap: 8px; }
  .sw-toast { left: 14px; right: 14px; top: auto; bottom: 18px; transform: none; justify-content: flex-start; }
  .sw-toast.is-out { transform: translateY(10px); }
}

.sw-pop .sw-seg { display: flex; width: 100%; }
.sw-pop .sw-seg button { flex: 1 1 auto; padding-left: 8px; padding-right: 8px; font-size: 12.5px; white-space: nowrap; }
.sw-pop .sw-seg { min-width: 0; }
.sw-pop.is-sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; translate: none; z-index: 200; border-radius: 22px 22px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); font-family: var(--font-body, "Montserrat", sans-serif); color: var(--sx-text); animation: swSheetUp .35s cubic-bezier(.22,1,.36,1) both; }
@keyframes swSheetUp { from { transform: translateY(100%); } }
