/* Pannello — stile del design fatto con Claude Design (ottobre 2026): tema scuro caldo di
   base, versione chiara, caratteri Geist, icone Material Symbols Rounded, menu in alto a
   pillola. Il colore d'accento (--accent) è quello del cliente.
   Il tema si sceglie nel proprio account: html[data-theme="dark" | "light"]. */

@font-face { font-family: "Geist"; src: url("/caratteri/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/caratteri/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1b1a18; --surface: #2a2926; --card: linear-gradient(180deg, #2b2a27 0%, #22211f 100%); --pill: #242321;
  --surface-glass: rgba(44, 43, 40, 0.9); --well: #131210;
  --fill: rgba(255, 255, 255, 0.06); --fill-2: rgba(255, 255, 255, 0.11);
  --text: #f4f2ee; --text-2: #aaa59c; --text-3: #7d7972;
  --line: rgba(255, 255, 255, 0.09); --line-strong: rgba(255, 255, 255, 0.2);
  --glass: rgba(27, 26, 24, 0.8); --scrim: rgba(0, 0, 0, 0.55);
  --shadow: none; --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.6);
  --accent: #ffa66e; --on-accent: #1b1a18; --accent-soft: rgba(255, 166, 110, 0.16);
  --ok: #4fdc86; --ok-bg: rgba(48, 209, 88, 0.14);
  --info: #7ab6ff; --info-bg: rgba(100, 168, 255, 0.14);
  --warn: #ffbe5c; --warn-bg: rgba(255, 179, 64, 0.14);
  --err: #ff7a70; --err-bg: rgba(255, 105, 97, 0.15);
  --toast: #f4f2ee; --toast-fg: #1b1a18;
  --font: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --blur: blur(24px) saturate(160%);
  --glow-1: rgba(5, 182, 239, 0.2); --glow-2: rgba(140, 50, 180, 0.26);
  --shadow-menu: 0 12px 32px -14px rgba(0, 0, 0, 0.7);
  --shadow-float: 0 30px 80px -24px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.04);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f1ed; --surface: #fff; --card: #fff; --pill: #fff;
  --surface-glass: rgba(255, 255, 255, 0.88); --well: #e8e5df;
  --fill: rgba(28, 27, 25, 0.05); --fill-2: rgba(28, 27, 25, 0.09);
  --text: #1c1b19; --text-2: #625e57; --text-3: #8f8a82;
  --line: rgba(28, 27, 25, 0.09); --line-strong: rgba(28, 27, 25, 0.2);
  --glass: rgba(243, 241, 237, 0.8); --scrim: rgba(20, 19, 17, 0.3);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.03); --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.16);
  --on-accent: #1c1b19; --accent-soft: rgba(255, 166, 110, 0.2);
  --ok: #1b7f45; --ok-bg: rgba(36, 160, 90, 0.13);
  --info: #1c62b9; --info-bg: rgba(40, 110, 220, 0.11);
  --warn: #8f5200; --warn-bg: rgba(230, 150, 20, 0.16);
  --err: #c0261d; --err-bg: rgba(220, 50, 40, 0.1);
  --toast: #1c1b19; --toast-fg: #f4f2ee;
  --glow-1: rgba(5, 182, 239, 0.13); --glow-2: rgba(128, 34, 146, 0.1);
  --shadow-menu: 0 10px 30px -14px rgba(60, 30, 90, 0.28);
  --shadow-float: 0 30px 70px -26px rgba(60, 30, 90, 0.35), 0 2px 6px rgba(0, 0, 0, 0.04);
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--text);
  background: radial-gradient(60rem 30rem at 6% 4rem, var(--glow-1), transparent 72%),
    radial-gradient(64rem 32rem at 94% 6rem, var(--glow-2), transparent 72%), var(--bg);
  background-attachment: fixed;
  font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
h2 { font-size: 22px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }

