:root {
  --ink: #14201c;
  --ink-soft: #2a3b34;
  --paper: #f3f0e8;
  --paper-2: #e7e2d4;
  --accent: #e4572e;
  --accent-deep: #c2411d;
  --ok: #2f6f4e;
  --warn: #b8860b;
  --err: #a33b3b;
  --line: rgba(20, 32, 28, 0.12);
  --shadow: 0 18px 50px rgba(20, 32, 28, 0.12);
  --radius: 14px;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Outfit", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

::selection {
  background: rgba(228, 87, 46, 0.28);
  color: var(--ink);
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

.page-bg,
.auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(228, 87, 46, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(47, 111, 78, 0.14), transparent 50%),
    linear-gradient(160deg, #f7f4ec 0%, #e8e2d3 45%, #dfe8e2 100%);
}

.page-bg::after,
.auth-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2314201c' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.brand-mark {
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.auth-panel {
  width: min(420px, 100%);
  padding: 2.2rem;
  background: rgba(247, 244, 236, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: rise 0.55s ease both;
}

.auth-panel h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.8rem;
  margin: 0.6rem 0 0.35rem;
}

.lede,
.panel-head p,
.muted {
  color: var(--ink-soft);
}

.auth-panel form {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.4rem;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
}

input[type="password"],
input[type="number"],
input[type="text"],
textarea,
select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.45;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(228, 87, 46, 0.55);
  box-shadow: 0 0 0 3px rgba(228, 87, 46, 0.15);
}

button,
.primary-btn,
.ghost-btn {
  font: inherit;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s, border-color 0.2s;
}

button:active,
.primary-btn:active,
.ghost-btn:active {
  transform: translateY(1px);
}

.auth-panel button,
.primary-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.8rem 1.1rem;
  font-weight: 600;
}

.site-page .primary-btn {
  box-shadow: 0 12px 28px rgba(228, 87, 46, 0.28);
}
.site-page .primary-btn:hover {
  box-shadow: 0 14px 32px rgba(196, 65, 29, 0.34);
}

.auth-panel button:hover,
.primary-btn:hover {
  background: var(--accent-deep);
}

.ghost-btn {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
  padding: 0.55rem 0.9rem;
}

.ghost-btn:hover {
  border-color: var(--ink-soft);
}

.form-error {
  color: var(--err);
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
}

/* Contesto "stai comprando Pro" sopra il login, quando si arriva da /pro */
.auth-context {
  margin: 0.9rem 0 0.2rem;
  padding: 0.65rem 0.85rem;
  background: rgba(228, 87, 46, 0.1);
  border: 1px solid rgba(228, 87, 46, 0.35);
  border-radius: 10px;
  font-size: 0.92rem;
}

.auth-context[hidden] {
  display: none !important;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.75rem 0.5rem;
  animation: rise 0.45s ease both;
}

.topbar-brand {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.brand-sub {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.8);
}

.status-pill::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.online {
  color: var(--ok);
}

.status-pill.offline {
  color: var(--err);
}

.layout {
  width: min(1100px, calc(100% - 2rem));
  margin: 0.75rem auto 2.5rem;
  animation: rise 0.6s ease 0.05s both;
}

.tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tab {
  background: rgba(255, 253, 248, 0.55);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 0.65rem 1rem;
  font-weight: 600;
}

.tab.active,
.tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.dash-page .tabs .tab-lang {
  border-color: var(--accent, #e4572e);
  font-weight: 700;
}

.dash-page .tabs .tab-lang.active,
.dash-page .tabs .tab-lang[aria-selected="true"] {
  background: var(--accent, #e4572e);
  border-color: var(--accent, #e4572e);
}

.lang-server-card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  max-width: 36rem;
}

.lang-server-hint {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.lang-subhead {
  grid-column: 1 / -1;
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.panel {
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem 1.5rem;
  box-shadow: var(--shadow);
}

.panel[hidden] {
  display: none !important;
}

.panel-head {
  margin-bottom: 1rem;
}

.panel-head.row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.panel-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2rem;
  margin: 0 0 0.25rem;
}

.panel-head p {
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field.full {
  grid-column: 1 / -1;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf8;
  font-weight: 500;
}

.toggle-row input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}

.range-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.range-row input[type="range"] {
  flex: 1;
  padding: 0;
  accent-color: var(--accent);
  background: transparent;
  border: none;
  box-shadow: none;
}

.command-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.15rem;
  flex-wrap: wrap;
}

.block-title {
  margin: 1.6rem 0 0.6rem;
  font-size: 1.05rem;
  border-top: 1px solid var(--border, #333);
  padding-top: 1.1rem;
}

.save-msg {
  font-size: 0.9rem;
  color: var(--ok);
  min-height: 1.2em;
}

.channels-hint {
  margin-top: 0.85rem;
  font-size: 0.9rem;
}

#ai-health {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.channel-pick {
  margin-bottom: 0.45rem;
}

.channel-chip {
  margin: 0.15rem 0.2rem 0.15rem 0;
  font-size: 0.82rem;
}
.channel-chip.on {
  outline: 2px solid var(--accent, #e4572e);
}

.log-toolbar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.log-toolbar select {
  width: auto;
  min-width: 180px;
  padding: 0.55rem 0.75rem;
}

.log-stream {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: min(62vh, 640px);
  overflow: auto;
  padding-right: 0.25rem;
}

.log-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  background: #fffdf8;
  animation: slideIn 0.28s ease both;
}

.log-item .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}

.log-item .badge {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.log-item.message_in .badge { color: var(--ink-soft); }
.log-item.message_out .badge { color: var(--ok); }
.log-item.moderation .badge { color: var(--accent-deep); }
.log-item.system .badge { color: var(--warn); }
.log-item.error .badge { color: var(--err); }

.log-item .body {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.95rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.back-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  margin-right: 0.35rem;
}

.back-link:hover {
  color: var(--accent-deep);
}

.invite-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.guild-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.guild-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem 0.85rem;
  min-width: 0;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
  color: inherit;
  transition: border-color 0.2s, transform 0.15s;
}

.guild-card-side {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  min-width: 0;
  width: 100%;
  max-width: none;
  position: relative;
  z-index: 1;
}

.guild-invite {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
  font-size: 0.78rem;
}

.guild-invite-miss {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.guild-invite-link {
  color: var(--accent-deep);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
  position: relative;
  z-index: 2;
}

.guild-invite-link:hover {
  text-decoration: underline;
}

.guild-invite-copy {
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
}

@media (max-width: 560px) {
  .guild-card-side {
    flex-direction: column;
    align-items: stretch;
  }
}

.guild-card:hover {
  border-color: rgba(228, 87, 46, 0.45);
  transform: translateY(-1px);
}

.guild-card-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.guild-card-main > div {
  min-width: 0;
  flex: 1;
}

.guild-leave-btn {
  flex-shrink: 0;
  font-size: 0.78rem;
  padding: 0.4rem 0.65rem;
  border-color: rgba(180, 60, 40, 0.35);
  color: #8b3a28;
}

.guild-leave-btn:hover {
  border-color: #c45c3a;
  background: #fff4ef;
}

.guild-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.05rem;
}

.guild-card .muted {
  font-size: 0.82rem;
}

.guild-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.guild-icon.placeholder {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.chip {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.muted-chip {
  background: rgba(163, 59, 59, 0.12);
  color: var(--err);
}

.power-panel {
  margin-bottom: 1rem;
}

.visit-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.2rem, 1fr));
  gap: 0.85rem 0.75rem;
}

.visit-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 400;
  line-height: 1.1;
}

.visit-stats span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.visit-pages {
  margin: 0.95rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.visit-pages .chip {
  margin-left: 0;
  background: rgba(0, 0, 0, 0.06);
}

.power-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.power-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.8rem;
  margin: 0 0 0.25rem;
}

.power-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.power-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.power-track {
  width: 64px;
  height: 34px;
  border-radius: 999px;
  background: #c9c2b4;
  position: relative;
  transition: background 0.2s;
  border: 1px solid var(--line);
}

.power-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fffdf8;
  transition: transform 0.2s;
  box-shadow: 0 2px 6px rgba(20, 32, 28, 0.2);
}

.power-switch input:checked + .power-track {
  background: var(--ok);
}

.power-switch input:checked + .power-track::after {
  transform: translateX(30px);
}

.power-label {
  font-weight: 700;
  letter-spacing: 0.06em;
  min-width: 2.5rem;
  color: var(--err);
}

.power-label.on {
  color: var(--ok);
}

body.demy-off .power-panel {
  border-color: rgba(163, 59, 59, 0.35);
}

.pending-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pending-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  background: #fffdf8;
}

.pending-item .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

.pending-item .badge {
  font-weight: 700;
  text-transform: uppercase;
  color: var(--warn);
}

.pending-text {
  width: 100%;
  min-height: 90px;
  margin: 0.4rem 0 0.2rem;
}

.form-grid .full {
  grid-column: 1 / -1;
}

/* --- Pannello alt account --- */

/* Due colonne per i controlli; su schermi stretti collassa a una. */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.6rem 1.1rem;
  margin-bottom: 0.9rem;
}

.badge.risk-high { color: var(--err); }
.badge.risk-mid { color: var(--warn); }
.badge.risk-low { color: var(--ink-soft); }

.alt-reasons {
  margin: 0.4rem 0 0.6rem;
  padding-left: 1.1rem;
  font-size: 0.86rem;
  line-height: 1.5;
}

.alt-tally {
  margin: 0.2rem 0 0.5rem;
  font-size: 0.86rem;
}

