/* =============================================================================================
   Studio del Composer — nero, bianco e rosso SKIN, tema giorno e notte.
   ============================================================================================= */
:root, :root[data-theme="light"] {
  --bg: #e9e9ed; --shell: #f6f6f8; --card: #ffffff; --chip: #f1f1f4; --chip2: #e6e6ea; --line: #e8e8ec; --line2: #d4d4da;
  --ink: #141416; --ink2: #3a3a40; --muted: #7b7b86; --solid: #111113; --on-solid: #ffffff; --rail: #111113;
  --red: #e31e24; --red2: #b5121a; --red-soft: rgba(227, 30, 36, .1); --checker: #eee;
  --sh-sm: 0 1px 2px rgba(17, 17, 19, .05), 0 2px 8px rgba(17, 17, 19, .04);
  --sh: 0 2px 6px rgba(17, 17, 19, .05), 0 14px 34px rgba(17, 17, 19, .07);
  --sh-lg: 0 6px 16px rgba(17, 17, 19, .08), 0 30px 70px rgba(17, 17, 19, .14);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #060607; --shell: #0e0e11; --card: #16161a; --chip: #1f1f24; --chip2: #2a2a31; --line: #232329; --line2: #34343c;
  --ink: #f3f3f5; --ink2: #d0d0d6; --muted: #9a9aa4; --solid: #f3f3f5; --on-solid: #111113; --rail: #1c1c21;
  --red: #ef2b31; --red2: #c1141b; --red-soft: rgba(239, 43, 49, .16); --checker: #2a2a31;
  --sh-sm: 0 1px 2px rgba(0, 0, 0, .4); --sh: 0 2px 8px rgba(0, 0, 0, .35), 0 16px 40px rgba(0, 0, 0, .35); --sh-lg: 0 10px 30px rgba(0, 0, 0, .5), 0 40px 90px rgba(0, 0, 0, .55);
  color-scheme: dark;
}
html, body { height: 100%; margin: 0; }
body { font: 14px/1.45 'Plus Jakarta Sans', Inter, system-ui, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
body.mode-studio { overflow: hidden; }
:where(.mode-studio) :is(button, input, select) { font: inherit; color: inherit; }
:where(.mode-studio) button { cursor: pointer; }
.studio *, .studio *::before, .studio *::after, .auth *, .auth-wait *, .xmodal-bg *, .pal-bg *, .toasts * { box-sizing: border-box; }
:where(.studio, .auth, .xmodal, .pal) :is(h1, h2, h3, h4, p) { margin: 0; }
.ico { display: inline-grid; place-items: center; flex: none; }
.ico svg { display: block; }
.xhl { color: var(--red); }
.sp { flex: 1; }
kbd { font: 600 11px ui-monospace, Menlo, monospace; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line2); background: var(--chip); color: var(--muted); }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::selection { background: var(--red); color: #fff; }

/* --- Struttura -------------------------------------------------------------------------------- */
.studio { position: relative; height: 100vh; padding: 16px; }
.deco { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.deco-a { position: absolute; left: -160px; bottom: -180px; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle, var(--red-soft), transparent 65%); filter: blur(10px); }
.deco-b { position: absolute; right: 40px; bottom: 30px; width: 14px; height: 14px; border-radius: 50%; background: var(--red); box-shadow: -1180px -560px 0 -3px var(--line2); }
.deco-lines { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--line2); stroke-width: 1.2; }
.shell { position: relative; height: 100%; display: grid; grid-template-columns: 108px minmax(0, 1fr); grid-template-rows: 92px minmax(0, 1fr); border-radius: 30px; background: var(--shell); box-shadow: var(--sh-lg); overflow: hidden; }
.main { grid-column: 2; overflow: auto; padding: 4px 32px 32px 12px; overscroll-behavior: contain; scrollbar-width: thin; }
.view-editor .main { overflow: hidden; }

/* LED della barra: la linea rossa che ogni tanto corre sul bordo (vedi RailLed in shell.js) */
.rail-led { position: fixed; z-index: 61; pointer-events: none; overflow: visible; }
.rail-led rect { fill: none; stroke-linecap: round; opacity: 0; }
.led-tail { stroke: #ff2433; stroke-width: 3; filter: drop-shadow(0 0 6px rgba(227, 6, 19, .75)); stroke-opacity: .55; }
.led-core { stroke: #ff5a64; stroke-width: 2; filter: drop-shadow(0 0 3px rgba(255, 36, 51, .95)) drop-shadow(0 0 8px rgba(227, 6, 19, .7)); }
@media (prefers-reduced-motion: reduce) { .rail-led { display: none; } }
/* barra laterale */
.xrail { grid-row: 2; grid-column: 1; position: relative; align-self: start; display: flex; flex-direction: column; align-items: center; gap: 18px; width: 72px; max-height: calc(100% - 28px); margin: 4px 0 0 24px; padding: 20px 0; border-radius: 26px; background: var(--rail); box-shadow: var(--sh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.xrail::-webkit-scrollbar { display: none; }
.rail-l { display: none; font-size: 10px; font-weight: 700; line-height: 1; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.xrail .rail-more { display: none; } /* «Altro» serve solo sul telefono, dove la barra ha quattro voci: sul computer le voci ci sono tutte */
/* iPhone: un campo sotto i 16 px fa ingrandire la pagina quando lo tocchi (e resta ingrandita) */
@supports (-webkit-touch-callout: none) { input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: max(16px, 1em) !important; } }
.xrail > * { flex: none; }
/* etichetta delle voci della barra: fuori dalla barra, così non viene tagliata quando la barra scorre */
.rail-tip { position: fixed; z-index: 400; transform: translateY(-50%); padding: 6px 10px; border-radius: 9px; background: var(--solid); color: var(--on-solid); font-size: 12px; font-weight: 700; white-space: nowrap; pointer-events: none; animation: rail-tip-in .18s ease-out; }
@keyframes rail-tip-in { from { opacity: 0; transform: translate(-6px, -50%); } }
@media (prefers-reduced-motion: reduce) { .rail-tip { animation: none; } }
.rail-sp { width: 28px; height: 1px; background: rgba(255, 255, 255, .14); margin: 2px 0; }
.rail-i { position: relative; z-index: 1; width: 48px; height: 48px; border: 0; border-radius: 15px; background: transparent; color: rgba(255, 255, 255, .62); display: grid; place-items: center; transition: color .25s, transform .25s; }
.rail-i:hover { color: #fff; transform: scale(1.08); }
.rail-i.on { color: var(--red); }
.rail-dot { position: absolute; z-index: 1; top: 0; left: 0; width: 48px; height: 48px; border-radius: 15px; background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); opacity: 0; pointer-events: none; }
.rail-i.on { z-index: 2; }
[data-tip] { position: relative; }
[data-tip]::after { content: attr(data-tip); position: absolute; left: calc(100% + 18px); top: 50%; z-index: 90; padding: 6px 10px; border-radius: 9px; background: var(--solid); color: var(--on-solid); font-size: 12px; font-weight: 700; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-6px, -50%); transition: opacity .2s, transform .2s; }
[data-tip]:hover::after { opacity: 1; transform: translate(0, -50%); }

/* barra superiore */
.top { grid-column: 1 / -1; display: flex; align-items: center; gap: 36px; padding: 0 32px 0 30px; min-width: 0; }
.xlogo { display: inline-flex; flex: none; }
.xlogo img { height: 36px; width: auto; display: block; }
.logo-night { display: none !important; }
:root[data-theme="dark"] .logo-day { display: none !important; }
:root[data-theme="dark"] .logo-night { display: block !important; }
.tabs { position: relative; display: flex; gap: 10px; }
.xtab { display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 16px; border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 14px; border-radius: 10px; transition: color .2s, background .2s; }
.xtab:hover { color: var(--ink); background: var(--chip); }
.xtab.on { color: var(--ink); }
.tab-line { position: absolute; left: 0; bottom: -4px; height: 3px; border-radius: 3px; background: var(--red); opacity: 0; }
.xsearch { display: flex; align-items: center; justify-content: flex-start; gap: 12px; height: 46px; padding: 0 14px 0 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--muted); transition: border-color .2s, box-shadow .2s, transform .2s; }
.xsearch span:not(.ico) { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xsearch:hover { border-color: var(--line2); box-shadow: var(--sh-sm); }
.xsearch.big { flex: none; width: 360px; max-width: 100%; height: 48px; padding: 0 16px 0 18px; cursor: text; }
.xsearch.big input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--ink); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.top-r .pop + .pop { margin-left: -6px; }
.top-r > .xbtn { margin-left: 10px; padding: 0 22px; }
.top-proj { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 11px; background: var(--chip); font-size: 13px; font-weight: 700; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-proj i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 var(--red); animation: beat 2s infinite; flex: none; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(227, 30, 36, .5); } 70% { box-shadow: 0 0 0 8px rgba(227, 30, 36, 0); } 100% { box-shadow: 0 0 0 0 rgba(227, 30, 36, 0); } }

/* --- Controlli -------------------------------------------------------------------------------- */
.xbtn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border: 0; border-radius: 13px; font-weight: 700; font-size: 14px; white-space: nowrap; transition: transform .2s, box-shadow .25s, background .2s, color .2s, filter .2s; isolation: isolate; }
.xbtn:hover { transform: translateY(-1px); }
.xbtn:active { transform: translateY(1px) scale(.98); }
.xbtn:disabled { opacity: .45; pointer-events: none; }
.xbtn .ico, .xbtn span { position: relative; z-index: 1; }
.xbtn-solid { background: var(--solid); color: var(--on-solid); box-shadow: 0 6px 16px rgba(17, 17, 19, .18); }
.xbtn-solid:hover { box-shadow: 0 10px 24px rgba(17, 17, 19, .26); }
.xbtn-red { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(227, 30, 36, .3); }
.xbtn-red:hover { box-shadow: 0 12px 28px rgba(227, 30, 36, .42); filter: brightness(1.05); }
.xbtn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line2); }
.xbtn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.xbtn-soft { background: var(--chip); color: var(--ink); }
.xbtn-soft:hover { background: var(--chip2); }
.xbtn-light { background: #fff; color: #111; box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }
.xbtn-danger { background: var(--red-soft); color: var(--red); }
.xbtn-danger:hover { background: var(--red); color: #fff; }
.xbtn-sm { height: 36px; padding: 0 13px; font-size: 13px; border-radius: 11px; }
.ripple { position: absolute; z-index: 0; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: currentColor; pointer-events: none; }
.ibtn { position: relative; width: 42px; height: 42px; border: 0; border-radius: 13px; background: transparent; color: var(--ink2); display: grid; place-items: center; transition: background .2s, color .2s, transform .2s; }
.ibtn:hover { background: var(--chip); color: var(--ink); }
.ibtn:active { transform: scale(.92); }
.ibtn.on { background: var(--chip2); color: var(--red); }
.ibtn.sm { width: 32px; height: 32px; border-radius: 10px; }
.ibtn.danger:hover { color: var(--red); background: var(--red-soft); }
.ibtn-badge { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10px; font-style: normal; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--shell); }
.sw { position: relative; flex: none; width: 40px; height: 24px; display: inline-block; }
.sw input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.sw i { position: absolute; inset: 0; border-radius: 12px; background: var(--line2); transition: background .25s; }
.sw i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .25); transition: transform .35s cubic-bezier(.5, 1.7, .45, .9), width .2s; }
.sw input:active + i::after { width: 22px; }
.sw input:checked + i { background: var(--red); }
.sw input:checked + i::after { transform: translateX(16px); }
.sw input:checked:active + i::after { transform: translateX(12px); }
.sw input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 2px; }
.sw-sm { width: 32px; height: 19px; }
.sw-sm i::after { width: 13px; height: 13px; }
.sw-sm input:checked + i::after { transform: translateX(13px); }
.seg { position: relative; display: inline-flex; padding: 4px; border-radius: 13px; background: var(--chip); max-width: 100%; overflow-x: auto; scrollbar-width: none; flex: none; }
.seg-thumb { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 10px; background: var(--card); box-shadow: var(--sh-sm); }
.seg-i { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 13px; white-space: nowrap; transition: color .25s; }
.seg-i:hover { color: var(--ink); }
.seg-i.on { color: var(--ink); }
.theme-seg .seg-thumb { background: var(--solid); }
.theme-seg .seg-i.on { color: var(--on-solid); }
.sel { position: relative; display: grid; gap: 6px; min-width: 0; }
.sel-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.sel-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 42px; padding: 0 12px 0 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--chip); font-weight: 600; font-size: 14px; text-align: left; transition: border-color .2s, box-shadow .2s; min-width: 0; }
.sel-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-btn .ph { color: var(--ink); font-weight: 700; }
.sel-btn:hover { border-color: var(--line2); }
.sel.open .sel-btn { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.sel-chev { transition: transform .3s cubic-bezier(.5, 1.6, .4, 1); color: var(--muted); }
.sel.open .sel-chev { transform: rotate(180deg); color: var(--red); }
.sel-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 70; min-width: 180px; max-height: 300px; overflow: auto; padding: 6px; border-radius: 15px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--sh-lg); }
.sel-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 11px; border: 0; border-radius: 10px; background: none; font-size: 13px; font-weight: 600; text-align: left; transition: background .15s, padding .15s; }
.sel-opt:hover { background: var(--chip); padding-left: 15px; }
.sel-opt.on { color: var(--red); }
.sel-compact { display: inline-grid; }
.sel-compact .sel-btn { height: 38px; min-width: 120px; }
.add-sel .sel-btn { border-style: dashed; border-width: 1.5px; border-color: var(--line2); background: transparent; justify-content: center; }
.add-sel .sel-btn:hover { border-color: var(--red); color: var(--red); }
.add-sel .sel-btn:hover .ph { color: var(--red); }
.menu { position: relative; }
.menu-pop { position: absolute; top: 38px; z-index: 80; min-width: 210px; padding: 6px; border-radius: 15px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--sh-lg); }
.menu-right { right: 0; } .menu-left { left: 0; }
.menu-i { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border: 0; border-radius: 10px; background: none; font-size: 13px; font-weight: 600; text-align: left; white-space: nowrap; transition: background .15s, color .15s; }
.menu-i:hover { background: var(--chip); }
.menu-i.danger { color: var(--red); }
.menu-i.danger:hover { background: var(--red-soft); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.ring { position: relative; flex: none; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--chip2); stroke-width: 6; }
.ring-fg { fill: none; stroke: var(--red); stroke-width: 6; stroke-linecap: round; }
.ring-dark .ring-fg { stroke: var(--ink); }
.ring b { font-size: 15px; font-weight: 800; }
.collapse { overflow: hidden; }
.xfield { display: grid; gap: 6px; }
.xfield > span { font-size: 12px; font-weight: 700; color: var(--muted); }
.xfield small { font-size: 11px; color: var(--muted); }
.xfield input { height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--chip); color: var(--ink); font-size: 14px; outline: 0; transition: border-color .2s, box-shadow .2s, background .2s; }
.xfield input:focus { border-color: var(--red); background: var(--card); box-shadow: 0 0 0 4px var(--red-soft); }
.photo { display: block; overflow: hidden; border-radius: 18px; background: var(--chip); }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }

/* --- Card ------------------------------------------------------------------------------------- */
.card { background: var(--card); border-radius: 26px; padding: 26px; box-shadow: var(--sh-sm); border: 1px solid var(--line); min-width: 0; }
.card-h { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.card-h h2 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.card-h small { color: var(--muted); font-size: 13px; }
.count { min-width: 26px; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--red-soft); color: var(--red); font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; }
.eyebrow { font-size: 12px !important; font-weight: 700; color: var(--red) !important; }
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 28px 16px; }
.empty .photo { width: 260px; height: 170px; margin-bottom: 6px; }
.empty b { font-size: 16px; }
.empty p { color: var(--muted); max-width: 320px; margin-bottom: 8px; }

/* --- Dashboard -------------------------------------------------------------------------------- */
.dash { display: grid; gap: 28px; padding-top: 6px; }
.dash-top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.hello { grid-column: span 4; align-self: center; padding: 0 16px 0 4px; }
.hello h1 { font-size: clamp(30px, 2.5vw, 40px); line-height: 1.12; font-weight: 800; letter-spacing: -.025em; margin-bottom: 18px; text-wrap: balance; }
.hello p { color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 400px; }
.new-card, .quick { grid-column: span 2; height: 100%; min-height: 220px; border-radius: 26px; }
.new-card { display: grid; place-content: center; justify-items: center; gap: 6px; padding: 18px 20px; border: 2px dashed var(--line2); background: transparent; color: var(--ink); text-align: center; transition: border-color .25s, background .25s, transform .25s; }
.new-card .new-main > span { width: 44px; height: 44px; margin-bottom: 8px; border-radius: 15px; display: grid; place-items: center; background: var(--red); color: #fff; box-shadow: 0 4px 10px rgba(227, 30, 36, .18); transition: transform .45s cubic-bezier(.5, 1.6, .4, 1); }
.new-card b { font-size: 14px; }
.new-card small { color: var(--muted); font-size: 12px; line-height: 1.5; max-width: 170px; }
.new-card:has(.new-main:hover) { border-color: var(--red); background: var(--red-soft); transform: translateY(-3px); }
.new-card:has(.new-main:hover) .new-main > span { transform: rotate(90deg) scale(1.08); }
.new-main { display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: center; cursor: pointer; }
.new-main:focus-visible { outline: 2px solid var(--red); outline-offset: 6px; border-radius: 12px; }
.new-alt { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; }
.new-dice { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px 14px 8px 10px; border: 1px solid var(--line2); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, transform .2s; }
.new-dice .ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--ink); color: var(--card); transition: transform .45s cubic-bezier(.5, 1.6, .4, 1); }
.new-dice span { display: grid; }
.new-dice b { font-size: 13px; }
.new-dice small { max-width: 190px; font-size: 11px; line-height: 1.35; }
.new-dice:hover { border-color: var(--ink); transform: translateY(-2px); }
.new-dice:hover .ico { transform: rotate(-120deg); }
.new-dice:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.new-alt small { max-width: none; }
/* Questionario e Dadi: due righe basse a tutta larghezza (affiancate se la card è larga), così la card resta bassa */
.new-card:has(.new-acts) { container-type: inline-size; }
.new-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; width: min(340px, 100cqi); margin-top: 8px; }
.new-act { display: flex; align-items: center; gap: 9px; min-width: 0; height: 36px; padding: 0 12px 0 5px; border: 1px solid var(--line2); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, transform .2s; }
.new-act > i { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: var(--card); font-style: normal; transition: transform .45s cubic-bezier(.5, 1.6, .4, 1); }
.new-act b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.new-act:hover { border-color: var(--ink); transform: translateY(-1px); }
.new-act:hover > i { transform: rotate(-90deg); }
.new-act:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.new-card .new-alt { width: min(340px, 100cqi); margin-top: 2px; }
.new-card .new-alt .new-from { width: 100%; max-width: none; }
.new-st { height: 28px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line2); background: var(--card, transparent); color: var(--ink); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: border-color .2s, color .2s; }
.new-st:hover, .new-st:focus-visible { border-color: var(--red); color: var(--red); outline: 0; }
.new-from { min-width: 150px; max-width: 220px; }
.new-from .sel-btn { height: 30px; border-radius: 15px; font-size: 12px; font-weight: 700; }
/* le scorciatoie: fisarmonica orizzontale (aperto: foto e testo; chiusi: numero e titolo in verticale) */
.qacc { grid-column: span 6; display: flex; gap: 8px; min-height: 250px; }
.qacc-p { position: relative; flex: 1 1 0; min-width: 56px; overflow: hidden; border-radius: 26px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--sh); isolation: isolate; transition: box-shadow .3s, border-color .3s; }
.qacc-p:hover { box-shadow: var(--sh-lg); }
.qacc-p.on { border-color: var(--line2); }
.qacc-hit { position: absolute; inset: 0; z-index: 4; border: 0; background: none; cursor: pointer; border-radius: inherit; }
.qacc-hit:focus-visible { outline: 3px solid var(--red); outline-offset: -3px; }
.qacc-art { position: absolute; inset: 10px 10px auto; height: calc(100% - 20px); border-radius: 18px; overflow: hidden; z-index: 0; transition: height .7s cubic-bezier(.16, 1, .3, 1), filter .5s; }
.qacc-art img { width: 100%; height: 100%; object-fit: cover; will-change: transform; transition: none; }
.qacc-p:not(.on) .qacc-art img { transform: none !important; }
.qacc-p:not(.on) .qacc-art { filter: grayscale(1) brightness(.55); }
.qacc-p:not(.on) .qacc-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, .55)); }
.qacc-p.on .qacc-art { height: calc(100% - 128px); }
.qacc-n { position: absolute; top: 20px; left: 0; right: 0; z-index: 1; text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .04em; color: #fff; transition: opacity .3s; }
.qacc-v { position: absolute; left: 50%; bottom: 22px; z-index: 1; writing-mode: vertical-rl; transform: translateX(-50%) rotate(180deg); white-space: nowrap; font-size: 15px; font-weight: 800; color: #fff; transition: opacity .3s; }
.qacc-p.on .qacc-v { opacity: 0; }
.qacc-p.on .qacc-n { left: 22px; right: auto; top: 22px; padding: 3px 8px; border-radius: 8px; background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px); }
.qacc-b { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: grid; gap: 6px; padding: 0 20px 18px; min-width: 240px; opacity: 0; pointer-events: none; transition: opacity .25s; }
.qacc-p.on .qacc-b { opacity: 1; }
.qacc-b b { font-size: 16px; font-weight: 800; }
.qacc-b small { color: var(--muted); font-size: 12.5px; line-height: 1.5; max-width: 34ch; }
.qacc-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 13px; font-weight: 800; color: var(--red); }
.qacc-p.on:hover .qacc-go svg { transform: translateX(3px); }
.qacc-go svg { transition: transform .25s; }
.qacc-ring { position: absolute; top: 20px; right: 20px; z-index: 3; width: 26px; height: 26px; transform: rotate(-90deg); pointer-events: none; }
.qacc-ring circle { fill: rgba(0, 0, 0, .35); stroke: rgba(255, 255, 255, .3); stroke-width: 2.5; }
.qacc-ring .qacc-ring-v { fill: none; stroke: #fff; stroke-dasharray: 62.8; stroke-dashoffset: 62.8; stroke-linecap: round; }
@media (prefers-reduced-motion: reduce) { .qacc-art { transition: none; } }
.quick { display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding: 10px 10px 20px; border: 1px solid var(--line); background: var(--card); text-align: left; box-shadow: var(--sh); transition: box-shadow .3s; will-change: transform; }
.quick:hover { box-shadow: var(--sh-lg); }
.quick-art { width: 100%; height: 150px; border-radius: 18px; }
.quick:hover .quick-art img { transform: scale(1.07); }
.quick-t { display: grid; gap: 4px; padding: 0 10px; }
.quick b { font-size: 15px; font-weight: 800; }
.quick small { color: var(--muted); font-size: 12px; }

.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.proj { border: 1px solid var(--line); border-radius: 20px; overflow: visible; background: var(--card); transition: transform .3s, box-shadow .3s, border-color .3s; }
.proj:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: var(--line2); }
.proj-prev { position: relative; display: grid; gap: 6px; height: 132px; padding: 10px; border-radius: 19px 19px 0 0; overflow: hidden; cursor: pointer; }
.pp-h { display: flex; align-items: center; gap: 5px; height: 18px; padding: 0 6px; border-radius: 6px; font-size: 8px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.pp-h i { width: 9px; height: 9px; border-radius: 3px; }
.pp-h em { font-style: normal; font-weight: 900; letter-spacing: .04em; }
.pp-h u { width: 26px; height: 8px; border-radius: 4px; margin-left: auto; }
.pp-hero { height: 48px; border-radius: 8px; }
.pp-row { display: flex; gap: 5px; }
.pp-row i { flex: 1; height: 26px; }
.pp-hover { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; background: rgba(10, 10, 12, .62); color: #fff; font-weight: 700; font-size: 13px; opacity: 0; backdrop-filter: blur(2px); transition: opacity .25s; }
.pp-hover .ico, .pp-hover { transform: none; }
.proj:hover .pp-hover { opacity: 1; }
.proj-b { padding: 12px 12px 14px 14px; }
.proj-t { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.proj-t b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-b > small { color: var(--muted); font-size: 12px; }
.proj-sw { display: flex; align-items: center; gap: 4px; margin-top: 10px; }
.proj-sw i { width: 15px; height: 15px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.proj-sw span { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 600; }
.stat-row { display: grid; gap: 12px; margin-bottom: 20px; }
.stat-i { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 18px; background: var(--chip); }
.stat-i div { display: grid; gap: 2px; }
.stat-i b { font-size: 15px; }
.stat-i small { color: var(--muted); font-size: 12px; }
.dtile-present { padding: 0; border: 0; color: #fff; background: #111; box-shadow: 0 20px 44px rgba(227, 30, 36, .22); }
.present-in { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 8px; height: 100%; padding: 26px; border-radius: inherit; }
.present-in::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 8, 10, 0) 10%, rgba(8, 8, 10, .62) 42%, rgba(8, 8, 10, .9) 68%, rgba(120, 8, 14, .96)); }
.present-in h3, .present-in p { text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 4px 18px rgba(0, 0, 0, .45); }
.present-bg { position: absolute; inset: 0; z-index: -2; border-radius: 0; }
.dtile-present:hover .present-bg img { transform: scale(1.06); }
.present-in h3 { font-size: 22px; font-weight: 800; }
.present-in p { opacity: 1; color: rgba(255, 255, 255, .92); font-size: 13px; max-width: 280px; margin-bottom: 8px; }
.cat-bars { display: grid; gap: 12px; }
.cat-bar { display: grid; grid-template-columns: 110px 1fr 26px; gap: 12px; align-items: center; font-size: 13px; font-weight: 600; }
.cat-bar i { height: 8px; border-radius: 4px; background: var(--chip); overflow: hidden; }
.cat-bar b { display: block; height: 100%; border-radius: 4px; background: var(--red); transform-origin: left; animation: grow 1.2s cubic-bezier(.2, .8, .2, 1) both; }
.cat-bar:nth-child(2n) b { background: var(--ink); }
.cat-bar em { font-style: normal; color: var(--muted); text-align: right; }
@keyframes grow { from { transform: scaleX(0); } }
.act-list { display: grid; gap: 4px; }
.act { display: flex; gap: 12px; align-items: flex-start; padding: 9px 8px; border-radius: 12px; transition: background .2s; }
.act:hover { background: var(--chip); }
.act div { display: grid; min-width: 0; }
.act b { font-size: 13px; font-weight: 600; }
.act small { font-size: 12px; color: var(--muted); }
.act-k { width: 10px; height: 10px; margin-top: 5px; flex: none; border-radius: 50%; background: var(--ink); }
.act-k.new { background: var(--red); }
.act-k.delete { background: var(--muted); }
.act-k.share { background: transparent; box-shadow: inset 0 0 0 2px var(--red); }
.act-k.copy { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); }

/* --- Riquadri a comparsa nella barra -------------------------------------------------------------- */
.pop { position: relative; }
.pop-box { position: absolute; top: 52px; right: 0; z-index: 90; width: 330px; padding: 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--sh-lg); }
.pop-box h4 { font-size: 14px; font-weight: 800; margin: 2px 6px 10px; }
.pref { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 6px; border-top: 1px solid var(--line); cursor: pointer; }
.pref span { display: grid; }
.pref b { font-size: 13px; }
.pref small { font-size: 12px; color: var(--muted); }