.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.ok-text { color: var(--ok); }
.warn, .warn-text { color: var(--warn); }
.danger-text, .err-text { color: var(--err); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack.tight { gap: 8px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 6px; }
.row > .grow, .grow { flex: 1; min-width: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 560px) { .two, .three { grid-template-columns: 1fr; } }

/* --- icone (server/public/icone.svg) --------------------------------------------- */
svg.i { width: 1em; height: 1em; flex: none; fill: currentColor; font-size: 20px; vertical-align: -0.2em; }

/* --- struttura: barra in alto + pagina --------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 20; }
.support-banner {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 16px; padding: 10px 20px;
  background: #ffb648; color: #1b1a18; font-size: 14px; font-weight: 600; text-align: center;
}
.support-banner button { height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: #1b1a18; color: #fff; font: 600 13px var(--font); cursor: pointer; }
/* il menu fluttua: niente barra, sotto la pagina si sfuoca e sfuma verso il basso */
header.top {
  position: relative; isolation: isolate;
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px 20px; padding: 18px 40px;
}
header.top::before {
  content: ""; position: absolute; inset: 0 0 -36px; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, var(--glass) 0%, var(--glass) 50%, transparent 100%);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent); mask-image: linear-gradient(to bottom, #000 62%, transparent);
}
.brand { display: flex; align-items: center; gap: 12px; flex: 1 1 0; min-width: 200px; text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; flex: none; border-radius: 13px; background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; font-weight: 600; font-size: 18px; overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; background: var(--surface); padding: 4px; }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; white-space: nowrap; }
.brand-sub { font-size: 12px; color: var(--text-2); }
.brand-sub-logo { display: block; margin-top: 3px; }
.brand-sub-logo img { display: block; height: 13px; width: auto; }
/* il logo del servizio: bianco sul tema scuro (quello di base), a colori sul chiaro */
.logo-on-light { display: none !important; }
:root[data-theme="light"] .logo-on-light { display: block !important; }
:root[data-theme="light"] .logo-on-dark { display: none !important; }
.brand-mark img.service-symbol { padding: 6px; }
.brand select {
  height: 26px; min-height: 0; padding: 0 22px 0 0; border: 0; border-radius: 0; background-color: transparent; background-position: right 0 center;
  font-size: 12px; color: var(--text-2); width: auto; max-width: 14rem;
}
nav.pill {
  display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 999px; background: var(--pill); border: 1px solid var(--line);
  max-width: 100%; overflow-x: auto; scrollbar-width: none; box-shadow: var(--shadow-menu);
}
nav.pill a {
  display: flex; align-items: center; gap: 7px; height: 44px; padding: 0 18px; border-radius: 999px; color: var(--text-2);
  font-size: 14px; font-weight: 500; white-space: nowrap; text-decoration: none; transition: background 0.18s, color 0.18s;
}
nav.pill a:hover { color: var(--text); }
nav.pill a[aria-current="page"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
nav.pill svg.i { font-size: 19px; }
.nav-alert {
  display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px 0 5px; border-radius: 999px;
  background: var(--err); color: #fff; font-size: 12px; font-weight: 700;
}
.nav-alert svg.i { font-size: 14px; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 1 1 0; }
.round {
  width: 46px; height: 46px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text);
  display: grid; place-items: center; cursor: pointer; text-decoration: none; transition: background 0.18s; padding: 0;
}
.round:hover { background: var(--fill); }
.round[aria-current="page"] { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.round.avatar { background: var(--fill-2); border-color: var(--line-strong); font: 600 14px var(--font); }
.top-actions .round { background: var(--pill); box-shadow: var(--shadow-menu); }
.top-actions .round:hover { background: color-mix(in srgb, var(--pill) 88%, var(--text)); }
.top-actions .round[aria-current="page"] { background: var(--accent); }
.menu-pop {
  position: absolute; right: 40px; top: calc(100% - 6px); z-index: 30; min-width: 240px; padding: 8px; border-radius: 22px;
  background: var(--surface-glass); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: rise 0.15s ease-out;
}
.menu-pop .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-pop .who b { display: block; font-size: 15px; font-weight: 600; }
.menu-pop a, .menu-pop button {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 42px; padding: 0 12px; border: 0; border-radius: 12px;
  background: none; color: var(--text); font: 500 14px var(--font); text-decoration: none; cursor: pointer; text-align: left;
}
.menu-pop a:hover, .menu-pop button:hover { background: var(--fill); }

main.page { min-width: 0; padding: 16px 40px 96px; }
.page-inner { max-width: 1360px; margin: 0 auto; }
@media (max-width: 900px) {
  header.top { padding: 12px 16px; gap: 12px; }
  .brand { order: 1; min-width: 0; }
  .top-actions { order: 2; flex: none; }
  nav.pill { order: 3; width: 100%; }
  nav.pill a { padding: 0 14px; }
  main.page { padding: 12px 16px 72px; }
  .menu-pop { right: 16px; }
  .round { width: 38px; height: 38px; }
  .top-actions { gap: 6px; }
  .brand { gap: 10px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 12px; font-size: 16px; }
  .brand > div { overflow: hidden; }
  .brand select { max-width: 100%; }
  /* sul telefono la barra non resta ferma in alto: occuperebbe mezzo schermo */
  .topbar { position: static; }
  .support-banner { padding: 8px 12px; font-size: 13px; gap: 6px 10px; }
}

/* --- titoli di pagina ---------------------------------------------------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 8px 0 24px; }
.page-head h1, h1.title { font-size: clamp(40px, 7vw, 64px); line-height: 1.05; font-weight: 300; letter-spacing: -0.035em; }
.page-head .sub { font-size: 15px; color: var(--text-2); margin-top: 8px; }
.eyebrow { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { color: var(--text); }
.back {
  display: inline-flex; align-items: center; gap: 2px; height: 36px; padding: 0 12px 0 4px; margin: 8px 0 0 -6px; border-radius: 999px;
  color: var(--text-2); font-size: 14px; font-weight: 500; text-decoration: none;
}
.back:hover { color: var(--text); background: var(--fill); }
.back + .page-head { margin-top: 0; }
.page-head .actions, .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* --- schede ----------------------------------------------------------------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 32px; padding: 24px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 8px; }
.card.list-card { padding: 8px 24px; }
.card > h2 + * { margin-top: 16px; }
.page-inner > .card + .card, .page-inner > .card + .cards, .page-inner > .cards + .card, .page-inner > .kpis + .card { margin-top: 24px; }
.cards { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cards > * { margin: 0 !important; }
.col-main { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.col-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.grid-cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.auto-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.auto-grid > .card { margin: 0; }
.note { padding: 14px 16px; border-radius: 18px; background: var(--fill); font-size: 14px; line-height: 1.45; }
.note-row { display: flex; gap: 10px; align-items: flex-start; }

/* numeri grandi in alto */
.kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px 0; margin-bottom: 20px; padding: 30px 8px;
  border-radius: 32px; background: var(--card); border: 1px solid var(--line);
}
.kpi { display: flex; flex-direction: column; gap: 16px; padding: 0 26px; border-left: 1px solid var(--line); min-width: 0; }
.kpi:first-child { border-left-color: transparent; }
.kpi .label { font-size: 15px; color: var(--text-2); }
.kpi .value { display: flex; align-items: baseline; gap: 10px; }
.kpi .big { font-size: 56px; font-weight: 300; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .unit { font-size: 18px; color: var(--text-2); }
.kpi .foot { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.kpi .foot svg.i { font-size: 17px; }

.bar { height: 8px; border-radius: 4px; background: var(--fill-2); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width 0.25s linear; }
.bar.ok > i { background: var(--ok); } .bar.warn > i { background: var(--warn); } .bar.err > i { background: var(--err); }
.progress { height: 8px; border-radius: 4px; background: var(--fill-2); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width 0.2s; }

/* avvisi in pagina */
.banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 24px; margin-bottom: 28px; }
.banner .ic { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.banner .txt { flex: 1; min-width: 220px; }
.banner .txt b { display: block; font-size: 15px; font-weight: 600; }
.banner .txt span { display: block; font-size: 14px; color: var(--text-2); margin-top: 2px; }
.banner button, .banner a.button { height: 34px; padding: 0 14px; border: 0; background: var(--surface); box-shadow: var(--shadow); }
.banner.err { background: var(--err-bg); } .banner.err .ic { background: var(--err); }
.banner.ok { background: var(--ok-bg); border-radius: 16px; } .banner.ok .ic { background: none; color: var(--ok); width: auto; height: auto; }
.banner.info { background: var(--info-bg); } .banner.info .ic { background: var(--info); }
.banner.warn { background: var(--warn-bg); } .banner.warn .ic { background: var(--warn); color: #1b1a18; }
.error-box, .info-box { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.error-box { color: var(--err); }
.info-box { padding: 12px 14px; border-radius: 16px; background: var(--ok-bg); font-size: 14px; }

/* etichette di stato */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px;
  background: var(--fill-2); color: var(--text-2); font-size: 12px; font-weight: 600; white-space: nowrap; flex: none;
}
.badge:has(svg.i) { padding-left: 7px; }
.badge svg.i { font-size: 16px; }
.badge.big { height: 28px; font-size: 13px; padding-right: 11px; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.err { background: var(--err-bg); color: var(--err); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.accent { background: var(--accent); color: var(--on-accent); }
.glass-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px;
  background: var(--surface-glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  font-size: 12px; font-weight: 500; color: var(--text-2);
}
.glass-chip svg.i { font-size: 15px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--accent)); flex: none; }

/* --- comandi ----------------------------------------------------------------------- */
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; white-space: nowrap;
  border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--text);
  font: 600 14px var(--font); cursor: pointer; text-decoration: none; transition: background 0.15s, opacity 0.15s, transform 0.1s; flex: none;
}
button:hover:not(:disabled), .button:hover { background: var(--fill); }
button:active:not(:disabled) { transform: scale(0.98); }
button:disabled { opacity: 0.4; cursor: default; }
button.primary, .button.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; padding: 0 22px; }
button.primary:hover:not(:disabled), .button.primary:hover { background: var(--accent); filter: brightness(1.06); }
button.danger, .button.danger { color: var(--err); }
button.danger-fill { background: var(--err); color: #fff; border-color: transparent; }
button.danger-fill:hover:not(:disabled) { background: var(--err); filter: brightness(1.08); }
button.small, .button.small { height: 36px; padding: 0 14px; font-size: 13px; }
button.medium, .button.medium { height: 40px; padding: 0 18px; }
button.large, .button.large { height: 54px; font-size: 16px; }
button.wide, .button.wide { width: 100%; }
button.link { height: auto; padding: 0; border: 0; background: none; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
button.link:hover:not(:disabled) { background: none; }
button.ghost { border-color: transparent; }
button.icon, .button.icon {
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; color: var(--text-2); background: transparent;
}
button.icon:hover:not(:disabled) { background: var(--fill); color: var(--text); }
button.icon.danger:hover:not(:disabled) { background: var(--err-bg); color: var(--err); }
button.icon.large { width: 44px; height: 44px; }
button.on-surface { border: 0; background: var(--surface); box-shadow: var(--shadow); }

/* campi */
label.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; min-width: 0; }
label.field > span, .field-label { font-size: 14px; font-weight: 600; }
.hint { font-size: 13px; font-weight: 400; color: var(--text-2); line-height: 1.45; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="search"], select, textarea {
  width: 100%; height: 50px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 16px;
  background: var(--surface); color: var(--text); font: 400 15px var(--font); min-width: 0;
}
input.compact, select.compact { height: 38px; padding: 0 12px; border-radius: 10px; }
input.pill-input { border-radius: 999px; }
textarea { height: auto; min-height: 6rem; padding: 12px 18px; resize: vertical; line-height: 1.4; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer; font-weight: 500;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' fill='%23aaa59c'%3E%3Cpath d='M480-360 280-560h400L480-360Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 20px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input.code-input {
  height: 72px; max-width: 300px; font-family: var(--mono); font-size: 34px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
}
input[type="color"] { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-strong); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; margin: 0; }
label.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 500; line-height: 1.4; cursor: pointer; }