/* --- Pannello mente: umore, policy RL, ricordi --- */

.mind-meters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.7rem;
  margin-top: 0.5rem;
}

.mind-meter {
  background: rgba(20, 32, 28, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
}

.mind-meter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.mind-meter-head strong {
  font-weight: 600;
}

.mind-meter-head span {
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.mind-bar {
  display: block;
  height: 7px;
  border-radius: 99px;
  background: rgba(20, 32, 28, 0.1);
  overflow: hidden;
}

.mind-bar > i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--ok);
  transition: width 0.35s ease;
}

/* L'attrito alto e' un segnale negativo: si legge meglio in rosso. */
.mind-meter.warn .mind-bar > i {
  background: var(--err);
}

.mind-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.mind-metrics > div {
  background: rgba(20, 32, 28, 0.04);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  font-size: 0.85rem;
}

.mind-metrics strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 0.15rem;
}

.mind-ctx {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.5rem;
}

.mind-ctx-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.mind-ctx-head code {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.mind-arm {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  padding: 0.12rem 0;
}

.mind-arm-label {
  flex: 0 0 9.5rem;
}

.mind-arm .mind-bar {
  flex: 1;
  height: 5px;
}

.mind-arm-q {
  flex: 0 0 5.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.mind-insight {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.85rem;
}

.mind-insight .chip {
  margin-left: 0;
  background: rgba(20, 32, 28, 0.08);
  color: var(--ink-soft);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Riga "scegli dalla lista + ID a mano" */
.pick-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem;
}

.channel-select {
  min-width: 0;
}

@media (max-width: 760px) {
  .pick-row {
    grid-template-columns: 1fr;
  }
}

/* Pannello diagnostica benvenuto */
.welcome-diag {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  background: rgba(20, 32, 28, 0.03);
}

.welcome-diag-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.welcome-diag-actions {
  display: flex;
  gap: 0.5rem;
}

.welcome-status {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.welcome-status.ok {
  color: var(--ok);
}

.welcome-status.bad {
  color: var(--err);
}

.raid-lock-status {
  margin: 0.5rem 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.35);
  color: var(--ink);
}

.raid-lock-status.active {
  background: rgba(224, 108, 92, 0.12);
  border-color: rgba(224, 108, 92, 0.35);
}

.raid-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.65rem 1rem;
  margin: 0.35rem 0 0.5rem;
}

.welcome-problems {
  margin: 0.6rem 0 0;
  padding-left: 1.15rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.welcome-problems:empty {
  display: none;
}

.welcome-problems li {
  margin-bottom: 0.25rem;
}

@media (max-width: 760px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding-inline: 1rem;
  }

  .layout {
    width: calc(100% - 1.25rem);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 1.1rem;
  }

  .panel-head h2 {
    font-size: 1.65rem;
  }
}

/* Dashboard: telefono / tablet / desktop. Media query + html.is-phone|tablet
   (impostato da /js/device.js: larghezza, rotazione, dito vs mouse). */
.dash-page {
  padding-bottom: env(safe-area-inset-bottom);
}

.dash-page button,
.dash-page .primary-btn,
.dash-page .ghost-btn,
.dash-page .tab {
  touch-action: manipulation;
}

@media (pointer: coarse) {
  .dash-page .tab,
  .dash-page .primary-btn,
  .dash-page .ghost-btn,
  .dash-page .toggle-row {
    min-height: 44px;
  }
}

@media (max-width: 1100px), (pointer: coarse) and (max-width: 1400px) {
  .dash-page {
    overflow-x: hidden;
  }

  .dash-page .topbar {
    padding-top: max(0.85rem, env(safe-area-inset-top));
    padding-inline: max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-right));
    gap: 0.55rem;
  }

  .dash-page .topbar-brand {
    min-width: 0;
    width: 100%;
    align-items: center;
  }

  .dash-page .topbar .brand-mark {
    font-size: 1.55rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100vw - 7rem);
  }

  .dash-page .layout {
    width: 100%;
    margin: 0 0 2rem;
    padding-inline: max(0.7rem, env(safe-area-inset-left)) max(0.7rem, env(safe-area-inset-right));
  }

  .dash-page .cliente-banner,
  .dash-page .piano-avviso {
    width: calc(100% - 1.25rem);
    margin-bottom: 0.65rem;
  }

  .dash-page .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: sticky;
    top: 0;
    z-index: 25;
    gap: 0.35rem;
    margin: 0 -0.7rem 0.85rem;
    padding: 0.45rem 0.7rem 0.65rem;
    background: rgba(243, 240, 232, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }

  .dash-page .tabs::-webkit-scrollbar {
    display: none;
  }

  .dash-page .tab {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0.65rem 0.95rem;
    font-size: 0.9rem;
  }

  .dash-page .panel {
    padding: 1.05rem 1rem 1.2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dash-page .tabella {
    min-width: 32rem;
    font-size: 0.8rem;
  }

  .dash-page .tabella th,
  .dash-page .tabella td {
    padding: 0.55rem 0.5rem;
    word-break: break-word;
  }

  .dash-page input[type="password"],
  .dash-page input[type="number"],
  .dash-page input[type="text"],
  .dash-page textarea,
  .dash-page select {
    font-size: 16px;
    min-height: 44px;
  }

  .dash-page textarea {
    min-height: 7.5rem;
  }

  .dash-page .actions .primary-btn,
  .dash-page .actions .ghost-btn,
  .dash-page .welcome-diag-actions .ghost-btn,
  .dash-page .welcome-diag-actions .primary-btn {
    min-height: 44px;
  }

  .dash-page .toggle-row {
    min-height: 44px;
  }
}

/* JS: iPad in “desktop mode” può non avere pointer:coarse — html.is-compact copre. */
html.is-compact .dash-page {
  overflow-x: hidden;
}

html.is-compact .dash-page .layout {
  width: 100%;
  margin: 0 0 2rem;
  padding-inline: max(0.7rem, env(safe-area-inset-left)) max(0.7rem, env(safe-area-inset-right));
}

html.is-compact .dash-page .tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: 0;
  z-index: 25;
  gap: 0.35rem;
  margin: 0 -0.7rem 0.85rem;
  padding: 0.45rem 0.7rem 0.65rem;
  background: rgba(243, 240, 232, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

html.is-compact .dash-page .tab {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0.65rem 0.95rem;
}

html.is-compact .dash-page input[type="password"],
html.is-compact .dash-page input[type="number"],
html.is-compact .dash-page input[type="text"],
html.is-compact .dash-page textarea,
html.is-compact .dash-page select {
  font-size: 16px;
  min-height: 44px;
}

@media (max-width: 700px) {
  .dash-page .brand-sub,
  .dash-page #bot-user {
    display: none;
  }

  .dash-page .topbar-status {
    width: 100%;
    justify-content: space-between;
  }

  .dash-page .form-grid {
    grid-template-columns: 1fr;
  }

  .dash-page .panel-head h2 {
    font-size: 1.4rem;
  }

  .dash-page #systemPrompt {
    min-height: 9.5rem;
    max-height: 42vh;
  }

  body.ruolo-cliente.dash-page .back-link {
    display: none;
  }

  .dash-page .toggle-row {
    align-items: flex-start;
    padding: 0.9rem 0.95rem;
  }

  .dash-page .log-toolbar select {
    width: 100%;
    min-width: 0;
  }
}

html.is-phone .dash-page .form-grid {
  grid-template-columns: 1fr;
}

html.is-phone .dash-page .brand-sub,
html.is-phone .dash-page #bot-user {
  display: none;
}

html.is-phone .dash-page .topbar-status {
  width: 100%;
  justify-content: space-between;
}

html.is-phone body.ruolo-cliente.dash-page .back-link {
  display: none;
}

@media (min-width: 701px) and (max-width: 1100px) {
  .dash-page .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-page .topbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .dash-page .topbar-brand {
    width: auto;
    flex: 1;
  }

  .dash-page .topbar-status {
    width: auto;
  }
}

html.is-tablet .dash-page .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html.is-tablet .dash-page .topbar {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
}

html.is-tablet .dash-page .topbar-brand {
  width: auto;
  flex: 1;
}

html.is-tablet .dash-page .topbar-status {
  width: auto;
}

/* --- Sito pubblico clienti ------------------------------------------------ */

.site-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  animation: rise 0.5s ease both;
  position: relative;
}

.site-brand {
  font-size: 1.75rem;
  margin: 0;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.site-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 8vh, 5rem) clamp(1.25rem, 4vw, 3rem) 2rem;
  max-width: 42rem;
  animation: rise 0.65s ease 0.08s both;
}

.site-hero-brand {
  font-size: clamp(3.4rem, 10vw, 5.5rem);
  margin: 0 0 0.35rem;
}

.site-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.site-lead {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 34rem;
}

.site-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.6rem;
}

.site-section {
  padding: 0 clamp(1.25rem, 4vw, 3rem) 2.5rem;
  max-width: 42rem;
  animation: rise 0.7s ease 0.16s both;
}

.site-section h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.7rem;
  margin: 0 0 0.4rem;
}

