/* Editor dello sfondo VIP */
html.vip-aperto, html.vip-aperto body { overflow: hidden; }
#vip-editor { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4, 8, 13, .82); }
#vip-editor.hidden { display: none; }
.vip-box { position: relative; box-sizing: border-box; width: min(1040px, 100%); max-height: 100%; overflow-y: auto; padding: 20px; background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--radius); color: var(--text-main); font-family: var(--font-inter); }
.vip-box h3 { margin: 0; padding-right: 48px; font-size: 20px; font-weight: 700; color: var(--text-main); }
.vip-aiuto { margin: 6px 0 16px; font-size: 13.5px; line-height: 1.5; color: var(--text-sub); }
.vip-x { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: var(--radius-sm); background: var(--bg-soft); color: var(--text-main); font-size: 18px; cursor: pointer; }
.vip-corpo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; }
.vip-foto { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; line-height: 0; cursor: crosshair; touch-action: none; user-select: none; }
.vip-foto img { display: block; max-width: 100%; max-height: 300px; border-radius: 6px; pointer-events: none; -webkit-user-drag: none; }
.vip-rett { position: absolute; box-sizing: border-box; pointer-events: none; }
.vip-rett.o { border: 2px solid var(--accent); box-shadow: 0 0 0 1px #000; }
.vip-rett.v { border: 2px dashed #fbbf24; box-shadow: 0 0 0 1px #000; }
.vip-punto { position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; border: 3px solid #fff; border-radius: 50%; background: rgba(56, 189, 248, .55); box-shadow: 0 0 0 2px #000; }
.vip-punto:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.vip-legenda { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--text-sub); }
.vip-legenda span::before { content: ''; display: inline-block; width: 16px; margin-right: 6px; vertical-align: middle; }
.vip-legenda .o::before { border-top: 2px solid var(--accent); }
.vip-legenda .v::before { border-top: 2px dashed #fbbf24; }
.vip-zoom { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 8px; font-size: 13px; font-weight: 600; }
.vip-zoom input { flex: 1; min-width: 0; accent-color: var(--accent); }
.vip-zoom output { width: 44px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-sub); }
.vip-piccola { margin: 8px 0 0; padding: 8px 10px; font-size: 12.5px; color: #fbbf24; background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .4); border-radius: var(--radius-sm); }
.vip-piccola.hidden { display: none; }
.vip-destra { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.vip-destra figure { margin: 0; }
.vip-destra figcaption { margin-bottom: 5px; font-size: 12px; color: var(--text-sub); }
.vip-vista { position: relative; overflow: hidden; border: 1px solid var(--border-card); border-radius: 8px; background: #000; }
.vip-vista canvas { display: block; }
.vip-mini { position: absolute; top: 0; left: 0; transform-origin: top left; pointer-events: none; }
.vip-mini-velo { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05) 0%, rgba(15, 23, 42, .35) 50%, rgba(15, 23, 42, .88) 100%); }
.vip-mini-testa { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 30px 20px 0; height: 150px; box-sizing: border-box; }
.vip-mini-testa b { font: 700 34px var(--font-inter); color: #fff; text-shadow: 0 2px 6px #000; white-space: nowrap; }
.vip-mini-testa span { width: 240px; height: 34px; border-radius: 17px; background: rgba(15, 23, 42, .75); }
.vip-mini-griglia { position: relative; display: grid; gap: 12px; padding: 12px 16px; }
.vip-mini-griglia i { height: 86px; border-radius: 12px; background: rgba(15, 23, 42, .62); border: 1px solid rgba(255, 255, 255, .12); }
.vip-azioni { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.vip-azioni button { min-height: 44px; padding: 0 18px; border: 1px solid var(--border-card); border-radius: var(--radius-sm); background: var(--bg-soft); color: var(--text-main); font: 600 14px var(--font-inter); cursor: pointer; }
.vip-azioni .vip-salva { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.vip-azioni button:disabled { opacity: .6; cursor: wait; }
#vip-barra { position: fixed; z-index: 2147483000; left: 50%; bottom: 84px; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; width: max-content; max-width: calc(100vw - 24px); box-sizing: border-box; padding: 10px 14px; background: var(--bg-card); border: 1px solid var(--accent); border-radius: var(--radius); color: var(--text-main); font: 600 13px var(--font-inter); box-shadow: 0 8px 30px rgba(0, 0, 0, .7); }
#vip-barra.hidden { display: none; }
#vip-barra button { min-height: 44px; padding: 0 14px; border: 1px solid var(--border-card); border-radius: var(--radius-sm); background: var(--bg-soft); color: var(--text-main); font: inherit; cursor: pointer; }
#vip-barra .vip-salva { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (max-width: 760px) {
  #vip-editor { padding: 0; }
  .vip-azioni .vip-centra { flex: 0 0 auto; }
  .vip-box { width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; padding: 16px; }
  .vip-corpo { grid-template-columns: minmax(0, 1fr); }
  .vip-destra { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
  .vip-destra figure { flex: none; }
  .vip-azioni { position: sticky; bottom: -16px; padding: 10px 0; background: var(--bg-card); }
  .vip-azioni button { flex: 1; }
}

/* Sfondo nel profilo: alto come lo schermo, cosi' il ritaglio salvato resta quello scelto */
html .discord-profile-banner.has-banner-img { height: min(100%, 100vh) !important; height: min(100%, 100svh) !important; }