/* --- Editor ------------------------------------------------------------------------------------ */
.editor { display: grid; grid-template-columns: 420px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 24px; height: 100%; }
.editor > * { min-height: 0; }
.panel { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.panel-seg { margin: 20px 22px 4px; display: flex; }
.panel-seg .seg-i { flex: 1; justify-content: center; }
.panel-b { flex: 1; overflow: auto; padding: 4px 22px 32px; scrollbar-width: thin; }
.sec { padding: 22px 0; border-bottom: 1px solid var(--line); }
.sec:last-child { border-bottom: 0; }
.sec h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; color: var(--ink); margin-bottom: 14px; }
.sec-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0; border: 0; background: none; color: var(--ink); }
.sec-toggle h3 { margin: 0; }
.sec-toggle + .collapse { margin-top: 14px; }
.sec.shared { margin: 6px -10px; padding: 16px 10px; border-radius: 18px; background: var(--chip); border-bottom: 0; }
.note { color: var(--muted); font-size: 13px; margin-bottom: 12px; line-height: 1.5; }
.note.small { font-size: 12px; margin: -6px 0 10px; }
.presets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.preset { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); text-align: left; font-weight: 700; font-size: 13px; transition: transform .25s, box-shadow .25s, border-color .25s; }
.preset:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.preset.on { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.sw5 { display: flex; height: 28px; border-radius: 9px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.sw5 i { flex: 1; }
.fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.fields.colors { gap: 10px; }
.color { display: grid; grid-template-columns: 42px minmax(0, 1fr) 92px; align-items: center; gap: 12px; }
.color-sw { position: relative; width: 42px; height: 42px; border-radius: 13px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), var(--sh-sm); transition: transform .25s cubic-bezier(.5, 1.6, .4, 1); }
.color:hover .color-sw { transform: scale(1.08) rotate(-4deg); }
.color-sw input { position: absolute; inset: -10px; width: calc(100% + 20px); height: calc(100% + 20px); opacity: 0; cursor: pointer; }
.color-l { display: grid; min-width: 0; }
.color-l b { font-size: 13px; }
.color-l small { font-size: 11px; color: var(--muted); line-height: 1.35; }
.hex { height: 36px; width: 92px; padding: 0 9px; border: 1px solid var(--line); border-radius: 11px; background: var(--chip); color: var(--ink); font: 600 12px ui-monospace, Menlo, monospace; text-transform: uppercase; outline: 0; }
.hex:focus { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.range { display: grid; gap: 10px; }
.range > span { display: flex; justify-content: space-between; }
.range b { font-size: 13px; }
.range em { font-style: normal; font-weight: 800; font-size: 12px; color: var(--red); font-variant-numeric: tabular-nums; }
.range input { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--red) var(--p, 50%), var(--chip2) var(--p, 50%)); outline: 0; }
.range input::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 4px solid var(--red); box-shadow: 0 2px 8px rgba(0, 0, 0, .2); transition: transform .2s; cursor: grab; }
.range input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--red); }
.range input:hover::-webkit-slider-thumb { transform: scale(1.2); }
.range input:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.3); }
.upload { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.upload-l { display: grid; }
.upload-l b { font-size: 13px; }
.upload-l small { font-size: 11px; color: var(--muted); }
.upload-r { display: flex; align-items: center; gap: 6px; flex: none; }
.upload-r img { max-height: 36px; max-width: 110px; padding: 3px; border-radius: 8px; background: repeating-conic-gradient(var(--checker) 0 25%, transparent 0 50%) 0 0 / 10px 10px; }
.upload-r em { font-size: 12px; color: var(--muted); }
.upload .xbtn { cursor: pointer; }
.tpls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.tpl { display: grid; justify-items: center; gap: 6px; padding: 12px 6px 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); font-weight: 700; font-size: 12px; transition: transform .25s, box-shadow .25s, border-color .25s, background .25s; }
.tpl:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.tpl.on { border-color: var(--red); background: var(--red-soft); }
.tpl small { font-size: 11px; font-weight: 600; color: var(--muted); }
.tpl small.base { color: var(--red); }
.tpl-ic { width: 60px; height: 38px; padding: 3px; display: grid; gap: 3px; border: 1.5px solid var(--line2); border-radius: 7px; }
.tpl-ic i { border-radius: 3px; background: var(--chip2); transition: background .3s; }
.tl-single { grid-template-columns: 1fr; } .tl-single i + i { display: none; }
.tl-sport3 { grid-template-columns: 1fr 2.4fr 1.3fr; }
.tl-sport2 { grid-template-columns: 2.6fr 1.2fr; } .tl-sport2 i:nth-child(3) { display: none; }
.tl-side { grid-template-columns: 1fr 3fr; } .tl-side i:nth-child(3) { display: none; }
.tpl.on .tpl-ic i { background: rgba(227, 30, 36, .35); }
.tpl.on .tl-single i, .tpl.on .tl-sport3 i:nth-child(2), .tpl.on .tl-sport2 i:first-child, .tpl.on .tl-side i:nth-child(2) { background: var(--red); }
.insts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 10px; }
.inst { border: 1px solid var(--line); border-radius: 17px; background: var(--card); transition: border-color .2s, box-shadow .25s; }
.inst:hover { border-color: var(--line2); box-shadow: var(--sh-sm); }
.inst.sel { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.inst.off .inst-name { opacity: .5; }
.inst-h { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 12px; }
.inst-name { flex: 1; min-width: 0; display: grid; padding: 3px 0; border: 0; background: none; text-align: left; }
.inst-name b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inst-name small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inst-tools { display: flex; opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .2s; }
.inst:hover .inst-tools, .inst.open .inst-tools { opacity: 1; transform: none; }
.inst-tools .ibtn { width: 30px; height: 30px; border-radius: 9px; }
.inst-tools .dis { opacity: .25; pointer-events: none; }
.inst-chev { color: var(--muted); transition: transform .35s cubic-bezier(.5, 1.6, .4, 1); }
.inst-chev.up { transform: rotate(180deg); color: var(--red); }
.inst-b { padding: 6px 14px 16px; border-top: 1px solid var(--line); }
.desc { font-size: 13px; margin: 8px 0 8px; }
/* header e footer: vista desktop o mobile che si sta impostando */
.devsplit { margin: 10px 0 4px; padding: 12px; border-radius: 14px; background: var(--red-soft); border: 1px solid color-mix(in srgb, var(--red) 22%, transparent); }
.devsplit-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.devsplit-h > b { font-size: 13px; }
.devsplit-h .seg { background: var(--card); }
.devsplit-h .seg-thumb { background: var(--chip); box-shadow: none; }
.devsplit-h .seg-i { height: 30px; padding: 0 11px; }
.devsplit small { display: block; margin-top: 8px; font-size: 12px; line-height: 1.45; color: var(--ink2); }
.devsplit-copy { border: 0; background: none; padding: 0; color: var(--red); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.devsplit-copy:hover { color: var(--red2); }
.how-t { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--red); font-weight: 700; font-size: 12px; }
.how { margin-top: 8px; padding: 11px 13px; border-radius: 13px; background: var(--chip); color: var(--ink2); font-size: 12.5px; line-height: 1.55; }
.grp { margin-top: 18px; }
.grp h4 { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.vars { display: grid; gap: 6px; }
.var { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); text-align: left; transition: border-color .2s, background .2s, transform .2s; }
.var:hover { border-color: var(--line2); transform: translateX(2px); }
.var i { width: 16px; height: 16px; margin-top: 2px; flex: none; border-radius: 50%; border: 2px solid var(--line2); transition: border .25s cubic-bezier(.5, 1.6, .4, 1); }
.var span { display: grid; }
.var b { font-size: 13px; }
.var small { font-size: 11.5px; color: var(--muted); }
.var.on { border-color: var(--red); background: var(--red-soft); }
.var.on i { border: 5px solid var(--red); }
.feat { display: flex; align-items: flex-start; gap: 11px; padding: 7px 0; cursor: pointer; }
.feat span { display: grid; }
.feat b { font-size: 13px; font-weight: 600; }
.feat small { font-size: 11.5px; color: var(--muted); }
.formats { list-style: none; margin: 0; padding: 0; }
.formats li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.formats li:last-child { border-bottom: 0; }
.formats code { font: 11px ui-monospace, Menlo, monospace; padding: 3px 7px; border-radius: 7px; background: var(--chip); white-space: nowrap; }

/* anteprima */
.stage { display: flex; flex-direction: column; gap: 16px; padding: 18px; min-width: 0; min-height: 0; }
.stage-bar { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; min-width: 0; }
.stage-bar > * { flex: none; }
.stage-bar .sp { flex: 1; }
@media (max-width: 1680px) { .stage-bar .xbtn span:not(.ico), .stage-bar .seg-i:has(.ico) span:not(.ico) { display: none; } }
.dim { font: 600 12px ui-monospace, Menlo, monospace; color: var(--muted); padding: 0 6px; }
.frame { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.frame.is-desktop { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.frame-chrome { flex: none; display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; background: var(--chip); border-bottom: 1px solid var(--line); }
.frame-chrome i { width: 9px; height: 9px; border-radius: 50%; background: var(--line2); }
.frame-chrome i:first-child { background: var(--red); }
.frame-chrome span { margin-left: 10px; flex: 1; max-width: 440px; padding: 3px 12px; border-radius: 8px; background: var(--card); color: var(--muted); font-size: 11px; }
.frame-slot { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; }
.frame-slot.is-mobile { align-items: center; justify-content: center; }
.frame.is-mobile { --ps: 1; position: relative; flex: none; width: calc((var(--pw, 390px) + 24px) * var(--ps)); height: calc((var(--ph, 844px) + 24px) * var(--ps)); padding: calc(12px * var(--ps)); border-radius: calc(56px * var(--ps)); background: linear-gradient(145deg, #2a2a2f, #0b0b0d 40%); box-shadow: inset 0 0 0 calc(2px * var(--ps)) #3a3a40, inset 0 0 0 calc(5px * var(--ps)) #0b0b0d, 0 30px 60px rgba(0, 0, 0, .22), 0 6px 16px rgba(0, 0, 0, .12); }
/* tasti laterali del telefono */
.frame.is-mobile::before, .frame.is-mobile::after { content: ''; position: absolute; width: calc(3px * var(--ps)); border-radius: 2px; background: #2a2a2f; }
.frame.is-mobile::before { left: calc(-3px * var(--ps)); top: calc(160px * var(--ps)); height: calc(64px * var(--ps)); box-shadow: 0 calc(84px * var(--ps)) 0 #2a2a2f; }
.frame.is-mobile::after { right: calc(-3px * var(--ps)); top: calc(200px * var(--ps)); height: calc(96px * var(--ps)); }
.frame.is-mobile .frame-chrome { display: none; }
.frame.is-mobile .pv { border-radius: calc(44px * var(--ps)); }
.pv { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #fff; }
.pv-scroll { height: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; }
.pv-over { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 30; }
.pv-over.on { pointer-events: auto; }
.frame.is-mobile .pv-scroll { scrollbar-width: none; }
.pv .w { position: relative; }
.pv .w-hover, .pv .w-selected { outline: 3px solid var(--red); outline-offset: -3px; }
.pv .w-hover::after, .pv .w-selected::after { content: attr(data-name); position: absolute; top: 0; right: 0; z-index: 40; padding: 5px 12px; background: var(--red); color: #fff; font: 800 13px 'Plus Jakarta Sans', system-ui, sans-serif; border-radius: 0 0 0 10px; pointer-events: none; }
.pv.picking .w { cursor: crosshair; }
.pv.picking .w > * { pointer-events: none; }
.pv.picking .w:hover { outline: 3px dashed var(--red); outline-offset: -3px; }
.pv.picking .w:hover::after { content: 'Apri «' attr(data-name) '»'; position: absolute; top: 0; right: 0; z-index: 40; padding: 5px 12px; background: var(--red); color: #fff; font: 800 13px 'Plus Jakarta Sans', system-ui, sans-serif; border-radius: 0 0 0 10px; }
.pv.loupe .pv-scroll .w { cursor: zoom-in; }
.pv.loupe .pv-scroll .w > * { pointer-events: none; }
.pv.loupe .pv-scroll .w:hover { outline: 3px solid var(--red); outline-offset: -3px; }
.pv.loupe .pv-scroll .w:hover::after { content: var(--lens-t, 'Ingrandisci') ' «' attr(data-name) '»'; position: absolute; top: 0; right: 0; z-index: 40; padding: 5px 12px; background: var(--red); color: #fff; font: 800 13px 'Plus Jakarta Sans', system-ui, sans-serif; border-radius: 0 0 0 10px; }
/* Lente: il widget ingrandito sopra l'anteprima; il pannello a sinistra resta usabile */
.pv-lens { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; background: rgba(14, 14, 18, .72); backdrop-filter: blur(6px); }
.pv-lens[hidden] { display: none; }
.pv-lens-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: #fff; font: 600 13px 'Plus Jakarta Sans', system-ui, sans-serif; flex-wrap: wrap; }
.pv-lens-n { font-weight: 800; font-size: 14px; margin-right: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pv-lens-c { color: rgba(255, 255, 255, .6); font-variant-numeric: tabular-nums; margin-right: auto; }
.pv-lens-zs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.pv-lens-b { min-width: 34px; height: 30px; padding: 0 11px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; font: 700 12.5px 'Plus Jakarta Sans', system-ui, sans-serif; cursor: pointer; transition: background .15s; }
.pv-lens-zs .pv-lens-b { background: transparent; height: 26px; }
.pv-lens-b:hover:not(:disabled) { background: rgba(255, 255, 255, .24); }
.pv-lens-b.on { background: #fff; color: #111; }
.pv-lens-b:disabled { opacity: .35; cursor: default; }
.pv-lens-b:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pv-lens-x { font-size: 14px; }
.pv-lens-stage { flex: 1; min-height: 0; overflow: auto; display: grid; place-items: center; padding: 28px; cursor: zoom-out; overscroll-behavior: contain; }
.pv-lens-stage.pan { place-items: start; }
.pv-lens-stage.pan .pv-lens-fit { margin: 0 auto; }
.pv-lens-fit { cursor: auto; border-radius: 6px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .08); overflow: hidden; }

/* testata dell'editor: configurazione aperta, cliente e stato del salvataggio */
.ed-head { display: flex; align-items: center; gap: 10px; min-width: 0; margin-bottom: -4px; }
.ed-head > * { flex: none; }
.ed-head .sp { flex: 1; }
.eh-id { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; flex: 0 1 auto; max-width: 46%; padding: 6px 10px; margin-left: -10px; border: 0; border-radius: 11px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background .2s; }
.eh-id small { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.eh-id b { font-size: 17px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.eh-id .ico { align-self: center; color: var(--muted); opacity: .55; transition: opacity .2s, color .2s; }
button.eh-id:hover { background: var(--chip); }
button.eh-id:hover .ico, button.eh-id:focus-visible .ico { opacity: 1; color: var(--red); }
div.eh-id { cursor: default; }
.eh-client { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 9px; background: var(--chip); color: var(--ink); font-size: 12.5px; font-weight: 700; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.eh-client.is-empty { border: 1px dashed var(--line2); background: none; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.eh-client.is-empty:hover { color: var(--red); border-color: var(--red); }
.eh-save { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.eh-save i { width: 8px; height: 8px; border-radius: 50%; background: #22a35a; box-shadow: 0 0 0 3px rgba(34, 163, 90, .16); }
.eh-save.is-saving i { background: #f5a524; box-shadow: 0 0 0 3px rgba(245, 165, 36, .18); animation: eh-pulse 1s ease-in-out infinite alternate; }
@keyframes eh-pulse { to { opacity: .35; } }
.eh-save.is-error { color: var(--red); }
.eh-save.is-error i { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.eh-retry { margin-left: 2px; padding: 3px 9px; border: 0; border-radius: 8px; background: var(--red); color: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.eh-form { display: grid; gap: 14px; }
.eh-note { font-size: 12.5px; margin: 0; }
@media (max-width: 1440px) { .eh-id small { display: none; } }
@media (max-width: 760px) { .ed-head { flex-wrap: wrap; } .eh-id { max-width: 100%; } .ed-head .xbtn span:not(.ico) { display: none; } }
@media (prefers-reduced-motion: reduce) { .eh-save.is-saving i { animation: none; } }

/* righello: misure di qualsiasi elemento, disegnate fuori dal sito zoomato perché restino leggibili */
.pv-meas { position: absolute; inset: 0; z-index: 36; pointer-events: none; overflow: hidden; --ms: #ff2d55; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
.pv.measuring, .pv.measuring * { cursor: crosshair !important; }
.ms-box { position: absolute; box-sizing: border-box; }
.ms-box.is-hover { outline: 1.5px dashed var(--ms); outline-offset: 0; }
.ms-box.is-pin { outline: 2px solid var(--ms); background: rgba(255, 45, 85, .08); }
.ms-tag, .ms-dist { position: absolute; padding: 4px 8px; border-radius: 7px; background: var(--ms); color: #fff; font-size: 13px; font-weight: 800; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; box-shadow: 0 4px 14px rgba(0, 0, 0, .22); }
.ms-tag.is-hover { background: #1d1d22; }
.ms-dist { transform: translate(-50%, -50%); font-size: 12px; padding: 3px 7px; border: 2px solid #fff; }
.ms-line { position: absolute; background: var(--ms); }
.ms-line.hz { height: 1.5px; margin-top: -.75px; }
.ms-line.vt { width: 1.5px; margin-left: -.75px; }
.ms-line.hz::before, .ms-line.hz::after, .ms-line.vt::before, .ms-line.vt::after { content: ''; position: absolute; background: var(--ms); }
.ms-line.hz::before, .ms-line.hz::after { top: -4px; width: 1.5px; height: 9px; }
.ms-line.hz::before { left: 0; } .ms-line.hz::after { right: 0; }
.ms-line.vt::before, .ms-line.vt::after { left: -4px; height: 1.5px; width: 9px; }
.ms-line.vt::before { top: 0; } .ms-line.vt::after { bottom: 0; }
.ms-card { position: absolute; left: 12px; bottom: 12px; min-width: 230px; max-width: calc(100% - 24px); padding: 12px 40px 12px 14px; border-radius: 14px; background: rgba(20, 20, 24, .94); color: #fff; box-shadow: 0 14px 40px rgba(0, 0, 0, .35); pointer-events: auto; }
.ms-card small { display: block; margin-bottom: 6px; font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-card dl { display: grid; grid-template-columns: auto auto; gap: 5px 16px; margin: 0; }
.ms-card dt { font-size: 12.5px; color: rgba(255, 255, 255, .65); }
.ms-card dd { margin: 0; font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ms-x { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 17px; line-height: 1; }
.pv.measuring .ms-card { cursor: default !important; }
.pv.measuring .ms-x { cursor: pointer !important; }
.ms-x:hover { background: var(--ms); }
.ms-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); max-width: calc(100% - 24px); margin: 0; padding: 8px 14px; border-radius: 11px; background: rgba(20, 20, 24, .9); color: #fff; font-size: 12.5px; font-weight: 600; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.frame.is-mobile .ms-card { left: 8px; right: 8px; bottom: 26px; min-width: 0; }
.frame.is-mobile .ms-hint { bottom: 26px; font-size: 11.5px; }

/* --- Catalogo ed esporta ------------------------------------------------------------------------ */
.catalog, .exporter { padding-top: 6px; }
.cat-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.cat-top h1 { font-size: 32px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; }
.cat-top p { color: var(--muted); }
.cat-seg { display: flex; width: max-content; max-width: 100%; }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 18px; }
.wcard { position: relative; display: grid; gap: 8px; align-content: start; padding: 18px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); text-align: left; transition: transform .3s, box-shadow .3s, border-color .3s; }
.wcard:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: var(--line2); }
.wc-cat { font-size: 12px; font-weight: 700; color: var(--red); }
.wcard b { font-size: 16px; padding-right: 26px; }
.wcard p { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wc-meta, .wc-pages { display: flex; gap: 6px; flex-wrap: wrap; }
.wc-meta em { font-style: normal; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; background: var(--chip); }
.wc-pages i { font-style: normal; font-size: 11px; padding: 2px 9px; border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line2); color: var(--muted); }
.wc-go { position: absolute; top: 18px; right: 16px; opacity: 0; transform: translateX(-6px); color: var(--red); transition: opacity .25s, transform .25s; }
.wcard:hover .wc-go { opacity: 1; transform: none; }
.ex-sec { margin: 22px 2px 12px; font-size: 13px; font-weight: 800; letter-spacing: .02em; color: var(--muted); }
.ex-sec:first-of-type { margin-top: 6px; }
/* tre card per riga: in alto quello che si manda (con la foto), sotto gli strumenti (compatti) */
.ex-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ex { display: flex; flex-direction: column; gap: 8px; padding: 20px; }
.ex-photo { height: 128px; margin: -6px -6px 6px; }
.ex:hover .ex-photo img { transform: scale(1.05); }
.exp-h { display: flex; align-items: center; gap: 12px; }
.ex-ic { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--chip); }
.ex-ic.red { background: var(--red-soft); color: var(--red); }
.ex h3 { font-size: 18px; font-weight: 800; }
.ex p { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0 0 4px; }
.ex-foot { margin-top: auto; display: grid; gap: 10px; padding-top: 6px; }
.ex-foot > .xbtn { justify-self: start; }
.ex-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.ex-btns .xbtn { cursor: pointer; }
.ex-link { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--chip); color: var(--ink); font-size: 12px; }
.ex.focus { box-shadow: 0 0 0 3px var(--red); }
.ex-mini { padding: 18px 20px; }
.ex-fp-how { margin-top: 2px; }
.ex-fp-how summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--muted); width: max-content; }
.ex-fp-how summary:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
.ex-fp-how ol { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
@media (max-width: 1280px) { .ex-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .ex-row { grid-template-columns: minmax(0, 1fr); } }

/* --- Finestre, palette, avvisi ------------------------------------------------------------------ */
.xmodal-bg { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; background: rgba(8, 8, 10, .45); backdrop-filter: blur(8px); }
.xmodal { width: min(480px, 100%); max-height: 90vh; overflow: auto; padding: 22px 24px 24px; border-radius: 26px; background: var(--card); color: var(--ink); box-shadow: var(--sh-lg); border: 1px solid var(--line); font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif; }
.xmodal.wide { width: min(780px, 100%); }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.modal-h h3 { font-size: 21px; font-weight: 800; }
.modal-p { color: var(--muted); }
.xmodal .xfield + .xfield { margin-top: 12px; }
.modal-f { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
/* Importa da Figma (pannello Skin) */
.fi-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px dashed var(--line2); background: var(--chip); margin-bottom: 10px; }
.fi-cta span { display: grid; gap: 2px; min-width: 0; }
.fi-cta b { font-size: 13.5px; font-weight: 800; }
.fi-cta small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.fi-load { display: grid; gap: 12px; }
.fi-paste { width: 100%; min-height: 140px; resize: vertical; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--chip); color: var(--ink); font: 12px/1.45 ui-monospace, Menlo, monospace; word-break: break-all; }
.fi-paste:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.fi-load-f { margin-top: 0; justify-content: space-between; }
.fi-err { color: var(--red); font-size: 13px; font-weight: 600; }
.fi-rev { display: grid; gap: 12px; }
.fi-sec { display: grid; gap: 10px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); transition: opacity .2s; }
.fi-sec.off { opacity: .55; }
.fi-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fi-h b { font-size: 14px; font-weight: 800; }
.fi-note { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.fi-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.fi-roles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fi-sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); flex: none; }
.fi-opt { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fi-chk { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.fi-prev { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 700; }
.fi-prev span { margin: 0 4px 0 8px; }
.fi-prev span:first-child { margin-left: 0; }
.fi-prev .fi-sw { width: 20px; height: 20px; border-radius: 6px; }
.fi-imgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fi-img { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; background: var(--chip); transition: opacity .2s; }
.fi-img.off { opacity: .55; }
.fi-img > img { width: 76px; height: 54px; object-fit: cover; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); background: var(--line); }
.fi-img-t { display: grid; gap: 2px; min-width: 0; }
.fi-img-t b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fi-img-t small { color: var(--muted); font-size: 12px; line-height: 1.45; }
@media (max-width: 560px) { .fi-img { grid-template-columns: 60px minmax(0, 1fr) auto; } .fi-img > img { width: 60px; height: 44px; } }
.fi-logo { display: flex; align-items: center; gap: 12px; }
.fi-logo img { max-height: 48px; max-width: 220px; padding: 8px; border-radius: 10px; background: repeating-conic-gradient(rgba(0, 0, 0, .06) 0 25%, transparent 0 50%) 0 0 / 12px 12px; }
.fi-logo small { color: var(--muted); font-size: 12px; }
@media (max-width: 760px) { .fi-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .fi-roles, .fi-roles-2 { grid-template-columns: minmax(0, 1fr); } .fi-cta { flex-wrap: wrap; } }
.wm { display: grid; gap: 16px; }
.wm-desc { font-size: 15px; }
.wm-how { display: flex; gap: 10px; padding: 13px 15px; border-radius: 15px; background: var(--chip); color: var(--ink2); font-size: 13px; line-height: 1.55; }
.wm-how .ico { color: var(--red); margin-top: 2px; }
.wm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.wm h4 { font-size: 13px; font-weight: 800; color: var(--ink); margin: 0 0 8px; }
.wm-i { padding: 8px 0; border-bottom: 1px solid var(--line); display: grid; }
.wm-i b { font-size: 13px; }
.wm-i small { font-size: 12px; color: var(--muted); }
.toasts { position: fixed; bottom: 26px; left: 16px; right: 16px; z-index: 400; display: grid; gap: 8px; justify-items: center; pointer-events: none; font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif; }
.xtoast { display: flex; align-items: center; gap: 10px; max-width: min(620px, 100%); line-height: 1.35; padding: 12px 18px; border-radius: 15px; background: var(--solid); color: var(--on-solid); font-weight: 700; font-size: 13px; box-shadow: var(--sh-lg); }
.xtoast-ok .ico { color: var(--red); }
.xtoast-warn { background: var(--red); color: #fff; }

/* --- Intro e presentazione ---------------------------------------------------------------------- */
.intro { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; background: radial-gradient(110% 85% at 50% 50%, #16151a 0%, #0b0b0d 60%, #050506 100%); color: #fff; cursor: pointer; overflow: hidden; }
.intro-in { position: relative; display: grid; place-items: center; width: min(240px, 60vw); aspect-ratio: 1; }
.intro-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ir-tick { stroke: rgba(255, 255, 255, .14); stroke-width: 1.4; stroke-linecap: round; transition: stroke .25s, filter .25s; }
.ir-tick.on { stroke: #ff6b61; filter: drop-shadow(0 0 2px rgba(227, 30, 36, .9)); }
.ir-trk { fill: none; stroke: rgba(255, 255, 255, .07); stroke-width: 6; }
.ir-spin { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 1; stroke-dasharray: 2 7; }
.ir-arc { fill: none; stroke: url(#irg); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: 100; filter: drop-shadow(0 0 6px rgba(227, 30, 36, .55)); }
.ir-tail { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; opacity: .55; filter: blur(1.5px); }
.ir-head { fill: #fff; filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 12px #e31e24); }
.ir-flash { fill: none; stroke: #fff; stroke-width: 10; opacity: 0; filter: blur(4px); }
.intro-pct { position: relative; display: flex; align-items: flex-start; justify-content: center; font: 200 46px/1 'Plus Jakarta Sans', system-ui, sans-serif; font-variant-numeric: tabular-nums; }
/* numero e % centrati insieme nell'anello, come un unico blocco */
.intro-pct b { display: block; font-weight: 200; }
.intro-pct small { margin: .2em 0 0 2px; font-size: 15px; font-weight: 300; line-height: 1; color: #ff6b61; }
.intro-skip { position: absolute; bottom: 28px; font-size: 12px; opacity: .45; }
.present-layer { position: fixed; inset: 0; z-index: 450; display: flex; flex-direction: column; background: var(--shell); }
.present-bar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px; border-bottom: 1px solid var(--line); }
.present-bar { flex-wrap: wrap; }
.present-body { flex: 1; min-height: 0; display: flex; }
.present-stage { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; justify-content: center; }
.pv-present { width: 100%; height: 100%; }
.present-stage.is-mobile { align-items: center; }
.present-stage.is-mobile .pv-present { height: min(calc(var(--ph) * 1px + 24px), calc(100% - 24px)); width: auto; aspect-ratio: var(--par, 414 / 868); border-radius: 52px; border: 12px solid #0b0b0d; box-shadow: var(--sh-lg); }
.boot-error { margin: 15vh auto; max-width: 460px; padding: 28px; border-radius: 22px; background: #fff; color: #111; font-family: system-ui, sans-serif; box-shadow: 0 20px 60px rgba(0, 0, 0, .15); }
.boot-error b { color: #e31e24; font-size: 18px; }

/* --- Modalità demo (solo sito) ------------------------------------------------------------------ */
.mode-demo .pv-full { height: 100vh; }
.mode-demo .pv-over { position: fixed; }

/* --- Schermi più stretti ------------------------------------------------------------------------- */
@media (max-width: 1680px) {
  .top-proj { display: none; }
  .theme-seg .seg-i span:not(.ico) { display: none; }
  .top-r { gap: 10px; }
}
@media (max-width: 1440px) {
  .hello { grid-column: span 12; }
  .new-card, .quick { grid-column: span 3; min-height: 200px; }
  .new-card { grid-column: span 4; }
  .qacc { grid-column: span 8; }
  .editor { grid-template-columns: 360px minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .top .xbtn span:not(.ico), .theme-seg .seg-i span:not(.ico) { display: none; }
  .top { gap: 18px; }
}
@media (prefers-reduced-motion: reduce) { .cat-bar b, .top-proj i { animation: none; } .photo img { transition: none; } }

/* --- Accesso ------------------------------------------------------------------------------------ */
.auth { position: relative; isolation: isolate; height: 100vh; height: 100dvh; display: grid; justify-items: center; align-items: safe center; padding: 28px 16px; overflow: hidden auto; background: #000; color: var(--ink); scrollbar-width: thin; scrollbar-color: #333 #000; }
@media (max-height: 780px) { .auth { padding: 20px 16px; } .auth-card { padding: 26px 28px 22px; } .auth-logo { margin-bottom: 14px; } .auth-form { gap: 10px; } }
.auth.building .auth-card { pointer-events: none; }
.auth-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; display: block; filter: blur(2.4px); opacity: .75; pointer-events: none; }
.auth::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(60% 55% at 50% 50%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .7)); }
.auth-logo { display: block; width: 84px; margin-bottom: 18px; }
.auth-logo img { display: block; width: 100%; height: auto; }
.auth-card { position: relative; width: min(420px, 100%); padding: 32px 32px 28px; border-radius: 26px; background: var(--card); border: 1px solid rgba(255, 255, 255, .08); }
.auth-lang { position: absolute; top: 66px; right: 32px; z-index: 2; }
.auth-lang .seg-i { height: 30px; padding: 0 11px; font-size: 12px; }
.auth-box { width: 100%; }
.auth-box h1 { font-size: 24px; font-weight: 800; letter-spacing: -.025em; margin-bottom: 18px; padding-right: 92px; }
.auth-form { display: grid; gap: 13px; }
.auth-form h1 { margin-bottom: 0; }
.auth-tag { margin: -6px 0 8px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.auth-p { color: var(--muted); margin: -4px 0 6px; line-height: 1.5; }
.auth-in { position: relative; display: block; }
.auth-in input { width: 100%; height: 44px; font-size: 15px; padding-right: 46px; }
.auth-eye { position: absolute; right: 4px; top: 3px; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 11px; background: none; color: var(--muted); }
.auth-eye:hover { background: var(--chip2); color: var(--ink); }
.auth-f.bad input { border-color: var(--red); }
.auth-err { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 13px; background: var(--red-soft); color: var(--red); font-weight: 700; font-size: 13px; }
.auth-hint { color: var(--muted); font-size: 12px; margin-top: -8px; }
.auth-go { width: 100%; height: 52px; justify-content: center; font-size: 15px; margin-top: 6px; }
.auth-btns { display: flex; gap: 10px; margin-top: 4px; }
.auth-note { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--chip); color: var(--ink2); font-size: 13px; line-height: 1.5; margin-bottom: 18px; }
.auth-note .ico { color: var(--red); margin-top: 2px; }
.auth-note b { display: block; color: var(--ink); margin-bottom: 2px; }
.auth-note.wide { margin-bottom: 20px; }
.auth-roles { display: grid; gap: 10px; }
.auth-role { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); text-align: left; transition: border-color .2s, transform .25s, box-shadow .25s; }
.auth-role:hover { border-color: var(--red); transform: translateY(-2px); box-shadow: var(--sh); }
.auth-role:hover .ar-go { color: var(--red); transform: translateX(3px); }
.ar-go { color: var(--muted); transition: transform .25s, color .2s; }
.ar-t { flex: 1; display: grid; gap: 2px; min-width: 0; }
.ar-t b { font-size: 15px; }
.ar-t small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.ar-ic { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--chip); color: var(--ink); }
.ar-ic.r-master, .u-av.r-master, .avatar.r-master { background: var(--red); color: #fff; }
.ar-ic.r-editor, .u-av.r-editor, .avatar.r-editor { background: var(--solid); color: var(--on-solid); }
.ar-ic.r-client, .u-av.r-client, .avatar.r-client { background: var(--chip2); color: var(--ink); }
.auth-wait { height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; background: var(--bg); color: var(--muted); }
.auth-wait img { width: 140px; }
.auth-wait i { width: 120px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--red), transparent) 0 0 / 50% 100% no-repeat, var(--chip2); animation: wait 1.1s ease-in-out infinite; }
@keyframes wait { from { background-position: -60px 0, 0 0; } to { background-position: 180px 0, 0 0; } }
.auth-modal .xmodal { width: min(460px, 100%); padding: 28px; }
.auth-modal .auth-box h1, .auth-modal h1 { font-size: 24px; }
@media (max-width: 560px) { .auth { padding: 20px 12px; } .auth-card { padding: 26px 20px 22px; } .auth-lang { right: 20px; } }

/* --- Utente, modalità, aiuto -------------------------------------------------------------------- */
.avatar { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 14px; font-weight: 800; font-size: 15px; transition: transform .25s, box-shadow .25s; }
.avatar:hover, .avatar.on { transform: translateY(-1px); box-shadow: 0 0 0 4px var(--red-soft); }
.avatar.big { width: 46px; height: 46px; font-size: 17px; cursor: default; }
.user-box { width: 290px; }
.ub-h { display: flex; gap: 12px; align-items: center; padding: 4px 6px 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.ub-h b { display: block; font-size: 15px; }
.ub-h small { color: var(--muted); font-size: 12px; }
.ub-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 6px; }
.ub-row > span { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.ub-i { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 8px; border: 0; border-radius: 12px; background: none; font-weight: 600; text-align: left; }
.ub-i:hover { background: var(--chip); }
.ub-i:last-child:hover { color: var(--red); }
.top-mode { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 11px; border: 1px dashed var(--line2); color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.top-mode i { width: 7px; height: 7px; border-radius: 50%; background: #f5a524; }
.ghint { display: inline-flex; align-items: center; gap: 6px; height: 38px; min-width: 38px; justify-content: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--muted); font-size: 12px; font-weight: 700; transition: color .2s, border-color .2s, transform .25s; }
.ghint:hover { color: var(--red); border-color: var(--red); transform: rotate(-8deg); }
.inst-b .ghint, .how-row .ghint { height: 28px; min-width: 28px; padding: 0 6px; border-radius: 9px; }
.how-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cat-top-r { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ex-pick { align-items: flex-end; }
.ex-pick .sel { width: min(320px, 70vw); }
.ex-cur { color: var(--muted); }
.panel-top { display: flex; align-items: center; gap: 10px; margin: 20px 22px 4px; }
.panel-top .panel-seg { margin: 0; flex: 1; }
.ro-note { display: flex; align-items: center; gap: 8px; margin: 10px 22px 0; padding: 10px 12px; border-radius: 12px; background: var(--chip); color: var(--ink2); font-size: 12px; font-weight: 600; line-height: 1.4; }
.ro-note .ico { color: var(--red); }
.panel-b.is-ro { opacity: .72; }
.empty.big { min-height: 60vh; align-content: center; }
.empty-img { width: 260px; height: 170px; object-fit: cover; border-radius: 22px; margin-bottom: 6px; }

/* --- Utenti ------------------------------------------------------------------------------------- */
.users { padding-top: 6px; }
.users-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.users-list { display: grid; gap: 4px; padding-bottom: 14px; }
.urow { display: flex; align-items: center; gap: 14px; padding: 12px 10px; border-radius: 18px; transition: background .2s; }
.urow:hover { background: var(--chip); }
.u-av { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; font-weight: 800; }
.u-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.u-t b { font-size: 15px; }
.u-t small { color: var(--muted); font-size: 12px; }
.u-you { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--red-soft); color: var(--red); margin-left: 4px; }
.u-warn { color: #c77a00; font-weight: 700; }
:root[data-theme="dark"] .u-warn { color: #f5a524; }
.u-role { width: 150px; }
.users-roles { display: grid; gap: 14px; }
.role-i { display: flex; gap: 12px; align-items: flex-start; }
.role-i b { display: block; margin-bottom: 2px; }
.role-i small { color: var(--muted); line-height: 1.45; }
.users-roles .note.small { margin: 6px 0 0; }
.temp { display: grid; gap: 12px; padding: 16px; border-radius: 18px; background: var(--chip); margin-bottom: 14px; }
.temp > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.temp small { width: 140px; color: var(--muted); font-weight: 700; font-size: 12px; }
.temp b { font-size: 15px; }
.temp-pw { font: 700 16px ui-monospace, Menlo, monospace; letter-spacing: .02em; padding: 6px 10px; border-radius: 10px; background: var(--card); border: 1px dashed var(--line2); user-select: all; }
@media (max-width: 1100px) { .users-grid { grid-template-columns: 1fr; } }

/* --- Guida -------------------------------------------------------------------------------------- */
.guide { padding-top: 6px; }
.guide-grid { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 24px; align-items: start; }
.guide-nav { position: sticky; top: 0; display: grid; gap: 4px; padding: 10px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); }
.gn-i { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 14px; background: none; text-align: left; font-weight: 600; transition: background .2s, color .2s; }
.gn-i span:not(.ico) { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gn-i em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); padding: 2px 8px; border-radius: 8px; background: var(--chip); }
.gn-i:hover { background: var(--chip); }
.gn-i.on { background: var(--solid); color: var(--on-solid); }
.gn-i.on em { background: var(--red); color: #fff; }
.gfaq { display: grid; gap: 0; padding: 8px 26px; }
.gfaq-modal { padding: 0; margin-bottom: 8px; }
.gfaq-i { border-bottom: 1px solid var(--line); }
.gfaq-i:last-child { border-bottom: 0; }
.gfaq-q { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px 0; border: 0; background: none; text-align: left; font-size: 15px; font-weight: 700; }
.gfaq-q > span:first-child { flex: 1; min-width: 0; }
.gfaq-q .gfaq-chev { flex: none; margin-left: auto; }
.gfaq-q:hover { color: var(--red); }
.gfaq-chev { color: var(--muted); transition: transform .3s, color .2s; }
.gfaq-i.open .gfaq-chev { transform: rotate(180deg); color: var(--red); }
.gfaq-a { padding: 0 34px 18px 0; color: var(--ink2); line-height: 1.65; max-width: 72ch; }
@media (max-width: 1000px) { .guide-grid { grid-template-columns: 1fr; } .guide-nav { position: static; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }
@media (max-width: 1680px) { .top-mode { width: 34px; padding: 0; justify-content: center; font-size: 0; gap: 0; } }

/* --- Sciame di agenti (intro dell'accesso) ------------------------------------------------------ */
.auth { position: relative; }
.swarm { position: absolute; inset: 0; z-index: 50; pointer-events: none; overflow: hidden; }
.agent { position: absolute; left: 0; top: 0; display: flex; align-items: flex-start; gap: 2px; will-change: transform; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .25)); }
.agent svg { display: block; }
.agent span { margin-top: 16px; padding: 3px 8px; border-radius: 7px; font: 700 11px/1.3 'Plus Jakarta Sans', system-ui, sans-serif; white-space: nowrap; }
.sel-box { position: absolute; border: 1.5px solid var(--red); background: rgba(227, 30, 36, .06); border-radius: 4px; }
.sel-box i { position: absolute; width: 7px; height: 7px; background: #fff; border: 1.5px solid var(--red); border-radius: 2px; }
.sel-box i:nth-child(1) { left: -4px; top: -4px; } .sel-box i:nth-child(2) { right: -4px; top: -4px; } .sel-box i:nth-child(3) { left: -4px; bottom: -4px; } .sel-box i:nth-child(4) { right: -4px; bottom: -4px; }
.sel-box em { position: absolute; left: 50%; bottom: -24px; transform: translateX(-50%); padding: 2px 7px; border-radius: 6px; background: var(--red); color: #fff; font: 700 10px/1.4 ui-monospace, Menlo, monospace; font-style: normal; white-space: nowrap; }
.swarm-skip { position: absolute; right: 24px; bottom: 22px; pointer-events: auto; height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); color: var(--muted); font-weight: 700; font-size: 12px; cursor: pointer; }
.swarm-skip:hover { color: var(--red); border-color: var(--red); }

/* --- Modulo di accesso: link, autenticatore, robustezza -------------------------------------------- */
.auth-links { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-link { padding: 0; border: 0; background: none; color: var(--red); font-weight: 700; font-size: 13px; cursor: pointer; justify-self: start; }
.auth-link:hover { text-decoration: underline; }
.auth-lock { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.auth-quick { display: grid; gap: 10px; padding: 14px 16px; border-radius: 16px; border: 1px dashed var(--line2); }
.auth-quick small { color: var(--muted); line-height: 1.5; }
.aq-row { display: flex; gap: 8px; flex-wrap: wrap; }
.aq { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 5px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: 13px; transition: border-color .2s, transform .2s; }
.aq:hover { border-color: var(--red); transform: translateY(-1px); }
.aq .ar-ic { width: 26px; height: 26px; border-radius: 8px; }
.otp { display: grid; gap: 8px; }
.otp-l { font-size: 12px; font-weight: 700; color: var(--muted); }
.otp-box { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp-box i { height: 58px; display: grid; place-items: center; border-radius: 14px; border: 1px solid var(--line); background: var(--chip); font: 800 24px/1 'Plus Jakarta Sans', system-ui, sans-serif; font-style: normal; color: var(--ink); transition: border-color .2s, background .2s, transform .2s; }
.otp-box i.on { background: var(--card); border-color: var(--line2); }
.otp-box input:focus ~ i.cur, .otp-box:focus-within i.cur { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); background: var(--card); }
.otp-box input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; cursor: text; }
.otp.bad i { border-color: var(--red); }
.mfa-set { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 18px; align-items: center; padding: 16px; border-radius: 18px; background: var(--chip); }
.qr { width: 148px; height: 148px; display: grid; place-items: center; padding: 8px; border-radius: 14px; background: #fff; }
.qr img, .qr-svg { width: 100%; height: 100%; display: block; }
.qr-wait { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--red); animation: spin .8s linear infinite; display: block; margin: 12px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.mfa-steps { display: grid; gap: 8px; font-size: 13px; color: var(--ink2); line-height: 1.45; }
.mfa-steps p { display: flex; gap: 10px; align-items: flex-start; }
.mfa-steps p b { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: var(--solid); color: var(--on-solid); font-size: 11px; }
.mfa-key { color: var(--muted); font-size: 12px; }
.mfa-key code { display: inline-block; margin-top: 4px; padding: 4px 8px; border-radius: 8px; background: var(--card); color: var(--ink); font: 700 12px ui-monospace, Menlo, monospace; letter-spacing: .04em; word-break: break-all; user-select: all; }
.meter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 6px; align-items: center; margin-top: -4px; }
.meter i { height: 5px; border-radius: 3px; background: var(--chip2); transition: background .3s; }
.meter small { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 600; min-width: 120px; }
.meter.lv1 i:nth-child(1) { background: var(--red); }
.meter.lv2 i:nth-child(-n+2) { background: #f5a524; }
.meter.lv3 i { background: #1db954; }
@media (max-width: 560px) { .mfa-set { grid-template-columns: 1fr; justify-items: center; } .otp-box i { height: 50px; font-size: 20px; } }

/* --- Utenti, condivisione, cronologia ------------------------------------------------------------- */
.u-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.u-tags em { display: inline-flex; align-items: center; gap: 4px; font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 7px; background: var(--chip2); color: var(--muted); }
.u-tags em.ok { background: rgba(29, 185, 84, .14); color: #138a3d; }
.u-tags em.warn { background: rgba(245, 165, 36, .16); color: #a76400; }
:root[data-theme="dark"] .u-tags em.ok { color: #4ade80; }
:root[data-theme="dark"] .u-tags em.warn { color: #f5a524; }
.shared-tag { display: inline-flex; align-items: center; gap: 4px; color: var(--red); font-weight: 700; }
.vis-tag { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.vis-tag.is-priv { color: var(--ink-2, inherit); }
.share-list { display: grid; gap: 6px; max-height: 50vh; overflow: auto; margin: 6px 0 4px; }
.share-i { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; cursor: pointer; }
.share-i:hover { background: var(--chip); }

.proj-b .xbtn { margin-top: 10px; }
.hist { position: relative; display: grid; gap: 2px; max-height: 56vh; overflow: auto; margin-top: 6px; }
.hist-i { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 8px; border-radius: 14px; }
.hist-i:hover { background: var(--chip); }
.hist-i + .hist-i::before { content: ''; position: absolute; left: 18px; top: -10px; height: 22px; width: 2px; background: var(--line2); }
.hist-dot { width: 12px; height: 12px; margin: 4px 0 0 4px; border-radius: 50%; border: 2px solid var(--line2); background: var(--card); }
.hist-dot.on { border-color: var(--red); background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.hist-t b { display: block; font-size: 14px; }
.hist-t small { color: var(--muted); font-size: 12px; }
.hist-a { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.hist-edit { display: flex; gap: 8px; margin-top: 8px; }
.hist-edit .ex-link { flex: 1; height: 36px; }
.hist-ask { margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: var(--red-soft); }
.hist-ask p { font-weight: 600; }


/* --- Bacheca della dashboard: blocchi uguali, spostabili e sostituibili ------------------------------ */
.board { display: grid; gap: 16px; }
.board-h { display: flex; align-items: center; gap: 10px; }
.board-h h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.board-tip { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--red-soft); color: var(--ink2); font-size: 13px; font-weight: 600; }
.board-tip .ico { color: var(--red); }
.board-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 420px; gap: 24px; }
.dtile { position: relative; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.dtile.w2 { grid-column: span 2; }
.dtile-in { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.dtile-scroll { flex: 1; min-height: 0; overflow: auto; margin: 0 -8px; padding: 0 8px 4px; scrollbar-width: thin; }
.dtile-foot { margin-top: auto; padding-top: 12px; }
.dtile .proj-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.dtile .stat-row { margin-bottom: 0; }
.board.editing .dtile { cursor: grab; outline: 2px dashed var(--line2); outline-offset: -2px; }
.board.editing .dtile-in { opacity: .55; filter: saturate(.6); pointer-events: none; }
.board.editing .dtile-present .dtile-in { opacity: .7; }
.dtile.dragging { opacity: .4; }
.dtile.drop { outline: 2px solid var(--red) !important; box-shadow: 0 0 0 6px var(--red-soft); }
.dtile-tools { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 16px; background: var(--card); color: var(--ink); box-shadow: var(--sh-lg); border: 1px solid var(--line); }
.dtile-grip { display: inline-flex; flex-direction: column; color: var(--muted); line-height: 0; transform: rotate(90deg); cursor: grab; }
.dtile-grip .ico + .ico { margin-top: -10px; }
.dtile-name { flex: 1; min-width: 0; font-weight: 800; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dtile-swap { width: 150px; }
.dtile-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--chip); color: var(--ink); }
.dtile-btn:hover { background: var(--chip2); }
.dtile-btn.danger:hover { background: var(--red); color: #fff; }
.dtile-add { display: grid; place-content: center; justify-items: center; gap: 10px; border: 2px dashed var(--line2); border-radius: 26px; color: var(--muted); }
.dtile-add .sel { width: 200px; }
.mini-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 14px; background: none; text-align: left; color: var(--ink); }
.mini-row:hover { background: var(--chip); }
.mini-row > .ico:last-child { color: var(--muted); }
.mini-sw { display: flex; flex: none; }
.mini-sw i { width: 14px; height: 30px; }
.mini-sw i:first-child { border-radius: 8px 0 0 8px; } .mini-sw i:last-child { border-radius: 0 8px 8px 0; }
.mini-q { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--red-soft); color: var(--red); }
.mini-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mini-t b { font-size: 13px; font-weight: 700; }
.mini-t small { color: var(--muted); font-size: 12px; }
.team-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.team-r { display: grid; justify-items: center; gap: 6px; padding: 16px 8px; border-radius: 18px; background: var(--chip); }
.team-r b { font-size: 26px; font-weight: 800; line-height: 1; }
.team-r small { color: var(--muted); font-size: 12px; font-weight: 600; }
.team-todo { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 10px 12px; border-radius: 12px; background: rgba(245, 165, 36, .14); color: #a76400; font-size: 13px; font-weight: 600; }
:root[data-theme="dark"] .team-todo { color: #f5a524; }
.notes { flex: 1; width: 100%; min-height: 0; resize: none; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--chip); color: var(--ink); font: 14px/1.6 inherit; outline: 0; }
.notes:focus { border-color: var(--red); background: var(--card); box-shadow: 0 0 0 4px var(--red-soft); }
.dash-client .board-grid { grid-auto-rows: auto; }
@media (max-width: 1280px) { .board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .board-grid { grid-template-columns: 1fr; grid-auto-rows: 400px; } .dtile.w2 { grid-column: auto; } }
/* lingua nella barra in alto */
.lang-seg .seg-i { padding: 0 10px; font-size: 12px; }
.viewas { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: center; gap: 12px; margin: -4px 0 16px; padding: 10px 16px; border-radius: 16px; background: var(--red); color: #fff; font-weight: 700; font-size: 13px; box-shadow: 0 10px 24px rgba(227, 30, 36, .3); }
.viewas .xbtn { background: #fff; color: var(--red); }
.ub-i > span:not(.ico) { flex: 1; display: grid; gap: 1px; }
.ub-i b { font-size: 14px; font-weight: 700; }
.ub-i small { color: var(--muted); font-size: 12px; font-weight: 500; }
.ub-people { display: grid; gap: 2px; margin: 0 0 6px 34px; padding: 6px; border-radius: 12px; background: var(--chip); max-height: 220px; overflow: auto; }
.ub-p { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 10px; background: none; text-align: left; font-weight: 600; font-size: 13px; }
.ub-p span:nth-child(2) { flex: 1; }
.ub-p small { color: var(--muted); font-size: 11px; }
.ub-p:hover { background: var(--card); }
.u-av.sm { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; }
.profile { display: grid; gap: 16px; }
.profile .ub-h { border: 0; padding: 0; margin: 0; }
.profile-sep { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.profile .auth-form h1 { font-size: 18px; }

/* --- Header a larghezza fissa: cambiare lingua non sposta nulla ----------------------------------- */
/* voci vicine tra loro; «Catalogo»/«Catalogue» ha la misura della parola più lunga, così cambiando lingua non si sposta niente */
.tabs { gap: 2px; }
.xtab { justify-content: center; padding: 0 14px; }
.xtab[data-k="catalog"] { min-width: 132px; }
.top { gap: 28px; }
.top-r > .xbtn { width: auto; padding: 0 18px; margin-left: 4px; justify-content: center; }
.theme-seg .seg-i { width: 96px; justify-content: center; }
/* ricerca dei comandi: nel gruppo di destra, prima di aiuto e tema, con l'aspetto degli altri bottoni */
.top .xsearch { flex: none; width: 250px; padding: 0 8px 0 14px; border-radius: 13px; background: var(--card); }
.top .xsearch span:not(.ico) { flex: 1; font-size: 13.5px; font-weight: 600; }
.top .xsearch kbd { flex: none; height: 26px; padding: 0 7px; border-radius: 8px; border: 1px solid var(--line); background: var(--chip); font-family: inherit; font-size: 11px; font-weight: 700; line-height: 26px; color: var(--muted); }
.top-r > .xsearch { margin-right: 4px; }
/* appunti e ricerca subito dopo le schede */
.top-mid { display: flex; align-items: center; gap: 8px; margin-left: -14px; }
.xtab--notes { position: relative; }
.xtab--notes:hover, .xtab--notes.on { color: var(--ink); background: var(--chip); }
.xtab-badge { min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; }
.notes-box { left: 0; right: auto; width: 400px; display: flex; flex-direction: column; max-height: min(560px, calc(100vh - 120px)); padding: 16px; }
.notes-box-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.notes-box-h h4 { flex: 1; margin: 0; font-size: 16px; font-weight: 800; }
.notes-box .notes-list { flex: 1; min-height: 60px; overflow: auto; }
@media (max-width: 1680px) { .theme-seg .seg-i { width: 42px; } .top { gap: 22px; } .top .xsearch { width: 46px; padding: 0; justify-content: center; } .top .xsearch :is(span:not(.ico), kbd) { display: none; } }
@media (max-width: 1440px) { .xtab[data-k="catalog"] { min-width: 0; } .top .xsearch { width: 44px; } }
@media (max-width: 1100px) { .top-r > .xbtn { width: auto; } }

/* --- Wireframe dei widget nel catalogo ---------------------------------------------------------- */
.wc-wire { display: block; margin: -6px -6px 6px; padding: 12px; border-radius: 16px; background: var(--chip); }
.wire { display: block; width: 100%; height: auto; overflow: visible; }
.wire .wf-frame { fill: var(--card); stroke: var(--line2); stroke-width: 1; }
.wire .wf-sep { stroke: var(--line2); stroke-width: 1; }
.wire .wf-dot { fill: var(--line2); }
.wire .wf-b { fill: var(--chip2); }
.wire .wf-i { fill: var(--line2); }
.wire .wf-hl { fill: var(--red); }
.wire .wf-hi { fill: rgba(255, 255, 255, .5); }
.wire .wf-on { filter: drop-shadow(0 2px 5px rgba(227, 30, 36, .45)); transform-box: fill-box; transform-origin: center; }
.wcard:hover .wire .wf-on { animation: wf-pulse 1.4s ease-in-out infinite; }
@keyframes wf-pulse { 50% { filter: drop-shadow(0 2px 9px rgba(227, 30, 36, .8)); } }
.wm-wire { display: grid; gap: 8px; padding: 18px; border-radius: 20px; background: var(--chip); }
.wm-wire .wire { max-width: 400px; margin: 0 auto; }
.wm-wire small { text-align: center; color: var(--muted); font-size: 12px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .wcard:hover .wire .wf-on { animation: none; } }

/* --- Tablet e telefono ------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .xtab { min-width: 0; padding: 0 13px; font-size: 0; gap: 0; }
  .top-r { gap: 8px; }
  .top-r > .xbtn { margin-left: 4px; padding: 0 14px; }
  .editor { grid-template-columns: 330px minmax(0, 1fr); gap: 16px; }
  .stage-bar { overflow-x: auto; scrollbar-width: none; }
  .stage-bar .xbtn span:not(.ico), .stage-bar .seg-i:has(.ico) span:not(.ico) { display: none; }
}
@media (max-width: 760px) {
  .studio { padding: 0; height: 100dvh; }
  .deco { display: none; }
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: 64px minmax(0, 1fr); border-radius: 0; }
  .top { gap: 8px; padding: 0 12px; }
  .xlogo img { height: 28px; }
  .tabs, .top .ghint, .top-mode, .top .xsearch, .top-r > .pop:not(.pop-user) { display: none; }
  .theme-seg .seg-i { width: 34px; padding: 0; }
  .top-r { gap: 6px; }
  .top-r > .xbtn { width: 44px; padding: 0; margin: 0; }
  .lang-seg .seg-i { padding: 0 8px; }
  .main { grid-column: 1; padding: 6px 14px 104px; }
  .xrail { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; grid-row: auto; grid-column: auto; flex-direction: row; justify-content: space-between; gap: 2px; width: auto; margin: 0; padding: 8px 10px; }
  .rail-sp { display: none; }
  .rail-i { width: 44px; height: 44px; }
  .rail-dot { width: 44px; height: 44px; }
  /* barra del telefono con «Altro»: quattro voci con il nome sotto, il resto nel foglio */
  .xrail.has-more { justify-content: space-around; overflow: visible; padding: 6px 8px; }
  .xrail.has-more .rail-i { flex: 1 1 0; width: auto; max-width: 76px; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 18px; }
  .xrail.has-more .rail-i.rail-x { display: none; }
  .xrail.has-more .rail-l { display: block; }
  .xrail.has-more .rail-dot { width: 64px; height: 54px; border-radius: 18px; }
  [data-tip]::after { display: none; }
  .xrail { max-height: none; overflow-x: auto; overflow-y: hidden; justify-content: flex-start; }
  .rail-tip { display: none; }
  .rs { position: fixed; inset: 0; z-index: 59; display: grid; align-items: end; }
  .rs-bg { position: absolute; inset: 0; border: 0; background: rgba(8, 8, 10, .42); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); cursor: pointer; }
  .rs-card { position: relative; margin: 0 12px calc(86px + env(safe-area-inset-bottom)); padding: 14px; border-radius: 26px; background: var(--rail, #111); color: #fff; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); }
  .rs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .rs-i { display: grid; justify-items: center; gap: 8px; padding: 14px 4px 12px; border: 0; border-radius: 18px; background: rgba(255, 255, 255, .05); color: rgba(255, 255, 255, .86); font: inherit; font-size: 12.5px; font-weight: 600; text-align: center; cursor: pointer; transition: background .2s; }
  .rs-i:hover, .rs-i:focus-visible { background: rgba(255, 255, 255, .12); outline: 0; }
  .rs-i.on { background: #fff; color: #111; }
  .rs-i.on .rs-ic { color: var(--red); }
  .rs-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .08); }
  .rs-i.on .rs-ic { background: var(--red-soft); }
  .dash { gap: 20px; }
  .dash-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hello, .new-card { grid-column: 1 / -1; }
  /* telefono: il bottone principale in riga (icona a sinistra), sotto Questionario e Dadi affiancati, poi «Oppure parti da» */
  .new-card { min-height: 0; place-content: stretch; justify-items: stretch; text-align: left; padding: 14px; gap: 8px; }
  .new-card .new-main { grid-template-columns: 44px minmax(0, 1fr); justify-items: start; align-items: center; column-gap: 12px; row-gap: 0; text-align: left; }
  .new-card .new-main > span { grid-row: span 2; margin: 0; }
  .new-card .new-main small { max-width: none; }
  .new-card .new-acts, .new-card .new-alt { width: 100%; margin-top: 0; }
  .new-card .new-acts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick { grid-column: auto; min-height: 0; }
  .quick:last-child { grid-column: 1 / -1; }
  /* telefono: le schede una sotto l'altra, aperta quella scelta */
  .qacc { grid-column: 1 / -1; flex-direction: column; min-height: 0; gap: 8px; }
  .qacc-p { flex: none; min-width: 0; height: 56px; transition: height .5s cubic-bezier(.16, 1, .3, 1); }
  .qacc-p.on { height: 270px; }
  .qacc-p:not(.on) .qacc-art { inset: 0; height: 100%; border-radius: 0; }
  .qacc-v { writing-mode: horizontal-tb; transform: none; left: 60px; bottom: auto; top: 50%; margin-top: -10px; }
  .qacc-n { left: 20px; right: auto; top: 50%; margin-top: -8px; }
  .qacc-p.on .qacc-n { margin-top: 0; }
  .quick-art { height: 110px; }
  .hello h1 { font-size: 28px; }
  .board-h { flex-wrap: wrap; }
  .board-grid { grid-auto-rows: 380px; gap: 14px; }
  .dtile-tools { flex-wrap: wrap; }
  .dtile-swap { width: 120px; }
  .editor { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: auto; }
  .view-editor .main { overflow: auto; }
  .xmodal-bg { padding: 10px; place-items: end center; }
  .xmodal { max-height: 86dvh; border-radius: 22px; padding: 18px; }
  .wgrid { grid-template-columns: 1fr; }
  .cat-top { flex-wrap: wrap; }
  .xsearch.big { width: 100%; }
}
.dash-client .proj-b { display: grid; gap: 4px; justify-items: start; }
.dash-client .proj-b .xbtn { margin-top: 8px; }

/* lingua e utente in fondo a destra, separati dalle azioni */
.top-sep { width: 1px; height: 28px; background: var(--line2); margin: 0 2px; }
@media (max-width: 760px) { .top-sep { display: none; } }

/* scelta del ruolo nel modulo «Nuovo utente» */
.role-pick { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; border: 0; min-width: 0; }
.role-pick legend { padding: 0; margin-bottom: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.role-opt { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--chip); cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.role-opt:hover { border-color: var(--line2); }
.role-opt.on { border-color: var(--red); background: var(--card); box-shadow: 0 0 0 4px var(--red-soft); }
.role-opt input { position: absolute; opacity: 0; pointer-events: none; }
.role-opt:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: 2px; }
.role-opt-t { display: grid; gap: 2px; }
.role-opt-t b { font-size: 14px; }
.role-opt-t small { font-size: 12px; line-height: 1.4; color: var(--muted); }
.role-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line2); transition: border-color .2s, box-shadow .2s; }
.role-opt.on .role-dot { border-color: var(--red); box-shadow: inset 0 0 0 4px var(--card), inset 0 0 0 9px var(--red); }
.xmodal .role-pick + .modal-f { margin-top: 22px; }

/* Stile thumb: quattro copertine da scegliere */
.tpick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tpick-i { display: grid; justify-items: center; gap: 10px; padding: 16px 10px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--chip); color: var(--ink); text-align: center; transition: border-color .2s, box-shadow .2s, background .2s; }
.tpick-i:hover { border-color: var(--line2); }
.tpick-i.on { border-color: var(--red); background: var(--card); box-shadow: 0 0 0 4px var(--red-soft); }
.tpick-i b { font-size: 12px; font-weight: 700; line-height: 1.3; }
.tpick-art { display: grid; place-items: center; height: 124px; width: 100%; pointer-events: none; font-size: 12px; }
.tpick-art .game-play { display: none; }

/* Impaginazione della pagina e larghezza del widget (Home e Promozioni) */
.boxpick { display: grid; gap: 6px; margin-top: 12px; }
.boxpick small, .box-note { font-size: 12px; line-height: 1.45; color: var(--muted); }
.box-seg { display: flex; width: 100%; }
.box-seg .seg-i { flex: 1; justify-content: center; }
.box-note { display: block; margin-top: 8px; }

/* Catalogo: un dispositivo alla volta */
.cat-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cat-dev { flex: none; }
.cat-filters .cat-seg { flex: 0 1 auto; min-width: 0; }
.wc-meta em.only { background: var(--red, #e31e24); color: #fff; }
.tpick--sm { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tpick--sm .tpick-i { padding: 10px 6px 8px; gap: 6px; border-radius: 12px; }
.tpick--sm .tpick-art { height: 84px; }
.tpick--sm .tpick-i b { font-size: 11px; }
.xfield--thumbs { display: grid; gap: 8px; }

/* Modelli pronti di un widget (testata, footer) */
.wpresets { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.wpreset { display: grid; gap: 3px; align-content: start; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-align: left; transition: border-color .2s, background .2s; }
.wpreset b { font-size: 12.5px; }
.wpreset small { font-size: 11px; line-height: 1.35; color: var(--muted); }
.wpreset:hover { border-color: var(--line2); }
.wpreset.on { border-color: var(--red); background: var(--red-soft); }
.grp-presets .box-note { display: block; }

/* Bacheca: spazi vuoti tratteggiati dove aggiungere o trascinare un blocco */
.board.editing .dtile-hole { outline: 0; cursor: default; }
.dtile-hole { transition: border-color .2s, background .2s, color .2s; }
.dtile-hole small { max-width: 200px; text-align: center; font-size: 12px; line-height: 1.4; }
.dtile-hole.can-drop { border-color: var(--red); color: var(--ink2); }
.dtile-hole.drop { background: var(--red-soft); color: var(--red); }
.dtile-gap { pointer-events: none; }

/* Stile icone nella skin: dieci set con la skin corrente e lo scaricamento */
.ipick-w { display: grid; gap: 10px; }
.ipick-l { display: grid; gap: 3px; }
.ipick-l b { font-size: 13px; }
.ipick-l small { font-size: 12px; line-height: 1.45; color: var(--muted); }
.ipick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ipick-i { display: grid; gap: 7px; padding: 8px 8px 9px; border: 1px solid var(--line); border-radius: 14px; background: var(--chip); color: var(--ink); text-align: left; transition: border-color .2s, box-shadow .2s, background .2s; }
.ipick-i:hover { border-color: var(--line2); }
.ipick-i.on { border-color: var(--red); background: var(--card); box-shadow: 0 0 0 4px var(--red-soft); }
.ipick-i b { font-size: 12px; font-weight: 700; padding: 0 2px; }
.ipick-art { display: flex; align-items: center; justify-content: space-between; gap: 2px; min-width: 0; min-height: 0; overflow: hidden; padding: 9px 8px; border-radius: 10px; background: var(--c-surface); color: var(--c-text); pointer-events: none; }
.ipick-dl { display: flex; gap: 8px; flex-wrap: wrap; }
.ipick-i { min-width: 0; }

/* Appunti: voci, elenchi e cose da fare */
.notes-filter { width: 170px; }
.notes-list { display: grid; align-content: start; gap: 2px; }
.note { display: flex; align-items: flex-start; gap: 10px; padding: 7px 8px; border-radius: 10px; font-size: 14px; line-height: 1.45; }
.note:hover { background: var(--chip); }
.note-check { flex: none; width: 20px; height: 20px; margin-top: 1px; display: grid; place-items: center; border: 2px solid var(--line2); border-radius: 6px; background: var(--card); color: #fff; padding: 0; transition: background .15s, border-color .15s; }
.note-check:hover { border-color: var(--red); }
.note.done .note-check { background: var(--red); border-color: var(--red); }
.note.done .note-t { color: var(--muted); text-decoration: line-through; }
.note-dot { flex: none; width: 6px; height: 6px; margin: 8px 7px 0; border-radius: 50%; background: var(--ink); }
.note-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.note--text .note-t { color: var(--ink2); }
.note-ref { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 20px; background: var(--red-soft); color: var(--red); font-size: 11px; font-weight: 700; line-height: 18px; font-style: normal; vertical-align: 1px; }
.note-x { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); opacity: 0; transition: opacity .15s; }
.note:hover .note-x, .note-x:focus-visible { opacity: 1; }
.note-x:hover { background: var(--chip2); color: var(--red); }
.notes-empty { padding: 8px; color: var(--muted); font-size: 13px; }
.notes-add { display: grid; gap: 8px; padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--line); }
.notes-kinds { display: flex; align-items: center; gap: 4px; }
.notes-k { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: 12px; font-weight: 700; }
.notes-k:hover { background: var(--chip); color: var(--ink); }
.notes-k.on { background: var(--ink); color: var(--card); }
.notes-ref { margin-left: auto; width: 140px; }
.notes-in { display: flex; gap: 6px; }
.notes-in input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--chip); color: var(--ink); font-size: 14px; outline: 0; }
.notes-in input:focus { border-color: var(--red); background: var(--card); box-shadow: 0 0 0 4px var(--red-soft); }
.notes-in .dtile-btn { width: 38px; height: 38px; background: var(--red); color: #fff; }
.notes-kl { font-style: normal; white-space: nowrap; }
.notes-k:not(.on) .notes-kl { display: none; }

/* Colori: basi colore compatte (giorno | notte), modalità, singoli colori */
.colors-sec { display: grid; gap: 12px; }
.pals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pals-i { display: grid; gap: 5px; padding: 5px 5px 6px; border: 1px solid var(--line); border-radius: 11px; background: var(--chip); color: var(--ink); text-align: left; transition: border-color .2s, box-shadow .2s; min-width: 0; }
.pals-i:hover { border-color: var(--line2); }
.pals-i.on { border-color: var(--red); background: var(--card); box-shadow: 0 0 0 3px var(--red-soft); }
.pals-i b { font-size: 11px; font-weight: 700; padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pals-sw { display: grid; grid-template-columns: 1fr 1fr; height: 22px; border-radius: 7px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.pals-sw > span { display: flex; align-items: center; justify-content: center; gap: 3px; }
.pals-sw i { width: 9px; height: 9px; border-radius: 50%; }
.mode-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.mode-l { display: grid; gap: 2px; min-width: 0; }
.mode-l b { font-size: 13px; }
.mode-l small { font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.colors-h { margin-top: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* Caricamento: animazioni vere in piccolo */
.lpick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.lpick-i { display: grid; gap: 5px; padding: 5px 5px 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--chip); color: var(--ink); min-width: 0; transition: border-color .2s, box-shadow .2s; }
.lpick-i:hover { border-color: var(--line2); }
.lpick-i.on { border-color: var(--red); background: var(--card); box-shadow: 0 0 0 3px var(--red-soft); }
.lpick-i b { font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lpick-art { position: relative; display: grid; place-items: center; height: 72px; min-height: 0; border-radius: 8px; overflow: hidden; background: var(--c-bg); pointer-events: none; }
.lpick-fig { display: grid; place-items: center; zoom: .5; }
.lpick-i:not(:hover):not(.on) .lpick-fig * { animation-play-state: paused; }

.frame-chrome .chrome-fav { width: 14px; height: 14px; border-radius: 3px; object-fit: contain; margin-right: 6px; vertical-align: -2px; }
.ic-defs-host { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Clienti (solo master): elenco a sinistra, scheda a destra */
.clients { padding-top: 6px; }
.cl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 24px; align-items: start; }
.cl-list, .cl-detail { display: grid; gap: 4px; align-content: start; padding-bottom: 16px; }
.cl-detail { position: sticky; top: 12px; gap: 10px; min-height: 420px; }
.cl-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 12px; background: var(--chip); color: var(--muted); }
.cl-search input { width: 150px; border: 0; background: none; outline: 0; color: var(--ink); font-size: 13px; }
.cl-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 16px; background: none; color: var(--ink); text-align: left; transition: background .2s; }
.cl-row:hover { background: var(--chip); }
.cl-row.on { background: var(--red-soft); }
.cl-row > .ico:last-child { color: var(--muted); }
.cl-av { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .02em; }
.cl-av.lg { width: 54px; height: 54px; border-radius: 16px; font-size: 18px; }
.cl-t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.cl-t b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-t small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-meta { display: flex; gap: 6px; }
.cl-meta em { font-style: normal; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 20px; background: var(--chip2); color: var(--ink2); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.cl-meta em.cl-acc { background: var(--red-soft); color: var(--red); }
.cl-free { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.cl-free h3, .cl-sec { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--ink2); margin: 4px 0; }
.cl-sec { margin-top: 14px; }
.cl-cfg { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--chip); }
.cl-cfg-sw { display: flex; flex: none; }
.cl-cfg-sw i { width: 14px; height: 28px; }
.cl-cfg-sw i:first-child { border-radius: 7px 0 0 7px; }
.cl-cfg-sw i:last-child { border-radius: 0 7px 7px 0; }
.cl-pick { width: 150px; }
.cl-add { width: 100%; }
.cl-none { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 380px; text-align: center; color: var(--muted); }
.cl-none b { color: var(--ink); font-size: 16px; }
.cl-none p { max-width: 320px; font-size: 13px; line-height: 1.5; }
.cl-head { display: flex; align-items: center; gap: 14px; padding: 4px 0 6px; }
.cl-head-t { flex: 1; min-width: 0; }
.cl-head-t h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.cl-head-t small { font-size: 12px; color: var(--muted); }
.cl-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.cl-info > div { padding: 10px 12px; border-radius: 12px; background: var(--chip); min-width: 0; }
.cl-info dt { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cl-info dd { margin: 4px 0 0; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.cl-info .cl-notes { grid-column: 1 / -1; }
.cl-info .cl-notes dd { font-weight: 500; white-space: pre-wrap; line-height: 1.5; }
.cl-mem { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.cl-m { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .2s, background .2s; }
.cl-m input { accent-color: var(--red); }
.cl-m.on { border-color: var(--red); background: var(--red-soft); }
.cl-form2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cl-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.cl-col { width: 28px; height: 28px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.cl-col.on { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--ink); }
@media (max-width: 1100px) { .cl-grid { grid-template-columns: 1fr; } .cl-detail { position: static; } }
@media (max-width: 640px) { .cl-info, .cl-form2 { grid-template-columns: 1fr; } .cl-meta { display: none; } }

/* Pannello Skin come roadmap: passi numerati collegati da una linea, chiusi all'avvio */
.roadmap { position: relative; }
.rstep { position: relative; }
.step-h { gap: 12px; justify-content: flex-start; text-align: left; }
.step-n { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--chip2); color: var(--ink2); font-size: 12.5px; font-weight: 800; transition: background .2s, color .2s; position: relative; z-index: 1; }
.rstep.is-open .step-n, .step-h:hover .step-n { background: var(--red); color: #fff; }
.step-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.step-t small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-h > .ico { color: var(--muted); }
.rstep:not(:last-child)::after { content: ""; position: absolute; left: 13.5px; top: 54px; bottom: -22px; width: 1px; background: var(--line2); }
.rstep.is-open::after { display: none; }
.sel-f .range-help { margin: 6px 0 0; }
.range-help { display: block; margin: -2px 0 6px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.cl-form2 { align-items: start; margin: 12px 0; }
.xmodal .cl-form2 .xfield { margin: 0; }

/* Interazioni: anteprime con lo stato già visibile */
.xpick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.xpick-i { display: grid; gap: 6px; padding: 6px 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--chip); color: var(--ink); text-align: left; min-width: 0; transition: border-color .2s, box-shadow .2s; }
.xpick-i:hover { border-color: var(--line2); }
.xpick-i.on { border-color: var(--red); background: var(--card); box-shadow: 0 0 0 3px var(--red-soft); }
.xpick-art { display: flex; align-items: center; gap: 2px; min-height: 0; height: 44px; padding: 0 6px; border-radius: 8px; background: var(--c-header); color: var(--c-on-header); overflow: hidden; }
.xpick-t { display: grid; gap: 1px; padding: 0 2px; min-width: 0; }
.xpick-t b { font-size: 11.5px; }
.xpick-t small { font-size: 10.5px; line-height: 1.35; color: var(--muted); }
.inst { scroll-margin-top: 12px; }
.inst.flash { animation: inst-flash 1.2s ease-out; }
@keyframes inst-flash { 0%, 30% { box-shadow: 0 0 0 3px var(--red), 0 0 0 9px var(--red-soft); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .inst.flash { animation: none; } }
.sel-pop.sel-float { position: fixed; right: auto; z-index: 400; }
.menu-pop.menu-float { position: fixed; z-index: 400; }
/* posizione del testo nei banner: griglia 3 × 3 */
.pplace { display: grid; gap: 8px; }
.pplace-l { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; }
.pplace-l em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); }
.pplace-g { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; aspect-ratio: 16 / 7; border-radius: 12px; background: var(--chip); border: 1px solid var(--line); }
.pplace-c { display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 0 12%; border: 0; border-radius: 8px; background: none; transition: background .15s; }
.pplace-c[data-c="c"] { align-items: center; } .pplace-c[data-c="r"] { align-items: flex-end; } .pplace-c[data-c="l"] { align-items: flex-start; }
.pplace-c i { display: block; height: 3px; width: 70%; border-radius: 2px; background: var(--line2); }
.pplace-c i:nth-child(2) { width: 45%; } .pplace-c i:nth-child(3) { width: 30%; height: 6px; border-radius: 3px; }
.pplace-c:hover { background: var(--card); }
.pplace-c.on { background: var(--card); box-shadow: 0 0 0 2px var(--red); }
.pplace-c.on i { background: var(--ink); } .pplace-c.on i:nth-child(3) { background: var(--red); }
.palign { display: grid; gap: 8px; }
.palign-g { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--chip); border: 1px solid var(--line); }
.palign-b { height: 34px; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 0 22%; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; cursor: pointer; transition: background .15s; }
.palign-b[data-a="l"] { align-items: flex-start; } .palign-b[data-a="c"] { align-items: center; } .palign-b[data-a="r"] { align-items: flex-end; } .palign-b[data-a="auto"] { align-items: center; padding: 0; }
.palign-b i { display: block; height: 3px; width: 100%; border-radius: 2px; background: var(--line2); }
.palign-b i:nth-child(2) { width: 60%; } .palign-b i:nth-child(3) { width: 80%; }
.palign-b b { font-size: 12px; font-weight: 700; }
.palign-b:hover { background: var(--card); }
.palign-b:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.palign-b.on { background: var(--card); box-shadow: 0 0 0 2px var(--red); color: var(--ink); }
.palign-b.on i { background: var(--ink); }

/* stile dei titoli di sezione: quattro tasselli compatti */
.hpick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hpick-i { display: grid; gap: 7px; padding: 6px 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-align: left; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.hpick-i:hover { border-color: var(--line2); }
.hpick-i.on { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
/* il titolo vero del sito disegnato al doppio della tessera e rimpicciolito a metà */
.hpick-art { position: relative; display: block; height: 52px; min-height: 0; padding: 0; border-radius: 8px; overflow: hidden; background: var(--c-bg); color: var(--c-text); pointer-events: none; }
.hpick-in { position: absolute; left: 0; top: 50%; width: 200%; padding: 0 16px; box-sizing: border-box; transform: translateY(-50%) scale(.5); transform-origin: 0 50%; }
.hpick-in > * { margin: 0; }
.hpick-n { padding: 0 2px; font-size: 12px; font-weight: 700; line-height: 1.25; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hpick-i.on .hpick-n { color: var(--ink); }

/* catalogo: anteprime wireframe di viste e funzioni */
.wm-sec { display: grid; gap: 12px; }
.wm-sec h4 { display: grid; gap: 2px; }
.wm-sec h4 small { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.wm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.wm-card { display: grid; align-content: start; gap: 6px; padding: 8px 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.wm-card > b, .wm-card-h b { font-size: 14px; }
.wm-card > small { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.wm-card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wm-tag { flex: none; height: 22px; padding: 0 9px; border-radius: 99px; display: inline-flex; align-items: center; background: var(--chip); font-size: 11.5px; font-weight: 700; }
.wm-tag.bold { background: var(--red); color: #fff; }
.wm-card > .wm-uses { color: var(--ink); opacity: .7; }
.wm-new { display: inline-flex; align-items: center; height: 20px; margin-left: 8px; padding: 0 8px; border-radius: 99px; background: var(--red-soft); color: var(--red); font-size: 11px; font-weight: 800; vertical-align: 2px; }
.wc-meta em.new { color: var(--red); font-weight: 700; }
.wm-card > b, .wm-card > small, .wm-card-h { padding: 0 4px; }
.wm-card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.wm-sw { display: inline-flex; flex: none; padding: 2px; border-radius: 99px; background: var(--chip); }
.wm-sw button { height: 24px; padding: 0 10px; border: 0; border-radius: 99px; background: none; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.wm-sw button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.wpv { position: relative; overflow: hidden; border-radius: 10px; background: #f3f4f6; border: 1px solid var(--line); transition: height .2s; }
.wpv-in { position: absolute; left: 0; top: 0; transform-origin: 0 0; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.wpv-in > * { min-height: 0; }
.wpv-note { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 5px 9px; border-radius: 8px; background: rgba(20, 24, 31, .78); color: #fff; font-size: 11.5px; font-weight: 600; line-height: 1.3; }
@media (prefers-reduced-motion: reduce) { .wpv, .wpv-in { transition: none; } }
.wm-grid--1 { grid-template-columns: 1fr; }
.wm-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wm-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .wm-grid--2, .wm-grid--3 { grid-template-columns: 1fr; } }
.wpv-dev { position: absolute; top: 6px; right: 6px; padding: 3px 8px; border-radius: 99px; background: var(--ink); color: var(--card); font-size: 10.5px; font-weight: 700; }
.xmodal.wide:has(.wm), .xmodal.wide:has(.wand) { width: min(1040px, 100%); }

/* accesso: ogni 7 secondi una linea rossa luminosa fa il giro del bordo della modale.
   È un elemento a parte, dietro la modale: qualunque animazione faccia la modale, il rosso non le passa mai davanti. */
@property --glow-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@property --glow-o { syntax: '<number>'; inherits: false; initial-value: 0; }
.auth-frame { position: relative; isolation: isolate; width: min(420px, 100%); }
.auth-frame > .auth-card { width: 100%; box-shadow: none; }
.auth-frame::before { content: ''; position: absolute; inset: 0; z-index: -2; border-radius: 26px; box-shadow: 0 40px 100px rgba(0, 0, 0, .7); pointer-events: none; }
/* la luce vive solo nella fascia intorno alla modale: dentro il suo rettangolo non può mai comparire, nemmeno se la modale è semitrasparente */
.auth-glow {
  position: absolute; inset: -16px; padding: 16px; z-index: -1; border-radius: 42px; pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.auth-glow::before {
  content: ''; position: absolute; inset: 12px; border-radius: 30px;
  background: conic-gradient(from var(--glow-a), transparent 0 58%, rgba(255, 30, 45, .2) 66%, rgba(255, 30, 45, .85) 80%, #ff2433 87%, #ff5a64 89.5%, transparent 90.5%, transparent);
  filter: drop-shadow(0 0 3px rgba(255, 36, 51, .95)) drop-shadow(0 0 9px rgba(227, 6, 19, .7));
  opacity: 0;
}
.auth.ready .auth-glow::before { opacity: var(--glow-o); animation: auth-glow 7s cubic-bezier(.45, .05, .35, 1) .6s infinite; }
@keyframes auth-glow {
  0% { --glow-a: 0deg; --glow-o: 0; }
  3% { --glow-o: 1; }
  33% { --glow-o: 1; }
  38% { --glow-a: 360deg; --glow-o: 0; }
  100% { --glow-a: 360deg; --glow-o: 0; }
}
@media (prefers-reduced-motion: reduce) { .auth.ready .auth-glow::before { animation: none; opacity: 0; } }
.color--opt .color-sw[style*="transparent"] { background: repeating-conic-gradient(var(--chip) 0 25%, var(--card) 0 50%) 0 0 / 10px 10px !important; }
.color-reset { justify-self: end; height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); font-size: 11.5px; font-weight: 700; color: var(--muted); }
.color-reset:hover { color: var(--ink); border-color: var(--line2); }

/* Palette dei comandi (Ctrl/⌘ K): ricerca per gruppi, evidenziatore che scorre, parole trovate in grassetto */
.pal-bg { position: fixed; inset: 0; z-index: 320; display: flex; justify-content: center; align-items: flex-start; padding: 11vh 16px 16px; background: rgba(8, 8, 10, .5); backdrop-filter: blur(10px) saturate(1.1); font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif; }
.pal { display: flex; flex-direction: column; width: min(620px, 100%); max-height: min(620px, 80vh); border-radius: 22px; overflow: hidden; background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .04); }
.pal-in { display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--muted); flex: none; }
.pal-in input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: 600 16px/1 inherit; font-family: inherit; color: var(--ink); }
.pal-in input::placeholder { color: var(--muted); font-weight: 500; }
.pal-in kbd, .pal-f kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--chip); font: 700 11px/1 'Plus Jakarta Sans', Inter, system-ui, sans-serif; color: var(--muted); }
.pal-list { position: relative; flex: 1; min-height: 0; padding: 6px 8px 8px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.pal-g { padding: 12px 12px 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.pal-hl { position: absolute; left: 8px; right: 8px; top: 0; height: 44px; border-radius: 12px; background: var(--chip); pointer-events: none; z-index: 0; }
.pal-i { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 10px; border: 0; border-radius: 12px; background: none; color: var(--ink); text-align: left; font-family: inherit; cursor: pointer; }
.pal-ic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--chip); color: var(--ink); transition: background .18s, color .18s; }
.pal-i.on .pal-ic { background: var(--red); color: #fff; }
.pal-t { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 600; }
.pal-t mark { background: none; color: var(--red); font-weight: 800; }
.pal-ret { flex: none; display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
.pal-i.on .pal-ret { opacity: 1; transform: none; }
.pal-more { padding: 10px 12px 4px; font-size: 12px; color: var(--muted); }
.pal-empty { display: grid; justify-items: center; gap: 6px; padding: 36px 20px 40px; text-align: center; color: var(--muted); }
.pal-empty .pal-ic { width: 44px; height: 44px; border-radius: 14px; }
.pal-empty b { color: var(--ink); font-size: 14px; }
.pal-empty p { font-size: 12.5px; max-width: 320px; }
.pal-f { flex: none; display: flex; align-items: center; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.pal-f > span { display: inline-flex; align-items: center; gap: 5px; }
.pal-f .pal-count { margin-left: auto; }
@media (max-width: 560px) { .pal-bg { padding-top: 16px; } .pal-f > span:not(.pal-count):nth-child(n+2) { display: none; } }

/* ---- Copertura: modelli del Composer contro i siti analizzati ---- */
.coverage { padding-top: 6px; }
.cat-cov { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 700; font-size: 14px; transition: border-color .2s, transform .2s; }
.cat-cov:hover { border-color: var(--line2); transform: translateY(-1px); }
.cov-chips { position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 18px; isolation: isolate; }
.cov-pill { position: absolute; top: 0; left: 0; z-index: -1; border-radius: 12px; background: var(--solid); opacity: 0; pointer-events: none; }
.cov-chip { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink2); font-weight: 700; font-size: 13px; transition: color .25s, border-color .25s, background .25s; }
.cov-chip small { min-width: 22px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 10px; background: var(--chip); color: var(--muted); font-size: 11px; font-weight: 800; transition: background .25s, color .25s; }
.cov-chip:hover { border-color: var(--line2); }
.cov-chip.on { color: var(--on-solid); background: transparent; border-color: transparent; }
.cov-chip.on small { background: rgba(255, 255, 255, .16); color: var(--on-solid); }
.cov-chip--new { border-style: dashed; }
.cov-chip.partial:not(.on) { color: var(--muted); }
.cov-sum { margin: 0 0 16px; font-size: 15px; color: var(--ink2); max-width: 80ch; }
.cov-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 16px; align-items: start; }
.cov-sec { padding: 18px 18px 12px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); }
.cov-sec > header { margin-bottom: 10px; }
.cov-sec h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; }
.cov-sec header p { margin-top: 3px; font-size: 13px; color: var(--muted); }
.cov-n { min-width: 24px; height: 22px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 11px; background: var(--chip); color: var(--ink2); font-size: 12px; font-weight: 800; }
.cov-list { display: flex; flex-direction: column; }
.cov-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto 18px; align-items: center; gap: 14px; padding: 9px 8px; margin: 0 -8px; border: 0; border-radius: 14px; background: none; text-align: left; color: var(--ink); transition: background .2s; }
.cov-row + .cov-row { box-shadow: 0 -1px 0 var(--line); }
.cov-row:hover { background: var(--chip); box-shadow: none; }
.cov-row:hover + .cov-row { box-shadow: none; }
.cov-wire { display: block; padding: 6px; border-radius: 10px; background: var(--chip); }
.cov-wire .wire { width: 100%; }
.cov-wire--gap { display: grid; place-items: center; height: 52px; border: 1px dashed var(--line2); background: none; color: var(--muted); }
.cov-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cov-name small { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.cov-name b { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.cov-where { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cov-new { padding: 2px 7px; border-radius: 7px; background: var(--red-soft); color: var(--red); font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; }
.cov-use { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.cov-use b { font-size: 12px; font-weight: 700; color: var(--ink2); white-space: nowrap; }
.cov-dots { display: grid; grid-template-columns: repeat(15, 6px); gap: 2px; }
.cov-dots i { width: 6px; height: 6px; border-radius: 2px; background: var(--chip2); }
.cov-dots i.on { background: var(--ink); }
.cov-dots i.me { box-shadow: 0 0 0 1.5px var(--red); }
.cov-go { color: var(--muted); opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s; }
.cov-row:hover .cov-go { opacity: 1; transform: none; }
.cov-row:is(.is-gap, .is-mob) { cursor: default; }
.cov-row.is-mob .cov-wire--gap { border-style: solid; color: var(--text); }
.cov-row.is-gap .cov-use b { white-space: normal; text-align: right; max-width: 180px; color: var(--muted); }
.cov-empty { padding: 14px 0 10px; color: var(--muted); font-size: 13.5px; }
/* matrice */
.cov-mx { border: 1px solid var(--line); border-radius: 22px; background: var(--card); overflow: hidden; }
.cov-mx-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cov-mx-bar .xsearch { width: 260px; height: 42px; }
.cov-mx-bar .xsearch input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); }
.cov-legend { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.cov-legend i { width: 12px; height: 12px; margin-left: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line2); }
.cov-legend i.on { background: var(--ink); box-shadow: none; }
.cov-legend i.gap { box-shadow: none; border: 1.5px dashed var(--red); }
.cov-mx-scroll { overflow: auto; max-height: calc(100vh - 280px); }
.cov-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.cov-table thead th { position: sticky; top: 0; z-index: 2; background: var(--card); box-shadow: inset 0 -1px 0 var(--line); }
.cov-th-m { min-width: 240px; padding: 10px 16px; text-align: left; vertical-align: bottom; font-size: 12px; color: var(--muted); }
.cov-th-s { width: 40px; padding: 10px 0; vertical-align: bottom; }
.cov-th-s span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12px; font-weight: 700; color: var(--ink2); white-space: nowrap; }
.cov-th-s.partial span { color: var(--muted); font-weight: 600; }
.cov-th-n { width: 56px; padding: 10px 14px; text-align: right; vertical-align: bottom; font-size: 12px; color: var(--muted); }
.cov-table tbody tr { cursor: pointer; }
.cov-table tbody tr:hover td, .cov-table tbody tr:hover th { background: var(--chip); }
.cov-td-m { position: sticky; left: 0; z-index: 1; background: var(--card); padding: 7px 16px; text-align: left; font-weight: 600; white-space: nowrap; }
.cov-td-m small { display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
.cov-td-m small:empty { display: none; }
.cov-td-m span { display: inline-flex; align-items: center; gap: 8px; }
.cov-table tr.cov-first > * { box-shadow: inset 0 1px 0 var(--line); }
.cov-table td { text-align: center; padding: 0; }
.cov-table td i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); vertical-align: middle; }
.cov-table td.on i { background: var(--ink); box-shadow: none; }
.cov-table td.gap i { box-shadow: none; border: 1.5px dashed var(--red); }
.cov-table td.partial i { opacity: .35; }
.cov-td-n { text-align: right !important; padding: 0 14px !important; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink2); }
.cov-gap-h th { position: sticky; left: 0; padding: 16px 16px 6px; text-align: left; font-size: 12px; font-weight: 800; color: var(--red); background: var(--card); box-shadow: inset 0 1px 0 var(--line); }
.cov-table tr.is-gap { cursor: default; }
@media (max-width: 760px) {
  .cov-cols { grid-template-columns: 1fr; }
  .cov-row { grid-template-columns: 60px minmax(0, 1fr) 18px; }
  .cov-row .cov-use { grid-column: 2; align-items: flex-start; }
  .cov-row .cov-go { grid-row: 1; grid-column: 3; }
  .cov-legend { margin-left: 0; }
  .cov-mx-bar .xsearch { width: 100%; }
}

/* pagine dell'anteprima con le viste di Sport e Casinò */
.pnav .seg-i { gap: 5px; }
.pnav-car { opacity: .6; transition: transform .25s; }
.pnav .seg-i.open .pnav-car { transform: rotate(180deg); }
.pnav-pop { min-width: 230px; }
.pnav-pop .menu-i { justify-content: space-between; }
.pnav-pop .menu-i.on { background: var(--chip); }
.pnav-i { display: flex; flex-direction: column; gap: 1px; }
.pnav-i small { font-size: 11.5px; font-weight: 600; color: var(--muted); }
/* la freccia delle viste non deve far sparire il nome della pagina (le regole strette nascondono il testo accanto alle icone) */
.stage-bar .pnav .seg-i span:not(.ico) { display: inline !important; }

/* scheda Stili: anteprime vere degli effetti con i colori della skin */
.lk { display: grid; gap: 14px; }
.lk { display: grid; gap: 12px; }
.lk-pv { display: block; height: 132px; border-radius: 12px; overflow: hidden; pointer-events: none; }
.lk-pv--big { height: 150px; border-radius: 14px; }
.lk-ctl-r { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lk-ctl-r > span { display: grid; gap: 1px; font-size: 12px; font-weight: 700; }
.lk-ctl-r > span small { font-size: 11px; font-weight: 500; color: var(--muted); }
.lk-ctl-r--wrap { flex-direction: column; align-items: stretch; }
.lk-parts { display: flex; flex-wrap: wrap; gap: 6px; }
.lk-part { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: 99px; background: none; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; transition: border-color .2s, background-color .2s, color .2s; }
.lk-part:hover { border-color: var(--line2); color: var(--ink); }
.lk-part.on { border-color: var(--ink); background: var(--ink); color: var(--card); }
/* filtro per gruppo */
.lk-filter { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--chip); }
.lk-fb { flex: 1 1 auto; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 30px; padding: 0 6px; border: 0; border-radius: 9px; background: none; font-size: 11.5px; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; }
.lk-fb small { font-size: 10.5px; font-weight: 600; opacity: .7; }
.lk-fb.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.lk-gd { margin: -4px 2px 0; font-size: 11.5px; line-height: 1.4; color: var(--muted); }
/* lista a righe: la riga scelta si apre con anteprima, forza e parti */
.lk-list { display: grid; gap: 6px; }
.lk-item { border: 1.5px solid var(--line); border-radius: 16px; background: var(--card); content-visibility: auto; contain-intrinsic-size: auto 74px; transition: border-color .2s; }
.lk-item:hover { border-color: var(--line2); }
.lk-item.on { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); content-visibility: visible; }
.lk-li { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px 8px 8px; border: 0; background: none; text-align: left; cursor: pointer; }
.lk-li-t { display: grid; gap: 3px; min-width: 0; }
.lk-li-t b { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.lk-li-t b em { font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--chip); color: var(--muted); }
.lk-li-t b svg { margin-left: auto; color: var(--red); }
.lk-li-t small { font-size: 11.5px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lk-item.on .lk-li-t small { -webkit-line-clamp: unset; display: block; }
.lk-pv--row { flex: none; width: 84px; height: 58px; border-radius: 10px; contain: strict; }
.lk-pv--row .lk-site { zoom: .42; padding: 10px; }
/* le miniature sono ferme e senza sfocature: così la lista scorre liscia */
.lk-pv--row *, .lk-pv--row .lk-site { animation: none !important; transition: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.lk-open { display: grid; gap: 10px; padding: 0 10px 12px; }
.lk-hint { margin: 0; font-size: 12px; color: var(--muted); }
.lk-site { height: 100%; padding: 10px 18px 16px 12px; display: flex; flex-direction: column; justify-content: center; background-color: var(--c-bg); }
.lk-pv .lk-site[data-look] { --lk-pp: 8px; }
.lk-pv .lk-site .w { margin: 0 !important; }
.lk-pv .lk-site .lk-pw { width: auto !important; max-width: none !important; margin: 0 !important; padding-inline: 0; display: grid; gap: 9px; }
.lk-site .lk-top { display: flex; gap: 8px; align-items: center; }
.lk-site .lk-top .lk-row { flex: 1; min-width: 0; }
.lk-site .lk-g { --gw: 46px; width: 46px; flex: none; }
.lk-site .lk-ar { width: 28px !important; height: 28px !important; margin-left: auto; font-size: 16px; line-height: 1; }
.lk-mk { padding: 8px 9px 9px !important; }
.lk-mh { margin-bottom: 6px !important; font-size: 11px !important; }
.lk-mk button { height: 30px !important; padding: 0 6px !important; }
.lk-mk button span:last-child { font-size: 12px; }
.lk-mk button span:first-child { display: none; }
.lk-mk button { justify-content: center !important; min-width: 0; }
.lk-row > * { flex: none; }
.lk-row { display: flex; align-items: center; gap: 8px; }

/* condivisione: staff e clienti, appunti condivisi tra master */
.share-h { margin: 14px 0 2px; font-size: 13px; font-weight: 800; color: var(--muted); }
.share-team { background: var(--chip); }
.share-list.is-off { opacity: .45; }
.note-sh { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--muted); opacity: 0; transition: opacity .2s, background .2s, color .2s; }
.note:hover .note-sh, .note-sh.on { opacity: 1; }
.note-sh.on { color: var(--red); background: var(--red-soft); }
.note.is-shared .note-t::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 6px 2px 0; border-radius: 50%; background: var(--red); }
.note-by { font-style: normal; }
.note-ref.note-by, .note-ref.note-to { background: var(--chip2); color: var(--ink2); }
.note-ref.note-done { background: rgba(34, 163, 90, .14); color: #1a8a4b; text-decoration: none; }
.note.done .note-t .note-ref { text-decoration: none; }
.note-check.is-ro { cursor: not-allowed; opacity: .55; }
.note-check.is-ro:hover { border-color: var(--line2); }
.note-sh.is-open { opacity: 1; background: var(--chip2); color: var(--ink); }
.notes-sels { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.notes-sels .notes-ref { margin-left: 0; width: auto; }
.note-ref.note-tk { background: rgba(245, 165, 36, .18); color: #a3640a; }
/* «Condividi con» di un appunto */
.nsh-pop { display: grid; gap: 2px; }
.nsh-h { padding: 6px 11px 4px; font-size: 12px; font-weight: 800; color: var(--muted); }
.nsh-o .nsh-r { flex: none; box-sizing: border-box; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line2); transition: border .15s; }
.nsh-o.on { color: var(--ink); }
.nsh-o.on .nsh-r { border: 5px solid var(--red); }
.nsh-people { display: grid; gap: 2px; max-height: 200px; overflow-y: auto; margin: 2px 4px 4px 30px; }
.nsh-p { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; }
.nsh-p:hover { background: var(--chip); }
.nsh-p input { accent-color: var(--red); width: 15px; height: 15px; margin: 0; }
.nsh-p span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nsh-p small { font-size: 11px; color: var(--muted); font-weight: 600; }
.nsh-note { margin: 4px 11px 6px; font-size: 11.5px; line-height: 1.45; color: var(--muted); white-space: normal; }

/* voce della tendina con una seconda riga (es. nome del telefono) */
.sel-opt-t { display: grid; gap: 1px; text-align: left; }
.sel-opt-t small { color: var(--muted); font-size: 11px; font-weight: 500; }
/* anteprime degli stili: niente si allarga oltre la card, le quote si stringono */
.lk-pv .lk-site > div, .lk-pv .lk-pw, .lk-pv .lk-mk { min-width: 0; }
.lk-pv .lk-pw { grid-template-columns: minmax(0, 1fr); }
.lk-pv .lk-mk > div { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.lk-pv .lk-row { min-width: 0; overflow: visible; }
.lk-pv .lk-row > button { padding-inline: 12px !important; max-width: 100%; }
/* anteprima e pannello su livelli separati: scorrere il pannello non ridisegna il sito dell'anteprima (e viceversa) */
.pv { contain: layout paint; }
.pv-scroll { will-change: transform; }
.panel-b { contain: layout paint; will-change: transform; }

/* =============================================================================================
   Disegna: forme dei widget (tela con livelli, ispettore, copia stile) */
.view-design .main { overflow: hidden; padding-right: 16px; }
.dg { display: flex; flex-direction: column; gap: 12px; height: 100%; min-height: 0; }
.dg--empty { overflow: auto; }
.dg-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dg-top h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.dg-top p { color: var(--muted); max-width: 70ch; margin-top: 4px; }
.dg-title { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; flex-wrap: wrap; }
.dg-title .sel { min-width: 220px; }
.dg-name { height: 36px; min-width: 160px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); font-weight: 700; }
.dg-name:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.dg-top-a { display: flex; align-items: center; gap: 6px; }
.dg-sep { width: 1px; height: 22px; background: var(--line2); margin: 0 4px; }
.dg-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 236px minmax(0, 1fr) 340px; gap: 12px; }
.dg-left, .dg-right, .dg-mid { min-height: 0; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.dg-left { overflow: auto; padding: 14px; scrollbar-width: thin; }
.dg-left h4 { display: flex; align-items: center; gap: 6px; margin: 14px 0 6px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dg-left h4:first-child { margin-top: 0; }
.dg-left h4 em { font-style: normal; padding: 0 6px; border-radius: 8px; background: var(--chip); color: var(--ink2); }
.dg-note { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; }
.dg-pad { padding: 16px; }
.dg-pieces { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.dg-piece { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; max-width: 100%; padding: 4px 9px; text-align: left; line-height: 1.25; border: 1px solid var(--line2); border-radius: 9px; background: var(--card); font-size: 12px; font-weight: 600; }
.dg-piece:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.dg-piece:disabled { opacity: .5; cursor: not-allowed; }
.dg-layers { display: grid; gap: 3px; }
.dg-layer { display: flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 4px 0 10px; border-radius: 9px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.dg-layer > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-layer:hover { background: var(--chip); }
.dg-layer.on { background: var(--red-soft); color: var(--red); }
.dg-layer.off > span { opacity: .45; text-decoration: line-through; }
.dg-lb { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 7px; background: none; color: var(--muted); }
.dg-lb:hover { background: var(--chip2); color: var(--ink); }
.dg-mid { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.dg-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dg-bar .sel { min-width: 170px; }
.dg-zoom { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 4px; border-radius: 10px; background: var(--chip); font-size: 12px; }
.dg-zoom button { width: 24px; height: 24px; border: 0; border-radius: 7px; background: none; font-weight: 800; }
.dg-zoom button:hover { background: var(--chip2); }
.dg-zoom b { min-width: 42px; text-align: center; }
.dg-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: auto; padding: 40px; background: conic-gradient(var(--checker) 25%, transparent 0 50%, var(--checker) 0 75%, transparent 0) 0 0 / 20px 20px; }
.dg-tip { padding: 8px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.dg-canvas { position: relative; flex: none; touch-action: none; user-select: none; }
.dg-site { position: absolute; inset: 0; }
.dg-site > * { box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .45); }
.dg-over { position: absolute; inset: 0; }
.dg-box { position: absolute; box-shadow: inset 0 0 0 1px transparent; cursor: move; transition: box-shadow .12s; }
.dg-box:hover { box-shadow: inset 0 0 0 1px rgba(227, 30, 36, .55); }
.dg-box.on { box-shadow: inset 0 0 0 1.5px var(--red), 0 0 0 1px rgba(255, 255, 255, .7); }
.dg-box.locked { cursor: not-allowed; }
.dg-h { position: absolute; width: 10px; height: 10px; border-radius: 3px; background: #fff; box-shadow: 0 0 0 1.5px var(--red); }
.dg-h-nw { left: -5px; top: -5px; cursor: nwse-resize; } .dg-h-n { left: calc(50% - 5px); top: -5px; cursor: ns-resize; } .dg-h-ne { right: -5px; top: -5px; cursor: nesw-resize; }
.dg-h-e { right: -5px; top: calc(50% - 5px); cursor: ew-resize; } .dg-h-se { right: -5px; bottom: -5px; cursor: nwse-resize; } .dg-h-s { left: calc(50% - 5px); bottom: -5px; cursor: ns-resize; }
.dg-h-sw { left: -5px; bottom: -5px; cursor: nesw-resize; } .dg-h-w { left: -5px; top: calc(50% - 5px); cursor: ew-resize; }
.dg-tag { position: absolute; left: -1px; bottom: calc(100% + 6px); padding: 2px 7px; border-radius: 6px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; white-space: nowrap; pointer-events: none; }
.dg-guide { position: absolute; background: #ff2bd6; pointer-events: none; }
.dg-guide-x { top: -2000px; bottom: -2000px; width: 1px; }
.dg-guide-y { left: -2000px; right: -2000px; height: 1px; }
.dg-lp { width: 100%; align-self: stretch; overflow: auto; }
.dg-lp-in { margin: 0 auto; border-radius: 14px; overflow: hidden; box-shadow: var(--sh); }
.dg-lp-site { min-height: 0; }
.dg-right { display: flex; flex-direction: column; overflow: hidden; }
.dg-tabs { display: flex; gap: 2px; padding: 8px; border-bottom: 1px solid var(--line); }
.dg-tab { flex: 1; height: 32px; border: 0; border-radius: 10px; background: none; font-weight: 700; font-size: 12.5px; color: var(--muted); }
.dg-tab:hover { color: var(--ink); background: var(--chip); }
.dg-tab.on { background: var(--solid); color: var(--on-solid); }
.dg-insp { flex: 1; overflow: auto; padding: 6px 12px 20px; scrollbar-width: thin; }
.dg-right > .dg-insp, .dg-right > .dg-note { flex: 1; overflow: auto; }
.dg-lh { position: relative; padding: 10px 70px 10px 4px; border-bottom: 1px solid var(--line); }
.dg-lh b { display: block; font-size: 14px; }
.dg-lh small { color: var(--muted); font-size: 11.5px; }
.dg-lh-a { position: absolute; right: 0; top: 8px; display: flex; gap: 2px; }
.dg-sec { border-bottom: 1px solid var(--line); }
.dg-sec-h { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 11px 4px; border: 0; background: none; font-size: 12px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--ink2); }
.dg-sec-b { display: grid; gap: 10px; padding: 2px 4px 14px; }
.dg-num { display: grid; grid-template-columns: 1fr 64px auto; align-items: center; gap: 4px 8px; }
.dg-num > span { grid-column: 1 / -1; font-size: 12px; font-weight: 600; color: var(--ink2); }
.dg-num input[type="range"] { width: 100%; height: 4px; border-radius: 4px; -webkit-appearance: none; appearance: none; background: linear-gradient(90deg, var(--red) var(--p), var(--chip2) var(--p)); }
.dg-num input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px var(--red), 0 2px 6px rgba(0, 0, 0, .2); cursor: pointer; }
.dg-num input[type="number"], .dg-geo input, .dg-txt input, .dg-save input, .dg-col-hex { height: 30px; width: 100%; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line2); background: var(--card); font-size: 12.5px; }
.dg-num em { font-style: normal; font-size: 11px; color: var(--muted); }
.dg-pick, .dg-seg, .dg-tog, .dg-col, .dg-img { display: grid; gap: 5px; }
.dg-pick > span, .dg-seg > span, .dg-col > span, .dg-img > span, .dg-txt > span, .dg-geo span { font-size: 12px; font-weight: 600; color: var(--ink2); }
.dg-tog { grid-template-columns: 1fr auto; align-items: center; }
.dg-tog > span { font-size: 12px; font-weight: 600; color: var(--ink2); }
.dg-seg-g { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--chip); }
.dg-seg-b { flex: 1; display: grid; place-items: center; min-width: 0; height: 28px; padding: 0 6px; border: 0; border-radius: 8px; background: none; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dg-seg-b.on { background: var(--card); color: var(--ink); box-shadow: var(--sh-sm); }
.dg-col-b { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 5px; border-radius: 9px; border: 1px solid var(--line2); background: var(--card); font-size: 12.5px; text-align: left; }
.dg-col-b b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-sw { display: inline-block; flex: none; width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); background-image: conic-gradient(#ddd 25%, transparent 0 50%, #ddd 0 75%, transparent 0); background-size: 8px 8px; }
.dg-col-pop { position: fixed; z-index: 400; width: 260px; display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--sh-lg); font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif; }
.dg-col-pop small { font-size: 11px; color: var(--muted); }
.dg-col-g { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.dg-sw-b { width: 100%; height: auto; aspect-ratio: 1; border: 0; cursor: pointer; }
.dg-sw-b.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--red); }
.dg-col-fix { display: flex; gap: 6px; align-items: center; }
.dg-col-fix input[type="color"] { flex: none; width: 34px; height: 30px; padding: 0; border: 1px solid var(--line2); border-radius: 8px; background: none; }
.dg-mini { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line2); background: var(--card); font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.dg-mini:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.dg-img-r { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dg-img-r img { width: 44px; height: 32px; object-fit: cover; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line2); }
.dg-img-r em { font-style: normal; font-size: 12px; color: var(--muted); }
.dg-geo { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.dg-geo label { display: grid; gap: 3px; }
.dg-al { display: flex; align-items: center; gap: 3px; }
.dg-al-b { position: relative; width: 28px; height: 28px; border: 1px solid var(--line2); border-radius: 8px; background: var(--card); }
.dg-al-b:hover { border-color: var(--red); }
.dg-al-b i { position: absolute; border-radius: 2px; background: var(--muted); }
.dg-al-b::after { content: ""; position: absolute; background: var(--red); }
.dg-al-b[data-a="l"] i { left: 7px; top: 9px; width: 9px; height: 8px; } .dg-al-b[data-a="l"]::after { left: 5px; top: 5px; bottom: 5px; width: 1.5px; }
.dg-al-b[data-a="c"] i { left: 9px; top: 9px; width: 8px; height: 8px; } .dg-al-b[data-a="c"]::after { left: calc(50% - .75px); top: 5px; bottom: 5px; width: 1.5px; }
.dg-al-b[data-a="r"] i { right: 7px; top: 9px; width: 9px; height: 8px; } .dg-al-b[data-a="r"]::after { right: 5px; top: 5px; bottom: 5px; width: 1.5px; }
.dg-al-b[data-a="t"] i { top: 7px; left: 9px; width: 8px; height: 9px; } .dg-al-b[data-a="t"]::after { top: 5px; left: 5px; right: 5px; height: 1.5px; }
.dg-al-b[data-a="m"] i { top: 9px; left: 9px; width: 8px; height: 8px; } .dg-al-b[data-a="m"]::after { top: calc(50% - .75px); left: 5px; right: 5px; height: 1.5px; }
.dg-al-b[data-a="b"] i { bottom: 7px; left: 9px; width: 8px; height: 9px; } .dg-al-b[data-a="b"]::after { bottom: 5px; left: 5px; right: 5px; height: 1.5px; }
.dg-txt { display: grid; gap: 4px; }
.dg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dg-icons { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; max-height: 180px; overflow: auto; }
.dg-ic { display: grid; place-items: center; aspect-ratio: 1; border: 0; border-radius: 8px; background: var(--chip); }
.dg-ic.on { background: var(--red); color: #fff; }
.dg-targets { display: grid; gap: 6px; margin-top: 6px; }
.dg-target { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.dg-target span { flex: 1; font-weight: 600; }
.dg-target em { font-style: normal; font-size: 11px; color: var(--muted); }
.dg-save { display: flex; gap: 6px; }
.dg-styles { display: grid; gap: 6px; }
.dg-style { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 10px; border-radius: 12px; background: var(--chip); }
.dg-style b { font-size: 12.5px; }
.dg-style small { flex: 1; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-start { display: grid; gap: 24px; }
.dg-start-u h3 { font-size: 18px; font-weight: 800; }
.dg-start-u p { margin: 4px 0 12px; color: var(--muted); max-width: 70ch; }
.dg-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.dg-preset { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); text-align: left; transition: transform .2s, border-color .2s, box-shadow .2s; }
.dg-preset:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--red); box-shadow: var(--sh); }
.dg-preset:disabled { opacity: .55; cursor: not-allowed; }
.dg-preset b { font-size: 13px; padding: 0 2px; }
.dg-preset-c { pointer-events: none; }
.dg-preset--blank { align-content: stretch; }
.dg-preset--blank span { display: grid; place-items: center; min-height: 110px; border: 2px dashed var(--line2); border-radius: 12px; color: var(--muted); }
.dg-new { width: min(1100px, 100%); max-height: 88vh; }
.dg-new-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
@media (max-width: 1280px) { .dg-body { grid-template-columns: 210px minmax(0, 1fr) 300px; } }
@media (max-width: 980px) { .view-design .main { overflow: auto; } .dg:not(.dg--home) { height: auto; } .dg-mid { order: -1; } .dg-body { flex: none; grid-template-columns: 1fr; } .dg-left, .dg-right { max-height: 60vh; } .dg-mid { min-height: 520px; } }

.dg-bglib { display: grid; gap: 6px; margin: 2px 0 8px; }
.dg-bglib > span { font-size: 11.5px; color: var(--muted); }
.dg-bglib > div { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.dg-bgt { aspect-ratio: 16 / 10; border-radius: 8px; border: 1px solid var(--line); background: center / cover no-repeat; cursor: pointer; padding: 0; }
.dg-bgt.on { outline: 2px solid var(--red); outline-offset: 1px; }
.dg-hint { margin: 6px 0 0; font-size: 11.5px; line-height: 1.4; color: var(--muted); }

/* --- Disegna: pagina iniziale (le forme e i widget che si possono ridisegnare) --- */
.dg--home { display: flex; flex-direction: column; gap: 22px; height: 100%; overflow: auto; padding: 0 4px 40px 0; scrollbar-width: thin; }
.dgh-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.dgh-top h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.dgh-top p { color: var(--muted); max-width: 62ch; margin-top: 4px; line-height: 1.45; }
.dgh-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.dgh-sec-h h2 { display: flex; align-items: baseline; gap: 8px; font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.dgh-sec-h h2 em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
.dgh-sub { color: var(--muted); font-size: 13px; line-height: 1.45; max-width: 72ch; margin: -4px 0 12px; }
.dgh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.dgh-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.dgh-card:hover { border-color: var(--line2); box-shadow: var(--sh-sm); }
.dgh-prev { display: grid; place-items: center; justify-items: center; height: 180px; padding: 14px; border: 0; background: var(--checker, var(--chip)); cursor: pointer; overflow: hidden; }
.dgh-prev:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.dgh-prev-c { pointer-events: none; max-width: 100%; transform-origin: center; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.dgh-card:hover .dgh-prev-c { transform: scale(1.03); }
.dgh-meta { display: grid; gap: 3px; padding: 12px 14px 14px; min-width: 0; }
.dgh-meta b { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dgh-meta span { font-size: 12px; color: var(--muted); }
.dgh-meta .dgh-where { color: var(--ink2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dgh-act { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.dgh-act .ibtn { background: var(--card); box-shadow: var(--sh-sm); }
.dgh-card:hover .dgh-act, .dgh-card:focus-within .dgh-act { opacity: 1; }
@media (hover: none) { .dgh-act { opacity: 1; } }
.dgh-empty { display: flex; align-items: center; gap: 10px; width: 100%; padding: 22px; border: 1px dashed var(--line2); border-radius: 16px; background: none; color: var(--muted); text-align: left; }
.dgh-empty:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.dgh-table { display: grid; border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.dgh-row { display: grid; grid-template-columns: minmax(0, 1fr) 88px minmax(200px, 280px) 300px; align-items: center; gap: 14px; padding: 12px 16px; }
.dgh-row + .dgh-row { border-top: 1px solid var(--line); }
.dgh-row-t { display: grid; gap: 2px; min-width: 0; }
.dgh-row-t b { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dgh-row-t span { font-size: 12px; color: var(--muted); }
.dgh-pill:empty { visibility: hidden; }
.dgh-pill { padding: 3px 9px; border-radius: 999px; background: var(--chip); color: var(--muted); font-size: 11.5px; font-weight: 700; }
.dgh-pill.on { background: var(--red-soft); color: var(--red); }
.dgh-row-s > * { width: 100%; }
.dgh-pill { justify-self: end; }
.dgh-ro { font-size: 13px; }
.dgh-row-a { display: flex; gap: 6px; justify-content: flex-end; }
@media (max-width: 1100px) {
  .dgh-row { grid-template-columns: minmax(0, 1fr) auto; }
  .dgh-row-s, .dgh-row-a { grid-column: 1 / -1; }
  .dgh-row-a { justify-content: flex-start; flex-wrap: wrap; }
}

/* --- Disegna: editor riordinato --- */
.dg-back { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px 0 8px; border: 1px solid var(--line2); border-radius: 12px; background: var(--card); font-weight: 700; font-size: 13px; color: var(--ink2); }
.dg-back:hover { border-color: var(--red); color: var(--red); }
.dg-chip { padding: 4px 10px; border-radius: 999px; background: var(--chip); color: var(--ink2); font-size: 12px; font-weight: 650; white-space: nowrap; }
.dg-chip--use { color: var(--muted); }
.dg-ltabs { display: flex; gap: 2px; padding: 3px; margin-bottom: 12px; border-radius: 12px; background: var(--chip); }
.dg-ltab { flex: 1; height: 30px; border: 0; border-radius: 9px; background: none; font-weight: 700; font-size: 12.5px; color: var(--muted); }
.dg-ltab.on { background: var(--card); color: var(--ink); box-shadow: var(--sh-sm); }
.dg-ltab em { font-style: normal; color: var(--muted); font-weight: 600; }
.dg-search { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; margin-bottom: 10px; border: 1px solid var(--line2); border-radius: 11px; background: var(--card); color: var(--muted); }
.dg-search:focus-within { border-color: var(--red); }
.dg-search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--ink); outline: 0; }
.dg-pgroup { margin-top: 14px; }
.dg-left .dg-pgroup h4 { margin: 0 0 2px; font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--ink2); }
.dg-piece.on { border-color: transparent; background: var(--chip); color: var(--ink2); }
.dg-piece.on .ico { color: var(--red); }
.dg-piece .ico { color: var(--muted); }
.dg-bl { font-size: 12px; color: var(--muted); }
.dg-sample { display: inline-flex; align-items: center; gap: 2px; }
.dg-sample b { font-size: 12px; font-weight: 650; color: var(--ink2); min-width: 7ch; text-align: center; }
.dg-right .dg-sec-h { font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--ink); }

/* --- Disegna: pagina iniziale in due colonne --- */
.dgh-cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 28px; align-items: start; }
.dgh-side { position: sticky; top: 0; display: grid; gap: 0; }
.dgh-side .dgh-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.dgh-sec-h--2 { margin-top: 26px; }
.dgh-stats { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; margin-bottom: 12px; }
.dgh-stat { display: flex; align-items: baseline; gap: 10px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.dgh-stat b { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.dgh-stat span { font-size: 13px; color: var(--ink2); line-height: 1.35; max-width: 18ch; }
.dgh-stat--k { align-items: center; background: none; border-style: dashed; }
.dgh-stat--k span { max-width: none; color: var(--muted); }
.dgh-group { margin-top: 18px; }
.dgh-group h3 { display: flex; align-items: baseline; gap: 6px; margin: 0 0 8px; font-size: 14px; font-weight: 750; }
.dgh-group h3 em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 650; }
.dgh-cols .dgh-row { grid-template-columns: minmax(0, 1fr) minmax(200px, 300px) auto; padding: 10px 12px 10px 16px; }
.dgh-row-a .ibtn { width: 34px; height: 34px; }
.dgh-act--on { opacity: 1; position: static; padding: 0 14px 14px; }
.dgh-act--on .xbtn { width: 100%; justify-content: center; }
@media (max-width: 1180px) { .dgh-cols { grid-template-columns: 1fr; } .dgh-side { position: static; } }
@media (max-width: 760px) {
  .dgh-stats { grid-template-columns: 1fr 1fr; } .dgh-stat--k { grid-column: 1 / -1; }
  .dgh-cols .dgh-row { grid-template-columns: minmax(0, 1fr) auto; } .dgh-cols .dgh-row-s { grid-column: 1 / -1; grid-row: 2; } .dgh-cols .dgh-row-a { grid-column: 2; grid-row: 1; }
}

/* --- Disegna: nome, salvataggio, «Salva come nuova» --- */
.dg-namew { display: inline-flex; align-items: center; gap: 6px; padding-left: 10px; border: 1px solid var(--line2); border-radius: 12px; background: var(--card); color: var(--muted); }
.dg-namew:focus-within { border-color: var(--red); color: var(--red); }
.dg-namew .dg-name { border: 0; background: none; padding-left: 0; }
.dg-saved { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-right: 4px; }
.dg-saved .ico { color: #1f9d55; }
.dg-saveas { display: grid; gap: 12px; width: min(460px, 92vw); padding: 22px; }
.dg-saveas h2 { font-size: 18px; font-weight: 750; }
.dg-saveas p { color: var(--muted); font-size: 13px; line-height: 1.45; }
.dg-saveas-in { height: 42px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 12px; background: var(--card); font: inherit; font-size: 14px; color: var(--ink); }
.dg-saveas-in:focus { outline: 2px solid var(--red); outline-offset: -1px; }
.dg-saveas-a { display: flex; justify-content: flex-end; gap: 8px; }

/* --- Bacchetta magica --- */
.pv.wanding .w { cursor: copy; }
.pv.wanding .w:hover { outline-style: solid; }
.pv.wanding .w:hover::after { content: var(--wand-t, 'Proposte per') ' «' attr(data-name) '»'; }
.wand { display: grid; gap: 16px; padding: 4px 22px 22px; }
.wand-sub { color: var(--muted); font-size: 13.5px; line-height: 1.5; max-width: 78ch; }
.wand-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.wand-card { display: grid; grid-template-rows: auto 1fr auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.wand-card:hover { border-color: var(--line2); box-shadow: var(--sh-sm); }
.wand-card.on { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.wand-pv { position: relative; overflow: hidden; background: var(--checker, var(--chip)); }
.wand-pv-in { position: absolute; top: 0; left: 0; transform-origin: 0 0; pointer-events: none; }
.wand-meta { display: grid; gap: 4px; padding: 12px 14px 4px; align-content: start; }
.wand-meta b { font-size: 14px; font-weight: 750; }
.wand-meta span { font-size: 12.5px; color: var(--ink2); line-height: 1.4; }
.wand-meta small { font-size: 12px; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wand-act { padding: 10px 14px 14px; }
.wand-act .xbtn { width: 100%; justify-content: center; }
.wand-done { display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; color: var(--red); font-weight: 750; font-size: 13px; }
.wand-none { padding: 24px; border: 1px dashed var(--line2); border-radius: 14px; color: var(--muted); }
.wand-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wand-count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .wand-foot .sp { display: none; }
  .wand-foot .xbtn { flex: 1 1 auto; justify-content: center; }
  .wand-foot .wand-go { order: -1; flex-basis: 100%; }
}
.wand-foot .sp { flex: 1; }
@media (max-width: 900px) { .wand-grid { grid-template-columns: 1fr; } }

/* --- Disegna: menu «Aspetto» --- */
.dgh-thead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 300px) 196px; gap: 14px; padding: 0 12px 0 16px; margin-top: 14px; font-size: 12px; font-weight: 650; color: var(--muted); }
.dgh-row-s { display: grid; gap: 4px; }
.dgh-kind { font-size: 11px; font-weight: 650; color: var(--muted); padding-left: 2px; }
.dgh-kind.on { color: var(--red); }
@media (max-width: 760px) { .dgh-thead { display: none; } }

/* --- Catalogo: le forme disegnate come opzioni del widget --- */
.wm-forms { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.wm-form { display: grid; gap: 8px; align-content: start; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.wm-form-pv { display: grid; place-items: center; min-height: 140px; padding: 10px; border-radius: 10px; background: var(--checker, var(--chip)); }
.wm-form-pv > * { width: 100%; max-width: 240px; pointer-events: none; }
.wm-form b { font-size: 13.5px; }
.wm-form .xbtn { justify-self: start; }

/* --- Disegna: anteprima del widget in una finestra --- */
.xmodal.wide:has(.dgp) { width: min(1180px, 100%); }
.dgp { display: grid; gap: 14px; padding: 0 22px 22px; }
.dgp-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dgp-look { display: flex; align-items: center; gap: 10px; min-width: min(380px, 100%); }
.dgp-look > span { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.dgp-look .sel { flex: 1; }
.dgp-stage { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--chip); }
.dgp-stage--m { justify-self: center; width: 390px; max-width: 100%; border-radius: 28px; }
.dgp-stage .wand-pv { background: transparent; }
.dgp-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dgp-foot small { color: var(--muted); max-width: 60ch; line-height: 1.4; }
.dgp-foot .sp { flex: 1; }

.dgh-row-a { align-items: center; min-width: 196px; }
.dgh-start { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 999px; background: var(--card); font-size: 12.5px; font-weight: 700; color: var(--ink); white-space: nowrap; transition: border-color .2s, color .2s, background-color .2s; }
.dgh-start:hover, .dgh-start:focus-visible { border-color: var(--red); color: var(--red); outline: 0; }
.dgh-start .ico { color: var(--red); }
.wand-mode { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wand-tag { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 99px; background: var(--chip); font-size: 12.5px; font-weight: 700; }
.wand-mode.bold .wand-tag { background: var(--red, #e30613); color: #fff; }
.wand-back { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 4px 2px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.wand-back:hover { color: var(--text); }
.wand-back:focus-visible { outline: 2px solid var(--red, #e30613); outline-offset: 2px; border-radius: 4px; }
.wand-mode small { color: var(--muted); font-size: 12.5px; }
.wand-uses { font-style: normal; font-size: 11.5px; font-weight: 650; color: var(--ink2); padding: 4px 8px; border-radius: 8px; background: var(--chip); justify-self: start; margin-top: 2px; }

/* --- Lista da ordinare (impostazione «order», es. ordine dei provider) --- */
.ordl { display: grid; gap: 6px; }
.ordl-h { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ordl-h .color-reset { margin-left: auto; }
.ordl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ordl-row { display: grid; grid-template-columns: 16px 20px minmax(0, 1fr) 28px 28px; align-items: center; gap: 6px; min-height: 36px; padding: 0 4px 0 8px; border-radius: 10px; background: var(--chip); font-size: 13px; cursor: grab; transition: opacity .15s, box-shadow .15s; }
.ordl-row.drag { opacity: .45; }
.ordl-row:active { cursor: grabbing; }
.ordl-row em { font-style: normal; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ordl-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ordl-grip { color: var(--muted); display: grid; place-items: center; }
.ordl-b { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.ordl-b:hover:not(:disabled) { background: var(--card); }
.ordl-b:disabled { opacity: .25; cursor: default; }
.ordl-b:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }

/* =============================================================================================
   Lancia i dadi: brand a sinistra, tre skin a destra */
.xmodal.wide:has(.dice) { width: min(1280px, 100%); }
.dice { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; }
.dice-form { display: grid; gap: 16px; position: sticky; top: 0; }
.dice-intro { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink2); }
.dice-logo { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; }
.dice-logo-b { display: grid; place-items: center; height: 64px; border-radius: 14px; background: repeating-conic-gradient(var(--chip) 0 25%, var(--card) 0 50%) 0 0 / 12px 12px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.dice-logo-b img { max-width: 84%; max-height: 70%; object-fit: contain; }
.dice-logo-b em { font-size: 11px; font-style: normal; color: var(--muted); }
.dice-logo-a { display: grid; gap: 6px; justify-items: start; }
.dice-g { display: grid; gap: 10px; }
.dice-g.dice-g2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.dice-gl { font-size: 12px; font-weight: 700; color: var(--muted); }
.dice-col { grid-template-columns: 38px minmax(0, 1fr) 92px; }
.dice-col .color-sw { width: 38px; height: 38px; border-radius: 12px; }
.dice-x { padding: 0; border: 0; background: none; color: var(--red); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.dice-sw { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.dice-sw span { cursor: pointer; }
.dice-out { display: grid; gap: 14px; min-width: 0; }
.dice-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dice-bar .sp { flex: 1; }
.dice-roll { display: inline-flex; align-items: center; gap: 12px; height: 52px; padding: 0 24px 0 10px; border: 0; border-radius: 999px; background: var(--red); color: #fff; font: inherit; font-size: 15px; cursor: pointer; box-shadow: 0 10px 24px rgba(227, 30, 36, .32); transition: transform .2s, box-shadow .2s; }
.dice-roll:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(227, 30, 36, .38); }
.dice-roll:active { transform: translateY(1px); }
.dice-roll:disabled { opacity: .7; cursor: progress; }
.dice-roll:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.dice-die { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: #fff; color: var(--red); }
.dice-code { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.dice-code input { width: 78px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--chip); color: var(--ink); font: 600 13px ui-monospace, Menlo, monospace; outline: 0; }
.dice-code input:focus { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.dice-empty { display: grid; gap: 14px; padding: 18px; border: 1.5px dashed var(--line2); border-radius: 18px; }
.dice-empty p { margin: 0; font-size: 13px; color: var(--muted); }
.dice-empty-d { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dice-empty-c { display: grid; gap: 4px; align-content: start; min-height: 120px; padding: 14px; border-radius: 14px; background: var(--chip); }
.dice-empty-c b { font-size: 14px; }
.dice-empty-c small { font-size: 12px; color: var(--muted); line-height: 1.4; }
.dice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; perspective: 1200px; }
.dice-card { display: grid; grid-template-rows: auto auto 1fr auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.dice-card:hover { border-color: var(--line2); box-shadow: var(--sh-sm); }
.dice-card.kept { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.dice-card-h { display: grid; gap: 2px; padding: 12px 14px 10px; }
.dice-card-h b { font-size: 15px; font-weight: 750; }
.dice-card-h small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.dice-pv { position: relative; overflow: hidden; aspect-ratio: 16 / 12; background: var(--chip); border-block: 1px solid var(--line); cursor: ns-resize; }
.dice-pv.is-m { aspect-ratio: auto; height: 340px; }
.dice-pv-in { position: absolute; top: 0; transform-origin: 0 0; overflow: hidden; pointer-events: none; }
.dice-pv.is-m .dice-pv-in { box-shadow: 0 0 0 1px var(--line); }
.dice-notes { margin: 0; padding: 10px 14px 0 30px; display: grid; gap: 4px; font-size: 11.5px; line-height: 1.4; color: var(--ink2); }
.dice-card-f { display: flex; align-items: center; gap: 8px; padding: 12px 14px 14px; }
.dice-seed { flex: 1; font: 600 11px ui-monospace, Menlo, monospace; color: var(--muted); }
.dice-keep { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 11px; background: var(--card); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.dice-keep.on { background: var(--ink); border-color: var(--ink); color: var(--card); }
@media (max-width: 1100px) {
  .dice { grid-template-columns: 1fr; }
  .dice-form { position: static; }
  .dice-grid, .dice-empty-d { grid-template-columns: 1fr; }
  .dice-pv { aspect-ratio: 16 / 10; }
}
@media (max-width: 560px) {
  .dice-g.dice-g2 { grid-template-columns: 1fr; }
  .dice-roll { width: 100%; justify-content: center; }
  .dice-bar .sp { display: none; }
}
.dice-form, .dice-g:not(.dice-g2) { grid-template-columns: minmax(0, 1fr); }
.dice-form > *, .dice-g > * { min-width: 0; }
.dice-form .xfield input { width: 100%; min-width: 0; }
.dice-g.dice-g2 { align-items: start; } .dice .xfield { align-content: start; }
.dice .xfield + .xfield { margin-top: 0; }
.dice-common { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--chip); font-size: 12px; line-height: 1.45; color: var(--ink2); }
.dice-common p { margin: 0; }

/* Percorso di presentazione */
.tour-nav { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 14px; background: var(--chip); }
.tour-cur { display: grid; min-width: 200px; max-width: 320px; padding: 4px 12px; border: 0; border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; box-shadow: var(--sh-sm); }
.tour-cur small { font-size: 11px; font-weight: 700; color: var(--red); }
.tour-cur b { overflow: hidden; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.pv .w-tour { animation: tour-flash 2.4s ease-out forwards; }
@keyframes tour-flash { 0%, 55% { box-shadow: inset 0 0 0 3px var(--red), 0 0 0 6px rgba(227, 30, 36, .18); } 100% { box-shadow: inset 0 0 0 3px transparent, 0 0 0 6px transparent; } }
.tour-note { position: absolute; left: 20px; bottom: 20px; z-index: 40; max-width: min(380px, calc(100% - 40px)); padding: 14px 16px; border-radius: 16px; background: var(--solid); color: var(--on-solid); box-shadow: var(--sh-lg); }
.tour-note small { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 700; opacity: .6; }
.tour-note p { margin: 0; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.tour-pickhint { position: absolute; top: 14px; left: 50%; z-index: 40; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--red); color: #fff; font-size: 13px; font-weight: 700; transform: translateX(-50%); box-shadow: var(--sh-md, var(--sh-lg)); white-space: nowrap; }
.tour-panel { display: flex; flex-direction: column; width: 380px; flex: none; min-height: 0; border-left: 1px solid var(--line); background: var(--card); }
.tour-panel > header { display: grid; gap: 4px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.tour-panel > header b { font-size: 15px; }
.tour-panel > header small, .tour-panel > footer small { font-size: 12px; line-height: 1.45; color: var(--muted); }
.tour-list { flex: 1; min-height: 0; margin: 0; padding: 10px 12px; overflow: auto; list-style: none; display: grid; align-content: start; gap: 8px; }
.tour-it { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; transition: border-color .2s; }
.tour-it.on { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.tour-it-h { display: flex; align-items: center; gap: 4px; }
.tour-n { flex: none; width: 28px; height: 28px; margin-right: 4px; border: 0; border-radius: 9px; background: var(--ink); color: var(--card); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.tour-it.on .tour-n { background: var(--red); color: #fff; }
.tour-t { flex: 1; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 700; outline: 0; }
.tour-t:hover { background: var(--chip); }
.tour-t:focus { border-color: var(--red); background: var(--card); }
.tour-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.tour-w { color: var(--ink2); font-weight: 600; }
.tour-w.off { font-weight: 400; color: var(--muted); }
.tour-lnk { padding: 0; border: 0; background: none; color: var(--red); font: inherit; font-weight: 700; cursor: pointer; }
.tour-note-in { width: 100%; min-height: 54px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--chip); color: var(--ink); font: inherit; font-size: 13px; line-height: 1.45; resize: vertical; outline: 0; }
.tour-note-in:focus { border-color: var(--red); background: var(--card); box-shadow: 0 0 0 4px var(--red-soft); }
.tour-empty { margin: 0; padding: 4px 18px; font-size: 13px; line-height: 1.5; color: var(--ink2); }
.tour-panel > footer { display: grid; gap: 8px; justify-items: start; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
@media (max-width: 900px) {
  .present-body { position: relative; }
  .tour-panel { position: absolute; inset: auto 0 0 0; z-index: 45; width: auto; max-height: 62%; border-left: 0; border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; box-shadow: var(--sh-lg); }
  .tour-cur { min-width: 0; max-width: 46vw; }
  .tour-note { left: 12px; bottom: 12px; }
}
.tour-list { grid-template-columns: minmax(0, 1fr); }
.tour-it { min-width: 0; }
.tour-it-h .xibtn, .tour-it-h .ibtn { flex: none; }
.tour-note-in, .tour-t { box-sizing: border-box; }
.tour-it-h .ibtn { flex: none; width: 30px; height: 30px; border-radius: 9px; }
@media (max-width: 600px) {
  .present-bar { gap: 6px; padding: 8px; }
  .present-bar .seg-i > span:not(.ico), .present-bar > .xbtn > span:not(.ico) { display: none; }
  .present-bar > .xbtn { padding: 0 11px; }
  .tour-cur { max-width: 44vw; padding: 3px 10px; }
}
.tour-it { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 600px) { .present-bar .seg-i span:not(.ico), .present-bar > .xbtn span:not(.ico) { display: none; } .present-bar .seg-i span.ico, .present-bar > .xbtn span.ico { display: grid; } }

/* Verifica prima della consegna */
.ex-check { display: flex; align-items: center; gap: 18px; padding: 18px 22px; margin-bottom: 8px; border: 1.5px solid var(--line2); }
.ex-check h3 { margin: 0 0 4px; font-size: 16px; }
.ex-check p { margin: 0; max-width: 70ch; font-size: 13px; line-height: 1.5; color: var(--ink2); }
.ex-check > div { flex: 1; min-width: 0; }
.ex-check-ic { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: var(--red-soft); color: var(--red); }
@media (max-width: 640px) { .ex-check { flex-wrap: wrap; } .ex-check .xbtn { width: 100%; justify-content: center; } }
.verify-host { position: fixed; left: -30000px; top: 0; height: 900px; overflow: hidden; opacity: 0; pointer-events: none; z-index: -1; }
.verify-host .pv-scroll { height: 100%; }
.xmodal.wide:has(.vf) { width: min(860px, 100%); }
.vf { display: grid; gap: 14px; }
.vf-run { display: flex; align-items: center; gap: 12px; min-height: 120px; justify-content: center; font-size: 14px; color: var(--ink2); }
.vf-spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--red); animation: vf-spin .8s linear infinite; }
@keyframes vf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vf-spin { animation-duration: 3s; } }
.vf-sum { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; background: var(--chip); }
.vf-sum > div { display: grid; gap: 2px; }
.vf-sum b { font-size: 15px; }
.vf-sum small { font-size: 12px; color: var(--muted); }
.vf-sum .sp { flex: 1; }
.vf-sum-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--card); }
.vf-sum.bad .vf-sum-ic { background: var(--red); color: #fff; }
.vf-sum.mid .vf-sum-ic { background: #f4b400; color: #1d1600; }
.vf-sum.ok .vf-sum-ic { background: #1f9d55; color: #fff; }
.vf-list { display: grid; gap: 12px; }
.vf-area { display: grid; gap: 6px; }
.vf-area > header { display: flex; align-items: center; gap: 8px; padding: 4px 2px; }
.vf-area > header b { font-size: 14px; }
.vf-area > header small { margin-left: auto; font-size: 12px; color: var(--muted); }
.vf-dot { width: 9px; height: 9px; border-radius: 50%; background: #1f9d55; }
.vf-dot.mid { background: #f4b400; }
.vf-dot.bad { background: var(--red); }
.vf-it { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-left-width: 3px; border-radius: 12px; }
.vf-it.err { border-left-color: var(--red); }
.vf-it.warn { border-left-color: #f4b400; }
.vf-it.done { border-left-color: #1f9d55; opacity: .7; }
.vf-it-t { flex: 1; min-width: 0; display: grid; gap: 3px; }
.vf-it-t b { font-size: 13.5px; }
.vf-it-t small { font-size: 12.5px; line-height: 1.45; color: var(--ink2); overflow-wrap: anywhere; }
.vf-it-a { flex: none; display: flex; gap: 6px; }
.vf-sw { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
.vf-sw i { display: grid; place-items: center; width: 40px; height: 26px; border-radius: 7px; font-style: normal; font-weight: 800; font-size: 12px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
@media (max-width: 640px) { .vf-it { flex-wrap: wrap; } .vf-it-a { width: 100%; } .vf-it-a .xbtn { flex: 1; justify-content: center; } }

/* Cosa c'è di nuovo */
.xmodal.wide:has(.news) { width: min(1100px, 100%); }
.news { display: grid; gap: 14px; }
.news-intro { margin: 0; max-width: 78ch; font-size: 13px; line-height: 1.5; color: var(--ink2); }
.news-empty { margin: 0; padding: 24px; border: 1.5px dashed var(--line2); border-radius: 16px; font-size: 14px; color: var(--ink2); text-align: center; }
.news > .seg { justify-self: start; max-width: 100%; overflow-x: auto; }
.news-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 2px; }
.news-tags i { padding: 2px 8px; border-radius: 999px; background: var(--chip); font-size: 11px; font-style: normal; font-weight: 700; color: var(--ink2); }
.news-tags i.bold { background: var(--red-soft); color: var(--red); }
.news-tags time { margin-left: auto; font-size: 11px; color: var(--muted); }
.news-act { display: flex; gap: 8px; }
.news-more { display: flex; justify-content: center; }
@media (max-width: 900px) { .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .news-grid { grid-template-columns: 1fr; } }

/* =============================================================================================
   Proposta al cliente (?proposta#token): demo a sinistra, widget spiegati e commenti a destra */
.mode-proposal { margin: 0; background: #eceef1; color: #14171c; font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif; }
.prop-load { display: grid; place-items: center; height: 100vh; }
.prop-load span { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #d3d7de; border-top-color: #14171c; animation: vf-spin .8s linear infinite; }
.prop-gone { max-width: 460px; margin: 18vh auto; padding: 28px; border-radius: 22px; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .08); }
.prop-gone b { font-size: 18px; }
.prop-gone p { margin: 8px 0 0; line-height: 1.5; color: #4b5260; }
.prop { display: flex; flex-direction: column; height: 100vh; }
.prop-top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 12px 20px; background: #fff; border-bottom: 1px solid #e2e5ea; }
.prop-brand { display: flex; align-items: center; height: 36px; }
.prop-brand img { max-height: 36px; max-width: 150px; object-fit: contain; }
.prop-brand b { font-size: 18px; }
.prop-title { display: grid; min-width: 0; margin-right: auto; }
.prop-title h1 { margin: 0; overflow: hidden; font-size: 16px; font-weight: 750; white-space: nowrap; text-overflow: ellipsis; }
.prop-title small { font-size: 12px; color: #6b7280; }
.prop-pages, .prop-dev { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: #f0f2f5; overflow-x: auto; scrollbar-width: none; }
.prop-pages button, .prop-dev button, .prop-pick { height: 32px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: #4b5260; font: inherit; font-size: 13px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.prop-pages button.on, .prop-dev button.on { background: #fff; color: #14171c; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.prop :focus-visible { outline: 2px solid #14171c; outline-offset: 2px; }
.prop-body { flex: 1; min-height: 0; display: flex; }
.prop-stage { flex: 1; min-width: 0; display: flex; justify-content: center; padding: 16px; }
.prop-pv { width: 100%; height: 100%; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 10px 40px rgba(20, 23, 28, .08); }
.prop-stage.is-m { align-items: center; }
.prop-stage.is-m .prop-pv { width: auto; height: min(868px, 100%); aspect-ratio: 414 / 868; border: 12px solid #0b0b0d; border-radius: 48px; }
.prop-side { width: 400px; flex: none; overflow-y: auto; padding: 16px 18px 40px; background: #fff; border-left: 1px solid #e2e5ea; }
.prop-msg { margin-bottom: 16px; padding: 14px 16px; border-radius: 14px; background: #f6f7f9; }
.prop-msg p { margin: 0; font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.prop-side-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.prop-side-h b { font-size: 14px; }
.prop-pick { background: #f0f2f5; color: #14171c; }
.prop-pick.on { background: #14171c; color: #fff; }
.prop-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.prop-it { border: 1px solid #e2e5ea; border-radius: 14px; transition: border-color .2s, box-shadow .2s; }
.prop-it.on { border-color: #14171c; box-shadow: 0 6px 20px rgba(20, 23, 28, .08); }
.prop-it-h { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.prop-it-h > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.prop-it-h b { font-size: 13.5px; }
.prop-it-h small { font-size: 12px; color: #6b7280; }
.prop-it-h em { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #14171c; color: #fff; font-size: 11px; font-style: normal; font-weight: 800; display: grid; place-items: center; }
.prop-n { flex: none; width: 26px; height: 26px; border-radius: 8px; background: #f0f2f5; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.prop-it.on .prop-n { background: #14171c; color: #fff; }
.prop-it-b { display: grid; gap: 10px; padding: 0 12px 12px 48px; font-size: 13px; line-height: 1.55; color: #343a46; }
.prop-it-b p { margin: 0; }
.prop-v { padding-left: 10px; border-left: 2px solid #d3d7de; color: #4b5260; }
.prop-it-b details summary { font-weight: 700; cursor: pointer; }
.prop-it-b details p { margin-top: 6px; }
.prop-feats { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.prop-feats li { padding: 3px 9px; border-radius: 999px; background: #f0f2f5; font-size: 11.5px; font-weight: 600; }
.prop-thread { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.prop-thread li { padding: 8px 10px; border-radius: 10px; background: #f6f7f9; }
.prop-thread li.staff { background: #14171c; color: #fff; }
.prop-thread li b { font-size: 12px; }
.prop-thread li b i { margin-left: 4px; font-style: normal; font-weight: 600; opacity: .6; }
.prop-thread li p { margin: 2px 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.prop-thread li time { font-size: 11px; opacity: .6; }
.prop-form { display: grid; gap: 6px; }
.prop-form input, .prop-form textarea { box-sizing: border-box; width: 100%; padding: 8px 10px; border: 1px solid #d3d7de; border-radius: 10px; background: #fff; color: inherit; font: inherit; font-size: 13px; outline: 0; }
.prop-form textarea { resize: vertical; min-height: 56px; }
.prop-form input:focus, .prop-form textarea:focus { border-color: #14171c; box-shadow: 0 0 0 3px rgba(20, 23, 28, .1); }
.prop-form button { justify-self: start; height: 34px; padding: 0 16px; border: 0; border-radius: 10px; background: #14171c; color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.prop-form button:disabled { opacity: .5; }
.prop-err { color: #c81e1e; font-size: 12px; }
.prop-general { display: grid; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid #e2e5ea; }
.prop-general > b { font-size: 14px; }
@media (max-width: 900px) {
  .prop { height: auto; min-height: 100vh; }
  .prop-top { gap: 10px; padding: 10px 12px; }
  .prop-title { flex-basis: calc(100% - 170px); }
  .prop-pages { order: 3; width: 100%; }
  .prop-body { flex-direction: column; }
  .prop-stage { height: 72vh; padding: 10px; }
  .prop-stage.is-m .prop-pv { border-width: 8px; border-radius: 36px; }
  .prop-side { width: auto; border-left: 0; border-top: 1px solid #e2e5ea; }
}

/* Proposte al cliente (Studio) */
.xmodal.wide:has(.pz) { width: min(860px, 100%); }
.pz { display: grid; gap: 14px; }
.pz-intro { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink2); }
.pz-warn { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--chip); font-size: 12.5px; color: var(--ink2); }
.pz-form { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line2); border-radius: 16px; }
.pz-form textarea { padding: 10px 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--chip); color: var(--ink); font: inherit; font-size: 14px; line-height: 1.5; resize: vertical; outline: 0; }
.pz-form textarea:focus { border-color: var(--red); background: var(--card); box-shadow: 0 0 0 4px var(--red-soft); }
.pz-form-a { display: flex; gap: 8px; flex-wrap: wrap; }
.pz-empty { margin: 0; font-size: 13px; color: var(--muted); }
.pz-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.pz-it { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; }
.pz-it.off { opacity: .65; }
.pz-it-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pz-it-t { display: grid; flex: 1; min-width: 0; }
.pz-it-t b { font-size: 14.5px; }
.pz-it-t small { font-size: 12px; color: var(--muted); }
.pz-com { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.pz-com.new { border-color: var(--red); }
.pz-com i { padding: 1px 7px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-style: normal; }
.pz-it-a { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pz-act { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: 12px; color: var(--muted); }
.pz-threads { display: grid; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.pz-th { display: grid; gap: 6px; }
.pz-th > b { font-size: 13px; }
.pz-th ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.pz-th li { padding: 8px 10px; border-radius: 10px; background: var(--chip); }
.pz-th li.staff { background: var(--solid); color: var(--on-solid); }
.pz-th li span { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.pz-th li time { opacity: .6; }
.pz-th li p { margin: 2px 0 0; font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.pz-del { margin-left: auto; padding: 0 6px; border: 0; background: none; color: inherit; font-size: 16px; opacity: .5; cursor: pointer; }
.pz-del:hover { opacity: 1; }
.pz-reply { display: flex; gap: 6px; }
.pz-reply input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; font-size: 13px; outline: 0; }
.pz-reply input:focus { border-color: var(--red); }
.rail-i .rail-new, .proj-new { position: absolute; top: 8px; right: 8px; min-width: 9px; height: 9px; border-radius: 5px; background: var(--red); box-shadow: 0 0 0 2px #111; }
.proj-new { top: 10px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; color: #fff; font-size: 10.5px; font-style: normal; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--card); z-index: 2; }
.ex-unread { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; }

/* ===== Questionario per una skin nuova: grande e leggibile anche su un monitor condiviso in riunione ===== */
.xmodal.wide:has(.qz) { width: min(1180px, 100%); }
.pref-col { display: grid; gap: 10px; cursor: default; }
.pref-sel { width: 100%; }
.qz { display: grid; gap: 18px; }
.qz-dots { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.qz-dots li { flex: 1; min-width: 0; }
.qz-dots button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px 10px; border: 0; border-bottom: 3px solid var(--line); background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; text-align: left; cursor: pointer; transition: color .2s, border-color .2s; }
.qz-dots button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qz-dots i { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--chip); font-style: normal; font-size: 11px; }
.qz-dots .done button { color: var(--ink); border-color: var(--ink); }
.qz-dots .on button { color: var(--ink); border-color: var(--red); }
.qz-dots .on i { background: var(--red); color: #fff; }
.qz-dots button:hover, .qz-dots button:focus-visible { color: var(--ink); outline: 0; }
.qz-step { display: grid; gap: 14px; min-height: 360px; align-content: start; }
.qz-h { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.qz-say { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--chip); font-size: 13px; line-height: 1.5; color: var(--muted); }
.qz-say .ico { margin-top: 2px; color: var(--ink); }
.qz-say b { color: var(--ink); margin-right: 4px; }
.qz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.qz-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qz-opt { display: grid; align-content: start; gap: 4px; min-height: 96px; padding: 16px 18px; border: 1.5px solid var(--line2); border-radius: 18px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
.qz-opt b { font-size: 16px; font-weight: 750; }
.qz-opt small { font-size: 13px; line-height: 1.45; color: var(--muted); }
.qz-opt:hover { border-color: var(--ink); transform: translateY(-2px); }
.qz-opt:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.qz-opt.on { border-color: var(--red); box-shadow: 0 0 0 2px var(--red), 0 6px 18px rgba(227, 30, 36, .12); }
.qz-fam { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.qz-fam b { color: var(--ink); }
.qz-logo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.qz-logo-b { display: grid; place-items: center; width: 120px; height: 64px; border-radius: 14px; background: repeating-conic-gradient(var(--chip) 0 25%, var(--card) 0 50%) 0 0 / 12px 12px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.qz-logo-b img { max-width: 84%; max-height: 70%; object-fit: contain; }
.qz-logo-b em { font-size: 11px; font-style: normal; color: var(--muted); }
.qz-sw { display: flex; gap: 6px; }
.qz-sw i { width: 28px; height: 28px; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.qz-pals { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.qz-pal { display: grid; gap: 6px; padding: 8px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s; }
.qz-pal span { display: grid; grid-template-columns: 2fr 1fr 1fr; height: 26px; border-radius: 8px; overflow: hidden; }
.qz-pal small { font-size: 12px; font-weight: 700; }
.qz-pal:hover { border-color: var(--ink); }
.qz-pal.on { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.qz-name { max-width: 360px; }
.qz-pairs { display: grid; gap: 12px; }
.qz-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qz-pair .qz-opt { grid-template-columns: 132px minmax(0, 1fr); align-items: center; column-gap: 16px; min-height: 0; padding: 12px 16px 12px 12px; }
.qz-pair .qz-opt b { grid-column: 2; grid-row: 1 / 3; align-self: center; }
/* il disegnino della coppia: un pezzo di sito finto */
.qz-art { grid-row: 1 / 3; display: grid; grid-template-rows: 12px 1fr 10px; gap: 6px; height: 84px; padding: 8px; border-radius: 12px; background: #f3f3f6; --qa: #2f5bea; --qb: #d9dce6; --qr: 6px; }
.qz-art i, .qz-art-g i { display: block; border-radius: var(--qr); background: var(--qb); }
.qz-art-h { background: var(--qa) !important; width: 58%; }
.qz-art-g { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.qz-art-b { width: 40%; background: var(--qa) !important; opacity: .55; }
.qz-art.is-dark { background: #15161c; --qb: #2c2f3b; --qa: #7c8cff; }
.qz-art.is-round { --qr: 12px; }
.qz-art.is-square { --qr: 1px; }
.qz-art.is-airy .qz-art-g { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 2px 6px; }
.qz-art.is-dense { gap: 4px; }
.qz-art.is-dense .qz-art-g { gap: 3px; }
.qz-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.qz-skip { font-size: 12px; color: var(--muted); }
.qz-res { display: grid; gap: 14px; }
.qz-res-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qz-res-bar p { margin: 0; font-size: 14px; color: var(--muted); }
.qz-res-bar .sp { flex: 1; }
.qz-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.qz-card { display: grid; grid-template-rows: auto auto 1fr auto; border: 1px solid var(--line); border-radius: 18px; background: var(--card); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.qz-card:hover { border-color: var(--line2); box-shadow: var(--sh-sm); }
.qz-card > header { padding: 12px 14px 10px; }
.qz-card > header b { font-size: 16px; font-weight: 800; }
.qz-why { display: grid; gap: 4px; margin: 0; padding: 12px 14px 0 30px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.qz-card > footer { display: flex; justify-content: flex-end; padding: 12px 14px 14px; }
.qz-choose { display: grid; gap: 10px; }
.qz-choose .qz-opt { grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; min-height: 0; }
.qz-choose .qz-opt b, .qz-choose .qz-opt small { grid-column: 2; }
.qz-ic { grid-row: 1 / 3; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--ink); color: var(--card); }
.qz-choose .qz-opt:first-child .qz-ic { background: var(--red); color: #fff; }
.qz-tip { margin: 14px 0 0; font-size: 12px; color: var(--muted); }
@media (max-width: 860px) {
  .qz-cards { grid-template-columns: 1fr; }
  .qz-grid-3 { grid-template-columns: 1fr; }
  .qz-pair { grid-template-columns: 1fr; }
  .qz-dots span { display: none; }
  .qz-h { font-size: 21px; }
  .qz-step { min-height: 0; }
}

/* ===== Flussi: barra dei passi sopra l'anteprima e pannello del flusso ===== */
.pnav-fl { margin-left: 6px; position: relative; }
.pnav-fl::before { content: ''; position: absolute; left: -4px; top: 9px; bottom: 9px; width: 1px; background: var(--line2); }
.flowbar { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: -4px; }
.flowbar-l { flex: 1; display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.flowbar-l::-webkit-scrollbar { display: none; }
.flowbar-i { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.flowbar-i b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--chip); color: var(--ink); font-size: 12px; }
.flowbar-i:hover { color: var(--ink); border-color: var(--line2); }
.flowbar-i.fb-past b { background: var(--ink); color: var(--card); }
.flowbar-i.on { color: var(--ink); border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.flowbar-i.on b { background: var(--red); color: #fff; }
.flowbar-i:focus-visible, .flowbar-a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.flowbar-a { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer; }
.flowbar-a:disabled { opacity: .35; cursor: default; }
.flowp .flowp-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; font-weight: 800; }
.flowp .flowp-h small { display: grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--chip); font-size: 11px; }
.flowp-steps { display: grid; gap: 4px; margin: 0 0 10px; padding: 0; list-style: none; counter-reset: none; }
.flowp-steps button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: 12px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background .2s, border-color .2s; }
.flowp-steps button > b { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; background: var(--chip); font-size: 12px; }
.flowp-steps button span { display: grid; gap: 1px; min-width: 0; }
.flowp-steps em { font-style: normal; font-size: 13px; font-weight: 700; }
.flowp-steps small { font-size: 12px; color: var(--muted); }
.flowp-steps button:hover { background: var(--chip); }
.flowp-steps button.on { border-color: var(--line2); background: var(--card); box-shadow: var(--sh-sm); }
.flowp-steps button.on > b { background: var(--red); color: #fff; }
.flowp-steps button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* Colori delle parti: gruppi compatti, la parte si accende nell'anteprima */
.parts-sec { display: grid; gap: 10px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.parts-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 0; border: 0; background: none; color: var(--ink); text-align: left; }
.parts-h span { display: grid; gap: 2px; min-width: 0; }
.parts-h b { font-size: 14px; }
.parts-h small { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.part-g { display: grid; gap: 8px; padding: 12px; margin-top: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--chip); transition: border-color .2s, background .2s; }
.part-g:hover { border-color: var(--line2); background: var(--card); }
.part-gh { display: flex; align-items: flex-start; gap: 8px; }
.part-gh > span { display: grid; gap: 2px; flex: 1; min-width: 0; }
.part-gh b { font-size: 13px; }
.part-gh small { font-size: 11px; color: var(--muted); line-height: 1.35; }
.part-find { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--muted); }
.part-find:hover { color: var(--ink); border-color: var(--line2); }
.part-f { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.part-f .color-sw { width: 34px; height: 34px; border-radius: 10px; }
.part-f .color-sw.is-auto { background: conic-gradient(from 45deg, var(--ink) 0 25%, var(--card) 0 50%, var(--ink) 0 75%, var(--card) 0) 0 0 / 12px 12px; opacity: .35; }
.part-f:not(.own) .color-sw { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), inset 0 0 0 3px var(--chip); }
.part-f .color-l b { font-size: 12.5px; }
.part-act { display: flex; align-items: center; gap: 6px; }
.part-act .hex { width: 84px; height: 32px; }
.part-act .color-reset { height: 32px; }
.part-own { height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); color: var(--ink); font-size: 11.5px; font-weight: 700; }
.part-own:hover { border-color: var(--line2); }
.pv .spot-on { outline: 2px dashed #e5383b !important; outline-offset: -2px; animation: spotPulse 1.1s ease-in-out infinite; }
@keyframes spotPulse { 50% { outline-color: rgba(229, 56, 59, .35); } }
@media (prefers-reduced-motion: reduce) { .pv .spot-on { animation: none; } }

/* Colori del widget selezionato */
.bcol { display: grid; gap: 10px; }
.bcol-used { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.bcol-chip { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 5px 8px 5px 5px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); font-size: 12px; font-weight: 600; color: var(--ink); cursor: pointer; transition: border-color .15s; }
.bcol-chip:hover { border-color: var(--line2); }
.bcol-chip > span:last-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcol-chip .color-sw { flex: none; width: 26px; height: 26px; border-radius: 8px; }
.bcol-empty { font-size: 12px; color: var(--muted); }
.bcol-own { margin-top: 4px; }
.bcol-fields { display: grid; gap: 8px; padding: 10px 0 2px; }
.flowback { position: sticky; top: 0; z-index: 3; margin: 0 0 12px; padding: 4px 0 8px; background: linear-gradient(var(--card) 75%, transparent); }
.flowback-b { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 8px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); color: var(--ink); font-size: 12.5px; font-weight: 700; }
.flowback-b:hover { border-color: var(--line2); }