.site-section-lead {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.site-features {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.site-features li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.site-features li:last-child {
  border-bottom: none;
}

.site-foot {
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem) 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}

.site-foot a {
  color: var(--accent-deep);
}

.site-owner-link a {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

body.ruolo-cliente .back-link {
  pointer-events: none;
  color: var(--ink-soft);
  text-decoration: none;
}

body.ruolo-cliente .cliente-banner {
  display: block;
}

.cliente-banner {
  display: none;
  margin: 0 auto 1rem;
  width: min(1100px, calc(100% - 2rem));
  padding: 0.75rem 1rem;
  background: rgba(47, 111, 78, 0.1);
  border: 1px solid rgba(47, 111, 78, 0.25);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.piano-avviso {
  margin: 0 auto 1rem;
  width: min(1100px, calc(100% - 2rem));
  padding: 0.75rem 1rem;
  background: rgba(184, 134, 11, 0.12);
  border: 1px solid rgba(184, 134, 11, 0.35);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.piano-avviso[hidden] {
  display: none !important;
}

.setup-strip {
  margin: 0 auto 1rem;
  width: min(1100px, calc(100% - 2rem));
  padding: 0.85rem 1rem 1rem;
  background: rgba(228, 87, 46, 0.08);
  border: 1px solid rgba(228, 87, 46, 0.28);
  border-radius: var(--radius);
}

.setup-strip[hidden],
.dirty-bar[hidden] {
  display: none !important;
}

.setup-strip ul {
  margin: 0.45rem 0 0.7rem;
  padding-left: 1.15rem;
}

.setup-strip li.ok {
  color: var(--ok, #2f6f4e);
  text-decoration: line-through;
  opacity: 0.85;
}

.setup-strip .hint {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 400;
}

.dirty-bar {
  margin: 0 auto 1rem;
  width: min(1100px, calc(100% - 2rem));
  padding: 0.55rem 1rem;
  background: rgba(184, 134, 11, 0.16);
  border: 1px solid rgba(184, 134, 11, 0.4);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.92rem;
}

body.ruolo-cliente .piano-owner-only {
  display: none !important;
}

body.ruolo-cliente:not(.piano-pagato) .pro-only {
  display: none !important;
}

.cliente-guida-btn {
  margin-left: 0.5rem;
  margin-top: 0.35rem;
  vertical-align: middle;
  border-color: rgba(47, 111, 78, 0.45);
}

.help-q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin-left: 0.35rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(47, 42, 36, 0.28);
  background: #fff;
  color: var(--ink-soft);
  font: 650 0.72rem/1 Outfit, system-ui, sans-serif;
  cursor: help;
  vertical-align: middle;
}

.help-q:hover,
.help-q[aria-expanded="true"] {
  background: #2f2a24;
  color: #f3f0e8;
  border-color: #2f2a24;
}

.help-pop {
  position: absolute;
  z-index: 80;
  max-width: min(22rem, calc(100vw - 1.5rem));
  padding: 0.7rem 0.85rem;
  background: #2f2a24;
  color: #f3f0e8;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.4;
  box-shadow: 0 10px 28px rgba(20, 16, 12, 0.28);
}

.help-pop[hidden] {
  display: none !important;
}

.dash-tour {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(28, 24, 20, 0.45);
}

.dash-tour[hidden] {
  display: none !important;
}

.dash-tour-card {
  width: min(28rem, 100%);
  padding: 1.2rem 1.25rem 1.1rem;
  background: #f7f4ee;
  color: var(--ink);
  border-radius: 14px;
  border: 1px solid rgba(47, 42, 36, 0.12);
  box-shadow: 0 18px 50px rgba(20, 16, 12, 0.22);
}

.dash-tour-step {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.dash-tour-card h2 {
  margin: 0 0 0.5rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 400;
}

.dash-tour-card p {
  margin: 0 0 1.1rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.dash-tour-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dash-tour-nav {
  display: flex;
  gap: 0.4rem;
}

body.dash-tour-open {
  overflow: hidden;
}

html.is-phone .help-q {
  width: 1.45rem;
  height: 1.45rem;
  font-size: 0.8rem;
}

html.is-phone .dash-tour-card button {
  min-height: 44px;
}

.discord-btn {
  background: #5865f2;
  color: #fff;
  border: none;
}

.discord-btn:hover {
  background: #4752c4;
  color: #fff;
}

.site-guide {
  max-width: 42rem;
  padding: 0 clamp(1.25rem, 4vw, 3rem) 3rem;
}

.site-guide ol {
  margin: 0;
  padding-left: 1.2rem;
}

.site-guide li {
  margin: 0.85rem 0;
}

.site-guide li strong {
  display: block;
  margin-bottom: 0.15rem;
}

.scegli-lista {
  display: grid;
  gap: 0.55rem;
  margin: 1.2rem 0 0;
}

.scegli-lista button {
  width: 100%;
  text-align: left;
}

/* --- Landing 2.0 ----------------------------------------------------------- */

html {
  scroll-behavior: smooth;
}

.site-top-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 240, 232, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-nav-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.site-nav-link:hover {
  color: var(--ink);
  background: rgba(20, 32, 28, 0.06);
}

.site-hero-wide {
  max-width: 72rem;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  grid-template-areas:
    "intro chat"
    "rest chat";
  column-gap: clamp(1.5rem, 4vw, 3.5rem);
  row-gap: 0.65rem;
  align-items: start;
}
.hero-intro { grid-area: intro; min-width: 0; }
.hero-stage { grid-area: chat; align-self: center; }
.hero-rest { grid-area: rest; min-width: 0; }
.hero-rest .site-cta { margin-top: 1.15rem; }

.site-hero-copy {
  min-width: 0;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-top: 1.6rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.hero-stat strong {
  color: var(--accent-deep);
  font-size: 1.15rem;
  margin-right: 0.25rem;
}

/* Mockup chat stile Discord, in palette Demy */
.chat-mock {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.9rem 1rem 1.1rem;
  display: grid;
  gap: 0.75rem;
  font-size: 0.92rem;
  animation: rise 0.7s ease 0.2s both;
}

.chat-mock-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

.chat-mock-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.chat-mock-bar em {
  font-style: normal;
  margin-left: 0.4rem;
  font-weight: 600;
}

.chat-msg {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.hero-stage .chat-mock.is-on .chat-msg {
  animation: rise 0.5s ease both;
}

.hero-stage .chat-mock.is-on .chat-msg:nth-child(2) { animation-delay: 0.2s; }
.hero-stage .chat-mock.is-on .chat-msg:nth-child(3) { animation-delay: 0.45s; }
.hero-stage .chat-mock.is-on .chat-msg:nth-child(4) { animation-delay: 0.7s; }
.hero-stage .chat-mock.is-on .chat-msg:nth-child(5) { animation-delay: 0.95s; }
.hero-stage .chat-mock.is-on .chat-msg:nth-child(6) { animation-delay: 1.2s; }
.hero-stage .chat-mock.is-on .chat-msg:nth-child(7) { animation-delay: 1.45s; }

.hero-stage .chat-mock.is-on .chat-typing {
  animation: rise 0.4s ease 1.55s both;
}

.chat-avatar {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: var(--ink-soft);
}

.chat-avatar.d {
  background: var(--accent);
  background-image: url("/img/demy.png");
  background-size: cover;
  background-position: center 18%;
  color: transparent;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(20, 32, 28, 0.12);
}

.chat-msg b {
  font-size: 0.88rem;
}

.chat-msg p {
  margin: 0.15rem 0 0;
  color: var(--ink);
}

.chat-msg code {
  background: var(--paper-2);
  padding: 0.05rem 0.3rem;
  border-radius: 6px;
  font-size: 0.85em;
}

.chat-tag {
  background: #5865f2;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  vertical-align: 1px;
}

.chat-ping {
  background: rgba(88, 101, 242, 0.18);
  color: #3b45c4;
  font-weight: 600;
  padding: 0 0.25rem;
  border-radius: 4px;
}

.site-wide {
  max-width: 72rem;
  width: 100%;
  margin: 0 auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.feature-card {
  background: rgba(255, 253, 248, 0.75);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.feature-card p {
  margin: 0 0 0.6rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.feature-card p:last-child {
  margin-bottom: 0;
}

/* Prezzi */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.2rem;
  margin-top: 1.6rem;
  align-items: stretch;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(255, 253, 248, 0.85);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.3rem;
}

.price-card-pro {
  border-color: rgba(228, 87, 46, 0.5);
  box-shadow: 0 18px 50px rgba(228, 87, 46, 0.12);
}

.price-badge {
  position: absolute;
  top: -0.75rem;
  right: 1.2rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.price-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  margin: 0;
}

.price-tag {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.3rem 0 0.9rem;
}

.price-tag span {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.price-card ul {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.95rem;
}

.price-card li.off {
  color: var(--ink-soft);
  opacity: 0.6;
}

.price-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.price-opt {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.35rem;
  font-size: 0.8rem;
  display: grid;
  gap: 0.1rem;
  color: var(--ink-soft);
}

.price-opt b {
  font-size: 0.95rem;
  color: var(--ink);
}

.price-opt small {
  color: var(--ok);
  font-weight: 700;
}

.price-opt.active {
  border-color: var(--accent);
  background: rgba(228, 87, 46, 0.08);
}

.price-cta {
  margin-top: auto;
  text-align: center;
  display: block;
  text-decoration: none;
}

.price-note {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  text-align: center;
}

.price-why {
  margin: 0.9rem 0 0;
  padding: 0.8rem 0.95rem;
  font-size: 0.88rem;
  line-height: 1.5;
  text-align: left;
  color: var(--muted, #5c564c);
  background: rgba(228, 87, 46, 0.07);
  border-radius: 12px;
}

.price-why strong {
  color: inherit;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.3rem;
}

.faq-list details {
  background: rgba(255, 253, 248, 0.75);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  transition: border-color 0.2s;
}

.faq-list details[open] {
  border-color: rgba(228, 87, 46, 0.4);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--accent-deep);
  transition: transform 0.2s;
  flex: 0 0 auto;
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list details p {
  margin: 0.6rem 0 0.2rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.honesty .site-features li {
  font-weight: 400;
  color: var(--ink-soft);
}

.site-final-cta {
  text-align: center;
  padding-top: 1rem;
  padding-bottom: 3rem;
}

.site-final-cta h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.9rem;
  margin: 0 0 1rem;
}

/* Pagina /pro: scelta piano + metodo di pagamento */
.pro-piani {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.pro-piano {
  background: rgba(255, 253, 248, 0.85);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  display: grid;
  gap: 0.15rem;
  text-align: left;
  color: var(--ink);
}

.pro-piano b {
  font-size: 1.05rem;
}

.pro-piano .pro-prezzo {
  font-size: 1.6rem;
  font-weight: 700;
}

.pro-piano small {
  color: var(--ink-soft);
}

.pro-piano.active {
  border-color: var(--accent);
  background: rgba(228, 87, 46, 0.08);
  box-shadow: 0 12px 30px rgba(228, 87, 46, 0.12);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.method-card {
  background: rgba(255, 253, 248, 0.85);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
}

/* display:flex vincerebbe sull'attributo hidden: va ribadito. */
.method-card[hidden] {
  display: none !important;
}

.method-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
}

.method-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0 0 0.9rem;
}

.method-card .primary-btn {
  margin-top: auto;
  text-align: center;
  text-decoration: none;
  display: block;
}

.method-note {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 860px) {
  .site-hero-wide {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "chat"
      "rest";
    gap: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .chat-msg,
  .chat-mock,
  .site-top,
  .site-hero,
  .site-section {
    animation: none;
  }
}

/* --- Tabelle dati (tab Ticket e simili) --- */
.tabella {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.35rem;
}
.tabella th,
.tabella td {
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}
.tabella th {
  color: var(--muted, #94a3b8);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.scheda h3 {
  font-size: 0.95rem;
  margin: 1rem 0 0.35rem;
}
.scheda ul {
  margin: 0;
  padding-left: 1.15rem;
}
.scheda .goto-utente,
.goto-utente {
  font: inherit;
  padding: 0.15rem 0.35rem;
}

/* --- Landing 3.0: ritratto, profondita', micro-movimento ------------------- */

.site-page {
  overflow-x: hidden;
}

.site-page .page-bg {
  background:
    radial-gradient(ellipse 70% 45% at 8% -8%, rgba(228, 87, 46, 0.28), transparent 58%),
    radial-gradient(ellipse 50% 40% at 92% 8%, rgba(47, 111, 78, 0.2), transparent 52%),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgba(228, 87, 46, 0.08), transparent 60%),
    linear-gradient(165deg, #f8f4eb 0%, #ebe4d4 42%, #dce8e1 100%);
}

.site-page .page-bg {
  --mx: 72%;
  --my: 18%;
}

.site-page .page-bg::before {
  content: "";
  position: absolute;
  width: 55vw;
  height: 55vw;
  max-width: 640px;
  max-height: 640px;
  left: var(--mx);
  top: var(--my);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(228, 87, 46, 0.26), transparent 68%);
  filter: blur(8px);
  pointer-events: none;
  transition: left 0.35s ease, top 0.35s ease;
}

.site-page .page-bg::after {
  opacity: 0.28;
}

.site-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.site-brand-pic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent) url("/img/demy.png") center 18% / cover no-repeat;
  box-shadow: 0 0 0 2px rgba(255, 253, 248, 0.9), 0 6px 16px rgba(228, 87, 46, 0.28);
}

.site-top-sticky.scrolled {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  box-shadow: 0 10px 30px rgba(20, 32, 28, 0.08);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
  padding: 0.28rem 0.7rem 0.28rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(47, 111, 78, 0.55);
  animation: pulseLive 1.8s ease-out infinite;
}

.site-hero h1 em {
  font-style: italic;
  color: var(--accent-deep);
}

.hero-stats .hero-stat {
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.chat-stage {
  position: relative;
  isolation: isolate;
}

.chat-stage::before {
  content: "";
  position: absolute;
  inset: 12% -8% -10% 8%;
  background: radial-gradient(circle at 70% 40%, rgba(228, 87, 46, 0.28), transparent 62%);
  filter: blur(24px);
  z-index: -1;
  pointer-events: none;
}

.chat-sticker {
  position: absolute;
  top: -28px;
  right: -18px;
  width: 96px;
  height: 96px;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 50%;
  border: 3px solid #fffdf8;
  box-shadow: 0 14px 36px rgba(20, 32, 28, 0.22);
  z-index: 2;
  transform: rotate(7deg);
  animation: stickerPop 0.7s ease 0.35s both, stickerFloat 5.5s ease-in-out 1.1s infinite;
}

.site-page .chat-mock {
  border-radius: 18px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 24px 60px rgba(20, 32, 28, 0.14);
  transform: perspective(900px) rotateY(-6deg) rotateX(3deg);
  transition: transform 0.4s ease;
}

.site-page .chat-mock:hover {
  transform: perspective(900px) rotateY(-2deg) rotateX(1deg) translateY(-4px);
}

.chat-typing {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  padding: 0.15rem 0 0 2.6rem;
}

.chat-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-soft);
  opacity: 0.35;
  animation: typingDot 1.2s ease-in-out infinite;
}

.chat-typing i:nth-child(2) { animation-delay: 0.15s; }
.chat-typing i:nth-child(3) { animation-delay: 0.3s; }

.section-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.site-page .site-section h2 {
  font-size: clamp(1.7rem, 3vw, 2.15rem);
}

.site-page .feature-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 253, 248, 0.82);
  backdrop-filter: blur(8px);
}

.site-page .feature-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s;
}

.site-page .feature-card:hover::before {
  opacity: 1;
}

.site-page .price-card-pro {
  background:
    linear-gradient(180deg, rgba(228, 87, 46, 0.08), rgba(255, 253, 248, 0.92) 38%);
}

.site-page .primary-btn {
  box-shadow: 0 10px 24px rgba(228, 87, 46, 0.22);
}

.site-page .discord-btn {
  box-shadow: 0 10px 24px rgba(88, 101, 242, 0.28);
}

.site-page .site-final-cta {
  position: relative;
  margin: 1rem auto 2.5rem;
  padding: 2.4rem 1.5rem 2.2rem;
  max-width: 44rem;
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.final-pic {
  width: 88px;
  height: 88px;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 50%;
  margin: 0 auto 0.85rem;
  display: block;
  border: 3px solid #fff;
  box-shadow: 0 12px 28px rgba(20, 32, 28, 0.18);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@keyframes pulseLive {
  0% { box-shadow: 0 0 0 0 rgba(47, 111, 78, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(47, 111, 78, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 111, 78, 0); }
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(4%, 6%); }
}

@keyframes stickerFloat {
  0%, 100% { transform: rotate(7deg) translateY(0); }
  50% { transform: rotate(9deg) translateY(-6px); }
}

@keyframes stickerPop {
  from { opacity: 0; transform: rotate(7deg) scale(0.7); }
  to { opacity: 1; transform: rotate(7deg) scale(1); }
}

@keyframes typingDot {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

@media (max-width: 860px) {
  .chat-sticker {
    width: 72px;
    height: 72px;
    top: -16px;
    right: 8px;
  }

  .site-page .chat-mock {
    transform: none;
  }

  .site-page .chat-mock:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-page .page-bg::before,
  .live-dot,
  .chat-sticker,
  .chat-typing i,
  .ticker-track,
  .voice-eq i,
  .hero-stage .app-window,
  .chat-mock.is-on .chat-msg,
  .reveal.in .chat-msg,
  .chat-mock.is-on .chat-typing {
    animation: none;
  }

  .site-page .page-bg::before {
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- Landing 4.0: scene, telefono, mock ricchi ----------------------------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 80;
  padding: 0.55rem 0.9rem;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  top: 0.75rem;
}

.site-page {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.site-top {
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
}

.nav-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(20, 32, 28, 0.32);
  border: 0;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  min-height: 0;
  box-shadow: none;
}
body.nav-open .nav-scrim {
  display: block;
}
body.nav-open {
  overflow: hidden;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: rgba(255, 253, 248, 0.7);
  border: 1px solid var(--line);
  border-radius: 12px;
  flex: 0 0 auto;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-page .primary-btn,
.site-page .ghost-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.chat-avatar.m { background: #1e3d32; }
.chat-avatar.g { background: #8b4a6b; }
.chat-avatar.l { background: #3d5a80; }
.chat-avatar.a { background: #5c4033; }
.chat-avatar.s { background: #4a6741; }
.chat-avatar.p { background: #6b5344; }
.chat-avatar.sys {
  background: var(--paper-2);
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.chat-sys {
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-align: center;
  padding: 0.15rem 0;
}

.chat-embed {
  margin: 0.4rem 0 0;
  padding: 0.7rem 0.8rem;
  border-left: 4px solid var(--accent);
  background: rgba(228, 87, 46, 0.07);
  border-radius: 0 10px 10px 0;
  font-size: 0.88rem;
}
.chat-embed.ok { border-left-color: var(--ok); background: rgba(47, 111, 78, 0.08); }
.chat-embed.vote { border-left-color: #5865f2; background: rgba(88, 101, 242, 0.1); }
.chat-embed.mc { border-left-color: #3d6b4f; background: rgba(61, 107, 79, 0.1); }
.chat-embed b { display: block; margin-bottom: 0.2rem; }
.chat-embed p { margin: 0.2rem 0 0; color: var(--ink-soft); }
.vote-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.vote-chip {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}
.vote-chip.win {
  background: var(--ok);
  color: #fff;
  border-color: transparent;
}

.voice-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.35rem 0 0;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: #1e3d32;
  color: #eef6f0;
  font-size: 0.82rem;
  font-weight: 600;
}
.voice-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.voice-eq i {
  display: block;
  width: 3px;
  background: #7dcea0;
  border-radius: 2px;
  animation: eqBar 0.9s ease-in-out infinite;
}
.voice-eq i:nth-child(1) { height: 6px; animation-delay: 0s; }
.voice-eq i:nth-child(2) { height: 12px; animation-delay: 0.15s; }
.voice-eq i:nth-child(3) { height: 8px; animation-delay: 0.3s; }
.voice-eq i:nth-child(4) { height: 14px; animation-delay: 0.08s; }

@keyframes eqBar {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}

.mc-prefix {
  color: #2f6f4e;
  font-weight: 700;
  font-size: 0.78rem;
  margin-right: 0.25rem;
}

.dash-mock {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(20, 32, 28, 0.1);
  padding: 1rem 1.1rem 1.15rem;
  font-size: 0.9rem;
}
.dash-mock-bar {
  display: flex;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dash-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
}
.dash-sw {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--ok);
  position: relative;
  flex: 0 0 auto;
}
.dash-sw::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
}
.dash-sw.off { background: var(--paper-2); }
.dash-sw.off::after { right: auto; left: 2px; }

/* Hero: solo il mazzo ha la prospettiva 3D */
.site-page .chat-mock {
  transform: none;
}
.site-page .chat-mock:hover {
  transform: none;
}
.hero-stage .app-window {
  transform: perspective(1100px) rotateY(-7deg) rotateX(4deg);
  transform-origin: 70% 50%;
  transition: transform 0.45s ease;
}
.hero-stage:hover .app-window {
  transform: perspective(1100px) rotateY(-2deg) rotateX(1deg) translateY(-6px);
}

.chat-deck {
  position: relative;
}
.chat-deck .chat-mock {
  display: none;
}
.chat-deck .chat-mock.is-on {
  display: grid;
}
.chat-dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
}
.chat-dots button {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: transparent;
  min-height: 28px;
  display: grid;
  place-items: center;
}
.chat-dots button::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(20, 32, 28, 0.22);
}
.chat-dots button.is-on::after {
  background: var(--accent);
  transform: scale(1.25);
}
.chat-dots button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.45);
  margin: 0.5rem 0 0;
}
.ticker-track {
  display: flex;
  gap: 0.6rem;
  width: max-content;
  padding: 0.7rem 0;
  animation: ticker 36s linear infinite;
}
.ticker span {
  flex: 0 0 auto;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fffdf8;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.35rem;
}
.trust-row span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  border: 1px solid var(--line);
}

.site-section[id],
#in-azione,
#in-action,
#funzioni,
#features,
#prezzi,
#pricing,
#faq,
#come-funziona,
#resi {
  scroll-margin-top: 5.25rem;
}

.scenes-head {
  max-width: 40rem;
  margin-bottom: 0.5rem;
}

.scene {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1.2rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(2.2rem, 5vw, 3.6rem) 0;
  border-top: 1px solid var(--line);
}
.scene:first-of-type { border-top: none; }
.scene:nth-of-type(even) .scene-copy { order: 2; }
.scene:nth-of-type(even) .scene-visual { order: 1; }

.scene-tag {
  display: inline-block;
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.scene-copy h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.55rem, 3vw, 2rem);
  margin: 0 0 0.55rem;
  line-height: 1.2;
}
.scene-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
  max-width: 34rem;
}
.scene-visual {
  position: relative;
  min-width: 0;
}
.scene-visual .chat-sticker {
  width: 76px;
  height: 76px;
  top: -22px;
  right: -10px;
}
.scene .chat-mock {
  width: 100%;
  max-width: none;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.step {
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem 1.3rem;
}
.step-n {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.45rem;
}
.step h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.mid-cta {
  text-align: center;
  padding: 2rem 0 0.5rem;
}

.site-foot {
  flex-direction: column;
  gap: 0.4rem;
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

.site-foot .foot-brand {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 0 0 0.15rem;
  letter-spacing: -0.02em;
}

@media (max-width: 1100px), (pointer: coarse) and (max-width: 1400px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.85rem 1rem 1.1rem;
    background: rgba(247, 244, 236, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(20, 32, 28, 0.12);
  }
  .site-nav.is-open {
    display: flex;
  }
  .site-nav.is-open .site-nav-link,
  .site-nav.is-open .ghost-btn,
  .site-nav.is-open .primary-btn {
    display: flex;
    width: 100%;
    justify-content: center;
  }
}

html.is-compact .nav-toggle {
  display: inline-flex;
}

html.is-compact .site-nav {
  display: none;
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.85rem 1rem 1.1rem;
  background: rgba(247, 244, 236, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(20, 32, 28, 0.12);
}

html.is-compact .site-nav.is-open {
  display: flex;
}

html.is-compact .site-nav.is-open .site-nav-link,
html.is-compact .site-nav.is-open .ghost-btn,
html.is-compact .site-nav.is-open .primary-btn {
  display: flex;
  width: 100%;
  justify-content: center;
}

@media (max-width: 860px) {
  .site-hero-wide {
    padding-top: 1.5rem;
    padding-bottom: 1.25rem;
  }

  .hero-stage .app-window,
  .hero-stage:hover .app-window {
    transform: none;
  }

  .scene,
  .scene:nth-of-type(even) .scene-copy,
  .scene:nth-of-type(even) .scene-visual {
    display: grid;
    order: unset;
    grid-template-columns: 1fr;
  }
  .scene {
    gap: 1.1rem;
    padding: 1.8rem 0;
  }
  .scene-visual {
    order: -1;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .price-options {
    grid-template-columns: 1fr;
  }

  .site-cta a {
    width: 100%;
  }

  .chat-mock {
    max-width: 36rem;
    margin-inline: auto;
    width: 100%;
  }

  .site-hero-brand {
    display: none;
  }

  .site-hero-copy h1 {
    margin-bottom: 0;
  }

  .chat-sticker {
    width: 64px;
    height: 64px;
    top: -14px;
    right: 10px;
  }
  .scene-visual .chat-sticker {
    width: 58px;
    height: 58px;
  }

  .ticker-track {
    animation-duration: 48s;
  }
}

@media (max-width: 520px) {
  .site-hero-brand {
    font-size: clamp(2.6rem, 14vw, 3.4rem);
  }
  .site-hero h1 {
    font-size: 1.45rem;
  }
  .hero-stats {
    gap: 0.35rem 1rem;
    font-size: 0.88rem;
  }
  .chat-msg {
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
  }
  .hero-stage .app-window,
  .hero-stage:hover .app-window {
    transform: none;
  }
}

.support-wrap {
  max-width: 58rem;
}

.support-h {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
  margin: 0 0 0.6rem;
}

.support-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 840px) {
  .support-grid {
    grid-template-columns: 16rem minmax(0, 1fr);
    align-items: start;
  }
}

.support-list {
  display: grid;
  gap: 0.4rem;
}

.support-item {
  display: grid;
  gap: 0.15rem;
  text-align: left;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(247, 244, 236, 0.7);
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.support-item.is-on {
  border-color: var(--accent);
}

.support-form {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1.4rem;
}

[hidden] {
  display: none !important;
}

.support-form textarea,
.support-form input[type='file'] {
  width: 100%;
}

.support-msgs {
  display: grid;
  gap: 0.7rem;
  max-height: 28rem;
  overflow: auto;
  padding: 0.2rem 0 1rem;
}

.support-msg {
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line);
}

.support-msg.role-ai {
  background: rgba(228, 87, 46, 0.08);
}

.support-msg.role-owner {
  background: rgba(47, 111, 78, 0.1);
}

.support-msg p {
  margin: 0.35rem 0 0;
  white-space: pre-wrap;
}

.support-thread-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
}

.support-shot {
  display: block;
  max-width: min(100%, 22rem);
  margin-top: 0.5rem;
  border-radius: 8px;
}

.support-inbox .support-item {
  width: 100%;
}

/* --- Demy Lux: sito + dashboard, stessa pelle più cinematografica -------- */

:root {
  --ink: #101c18;
  --ink-soft: #3a4a43;
  --paper: #f4efe4;
  --paper-2: #e6dfcf;
  --accent: #e4572e;
  --accent-deep: #c2411d;
  --ok: #2f6f4e;
  --line: rgba(16, 28, 24, 0.11);
  --shadow: 0 24px 64px rgba(16, 28, 24, 0.13);
  --radius: 16px;
  --chat-dusk: #171e1b;
  --chat-dusk-2: #1f2824;
}

body {
  background: var(--paper);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page-bg,
.auth-backdrop {
  background:
    radial-gradient(ellipse 58% 42% at 8% -6%, rgba(228, 87, 46, 0.34), transparent 58%),
    radial-gradient(ellipse 48% 36% at 96% 4%, rgba(47, 111, 78, 0.22), transparent 54%),
    radial-gradient(ellipse 36% 28% at 48% 108%, rgba(228, 87, 46, 0.12), transparent 62%),
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.45), transparent 28%),
    linear-gradient(165deg, #f8f3e8 0%, #efe6d4 42%, #dce6df 100%);
}

.lux-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
  mix-blend-mode: multiply;
}

.lux-orb-1 {
  width: min(42vw, 420px);
  height: min(42vw, 420px);
  left: -8%;
  top: 8%;
  background: radial-gradient(circle, rgba(228, 87, 46, 0.38), transparent 68%);
  animation: luxDrift 18s ease-in-out infinite;
}

.lux-orb-2 {
  width: min(36vw, 360px);
  height: min(36vw, 360px);
  right: -6%;
  top: 4%;
  background: radial-gradient(circle, rgba(47, 111, 78, 0.32), transparent 70%);
  animation: luxDrift 22s ease-in-out infinite reverse;
}

.lux-orb-3 {
  width: min(50vw, 520px);
  height: min(28vw, 280px);
  left: 28%;
  bottom: -8%;
  background: radial-gradient(circle, rgba(228, 87, 46, 0.16), transparent 72%);
  animation: luxDrift 26s ease-in-out infinite;
}

@keyframes luxDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4%, 6%) scale(1.08); }
}

.site-page .primary-btn,
.site-page .ghost-btn,
.auth-page .primary-btn,
.dash-page .primary-btn {
  border-radius: 999px;
}

.site-page .primary-btn,
.auth-page .primary-btn,
.auth-panel button[type="submit"] {
  position: relative;
  overflow: hidden;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.88rem 1.35rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 14px 32px rgba(228, 87, 46, 0.32);
}

.site-page .primary-btn::after,
.auth-page .primary-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.32) 50%, transparent 62%);
  transform: translateX(-130%);
  transition: transform 0.55s ease;
  pointer-events: none;
}

.site-page .primary-btn:hover::after,
.auth-page .primary-btn:hover::after {
  transform: translateX(130%);
}

.site-page .ghost-btn {
  background: rgba(255, 253, 248, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: rgba(16, 28, 24, 0.14);
  padding: 0.72rem 1.15rem;
  font-weight: 600;
}

.site-page .ghost-btn:hover {
  background: #fffdf8;
  border-color: rgba(16, 28, 24, 0.28);
}

.site-page .discord-btn {
  background: #5865f2;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 14px 32px rgba(88, 101, 242, 0.38);
}

.site-page .discord-btn:hover {
  background: #4752c4;
}

.site-page .site-top-sticky {
  top: 0.7rem;
  z-index: 30;
  width: min(74rem, calc(100% - 1.5rem));
  margin: 0.55rem auto 0;
  padding: 0.5rem 0.65rem 0.5rem 1rem;
  background: rgba(255, 252, 246, 0.62);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid rgba(16, 28, 24, 0.1);
  border-bottom: 1px solid rgba(16, 28, 24, 0.1);
  border-radius: 999px;
  box-shadow: 0 16px 48px rgba(16, 28, 24, 0.08);
}

.site-page .site-top-sticky.scrolled {
  padding-top: 0.48rem;
  padding-bottom: 0.48rem;
  background: rgba(255, 252, 246, 0.88);
  box-shadow: 0 18px 50px rgba(16, 28, 24, 0.12);
}

.site-page .site-brand-pic {
  width: 40px;
  height: 40px;
  box-shadow:
    0 0 0 2px rgba(255, 253, 248, 0.95),
    0 0 0 4px rgba(228, 87, 46, 0.22),
    0 10px 22px rgba(228, 87, 46, 0.32);
}

.site-page .site-nav-link {
  border-radius: 999px;
  padding: 0.42rem 0.75rem;
}

.site-page .site-hero-wide {
  padding-top: clamp(1.6rem, 6vh, 4.2rem);
}

.site-page .site-hero-brand {
  font-size: clamp(4.1rem, 12vw, 7.4rem);
  letter-spacing: -0.05em;
  line-height: 0.86;
  margin-bottom: 0.15rem;
}

.site-page .site-hero-wide h1 {
  font-size: clamp(2.15rem, 5.6vw, 3.95rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  max-width: 16ch;
  margin-bottom: 0;
}

.site-page .site-hero-wide h1 em {
  font-style: italic;
  color: var(--accent-deep);
  background-image: linear-gradient(180deg, transparent 62%, rgba(228, 87, 46, 0.22) 62%);
}

.site-page .hero-kicker {
  background: rgba(255, 253, 248, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(16, 28, 24, 0.05);
}

.site-page .site-lead {
  font-size: 1.12rem;
  line-height: 1.55;
  max-width: 36rem;
}

.site-page .hero-stats {
  gap: 0.7rem 1.8rem;
}

.site-page .hero-stat strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.site-page .trust-row span {
  background: rgba(16, 28, 24, 0.06);
  border-color: transparent;
}

.site-page .chat-mock {
  background: var(--chat-dusk);
  color: #ece8de;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 28px 70px rgba(16, 28, 24, 0.38),
    0 0 0 1px rgba(228, 87, 46, 0.12);
}

.site-page .chat-mock-bar {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  color: #9aa59e;
}

.site-page .chat-mock-bar span {
  width: 10px;
  height: 10px;
  border: 0;
}

.site-page .chat-mock-bar span:nth-child(1) { background: #ff5f57; }
.site-page .chat-mock-bar span:nth-child(2) { background: #febc2e; }
.site-page .chat-mock-bar span:nth-child(3) { background: #28c840; }

.site-page .chat-msg b {
  color: #f6f1e6;
}

.site-page .chat-msg p {
  color: #ddd6c8;
}

.site-page .chat-msg code {
  background: rgba(255, 255, 255, 0.08);
  color: #f3e6d0;
}

.site-page .chat-typing {
  color: #8f9b94;
}

.site-page .chat-typing i {
  background: #c5cdc8;
}

.site-page .chat-embed {
  background: rgba(228, 87, 46, 0.14);
  color: #ece8de;
}

.site-page .chat-embed p {
  color: #c9c2b4;
}

.site-page .chat-embed.ok {
  background: rgba(47, 111, 78, 0.22);
}

.site-page .chat-embed.vote {
  background: rgba(88, 101, 242, 0.2);
}

.site-page .chat-embed.mc {
  background: rgba(61, 107, 79, 0.24);
}

.site-page .vote-chip {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ece8de;
}

.site-page .vote-chip.win {
  background: var(--ok);
  color: #fff;
  border-color: transparent;
}

.site-page .chat-sys {
  color: #8f9b94;
}

.site-page .chat-sticker {
  border-color: #fffdf8;
  box-shadow:
    0 0 0 4px rgba(228, 87, 46, 0.18),
    0 18px 40px rgba(16, 28, 24, 0.32);
}

.site-page .chat-stage::before {
  background: radial-gradient(circle at 70% 40%, rgba(228, 87, 46, 0.42), transparent 64%);
  filter: blur(32px);
}

.site-page .ticker,
.site-page .trust-row {
  display: none;
}

.site-page .section-kicker {
  letter-spacing: 0.18em;
}

.site-page .site-section h2,
.site-page .scene-copy h3 {
  letter-spacing: -0.03em;
}

.site-page .site-section h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.55rem);
}

.site-page .scene {
  border-top-color: rgba(16, 28, 24, 0.08);
}

.site-page .feature-card,
.site-page .step,
.site-page .price-card,
.site-page .faq-list details {
  background: rgba(255, 253, 248, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.site-page .feature-card:hover,
.site-page .step:hover {
  transform: translateY(-5px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 22px 48px rgba(16, 28, 24, 0.12);
}

.site-page .feature-card::before {
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #febc2e 55%, transparent);
  opacity: 1;
}

.site-page .step-n {
  font-size: 2.4rem;
}

.site-page .price-card-pro {
  background:
    linear-gradient(180deg, rgba(228, 87, 46, 0.16), rgba(255, 253, 248, 0.88) 42%);
  border-color: rgba(228, 87, 46, 0.42);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 28px 64px rgba(228, 87, 46, 0.18);
}

.site-page .price-tag {
  font-family: var(--font-display);
  font-size: 2.4rem;
  letter-spacing: -0.03em;
}

.site-page .site-final-cta {
  background: var(--ink);
  color: #efe8d8;
  border: 0;
  border-radius: 28px;
  max-width: 48rem;
  padding: 2.8rem 1.6rem 2.5rem;
  box-shadow: 0 28px 70px rgba(16, 28, 24, 0.28);
}

.site-page .site-final-cta h2 {
  color: #fffdf8;
}

.site-page .site-final-cta .ghost-btn {
  color: #efe8d8;
  border-color: rgba(239, 232, 216, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.site-page .site-final-cta .ghost-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(239, 232, 216, 0.4);
}

.site-page .final-pic {
  box-shadow:
    0 0 0 4px rgba(228, 87, 46, 0.28),
    0 16px 36px rgba(0, 0, 0, 0.35);
}

.site-page .site-foot {
  margin-top: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.site-page .foot-brand {
  font-size: 1.8rem;
}

.auth-panel {
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  border-radius: 24px;
  border: 1px solid rgba(16, 28, 24, 0.12);
  box-shadow: 0 28px 70px rgba(16, 28, 24, 0.16);
}

.dash-page .topbar {
  padding-top: 1.1rem;
}

.dash-page .brand-mark {
  letter-spacing: -0.03em;
}

.dash-page .panel {
  background: rgba(255, 253, 248, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 20px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 18px 48px rgba(16, 28, 24, 0.08);
}

.dash-page .status-pill {
  border-radius: 999px;
}

.dash-page .tab {
  border-radius: 999px;
}

.support-wrap,
.site-guide {
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.support-item,
.support-msg {
  border-radius: 14px;
}

.support-item.is-on {
  background: rgba(228, 87, 46, 0.08);
  box-shadow: 0 0 0 1px var(--accent);
}

@media (max-width: 1100px), (pointer: coarse) and (max-width: 1400px) {
  .site-page .site-top-sticky {
    border-radius: 22px;
    width: min(74rem, calc(100% - 1rem));
  }

  .site-page .site-nav {
    border-radius: 0 0 20px 20px;
    background: rgba(255, 252, 246, 0.98);
    left: 0;
    right: 0;
    top: calc(100% - 6px);
    padding-top: 1.1rem;
  }
}

html.is-compact .site-page .site-top-sticky {
  border-radius: 22px;
}

.site-page .site-hero:not(.site-hero-wide) {
  max-width: 46rem;
  padding-top: clamp(1.4rem, 5vh, 2.8rem);
  margin-left: auto;
  margin-right: auto;
}

.site-page .site-hero:not(.site-hero-wide) h1 {
  font-size: clamp(2.1rem, 5vw, 3.15rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.site-page .feature-card,
.site-page .step,
.site-page .price-card {
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.site-guide ol {
  counter-reset: demy-step;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-guide ol li {
  position: relative;
  padding: 1.05rem 1.15rem 1.05rem 3.4rem;
  margin: 0 0 0.75rem;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.site-guide ol li::before {
  counter-increment: demy-step;
  content: counter(demy-step);
  position: absolute;
  left: 0.95rem;
  top: 1.05rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1;
  color: var(--accent);
}

.site-page .site-features {
  gap: 0.55rem;
}

.site-page .site-features li {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.55);
  font-weight: 500;
}

.site-page .site-features li:last-child {
  border-bottom: 1px solid var(--line);
}

.dash-page .tabs .tab.active,
.dash-page .tab[aria-selected="true"] {
  box-shadow: 0 10px 24px rgba(16, 28, 24, 0.16);
}

@media (max-width: 860px) {
  .site-page .site-hero-wide h1 {
    max-width: none;
  }

  .hero-stage .app-window {
    transform: none;
  }

  .hero-stage:hover .app-window {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lux-orb,
  body::after,
  .site-page .primary-btn::after {
    animation: none;
    transition: none;
  }

  .lux-orb {
    display: none;
  }
}

/* --- Craft: finestra prodotto, bento, metriche, footer ------------------- */

.fig-label {
  margin: 0 0 0.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.app-window {
  background: var(--chat-dusk);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 28px 70px rgba(16, 28, 24, 0.38),
    0 0 0 1px rgba(228, 87, 46, 0.12);
}

.app-winbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.52rem 0.9rem;
  background: #121614;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #8f9b94;
  font-size: 0.76rem;
}

.app-winbar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.app-winbar span:nth-child(1) { background: #e4572e; }
.app-winbar span:nth-child(2) { background: #b8860b; }
.app-winbar span:nth-child(3) { background: #2f6f4e; }

.app-winbar em {
  margin-left: 0.45rem;
  font-style: normal;
  font-weight: 600;
  color: #ece8de;
  letter-spacing: -0.01em;
}

.app-body {
  display: grid;
  grid-template-columns: 8.6rem minmax(0, 1fr);
  min-height: 0;
}

.app-rail {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.7rem 0.5rem 0.85rem;
  background: #101412;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  color: #8f9b94;
  font-size: 0.76rem;
}

.app-rail b {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6d7a74;
  padding: 0.15rem 0.5rem 0.45rem;
}

.app-rail span {
  padding: 0.34rem 0.5rem;
  border-radius: 7px;
  line-height: 1.3;
}

.app-rail span[data-slide] {
  cursor: pointer;
}

.app-rail span.on {
  background: rgba(228, 87, 46, 0.22);
  color: #efe8d8;
}

.hero-stage .app-window .chat-mock,
.scene-visual .app-window .chat-mock,
.ask-pop .app-window .chat-mock {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--chat-dusk);
}

.hero-stage .app-window .chat-mock-bar span,
.scene-visual .app-window .chat-mock-bar span,
.ask-pop .app-window .chat-mock-bar span {
  display: none;
}

.scene-visual .app-rail span,
.ask-pop .app-rail span {
  cursor: default;
}

.hero-stage .chat-sticker {
  top: 1.35rem;
  right: -14px;
  z-index: 3;
}

.scene-visual .app-window,
.ask-pop .app-window {
  transform: none;
}

.scene-visual .chat-sticker {
  top: 0.7rem;
  right: -12px;
  z-index: 3;
}

.scene-visual .app-window .dash-mock {
  margin: 0;
  border: 0;
  border-radius: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--chat-dusk-2);
  color: #ece8de;
  box-shadow: none;
}

.scene-visual .app-window .dash-mock-bar {
  color: #8f9b94;
}

.scene-visual .app-window .dash-row {
  border-top-color: rgba(255, 255, 255, 0.06);
}

.scene-visual .app-window .dash-sw.off {
  background: #2a3330;
}

.site-page .hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 1.85rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 253, 248, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-page .hero-stat {
  flex: 1 1 8.5rem;
  margin: 0;
  padding: 0.9rem 1.1rem;
  border-right: 1px solid var(--line);
  border-bottom: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.site-page .hero-stat:last-child {
  border-right: 0;
}

.site-page .hero-stat strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--accent-deep);
  line-height: 1.1;
}

.site-page .feature-grid {
  counter-reset: feat;
  gap: 0.85rem;
}

.site-page .feature-prose {
  max-width: 40rem;
  margin-top: 0.2rem;
}

.site-page .feature-prose p {
  margin: 0 0 1.05rem;
  font-size: 1.08rem;
  line-height: 1.68;
  color: var(--ink-soft);
}

.site-page .feature-prose p:last-child {
  margin-bottom: 0;
}

.site-page .scenes-head {
  margin-bottom: 1.15rem;
}

.site-page .scene-story .chat-mock {
  min-height: 0;
  gap: 0.52rem;
  font-size: 0.86rem;
}

@media (min-width: 980px) {
  .site-page .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .site-page .feature-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
    padding: 1.85rem 2rem;
  }

  .site-page .feature-card:first-child h3 {
    font-size: 1.7rem;
  }

  .site-page .feature-card:first-child p {
    font-size: 1.05rem;
    line-height: 1.55;
  }
}

.site-page .feature-card h3::before {
  counter-increment: feat;
  content: counter(feat, decimal-leading-zero);
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent-deep);
}

.site-page .site-foot-grid {
  display: grid;
  grid-template-columns: minmax(10rem, 1.5fr) repeat(3, minmax(7rem, 1fr));
  gap: 1.75rem 2.2rem;
  align-items: start;
  margin-top: 1.5rem;
  padding: 2.4rem clamp(1.25rem, 4vw, 3rem) 3rem;
  border-top: 1px solid var(--line);
}

.site-page .site-foot-grid .foot-col {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.site-page .site-foot-grid .foot-h {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.site-page .site-foot-grid a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
}

.site-page .foot-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* top.gg vote badge — self-hosted (widget API returns 404 for new listings) */
.topgg-vote-badge {
  --topgg-pink: #ff3366;
  --topgg-violet: #7c3aed;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.85rem 0.5rem 0.5rem;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 51, 102, 0.14), rgba(124, 58, 237, 0.1)),
    linear-gradient(160deg, #1a1428 0%, #231a35 55%, #1c1630 100%);
  border: 1px solid rgba(255, 51, 102, 0.35);
  box-shadow:
    0 4px 18px rgba(255, 51, 102, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  overflow: hidden;
  isolation: isolate;
}

.topgg-vote-badge::before {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background: conic-gradient(from 200deg, transparent 0 55%, rgba(255, 51, 102, 0.35) 70%, transparent 85%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.topgg-vote-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 51, 102, 0.65);
  box-shadow:
    0 10px 28px rgba(255, 51, 102, 0.28),
    0 0 0 1px rgba(255, 51, 102, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

.topgg-vote-badge:hover::before {
  opacity: 1;
  animation: topgg-shimmer 1.8s linear infinite;
}

.topgg-vote-badge > * {
  position: relative;
  z-index: 1;
}

.topgg-vote-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.topgg-vote-body {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  line-height: 1.15;
  min-width: 0;
}

.topgg-vote-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.topgg-vote-kicker img {
  display: block;
  flex-shrink: 0;
  width: 0.9rem;
  height: 0.9rem;
}

.topgg-vote-label {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

.topgg-vote-star {
  margin-left: 0.1rem;
  font-size: 1rem;
  color: #ffd166;
  text-shadow: 0 0 12px rgba(255, 209, 102, 0.55);
  animation: topgg-star-pulse 2.4s ease-in-out infinite;
}

.topgg-vote-badge--lg {
  padding: 0.62rem 1rem 0.62rem 0.62rem;
  gap: 0.75rem;
}

.topgg-vote-badge--lg .topgg-vote-avatar {
  width: 2.35rem;
  height: 2.35rem;
}

.topgg-vote-badge--lg .topgg-vote-label {
  font-size: 1rem;
}

.topgg-spot-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 2rem;
  align-items: center;
  padding: clamp(1.35rem, 3vw, 2rem);
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(255, 51, 102, 0.22);
  background:
    radial-gradient(ellipse 80% 60% at 0% 0%, rgba(255, 51, 102, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(124, 58, 237, 0.1), transparent 50%),
    linear-gradient(155deg, rgba(26, 20, 40, 0.04) 0%, rgba(255, 255, 255, 0.55) 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.topgg-spot-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.topgg-spot-copy {
  position: relative;
  z-index: 1;
}

.topgg-spot-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.topgg-spot-card h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.topgg-spot-lead {
  margin: 0 0 1.1rem;
  max-width: 36rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.topgg-spot-art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

.topgg-spot-art img {
  width: clamp(5.5rem, 12vw, 7.5rem);
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(255, 51, 102, 0.22));
  animation: topgg-float 4.5s ease-in-out infinite;
}

@keyframes topgg-shimmer {
  to {
    transform: rotate(360deg);
  }
}

@keyframes topgg-star-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.85;
  }
}

@keyframes topgg-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@media (max-width: 640px) {
  .topgg-spot-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .topgg-spot-lead {
    margin-left: auto;
    margin-right: auto;
  }

  .topgg-spot-art {
    order: -1;
  }

  .topgg-spot-art img {
    width: 4.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topgg-vote-badge:hover::before,
  .topgg-vote-star,
  .topgg-spot-art img {
    animation: none;
  }

  .topgg-vote-badge:hover {
    transform: none;
  }
}

.site-page .site-foot-grid a:hover {
  color: var(--accent-deep);
}

.site-page .site-foot-grid .muted {
  margin: 0;
  max-width: 22rem;
}

@media (max-width: 860px) {
  .app-body {
    grid-template-columns: 1fr;
  }

  .app-rail {
    display: none;
  }

  .hero-stage .app-window .chat-mock-bar span,
  .scene-visual .app-window .chat-mock-bar span,
  .ask-pop .app-window .chat-mock-bar span {
    display: inline-block;
  }

  .fig-label {
    text-align: center;
  }

  .site-page .hero-stat {
    flex: 1 1 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .site-page .hero-stat:nth-child(even) {
    border-right: 0;
  }

  .site-page .hero-stat:last-child {
    border-bottom: 0;
  }

  .site-page .site-foot-grid {
    grid-template-columns: 1fr 1fr;
    padding-bottom: max(2.4rem, env(safe-area-inset-bottom));
  }
}

@media (max-width: 520px) {
  .site-page .site-foot-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dash-page .panel:hover {
    transform: none;
  }
}

.ask-fab {
  position: fixed;
  right: max(1.1rem, env(safe-area-inset-right));
  bottom: max(1.1rem, env(safe-area-inset-bottom));
  z-index: 44;
  width: 3.55rem;
  height: 3.55rem;
  padding: 0;
  border: 2px solid #fffdf8;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  box-shadow:
    0 16px 40px rgba(16, 28, 24, 0.32),
    0 0 0 1px rgba(228, 87, 46, 0.4);
}

.ask-fab-pic {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent) url("/img/demy.png") center 18% / cover no-repeat;
}

.ask-fab::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #23a559;
  border: 2px solid #fffdf8;
  pointer-events: none;
}

.ask-fab:hover {
  transform: translateY(-2px);
}

.ask-fab[aria-expanded="true"] {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.ask-win-close {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  flex: 0 0 auto;
  position: relative;
}

.ask-win-close::after {
  content: "";
  position: absolute;
  inset: 4.5px;
  border-radius: 50%;
  background: #e4572e;
}

.ask-win-close:hover::after {
  filter: brightness(1.15);
}

.ask-pop {
  position: fixed;
  right: max(0.85rem, env(safe-area-inset-right));
  bottom: max(0.85rem, env(safe-area-inset-bottom));
  z-index: 43;
  width: min(19rem, calc(100vw - 1.1rem));
  transform-origin: 92% 100%;
  animation: askPopIn 0.28s ease both;
}

.ask-pop[hidden] {
  display: none;
}

.ask-pop .app-window {
  width: 100%;
  max-height: min(19.5rem, calc(100vh - 6.2rem));
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 16px 36px rgba(16, 28, 24, 0.3),
    0 0 0 1px rgba(228, 87, 46, 0.12);
}

.ask-pop .app-rail,
.ask-pop .chat-mock-bar {
  display: none;
}

.ask-pop .app-body {
  min-height: 0;
  flex: 1;
  grid-template-columns: 1fr;
}

.ask-pop .app-winbar {
  padding: 0.32rem 0.55rem;
}

.ask-pop .app-winbar em {
  font-size: 0.72rem;
}

.ask-pop .chat-live {
  padding: 0.45rem 0.55rem 0.5rem;
  gap: 0.35rem;
  height: auto;
}

.ask-pop .chat-live-log {
  min-height: 6rem;
  max-height: min(10.5rem, 32vh);
  gap: 0.4rem;
}

.ask-pop .chat-msg {
  gap: 0.4rem;
}

.ask-pop .chat-avatar {
  width: 24px;
  height: 24px;
}

.ask-pop .chat-msg b {
  font-size: 0.74rem;
}

.ask-pop .chat-msg p {
  margin: 0.08rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.ask-pop .chat-live .chat-typing {
  padding-left: 1.9rem;
  font-size: 0.74rem;
}

.ask-pop .chat-live-composer {
  padding: 0.28rem 0.5rem 0.28rem 0.6rem;
  border-radius: 8px;
}

.ask-pop .chat-live-composer input[type="text"],
.ask-pop .chat-live-composer button {
  font-size: 0.78rem;
}

@keyframes askPopIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.chat-live {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
  padding-bottom: 0.75rem;
  height: 100%;
}

.chat-live-log {
  display: grid;
  gap: 0.7rem;
  min-height: 0;
  flex: 1;
  max-height: min(16rem, 42vh);
  overflow-y: auto;
  padding-right: 0.2rem;
}

.chat-live-log::-webkit-scrollbar {
  width: 8px;
}

.chat-live-log::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.chat-avatar.you {
  background: #3d5a80;
}

.chat-live .chat-typing {
  padding-left: 2.55rem;
}

.site-page .chat-live a {
  color: #f0b199;
}

.chat-live-composer {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.15rem;
  padding: 0.55rem 0.75rem 0.55rem 0.9rem;
  background: var(--chat-dusk-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.chat-live-composer input[type="text"] {
  flex: 1;
  width: auto;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ece8de;
  font: inherit;
  outline: none;
  padding: 0.2rem 0;
  box-shadow: none;
}

.chat-live-composer input[type="text"]:focus {
  border-color: transparent;
  box-shadow: none;
}

.chat-live-composer input::placeholder {
  color: #8f9b94;
}

.chat-live-composer button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #c9c2b4;
  font: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.2rem 0.15rem;
}

.chat-live-composer button:hover:not(:disabled) {
  color: #efe8d8;
}

.chat-live-composer button:disabled,
.chat-live-composer input:disabled {
  opacity: 0.45;
  cursor: default;
}

/* --- Piano: confronto professionale ------------------------------------ */
.plan-status {
  margin: 0 0 1.25rem;
  padding: 1.1rem 1.25rem;
  border-radius: 10px;
  border: 1px solid rgba(47, 42, 36, 0.12);
  background: #fff;
  box-shadow: 0 1px 2px rgba(47, 42, 36, 0.04);
}
.plan-status--pro {
  border-left: 3px solid #3d7a52;
  background: linear-gradient(90deg, rgba(61, 122, 82, 0.06), #fff 28%);
}
.plan-status--free {
  border-left: 3px solid rgba(47, 42, 36, 0.22);
}
.plan-status-kicker {
  display: block;
  font: 600 0.68rem/1.2 Outfit, system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}
.plan-status--pro .plan-status-kicker { color: #3d7a52; }
.plan-status h3 {
  margin: 0 0 0.4rem;
  font: 600 1.05rem/1.35 Outfit, system-ui, sans-serif;
  color: var(--ink);
}
.plan-status p {
  margin: 0;
  max-width: 44rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.plan-status-actions {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.plan-table-wrap {
  border: 1px solid rgba(47, 42, 36, 0.1);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.plan-table th,
.plan-table td {
  padding: 0.72rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(47, 42, 36, 0.08);
  vertical-align: top;
}
.plan-table thead th {
  font: 600 0.7rem/1.2 Outfit, system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(47, 42, 36, 0.03);
}
.plan-table th:nth-child(2),
.plan-table th:nth-child(3),
.plan-table td:nth-child(2),
.plan-table td:nth-child(3) {
  width: 7.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.plan-table tbody tr:last-child td { border-bottom: none; }
.plan-table tbody tr:hover { background: rgba(47, 42, 36, 0.02); }
.plan-table .plan-feature { font-weight: 500; color: var(--ink); }
.plan-table .plan-muted { color: var(--ink-soft); }
.plan-table .plan-pro { font-weight: 600; color: var(--ink); }
.plan-table tr.plan-row-key td { background: rgba(47, 42, 36, 0.02); }
.plan-table-foot {
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  border-top: 1px solid rgba(47, 42, 36, 0.08);
  background: rgba(47, 42, 36, 0.02);
}
body.piano-gratis .pro-only::after {
  content: 'Pro';
  display: inline-flex;
  margin-left: 0.4rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font: 600 0.62rem/1.2 Outfit, system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(47, 42, 36, 0.08);
  color: var(--ink-soft);
  vertical-align: middle;
}
body.piano-pagato .plan-status-cta { display: none; }
@media (max-width: 640px) {
  .plan-table th:nth-child(2),
  .plan-table th:nth-child(3),
  .plan-table td:nth-child(2),
  .plan-table td:nth-child(3) {
    width: 4.8rem;
    padding-left: 0.45rem;
    padding-right: 0.55rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 720px) {
  .ask-pop {
    left: auto;
    right: max(0.55rem, env(safe-area-inset-right));
    bottom: max(0.55rem, env(safe-area-inset-bottom));
    width: min(18.5rem, calc(100vw - 1rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ask-pop,
  .ask-fab {
    animation: none;
    transition: none;
  }
}