/* interruttore */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 44px; height: 26px; border-radius: 999px; background: var(--fill-2); position: relative; transition: background 0.18s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform 0.18s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* scelte: a segmenti (dentro una pillola) e a pillole separate */
.segmented { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--fill); gap: 2px; max-width: 100%; overflow-x: auto; }
.segmented button { height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font-weight: 600; }
.segmented button:hover:not(:disabled) { background: var(--fill); }
.segmented button[aria-pressed="true"], .segmented button[aria-checked="true"] { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); }
.segmented.small button { height: 34px; padding: 0 12px; font-size: 13px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { height: 46px; padding: 0 18px; border: 1px solid var(--line); }
.chips.small button { height: 38px; padding: 0 14px; font-size: 13px; }
.chips button[aria-pressed="true"], .chips button[aria-checked="true"] { background: var(--text); color: var(--bg); border-color: transparent; }
.chips button .count { font-weight: 500; opacity: 0.6; }
.radio-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-card {
  flex: 1 1 180px; display: flex; align-items: flex-start; gap: 12px; height: auto; padding: 14px 16px; border-radius: 20px;
  border: 1.5px solid var(--line-strong); background: transparent; color: var(--text); text-align: left; white-space: normal; font-weight: 400;
}
.radio-card:hover:not(:disabled) { background: var(--fill); }
.radio-card[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.radio-card b { display: block; font-size: 15px; font-weight: 600; }
.radio-card span.d { display: block; font-size: 13px; color: var(--text-2); margin-top: 2px; line-height: 1.4; }
.radio-card svg.i { font-size: 26px; margin-top: 1px; }
.days { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.days button { width: 44px; height: 40px; padding: 0; border-radius: 12px; border: 1px solid var(--line); font-size: 13px; }
.days button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.days .quick { height: auto; width: auto; border: 0; padding: 0 4px; margin-left: 6px; font-size: 13px; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.days .quick:hover:not(:disabled) { background: none; color: var(--text); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.swatch { width: 44px; height: 44px; padding: 3px; border-radius: 50%; border: 3px solid transparent; background: transparent; }
.swatch span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.swatch[aria-checked="true"], .swatch[aria-pressed="true"] { border-color: var(--text); }
.swatch:hover:not(:disabled) { background: transparent; }
/* colore personalizzato: bottone con l'arcobaleno, il selettore del sistema è invisibile sopra */
.color-custom {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 5px;
  border-radius: 999px; border: 1.5px dashed var(--line-strong); font-size: 13px; font-weight: 500; color: var(--text);
  cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.color-custom:hover { background: var(--fill); }
.color-custom.on { border: 3px solid var(--text); padding-left: 3px; }
.color-custom .dot {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: conic-gradient(#ff5a5a, #ffc94a, #6ee07a, #4ac8ff, #7a6bff, #ff6bd6, #ff5a5a);
}
.color-custom .dot[style] { background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.color-custom input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.color-custom:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- elenchi ------------------------------------------------------------------------ */
.list-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 0; border-top: 1px solid var(--line); }
.list-row:first-child { border-top-color: transparent; }
.list-row .grow b, .list-row .title { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .meta { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; }
.initials {
  width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--fill-2); display: grid; place-items: center; font-size: 14px; font-weight: 600;
}
.initials.square { border-radius: 14px; font-size: 15px; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 56px 24px; color: var(--text-2); }
.empty .ic { width: 64px; height: 64px; border-radius: 18px; background: var(--fill); display: grid; place-items: center; color: var(--text-2); }
.empty .ic svg.i { font-size: 32px; }
.empty h2 { color: var(--text); }
.empty p { max-width: 440px; font-size: 15px; line-height: 1.5; }
.thumb { width: 88px; aspect-ratio: 16 / 9; border-radius: 10px; object-fit: cover; background: var(--well); display: block; flex: none; overflow: hidden; }
.thumb.logo { object-fit: contain; background: repeating-conic-gradient(var(--fill-2) 0 25%, transparent 0 50%) 50% / 12px 12px; }
.handle { color: var(--text-3); cursor: grab; display: grid; place-items: center; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 28px; }
.steps > li { display: flex; gap: 16px; }
.steps .n { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--fill-2); display: grid; place-items: center; font-size: 14px; font-weight: 600; }
.steps .t { font-size: 17px; font-weight: 500; }
.tech { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: 13px; padding: 4px 8px; margin: 0; }
.tech dt { color: var(--text-2); }
.tech dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

/* --- anteprime degli schermi ---------------------------------------------------- */
.well { position: relative; border-radius: 26px; background: var(--well); display: flex; align-items: center; justify-content: center; padding: 18px; overflow: hidden; }
.screen-preview { position: relative; width: 100%; background: #000; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22); }
.screen-preview canvas { position: absolute; display: block; }
.well .screen-preview.dim { filter: grayscale(1) brightness(0.55); }
.well .glass-chip.corner { position: absolute; top: 12px; right: 12px; }
.well .center-chip {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 8px 12px; border-radius: 12px; white-space: nowrap;
  background: var(--surface-glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); font-size: 13px; font-weight: 600; box-shadow: var(--shadow);
}

/* scheda di uno schermo in "In onda" */
.screen-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; color: inherit; text-decoration: none; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.screen-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.screen-card .well { height: 220px; margin: 8px 8px 0; }
.screen-card .body { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px 18px; }
.screen-card .head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.screen-card .place { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.screen-card .now-line { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.screen-card .after { font-size: 13px; color: var(--text-2); }
.screen-card .foot { display: flex; align-items: center; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.screen-card .foot svg.i { font-size: 16px; }

/* miniatura che riempie il suo riquadro */
.fill-pic { position: absolute; inset: 0; background-size: cover; background-position: center; }

/* --- libreria (contenuti, foto e video) --------------------------------------------- */
.lib-head-quota { width: 200px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-2); }
.search { position: relative; flex: 1 1 260px; min-width: 0; }
.search svg.i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-2); }
.search input { border-radius: 999px; padding-left: 48px; }
.tiles { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.tile { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; color: inherit; text-decoration: none; box-shadow: var(--shadow); min-width: 0; }
.tile .pic { position: relative; margin: 8px 8px 0; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: var(--well) center / cover no-repeat; }
.tile .pic.contain { background-size: contain; }
.tile .pic .glass-chip { position: absolute; top: 8px; left: 8px; }
.tile .pic .overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 13px; font-weight: 600; }
.tile .pic .msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; font-weight: 600; text-align: center; font-size: 13px; overflow: hidden; }
.tile .body { display: flex; flex-direction: column; gap: 4px; padding: 12px 10px 10px 14px; }
.tile .name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 4px; }
.tile .meta { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); }
.tile .meta svg.i { font-size: 15px; }
.tile:hover { border-color: var(--line-strong); }
.drop {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px; border: 1.5px dashed var(--line-strong); border-radius: 18px;
  color: var(--text-2); transition: border-color 0.15s, background-color 0.15s;
}
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .ic { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--fill); display: grid; place-items: center; color: var(--text); }
.drop b { color: var(--text); font-weight: 600; }

/* --- palinsesto ------------------------------------------------------------------- */
.seq-bar { position: relative; display: flex; gap: 2px; height: 28px; border-radius: 10px; overflow: hidden; }
.seq-bar > div { min-width: 4px; background: var(--fill-2); display: flex; align-items: center; padding: 0 8px; font-size: 11px; font-weight: 600; color: var(--text-2); overflow: hidden; white-space: nowrap; }
.seq-bar > div.on { background: var(--accent); color: var(--on-accent); }
.seq-row {
  display: grid; grid-template-columns: 20px 22px 88px minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
  padding: 8px 8px 8px 4px; border-radius: 14px; background: transparent; transition: background 0.15s;
}
.seq-row:hover, .seq-row.drag-over { background: var(--fill); }
.seq-row.dragging { opacity: 0.4; }
.seq-row .n { font-size: 13px; color: var(--text-3); text-align: center; font-variant-numeric: tabular-nums; }
.seq-row .thumb { width: 88px; }
.stepper { display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 2px; border-radius: 999px; background: var(--fill); }
.stepper button { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; color: var(--text-2); }
.stepper button:hover:not(:disabled) { background: var(--fill-2); color: var(--text); }
.stepper input { width: 52px; height: 30px; padding: 0; border: 0; background: transparent; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; border-radius: 8px; }
.stepper input:focus { box-shadow: none; background: var(--surface); }
@media (max-width: 640px) {
  .seq-row { grid-template-columns: 22px minmax(0, 1fr) auto; row-gap: 8px; }
  .seq-row .handle, .seq-row .thumb { display: none; }
  .seq-row .nm { grid-column: 2; grid-row: 1; }
  .seq-row .acts { grid-column: 3; grid-row: 1; }
  .seq-row .dur { grid-column: 2 / 4; grid-row: 2; justify-self: start; text-align: left !important; }
  .seq-row .dur br { display: none; }
}
.sentence { padding: 14px 16px; border-radius: 14px; background: var(--fill); font-size: 15px; line-height: 1.5; }
.sentence b { font-weight: 600; }
.slot { display: flex; flex-direction: column; gap: 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.slot:first-of-type { padding-top: 0; border-top: 0; }
.times { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.times input { width: 120px; }

/* --- calendario ------------------------------------------------------------------- */
.legend { display: flex; gap: 10px 22px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.legend span { display: flex; align-items: center; gap: 8px; }
.legend i { width: 22px; height: 14px; border-radius: 4px; background: var(--c, var(--fill-2)); display: grid; place-items: center; }
.legend i.strip { height: 5px; border-radius: 3px; }
.cal-day { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.cal-day.today .dname { color: var(--accent); }
.cal-day .dname { font-size: 15px; font-weight: 500; }
.cal-day .ddate { font-size: 13px; color: var(--text-2); }
.cal-track { position: relative; display: flex; flex-direction: column; gap: 4px; }
.cal-segs { display: flex; gap: 2px; height: 44px; border-radius: 12px; overflow: hidden; }
.cal-segs > div {
  min-width: 0; display: flex; align-items: center; gap: 5px; padding: 0 10px; background: var(--fill-2); color: var(--text);
  font-size: 12px; font-weight: 600; overflow: hidden; white-space: nowrap;
}
.cal-segs > div svg.i { font-size: 15px; }
.cal-segs > div.special { background: var(--accent); color: var(--on-accent); }
.cal-segs > div.riserva { background: repeating-linear-gradient(135deg, var(--fill-2) 0 4px, transparent 4px 8px); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.cal-segs > div.nero { background: #000; color: #8a857d; }
.cal-segs > div.vuoto { background: var(--err-bg); color: var(--err); }
.cal-segs > div.forzatura { background: var(--info-bg); color: var(--info); }
.cal-strips { display: flex; gap: 2px; height: 5px; }
.cal-strips > div { min-width: 0; border-radius: 3px; }
.cal-strips > div.conflict { background: var(--warn); }
.cal-now { position: absolute; top: -3px; height: 50px; width: 2px; background: var(--err); border-radius: 1px; z-index: 2; }
.cal-hours { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding-top: 4px; }
.cal-hours div { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .cal-day, .cal-hours { grid-template-columns: 52px minmax(0, 1fr); gap: 10px; } .cal-segs > div { padding: 0 4px; } .cal-segs > div span { display: none; } }

/* --- finestre e avvisi --------------------------------------------------------------- */
dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; padding: 28px; border-radius: 28px;
  background: var(--surface-glass); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  animation: rise 0.18s ease-out;
}
dialog.wide { width: min(760px, calc(100vw - 32px)); }
dialog::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog form, dialog > div { display: flex; flex-direction: column; gap: 18px; }
dialog h2 { font-size: 24px; font-weight: 500; letter-spacing: -0.015em; }
dialog .lead { font-size: 15px; line-height: 1.5; color: var(--text-2); margin-top: -10px; }
dialog .actions { justify-content: flex-end; }
dialog .ic-top { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); }
dialog .ic-top.err { background: var(--err-bg); color: var(--err); }
dialog .ic-top svg.i { font-size: 24px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.toasts { position: fixed; left: 0; right: 0; bottom: 28px; z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 12px 18px; border-radius: 999px;
  background: var(--toast); color: var(--toast-fg); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: rise 0.2s ease-out; pointer-events: auto;
}
.toast.err { background: var(--err); color: #fff; border-radius: 22px; }
.toast-action { margin: -6px -10px -6px 4px; padding: 6px 12px; min-height: 0; border-radius: 999px; background: transparent; color: var(--accent); font-weight: 600; border: 0; box-shadow: none; }
.toast-action:hover { background: color-mix(in srgb, currentColor 10%, transparent); }

/* --- accesso ------------------------------------------------------------------------ */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(30rem 26rem at 38% 42%, var(--glow-1), transparent 70%), radial-gradient(34rem 28rem at 62% 58%, var(--glow-2), transparent 70%); }
.auth-box { width: min(420px, 100%); display: flex; flex-direction: column; gap: 28px; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 600; }
.auth-brand .brand-mark { width: 44px; height: 44px; border-radius: 14px; }
.auth-brand { justify-content: center; }
.auth-brand img { height: 96px; width: auto; }
.auth .card { padding: 32px; box-shadow: var(--shadow-float); }
.auth form, .auth .card > div { display: flex; flex-direction: column; gap: 18px; }
.auth h1 { font-size: 44px; font-weight: 300; letter-spacing: -0.03em; line-height: 1.05; }
.auth h1.smaller { font-size: 36px; }
.auth .lead { font-size: 15px; line-height: 1.5; color: var(--text-2); }
.auth .foot { font-size: 13px; color: var(--text-2); text-align: center; }
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { padding-right: 96px; }
.pw-wrap button { position: absolute; right: 6px; top: 6px; height: 38px; padding: 0 14px; border: 0; font-size: 13px; }
.qr img { width: 12rem; height: 12rem; background: #fff; border-radius: 16px; padding: 0.5rem; }
code.secret { font: 600 15px var(--mono); letter-spacing: 0.08em; word-break: break-all; }

/* --- editor del contenuto ---------------------------------------------------------- */
.editor { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(16rem, 28rem); align-items: start; }
.editor .preview-col { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 1000px) { .editor { grid-template-columns: 1fr; } .editor .preview-col { position: static; } }
.editor .card { display: flex; flex-direction: column; gap: 16px; }
.layer { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.layer:first-of-type { border-top: 0; padding-top: 0; }
.layer-head { display: flex; align-items: center; gap: 6px; }
.layer-head b { flex: 1; font-size: 15px; font-weight: 600; }
.media-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: 10px; max-height: 22rem; overflow: auto; padding: 3px; }
.media-pick button {
  height: auto; padding: 0; border: 0; flex-direction: column; align-items: stretch; gap: 6px; overflow: visible; border-radius: 12px;
  font-weight: 500; font-size: 12px; white-space: nowrap; background: none;
}
.media-pick button:hover:not(:disabled) { background: none; }
.media-pick img, .media-pick .ph { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--well); border-radius: 12px; display: grid; place-items: center; }
.media-pick span { overflow: hidden; text-overflow: ellipsis; text-align: left; padding: 0 2px; }
.media-pick button[aria-pressed="true"] img, .media-pick button[aria-pressed="true"] .ph { box-shadow: 0 0 0 3px var(--accent); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.pick-grid button {
  height: auto; padding: 0; border: 0; background: none; flex-direction: column; align-items: stretch; gap: 6px; text-align: left; white-space: normal; font-size: 13px;
}
.pick-grid button:hover:not(:disabled) { background: none; }
.pick-grid .pv { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--well) center / cover no-repeat; }
.pick-grid button[aria-checked="true"] .pv { box-shadow: 0 0 0 3px var(--accent); }
.pick-grid .pv .glass-chip { position: absolute; top: 6px; right: 6px; }

/* --- barra della demo ------------------------------------------------------------- */
.demo-bar { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 20px; padding: 16px 20px; border-radius: 24px; border: 1.5px dashed color-mix(in srgb, var(--warn) 60%, transparent); background: var(--warn-bg); }
.demo-bar input[type="date"], .demo-bar input[type="time"] { width: auto; height: 38px; border-radius: 10px; padding: 0 10px; }
.demo-bar .clock { font-size: 15px; font-weight: 600; }

/* --- editor delle composizioni ----------------------------------------------------- */
.composer { display: grid; grid-template-columns: 300px minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
@media (max-width: 1200px) { .composer { grid-template-columns: 280px minmax(0, 1fr); } .composer .comp-right { grid-column: 1 / -1; } }
@media (max-width: 820px) { .composer { grid-template-columns: 1fr; } }
.comp-head { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin: 8px 0 28px; }
/* «Salva nei contenuti» resta sulla riga, in fondo; «Modifiche non salvate» va sotto */
.comp-save { position: relative; flex: none; margin-left: auto; }
.comp-save .unsaved { position: absolute; top: 100%; right: 18px; margin-top: 4px; font-size: 12px; white-space: nowrap; }
.comp-break { display: none; }
/* con meno spazio i pulsanti degli strumenti restano solo con l'icona */
@media (max-width: 1440px) { .comp-tools .btn-label { display: none; } .comp-tools > button { padding: 0 14px; } }
/* ancora meno: il nome sulla prima riga, i comandi sulla seconda */
@media (max-width: 1200px) { .comp-break { display: block; flex-basis: 100%; height: 0; } }
/* il nome: un campo alto come i pulsanti, con la scritta «Composizione» dentro */
.comp-name-wrap { position: relative; display: flex; align-items: center; min-width: 200px; height: 46px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); gap: 10px; }
.comp-name-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.comp-name-wrap .eyebrow { flex: none; font-size: 12px; }
.comp-name { flex: 1; min-width: 0; height: 44px; padding: 0; border: 0; background: transparent; font-size: 16px; font-weight: 600; }
.comp-name:focus { box-shadow: none; border: 0; }
.comp-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comp-tools .segmented button { height: 38px; }
.comp-left, .comp-right { padding: 8px; position: sticky; top: 104px; max-height: calc(100vh - 128px); overflow: auto; }
@media (max-width: 820px) { .comp-left, .comp-right { position: static; max-height: none; } }
.comp-left .segmented { display: flex; width: 100%; }
.comp-left .segmented button { flex: 1; padding: 0 8px; }
.comp-section { display: flex; flex-direction: column; gap: 12px; padding: 16px 12px 8px; }
.comp-section > .field-label { color: var(--text-2); font-weight: 500; font-size: 13px; }
.comp-right .comp-section:first-child { padding-top: 12px; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini-grid.three { grid-template-columns: repeat(3, 1fr); }
.mini-card { height: auto; padding: 0; border: 0; background: none; flex-direction: column; align-items: stretch; gap: 6px; white-space: normal; text-align: left; font-size: 13px; font-weight: 500; }
.mini-card:hover:not(:disabled) { background: none; }
.mini-card .mini { position: relative; aspect-ratio: 16 / 10; border-radius: 0; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.mini-card[aria-pressed="true"] .mini, .mini-card[aria-checked="true"] .mini { box-shadow: 0 0 0 3px var(--accent); }
.mini-card .mini i { position: absolute; border-radius: 3px; }
.layout-card { height: auto; padding: 10px 6px; border-radius: 16px; border: 1px solid var(--line); flex-direction: column; gap: 8px; white-space: normal; font-size: 12px; font-weight: 500; line-height: 1.2; }
.layout-card[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.layout-card .mini { position: relative; width: 78%; aspect-ratio: 16 / 9; }
.layout-card .mini.tall { width: 34%; aspect-ratio: 9 / 16; }
.layout-card .mini i { position: absolute; background: var(--fill-2); border-radius: 3px; }
.font-card { height: auto; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); white-space: normal; text-align: left; }
.font-card .aa { font-size: 28px; line-height: 1.1; }
.font-card small { font-size: 13px; font-weight: 600; }
.font-card[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.kind-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.kind-cards button { height: auto; flex-direction: column; gap: 6px; padding: 12px 6px; border-radius: 16px; border: 1px solid var(--line); font-size: 13px; white-space: normal; }
.kind-cards button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.kind-cards svg.i { font-size: 22px; }
.widget-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; border: 1px solid var(--line); text-align: left; }
.widget-row .ic { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--fill); display: grid; place-items: center; }
.widget-row b { display: block; font-size: 15px; font-weight: 600; }
.widget-row span.d { display: block; font-size: 12.5px; color: var(--text-2); line-height: 1.35; }
.widget-row .grow { cursor: pointer; }
.el-row { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border-radius: 12px; cursor: pointer; }
.el-row:hover { background: var(--fill); }
.el-row.on { background: var(--accent-soft); font-weight: 600; }
.el-row .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; padding: 6px 0; }
.el-row button.icon { width: 30px; height: 30px; }
.comp-center { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.add-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.add-bar > span { font-size: 13px; color: var(--text-2); font-weight: 500; margin-right: 4px; }
.add-bar button { height: 42px; padding: 0 16px; }
.comp-stage { padding: 24px; border-radius: 28px; background: var(--well); display: flex; align-items: center; justify-content: center; }
.comp-stage .screen-preview { border-radius: 4px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
.comp-overlay { position: absolute; inset: 0; z-index: 2; touch-action: none; }
.comp-overlay.clean { display: none; }
.zone-box { position: absolute; border: 1.5px dashed rgba(255, 255, 255, 0.35); cursor: pointer; }
.zone-box.on { border: 2px solid var(--accent); }
.zone-box .num { position: absolute; left: 8px; bottom: 8px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.zone-box.on .num { background: var(--accent); color: var(--on-accent); }
.zone-box .empty-hint { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; color: rgba(255, 255, 255, 0.7); font-size: 13px; text-align: center; background: repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 10px, transparent 10px 20px); }
.el-box { position: absolute; border: 1.5px solid transparent; border-radius: 6px; cursor: grab; }
.el-box:hover { border-color: rgba(255, 255, 255, 0.55); }
.el-box.on { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); }
.el-box .handle { position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; cursor: nwse-resize; display: none; }
.el-box.on .handle { display: block; }
/* template grafici: elementi da scegliere sull'anteprima */
.el-box.hover { border: 1.5px dashed rgba(255, 255, 255, 0.7); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); pointer-events: none; }
.el-guide { position: absolute; background: var(--accent); pointer-events: none; }
.el-guide.v { left: 50%; top: 0; bottom: 0; width: 1px; }
.el-guide.h { top: 50%; left: 0; right: 0; height: 1px; }
.el-row.off .grow { opacity: 0.5; }
.el-inspector { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; margin-bottom: 8px; border-radius: 18px; background: var(--fill); }
.el-inspector .comp-section { padding: 0; border: 0; }
.add-grid button { display: flex; align-items: center; justify-content: flex-start; gap: 8px; text-align: left; }
.add-grid button .i { flex: none; }
.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.icon-pick button { height: 44px; padding: 0; border-radius: 12px; border: 1px solid var(--line); display: grid; place-items: center; }
.icon-pick button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.zone-pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.zone-pills button { height: 40px; padding: 0 16px 0 6px; gap: 8px; border: 1px solid var(--line); }
.zone-pills button .n { width: 28px; height: 28px; border-radius: 50%; background: var(--fill-2); display: grid; place-items: center; font-size: 12px; }
.zone-pills button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.zone-pills button[aria-pressed="true"] .n { background: rgba(0, 0, 0, 0.15); }
.zone-pills .size { margin-left: auto; font-size: 13px; color: var(--text-2); }

/* scelte su più righe: tutte le voci si vedono, anche nei pannelli stretti */
.choice-grid { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 6px; }
.choice-grid button { height: auto; min-height: 40px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; white-space: normal; line-height: 1.2; text-align: center; }
.choice-grid button { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.choice-grid.wide-first > :first-child { grid-column: 1 / -1; }
.choice-grid button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.swatch.none span { background: repeating-linear-gradient(135deg, var(--fill-2) 0 4px, transparent 4px 8px); box-shadow: inset 0 0 0 1px var(--line-strong); }
.layout-card .mini.tall, .mini-card .mini.tall { aspect-ratio: 9 / 16; }
.mini-card .mini.tall { width: 56%; margin: 0 auto; }

/* --- Foto e video: cartelle ------------------------------------------------------- */
.lib-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 24px; }
.folders { padding: 12px; position: sticky; top: 104px; display: flex; flex-direction: column; gap: 2px; }
.folder-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-2); }
.folder-row:hover { background: var(--fill); color: var(--text); }
.folder-row.on { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.folder-row.drop-on { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.folder-row .count { font-size: 12px; color: var(--text-3); }
.folder-choice { justify-content: flex-start; width: 100%; border-radius: 14px; }
.tile-pick { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 9px; background: var(--surface-glass); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity 0.15s; }
.tile:hover .tile-pick, .tile.picked .tile-pick, .tile-pick:focus-within { opacity: 1; }
.tile.picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.selection-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 16px; border-radius: 18px; background: var(--accent-soft); }
.selection-bar b { flex: 1; font-size: 14px; }
@media (max-width: 820px) {
  .lib-layout { grid-template-columns: 1fr; }
  .folders { position: static; flex-direction: row; flex-wrap: wrap; }
  .folders > .row:first-child { width: 100%; }
  .folder-row { flex: 0 0 auto; }
  @media (hover: none) { .tile-pick { opacity: 1; } }
}

/* --- miniatura dello schermo, in ogni pagina ------------------------------------------ */
.mini-screen {
  position: fixed; z-index: 40; padding: 8px; border-radius: 20px; width: 288px;
  background: var(--surface-glass); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.mini-screen[hidden], .mini-screen-open[hidden] { display: none; }
.mini-screen.dragging { opacity: 0.85; cursor: grabbing; user-select: none; }
.mini-screen .mini-head { display: flex; align-items: center; gap: 4px; padding: 0 0 8px 2px; cursor: grab; touch-action: none; color: var(--text-2); }
.mini-screen .mini-head b { display: block; color: var(--text); font-size: 14px; }
.mini-screen .mini-head select { height: 32px; font-size: 13px; padding: 0 28px 0 10px; width: 100%; }
.mini-screen button.icon { width: 30px; height: 30px; }
.mini-screen .mini-pic { display: flex; justify-content: center; background: var(--well); border-radius: 12px; padding: 6px; cursor: pointer; }
.mini-screen .screen-preview { border-radius: 4px; }
.mini-screen .screen-preview.dim { filter: grayscale(1) brightness(0.55); }
.mini-screen .mini-info { display: flex; flex-direction: column; gap: 6px; padding: 10px 4px 2px; font-size: 13px; min-width: 0; }
.mini-screen .mini-info .now-line { display: flex; justify-content: space-between; gap: 8px; min-width: 0; }
/* piccolissima: solo l'immagine, si trascina tutta; i due pulsanti sopra */
.mini-screen.small { width: auto; padding: 5px; border-radius: 14px; cursor: grab; touch-action: none; }
.mini-screen.small .mini-pic { padding: 0; background: none; border-radius: 0; }
.mini-screen.small .mini-pic .screen-preview { width: 999px; }
.mini-screen.small .mini-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 3px; opacity: 0; transition: opacity 0.15s; }
.mini-screen.small:hover .mini-tools, .mini-screen.small:focus-within .mini-tools { opacity: 1; }
@media (hover: none) { .mini-screen.small .mini-tools { opacity: 1; } }
.mini-screen.small .mini-tools button.icon { width: 24px; height: 24px; background: var(--surface-glass); color: var(--text); }
.mini-screen.small .mini-tools svg.i { font-size: 15px !important; }
.mini-screen-open {
  position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 48px; height: 48px; border-radius: 50%; padding: 0;
  display: grid; place-items: center; border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  background: var(--surface-glass); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); color: var(--text);
}
@media print { .mini-screen, .mini-screen-open { display: none; } }

/* --- editor delle scene ---------------------------------------------------------------- */
.theme-card { height: auto; padding: 10px; border-radius: 16px; border: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 8px; font-size: 12px; font-weight: 600; white-space: normal; }
.theme-card[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.theme-strip { display: grid; grid-template-columns: repeat(5, 1fr); height: 26px; border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.theme-strip i { display: block; }
.scene-card { width: 100%; height: auto; padding: 12px; border-radius: 16px; border: 1px solid var(--line); justify-content: flex-start; gap: 12px; text-align: left; white-space: normal; font-weight: 500; }
.scene-card > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.scene-card b { font-weight: 600; font-size: 14px; }
.scene-mini { position: relative; flex: none; width: 64px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden;
  background: linear-gradient(135deg, transparent 49%, rgba(0,0,0,.25) 50%) , #6d6153; }
.scene-mini.tall { width: 36px; aspect-ratio: 9 / 16; }
.scene-mini::before { content: ""; position: absolute; inset: 26% 30%; background: #5e5347; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.scene-mini i { position: absolute; left: 50%; top: 42%; width: 30%; height: 10%; transform: translateX(-50%); border-radius: 2px; background: #e2b56b; box-shadow: 0 0 10px rgba(255,220,160,.8); }
.hours-list { display: flex; flex-direction: column; gap: 6px; }
.hours-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; font-size: 13px; }
.hours-row .check { min-width: 64px; align-items: center; }
.hours-times { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); }
.hours-times input[type="time"] { width: 86px; height: 34px; padding: 0 4px; font-size: 13px; }
.badge-list { display: flex; flex-direction: column; gap: 4px; }
.badge-list button { justify-content: flex-start; gap: 8px; height: 36px; padding: 0 10px; border-radius: 12px; border: 1px solid transparent; font-size: 13px; font-weight: 500; min-width: 0; }
.badge-list button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.add-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.add-badges button { height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; font-weight: 600; gap: 4px; }
.badge-head { display: flex; align-items: center; gap: 4px; margin: 8px 4px 0; padding: 12px 8px 4px; border-top: 1px solid var(--line); font-size: 15px; }
.line-editor { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; background: var(--fill); }
.line-editor textarea { min-height: 36px; padding: 7px 10px; font-size: 13px; resize: vertical; }
.line-n { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--fill-2); font-size: 11px; font-weight: 600; }
.line-editor select { height: 32px; font-size: 12px; padding: 0 24px 0 8px; }
.line-font { flex: 1 1 110px; } .line-weight { flex: 1 1 90px; }
.line-flag { width: 32px; height: 32px; padding: 0; border-radius: 10px; border: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.line-flag:first-of-type { font-style: italic; font-family: Georgia, serif; }
.line-flag.on { border-color: var(--accent); background: var(--accent-soft); }
.swatch.accent span { background: conic-gradient(from 45deg, var(--accent) 0 50%, transparent 50%), var(--fill-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.scene-overlay { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.badge-box { position: absolute; pointer-events: auto; border: 1.5px dashed rgba(255, 255, 255, 0.45); border-radius: 10px; cursor: grab; touch-action: none; }
.badge-box:hover { border-color: rgba(255, 255, 255, 0.85); }
.badge-box.on { border: 2px solid var(--accent); }
.badge-box.dragging { cursor: grabbing; }
/* la miniatura di uno stile: la stanza vista da davanti, con il suo segno distintivo */
.style-mini { position: relative; display: block; height: 52px; border-radius: 8px; overflow: hidden; background: var(--wall);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.style-mini::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 30%; background: var(--ceil); clip-path: polygon(0 0, 100% 0, 70% 100%, 30% 100%); }
.style-mini::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: var(--floor); clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%); }
.style-mini i { position: absolute; left: 30%; right: 30%; top: 30%; bottom: 30%; background: var(--back); box-shadow: 0 0 10px var(--light); }
.style-faretto i { background: radial-gradient(ellipse at 50% 30%, var(--light), var(--back) 70%); }
.style-marmo i { background: linear-gradient(118deg, transparent 40%, rgba(120,112,104,.35) 42%, transparent 46%), var(--back); border-top: 2px solid #222; }
.style-led i { box-shadow: 0 0 0 2px var(--led), 0 0 12px var(--led); }
.style-legno i { background: repeating-linear-gradient(90deg, #7d522f 0 4px, #24160c 4px 5px); box-shadow: 0 0 14px var(--light); }
.style-neon i { background: linear-gradient(90deg, rgba(255,64,170,.6), var(--back) 50%, rgba(70,220,255,.5)); }
.style-lucernario i { box-shadow: 0 -6px 10px #fffdf7; }
.style-velluto i { background: repeating-linear-gradient(90deg, rgba(0,0,0,.35) 0 3px, transparent 3px 6px), var(--back); border-top: 3px solid #d8a65a; }

/* --- cestino e versioni precedenti ------------------------------------------------------ */
.tile .pic.trash-ph { display: grid; place-items: center; color: var(--text-2); background: color-mix(in srgb, var(--c, var(--text-2)) 14%, var(--well)); }
.versions { display: flex; flex-direction: column; gap: 10px; max-height: min(60vh, 560px); overflow: auto; margin: 4px -4px 0; padding: 4px; }
.version { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 20px; background: var(--well); }
.version-pic { position: relative; width: 112px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; flex: none; background: var(--card); }
.version-summary { flex: 1 1 60%; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.version-summary > div:first-child { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.version-summary .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.version-when { font-weight: 600; white-space: nowrap; }
.version-side { flex: none; text-align: right; }
.version .muted { font-size: 13px; }
.empty-note { display: flex; gap: 12px; align-items: center; color: var(--text-2); padding: 12px 4px; }
.empty-note p { margin: 0; }
@media (max-width: 560px) {
  .version { flex-wrap: wrap; }
  .version-pic { width: 100%; }
}

/* Programma per il PC dello schermo */
.install-links { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.link-field { flex: 1; min-width: 0; font-size: 14px; }
.install-more { margin: 4px 0 14px; }
.install-more > summary { cursor: pointer; font-size: 14px; color: var(--text-2); margin-bottom: 10px; }

/* --- modelli del cliente e punto di partenza di una composizione nuova ------------ */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 10px; }
.template-card { display: flex; flex-direction: column; align-items: stretch; gap: 6px; height: auto; padding: 8px; border-radius: 16px; border: 1px solid var(--line); background: var(--fill); text-align: left; font-weight: 600; font-size: 13px; }
.template-card:hover:not(:disabled) { background: var(--fill-2); }
.template-card .template-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.template-card .small { font-weight: 400; line-height: 1.3; }
.template-card .template-preview { align-self: center; width: 100%; border-radius: 0; overflow: hidden; }
.template-list { display: flex; flex-direction: column; gap: 8px; }
.template-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; background: var(--fill); }
.template-row .template-preview { flex: none; width: 128px; border-radius: 0; overflow: hidden; }
.template-row .template-preview[style*="1080 / 1920"] { width: 40px; }
.start-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 10px; margin-top: 16px; }
.start-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; height: auto; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--fill); text-align: left; }
.start-card svg.i { font-size: 26px; margin-bottom: 4px; }

/* --- Galleria: da dove parte un contenuto nuovo ------------------------------------ */
.gallery-filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.gallery-section { margin-bottom: 36px; }
.gallery-section > h2 { font-size: 20px; font-weight: 600; margin: 0 0 14px; }
.gallery-section .start-grid { margin-top: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 16px; align-items: start; }
.gallery-card { display: flex; flex-direction: column; align-items: stretch; gap: 6px; height: auto; padding: 10px 10px 12px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--fill); text-align: left; white-space: normal; font-weight: 400; transition: transform .18s ease, box-shadow .18s ease; }
.gallery-card:hover:not(:disabled) { background: var(--fill-2); transform: translateY(-2px); box-shadow: var(--shadow-menu); }
.gallery-card-text { display: flex; align-items: center; gap: 8px; padding: 4px 4px 0; }
.gallery-card-text b { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-card > .small { padding: 0 4px; line-height: 1.35; }
.gallery-badge { flex: none; padding: 2px 8px; border-radius: 99px; background: var(--fill-2); font-size: 11px; font-weight: 600; color: var(--text-2); }
.gallery-grid.tall { grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); }
.gallery-pic { position: relative; width: 100%; background: #0c0c0b; overflow: hidden; display: flex; justify-content: center; }
.gallery-pic .screen-preview { border-radius: 0; box-shadow: none; }
dialog.wide:has(.gallery-dialog) { width: min(1120px, calc(100vw - 32px)); }
.gallery-detail { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; margin: 8px 0 20px; }
.gallery-big { display: flex; justify-content: center; background: #0c0c0b; }
.gallery-big .screen-preview { border-radius: 0; }
.gallery-controls { display: flex; flex-direction: column; gap: 18px; }
.gallery-controls .segmented { display: flex; width: 100%; }
.gallery-controls .segmented button { flex: 1; padding: 0 8px; }
@media (max-width: 760px) { .gallery-detail { grid-template-columns: 1fr; } }

/* --- prova della bozza sullo schermo vero ------------------------------------------ */
.trial-screens { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 4px; max-height: 18rem; overflow: auto; }
.trial-screen { display: flex; align-items: center; gap: 12px; height: auto; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--fill); text-align: left; justify-content: flex-start; }
.trial-screen[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.trial-screen:disabled { opacity: 0.45; }
.trial-shape { flex: none; display: block; border: 2px solid currentColor; border-radius: 3px; opacity: 0.7; }
.trial-shape.verticale { width: 14px; height: 24px; }
.trial-shape.orizzontale { width: 26px; height: 15px; }
.trial-shape.quadrato { width: 20px; height: 20px; }
.trial-warn { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--warn-bg); font-size: 14px; line-height: 1.45; }
.trial-warn svg.i { color: var(--warn); margin-top: 1px; }
.trial-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 12px; border-radius: 14px; background: var(--info-bg); font-size: 14px; }
.trial-bar[hidden] { display: none; }
.trial-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--err); flex: none; animation: trial-pulse 1.4s ease-in-out infinite; }
@keyframes trial-pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .trial-dot { animation: none; } }
