/* =========================================================
   CHATTITALY – stile
   ========================================================= */
:root {
  /* colori del tema (terne RGB, cambiano con data-theme su <html>) */
  --c-acc: 139, 76, 255;
  --c-acc-l: 177, 140, 255;
  --c-acc-l2: 160, 110, 255;
  --c-acc-d: 122, 63, 240;
  --c-acc-dd: 91, 47, 214;
  --c-acc2: 94, 231, 255;
  --c-pink: 237, 58, 168;
  --c-cyan: 37, 190, 232;
  --c-g1: 206, 62, 255;
  --c-g2: 110, 112, 255;
  --c-g3: 41, 204, 245;
  --c-bg: 5, 6, 18;
  --c-panel: 10, 13, 34;
  --c-ink: 255, 255, 255;
  --strong: #fff;
  --c-deep: 7, 8, 22;
  --c-send1: 122, 18, 54;
  --c-send2: 194, 24, 91;
  --c-tick: 196, 178, 255;
  --bg: rgb(var(--c-bg));
  --bg-2: #0a0b1f;
  --panel: rgba(var(--c-panel), .78);
  --panel-solid: #0f1230;
  --panel-2: rgba(255, 255, 255, .045);
  --panel-3: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #eff4ff;
  --text-2: #b9c2dd;
  --text-3: #7c84a6;
  --green: rgb(var(--c-acc));
  --red: #e8364a;
  --violet: rgb(var(--c-acc));
  --accent: rgb(var(--c-acc));
  --accent-2: rgb(var(--c-acc2));
  --grad: linear-gradient(90deg, rgb(var(--c-g1)) 0%, rgb(var(--c-g2)) 50%, rgb(var(--c-g3)) 100%);
  --grad-btn: linear-gradient(90deg, rgb(var(--c-cyan)) 0%, rgb(var(--c-acc)) 52%, rgb(var(--c-pink)) 100%);
  --male: #5ab0ff;
  --female: #ff7ab6;
  --other: #b9a4ff;
  --gold: #ffcc4d;
  --ok: #2ee59d;
  --warn: #ffb547;
  --danger: #ff5470;
  --radius: 22px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .65);
  --topbar: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: rgb(var(--c-acc2)); }
img { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: rgba(var(--c-acc), .45); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(var(--c-ink), .12); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(var(--c-ink), .22); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- sfondo aurora ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45; animation: float 26s ease-in-out infinite alternate; }
.aurora span:nth-child(1) { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: rgb(var(--c-acc-d)); opacity: .30; }
.aurora span:nth-child(2) { width: 40vw; height: 40vw; right: -10vw; top: 10vh; background: rgb(var(--c-cyan)); animation-duration: 32s; opacity: .12; }
.aurora span:nth-child(3) { width: 42vw; height: 42vw; left: 30vw; bottom: -22vw; background: rgb(var(--c-pink)); animation-duration: 38s; opacity: .22; }
@keyframes float { from { transform: translate(0, 0) scale(1); } to { transform: translate(6vw, 4vh) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .aurora span { animation: none; } }

#root { position: relative; z-index: 1; height: 100%; }

/* ---------- boot ---------- */
.boot { height: 100%; display: grid; place-content: center; justify-items: center; gap: 22px; }
.boot img { animation: pop 1.2s ease-in-out infinite alternate; filter: drop-shadow(0 10px 30px rgba(var(--c-acc), .5)); }
.boot-bar { width: 140px; height: 4px; border-radius: 4px; background: var(--panel-3); overflow: hidden; position: relative; }
.boot-bar::after { content: ''; position: absolute; inset: 0; width: 40%; background: var(--grad); border-radius: 4px; animation: load 1.1s ease-in-out infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes pop { from { transform: scale(.94); } to { transform: scale(1.04); } }

/* ---------- elementi base ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); font-weight: 600; white-space: nowrap;
  transition: transform .12s ease, background .2s, border-color .2s, box-shadow .2s, opacity .2s;
}
.btn:hover { background: var(--panel-3); border-color: rgba(var(--c-ink), .22); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { border: 0; background: var(--grad-btn); color: #fff; box-shadow: 0 10px 30px -10px rgba(var(--c-acc), .7); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.green { border: 0; background: linear-gradient(135deg, rgb(var(--c-acc-d)), #12a7a0); color: #fff; }
.btn.danger { border: 0; background: linear-gradient(135deg, #ff4d6a, #e5304f); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn.xs { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn.lg { height: 50px; font-size: 16px; border-radius: 14px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid transparent; background: transparent;
  display: inline-grid; place-items: center; color: var(--text-2); position: relative; flex: none;
  transition: background .2s, color .2s, transform .12s;
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.active { color: var(--strong); background: rgba(var(--c-acc), .22); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 10px; }
.icon-btn.sm svg { width: 18px; height: 18px; }
svg.i { width: 20px; height: 20px; flex: none; }

.badge {
  min-width: 19px; height: 19px; padding: 0 6px; border-radius: 10px; font-size: 11px; font-weight: 800;
  background: var(--red); color: #fff; display: inline-grid; place-items: center; line-height: 1;
}
.icon-btn .badge { position: absolute; top: 2px; right: 0; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input, select.input, textarea.input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(var(--c-bg), .55); color: var(--text); outline: none; transition: border-color .2s, box-shadow .2s;
}
textarea.input { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: rgba(var(--c-acc), .8); box-shadow: 0 0 0 4px rgba(var(--c-acc), .18); }
.input::placeholder { color: var(--text-3); }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23b4b8d8' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
select.input option { background: var(--panel-solid); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.hint { font-size: 12.5px; color: var(--text-3); }
.error-box { background: rgba(255, 84, 112, .12); border: 1px solid rgba(255, 84, 112, .35); color: #ffb3c0; padding: 10px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 14px; }

.seg { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: rgba(var(--c-bg), .5); border: 1px solid var(--line); }
.seg button { flex: 1; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { background: var(--panel-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg button.on.m { color: var(--male); }
.seg button.on.f { color: var(--female); }
.seg button.on.a { color: var(--other); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); margin-bottom: 10px; cursor: pointer; user-select: none; }
.check input { appearance: none; width: 20px; height: 20px; flex: none; border-radius: 6px; border: 1.5px solid var(--line-2); background: rgba(var(--c-bg), .5); display: grid; place-items: center; margin: 0; cursor: pointer; }
.check input:checked { background: var(--grad-btn); border-color: transparent; }
.check input:checked::after { content: ''; width: 10px; height: 6px; border: 2.5px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check a { color: rgb(var(--c-acc2)); }

.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { appearance: none; position: absolute; inset: 0; margin: 0; border-radius: 20px; background: var(--panel-3); border: 1px solid var(--line-2); cursor: pointer; transition: background .2s; }
.switch input:checked { background: var(--grad-btn); border-color: transparent; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked::after { transform: translateX(18px); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }

/* ---------- avatar ---------- */
.avatar {
  --s: 38px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; position: relative;
  display: grid; place-items: center; font-weight: 800; font-size: calc(var(--s) * .42); color: #fff;
  background: linear-gradient(135deg, rgb(var(--c-acc-dd)), rgb(var(--c-acc))); overflow: hidden; text-transform: uppercase; user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.M { background: linear-gradient(135deg, #2c7df0, #5ab0ff); }
.avatar.F { background: linear-gradient(135deg, #e0458c, #ff8fc0); }
.avatar.A { background: linear-gradient(135deg, #7b5cff, #c3a8ff); }
.avatar-wrap { position: relative; flex: none; }
.avatar-wrap .dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); border: 2.5px solid var(--panel-solid); }

.g-M { color: var(--male); }
.g-F { color: var(--female); }
.g-A { color: var(--other); }

.role { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 20px; letter-spacing: .02em; text-transform: uppercase; vertical-align: middle; }
.role.admin { background: rgba(255, 204, 77, .16); color: var(--gold); }
.role.mod { background: rgba(46, 229, 157, .14); color: var(--ok); }
.role.dj { background: rgba(var(--c-acc), .18); color: #ff8a95; }
.role.guest { background: rgba(var(--c-ink), .08); color: var(--text-3); }

/* =========================================================
   LANDING
   ========================================================= */
.landing { height: 100%; overflow-y: auto; overflow-x: hidden; }
.landing-inner { max-width: 1180px; margin: 0 auto; padding: 28px 24px 40px; min-height: 100%; display: flex; flex-direction: column; }
.landing-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 40px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 38px; height: 38px; filter: drop-shadow(0 6px 16px rgba(var(--c-acc), .45)); }
.wordmark { font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
.wordmark b { background: linear-gradient(90deg, rgb(var(--c-g1)), rgb(var(--c-g2)) 50%, rgb(var(--c-g3))); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 30px; background: var(--panel); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.live-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(46, 229, 157, .6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46, 229, 157, .6); } 70% { box-shadow: 0 0 0 10px rgba(46, 229, 157, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 229, 157, 0); } }

.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; flex: 1; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.02; letter-spacing: -.035em; margin: 0 0 20px; font-weight: 800; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--text-2); max-width: 540px; margin: 0 0 30px; }
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 560px; }
.feature { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); }
.feature .fi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.feature .fi svg { width: 22px; height: 22px; }
.feature b { display: block; font-size: 14.5px; }
.feature span { font-size: 12.5px; color: var(--text-3); }
.fi.c1 { background: rgba(31, 209, 122, .15); color: var(--green); }
.fi.c2 { background: rgba(var(--c-acc), .18); color: rgb(var(--c-acc2)); }
.fi.c3 { background: rgba(255, 61, 87, .15); color: #ff7d91; }
.fi.c4 { background: rgba(255, 204, 77, .15); color: var(--gold); }
.fi.c5 { background: rgba(90, 176, 255, .15); color: var(--male); }
.fi.c6 { background: rgba(255, 122, 182, .15); color: var(--female); }

.auth-card { padding: 26px; box-shadow: var(--shadow); position: relative; }
.auth-card::before { content: ''; position: absolute; inset: -1px; border-radius: var(--radius); padding: 1px; background: linear-gradient(160deg, rgba(31, 209, 122, .5), rgba(var(--c-acc), .25) 40%, rgba(255, 61, 87, .5)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.auth-card h2 { margin: 4px 0 4px; font-size: 22px; letter-spacing: -.02em; }
.auth-card .sub { color: var(--text-3); font-size: 14px; margin: 0 0 18px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(var(--c-bg), .5); border: 1px solid var(--line); margin-bottom: 20px; }
.tabs button { flex: 1; height: 38px; border: 0; background: transparent; border-radius: 10px; color: var(--text-2); font-weight: 700; font-size: 14px; }
.tabs button.on { background: var(--grad-btn); color: #fff; box-shadow: 0 6px 18px -8px rgba(var(--c-acc), .8); }
.adult-note { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 14px; font-size: 12.5px; color: var(--text-3); }
.adult-note b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--red); color: #ff7d91; font-size: 10.5px; }
.landing-foot { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; color: var(--text-3); font-size: 13px; }
.landing-foot button { background: none; border: 0; color: var(--text-2); padding: 0; text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================
   APP SHELL
   ========================================================= */
.app { height: 100%; display: flex; flex-direction: column; }
.topbar {
  height: calc(var(--topbar) + var(--safe-t)); padding: var(--safe-t) 16px 0; flex: none; display: flex; align-items: center; gap: 14px;
  background: rgba(var(--c-deep), .72); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  position: relative; z-index: 20;
}
.topbar .brand .wordmark { font-size: 19px; }
.nav { display: flex; gap: 4px; margin-left: 10px; }
.nav button { height: 40px; padding: 0 14px; border-radius: 12px; border: 0; background: transparent; color: var(--text-2); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; position: relative; }
.nav button:hover { background: var(--panel-2); color: var(--text); }
.nav button.on { background: var(--panel-3); color: var(--text); }
.nav button .badge { position: static; }
.topbar .spacer { flex: 1; }

/* radio */
.radio {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 8px 0 6px; border-radius: 16px;
  background: var(--panel-2); border: 1px solid var(--line); min-width: 0; max-width: 380px;
}
.radio .play { width: 36px; height: 36px; border-radius: 12px; border: 0; background: var(--grad-btn); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 6px 16px -6px rgba(var(--c-acc), .8); }
.radio .play svg { width: 18px; height: 18px; }
.radio .meta { min-width: 0; flex: 1; cursor: pointer; padding: 2px 4px; border-radius: 8px; }
.radio .meta:hover { background: var(--panel-2); }
.radio .meta small { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.radio .meta b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio .live { color: #ff6b81; display: inline-flex; align-items: center; gap: 5px; }
.radio .live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #ff3d57; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.radio .vol { width: 80px; accent-color: rgb(var(--c-acc)); }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.eq i { width: 3px; background: var(--green); border-radius: 2px; animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s; background: #fff; }
.eq i:nth-child(3) { animation-delay: .4s; background: var(--red); }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }

.me-btn { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 30px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); max-width: 220px; }
.me-btn:hover { background: var(--panel-3); }
.me-btn .nick { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* tasto profilo (xd-75): angoli arrotondati, bordo al neon, foto con anello, ruolo sotto il nome, freccina del menu */
.topbar .me-btn { height: 48px; gap: 10px; padding: 0 10px 0 5px; max-width: 250px; border-radius: 14px; border: 1px solid rgba(var(--c-acc), .45);
  background: linear-gradient(135deg, rgba(var(--c-acc), .16), rgba(var(--c-panel), .85) 60%); box-shadow: 0 0 14px rgba(var(--c-acc), .22), inset 0 1px 0 rgba(255, 255, 255, .05); transition: box-shadow .15s, border-color .15s; }
.topbar .me-btn:hover { background: linear-gradient(135deg, rgba(var(--c-acc), .26), rgba(var(--c-panel), .85) 60%); border-color: rgba(var(--c-acc), .7); box-shadow: 0 0 18px rgba(var(--c-acc), .38); }
.me-av { position: relative; flex: none; display: grid; padding: 4px; border-radius: 50%; background: var(--grad-btn); }
.me-av .avatar { --s: 32px; box-shadow: 0 0 0 2px var(--panel-solid); }
.me-dot { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: #2ee59d; border: 2px solid var(--panel-solid); }
.me-txt { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.me-txt .nick { max-width: 140px; }
.me-role { font-size: 11px; font-weight: 700; color: var(--text-3); }
.me-role.r-owner { color: #ffd76a; }
.me-role.r-super { color: #ff6b81; }
.me-role.r-admin, .me-role.r-mod { color: rgb(var(--c-acc2)); }
.me-role.r-dj { color: #2ee59d; }
.me-chev { display: grid; color: var(--text-3); margin-left: 2px; }
.me-chev svg { width: 16px; height: 16px; }
@media (max-width: 900px) {
  .topbar .me-btn { height: auto; padding: 0; border: 0; background: transparent; box-shadow: none; border-radius: 50%; }
  .topbar .me-btn:hover { background: transparent; box-shadow: none; }
  .me-txt, .me-chev { display: none; }
  .me-av { box-shadow: 0 0 14px rgba(var(--c-acc), .35); }
  .me-av .avatar { --s: 36px; }
}

.main { flex: 1; min-height: 0; position: relative; }
.view { position: absolute; inset: 0; }

/* ---------- layout chat ---------- */
.chat { display: grid; grid-template-columns: 290px minmax(0, 1fr) 270px; height: 100%; gap: 14px; padding: 14px; }
.pane { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.pane-head { padding: 16px 16px 10px; display: flex; align-items: center; gap: 8px; }
.pane-head h3 { margin: 0; font-size: 15px; font-weight: 800; flex: 1; letter-spacing: -.01em; }
.pane-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 10px 12px; }

.side-tabs { display: flex; margin: 12px 12px 4px; padding: 4px; gap: 4px; border-radius: 14px; background: rgba(var(--c-bg), .45); border: 1px solid var(--line); }
.side-tabs button { flex: 1; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-weight: 700; font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.side-tabs button.on { background: var(--panel-3); color: var(--text); }

.section-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 12px 8px 6px; }
.list-item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border-radius: 13px; border: 0;
  background: transparent; text-align: left; color: var(--text); position: relative; transition: background .15s;
}
.list-item:hover { background: var(--panel-2); }
.list-item.on { background: linear-gradient(90deg, rgba(var(--c-acc), .22), rgba(var(--c-acc), .06)); box-shadow: inset 0 0 0 1px rgba(var(--c-acc), .3); }
.list-item .ri { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: var(--panel-2); border: 1px solid var(--line); flex: none; }
.list-item .lt { min-width: 0; flex: 1; }
.list-item .lt b { display: block; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .lt > span { display: block; font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .count { font-size: 12px; font-weight: 700; color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px; background: var(--panel-2); }
.list-item .count::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.list-item .count.zero::before { background: var(--text-3); }
.list-item .unread { position: static; }
.empty { text-align: center; color: var(--text-3); font-size: 13.5px; padding: 26px 16px; }
.empty .big { font-size: 34px; margin-bottom: 6px; }

/* ---------- conversazione ---------- */
.conv { min-width: 0; }
.conv-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--line); min-height: 66px; }
.conv-head .ri { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 21px; background: var(--panel-2); border: 1px solid var(--line); flex: none; }
.conv-title { min-width: 0; flex: 1; }
.conv-title b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-title span { display: block; font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-actions { display: flex; gap: 6px; align-items: center; }
.cam-toggle.on { background: linear-gradient(135deg, rgb(var(--c-acc-d)), #12a7a0); border: 0; color: #fff; }

.camstrip { display: flex; gap: 10px; padding: 10px 12px; overflow-x: auto; border-bottom: 1px solid var(--line); background: rgba(4, 6, 5, .35); flex: none; }
.camtile { position: relative; width: 210px; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: rgb(var(--c-bg)); flex: none; border: 1px solid var(--line-2); }
.camtile.big { width: 340px; }
.camtile video { width: 100%; height: 100%; object-fit: cover; background: rgb(var(--c-bg)); display: block; }
.camtile.mine video { transform: scaleX(-1); }
.camtile .ct-label { position: absolute; left: 8px; bottom: 8px; right: 8px; display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.camtile .ct-label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 3px 8px; border-radius: 20px; background: rgba(0, 0, 0, .5); backdrop-filter: blur(6px); }
.camtile .ct-tools { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.camtile:hover .ct-tools, .camtile:focus-within .ct-tools { opacity: 1; }
@media (hover: none) { .camtile .ct-tools { opacity: 1; } }
.camtile .ct-tools button { width: 30px; height: 30px; border-radius: 9px; border: 0; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); }
.camtile .ct-tools button svg { width: 16px; height: 16px; }
.camtile .ct-state { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; font-size: 13px; color: var(--text-2); padding: 10px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(var(--c-ink), .15); border-top-color: rgb(var(--c-acc2)); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.camtile .viewers { position: absolute; top: 6px; left: 6px; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 20px; background: rgba(0, 0, 0, .55); display: inline-flex; gap: 5px; align-items: center; }
.camtile .viewers svg { width: 13px; height: 13px; }
.rec { width: 8px; height: 8px; border-radius: 50%; background: #ff3d57; animation: blink 1.2s infinite; flex: none; }

.messages { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px 8px; overscroll-behavior: contain; scroll-behavior: auto; }
.msg { display: flex; gap: 10px; padding: 2px 0; position: relative; }
.msg.first { margin-top: 12px; }
.msg .avatar-slot { width: 38px; flex: none; }
.msg .avatar { cursor: pointer; }
.msg .body { min-width: 0; max-width: min(680px, 82%); }
.msg .meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; padding-left: 2px; }
.msg .meta .who { font-weight: 800; font-size: 13.5px; cursor: pointer; background: none; border: 0; padding: 0; }
.msg .meta .who:hover { text-decoration: underline; }
.msg .meta time { font-size: 11.5px; color: var(--text-3); }
.bubble {
  display: inline-block; padding: 9px 13px; border-radius: 4px 18px 18px 18px; background: rgba(var(--c-ink), .07);
  border: 1px solid rgba(var(--c-ink), .06); white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; font-size: 14.5px;
}
.msg:not(.first) .bubble { border-radius: 18px; border-top-left-radius: 8px; }
.msg.mine { flex-direction: row-reverse; }
.msg.mine .body { display: flex; flex-direction: column; align-items: flex-end; }
.msg.mine .meta { flex-direction: row-reverse; padding-right: 2px; }
.msg.mine .bubble { background: linear-gradient(135deg, rgba(15, 157, 88, .9), rgba(var(--c-acc), .82)); border-color: transparent; border-radius: 18px 4px 18px 18px; color: #fff; }
.msg.mine:not(.first) .bubble { border-radius: 18px; border-top-right-radius: 8px; }
.msg.mention .bubble { box-shadow: 0 0 0 1.5px rgba(255, 204, 77, .7); background: rgba(255, 204, 77, .1); }
.msg.action .bubble { background: transparent; border: 1px dashed var(--line-2); font-style: italic; color: var(--text-2); }
.msg .bubble a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.msg.mine .bubble a { color: #fff; }
.bubble .at { font-weight: 700; color: #ffd36b; }
.msg.mine .bubble .at { color: #fff3c4; }
.bubble.jumbo { background: transparent !important; border: 0 !important; font-size: 40px; padding: 0 2px; line-height: 1.15; box-shadow: none !important; }
.msg .tools { position: absolute; top: 50%; transform: translateY(-50%); right: 0; display: none; gap: 2px; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 10px; padding: 2px; z-index: 2; }
.msg.mine .tools { right: auto; left: 0; }
.msg:hover .tools { display: flex; }
.msg .tools button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); display: grid; place-items: center; }
.msg .tools button:hover { background: var(--panel-3); color: var(--text); }
.msg .tools svg { width: 15px; height: 15px; }
.msg .seen { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.notice { text-align: center; margin: 10px 0; }
.notice span { display: inline-block; font-size: 12.5px; color: var(--text-3); padding: 4px 12px; border-radius: 20px; background: rgba(var(--c-ink), .04); }
.notice.warn span { color: #ffd38a; background: rgba(255, 181, 71, .1); }
.day-sep { display: flex; align-items: center; gap: 12px; margin: 18px 0 6px; color: var(--text-3); font-size: 12px; font-weight: 700; }
.day-sep::before, .day-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.jump { position: absolute; right: 22px; bottom: 96px; z-index: 5; }
.jump .btn { box-shadow: var(--shadow); }

.typing { height: 22px; padding: 0 20px; font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 8px; flex: none; }
.typing .dots { display: inline-flex; gap: 3px; }
.typing .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); animation: tdot 1.2s infinite; }
.typing .dots i:nth-child(2) { animation-delay: .15s; }
.typing .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.composer { padding: 8px 12px 12px; flex: none; position: relative; }
.composer-box { display: flex; align-items: flex-end; gap: 6px; padding: 6px; border-radius: 18px; background: rgba(var(--c-bg), .6); border: 1px solid var(--line-2); transition: border-color .2s, box-shadow .2s; }
.composer-box:focus-within { border-color: rgba(var(--c-acc), .7); box-shadow: 0 0 0 4px rgba(var(--c-acc), .14); }
.composer textarea { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; resize: none; max-height: 140px; min-height: 40px; padding: 9px 6px; line-height: 1.4; font-size: 15px; }
.composer textarea::placeholder { color: var(--text-3); }
.send { width: 42px; height: 42px; border-radius: 13px; border: 0; background: var(--grad-btn); color: #fff; display: grid; place-items: center; flex: none; transition: transform .12s, opacity .2s; }
.send:disabled { opacity: .4; cursor: default; }
.send:not(:disabled):active { transform: scale(.92); }
.send svg { width: 19px; height: 19px; }
.composer .counter { position: absolute; right: 70px; bottom: 20px; font-size: 11px; color: var(--text-3); pointer-events: none; }
.composer .locked { text-align: center; padding: 12px; color: var(--text-3); font-size: 13.5px; border-radius: 14px; background: var(--panel-2); }

/* emoji picker */
.emoji-pop { position: absolute; bottom: calc(100% - 2px); left: 12px; width: 340px; max-width: calc(100vw - 24px); height: 330px; display: flex; flex-direction: column; z-index: 30; box-shadow: var(--shadow); background: var(--panel-solid); }
.emoji-cats { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); }
.emoji-cats button { flex: 1; height: 34px; border: 0; border-radius: 9px; background: transparent; font-size: 18px; }
.emoji-cats button.on { background: var(--panel-3); }
.emoji-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(8, 1fr); padding: 6px; gap: 2px; align-content: start; }
.emoji-grid button { aspect-ratio: 1; border: 0; background: transparent; border-radius: 9px; font-size: 22px; display: grid; place-items: center; padding: 0; }
.emoji-grid button:hover { background: var(--panel-3); }

/* ---------- utenti ---------- */
.search { position: relative; margin: 0 12px 6px; }
.search input { height: 38px; padding-left: 36px; font-size: 14px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-3); }
.filter-chips { display: flex; gap: 6px; padding: 4px 12px 6px; flex-wrap: wrap; }
.chip { height: 28px; padding: 0 11px; border-radius: 20px; border: 1px solid var(--line); background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.chip.on { background: var(--panel-3); color: var(--text); border-color: var(--line-2); }
.user-row .lt b { display: flex; align-items: center; gap: 6px; }
.user-row .lt b .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row .cam-ic { color: var(--ok); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; flex: none; }
.user-row .cam-ic:hover { background: rgba(46, 229, 157, .15); }
.user-row .cam-ic.priv { color: var(--warn); }
.user-row .cam-ic svg { width: 18px; height: 18px; }
.user-row.ignored { opacity: .45; }

/* ---------- popover / menu ---------- */
.pop {
  position: fixed; z-index: 60; min-width: 220px; max-width: min(320px, calc(100vw - 20px)); padding: 6px; border-radius: 16px;
  background: rgba(var(--c-panel), .97); border: 1px solid var(--line-2); box-shadow: var(--shadow); backdrop-filter: blur(20px);
  animation: popIn .14s ease-out;
}
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.pop .menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border: 0; border-radius: 10px; background: transparent; text-align: left; color: var(--text); font-size: 14px; font-weight: 600; }
.pop .menu-item:hover { background: var(--panel-3); }
.pop .menu-item svg { width: 18px; height: 18px; color: var(--text-2); }
.pop .menu-item.danger { color: #ff8a9c; }
.pop .menu-item.danger svg { color: #ff8a9c; }
.pop .menu-item:disabled { opacity: .45; cursor: default; }
.pop .menu-item:disabled:hover { background: transparent; }
.pop hr { border: 0; height: 1px; background: var(--line); margin: 5px 4px; }
.pop .menu-label { font-size: 11px; font-weight: 800; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; padding: 8px 11px 4px; }
.user-card { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px; }
.user-card b { font-size: 16px; display: block; }
.user-card .info { font-size: 13px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }

/* ---------- modali ---------- */
.overlay { position: fixed; inset: 0; z-index: 70; background: rgba(4, 5, 14, .66); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 460px; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: var(--shadow); animation: rise .2s ease-out; position: relative; }
.modal.wide { max-width: 640px; }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.02em; padding-right: 36px; }
.modal .sub { margin: 0 0 18px; color: var(--text-3); font-size: 14px; }
.modal .close { position: absolute; top: 14px; right: 14px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.modal .prose { color: var(--text-2); font-size: 14.5px; }
.modal .prose h4 { color: var(--text); margin: 18px 0 6px; }
.modal .prose li { margin-bottom: 6px; }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.opt { padding: 14px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--panel-2); text-align: left; color: var(--text); }
.opt b { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.opt span { font-size: 12.5px; color: var(--text-3); }
.opt.on { border-color: #3fd28a; background: rgba(var(--c-acc), .14); }
.preview-video { width: 100%; aspect-ratio: 4 / 3; border-radius: 14px; background: rgb(var(--c-bg)); object-fit: cover; transform: scaleX(-1); margin-bottom: 14px; display: block; }
.setting-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row > div { flex: 1; }
.setting-row b { display: block; font-size: 14.5px; }
.setting-row span { font-size: 12.5px; color: var(--text-3); }
.colors { display: flex; flex-wrap: wrap; gap: 8px; }
.colors button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; padding: 0; }
.colors button.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(var(--c-ink), .2); }
.colors button.none { background: conic-gradient(var(--male), var(--female), var(--other), var(--male)); }
.profile-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.profile-head .avatar { --s: 88px; }
.profile-head h3 { padding: 0; margin-bottom: 4px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; margin: 10px 0 16px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; }
.bio { background: var(--panel-2); border: 1px solid var(--line); padding: 12px 14px; border-radius: 14px; white-space: pre-wrap; color: var(--text-2); font-size: 14px; }

/* ---------- chiamata ---------- */
.call { position: fixed; inset: 0; z-index: 80; background: rgb(var(--c-bg)); display: flex; flex-direction: column; animation: fade .2s; }
.call .remote { flex: 1; min-height: 0; position: relative; }
.call .remote video { width: 100%; height: 100%; object-fit: contain; background: rgb(var(--c-bg)); }
.call .local { position: absolute; right: 18px; top: calc(18px + var(--safe-t)); width: 180px; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; border: 2px solid rgba(var(--c-ink), .2); box-shadow: var(--shadow); background: #111; z-index: 2; }
.call .local video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.call .call-info { position: absolute; left: 0; right: 0; top: calc(20px + var(--safe-t)); text-align: center; z-index: 1; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.call .call-info b { font-size: 20px; display: block; }
.call .call-info span { color: var(--text-2); font-size: 14px; }
.call .call-state { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; text-align: center; }
.call .call-state .avatar { --s: 120px; box-shadow: 0 0 0 10px rgba(var(--c-acc), .12), 0 0 0 22px rgba(var(--c-acc), .06); animation: ring 1.6s ease-in-out infinite; }
@keyframes ring { 50% { box-shadow: 0 0 0 16px rgba(var(--c-acc), .18), 0 0 0 34px rgba(var(--c-acc), .06); } }
.call-bar { display: flex; justify-content: center; gap: 16px; padding: 18px 18px calc(22px + var(--safe-b)); background: linear-gradient(transparent, rgba(0, 0, 0, .6)); position: absolute; left: 0; right: 0; bottom: 0; }
.call-bar button { width: 60px; height: 60px; border-radius: 50%; border: 0; background: rgba(var(--c-ink), .14); color: #fff; display: grid; place-items: center; backdrop-filter: blur(10px); }
.call-bar button svg { width: 25px; height: 25px; }
.call-bar button.off { background: #fff; color: #111; }
.call-bar button.hang { background: #ff3d57; }
.call-bar button.answer { background: rgb(var(--c-acc-d)); }

/* ---------- toast ---------- */
#toasts { position: fixed; z-index: 90; top: calc(76px + var(--safe-t)); right: 16px; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: 16px; background: rgba(var(--c-panel), .97); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: slideIn .25s ease-out; backdrop-filter: blur(16px); }
.toast.out { animation: slideOut .25s ease-in forwards; }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } }
@keyframes slideOut { to { opacity: 0; transform: translateX(30px); } }
.toast .ti { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--panel-3); }
.toast .ti svg { width: 18px; height: 18px; }
.toast.ok .ti { background: rgba(46, 229, 157, .16); color: var(--ok); }
.toast.err .ti { background: rgba(255, 84, 112, .16); color: var(--danger); }
.toast.info .ti { background: rgba(var(--c-acc), .18); color: rgb(var(--c-acc2)); }
.toast.warn .ti { background: rgba(255, 181, 71, .16); color: var(--warn); }
.toast .tb { flex: 1; min-width: 0; font-size: 14px; }
.toast .tb b { display: block; margin-bottom: 1px; }
.toast .tb p { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }
.toast .ta { display: flex; gap: 8px; margin-top: 10px; }
.toast.clickable { cursor: pointer; }

/* ---------- bacheca ---------- */
.board { height: 100%; overflow-y: auto; padding: 22px 16px 40px; }
.board-inner { max-width: 660px; margin: 0 auto; }
.board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.board-head h1 { margin: 0; font-size: 30px; letter-spacing: -.03em; }
.board-head p { margin: 4px 0 0; color: var(--text-3); }
.composer-card { padding: 16px; margin-bottom: 18px; }
.composer-card .top { display: flex; gap: 12px; }
.composer-card textarea { flex: 1; border: 0; background: transparent; outline: none; resize: none; min-height: 60px; font-size: 15.5px; padding: 8px 0; }
.composer-card .bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; }
.img-preview { position: relative; margin: 8px 0 4px 50px; display: inline-block; }
.img-preview img { max-height: 220px; border-radius: 14px; display: block; }
.img-preview button { position: absolute; top: 8px; right: 8px; }
.post { padding: 16px 16px 8px; margin-bottom: 14px; animation: rise .25s ease-out; }
.post-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.post-head .who { flex: 1; min-width: 0; }
.post-head .who b { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.post-head .who > span { font-size: 12.5px; color: var(--text-3); }
.post-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; margin-bottom: 10px; }
.post-img { margin: 0 -16px 10px; background: rgb(var(--c-bg)); }
.post-img img { width: 100%; max-height: 560px; object-fit: contain; display: block; cursor: zoom-in; }
.post-actions { display: flex; gap: 4px; border-top: 1px solid var(--line); padding-top: 6px; }
.post-actions button { flex: 1; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-weight: 700; font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.post-actions button:hover { background: var(--panel-2); }
.post-actions button.liked { color: #ff5c86; }
.post-actions button.liked svg { fill: currentColor; }
.post-actions svg { width: 19px; height: 19px; }
.heart-pop { animation: heart .35s ease-out; }
@keyframes heart { 50% { transform: scale(1.35); } }
.comments { border-top: 1px solid var(--line); margin-top: 6px; padding: 10px 0 6px; }
.comment { display: flex; gap: 10px; margin-bottom: 10px; }
.comment .cb { background: var(--panel-2); border-radius: 4px 14px 14px 14px; padding: 8px 12px; min-width: 0; flex: 0 1 auto; }
.comment .cb b { font-size: 13px; cursor: pointer; }
.comment .cb p { margin: 2px 0 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment .cm { font-size: 11.5px; color: var(--text-3); margin: 3px 0 0 4px; display: flex; gap: 10px; }
.comment .cm button { border: 0; background: none; color: var(--text-3); padding: 0; font-size: 11.5px; font-weight: 700; }
.comment .cm button:hover { color: var(--danger); }
.comment-form { display: flex; gap: 8px; align-items: center; }
.comment-form .input { height: 40px; border-radius: 20px; }
.new-posts { position: sticky; top: 0; z-index: 5; display: flex; justify-content: center; margin-bottom: 10px; }
.lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(0, 0, 0, .9); display: grid; place-items: center; padding: 20px; cursor: zoom-out; animation: fade .2s; }
/* la foto aperta sta sempre tutta nello schermo (nella griglia il 100% non la limitava in altezza) */
.lightbox img { max-width: calc(100vw - 40px); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); width: auto; height: auto; object-fit: contain; border-radius: 10px; }

/* ---------- admin ---------- */
.admin { height: 100%; overflow-y: auto; padding: 22px 16px 40px; }
.admin-inner { max-width: 1100px; margin: 0 auto; }
.admin h1 { margin: 0 0 16px; font-size: 28px; letter-spacing: -.03em; }
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { padding: 16px; }
.stat small { color: var(--text-3); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.stat b { display: block; font-size: 30px; letter-spacing: -.03em; margin-top: 4px; }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.actions { white-space: nowrap; text-align: right; }
table.t td.actions .btn { margin-left: 4px; }
.admin .card { padding: 16px; margin-bottom: 16px; }
.admin .card h3 { margin: 0 0 12px; font-size: 16px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(0, 0, 0, .35); padding: 2px 8px; border-radius: 6px; font-size: 13px; user-select: all; }
.station-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; margin-bottom: 8px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 700; background: var(--panel-3); }
.pill.ok { background: rgba(46, 229, 157, .15); color: var(--ok); }
.pill.bad { background: rgba(255, 84, 112, .15); color: var(--danger); }
.pill.warn { background: rgba(255, 200, 60, .15); color: #ffd76a; }

/* ---------- mobile nav ---------- */
.mobile-nav { display: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1180px) {
  .chat { grid-template-columns: 250px minmax(0, 1fr) 240px; gap: 10px; padding: 10px; }
  .radio .vol { display: none; }
}
@media (max-width: 980px) {
  .nav button span.lbl { display: none; }
  .radio { max-width: 260px; }
}
@media (max-width: 900px) {
  :root { --topbar: 58px; }
  body { font-size: 15px; }
  .topbar { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .topbar .wordmark { display: none; }
  .nav { display: none; }
  .me-btn .nick { display: none; }
  .me-btn { padding: 3px; }
  .radio { flex: 1; max-width: none; }
  .chat { display: block; padding: 0; position: relative; }
  .chat > .pane { position: absolute; inset: 0; border-radius: 0; border: 0; display: none; }
  .chat[data-pane="rooms"] > .p-rooms, .chat[data-pane="conv"] > .p-conv, .chat[data-pane="users"] > .p-users { display: flex; }
  .main { padding-bottom: calc(62px + var(--safe-b)); }
  .mobile-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; height: calc(62px + var(--safe-b)); padding-bottom: var(--safe-b);
    background: rgba(var(--c-deep), .92); border-top: 1px solid var(--line); backdrop-filter: blur(18px);
  }
  .mobile-nav button { flex: 1; border: 0; background: transparent; color: var(--text-3); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 700; position: relative; }
  .mobile-nav button svg { width: 23px; height: 23px; }
  .mobile-nav button.on { color: var(--text); }
  .mobile-nav button.on svg { color: rgb(var(--c-acc2)); }
  .mobile-nav .badge { position: absolute; top: 6px; left: calc(50% + 6px); }
  .camtile { width: 150px; }
  .camtile.big { width: 240px; }
  .messages { padding: 10px 12px 6px; }
  .msg .body { max-width: 86%; }
  .msg .avatar-slot { width: 32px; }
  .msg .avatar { --s: 32px; }
  .msg .tools { display: none !important; }
  .call .local { width: 110px; }
  .jump { bottom: 86px; }
  #toasts { top: auto; bottom: calc(74px + var(--safe-b)); right: 12px; left: 12px; width: auto; }
  .conv-head { padding: 10px 10px 10px 10px; min-height: 60px; }
  .hide-m { display: none !important; }
}
@media (min-width: 901px) { .show-m { display: none !important; } }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 30px; }
  .hero h1 { text-align: center; }
  .hero p.lead { text-align: center; margin-left: auto; margin-right: auto; }
  .features { margin: 0 auto; }
  .landing-top .live-pill { display: none; }
  .landing-top { margin-bottom: 26px; }
}
@media (max-width: 520px) {
  .landing-inner { padding: 18px 16px 30px; }
  .features { grid-template-columns: 1fr; }
  .auth-card { padding: 20px 16px; }
  .opt-grid { grid-template-columns: 1fr; }
  .modal { padding: 20px 16px; border-radius: 20px; }
  .row.wrap-m { flex-direction: column; gap: 0; }
  .radio .meta small { font-size: 9.5px; letter-spacing: .04em; }
  .radio .meta b { font-size: 12.5px; }
  .station-row { grid-template-columns: 1fr; }
}

/* =========================================================
   v2 – tricolore, badge ruolo a icona, fix mobile
   ========================================================= */
.app { height: 100%; height: 100dvh; }
.radio .play { background: linear-gradient(135deg, #c21f31, #ef4256); box-shadow: 0 6px 16px -6px rgba(232, 54, 74, .8); }
.radio .vol { accent-color: rgb(var(--c-acc)); }
.tabs button.on { box-shadow: 0 6px 18px -8px rgba(var(--c-acc), .8); }
.msg.mine .bubble { background: linear-gradient(135deg, #6a35f0, #2a8fe0); }
.send { box-shadow: 0 6px 16px -8px rgba(var(--c-acc), .8); }
.btn.primary { box-shadow: 0 10px 30px -12px rgba(var(--c-acc), .7); }
.list-item.on { background: linear-gradient(90deg, rgba(var(--c-acc), .18), rgba(var(--c-acc), .04)); box-shadow: inset 3px 0 0 rgb(var(--c-acc)), inset 0 0 0 1px rgba(var(--c-acc), .22); }
.nav button.on { background: rgba(var(--c-acc), .14); color: var(--strong); box-shadow: inset 0 -2px 0 rgb(var(--c-acc)); }
.topbar { box-shadow: 0 1px 0 rgba(var(--c-ink), .04); }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, rgb(var(--c-cyan)), rgb(var(--c-acc)) 52%, rgb(var(--c-pink))); opacity: .7; }
.wordmark b { background: linear-gradient(90deg, rgb(var(--c-g1)), rgb(var(--c-g2)) 50%, rgb(var(--c-g3))); -webkit-background-clip: text; background-clip: text; }
.auth-card::before { background: linear-gradient(160deg, rgba(var(--c-cyan), .6), rgba(var(--c-acc), .3) 45%, rgba(var(--c-pink), .6)); }
.hero h1 .grad { background: linear-gradient(90deg, rgb(var(--c-g1)) 0%, rgb(var(--c-g2)) 50%, rgb(var(--c-g3)) 100%); -webkit-background-clip: text; background-clip: text; }
.bubble .at { color: #a6f1ff; }
.msg.mention .bubble { box-shadow: 0 0 0 1.5px rgba(var(--c-acc), .75); background: rgba(var(--c-acc), .1); }
.camtile.mine, .camtile { border-color: rgba(var(--c-ink), .12); }
.cam-toggle.on { background: linear-gradient(135deg, #c21f31, #ef4256); }

/* badge ruolo: piccolo cerchio con icona */
.role { width: 18px; height: 18px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-size: 0; vertical-align: middle; }
.role svg { width: 11px; height: 11px; }
.role.admin { background: linear-gradient(135deg, #f5c542, #e09b12); color: #3a2600; }
.role.mod { background: linear-gradient(135deg, rgb(var(--c-acc)), rgb(var(--c-acc-dd))); color: #fff; }
.role.dj { background: linear-gradient(135deg, #ef4256, #c21f31); color: #fff; }
.user-row .lt b { gap: 5px; }
.user-row .lt b .n { flex: 0 1 auto; min-width: 0; }

@media (max-width: 900px) {
  .main { padding-bottom: 0; }
  .view { bottom: calc(62px + var(--safe-b)); }
  .mobile-nav button.on svg { color: rgb(var(--c-acc)); }
}
.p-conv { position: relative; }

/* =========================================================
   v3 – immagini in chat, stile testo, Capo
   ========================================================= */
.role.owner { background: conic-gradient(from 200deg, rgb(var(--c-cyan)), rgb(var(--c-acc)), rgb(var(--c-pink)), rgb(var(--c-cyan))); color: #3a2600; box-shadow: 0 0 0 1.5px #f5c542, 0 0 10px rgba(245, 197, 66, .55); }
.role.owner svg { color: #8a5a00; filter: drop-shadow(0 0 1px #fff); }
.role.admin { background: linear-gradient(135deg, #f5c542, #e09b12); color: #3a2600; }
.f-comfortaa { font-family: 'Comfortaa', sans-serif; }
.f-courier { font-family: 'Courier Prime', ui-monospace, monospace; }
.f-fredoka { font-family: 'Fredoka', sans-serif; font-size: 1.04em; }
.msg.mine .bubble.styled { background: rgba(var(--c-acc), .12); border: 1px solid rgba(var(--c-acc), .45); }
.bubble.img { padding: 4px; background: rgba(var(--c-ink), .05) !important; border-color: var(--line) !important; line-height: 0; }
.bubble.img img { display: block; max-width: min(280px, 62vw); max-height: 320px; border-radius: 13px; cursor: zoom-in; background: rgba(var(--c-ink), .04); min-width: 60px; min-height: 60px; object-fit: contain; }
.composer .uploading { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); padding: 0 8px 8px; }
.conv.dragover::after { content: 'Rilascia qui per inviare l\'immagine'; position: absolute; inset: 8px; border: 2px dashed rgb(var(--c-acc)); border-radius: 16px; background: rgba(var(--c-deep), .85); display: grid; place-items: center; font-weight: 700; font-size: 18px; color: #fff; z-index: 20; }
.style-pop { position: absolute; bottom: calc(100% - 2px); left: 12px; width: 360px; max-width: calc(100vw - 24px); padding: 14px; z-index: 30; box-shadow: var(--shadow); background: var(--panel-solid); }
.style-pop h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.style-pop .tc { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.style-pop .tc button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; padding: 0; }
.style-pop .tc button.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(var(--c-ink), .2); }
.style-pop .tc button.none { background: conic-gradient(rgb(var(--c-cyan)), rgb(var(--c-acc)), rgb(var(--c-pink)), rgb(var(--c-cyan))); }
.style-pop .fonts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 190px; overflow-y: auto; margin-bottom: 12px; }
.style-pop .fonts button { height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; }
.style-pop .fonts button.on { border-color: rgb(var(--c-acc)); background: rgba(var(--c-acc), .14); }
.style-pop .preview { padding: 10px 12px; border-radius: 12px; background: rgba(var(--c-ink), .06); margin-bottom: 12px; min-height: 42px; }
.icon-btn.styled-on { color: rgb(var(--c-acc)); }
.owner-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.owner-hero .role.owner { width: 40px; height: 40px; }
.owner-hero .role.owner svg { width: 22px; height: 22px; }
.owner-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.owner-form .field { margin: 0; flex: 1; min-width: 140px; }

@media (max-width: 900px) {
  .composer-box { gap: 2px; padding: 5px; }
  .composer-box .icon-btn { width: 34px; height: 40px; }
  .composer textarea { padding-left: 4px; }
}

/* sussurro */
.msg.whisper .bubble { background: rgba(245, 197, 66, .07) !important; border: 1px dashed rgba(245, 197, 66, .65) !important; color: #ffe8a8; font-style: italic; }
.msg.whisper.mine .bubble { color: #ffe8a8; }
.wh-label { font-size: 11.5px; font-weight: 700; color: #f5c542; margin: 0 0 3px 2px; }
.msg.mine .wh-label { margin: 0 2px 3px 0; }
.whisper-bar { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 6px 8px 6px 14px; margin-bottom: 6px; border-radius: 12px; background: rgba(245, 197, 66, .1); border: 1px dashed rgba(245, 197, 66, .55); color: #ffe8a8; font-size: 13px; }
.whisper-bar b { color: #f5c542; }

@media (max-width: 900px) { .logs-grid { grid-template-columns: 1fr !important; } }

/* separatore sottile tra messaggi di utenti diversi */
.msg.first { margin-top: 10px; padding-top: 12px; border-top: 1px solid rgba(var(--c-ink), .07); }
.messages > .msg.first:first-child,
.day-sep + .msg.first,
.notice + .msg.first { border-top: 0; padding-top: 2px; }
.msg.first .tools { top: calc(50% + 6px); }

/* trillo */
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-9px, 3px) rotate(-.6deg); } 20% { transform: translate(8px, -4px) rotate(.6deg); }
  30% { transform: translate(-7px, -3px); } 40% { transform: translate(7px, 4px) rotate(-.4deg); }
  50% { transform: translate(-6px, 2px); } 60% { transform: translate(5px, -2px) rotate(.3deg); }
  70% { transform: translate(-4px, 2px); } 80% { transform: translate(3px, -1px); } 90% { transform: translate(-2px, 1px); }
}
.app.shake { animation: shake .8s cubic-bezier(.36, .07, .19, .97) both; }
@media (prefers-reduced-motion: reduce) { .app.shake { animation: none; } }

.notice.join span { color: rgb(var(--c-acc2)); background: rgba(var(--c-acc), .1); }
.notice.leave span { color: #ff8a95; background: rgba(232, 54, 74, .1); }

/* smartphone: il modulo di accesso subito in alto, la presentazione sotto */
@media (max-width: 860px) {
  .hero > .auth-card { order: -1; }
  .hero h1 { font-size: clamp(30px, 8vw, 40px); margin-top: 6px; }
  .landing-top { margin-bottom: 16px; }
}
@media (max-width: 520px) { .row.wrap-m > * { flex: 1 1 auto !important; } }

/* v12: intestazione stanza compatta, scheda "Entra come ospite" */
.conv-head { min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
.conv-head .ri { width: 36px; height: 36px; font-size: 18px; border-radius: 11px; }
.conv-title b { font-size: 15.5px; }
.tabs button:first-child { flex: 1.5; }
@media (max-width: 900px) {
  .conv-head { min-height: 48px; padding: 5px 8px; gap: 8px; }
  .conv-head .ri { width: 30px; height: 30px; font-size: 16px; border-radius: 9px; }
  .conv-head .icon-btn { width: 36px; height: 36px; }
  .conv-head .cam-toggle { height: 32px; padding: 0 10px; }
}
@media (max-width: 420px) { .tabs button { font-size: 13px; padding: 0 4px; } }

.ri-logo { width: 72%; height: 72%; display: block; }

/* stanza con il logo del sito: niente riquadro, logo a piena grandezza come nella barra in alto */
.ri.ri-has-logo { background: none; border: 0; }
.ri.ri-has-logo .ri-logo { width: 100%; height: 100%; filter: drop-shadow(0 4px 10px rgba(var(--c-acc), .35)); }

/* intestazione della stanza staccata dal rullo dei messaggi */
.conv-head {
  background: linear-gradient(180deg, rgba(var(--c-acc), .13), rgba(var(--c-acc), .05)), rgba(var(--c-ink), .03);
  border-bottom: 1px solid rgba(var(--c-acc), .28);
  box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .8);
  position: relative; z-index: 2;
}
.conv-title b { color: var(--strong); }
/* modulo di accesso su telefono: schede su una riga, campo captcha a tutta larghezza */
.tabs button { white-space: nowrap; }
@media (max-width: 520px) {
  .tabs button { font-size: 12.5px; padding: 0 2px; }
  .tabs button:first-child { flex: 1.7; }
  .field input[placeholder="Scrivi il codice"] { flex: 1 1 100% !important; }
}

/* ---------- giochi ---------- */
.game { max-width: 440px; padding: 18px; }
.game-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.game-head h3 { margin: 0; padding: 0; }
.players { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.player { flex: 1; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--panel-2); border: 1.5px solid transparent; min-width: 0; transition: border-color .2s, background .2s; }
.player > div { min-width: 0; display: flex; flex-direction: column; }
.player .pn { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .score { font-size: 22px; line-height: 1; }
.player.turn { border-color: rgb(var(--c-acc)); background: rgba(var(--c-acc), .12); }
.vs { font-weight: 800; font-size: 12px; color: var(--text-3); }
.game-status { text-align: center; min-height: 26px; margin-bottom: 10px; color: var(--text-2); }
.game-status b.you { color: rgb(var(--c-acc2)); }
.game-status b.win { color: var(--gold); font-size: 18px; }
.game-hint { text-align: center; margin: 10px 0 0; }
.game-foot { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.tris { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 300px; margin: 0 auto; }
.tris-cell { aspect-ratio: 1; border-radius: 16px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 46px; font-weight: 800; display: grid; place-items: center; color: var(--text); }
.tris-cell:not(:disabled):hover { background: var(--panel-3); }
.tris-cell.x { color: #33cf85; }
.tris-cell.o { color: #ff6b7c; }
.tris-cell.line { background: rgba(245, 197, 66, .18); border-color: var(--gold); }
.tris-cell .ghost { opacity: 0; font-size: 40px; }
.tris-cell:not(:disabled):hover .ghost { opacity: .25; }
.tris-cell:disabled { cursor: default; }
.memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mem-card { aspect-ratio: 3 / 4; border-radius: 12px; border: 1px solid var(--line-2); padding: 0; position: relative; background: linear-gradient(135deg, #12251c, #1b3328); overflow: hidden; }
.mem-card .mem-back, .mem-card .mem-front { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .2s, transform .25s; }
.mem-card .mem-back img { width: 46%; opacity: .9; }
.mem-card .mem-front { font-size: 30px; opacity: 0; transform: scale(.6); background: var(--panel-solid); }
.mem-card.up .mem-front { opacity: 1; transform: none; }
.mem-card.up .mem-back { opacity: 0; }
.mem-card.matched { border-color: rgb(var(--c-acc)); box-shadow: inset 0 0 0 2px rgba(var(--c-acc), .4); }
.mem-card:not(:disabled):hover { border-color: rgb(var(--c-acc2)); }
.mem-card:disabled { cursor: default; }

/* Forza 4 */
.f4 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; padding: 8px; border-radius: 16px; background: linear-gradient(180deg, #123b8c, #0d2c6b); max-width: 380px; margin: 0 auto; }
.f4-cell { aspect-ratio: 1; border: 0; padding: 0; background: none; display: grid; place-items: center; }
.f4-cell .disc { width: 86%; height: 86%; border-radius: 50%; background: #071a40; box-shadow: inset 0 3px 6px rgba(0, 0, 0, .6); transition: background .15s; }
.f4-cell.r .disc { background: radial-gradient(circle at 35% 30%, #ff8a95, #e8364a 60%, #b31f31); box-shadow: none; }
.f4-cell.g .disc { background: radial-gradient(circle at 35% 30%, #a6f1ff, rgb(var(--c-acc)) 60%, rgb(var(--c-acc-dd))); box-shadow: none; }
.f4-cell.line .disc { box-shadow: 0 0 0 3px var(--gold), 0 0 14px rgba(245, 197, 66, .7); }
.f4-cell.drop .disc { animation: f4drop .35s cubic-bezier(.3, 1.4, .6, 1); }
@keyframes f4drop { from { transform: translateY(-260%); } to { transform: none; } }
.f4-cell:disabled { cursor: default; }
@media (hover: hover) { .f4:hover .f4-cell:not(:disabled):hover .disc { background: #1b3f86; } }
@media (prefers-reduced-motion: reduce) { .f4-cell.drop .disc { animation: none; } }

/* menu utente compatto */
.umenu { width: 290px; max-width: calc(100vw - 32px); }
.quick-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 4px; padding: 2px 4px 6px; }
.pop .menu-item.quick-btn { flex-direction: column; justify-content: center; gap: 4px; padding: 9px 4px; font-size: 11.5px; text-align: center; border-radius: 12px; background: var(--panel-2); }
.pop .menu-item.quick-btn:hover { background: rgba(var(--c-acc), .16); }
.pop .menu-item.quick-btn svg { width: 20px; height: 20px; color: rgb(var(--c-acc2)); }
.menu-group .chev { font-size: 20px; line-height: 1; color: var(--text-3); transition: transform .15s; }
.menu-group.open .chev { transform: rotate(90deg); }
.menu-group.open { background: var(--panel-2); }
.menu-group.mod svg { color: var(--ok); }
.menu-sub { padding: 2px 0 4px 18px; border-left: 2px solid var(--line-2); margin: 2px 0 4px 18px; }
.pop .menu-sub .menu-item { padding: 7px 10px; font-size: 13.5px; }
.quick-row { grid-template-columns: repeat(auto-fit, minmax(48px, 1fr)); gap: 3px; }
.pop .menu-item.quick-btn { padding: 8px 2px; font-size: 10.5px; }
.umenu { width: 300px; }
/* campo di scrittura (contenteditable) */
.composer-input { flex: 1; min-width: 0; min-height: 40px; max-height: 140px; overflow-y: auto; padding: 9px 6px; line-height: 1.4; font-size: 15px; outline: none; white-space: pre-wrap; word-break: break-word; cursor: text; }
.composer-input:empty::before { content: attr(data-placeholder); color: var(--text-3); pointer-events: none; }
.composer-input img { max-height: 60px; }
@media (max-width: 900px) { .composer-input { font-size: 16px; } }

/* nuvolette più aderenti al testo */
.bubble { padding: 5px 11px; line-height: 1.35; border-radius: 4px 14px 14px 14px; }
.msg:not(.first) .bubble { border-radius: 14px; border-top-left-radius: 6px; }
.msg.mine .bubble { border-radius: 14px 4px 14px 14px; }
.msg.mine:not(.first) .bubble { border-radius: 14px; border-top-right-radius: 6px; }
.msg { padding: 1px 0; }
.msg .meta { margin-bottom: 1px; }
.msg.first { margin-top: 6px; padding-top: 8px; }
.bubble.img { padding: 3px; }
@media (max-width: 900px) { .bubble { padding: 4px 10px; font-size: 14.5px; } }
/* foto nel rullo più piccole (si aprono a schermo intero toccandole) */
.bubble.img img { max-width: min(200px, 55vw); max-height: 200px; border-radius: 11px; }
@media (max-width: 900px) { .bubble.img img { max-width: 46vw; max-height: 170px; } }
.avatar.zoomable { cursor: zoom-in; }

/* ritaglio foto profilo */
.crop-wrap { display: grid; place-items: center; margin: 4px 0 14px; }
.crop-stage { position: relative; overflow: hidden; border-radius: 16px; background: rgb(var(--c-bg)); touch-action: none; cursor: grab; user-select: none; }
.crop-stage:active { cursor: grabbing; }
.crop-img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.crop-mask { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 200px rgba(5, 8, 6, .62); outline: 2px solid rgba(var(--c-ink), .85); outline-offset: -2px; pointer-events: none; }
.crop-tools { display: flex; align-items: center; gap: 10px; }
.crop-tools span { font-size: 20px; color: var(--text-2); width: 14px; text-align: center; }
.crop-zoom { flex: 1; accent-color: rgb(var(--c-acc)); }
.crop-preview { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; }

.f-nunito { font-family: 'Nunito', sans-serif; }
.f-quicksand { font-family: 'Quicksand', sans-serif; font-weight: 600; }
.f-slab { font-family: 'Roboto Slab', serif; }

/* pulsante di chiusura degli avvisi */
.toast { position: relative; padding-right: 38px; touch-action: pan-y; transition: transform .15s, opacity .15s; }
.toast-x { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: var(--text-3); display: grid; place-items: center; padding: 0; }
.toast-x:hover { background: var(--panel-3); color: var(--text); }
.toast-x svg { width: 15px; height: 15px; }

/* ---------- barra di scrittura stile WhatsApp + vocali ---------- */
.composer-box, .composer-box:focus-within { display: flex; align-items: flex-end; gap: 8px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.composer-pill { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 2px; padding: 3px 4px; border-radius: 24px; background: rgba(var(--c-bg), .6); border: 1px solid var(--line-2); transition: border-color .2s, box-shadow .2s; }
.composer-pill:focus-within { border-color: rgba(var(--c-acc), .7); box-shadow: 0 0 0 4px rgba(var(--c-acc), .14); }
.composer-pill .icon-btn { width: 38px; height: 40px; border-radius: 50%; flex: none; }
.composer-pill .composer-input { padding: 9px 4px; }
.composer-box .send { width: 46px; height: 46px; border-radius: 50%; }
.composer-box .send svg { width: 21px; height: 21px; }
.composer-box .send[data-mode="mic"] svg { width: 22px; height: 22px; }
.composer .counter { right: 66px; bottom: 22px; }
.rec-bar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 12px 0 4px; border-radius: 24px; background: rgba(var(--c-bg), .6); border: 1px solid rgba(232, 65, 85, .55); }
.rec-bar[hidden], .composer-pill[hidden] { display: none; }
.rec-bar .icon-btn { width: 38px; height: 38px; border-radius: 50%; color: #ff8a9c; }
.rec-dot { width: 11px; height: 11px; border-radius: 50%; background: #e84155; flex: none; animation: recPulse 1s ease-in-out infinite; }
@keyframes recPulse { 50% { opacity: .25; transform: scale(.8); } }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; }
.rec-hint { color: var(--text-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 900px) {
  .composer-box { gap: 6px; padding: 0; }
  .composer-pill .icon-btn { width: 36px; height: 40px; }
  .rec-hint { font-size: 12px; }
}

/* lettore dei vocali */
.bubble.audio { padding: 6px 10px 6px 6px; }
.voice { display: flex; align-items: center; gap: 9px; width: min(250px, 62vw); }
.vp-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; flex: none; display: grid; place-items: center; background: rgba(var(--c-ink), .14); color: inherit; }
.vp-btn svg { width: 17px; height: 17px; }
.msg:not(.mine) .vp-btn { background: var(--grad-btn); color: #fff; }
.vp-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vp-wave { display: flex; align-items: center; gap: 2px; height: 26px; cursor: pointer; }
.vp-wave i { flex: 1; min-width: 2px; border-radius: 2px; background: currentColor; opacity: .32; transition: opacity .15s; }
.vp-wave i.on { opacity: 1; }
.vp-time { font-size: 11.5px; opacity: .75; font-variant-numeric: tabular-nums; line-height: 1; }
.vp-mic { flex: none; opacity: .55; display: grid; }
.vp-mic svg { width: 16px; height: 16px; }
.voice.playing .vp-mic { color: rgb(var(--c-acc)); opacity: 1; }

/* pannello del Capo: gruppi */
.capo-groups { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.capo-group { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text-2); font-weight: 700; font-size: 13.5px; transition: border-color .15s, background .15s, color .15s; }
.capo-group svg { width: 22px; height: 22px; }
.capo-group:hover { border-color: var(--line-2); color: var(--text); }
.capo-group.on { border-color: rgba(var(--c-acc), .7); background: rgba(var(--c-acc), .12); color: var(--strong); }
.capo-group.on svg { color: rgb(var(--c-acc)); }
.capo-sub { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.capo-sub[hidden] { display: none; }
@media (max-width: 600px) {
  .capo-groups { gap: 4px; }
  .capo-group { padding: 9px 2px; font-size: 10.5px; gap: 4px; border-radius: 11px; }
  .capo-group svg { width: 19px; height: 19px; }
}
@media (max-width: 600px) {
  .capo-group span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.01em; }
  .admin .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .admin .stat { padding: 9px 10px; border-radius: 12px; }
  .admin .stat small { font-size: 9.5px; letter-spacing: .02em; display: block; line-height: 1.2; min-height: 2.4em; }
  .admin .stat b { font-size: 20px; margin-top: 2px; }
}
.capo-group .short { display: none; }
@media (max-width: 600px) { .capo-group .full { display: none; } .capo-group .short { display: block; } }

/* ---------- sezione Staff: stanza di servizio + sanzioni ---------- */
.staff-page .admin-inner { max-width: 1280px; }
.staff-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.staff-top h1 { margin: 0; }
.staff-who { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.staff-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; }
.staff-chip .role { transform: scale(.85); }
.staff-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.staff-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 16px; height: calc(100vh - 200px); min-height: 420px; }
.staff-chat, .staff-sanc { display: flex; flex-direction: column; min-height: 0; padding: 14px; }
.staff-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.staff-head h3 { margin: 0; }
.staff-msgs { flex: 1; overflow-y: auto; padding: 4px 2px; min-height: 0; }
.smsg { display: flex; gap: 10px; padding: 2px 6px; border-radius: 10px; }
.smsg:not(.grouped) { margin-top: 10px; }
.smsg:hover { background: rgba(var(--c-ink), .03); }
.smsg .sav { width: 32px; flex: none; }
.smsg .sbody { min-width: 0; flex: 1; }
.smeta { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.smeta time { color: var(--text-3); font-size: 11.5px; }
.stext { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; font-size: 14.5px; }
.smsg.mine .smeta b { color: rgb(var(--c-acc)) !important; }
.staff-typing { min-height: 18px; font-size: 12px; color: var(--text-3); padding: 2px 6px; }
.staff-compose { display: flex; align-items: flex-end; gap: 8px; }
.staff-input { flex: 1; min-width: 0; resize: none; min-height: 44px; max-height: 120px; padding: 11px 14px; border-radius: 22px; border: 1px solid var(--line-2); background: rgba(var(--c-bg), .6); color: var(--text); font: inherit; font-size: 15px; outline: none; }
.staff-input:focus { border-color: rgba(var(--c-acc), .7); }
.staff-compose .send { width: 44px; height: 44px; border-radius: 50%; }
.staff-sanc .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.staff-sanc > .input { margin-bottom: 10px; }
.sanc-list { flex: 1; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.sanc { padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--line-2); font-size: 13.5px; }
.sanc.bad { border-left-color: #e84155; }
.sanc.warn { border-left-color: #f5c542; }
.sanc.ok { border-left-color: rgb(var(--c-acc)); }
.sanc.new { animation: sancNew 1.6s ease; }
@keyframes sancNew { from { background: rgba(245, 197, 66, .18); } }
.sanc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.sanc-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sanc-top time { color: var(--text-3); font-size: 11.5px; white-space: nowrap; }
.sanc.warn .pill { background: rgba(245, 197, 66, .15); color: #f5c542; }
.sanc-row { display: flex; gap: 8px; margin-top: 3px; overflow-wrap: anywhere; }
.sanc-row > span:first-child { color: var(--text-3); min-width: 52px; flex: none; }
.sanc-row q { color: var(--text-2); font-style: italic; }
.sanc-by { margin-top: 5px; font-size: 12px; color: var(--text-3); }
@media (max-width: 900px) {
  .staff-top h1 { font-size: 24px; }
  .staff-grid { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 250px); }
  .staff-grid[data-tab="chat"] .staff-sanc, .staff-grid[data-tab="sanc"] .staff-chat { display: none; }
  .staff-chat, .staff-sanc { padding: 10px; }
  .staff-input { font-size: 16px; }
}
@media (max-width: 900px) {
  .staff-top { gap: 10px; margin-bottom: 10px; }
  .staff-chip { padding: 2px; }
  .staff-chip b, .staff-chip .role { display: none; }
  .staff-who .hint { font-size: 12px; }
  .staff-grid { height: calc(100dvh - 215px); }
}
.ghost-badge { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(160, 170, 255, .18); color: #b5bdff; margin-left: -2px; }
.ghost-badge svg { width: 15px; height: 15px; }

/* ---------- scelta colori (testo e nickname) ---------- */
.color-chooser .swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.color-chooser .swatches button { position: relative; width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; }
.color-chooser .swatches button.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(var(--c-ink), .2); }
/* "predefinito": cerchio vuoto barrato */
.color-chooser .swatches button.none { background: transparent !important; border-color: var(--line-2); }
.color-chooser .swatches button.none::after { content: ''; position: absolute; left: 50%; top: 3px; bottom: 3px; width: 2px; background: #e8364a; border-radius: 2px; transform: translateX(-50%) rotate(45deg); }
.color-chooser .swatches button.none.on { border-color: #fff; }
/* multicolore: colore personalizzato */
.color-chooser .swatches button.custom { background: conic-gradient(#ff4d4d, #ffd43b, #51cf66, #3bc9db, #4dabf7, #b197fc, #f783ac, #ff4d4d); }
.color-chooser .swatches button.custom i { position: absolute; inset: 5px; border-radius: 50%; border: 2px solid rgb(var(--c-bg)); }
.cc-panel { margin-top: 10px; padding: 10px; border-radius: 12px; background: rgba(var(--c-ink), .05); border: 1px solid var(--line); }
.cc-panel[hidden] { display: none; }
.cc-row { display: flex; align-items: center; gap: 8px; }
.cc-pick { flex: none; width: 40px; height: 40px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); cursor: pointer; }
.cc-pick input { width: 64px; height: 64px; margin: -12px; border: 0; padding: 0; background: none; cursor: pointer; }
.cc-row .input { width: 96px; flex: none; height: 40px; font-family: ui-monospace, monospace; text-transform: lowercase; }
.cc-preview { flex: 1; min-width: 0; font-weight: 700; padding: 8px 10px; border-radius: 10px; background: #1d2a24; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-note { font-size: 12px; color: #f5c542; margin-top: 6px; }
.cc-note:empty { display: none; }

/* menu della graffetta: colonna di icone in quadrati bianchi */
.pop.attach-pop { padding: 8px; min-width: 0; width: auto; border-radius: 16px; }
.attach-menu { display: flex; flex-direction: column; gap: 8px; }
.pop .menu-item.attach-btn { width: 46px; height: 46px; padding: 0; justify-content: center; border: 2px solid #fff; border-radius: 12px; background: rgba(var(--c-ink), .04); }
.pop .menu-item.attach-btn:hover, .pop .menu-item.attach-btn:active { background: rgba(var(--c-ink), .14); }
.pop .menu-item.attach-btn svg { width: 22px; height: 22px; color: var(--strong); }

/* ---------- pagina profilo ---------- */
.pp { height: 100%; overflow-y: auto; padding: 18px 16px 40px; }
.pp-inner { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.pp-back { align-self: flex-start; }
.pp-head { padding: 0; overflow: hidden; position: relative; }
.pp-cover { height: 120px; background: linear-gradient(120deg, rgba(var(--c-acc), .55), rgba(244, 246, 242, .18) 50%, rgba(232, 54, 74, .5)), radial-gradient(circle at 20% 30%, rgba(var(--c-ink), .15), transparent 60%); }
.pp-id { display: flex; align-items: flex-end; gap: 18px; padding: 0 22px; margin-top: -58px; }
.pp-id > .avatar { --s: 116px; flex: none; box-shadow: 0 0 0 5px var(--panel-solid), 0 10px 30px rgba(0, 0, 0, .45); }
.pp-name { min-width: 0; padding-bottom: 4px; }
.pp-name h1 { margin: 0 0 4px; font-size: 28px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.pp-online { display: inline-flex; align-items: center; gap: 6px; color: #2ee59d; font-weight: 700; font-size: 13.5px; }
.pp-online i { width: 9px; height: 9px; border-radius: 50%; background: #2ee59d; box-shadow: 0 0 0 3px rgba(46, 229, 157, .2); }
.pp-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pp-fact { padding: 4px 10px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.pp-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 16px 22px 20px; }
.pp-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; align-items: start; }
.pp-cols > div { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pp-about h3, .pp-photos h3 { margin: 0 0 10px; }
.pp-bio { margin: 0 0 12px; white-space: pre-wrap; line-height: 1.55; overflow-wrap: anywhere; }
.pp-sub { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: 6px 0 6px; }
.pp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pp-tag { padding: 4px 11px; border-radius: 99px; background: rgba(var(--c-acc), .12); border: 1px solid rgba(var(--c-acc), .35); color: #9ff0c6; font-size: 13px; font-weight: 600; }
.pp-kv { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.pp-kv > div { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); }
.pp-kv span { font-size: 12px; color: var(--text-3); }
.pp-kv b { font-weight: 600; overflow-wrap: anywhere; }
.pp-since { margin-top: 6px; font-size: 12.5px; }
.pp-posts { display: flex; align-items: center; gap: 10px; padding: 14px 16px; text-align: left; color: var(--text); font-weight: 600; cursor: pointer; width: 100%; }
.pp-posts span { flex: 1; }
.pp-posts b { padding: 2px 9px; border-radius: 99px; background: var(--panel-3); font-size: 13px; }
.pp-posts > svg:last-child { transform: rotate(180deg); width: 18px; height: 18px; color: var(--text-3); }
.pp-photos-head { display: flex; align-items: baseline; justify-content: space-between; }
.pp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pp-ph { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--panel-2); }
.pp-ph-img { display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: zoom-in; background: none; }
.pp-ph-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.pp-ph-img:hover img { transform: scale(1.04); }
.pp-ph-del { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; }
.pp-ph-del svg { width: 15px; height: 15px; }
.pp-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 2px dashed var(--line-2); color: var(--text-2); font-weight: 700; font-size: 13px; cursor: pointer; }
.pp-add svg { width: 26px; height: 26px; }
.pp-add:hover { border-color: rgba(var(--c-acc), .7); color: rgb(var(--c-acc)); }
.pp-upload-prev { display: block; max-width: 100%; max-height: 50vh; margin: 0 auto 12px; border-radius: 12px; }
/* visualizzatore foto */
.gallery { position: fixed; inset: 0; z-index: 96; background: rgba(0, 0, 0, .93); display: flex; align-items: center; justify-content: center; animation: fade .2s; }
.gallery figure { margin: 0; max-width: calc(100vw - 130px); max-height: calc(100dvh - 90px); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gallery img { max-width: 100%; max-height: calc(100dvh - 140px); border-radius: 10px; object-fit: contain; }
.gal-cap { color: #fff; font-size: 15px; text-align: center; max-width: 640px; }
.gal-count { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); color: rgba(var(--c-ink), .8); font-size: 13px; font-weight: 700; }
.gal-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(var(--c-ink), .12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.gal-nav { width: 48px; height: 48px; margin: 0 8px; border-radius: 50%; border: 0; flex: none; background: rgba(var(--c-ink), .12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.gal-nav[hidden] { display: none; }
.gal-nav.next svg { transform: rotate(180deg); }
@media (max-width: 900px) {
  .pp { padding: 12px 12px 90px; }
  .pp-cols { grid-template-columns: minmax(0, 1fr); }
  .pp-cover { height: 90px; }
  .pp-id { flex-direction: column; align-items: center; text-align: center; margin-top: -60px; gap: 10px; padding: 0 14px; }
  .pp-name h1 { justify-content: center; font-size: 24px; }
  .pp-facts { justify-content: center; }
  .pp-actions { justify-content: center; padding: 14px; }
  .gallery figure { max-width: 100vw; padding: 0 8px; }
  .gal-nav { position: absolute; bottom: 24px; margin: 0; }
  .gal-nav.prev { left: 24px; } .gal-nav.next { right: 24px; }
}
.pp-about, .pp-photos { padding: 18px; }
.gallery { background: rgba(0, 0, 0, .97); }
@media (max-width: 900px) { .pp-about, .pp-photos { padding: 14px; } }

/* visite al profilo */
.pp-visits { display: flex; flex-direction: column; gap: 4px; max-height: 420px; overflow-y: auto; }
.pp-visit { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 12px; border: 0; background: transparent; color: var(--text); text-align: left; width: 100%; }
button.pp-visit { cursor: pointer; }
button.pp-visit:hover { background: var(--panel-2); }
.pp-visit.new { background: rgba(var(--c-acc), .08); }
.pp-v-av { position: relative; flex: none; }
.pp-v-on { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #2ee59d; border: 2px solid var(--panel-solid); }
.pp-v-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pp-v-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-v-txt span { font-size: 12px; color: var(--text-3); }
.pp-v-new { flex: none; padding: 2px 8px; border-radius: 99px; background: rgb(var(--c-acc)); color: #fff; font-size: 11px; font-weight: 800; }
.pp-photos-head .hint { text-align: right; }

/* pressione lunga per eliminare un messaggio dal telefono */
@media (hover: none) { .bubble.can-del { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } }

/* ingresso ospite compatto: sesso ed età sulla stessa riga anche da telefono */
.guest-form .g-row { display: flex; gap: 10px; flex-wrap: nowrap; }
.guest-form .g-row > .field:first-child { flex: 1 1 auto !important; min-width: 0; }
.guest-form .g-age { flex: 0 0 96px !important; }
.guest-form .g-row .seg button { padding-left: 4px; padding-right: 4px; }

/* ID univoco degli iscritti, visibile solo al Capo */
.uid { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: #ffd76a; background: rgba(255, 200, 60, .12); border: 1px solid rgba(255, 200, 60, .3); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.user-card .info .uid { margin-left: 4px; }

/* ---------- registri del Capo in stile chat ---------- */
.rg-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: thin; }
.rg-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.rg-chip small { font-size: 11px; color: var(--text-3); background: rgba(var(--c-ink), .06); padding: 1px 7px; border-radius: 10px; }
.rg-chip.on { border-color: rgba(var(--c-acc), .7); background: rgba(var(--c-acc), .14); color: var(--strong); }
.rg-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.rg-tools .input { flex: 1 1 220px; height: 40px; }
.rg-check { margin: 0; white-space: nowrap; }
.rg-roll { height: min(68vh, 760px); overflow-y: auto; background: rgba(0, 0, 0, .18); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px 12px; overscroll-behavior: contain; }
.rg-day { text-align: center; margin: 14px 0 8px; position: sticky; top: 0; z-index: 1; }
.rg-day span { display: inline-block; font-size: 12px; font-weight: 700; color: var(--text-2); background: var(--panel-solid, #1d2a24); border: 1px solid var(--line); padding: 3px 12px; border-radius: 12px; text-transform: capitalize; }
.rg-more { text-align: center; font-size: 12.5px; color: var(--text-3); padding: 8px; }
.rg-more.end { font-style: italic; }
.rg-line { display: flex; gap: 10px; padding: 5px 4px; border-radius: 8px; align-items: flex-start; }
.rg-line:hover { background: rgba(var(--c-ink), .03); }
.rg-line time, .rg-note time, .rg-acc time { flex: none; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; padding-top: 2px; min-width: 38px; }
.rg-body { min-width: 0; flex: 1; }
.rg-nick { font-weight: 700; cursor: pointer; }
.rg-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); font-size: 14.5px; line-height: 1.4; }
.rg-line.act .rg-body { color: var(--text-2); }
.rg-line.wh { background: rgba(var(--c-acc-l2), .08); border-left: 3px solid rgba(var(--c-acc-l2), .6); }
.rg-wh { color: #c9a8ff; font-size: 12.5px; }
.rg-note { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); padding: 2px 4px; }
.rg-note.in .rg-nick { opacity: .85; }
.rg-note.out { opacity: .75; }
.rg-note.buzz { justify-content: center; color: #ffd76a; background: rgba(255, 200, 60, .07); border-radius: 10px; padding: 6px; margin: 6px 0; }
.rg-ip { font-family: ui-monospace, monospace; font-size: 11px; color: var(--text-3); margin-left: auto; }
.rg-img img { max-width: 220px; max-height: 220px; border-radius: 10px; display: block; margin-top: 4px; }
.rg-audio { height: 34px; max-width: 260px; margin-top: 4px; display: block; }
/* privati */
.rg-split { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 14px; }
.rg-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rg-side .input { height: 40px; }
.rg-convs { display: flex; flex-direction: column; gap: 6px; max-height: min(72vh, 800px); overflow-y: auto; }
.rg-conv { text-align: left; border: 1px solid var(--line); background: var(--panel-2); border-radius: 12px; padding: 10px 12px; color: var(--text); display: flex; flex-direction: column; gap: 4px; }
.rg-conv:hover { border-color: var(--line-2); }
.rg-conv.on { border-color: rgba(var(--c-acc), .7); background: rgba(var(--c-acc), .1); }
.rg-pair { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg-pair > span { color: var(--text-3); }
.rg-prev { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg-meta { display: flex; gap: 6px; align-items: center; font-size: 11.5px; color: var(--text-3); }
.rg-meta .pill { font-size: 11px; padding: 1px 7px; }
.rg-pane { min-width: 0; }
.rg-pane-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; min-height: 40px; }
.rg-back { display: none; }
.rg-placeholder { height: min(60vh, 600px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 1px dashed var(--line); border-radius: 14px; }
.rg-roll.pm { height: min(70vh, 780px); }
.rg-bub { display: flex; margin: 4px 0; }
.rg-bub.r { justify-content: flex-end; }
.rg-bub-in { max-width: 78%; padding: 7px 11px 5px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.rg-bub.l .rg-bub-in { border-bottom-left-radius: 4px; }
.rg-bub.r .rg-bub-in { background: rgba(var(--c-acc), .16); border-color: rgba(var(--c-acc), .3); border-bottom-right-radius: 4px; }
.rg-bub-in time { display: block; text-align: right; font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
/* trilli */
.rg-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.rg-grid2 > .card { margin: 0; }
.rg-rank { display: flex; flex-direction: column; gap: 6px; }
.rg-rank-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 6px 2px; border-bottom: 1px solid var(--line); }
.rg-buzzlist { display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow-y: auto; }
.rg-buzz { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; text-align: left; border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; padding: 8px 12px; color: var(--text); }
.rg-buzz:hover { border-color: rgba(255, 200, 60, .5); }
.rg-buzz time { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rg-buzz .hint { margin-left: auto; font-size: 12px; }
/* entrate e uscite */
.rg-access { display: flex; flex-direction: column; }
.rg-acc { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 5px 4px; border-bottom: 1px solid rgba(var(--c-ink), .04); font-size: 13.5px; }
.rg-acc time { min-width: 62px; }
.rg-arrow { font-weight: 800; width: 14px; text-align: center; }
.rg-acc.in .rg-arrow { color: rgb(var(--c-acc2)); }
.rg-acc.out .rg-arrow { color: #ff8a95; }
.rg-ipbtn { margin-left: auto; border: 0; cursor: pointer; }
/* iscritti */
.rg-mail { display: inline-flex; gap: 6px; align-items: center; }
.rg-mail a { color: var(--text); white-space: nowrap; }
.rg-mail .pill { font-size: 11px; padding: 1px 7px; }
@media (max-width: 860px) {
  .rg-split { grid-template-columns: 1fr; }
  .rg-split .rg-pane { display: none; }
  .rg-split.opened .rg-side { display: none; }
  .rg-split.opened .rg-pane { display: block; }
  .rg-back { display: inline-flex; }
  .rg-grid2 { grid-template-columns: 1fr; }
  .rg-roll { height: 64vh; padding: 6px 8px 10px; }
  .rg-bub-in { max-width: 88%; }
  .rg-ip { display: none; }
}

/* pulsante "App": aggiunge il sito alla schermata Home */
.app-install { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 11px 0 9px; border-radius: 16px; border: 1px solid rgba(var(--c-acc), .55); background: rgba(var(--c-acc), .12); color: rgb(var(--c-acc2)); font-weight: 700; font-size: 13px; flex: none; }
.app-install svg { width: 16px; height: 16px; }
.app-install:hover { background: rgba(var(--c-acc), .2); color: var(--strong); }
.app-install[hidden] { display: none; }
.app-guide { text-align: center; }
.app-guide img { border-radius: 16px; margin: 4px auto 8px; display: block; }
.app-guide h3 { margin: 0 0 4px; }
.ai-step { display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 12px; margin: 8px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); font-size: 14.5px; }
.ai-step > b { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgb(var(--c-acc)); color: #fff; font-size: 13px; }
.ai-share { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #0a84ff; color: #fff; font-size: 13px; }
@media (max-width: 380px) { .app-install span { display: none; } .app-install { padding: 0 8px; } }

/* impostazioni notifiche sul telefono */
.notify-box .notify-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.notify-box .notify-head .pill { font-size: 11px; }
.notify-box .setting-row.sub { padding: 8px 0 8px 2px; border-bottom: 1px solid var(--line); margin: 0; background: none; border-radius: 0; }
.notify-follows { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.notify-follow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; }

/* avvio bloccato: pulsante Riprova */
.boot-retry { margin-top: 18px; text-align: center; color: var(--text-2, #b8c4be); font-size: 14px; }
.boot-retry p { margin: 0 0 10px; }
.boot-retry button { background: rgb(var(--c-acc)); color: #fff; border: 0; border-radius: 12px; padding: 10px 22px; font-weight: 700; font-size: 15px; }

/* messaggio appena inviato, in attesa di conferma dal server */
.msg.pending .bubble { opacity: .55; }
.msg.pending .tools { display: none !important; }

/* prestazioni: sfondo fermo e niente vetro sfocato dietro ai pannelli
   (ridisegnarli di continuo rendeva scattosi pulsanti e scorrimento, soprattutto su telefoni e PC modesti) */
.aurora { background: url(/img/aurora.webp?v=xd1) center / cover no-repeat; }
.aurora span { display: none !important; }
* { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.card { background: rgba(var(--c-panel), .88); }
.overlay { background: rgba(4, 5, 8, .78); }

/* ===================================================================
   SKIN xDChat - rullo della chat nello stile di xdchat.it
   (solo aspetto: per tornare indietro basta cancellare da qui alla fine)
   =================================================================== */

/* --- barra in alto: pulsanti a tessera con icona sopra la scritta --- */
.topbar { background: rgba(var(--c-deep), .96); }
@media (min-width: 901px) {
  .nav { gap: 6px; margin-left: 16px; }
  .nav button { flex-direction: column; justify-content: center; gap: 3px; height: 54px; min-width: 60px; padding: 0 10px; border-radius: 12px; background: rgba(var(--c-ink), .045); border: 1px solid rgba(var(--c-ink), .09); color: var(--strong); font-size: 11.5px; font-weight: 800; position: relative; box-shadow: none; }
  .nav button svg { width: 22px; height: 22px; }
  .nav button:nth-child(4n+1) svg { color: rgb(var(--c-acc2)); }
  .nav button:nth-child(4n+2) svg { color: rgb(var(--c-acc-l)); }
  .nav button:nth-child(4n+3) svg { color: #ff6fc8; }
  .nav button:nth-child(4n+4) svg { color: #6ee7a8; }
  .nav button:hover { background: rgba(var(--c-acc), .14); border-color: rgba(var(--c-acc), .45); }
  .nav button.on { background: rgba(var(--c-acc), .22); border-color: rgba(var(--c-acc-l2), .85); box-shadow: 0 0 16px rgba(var(--c-acc), .45), inset 0 0 0 1px rgba(var(--c-acc), .35); }
  .nav button .badge { position: absolute; top: -6px; right: -6px; }
}

/* --- radio: riquadro luminoso, pulsante "ascolta" verde --- */
.radio { border: 1px solid rgba(var(--c-acc), .55); box-shadow: 0 0 18px rgba(var(--c-acc), .25); background: rgba(var(--c-panel), .9); }
.radio .play { background: linear-gradient(135deg, #12b981, #2ee59d); box-shadow: 0 6px 16px -6px rgba(46, 229, 157, .7); }

/* --- pannelli --- */
.chat > .card { border-color: rgba(var(--c-acc), .28); }
.p-conv { background: linear-gradient(180deg, rgba(var(--c-deep), .9), rgba(var(--c-deep), .94)); }

/* --- rullo: righe separate da una linea, testo grande, niente fumetti --- */
.messages { padding: 4px 16px 8px; }
.msg, .msg.mine { flex-direction: row; }
.msg { padding: 2px 0 6px; gap: 12px; }
.msg.first { margin-top: 0; padding-top: 10px; border-top: 1px solid rgba(var(--c-ink), .08); }
.msg .body, .msg.mine .body { display: block; flex: 1; max-width: none; min-width: 0; }
.msg .meta, .msg.mine .meta { flex-direction: row; align-items: center; gap: 8px; padding: 0; margin-bottom: 2px; }
.msg .meta .who { font-size: 15px; font-weight: 800; color: var(--strong); }
.msg .meta time { margin-left: auto; font-size: 11px; color: var(--text-3); }
.msg .bubble:not(.img):not(.audio),
.msg.mine .bubble:not(.img):not(.audio),
.msg:not(.first) .bubble:not(.img):not(.audio),
.msg.mine:not(.first) .bubble:not(.img):not(.audio),
.msg.mine .bubble.styled {
  background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 0 2px;
  font-size: 19px; line-height: 1.4; color: var(--text);
}
.msg .bubble.jumbo { font-size: 30px; }
.msg.mine .bubble a { color: inherit; }
.msg .tools, .msg.mine .tools { right: 0; left: auto; }
/* menzione, azione e sussurro restano riconoscibili */
.msg.mention { background: linear-gradient(90deg, rgba(var(--c-acc), .14), transparent 70%); box-shadow: inset 3px 0 0 rgb(var(--c-acc)); border-radius: 6px; }
.msg.action .bubble:not(.img):not(.audio) { font-style: italic; color: var(--text-2); }
.msg.whisper .bubble:not(.img):not(.audio) { padding: 4px 10px; border: 1px dashed rgba(245, 197, 66, .65); border-radius: 10px; background: rgba(245, 197, 66, .07); color: #ffe8a8; font-style: italic; }

/* --- badge dei ruoli come etichetta con la scritta --- */
.msg .meta .role, .user-row .role {
  width: auto; height: auto; padding: 1px 6px; border-radius: 5px; font-size: 10px; line-height: 1.4;
  background: rgba(var(--c-ink), .04); border: 1px solid rgba(var(--c-ink), .7); color: #fff; box-shadow: none;
}
.msg .meta .role svg, .user-row .role svg { display: none; }
.msg .meta .role::after, .user-row .role::after { font-size: 10px; font-weight: 800; }
.role.owner::after { content: 'Super mod'; }
.role.admin::after { content: 'Admin'; }
.role.mod::after { content: 'Moderatore'; }
.role.dj::after { content: 'DJ'; }
.msg .meta .role.owner, .user-row .role.owner { border-color: #ffcc4d; color: #ffd76a; }

/* --- avvisi (entrato/uscito) a tutta larghezza --- */
.messages .notice { text-align: left; margin: 8px 0; }
.messages .notice span { display: block; padding: 6px 12px; border-radius: 10px; border: 1px solid rgba(var(--c-cyan), .25); background: rgba(var(--c-cyan), .06); font-size: 12.5px; }
.messages .notice.join span::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2ee59d; margin-right: 8px; vertical-align: middle; }
/* entrate e uscite: al centro, cornice stretta quanto il testo */
.messages .notice.join, .messages .notice.leave { text-align: center; margin: 6px 0; }
.messages .notice.join span, .messages .notice.leave span { display: inline-block; max-width: 90%; padding: 3px 14px; border-radius: 20px; }
.messages .notice.leave span { border-color: rgba(232, 54, 74, .3); }

/* --- barra di scrittura: campo largo e pulsante "Invia" --- */
.composer { padding: 10px 16px 14px; border-top: 1px solid rgba(var(--c-ink), .08); }
.composer-pill { border-radius: 12px; background: rgba(var(--c-bg), .8); border: 1px solid rgba(var(--c-ink), .16); }
.composer-pill .composer-input { font-size: 16px; }
@media (min-width: 901px) {
  .composer-box .send { width: auto; min-width: 96px; height: 48px; padding: 0 16px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(135deg, rgb(var(--c-send1)), rgb(var(--c-send2))); border: 1px solid rgba(var(--c-pink), .6); box-shadow: 0 6px 18px -8px rgba(var(--c-pink), .7); }
  .composer-box .send:not([data-mode="mic"])::after { content: 'Invia'; font-weight: 800; font-size: 14px; }
}

/* --- lista utenti: schede con barra colorata a sinistra --- */
.user-row { margin: 0 0 6px; padding: 8px 10px; border-radius: 10px; background: rgba(var(--c-ink), .03); border: 1px solid rgba(var(--c-ink), .07); box-shadow: inset 3px 0 0 rgb(var(--c-pink)); }
.user-row.ur-M { box-shadow: inset 3px 0 0 var(--male); }
.user-row.ur-F { box-shadow: inset 3px 0 0 var(--female); }
.user-row.ur-A { box-shadow: inset 3px 0 0 var(--other); }
.user-row:hover { background: rgba(var(--c-pink), .08); }
.user-row .lt b { font-weight: 800; }
.msg .meta .role, .user-row .role { text-transform: none; letter-spacing: 0; }
.msg.first { border-top-color: rgba(var(--c-ink), .16); }
.msg .meta .who { font-size: 17px; font-weight: 900; letter-spacing: -.01em; text-shadow: 0 0 1px currentColor; }

/* video in chat */
.bubble.video { padding: 4px !important; line-height: 0; }
.bubble.video video { display: block; max-width: min(380px, 72vw); max-height: 380px; border-radius: 12px; background: #000; }
.rg-video { display: block; max-width: 280px; max-height: 220px; border-radius: 10px; background: #000; margin-top: 4px; }

/* chiamata di gruppo: barra sopra il rullo */
.gcbar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid rgba(46, 229, 157, .25); background: linear-gradient(90deg, rgba(18, 185, 129, .16), rgba(var(--c-acc), .08)); flex: none; flex-wrap: wrap; }
.gcbar[hidden] { display: none; }
.gc-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #12b981, #2ee59d); color: #fff; flex: none; animation: gcpulse 1.8s ease-in-out infinite; }
.gc-ic svg { width: 17px; height: 17px; }
@keyframes gcpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(46, 229, 157, .5); } 50% { box-shadow: 0 0 0 7px rgba(46, 229, 157, 0); } }
@media (prefers-reduced-motion: reduce) { .gc-ic { animation: none; } }
.gc-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.gc-txt b { font-size: 13.5px; font-weight: 800; }
.gc-txt span { font-size: 11.5px; color: var(--text-3); }
.gc-faces { display: flex; flex: 1; min-width: 0; padding-left: 4px; }
.gc-face { margin-left: -6px; border-radius: 50%; box-shadow: 0 0 0 2px #0b0c22; opacity: .55; }
.gc-face.me, .gc-face.connected { opacity: 1; box-shadow: 0 0 0 2px #2ee59d; }
.gc-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(var(--c-ink), .16); background: rgba(var(--c-ink), .06); color: var(--strong); font-weight: 800; font-size: 13px; flex: none; }
.gc-btn svg { width: 16px; height: 16px; }
.gc-btn.off { background: rgba(255, 84, 112, .18); border-color: rgba(255, 84, 112, .5); }
.gc-btn.hang { background: linear-gradient(135deg, rgb(var(--c-send1)), rgb(var(--c-send2))); border-color: rgba(var(--c-pink), .6); }
.gc-btn.join { background: linear-gradient(135deg, #12b981, #2ee59d); border-color: transparent; }
.gc-btn:disabled { opacity: .5; }
.gc-note { font-size: 12px; color: var(--text-3); }
/* chiamata di gruppo: le facce non coprono mai i pulsanti (telefono) */
.gc-faces { flex: 1 1 0; overflow: hidden; padding-left: 8px; }
.gc-face { flex: none; }
.gc-btn { position: relative; z-index: 2; }
@media (max-width: 520px) { .gcbar { gap: 8px; padding: 8px 10px; flex-wrap: nowrap; } .gc-ic { width: 28px; height: 28px; } .gc-txt b { font-size: 12.5px; } .gc-face { transform: scale(.86); margin-left: -9px; } .gc-btn { padding: 0 10px; } }

/* musica YouTube della stanza */
.ytbar { padding: 8px 14px; border-bottom: 1px solid rgba(var(--c-pink), .25); background: linear-gradient(90deg, rgba(var(--c-pink), .12), rgba(var(--c-acc), .08)); flex: none; }
.ytbar[hidden] { display: none; }
.yt-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.yt-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, rgb(var(--c-send2)), rgb(var(--c-pink))); flex: none; font-size: 16px; }
.yt-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.yt-txt b { font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-txt span { font-size: 11.5px; color: var(--text-3); }
.yt-player { margin-top: 8px; max-width: 420px; height: 200px; border-radius: 12px; overflow: hidden; background: #000; }
.yt-player iframe { display: block; width: 100%; height: 200px; border: 0; }
.yt-thumb { display: block; margin-top: 8px; width: 120px; height: 68px; object-fit: cover; border-radius: 8px; opacity: .8; }
.yt-queue { margin: 8px 0 0; padding-left: 22px; font-size: 13px; max-height: 160px; overflow-y: auto; }
.yt-queue li { padding: 3px 0; }
.yt-queue li small { color: var(--text-3); }
.yt-queue .icon-btn { vertical-align: middle; margin-left: 4px; }
.yt-preview { margin-top: 10px; min-height: 60px; border-radius: 12px; overflow: hidden; background: rgba(var(--c-ink), .03); display: grid; place-items: center; }
.yt-preview iframe { display: block; width: 100%; height: 200px; border: 0; }
@media (max-width: 520px) { .ytbar { padding: 8px 10px; } .yt-player { max-width: none; } }

/* musica della stanza: versione compatta (lettore a fianco delle informazioni) */
.ytbar { padding: 8px 12px; }
.yt-main { display: flex; gap: 12px; align-items: center; }
.yt-player { flex: none; width: 356px; height: 200px; max-width: none; margin: 0; border-radius: 12px; overflow: hidden; background: #000; }
.yt-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.yt-thumb { flex: none; width: 88px; height: 50px; margin: 0; object-fit: cover; border-radius: 8px; opacity: .85; }
.yt-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.yt-title { font-weight: 800; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yt-by { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); min-width: 0; white-space: nowrap; }
.yt-by b { color: var(--strong); font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.yt-by .avatar { flex: none; }
.yt-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.yt-act { height: 32px; min-width: 34px; padding: 0 9px; border-radius: 9px; border: 1px solid rgba(var(--c-ink), .16); background: rgba(var(--c-ink), .06); color: var(--strong); font-weight: 800; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.yt-act svg { width: 15px; height: 15px; }
.yt-act.on { background: rgba(var(--c-pink), .22); border-color: rgba(var(--c-pink), .75); }
.yt-act.on2 { background: rgba(var(--c-acc), .22); border-color: rgba(var(--c-acc), .7); }
.yt-act.go { background: linear-gradient(135deg, #12b981, #2ee59d); border-color: transparent; }
.yt-likers { font-size: 11.5px; color: #ff9fd4; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-likers-pop { display: flex; flex-direction: column; gap: 4px; padding: 6px 10px; max-height: 240px; overflow-y: auto; font-size: 13.5px; }
/* telefono: lettore quadrato 200x200 (minimo richiesto da YouTube), pulsanti solo icona */
@media (max-width: 600px) {
  .ytbar { padding: 6px 8px; }
  .yt-main { gap: 8px; align-items: stretch; }
  .yt-player { width: 200px; height: 200px; }
  .yt-side { justify-content: center; }
  .yt-title { font-size: 13px; -webkit-line-clamp: 3; }
  .yt-act { padding: 0 7px; height: 30px; }
  .yt-act .lbl { display: none; }
  .yt-main:not(:has(.yt-player)) { align-items: center; }
}
@media (max-width: 600px) { .yt-by-lbl, .yt-dur { display: none; } .yt-by b { font-size: 13px; } }
.yt-close { margin-left: auto; }
.yt-unhide { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; padding: 8px 10px; border-radius: 10px; background: rgba(var(--c-pink), .1); font-size: 13px; }

/* musica della stanza su PC: in fondo alla colonna delle stanze, tutto in verticale */
.p-rooms .ytbar { flex: none; border-bottom: 0; border-top: 1px solid rgba(var(--c-pink), .3); padding: 10px 12px 12px; border-radius: 0 0 var(--radius) var(--radius); }
.p-rooms .yt-main { flex-direction: column; align-items: stretch; gap: 8px; }
.p-rooms .yt-player { width: 100%; height: 200px; }
.p-rooms .yt-main:not(:has(.yt-player)) { flex-direction: row; align-items: center; }
.p-rooms .yt-thumb { width: 72px; height: 40px; }
.p-rooms .yt-title { font-size: 13px; }
.p-rooms .yt-actions { flex-wrap: nowrap; gap: 5px; }
.p-rooms .yt-act { padding: 0 8px; }
.p-rooms .yt-act .lbl { display: none; }
.p-rooms .yt-dur { display: inline; }
.p-rooms .yt-queue { max-height: 120px; }

/* telefono: barra della musica più ordinata (lettore 200x200 + colonna stretta, pulsanti su una riga) */
@media (max-width: 600px) {
  .ytbar { padding: 6px 8px; }
  .yt-main { gap: 8px; align-items: center; }
  .yt-side { gap: 5px; justify-content: center; }
  .yt-title { font-size: 12.5px; -webkit-line-clamp: 2; line-height: 1.2; }
  .yt-by { font-size: 12px; gap: 4px; }
  .yt-actions { flex-wrap: nowrap; gap: 4px; }
  .yt-act { min-width: 30px; height: 30px; padding: 0 5px; font-size: 12px; border-radius: 8px; gap: 3px; }
  .yt-act svg { width: 14px; height: 14px; }
  .yt-close { margin-left: 0; }
}
/* il cuore si tiene premuto senza selezionare testo */
.yt-act { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* XDCHAT - scelta del proprietario (27/10/2026): sul telefono il video della musica non si vede.
   Il lettore resta caricato (invisibile) per far suonare la musica; al suo posto la copertina piccola. */
.yt-thumb-m { display: none; }
@media (max-width: 600px) {
  .ytbar { position: relative; overflow: hidden; }
  .ytbar .yt-player { position: absolute; left: 0; top: 0; width: 200px; height: 200px; opacity: 0; pointer-events: none; z-index: -1; }
  .yt-thumb-m { display: block; }
  .yt-thumb { width: 64px; height: 64px; border-radius: 10px; opacity: 1; }
  .yt-main { align-items: center; }
}

/* saluto dello staff che scorre sotto il nome della stanza */
.conv-title .ticker { display: block; overflow: hidden; white-space: nowrap; margin-top: 2px; font-size: 11.5px; line-height: 1.3;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.conv-title .ticker .ticker-in { display: inline-block; overflow: visible; text-overflow: clip; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; white-space: pre;
  background: linear-gradient(90deg, rgb(var(--c-acc2)), rgb(var(--c-acc-l)) 50%, #ff6fc8); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: xd-ticker 22s linear infinite; will-change: transform; }
@keyframes xd-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* trillo: schermata intera con logo, campana e nome */
.buzz-splash { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, rgba(var(--c-acc), .45), rgba(var(--c-bg), .92) 60%); cursor: pointer; animation: bz-in .25s ease-out both; }
.buzz-splash.out { animation: bz-out .3s ease-in both; }
.bz-box { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 20px; }
.bz-logo { position: relative; width: 150px; height: 150px; animation: bz-pop .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.bz-logo img { width: 100%; height: 100%; filter: drop-shadow(0 0 28px rgba(var(--c-acc), .8)); }
.bz-bell { position: absolute; right: -18px; top: -14px; font-size: 58px; transform-origin: 50% 10%; animation: bz-ring .5s ease-in-out infinite; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }
.bz-who { display: flex; align-items: center; gap: 10px; }
.bz-who b { font-size: clamp(26px, 7vw, 44px); font-weight: 900; letter-spacing: -.01em; background: linear-gradient(90deg, rgb(var(--c-acc2)), rgb(var(--c-acc-l)) 50%, #ff6fc8); -webkit-background-clip: text; background-clip: text; color: transparent; max-width: 80vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bz-txt { font-size: clamp(18px, 4.5vw, 26px); font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: .08em; }
@keyframes bz-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes bz-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes bz-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes bz-ring { 0%, 100% { transform: rotate(-18deg); } 50% { transform: rotate(18deg); } }
@media (prefers-reduced-motion: reduce) { .buzz-splash, .bz-logo, .bz-bell { animation: none !important; } }

/* XDCHAT telefono: niente copertina nel lettore della musica e niente icona utenti accanto alla cam (gli utenti restano nella barra in basso) */
@media (max-width: 600px) { .ytbar .yt-thumb { display: none !important; } }
.conv-actions [aria-label="Utenti nella stanza"] { display: none !important; }

/* musica: la seconda copia del titolo serve solo per lo scorrimento sul telefono */
.yt-tt-b { display: none; }
/* telefono: riga 1 titolo che scorre, riga 2 mittente a sinistra e pulsanti distanziati a destra */
@media (max-width: 600px) {
  .ytbar .yt-main { display: block; }
  .ytbar .yt-side { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px; row-gap: 6px; }
  .ytbar .yt-title { grid-column: 1 / -1; display: block; -webkit-line-clamp: unset; overflow: hidden; white-space: nowrap; font-size: 13px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
  .ytbar .yt-tt { display: inline-block; white-space: nowrap; animation: xd-ticker 16s linear infinite; will-change: transform; }
  .ytbar .yt-tt-a, .ytbar .yt-tt-b { display: inline-block; padding-right: 48px; }
  .ytbar .yt-by { min-width: 0; }
  .ytbar .yt-actions { justify-content: flex-end; gap: 14px; flex-wrap: nowrap; }
  .ytbar .yt-act { min-width: 34px; height: 32px; }
}

/* XDCHAT telefono: niente linguette Stanze/Privati in alto nella colonna (i Privati sono nella barra in basso) */
.mobile-nav button[hidden] { display: none; }
@media (max-width: 900px) { .p-rooms .side-tabs { display: none; } .mobile-nav button { min-width: 0; font-size: 10.5px; } }
/* XDCHAT: il saluto e il titolo del brano scorrono sempre, anche con "riduci animazioni" attivo (scelta del proprietario) */
.conv-title .ticker .ticker-in, .ytbar .yt-tt { animation-play-state: running !important; }
/* XDCHAT: saluto in alto piu veloce (circa 70 px al secondo su 3 ripetizioni) */
.conv-title .ticker .ticker-in { animation-duration: 19s; }
/* XDCHAT web app (telefono): saluto alla velocita di prima (circa 19 px al secondo), sul PC resta piu veloce */
@media (max-width: 900px) { .conv-title .ticker .ticker-in { animation-duration: 66s; } }

/* XDCHAT: scritte scorrevoli fluide - colore unico (la sfumatura dentro le lettere costringeva a ridisegnare tutto a ogni fotogramma)
   e movimento affidato alla scheda grafica */
@keyframes xd-ticker3d { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
.conv-title .ticker .ticker-in { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: rgb(var(--c-tick)); animation-name: xd-ticker3d; transform: translate3d(0, 0, 0); will-change: transform; backface-visibility: hidden; }
.ytbar .yt-tt { animation-name: xd-ticker3d; transform: translate3d(0, 0, 0); backface-visibility: hidden; }

/* ===== Consolle DJ (solo PC) ===== */
.view-consolle { overflow-y: auto; }
.cs { padding: 14px; max-width: 1400px; margin: 0 auto; }
.cs-only-pc { display: none; padding: 30px; text-align: center; font-weight: 700; }
.cs-main { display: flex; flex-direction: column; gap: 12px; }
.cs-top { display: flex; align-items: center; gap: 12px; padding: 12px 14px; flex-wrap: wrap; }
.cs-brand { font-weight: 900; font-size: 16px; white-space: nowrap; }
.cs-top .input { flex: 1; min-width: 220px; }
.cs-live { height: 44px; padding: 0 20px; border-radius: 12px; border: 0; font-weight: 900; font-size: 14px; letter-spacing: .04em; color: #fff; background: linear-gradient(135deg, #12b981, #2ee59d); box-shadow: 0 8px 22px -10px rgba(46, 229, 157, .8); }
.cs-live.on { background: linear-gradient(135deg, #b3122f, #ff3d57); box-shadow: 0 0 0 3px rgba(255, 61, 87, .25), 0 8px 22px -10px rgba(255, 61, 87, .9); animation: cs-pulse 1.6s ease-in-out infinite; }
@keyframes cs-pulse { 50% { box-shadow: 0 0 0 7px rgba(255, 61, 87, .08), 0 8px 22px -10px rgba(255, 61, 87, .9); } }
.cs-status { font-size: 13px; color: var(--text-3); font-weight: 700; min-width: 230px; }
.cs-status.on { color: #ff8a9c; }
.cs-decks { display: grid; grid-template-columns: 1fr 300px 1fr; gap: 12px; align-items: start; }
.dk { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.dk.playing { border-color: rgba(46, 229, 157, .55); box-shadow: inset 0 0 0 1px rgba(46, 229, 157, .25); }
.dk-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dk-name { font-size: 15px; font-weight: 900; }
.dk-title { font-weight: 800; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--strong); }
.dk-time { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.dk-seek, .cs-xf, .dk-vol, .mx input[type=range] { width: 100%; accent-color: rgb(var(--c-acc)); }
.dk-ctrl { display: flex; align-items: center; gap: 8px; }
.dk-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid rgba(var(--c-ink), .14); background: rgba(var(--c-ink), .06); color: var(--strong); display: grid; place-items: center; font-size: 16px; flex: none; }
.dk-btn.play { background: var(--grad-btn); border: 0; width: 52px; height: 52px; border-radius: 50%; }
.dk-btn svg { width: 20px; height: 20px; }
.dk-volw { display: flex; align-items: center; gap: 6px; flex: 1; font-size: 14px; }
.dk-auto { font-size: 12.5px; }
.dk-list { margin: 0; padding-left: 20px; max-height: 190px; overflow-y: auto; font-size: 13px; }
.dk-list li { display: flex; align-items: center; gap: 4px; }
.dk-list li.on .dk-pick { color: rgb(var(--c-acc2)); font-weight: 800; }
.dk-pick { flex: 1; min-width: 0; text-align: left; background: none; border: 0; color: var(--text-2); padding: 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.mx-row { display: flex; align-items: center; gap: 8px; font-weight: 900; }
.mx-l { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-2); }
.cs-mic { height: 46px; border-radius: 12px; border: 1px solid rgba(var(--c-ink), .16); background: rgba(var(--c-ink), .06); color: var(--strong); font-weight: 900; display: flex; align-items: center; justify-content: center; gap: 6px; }
.cs-mic svg { width: 18px; height: 18px; }
.cs-mic.on { background: linear-gradient(135deg, #b3122f, #ff3d57); border-color: transparent; }
.cs-meter { height: 12px; border-radius: 6px; background: rgba(var(--c-ink), .07); overflow: hidden; }
.cs-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2ee59d, #ffcc4d 75%, #ff3d57); transition: width .06s linear; }
.cs-meter i.hot { background: #ff3d57; }
.cs-bottom { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: start; }
.cs-box { padding: 12px; }
.cs-box h3 { margin: 0 0 10px; font-size: 15px; }
.cs-jingles { display: flex; flex-wrap: wrap; gap: 8px; }
.jg { position: relative; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(255, 204, 77, .45); background: rgba(255, 204, 77, .1); color: #ffe08a; font-weight: 800; font-size: 13px; }
.jg:active { transform: scale(.96); }
.jg.add { border-style: dashed; background: none; color: var(--text-2); }
.jg-del { margin-left: 8px; opacity: .6; }
.jg-del:hover { opacity: 1; color: #ff8a9c; }
.cs-reqs { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; }
.rq { padding: 8px 10px; border-radius: 10px; background: rgba(var(--c-pink), .08); border: 1px solid rgba(var(--c-pink), .3); font-size: 13.5px; display: flex; flex-direction: column; gap: 3px; }
.rq.done { opacity: .45; }
.rq-top { display: flex; justify-content: space-between; }
.rq-top time { font-size: 11.5px; color: var(--text-3); }
.rq-msg { font-style: italic; color: var(--text-2); }
.rq .btn { align-self: flex-end; }
.cs-sched { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; font-size: 13px; }
.sc { display: flex; align-items: center; gap: 4px; }
.sc span { flex: 1; min-width: 0; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-scadd { display: flex; flex-direction: column; gap: 6px; }
.radio-sched { padding: 4px 11px; font-size: 12.5px; color: var(--text-2); }
@media (max-width: 1180px) { .cs-decks { grid-template-columns: 1fr 1fr; } .cs-decks .mx { grid-column: 1 / -1; order: 3; } .cs-bottom { grid-template-columns: 1fr 1fr; } }
/* solo PC: sul telefono la voce non c'è e la pagina avvisa */
@media (max-width: 900px) { .nav-consolle { display: none !important; } .cs-main { display: none; } .cs-only-pc { display: block; } }
/* scritta scorrevole durante la diretta: rosa acceso */
.conv-title .ticker.live .ticker-in { color: #ff7eb6; }
.radio.live-only .meta b { display: none; }
.radio.live-only .meta small { font-size: 13px; }

/* Capo dei Capi: badge rosso-oro */
.role.super { background: conic-gradient(from 200deg, #ffcc4d, #ff3d57, rgb(var(--c-pink)), #ffcc4d); color: #fff; box-shadow: 0 0 0 1.5px #ffcc4d, 0 0 12px rgba(255, 61, 87, .6); }
.role.super::after { content: "Capo dei Capi"; }
.msg .meta .role.super, .user-row .role.super { border-color: #ff3d57; color: #ffd76a; background: rgba(255, 61, 87, .15); }

/* XDCHAT: altezza reale dello schermo (impostata da boot.js), evita la barra di scrittura dietro la barra in basso */
.app { height: var(--app-h, 100dvh); }

/* XDCHAT iPhone: quando la musica e bloccata il video si vede e si tocca (poi sparisce di nuovo) */
.yt-ios-hint { font-size: 12.5px; font-weight: 800; color: #ffd76a; grid-column: 1 / -1; }
@media (max-width: 600px) { .ytbar.yt-ios-tap .yt-player { position: static; opacity: 1; pointer-events: auto; z-index: auto; width: 100%; height: 200px; margin: 0 0 6px; } }

/* moderatore automatico ospiti: interruttore nella pagina Staff */
.am-btn { margin-left: auto; margin-right: 10px; }
.am-btn.on { background: rgba(46, 229, 157, .15); border-color: rgba(46, 229, 157, .6); color: #6ee7a8; }

/* ===== Pannello del Capo: menu laterale ===== */
.capo .admin-inner, .capo-layout { max-width: 1400px; margin: 0 auto; }
.capo-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; padding: 16px; }
.capo-aside { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 10px; }
.capo-hero { margin: 0; padding: 4px 4px 0; }
.capo-hero b { font-size: 16px; font-weight: 900; }
.capo-menu-btn { display: none; }
.capo-side { padding: 8px; display: flex; flex-direction: column; gap: 4px; max-height: calc(var(--app-h, 100dvh) - 160px); overflow-y: auto; }
.capo-sec { padding: 6px 4px 8px; border-bottom: 1px solid var(--line); }
.capo-sec:last-child { border-bottom: 0; }
.capo-sec-h { display: flex; align-items: center; gap: 8px; padding: 4px 8px 6px; font-size: 11.5px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.capo-sec-h svg { width: 15px; height: 15px; }
.capo-sec.on .capo-sec-h { color: rgb(var(--c-acc-l)); }
.capo-item { display: block; width: 100%; text-align: left; padding: 8px 10px 8px 31px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font-weight: 700; font-size: 13.5px; }
.capo-item:hover { background: rgba(var(--c-ink), .05); color: var(--strong); }
.capo-item.on { background: rgba(var(--c-acc), .18); color: var(--strong); box-shadow: inset 3px 0 0 rgb(var(--c-acc)); }
.capo-main { min-width: 0; }
.capo-title { display: flex; align-items: center; gap: 8px; margin: 2px 0 14px; font-size: 14px; color: var(--text-3); }
.capo-title svg { width: 17px; height: 17px; color: rgb(var(--c-acc-l)); }
.capo-title b { color: var(--strong); font-size: 20px; font-weight: 900; }
.capo-sep { opacity: .5; }
/* telefono: il menu si apre e chiude dal pulsante */
@media (max-width: 900px) {
  .capo-layout { grid-template-columns: minmax(0, 1fr); padding: 10px; gap: 10px; }
  .capo-aside { position: static; }
  .capo-hero { display: none; }
  .capo-menu-btn { display: flex; align-items: center; gap: 8px; width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(var(--c-acc), .5); background: rgba(var(--c-acc), .12); color: #fff; font-weight: 800; font-size: 14px; }
  .capo-menu-btn svg { width: 18px; height: 18px; }
  .capo-side { display: none; max-height: none; }
  .capo-layout.menu-open .capo-side { display: flex; }
  .capo-title { display: none; }
}

/* ===== ruolo scritto accanto al nome nel rullo ===== */
.role-tag { display: inline-flex; align-items: center; height: 17px; padding: 0 6px; border-radius: 6px; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; line-height: 1; white-space: nowrap; background: rgba(var(--c-ink), .07); color: var(--text-3); border: 1px solid rgba(var(--c-ink), .08); }
.role-tag.r-guest { color: #b9c2cc; }
.role-tag.r-user { color: #8fd3ff; background: rgba(77, 171, 247, .1); border-color: rgba(77, 171, 247, .25); }
.role-tag.r-dj { color: #7ee2b8; background: rgba(32, 201, 151, .1); border-color: rgba(32, 201, 151, .28); }
.role-tag.r-mod, .role-tag.r-admin { color: #ffd38a; background: rgba(255, 181, 71, .1); border-color: rgba(255, 181, 71, .3); }
.role-tag.r-owner { color: #d2b8ff; background: rgba(var(--c-acc), .14); border-color: rgba(var(--c-acc), .4); }
.role-tag.r-super { color: #ffe08a; background: rgba(255, 196, 0, .12); border-color: rgba(255, 196, 0, .4); }
/* finestra DJ della pagina Staff */
.dj-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.dj-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: rgba(var(--c-ink), .04); }

/* ===== Consolle: mini rullo della stanza a destra ===== */
.cs { max-width: 1760px; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 12px; align-items: start; }
.cs-only-pc { grid-column: 1 / -1; }
.cs-roll { position: sticky; top: 0; display: flex; flex-direction: column; height: calc(var(--app-h, 100vh) - 110px); min-height: 420px; padding: 0; overflow: hidden; }
.cr-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.cr-room { margin-left: auto; font-size: 12px; font-weight: 800; color: rgb(var(--c-acc-l)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.cr-list { flex: 1; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.cr-msg { padding: 3px 6px; border-radius: 8px; }
.cr-msg:not(.grouped) { margin-top: 6px; }
.cr-msg.mention { background: rgba(255, 196, 0, .1); box-shadow: inset 3px 0 0 #ffc400; }
.cr-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.cr-meta .avatar { width: 20px; height: 20px; }
.cr-meta time { margin-left: auto; font-size: 11px; color: var(--text-3); }
.cr-meta .role-tag, .cr-meta .role { transform: scale(.9); transform-origin: left center; }
.cr-text { font-size: 13.5px; line-height: 1.35; padding-left: 26px; overflow-wrap: anywhere; color: var(--text-1, #fff); }
.cr-text.act { font-style: italic; color: var(--text-2); }
.cr-text img { max-width: 100%; }
.cr-compose { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.cr-compose .input { flex: 1; height: 38px; }
@media (max-width: 1280px) { .cs { grid-template-columns: minmax(0, 1fr) 280px; } }
@media (max-width: 900px) { .cs { display: block; } .cs-roll { display: none; } }

/* ===== Consolle DJ: aspetto da consolle vera ===== */
.cs-main .card { background: linear-gradient(180deg, rgba(30, 24, 52, .92), rgba(14, 11, 28, .96)); border: 1px solid rgba(var(--c-ink), .09); box-shadow: inset 0 1px 0 rgba(var(--c-ink), .06), 0 14px 34px -18px rgba(0, 0, 0, .9); }
/* barra in alto con insegna ON AIR */
.cs-top { gap: 14px; }
.cs-brand { display: flex; flex-direction: column; line-height: 1.1; }
.cs-brand small { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.cs-onair { padding: 7px 12px; border-radius: 8px; border: 2px solid rgba(255, 61, 87, .35); color: rgba(255, 61, 87, .35); font-weight: 900; font-size: 13px; letter-spacing: .16em; background: rgba(0, 0, 0, .35); white-space: nowrap; }
.cs-onair.on { color: #fff; border-color: #ff3d57; background: #d81b3c; text-shadow: 0 0 8px #fff; box-shadow: 0 0 18px rgba(255, 61, 87, .85), inset 0 0 10px rgba(var(--c-ink), .25); animation: cs-onair 1.4s ease-in-out infinite; }
@keyframes cs-onair { 50% { box-shadow: 0 0 8px rgba(255, 61, 87, .5), inset 0 0 6px rgba(var(--c-ink), .15); } }
/* piatti: colore A azzurro, B fucsia */
.dk { --acc: rgb(var(--c-cyan)); --acc2: rgba(var(--c-cyan), .35); gap: 10px; position: relative; overflow: hidden; }
.dk-B { --acc: rgb(var(--c-pink)); --acc2: rgba(var(--c-pink), .35); }
.dk::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, transparent, var(--acc), transparent); opacity: .7; }
.dk.playing { border-color: var(--acc2); box-shadow: 0 0 0 1px var(--acc2), 0 0 30px -8px var(--acc2); }
.dk-name { display: flex; align-items: center; gap: 8px; letter-spacing: .04em; text-transform: uppercase; font-size: 13px; color: var(--text-2); }
.dk-letter { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 16px; color: #0b0716; background: var(--acc); box-shadow: 0 0 14px var(--acc2); }
.dk-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: center; }
/* vinile */
.dk-disc { position: relative; width: 150px; height: 150px; padding: 0; border: 0; border-radius: 50%; background: radial-gradient(circle, #2a2440 0 66%, #15111f 67%); box-shadow: inset 0 0 0 4px #0c0a14, 0 10px 24px -10px #000; cursor: pointer; }
.dk-vinyl { position: absolute; inset: 9px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(from 30deg, rgba(var(--c-ink), .0), rgba(var(--c-ink), .13) 8%, rgba(var(--c-ink), 0) 18%, rgba(var(--c-ink), 0) 50%, rgba(var(--c-ink), .1) 58%, rgba(var(--c-ink), 0) 68%),
    repeating-radial-gradient(circle, #111 0 1.5px, #1c1c22 1.5px 3px); box-shadow: inset 0 0 0 2px #000; animation: dk-spin 1.8s linear infinite; animation-play-state: paused; }
.dk.playing .dk-vinyl { animation-play-state: running; }
@keyframes dk-spin { to { transform: rotate(360deg); } }
.dk-label { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 18px; color: #0b0716; background: radial-gradient(circle, #0b0716 0 3px, var(--acc) 4px); box-shadow: 0 0 0 3px rgba(0, 0, 0, .5); }
.dk-arm { position: absolute; top: 6px; right: 4px; width: 6px; height: 74px; border-radius: 3px; background: linear-gradient(180deg, #d9d9e3, #8a8aa0); transform-origin: 50% 6px; transform: rotate(-8deg); transition: transform .5s ease; box-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.dk-arm::before { content: ''; position: absolute; top: -5px; left: -5px; width: 16px; height: 16px; border-radius: 50%; background: #55556a; box-shadow: inset 0 0 0 3px #9a9ab0; }
.dk-arm::after { content: ''; position: absolute; bottom: -4px; left: -3px; width: 12px; height: 12px; border-radius: 3px; background: var(--acc); }
.dk.playing .dk-arm { transform: rotate(22deg); }
.dk-disc:active { transform: scale(.98); }
/* display digitale */
.dk-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dk-screen { padding: 10px 12px; border-radius: 10px; background: #07060d; border: 1px solid rgba(var(--c-ink), .08); box-shadow: inset 0 2px 10px rgba(0, 0, 0, .8); }
.dk-screen .dk-title { color: var(--acc); text-shadow: 0 0 10px var(--acc2); font-size: 14px; }
.dk-screen .dk-time { margin-top: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 18px; font-weight: 700; color: #e8e6ff; letter-spacing: .04em; }
.dk-btn.play { background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--acc) 80%, #fff), var(--acc) 60%); color: #0b0716; box-shadow: 0 0 18px var(--acc2), inset 0 -3px 0 rgba(0, 0, 0, .25); }
.dk-btn { background: linear-gradient(180deg, #2b2542, #1a1528); border-color: rgba(var(--c-ink), .1); box-shadow: inset 0 1px 0 rgba(var(--c-ink), .08), 0 3px 0 #0a0812; }
.dk-btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(var(--c-ink), .08), 0 1px 0 #0a0812; }
.dk-list { background: rgba(0, 0, 0, .25); border-radius: 10px; padding: 6px 8px 6px 26px; }
.dk-list:empty { display: none; }
.dk-list li.on .dk-pick { color: var(--acc); }
/* cursori "hardware" */
.cs-main input[type=range] { -webkit-appearance: none; appearance: none; height: 22px; background: transparent; accent-color: auto; }
.cs-main input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(180deg, #05040a, #1b1729); box-shadow: inset 0 1px 2px #000, 0 1px 0 rgba(var(--c-ink), .06); }
.cs-main input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: #0b0914; box-shadow: inset 0 1px 2px #000; }
.cs-main input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 22px; margin-top: -8px; border-radius: 4px; border: 0; background: linear-gradient(180deg, #f4f4fa, #a6a6b8 45%, #6d6d80 50%, #c9c9d6); box-shadow: 0 2px 5px rgba(0, 0, 0, .7); cursor: grab; }
.cs-main input[type=range]::-moz-range-thumb { width: 16px; height: 22px; border-radius: 4px; border: 0; background: linear-gradient(180deg, #f4f4fa, #a6a6b8 45%, #6d6d80 50%, #c9c9d6); box-shadow: 0 2px 5px rgba(0, 0, 0, .7); }
.dk .dk-seek::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--acc2), rgba(0, 0, 0, .6)); }
.dk .dk-seek::-webkit-slider-thumb { width: 6px; background: var(--acc); box-shadow: 0 0 8px var(--acc); }
/* mixer */
.mx { gap: 10px; }
.mx-title { text-align: center; font-size: 11px; font-weight: 900; letter-spacing: .3em; color: var(--text-3); }
.mx-vu { display: flex; justify-content: center; gap: 10px; padding: 8px; border-radius: 10px; background: #07060d; box-shadow: inset 0 2px 10px rgba(0, 0, 0, .8); }
.vu { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.vu small { font-size: 10px; font-weight: 900; color: var(--text-3); }
.vu-col { --lv: 0; width: 16px; height: 110px; border-radius: 3px; position: relative;
  background: repeating-linear-gradient(0deg, transparent 0 4px, #07060d 4px 6px), linear-gradient(0deg, #1d3a2c 0 60%, #3d3a1c 60% 82%, #3d1c22 82%); }
.vu-col::after { content: ''; position: absolute; inset: 0; border-radius: 3px;
  background: repeating-linear-gradient(0deg, transparent 0 4px, #07060d 4px 6px), linear-gradient(0deg, #2ee59d 0 60%, #ffcc4d 60% 82%, #ff3d57 82%);
  clip-path: inset(calc((1 - var(--lv)) * 100%) 0 0 0); filter: drop-shadow(0 0 4px rgba(46, 229, 157, .6)); }
.cs-mic { height: 54px; border-radius: 27px; background: linear-gradient(180deg, #2b2542, #1a1528); box-shadow: inset 0 1px 0 rgba(var(--c-ink), .08), 0 3px 0 #0a0812; letter-spacing: .04em; }
.cs-mic.on { background: radial-gradient(circle at 50% 20%, #ff6b81, #d81b3c 70%); box-shadow: 0 0 22px rgba(255, 61, 87, .7), 0 3px 0 #5a0716; }
.mx-xf { margin-top: 4px; padding: 10px 10px 6px; border-radius: 10px; background: rgba(0, 0, 0, .3); text-align: center; }
.mx-xf small { font-size: 10px; font-weight: 900; letter-spacing: .25em; color: var(--text-3); }
.mx-xf .xa { color: rgb(var(--c-cyan)); } .mx-xf .xb { color: rgb(var(--c-pink)); }
.mx-xf .cs-xf::-webkit-slider-runnable-track { height: 8px; background: linear-gradient(90deg, rgba(var(--c-cyan), .5), #05040a 40% 60%, rgba(var(--c-pink), .5)); }
.mx-xf .cs-xf::-webkit-slider-thumb { width: 30px; height: 26px; margin-top: -9px; }
.cs-box h3 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
@media (max-width: 1380px) { .dk-body { grid-template-columns: 120px minmax(0, 1fr); } .dk-disc { width: 120px; height: 120px; } .dk-label { width: 38px; height: 38px; font-size: 15px; } .dk-arm { height: 58px; } }
/* la barra Uscita non serve piu: c e il VU meter */
.mx .mx-l:has(.cs-meter) { display: none; }

/* ===== Consolle: tutto dentro lo schermo, senza scorrere la pagina (si adatta a larghezza e altezza) ===== */
@media (min-width: 901px) {
  .view-consolle { overflow: hidden; }
  .cs { height: 100%; box-sizing: border-box; padding: clamp(6px, 1.2vh, 14px); gap: clamp(6px, 1.1vh, 12px); grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  .cs-main { min-height: 0; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1.75fr) minmax(0, 1fr); gap: clamp(6px, 1.1vh, 12px); }
  .cs-roll { position: static; height: 100%; min-height: 0; }
  /* --disc: grandezza del vinile, segue sia l'altezza sia la larghezza dello schermo */
  .cs { --disc: clamp(64px, min(17vh, 8.5vw), 170px); }
  .cs-top { padding: clamp(6px, 1vh, 12px) 14px; }
  .cs-live { height: clamp(36px, 5vh, 44px); }
  .cs-decks { min-height: 0; height: 100%; grid-template-columns: minmax(0, 1fr) clamp(210px, 19vw, 290px) minmax(0, 1fr); align-items: stretch; }
  .cs-decks .mx { grid-column: auto; order: 0; }
  .dk, .mx { min-height: 0; overflow: hidden; padding: clamp(8px, 1.2vh, 12px); gap: clamp(5px, 1vh, 10px); }
  .dk-body { grid-template-columns: var(--disc) minmax(0, 1fr); gap: clamp(8px, 1vw, 14px); }
  .dk-disc { width: var(--disc); height: var(--disc); }
  .dk-label { width: calc(var(--disc) * .3); height: calc(var(--disc) * .3); font-size: calc(var(--disc) * .12); }
  .dk-arm { height: calc(var(--disc) * .5); }
  .dk-screen { padding: clamp(6px, 1vh, 10px) 12px; }
  .dk-screen .dk-time { font-size: clamp(14px, 2.2vh, 18px); }
  .dk-btn { width: clamp(34px, 5vh, 42px); height: clamp(34px, 5vh, 42px); }
  .dk-btn.play { width: clamp(40px, 6vh, 52px); height: clamp(40px, 6vh, 52px); }
  /* la scaletta usa lo spazio che resta nel piatto e scorre dentro */
  .dk-list { flex: 1 1 auto; min-height: 0; max-height: none; }
  /* mixer: i led e i comandi si stringono sugli schermi bassi; se proprio non basta scorre dentro */
  .mx { overflow-y: auto; scrollbar-width: thin; }
  .vu-col { height: clamp(40px, 11vh, 110px); }
  .mx-vu { padding: clamp(4px, .8vh, 8px); }
  .cs-mic { height: clamp(38px, 5.5vh, 54px); flex: none; }
  .mx .check { font-size: 12.5px; }
  .mx-l { gap: 2px; }
  /* riquadri in basso: altezza fissa della riga, il contenuto scorre dentro */
  .cs-bottom { min-height: 0; height: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
  .cs-box { min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding: clamp(8px, 1.2vh, 12px); }
  .cs-box h3 { flex: none; margin-bottom: clamp(4px, 1vh, 10px); }
  .cs-box > :not(h3) { min-height: 0; }
  .cs-jingles, .cs-reqs { flex: 1 1 auto; overflow-y: auto; max-height: none; align-content: flex-start; }
  .cs-box:last-child { overflow-y: auto; }
  .cs-sched { flex: none; }
}
/* schermi bassi (portatili 768px e simili): via le scritte non indispensabili */
@media (min-width: 901px) and (max-height: 760px) {
  .cs-brand small, .mx-title, .mx-xf small, .dk-auto span { display: none; }
  .dk-auto::after { content: 'Auto'; font-size: 12px; }
  .cs-top .input { height: 36px; }
}
/* schermi stretti: il rullo si restringe */
@media (min-width: 901px) and (max-width: 1280px) { .cs { grid-template-columns: minmax(0, 1fr) 250px; } .cs-brand { display: none; } }
/* mixer più compatto per stare nell altezza del piatto */
@media (min-width: 901px) {
  .mx { gap: clamp(3px, .7vh, 8px); }
  .vu-col { height: clamp(34px, 8.5vh, 100px); }
  .cs-mic { height: clamp(34px, 4.6vh, 50px); }
  .mx .check { margin: 0; }
  .mx-xf { margin-top: 0; padding: 6px 10px 4px; }
}
/* schermi bassi: mixer su due colonne (led a sinistra, comandi a destra, crossfader sotto) */
@media (min-width: 901px) and (max-height: 760px) {
  .mx { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-auto-rows: min-content; column-gap: 8px; row-gap: 4px; align-content: start; }
  .mx > * { grid-column: 2; }
  .mx > .mx-vu { grid-column: 1; grid-row: 1 / span 5; align-self: stretch; padding: 4px 6px; }
  .mx > .mx-xf { grid-column: 1 / -1; }
  .mx .vu { height: 100%; }
  .mx .vu-col { height: auto; flex: 1; width: 12px; }
  .mx .check { font-size: 11.5px; line-height: 1.2; }
  .mx-l { font-size: 11.5px; }
  .mx input[type=range] { height: 18px; }
}

/* ===== Consolle: brani di YouTube nei piatti ===== */
.dk-add { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.dk-ytadd { color: #ff5c7a; }
.dk-yt { display: inline-block; margin-right: 6px; padding: 0 5px; border-radius: 4px; background: #ff0033; color: #fff; font-size: 10px; font-weight: 900; line-height: 16px; vertical-align: 1px; }
.dk.yt .dk-label { background: radial-gradient(circle, #0b0716 0 3px, #ff0033 4px); color: #fff; }
.cs-ytlink { padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(255, 0, 51, .45); background: rgba(255, 0, 51, .08); color: #ff8aa0; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.cs-ytlink.on { border-color: rgba(46, 229, 157, .5); background: rgba(46, 229, 157, .1); color: #6ff0bd; }
.rq-yt { display: inline-flex; gap: 4px; margin-left: 6px; }
.rq-yt .btn { padding: 2px 8px; min-height: 0; }
.yts { max-width: 460px; }
.yts-step { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(var(--c-ink), .04); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.yts-step .hint { margin: 0; }
@media (min-width: 901px) and (max-height: 760px) { .cs-ytlink { padding: 6px 10px; } }

/* ===== iPhone/telefono: tastiera aperta ===== */
html, body { height: var(--app-h, 100%); }
html.kb-open .mobile-nav { display: none; }
html.kb-open .main { padding-bottom: 0; }
@media (max-width: 900px) { html.kb-open .view { bottom: 0; } }

/* ===== faccine animate di xDChat ===== */
.smy { width: 1.9em; height: 1.9em; vertical-align: -.55em; margin: 0 1px; }
.bubble.jumbo .smy { width: 64px; height: 64px; vertical-align: middle; }
.emoji-grid.smy-grid { grid-template-columns: repeat(5, 1fr); gap: 4px; }
.emoji-grid.smy-grid button img { width: 46px; height: 46px; }

/* ===== emoji animate (Noto, Google, CC BY 4.0) ===== */
.emo { width: 1.35em; height: 1.35em; vertical-align: -.3em; margin: 0 .5px; }
.bubble.jumbo .emo { width: 46px; height: 46px; vertical-align: middle; }
.emoji-grid button img.emo { width: 28px; height: 28px; }
.emoji-credit { flex: none; font-size: 10px; color: var(--text-3); padding: 2px 8px 5px; text-align: right; }

/* ===== faccine ed emoji animate: una sola misura per tutti, in qualsiasi messaggio (solo faccine o insieme al testo) ===== */
.smy, .bubble.jumbo .smy { width: 30px; height: 30px; vertical-align: -9px; }
.emo, .bubble.jumbo .emo { width: 22px; height: 22px; vertical-align: -5px; }
.emoji-grid.smy-grid button img { width: 46px; height: 46px; }
.emoji-grid button img.emo { width: 28px; height: 28px; }

/* ===== risposta a un messaggio (trascina a destra / pulsante Rispondi) ===== */
.messages { overflow-x: hidden; }
.msg { touch-action: pan-y; }
.swipe-ic { position: absolute; left: 0; top: 50%; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; opacity: 0; pointer-events: none;
  background: var(--panel-3, rgba(var(--c-ink), .08)); color: var(--text-2); transform: translate(-14px, -50%) scale(.5); }
.swipe-ic svg { width: 16px; height: 16px; }
.swipe-ic.ready { background: rgb(var(--c-acc)); color: #fff; }
.reply-bar { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; margin-bottom: 6px; border-radius: 12px; background: rgba(var(--c-acc), .12); border-left: 3px solid rgb(var(--c-acc)); font-size: 13px; }
.reply-bar .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.reply-bar .t b { color: rgb(var(--c-acc-l)); font-size: 12.5px; }
.reply-bar .t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.rq-quote { display: flex; flex-direction: column; max-width: min(520px, 100%); margin: 2px 0 3px; padding: 4px 10px; border-radius: 10px; border-left: 3px solid rgb(var(--c-acc));
  background: rgba(var(--c-acc), .1); font-size: 12.5px; line-height: 1.3; cursor: pointer; color: var(--text-2); }
.rq-quote b { color: rgb(var(--c-acc-l)); font-size: 12px; }
.rq-quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg.mine .rq-quote { align-self: flex-end; }
.rq-quote .smy { width: 20px; height: 20px; vertical-align: -5px; }
.rq-quote .emo { width: 16px; height: 16px; vertical-align: -3px; }
.msg.flash .bubble { animation: rq-flash 1.6s ease-out; }
@keyframes rq-flash { 0%, 35% { box-shadow: 0 0 0 3px rgba(255, 196, 0, .85); } 100% { box-shadow: 0 0 0 3px transparent; } }

/* ===== pioggia di faccine (Super mod) ===== */
.rain-layer { position: fixed; inset: 0; z-index: 85; pointer-events: none; overflow: hidden; }
.rain-drop { position: absolute; top: -90px; opacity: 0; animation-name: rain-fall; animation-timing-function: cubic-bezier(.35, .1, .65, 1); animation-fill-mode: forwards; }
.rain-txt { line-height: 1; text-align: center; }
@keyframes rain-fall {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  8% { opacity: 1; }
  50% { transform: translate(var(--sway, 0), 55vh) rotate(calc(var(--rot, 0deg) / 2)); }
  88% { opacity: 1; }
  100% { transform: translate(0, calc(var(--app-h, 100vh) + 140px)) rotate(var(--rot, 0deg)); opacity: 0; }
}
.rain-pick { max-width: 440px; }
.rain-mixes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rain-mix { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line); background: rgba(var(--c-ink), .04); color: inherit; font: inherit; cursor: pointer; }
.rain-mix:hover { background: rgba(var(--c-acc), .15); border-color: rgba(var(--c-acc), .5); }
.rain-prev { display: flex; gap: 2px; }
.rain-prev img, .rain-prev .rain-txt { width: 30px; height: 30px; font-size: 24px; }
.rain-grid { max-height: 240px; }

/* ===== barra in alto: tessere tutte della stessa larghezza ===== */
@media (min-width: 901px) { .nav button { width: 78px; min-width: 78px; padding: 0 4px; } }
/* tessere al centro della barra (sugli schermi larghi, dove non toccano radio e profilo) */
@media (min-width: 1200px) { .topbar { position: relative; } .nav { position: absolute; left: 50%; transform: translateX(-50%); margin-left: 0; } }

/* ===== Forum e Oroscopo: pagine "in preparazione" e tendina Menu del telefono ===== */
.soon { max-width: 520px; margin: 12vh auto 0; padding: 0 20px; text-align: center; color: var(--text-2); }
.soon h2 { margin: 14px 0 6px; color: var(--text); font-size: 26px; }
.soon-ico { width: 84px; height: 84px; margin: 0 auto; border-radius: 24px; display: grid; place-items: center; background: rgba(var(--c-acc), .16); border: 1px solid rgba(var(--c-acc-l2), .55); box-shadow: 0 0 28px rgba(var(--c-acc), .35); }
.soon-ico svg { width: 42px; height: 42px; color: rgb(var(--c-acc-l)); }
.pop.more-pop { padding: 8px; min-width: 0; width: auto; border-radius: 16px; }
.more-menu { display: flex; flex-direction: column; gap: 8px; }
.pop .menu-item.more-btn { padding: 0 14px 0 0; gap: 12px; font-weight: 800; border-radius: 12px; }
.more-ico { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border: 2px solid #fff; border-radius: 12px; background: rgba(var(--c-ink), .04); }
.more-ico svg { width: 22px; height: 22px; color: var(--strong); }
.pop .menu-item.more-btn.on .more-ico { border-color: rgb(var(--c-acc)); background: rgba(var(--c-acc), .25); }
/* barra in alto con 7 tessere: centrate solo dove c'è spazio, sugli schermi medi solo icone */
@media (min-width: 1200px) and (max-width: 1399px) { .nav { position: static; transform: none; margin-left: 16px; } }
@media (min-width: 901px) and (max-width: 1279px) { .nav button { width: 48px; min-width: 48px; } .nav button span.lbl { display: none; } }

/* ===== Oroscopo del giorno ===== */
.view:has(> .oro) { overflow-y: auto; }
.oro { max-width: 1100px; margin: 0 auto; padding: 22px 18px 40px; }
.oro-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.oro-head h2 { margin: 0; font-size: 26px; color: var(--text); }
.oro-day { color: rgb(var(--c-acc-l)); font-weight: 700; text-transform: capitalize; margin-top: 2px; }
.oro-regen { display: inline-flex; align-items: center; gap: 6px; }
.oro-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; align-items: start; }
.oro-card { text-align: left; font: inherit; color: var(--text-2); padding: 14px; border-radius: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 8px;
  background: rgba(var(--c-ink), .045); border: 1px solid rgba(var(--c-ink), .09); }
.oro-card:hover { border-color: rgba(var(--c-acc), .55); }
.oro-card.open { grid-column: 1 / -1; background: rgba(var(--c-acc), .12); border-color: rgba(var(--c-acc-l2), .7); }
.oro-top { display: flex; align-items: center; gap: 10px; }
.oro-top b { display: block; color: var(--strong); font-size: 17px; }
.oro-top small { color: var(--text-3); }
.oro-sym { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 14px; font-size: 26px; color: #fff; background: linear-gradient(135deg, #6a35f0, #e0569f); }
.oro-frase { margin: 0; color: var(--text); line-height: 1.4; }
.oro-rate { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; }
.oro-stars span { color: var(--text-3); margin-right: 4px; }
.oro-stars b { color: #ffd166; letter-spacing: 1px; }
.oro-more { color: rgb(var(--c-acc-l)); font-size: 12px; }
.oro-full h4 { margin: 12px 0 4px; color: var(--strong); font-size: 14px; }
.oro-full p { margin: 0; line-height: 1.5; }
.oro-tip { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 209, 102, .1); color: #ffe7a8; }
.oro-luck { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13.5px; }
.oro-luck b { color: var(--strong); }
.oro-note, .oro-empty, .oro-admin { text-align: center; color: var(--text-3); font-size: 13px; margin-top: 18px; }
.oro-admin { color: #ffb4b4; }
@media (max-width: 900px) { .oro { padding: 14px 10px 90px; } .oro-head h2 { font-size: 21px; } .oro-grid { grid-template-columns: 1fr; } }
.oro-stars i { font-style: normal; color: rgba(var(--c-ink), .18); letter-spacing: 1px; }
.oro-day { text-transform: none; } .oro-day::first-letter { text-transform: uppercase; }

/* ===== Oroscopo condiviso in bacheca ===== */
.oro-share { margin-top: 14px; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; }
.post-horo { margin: 10px 0 4px; padding: 14px; border-radius: 16px; display: flex; flex-direction: column; gap: 8px; color: var(--text-2);
  background: linear-gradient(160deg, rgba(var(--c-acc), .16), rgba(224, 86, 159, .08)); border: 1px solid rgba(var(--c-acc-l2), .45); }
.post-horo-link { align-self: flex-start; margin-top: 4px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(var(--c-acc-l2), .6); background: rgba(var(--c-acc), .15); color: #e6dcff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.oro-share-box { display: flex; flex-direction: column; gap: 12px; min-width: min(520px, 86vw); }
.oro-share-box h3 { margin: 0; }
.oro-share-box textarea { width: 100%; resize: vertical; }
.oro-share-preview { max-height: 46vh; overflow-y: auto; }
.oro-share-foot { display: flex; justify-content: flex-end; gap: 8px; }
.modal.oro-share-modal { width: min(560px, 94vw); max-width: 94vw; }
.oro-share-box { min-width: 0; width: 100%; } .oro-share-box textarea { box-sizing: border-box; }

/* ===== Forum ===== */
.view:has(> .fo) { overflow-y: auto; }
.fo { max-width: 920px; margin: 0 auto; padding: 22px 18px 40px; }
.fo-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.fo-title { flex: 1; min-width: 0; }
.fo-title h2 { margin: 0; font-size: 24px; color: var(--text); overflow-wrap: anywhere; }
.fo-sub { color: var(--text-3); font-size: 13.5px; margin-top: 2px; }
.fo-back { flex: none; }
.fo-cats, .fo-threads { display: flex; flex-direction: column; gap: 10px; }
.fo-cat, .fo-thread { width: 100%; text-align: left; font: inherit; color: var(--text-2); display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; cursor: pointer;
  background: rgba(var(--c-ink), .045); border: 1px solid rgba(var(--c-ink), .09); }
.fo-cat:hover, .fo-thread:hover { border-color: rgba(var(--c-acc), .55); background: rgba(var(--c-acc), .08); }
.fo-cat-ico { width: 50px; height: 50px; flex: none; display: grid; place-items: center; font-size: 26px; border-radius: 15px;
  background: color-mix(in srgb, var(--c, rgb(var(--c-acc))) 22%, transparent); border: 1px solid color-mix(in srgb, var(--c, rgb(var(--c-acc))) 60%, transparent); }
.fo-cat-ico.sm { width: 34px; height: 34px; font-size: 18px; border-radius: 10px; }
.fo-cat { border-left: 4px solid var(--c, rgb(var(--c-acc))); }
.fo-cat-main, .fo-thread-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fo-cat-main b, .fo-thread-main b { color: var(--strong); font-size: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fo-cat-descr { font-size: 13.5px; }
.fo-cat-last, .fo-thread-main span { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fo-cat-last i { font-style: normal; color: var(--text-2); }
.fo-cat-num, .fo-thread-num { flex: none; text-align: center; display: flex; flex-direction: column; min-width: 70px; }
.fo-cat-num b, .fo-thread-num b { color: var(--strong); font-size: 18px; }
.fo-cat-num small, .fo-thread-num small { font-size: 11px; color: var(--text-3); }
.fo-new { font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: #ff4fa0; color: #fff; }
.fo-thread.unread { border-color: rgba(255, 79, 160, .45); }
.fo-thread.unread .fo-thread-main b::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #ff4fa0; flex: none; }
.fo-flag { font-size: 14px; }
.fo-empty { text-align: center; color: var(--text-3); padding: 30px 10px; }
.fo-pager { display: flex; justify-content: space-between; margin-top: 12px; }
.fo-modbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; margin-bottom: 12px; border-radius: 12px; background: rgba(255, 209, 102, .08); border: 1px solid rgba(255, 209, 102, .25); font-size: 13px; color: #ffe7a8; }
.fo-posts { display: flex; flex-direction: column; gap: 12px; }
.fo-post { padding: 16px 16px 8px; }
.fo-post.first { border-color: rgba(var(--c-acc-l2), .5); }
.fo-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.5; margin: 8px 0 10px; }
.fo-quote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid rgb(var(--c-acc)); border-radius: 8px; background: rgba(var(--c-acc), .1); font-size: 13.5px; color: var(--text-2); position: relative; }
.fo-quote b { display: block; color: #cbb8ff; font-size: 12.5px; margin-bottom: 2px; }
.fo-quote p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 7.5em; overflow: hidden; }
.fo-quote-edit { padding-right: 40px; } .fo-quote-edit .icon-btn { position: absolute; top: 6px; right: 6px; }
.fo-actions { flex-wrap: wrap; }
.fo-reply { margin-top: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.fo-reply textarea, .fo-form textarea, .fo-form .input { width: 100%; box-sizing: border-box; resize: vertical; }
.fo-reply .bottom { display: flex; justify-content: space-between; align-items: center; }
.fo-locked { margin-top: 14px; padding: 12px; text-align: center; border-radius: 12px; color: var(--text-3); background: rgba(var(--c-ink), .04); }
.modal.fo-modal { width: min(620px, 94vw); max-width: 94vw; }
.fo-form { display: flex; flex-direction: column; gap: 10px; }
.fo-form h3 { margin: 0 0 4px; }
.fo-form-foot { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.fo-row { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.fo-move { display: flex; flex-direction: column; gap: 6px; }
.fo-move .btn { justify-content: flex-start; }
.fo-mcats { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.fo-mcat { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: rgba(var(--c-ink), .04); }
.fo-mcat b { flex: 1; min-width: 0; } .fo-mcat small { color: var(--text-3); font-weight: 500; }
.nav button .badge { position: absolute; top: -6px; right: -6px; }
@media (max-width: 900px) {
  .fo { padding: 12px 10px 90px; }
  .fo-title h2 { font-size: 19px; }
  .fo-head { flex-wrap: wrap; }
  .fo-cat, .fo-thread { gap: 10px; padding: 12px; }
  .fo-cat-ico { width: 42px; height: 42px; font-size: 22px; }
  .fo-cat-num, .fo-thread-num { min-width: 52px; }
  .fo-cat-last { display: none; }
}

.fo-thread-main b { display: block; line-height: 1.3; }
.fo-thread-main b .fo-flag { margin-right: 4px; }
.fo-thread.unread .fo-thread-main b::after { display: inline-block; margin-left: 6px; vertical-align: middle; }


/* ---------- temi (xd-48) ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 10px; }
.theme-sw { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 14px; border: 2px solid var(--line); background: var(--panel-2); color: var(--text); font-weight: 700; font-size: 13px; }
.theme-sw:hover { border-color: var(--line-2); }
.theme-sw.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--c-acc), .25); }
.theme-sw:disabled { opacity: .45; cursor: not-allowed; }
.theme-sw .dots { display: flex; }
.theme-sw .dots i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--panel-solid); margin-left: -6px; }
.theme-sw .dots i:first-child { margin-left: 0; }
.theme-sw .em { font-size: 20px; line-height: 1; }
.theme-note { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(var(--c-acc), .14); color: var(--text-2); font-size: 13.5px; }
.theme-fx { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.theme-fx i { position: absolute; top: -40px; font-style: normal; will-change: transform; animation: fx-fall linear infinite; }
@keyframes fx-fall { to { transform: translate3d(var(--dx, 0), calc(var(--app-h, 100vh) + 80px), 0) rotate(var(--rot, 0deg)); } }
@media (prefers-reduced-motion: reduce) { .theme-fx { display: none; } }

/* sfondo dei temi (xd-49) */
html[data-theme] .aurora { background: radial-gradient(ellipse 65% 55% at 0% 0%, rgba(var(--c-acc-d), .38), transparent 70%), radial-gradient(ellipse 55% 45% at 100% 20%, rgba(var(--c-cyan), .16), transparent 70%), radial-gradient(ellipse 70% 55% at 75% 105%, rgba(var(--c-pink), .30), transparent 70%), rgb(var(--c-bg)); }


/* giochi: numero della partita sotto i giocatori (xd-58) */
.game-round { text-align: center; font-size: 12px; font-weight: 700; color: var(--text-3); margin: -4px 0 6px; letter-spacing: .02em; }

/* utenti seguiti: avvisi "entra" e "scrive" (xd-60) */
.notify-follow-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip-tog { font: inherit; font-size: 12px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text-3); cursor: pointer; opacity: .7; }
.chip-tog.on { background: rgba(var(--c-acc), .18); border-color: rgba(var(--c-acc), .55); color: var(--text); opacity: 1; }

/* tasto GIF nel campo di scrittura (xd-61) */
.gif-badge { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; line-height: 1; padding: 4px 4px 3px; border: 1.6px solid currentColor; border-radius: 5px; }
.gif-btn:hover { color: var(--text); }

/* riquadro GIF (xd-62) */
.gif-pop { width: 380px; height: 400px; left: auto; right: 12px; }
.gif-head { padding: 8px; border-bottom: 1px solid var(--line); }
.gif-search { width: 100%; height: 38px; }
.gif-list { flex: 1; overflow-y: auto; padding: 6px; }
.gif-grid { columns: 2; column-gap: 6px; }
.gif-item { display: block; width: 100%; margin: 0 0 6px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--panel-3); break-inside: avoid; cursor: pointer; }
.gif-item img { display: block; width: 100%; height: auto; }
.gif-item:hover { outline: 2px solid rgba(var(--c-acc), .8); }
.gif-msg { text-align: center; font-size: 13px; color: var(--text-3); padding: 8px; }
.gif-msg:empty { display: none; }
.gif-credit { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; color: var(--text-3); text-align: right; padding: 4px 10px 6px; border-top: 1px solid var(--line); }
.card.gif-pop { background: rgb(var(--c-panel)); }
@media (max-width: 900px) { .gif-pop { left: 8px; right: 8px; width: auto; max-width: none; height: min(400px, 55vh); } }

/* tema oceano */
html[data-theme="oceano"] {
  --c-acc: 30, 144, 255;
  --c-acc-l: 125, 190, 255;
  --c-acc-l2: 90, 170, 255;
  --c-acc-d: 18, 110, 220;
  --c-acc-dd: 12, 80, 180;
  --c-acc2: 64, 240, 220;
  --c-pink: 0, 200, 170;
  --c-cyan: 0, 180, 255;
  --c-g1: 0, 210, 255;
  --c-g2: 30, 144, 255;
  --c-g3: 64, 240, 200;
  --c-bg: 3, 10, 22;
  --c-panel: 6, 20, 40;
  --c-deep: 4, 14, 30;
  --c-send1: 10, 70, 150;
  --c-send2: 0, 140, 210;
  --c-tick: 140, 220, 255;
  --bg-2: #06142a;
  --panel-solid: #0a1d38;
}

/* fine tema oceano */

/* tema tramonto */
html[data-theme="tramonto"] {
  --c-acc: 255, 110, 60;
  --c-acc-l: 255, 175, 135;
  --c-acc-l2: 255, 145, 100;
  --c-acc-d: 225, 80, 45;
  --c-acc-dd: 185, 55, 35;
  --c-acc2: 255, 200, 90;
  --c-pink: 255, 70, 130;
  --c-cyan: 255, 170, 60;
  --c-g1: 255, 80, 120;
  --c-g2: 255, 120, 70;
  --c-g3: 255, 200, 90;
  --c-bg: 18, 6, 12;
  --c-panel: 34, 12, 20;
  --c-deep: 22, 8, 14;
  --c-send1: 150, 40, 30;
  --c-send2: 235, 90, 50;
  --c-tick: 255, 190, 140;
  --bg-2: #1c0a12;
  --panel-solid: #2a101a;
}

/* fine tema tramonto */

/* tema foresta */
html[data-theme="foresta"] {
  --c-acc: 46, 204, 113;
  --c-acc-l: 140, 230, 170;
  --c-acc-l2: 100, 215, 140;
  --c-acc-d: 30, 160, 85;
  --c-acc-dd: 20, 120, 65;
  --c-acc2: 200, 240, 110;
  --c-pink: 120, 200, 80;
  --c-cyan: 40, 190, 160;
  --c-g1: 160, 230, 90;
  --c-g2: 46, 204, 113;
  --c-g3: 30, 180, 160;
  --c-bg: 4, 14, 9;
  --c-panel: 9, 26, 17;
  --c-deep: 5, 16, 11;
  --c-send1: 18, 95, 55;
  --c-send2: 35, 165, 90;
  --c-tick: 170, 235, 160;
  --bg-2: #08170f;
  --panel-solid: #0e2418;
}

/* fine tema foresta */

/* tema rubino */
html[data-theme="rubino"] {
  --c-acc: 225, 40, 70;
  --c-acc-l: 255, 130, 150;
  --c-acc-l2: 240, 100, 120;
  --c-acc-d: 190, 25, 55;
  --c-acc-dd: 150, 15, 40;
  --c-acc2: 255, 205, 90;
  --c-pink: 255, 80, 110;
  --c-cyan: 255, 180, 60;
  --c-g1: 255, 200, 80;
  --c-g2: 225, 40, 70;
  --c-g3: 200, 30, 90;
  --c-bg: 16, 4, 8;
  --c-panel: 30, 8, 14;
  --c-deep: 18, 5, 9;
  --c-send1: 120, 12, 30;
  --c-send2: 215, 35, 65;
  --c-tick: 255, 210, 130;
  --bg-2: #1a070c;
  --panel-solid: #280b13;
}

/* fine tema rubino */

/* tema neon */
html[data-theme="neon"] {
  --c-acc: 255, 0, 200;
  --c-acc-l: 255, 120, 230;
  --c-acc-l2: 255, 80, 220;
  --c-acc-d: 220, 0, 170;
  --c-acc-dd: 170, 0, 140;
  --c-acc2: 180, 255, 0;
  --c-pink: 255, 0, 140;
  --c-cyan: 0, 255, 200;
  --c-g1: 255, 0, 200;
  --c-g2: 140, 60, 255;
  --c-g3: 180, 255, 0;
  --c-bg: 4, 2, 10;
  --c-panel: 12, 6, 22;
  --c-deep: 6, 3, 12;
  --c-send1: 150, 0, 120;
  --c-send2: 255, 0, 180;
  --c-tick: 190, 255, 80;
  --bg-2: #08040f;
  --panel-solid: #120a20;
}

/* fine tema neon */

/* tema natale */
html[data-theme="natale"] {
  --c-acc: 214, 40, 57;
  --c-acc-l: 255, 140, 145;
  --c-acc-l2: 240, 105, 115;
  --c-acc-d: 34, 140, 75;
  --c-acc-dd: 140, 15, 30;
  --c-acc2: 255, 215, 110;
  --c-pink: 34, 170, 90;
  --c-cyan: 34, 160, 85;
  --c-g1: 214, 40, 57;
  --c-g2: 255, 200, 90;
  --c-g3: 34, 170, 90;
  --c-bg: 4, 14, 10;
  --c-panel: 10, 26, 20;
  --c-deep: 5, 16, 12;
  --c-send1: 140, 15, 30;
  --c-send2: 214, 40, 57;
  --c-tick: 255, 215, 110;
  --bg-2: #08180f;
  --panel-solid: #0f251a;
}
html[data-theme="natale"] .theme-fx i { color: #fff; text-shadow: 0 0 6px rgba(255, 255, 255, .6); }
/* fine tema natale */

/* tema halloween */
html[data-theme="halloween"] {
  --c-acc: 255, 120, 0;
  --c-acc-l: 255, 180, 100;
  --c-acc-l2: 255, 150, 60;
  --c-acc-d: 140, 60, 220;
  --c-acc-dd: 170, 70, 0;
  --c-acc2: 190, 120, 255;
  --c-pink: 140, 60, 220;
  --c-cyan: 255, 150, 0;
  --c-g1: 255, 140, 0;
  --c-g2: 200, 70, 200;
  --c-g3: 140, 60, 255;
  --c-bg: 10, 5, 14;
  --c-panel: 22, 10, 28;
  --c-deep: 12, 6, 16;
  --c-send1: 150, 60, 0;
  --c-send2: 255, 120, 0;
  --c-tick: 255, 180, 90;
  --bg-2: #120818;
  --panel-solid: #1d0e24;
}

/* fine tema halloween */

/* tema valentino */
html[data-theme="valentino"] {
  --c-acc: 255, 60, 130;
  --c-acc-l: 255, 150, 190;
  --c-acc-l2: 255, 110, 170;
  --c-acc-d: 225, 40, 110;
  --c-acc-dd: 180, 25, 90;
  --c-acc2: 255, 190, 210;
  --c-pink: 255, 90, 150;
  --c-cyan: 255, 120, 170;
  --c-g1: 255, 90, 150;
  --c-g2: 255, 60, 100;
  --c-g3: 255, 170, 200;
  --c-bg: 16, 4, 10;
  --c-panel: 32, 8, 20;
  --c-deep: 18, 5, 12;
  --c-send1: 160, 20, 75;
  --c-send2: 255, 60, 130;
  --c-tick: 255, 180, 210;
  --bg-2: #1b0711;
  --panel-solid: #2a0c1b;
}

/* fine tema valentino */

/* tema capodanno */
html[data-theme="capodanno"] {
  --c-acc: 230, 180, 60;
  --c-acc-l: 255, 220, 140;
  --c-acc-l2: 250, 205, 110;
  --c-acc-d: 200, 150, 40;
  --c-acc-dd: 160, 115, 25;
  --c-acc2: 255, 235, 180;
  --c-pink: 255, 200, 90;
  --c-cyan: 240, 200, 120;
  --c-g1: 255, 215, 110;
  --c-g2: 230, 180, 60;
  --c-g3: 255, 245, 210;
  --c-bg: 6, 6, 10;
  --c-panel: 16, 15, 22;
  --c-deep: 8, 8, 12;
  --c-send1: 150, 105, 20;
  --c-send2: 225, 175, 55;
  --c-tick: 255, 225, 150;
  --bg-2: #0c0b12;
  --panel-solid: #17151f;
}
html[data-theme="capodanno"] .theme-fx i:nth-child(5n+1) { color: #ffd76e; } html[data-theme="capodanno"] .theme-fx i:nth-child(5n+2) { color: #ff5a8c; } html[data-theme="capodanno"] .theme-fx i:nth-child(5n+3) { color: #5ee7ff; } html[data-theme="capodanno"] .theme-fx i:nth-child(5n+4) { color: #b98cff; } html[data-theme="capodanno"] .theme-fx i:nth-child(5n) { color: #7ef0a8; }
/* fine tema capodanno */

/* tema chiaro */
html[data-theme="chiaro"] {
  --c-acc: 124, 77, 255;
  --c-acc-l: 110, 70, 230;
  --c-acc-l2: 140, 100, 255;
  --c-acc-d: 160, 130, 255;
  --c-acc-dd: 90, 50, 210;
  --c-acc2: 0, 140, 190;
  --c-pink: 230, 60, 150;
  --c-cyan: 0, 166, 214;
  --c-g1: 190, 60, 240;
  --c-g2: 110, 90, 255;
  --c-g3: 0, 166, 214;
  --c-bg: 238, 241, 249;
  --c-panel: 255, 255, 255;
  --c-deep: 250, 251, 255;
  --c-send1: 110, 70, 240;
  --c-send2: 200, 60, 170;
  --c-tick: 110, 70, 230;
  --c-ink: 25, 30, 60;
  --strong: #14172b;
  --bg-2: #e7ebf5;
  --panel-solid: #ffffff;
  --panel-2: rgba(25, 30, 60, .04);
  --panel-3: rgba(25, 30, 60, .08);
  --line: rgba(25, 30, 60, .10);
  --line-2: rgba(25, 30, 60, .18);
  --text: #14172b;
  --text-2: #4a5172;
  --text-3: #7b829e;
  --shadow: 0 20px 50px -24px rgba(30, 40, 90, .35);
}
html[data-theme="chiaro"] { color-scheme: light; }
html[data-theme="chiaro"] .aurora { background: radial-gradient(ellipse 65% 55% at 0% 0%, rgba(160, 130, 255, .28), transparent 70%), radial-gradient(ellipse 55% 45% at 100% 20%, rgba(0, 166, 214, .14), transparent 70%), radial-gradient(ellipse 70% 55% at 75% 105%, rgba(230, 60, 150, .14), transparent 70%), #eef1f9; }
html[data-theme="chiaro"] .wordmark, html[data-theme="chiaro"] .brand { color: #14172b; }
/* fine tema chiaro */

/* temi: riquadri compatti (xd-51) */
.theme-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; margin-top: 8px; }
.theme-sw { gap: 3px; padding: 6px 4px; border-radius: 10px; border-width: 1.5px; font-size: 11.5px; }
.theme-sw .em { font-size: 15px; }
.theme-sw .dots i { width: 12px; height: 12px; border-width: 1.5px; margin-left: -4px; }
.theme-sw.on { box-shadow: 0 0 0 2px rgba(var(--c-acc), .25); }

/* tema chiaro: sussurri leggibili (xd-52) */
html[data-theme="chiaro"] .msg.whisper .bubble, html[data-theme="chiaro"] .msg.whisper.mine .bubble { color: #8a5a00; }





/* tema cyber */
html[data-theme="cyber"] {
  --c-acc: 150, 80, 255;
  --c-acc-l: 190, 140, 255;
  --c-acc-l2: 170, 110, 255;
  --c-acc-d: 125, 60, 240;
  --c-acc-dd: 95, 40, 210;
  --c-acc2: 90, 220, 255;
  --c-pink: 255, 60, 190;
  --c-cyan: 60, 200, 255;
  --c-g1: 210, 70, 255;
  --c-g2: 120, 100, 255;
  --c-g3: 60, 200, 255;
  --c-bg: 9, 4, 28;
  --c-panel: 16, 9, 44;
  --c-deep: 12, 6, 36;
  --c-send1: 150, 20, 110;
  --c-send2: 235, 40, 160;
  --c-tick: 200, 170, 255;
  --bg-2: #0c0626;
  --panel-solid: #170d3a;
}
/* sfondo viola con le stelle */
html[data-theme="cyber"] .aurora {
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.9), transparent 60%),
    radial-gradient(1px 1px at 33% 72%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 51% 9%, rgba(255,255,255,.9), transparent 60%),
    radial-gradient(1px 1px at 68% 41%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 84% 14%, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(1px 1px at 92% 63%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 22% 47%, rgba(220,190,255,.8), transparent 60%),
    radial-gradient(1px 1px at 76% 86%, rgba(220,190,255,.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 6% 88%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1px 1px at 44% 31%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(ellipse 60% 50% at 15% 0%, rgba(150,60,255,.45), transparent 70%),
    radial-gradient(ellipse 55% 45% at 90% 100%, rgba(230,50,200,.30), transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 10%, rgba(60,120,255,.25), transparent 70%),
    linear-gradient(180deg, #120634, #0a0420 55%, #160530);
  background-size: 340px 340px, 340px 340px, 340px 340px, 340px 340px, 340px 340px, 340px 340px, 340px 340px, 340px 340px, 340px 340px, 340px 340px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
}
/* pannelli con il bordo al neon */
html[data-theme="cyber"] .chat > .card {
  border: 1px solid rgba(175, 100, 255, .6);
  box-shadow: 0 0 0 1px rgba(175, 100, 255, .12), 0 0 22px rgba(150, 70, 255, .38), inset 0 0 28px rgba(130, 60, 255, .10);
}
/* rullo: il salotto neon con la mascotte (immagine dell'utente), velato quanto basta perché il testo resti leggibile */
html[data-theme="cyber"] .p-conv {
  background:
    linear-gradient(180deg, rgba(12, 5, 34, .62) 0%, rgba(12, 5, 34, .50) 50%, rgba(12, 5, 34, .58) 100%),
    url(/img/cyber-rullo-pc.webp?v=1) center center / cover no-repeat,
    #0d0628;
}
/* sul telefono la versione verticale */
@media (max-width: 900px) {
  html[data-theme="cyber"] .p-conv { background-image: linear-gradient(180deg, rgba(12, 5, 34, .62) 0%, rgba(12, 5, 34, .50) 50%, rgba(12, 5, 34, .58) 100%), url(/img/cyber-rullo.webp?v=1); }
}
/* in fondo ai pannelli laterali: la mascotte sul divano e il salotto con l'insegna xD */
html[data-theme="cyber"] .p-rooms {
  background:
    linear-gradient(180deg, rgb(16, 9, 44) 0, rgb(16, 9, 44) calc(100% - 250px), rgba(16, 9, 44, 0) calc(100% - 175px)),
    url(/img/cyber-sx.webp?v=1) center bottom / 100% auto no-repeat,
    rgb(16, 9, 44);
}
html[data-theme="cyber"] .p-users {
  background:
    linear-gradient(180deg, rgb(16, 9, 44) 0, rgb(16, 9, 44) calc(100% - 400px), rgba(16, 9, 44, 0) calc(100% - 300px)),
    url(/img/cyber-dx.webp?v=1) center bottom / 100% auto no-repeat,
    rgb(16, 9, 44);
}
/* menu in alto racchiuso in una cornice luminosa */
html[data-theme="cyber"] .topbar .nav { padding: 4px; border: 1px solid rgba(175, 100, 255, .45); border-radius: 14px; background: rgba(22, 10, 56, .65); box-shadow: 0 0 18px rgba(150, 70, 255, .28); }
html[data-theme="cyber"] .topbar .nav button.on { background: rgba(140, 70, 255, .22); box-shadow: 0 0 0 1px rgba(200, 140, 255, .85), 0 0 16px rgba(170, 90, 255, .6); }
html[data-theme="cyber"] .topbar .radio, html[data-theme="cyber"] .topbar .me-btn { border-color: rgba(175, 100, 255, .5); box-shadow: 0 0 14px rgba(150, 70, 255, .25); }
/* ogni messaggio nel suo riquadro, i tuoi bordati d'oro */
html[data-theme="cyber"] .msg { padding: 3px 0; }
html[data-theme="cyber"] .msg.first { padding-top: 7px; border-top: 0; }
html[data-theme="cyber"] .msg .body { padding: 8px 14px 9px; border-radius: 12px; background: linear-gradient(100deg, rgba(78, 48, 170, .55) 0%, rgba(46, 28, 110, .42) 38%, rgba(24, 14, 62, .30) 75%, rgba(18, 10, 48, .22) 100%); border: 1px solid rgba(160, 120, 255, .22); box-shadow: inset 0 1px 0 rgba(200, 170, 255, .08), 0 0 10px rgba(120, 70, 255, .10); }
html[data-theme="cyber"] .msg.mine .body { background: linear-gradient(100deg, rgba(120, 82, 22, .55) 0%, rgba(78, 52, 30, .40) 35%, rgba(40, 24, 40, .30) 75%, rgba(26, 14, 44, .22) 100%); border: 1.5px solid #f2c94c; box-shadow: 0 0 12px rgba(242, 201, 76, .35), inset 0 0 18px rgba(242, 201, 76, .10); }
html[data-theme="cyber"] .msg.mention .body { border-color: rgba(var(--c-acc), .8); }
@media (max-width: 900px) {
  html[data-theme="cyber"] .msg .body { padding: 7px 11px 8px; }
}

/* fine tema cyber */

/* --- radio (xd-72): icona cuffie, player, mini player --- */
.radio-wrap { display: contents; }
.radio-btn { display: none; position: relative; width: 42px; height: 42px; flex: none; place-items: center; border-radius: 50%; border: 1px solid rgba(var(--c-acc), .55); background: rgba(var(--c-panel), .9); color: rgb(var(--c-acc2)); box-shadow: 0 0 14px rgba(var(--c-acc), .28); }
.radio-btn svg { width: 21px; height: 21px; }
.radio-btn .dot { display: none; position: absolute; top: 0; right: 0; width: 11px; height: 11px; border-radius: 50%; background: #2ee59d; border: 2px solid var(--panel-solid); }
.radio-btn.on { box-shadow: 0 0 0 2px rgba(var(--c-acc2), .3), 0 0 18px rgba(var(--c-acc), .55); }
.radio-btn.on .dot { display: block; }
.rlogo { width: 40px; height: 40px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: #fff; }
.rlogo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rlogo.live { background: linear-gradient(135deg, rgb(var(--c-acc-dd)), rgb(var(--c-deep))); }
.rlogo.live img { width: 76%; height: 76%; object-fit: contain; }
.rlogo.txt { background: var(--grad-btn); color: #fff; font-weight: 800; font-size: 13px; }
.rlogo.big { width: 76px; height: 76px; border-radius: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.pop:has(> .radio-panel) { max-width: calc(100vw - 16px); padding: 10px; background: var(--panel-solid); backdrop-filter: none; border-color: rgba(var(--c-acc), .5); box-shadow: var(--shadow), 0 0 24px rgba(var(--c-acc), .3); }
.radio-panel { width: min(360px, calc(100vw - 38px)); max-height: min(660px, calc(100dvh - 90px)); overflow-y: auto; overflow-x: hidden; }
.rp-in { display: flex; flex-direction: column; gap: 14px; padding: 6px 4px 8px; }
.rp-head { display: flex; align-items: center; gap: 10px; padding: 2px 4px; }
.rp-head img { width: 30px; height: 30px; }
.rp-head b { flex: 1; font-size: 17px; }
.rp-x { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); }
.rp-x:hover { background: var(--panel-2); }
.rp-x svg { width: 20px; height: 20px; }
.rp-now { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 16px; border: 1px solid rgba(var(--c-acc), .4); background: linear-gradient(135deg, rgba(var(--c-acc), .18), rgba(var(--c-panel), .35)); }
.rp-now-t { flex: 1; min-width: 0; }
.rp-now-t b { display: block; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-sub { display: block; font-size: 12px; color: var(--text-3); margin-top: 1px; }
.rp-bars { display: flex; align-items: flex-end; gap: 3px; height: 28px; margin-top: 6px; }
.rp-bars i { width: 3px; height: 4px; border-radius: 2px; background: linear-gradient(180deg, rgb(var(--c-acc2)), rgb(var(--c-acc))); }
.rp-bars.on i { animation-name: rpbar; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
@keyframes rpbar { 0%, 100% { height: 4px; } 50% { height: var(--h, 20px); } }
.rp-ctrl { display: flex; align-items: center; justify-content: center; gap: 30px; }
.rp-skip { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: rgb(var(--c-acc-l)); }
.rp-skip:hover { background: var(--panel-2); }
.rp-skip svg { width: 26px; height: 26px; }
.rp-play { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 50%; border: 2px solid #2ee59d; background: rgba(46, 229, 157, .08); color: #2ee59d; box-shadow: 0 0 18px rgba(46, 229, 157, .45), inset 0 0 14px rgba(46, 229, 157, .18); }
.rp-play svg { width: 28px; height: 28px; }
.rp-vol { display: flex; align-items: center; gap: 12px; padding: 0 8px; color: var(--text-2); }
.rp-vol svg { width: 20px; height: 20px; flex: none; }
.rp-vol input, .radio-mini input { flex: 1; accent-color: rgb(var(--c-acc)); }
.rp-req { align-self: center; display: inline-flex; align-items: center; gap: 8px; }
.rp-req svg { width: 16px; height: 16px; }
.rp-label { font-weight: 800; font-size: 14.5px; padding: 2px 6px 0; }
.rp-list { display: flex; flex-direction: column; gap: 4px; }
.rp-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--text); text-align: left; font: inherit; font-size: 15px; cursor: pointer; }
.rp-item:hover { background: var(--panel-2); }
.rp-item.on { border-color: rgba(var(--c-acc), .65); background: rgba(var(--c-acc), .12); box-shadow: 0 0 12px rgba(var(--c-acc), .18); }
.rp-item .nm { flex: 1; min-width: 0; }
.rp-item .nm small { display: block; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-dot { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 2px solid var(--text-3); }
.rp-dot.sel { border-color: rgb(var(--c-acc)); box-shadow: inset 0 0 0 4px var(--panel-solid), inset 0 0 0 10px rgb(var(--c-acc)); }
.rp-item .eq { margin-right: 4px; }
.radio-mini { display: none; }
.no-vol .rp-vol, .no-vol .radio-mini input, .no-vol .rm-volic { display: none; }
/* telefono e PC (xd-73): icona cuffie in alto + mini player sotto il nome della stanza */
.topbar .radio { display: none; }
.radio-btn { display: grid; }
@media all {
  .radio-mini:not([hidden]) { display: flex; align-items: center; gap: 10px; margin: 8px 10px 0; padding: 8px 10px; border-radius: 14px; border: 1px solid rgba(var(--c-acc), .45); background: rgba(var(--c-panel), .9); box-shadow: 0 0 14px rgba(var(--c-acc), .22); }
  .rm-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; cursor: pointer; }
  .rm-open .rlogo { width: 38px; height: 38px; border-radius: 9px; }
  .rm-t { min-width: 0; }
  .rm-t b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rm-t small { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); }
  .rm-t small::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #2ee59d; }
  .rm-play { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid #2ee59d; background: transparent; color: #2ee59d; }
  .rm-play svg { width: 17px; height: 17px; }
  .rm-volic { color: var(--text-2); display: grid; }
  .rm-volic svg { width: 18px; height: 18px; }
  .radio-mini input { flex: 0 0 74px; }
}
@media (min-width: 901px) {
  .radio-mini:not([hidden]) { margin: 10px 16px 0; }
  .radio-mini input { flex: 0 0 130px; }
  .radio-btn { width: 46px; height: 46px; }
}

/* musica della stanza: quanti ascoltano (xd-76) */
.yt-listeners { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 1px 8px; border-radius: 20px; font-size: 12px; font-weight: 800; color: rgb(var(--c-acc2)); background: rgba(var(--c-acc2), .12); border: 1px solid rgba(var(--c-acc2), .3); white-space: nowrap; }
.yt-listeners svg { width: 13px; height: 13px; }

/* musica YouTube (xd-77): sul telefono pulsanti tondi al neon con icone disegnate; sul PC restano le emoji */
.yt-act .ic-m { display: none; }
@media (max-width: 600px) {
  .ytbar .yt-actions { gap: 9px; align-items: center; }
  .ytbar .yt-act { width: 38px; min-width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 1px solid rgba(var(--c-acc), .45); background: rgba(var(--c-panel), .55);
    color: rgb(var(--c-acc-l)); box-shadow: 0 0 10px rgba(var(--c-acc), .18); transition: transform .1s, box-shadow .15s; }
  .ytbar .yt-act:active { transform: scale(.92); }
  .ytbar .yt-act .em { display: none; }
  .ytbar .yt-act .ic-m { display: grid; }
  .ytbar .yt-act svg { width: 18px; height: 18px; }
  .ytbar .yt-act.yt-like { width: auto; padding: 0 12px 0 10px; border-radius: 19px; gap: 6px; color: #ff6fae; border-color: rgba(255, 95, 165, .5); background: rgba(255, 95, 165, .1); box-shadow: 0 0 10px rgba(255, 95, 165, .18); }
  .ytbar .yt-act.yt-like .n { color: var(--text); font-size: 13px; }
  .ytbar .yt-act.yt-like.on { background: rgba(255, 95, 165, .24); border-color: rgba(255, 95, 165, .85); box-shadow: 0 0 14px rgba(255, 95, 165, .45); }
  .ytbar .yt-act.yt-like.on svg { fill: currentColor; }
  .ytbar .yt-act.go { border: 2px solid #2ee59d; background: rgba(46, 229, 157, .1); color: #2ee59d; box-shadow: 0 0 14px rgba(46, 229, 157, .4), inset 0 0 10px rgba(46, 229, 157, .15); }
  .ytbar .yt-act.go svg { width: 16px; height: 16px; margin-left: 2px; }
  .ytbar .yt-act.yt-mute { color: rgb(var(--c-acc2)); }
  .ytbar .yt-act.on2 { width: auto; padding: 0 11px; border-radius: 19px; }
  .ytbar .yt-close { border-color: rgba(var(--c-ink), .16); background: transparent; color: var(--text-2); box-shadow: none; }
}
/* musica YouTube (xd-78): sul telefono anche il numero di chi ascolta e' una pillola al neon come i pulsanti */
@media (max-width: 600px) {
  .ytbar .yt-listeners { height: 38px; margin-left: 8px; padding: 0 12px 0 10px; gap: 6px; border-radius: 19px; font-size: 13px; color: rgb(var(--c-acc2));
    border: 1px solid rgba(var(--c-acc2), .5); background: rgba(var(--c-acc2), .1); box-shadow: 0 0 10px rgba(var(--c-acc2), .22); }
  .ytbar .yt-listeners svg { width: 16px; height: 16px; }
  .ytbar .yt-by { display: flex; align-items: center; }
}

/* diretta radio (xd-79): ascoltatori e cuori, pillole al neon come la musica YouTube */
.rp-live-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.rl-chip, .rl-like { height: 30px; display: inline-flex; align-items: center; gap: 5px; padding: 0 11px 0 9px; border-radius: 15px; font: inherit; font-size: 13px; font-weight: 800; white-space: nowrap; }
.rl-chip svg, .rl-like svg { width: 15px; height: 15px; }
.rl-chip { color: rgb(var(--c-acc2)); border: 1px solid rgba(var(--c-acc2), .5); background: rgba(var(--c-acc2), .1); box-shadow: 0 0 10px rgba(var(--c-acc2), .2); }
.rl-like { cursor: pointer; color: #ff6fae; border: 1px solid rgba(255, 95, 165, .5); background: rgba(255, 95, 165, .1); box-shadow: 0 0 10px rgba(255, 95, 165, .18); transition: transform .1s; }
.rl-like span { color: var(--text); }
.rl-like.on { background: rgba(255, 95, 165, .24); border-color: rgba(255, 95, 165, .85); box-shadow: 0 0 14px rgba(255, 95, 165, .45); }
.rl-like.on svg { fill: currentColor; }
.rl-like:active { transform: scale(.92); }
.rm-like { display: contents; }
.radio-mini .rl-like { height: 34px; border-radius: 17px; flex: none; }
/* mini player in diretta sul telefono: scritte su una riga, il volume resta nel player (xd-79) */
.radio-mini .rm-t { flex: 1; }
.radio-mini .rm-t small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
  .radio-mini.has-like input, .radio-mini.has-like .rm-volic { display: none; }
}
.radio-mini .rm-t small::before { display: inline-block; margin-right: 6px; vertical-align: middle; }

/* musica YouTube: ricerca dei brani dalla chat (xd-81) */
.ytq-row { display: flex; gap: 8px; }
.ytq-row .input { flex: 1; min-width: 0; }
.ytq-go { flex: none; width: 46px; padding: 0; display: grid; place-items: center; }
.ytq-go svg { width: 18px; height: 18px; }
.ytq-res { margin-top: 10px; max-height: min(300px, 34dvh); overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: rgba(var(--c-ink), .03); overscroll-behavior: contain; }
.ytq-res[hidden] { display: none; }
.ytq-msg { padding: 10px; text-align: center; }
.ytq-it { display: flex; align-items: center; gap: 10px; width: 100%; padding: 5px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ytq-it:hover { background: rgba(var(--c-ink), .06); }
.ytq-it.on { border-color: rgba(var(--c-acc), .7); background: rgba(var(--c-acc), .14); }
.ytq-it img { flex: none; width: 80px; height: 45px; object-fit: cover; border-radius: 6px; background: rgba(var(--c-ink), .08); }
.ytq-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ytq-t b { font-size: 13.5px; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ytq-t small { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ytq-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--text-3); font-size: 12px; }
.ytq-or::before, .ytq-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* colonna utenti: filtri dentro "Cerca utente" (xd-82) */
.uf-search input { padding-right: 42px; }
.uf-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 30px; border: 0; border-radius: 9px; background: transparent; color: var(--text-3); display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s; }
.search .uf-btn svg { position: static; transform: none; width: 18px; height: 18px; color: currentColor; }
.uf-btn:hover { background: rgba(var(--c-ink), .07); color: var(--text); }
.uf-btn.on { color: rgb(var(--c-acc-l)); background: rgba(var(--c-acc), .16); box-shadow: inset 0 0 0 1px rgba(var(--c-acc), .45); }
.uf-dot { display: none; position: absolute; top: 4px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--c-pink)); box-shadow: 0 0 6px rgba(var(--c-pink), .8); }
.uf-btn.on .uf-dot { display: block; }
.uf-pop { min-width: 200px; padding: 6px; }
.uf-head { padding: 6px 10px 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.uf-it { display: flex; align-items: center; gap: 10px; width: 100%; }
.uf-it .uf-l { flex: 1; text-align: left; }
.uf-it small { min-width: 22px; padding: 1px 7px; border-radius: 10px; background: rgba(var(--c-ink), .07); color: var(--text-3); font-size: 11.5px; font-weight: 800; text-align: center; }
.uf-it.on { background: rgba(var(--c-acc), .14); color: var(--text); }
.uf-it .uf-ok { width: 16px; height: 16px; flex: none; color: rgb(var(--c-acc-l)); }
.uf-g { width: 18px; height: 18px; flex: none; display: grid; place-items: center; }
.uf-g::before { content: ''; width: 10px; height: 10px; border-radius: 50%; }
.uf-g-M::before { background: var(--male); }
.uf-g-F::before { background: var(--female); }

/* icone dei ruoli accanto al nome (xd-84), colori come nel disegno: corona oro, scudo viola, team azzurro, cuffie verdi, omino blu, ospite bianco */
.rk { --rk: #4da3ff; display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; vertical-align: middle; color: var(--rk); filter: drop-shadow(0 0 3px color-mix(in srgb, var(--rk) 70%, transparent)); }
.rk svg { width: 18px; height: 18px; stroke-width: 2; }
.rk .ic-fill { fill: currentColor; stroke-width: 1; }
.rk-super { --rk: #ffc83d; }
.rk-super svg { fill: color-mix(in srgb, #ffc83d 22%, transparent); }
.rk-owner { --rk: #c77dff; }
.rk-admin { --rk: #ff9f43; }
.rk-mod { --rk: #38c6ff; }
.rk-dj { --rk: #2ee66b; }
.rk-user { --rk: #4da3ff; }
.rk-guest { --rk: #e8e6f2; }
.msg .meta .rk { margin-left: 2px; }
.user-row .lt b .rk { margin-left: 4px; width: 18px; height: 18px; }
.user-row .lt b .rk svg { width: 16px; height: 16px; }
.cr-meta .rk { width: 16px; height: 16px; }
.cr-meta .rk svg { width: 14px; height: 14px; }

/* icone dei ruoli anche nel pannello staff e nei profili (xd-85) */
.owner-hero .rk { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--rk); box-shadow: 0 0 12px color-mix(in srgb, var(--rk) 45%, transparent), inset 0 0 10px color-mix(in srgb, var(--rk) 25%, transparent); }
.owner-hero .rk svg { width: 24px; height: 24px; }
.staff-chip .rk { width: 16px; height: 16px; }
.staff-chip .rk svg { width: 14px; height: 14px; }
@media (max-width: 600px) { .staff-chip .rk { display: none; } }
h1 .rk, h3 .rk { width: 1em; height: 1em; }
h1 .rk svg, h3 .rk svg { width: .9em; height: .9em; }

/* foto nel rullo e nella lista utenti: anello al neon con i colori del tema (xd-86) */
.msg .avatar, .user-row .avatar {
  --ring: conic-gradient(from 210deg, rgb(var(--c-cyan)), rgb(var(--c-acc)), rgb(var(--c-pink)), rgb(var(--c-cyan)));
  --fill: linear-gradient(135deg, rgb(var(--c-acc-dd)), rgb(var(--c-acc)));
  border: 2px solid transparent; padding: 0;
  background: var(--fill) padding-box, var(--ring) border-box;
  box-shadow: 0 0 8px rgba(var(--c-acc), .55), 0 0 14px rgba(var(--c-pink), .22);
}
.msg .avatar.M, .user-row .avatar.M { --fill: linear-gradient(135deg, #2c7df0, #5ab0ff); }
.msg .avatar.F, .user-row .avatar.F { --fill: linear-gradient(135deg, #e0458c, #ff8fc0); }
.msg .avatar.A, .user-row .avatar.A { --fill: linear-gradient(135deg, #7b5cff, #c3a8ff); }
.msg .avatar img, .user-row .avatar img { border-radius: 50%; }
.msg .avatar, .user-row .avatar { font-size: calc(var(--s) * .36); }

/* rullo fluido (xd-89): il messaggio nuovo entra con una dissolvenza dal basso */
.msg.live-in { animation: live-in .24s ease-out; }
@keyframes live-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .msg.live-in { animation: none; } }

/* conferma email con il link (xd-92): puntino che pulsa mentre si aspetta */
.vw-status { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 6px 0 2px; padding: 12px; border-radius: 14px; background: rgba(var(--c-acc), .1); border: 1px solid rgba(var(--c-acc), .3); font-size: 14px; font-weight: 700; color: var(--text); }
.vw-dot { width: 10px; height: 10px; border-radius: 50%; background: rgb(var(--c-cyan)); box-shadow: 0 0 10px rgb(var(--c-cyan)); animation: vw-pulse 1.4s ease-in-out infinite; }
@keyframes vw-pulse { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }

/* scritta HeyChatty (xd-96): onda luminosa sotto il nome, come nel disegno; visibile anche sul telefono */
.wordmark { position: relative; display: inline-block; padding-bottom: 5px; }
.wordmark::after {
  content: ''; position: absolute; left: 20%; width: 64%; bottom: -3px; height: 8px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%237c3aed' stop-opacity='.15'/%3E%3Cstop offset='.35' stop-color='%23a855ff'/%3E%3Cstop offset='.8' stop-color='%23e04bff'/%3E%3Cstop offset='1' stop-color='%23ff5fc0' stop-opacity='.2'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M1 6.2 C 22 7.4 45 3.2 99 2' fill='none' stroke='url(%23g)' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  filter: drop-shadow(0 0 3px rgba(190, 80, 255, .85));
}
@media (max-width: 900px) {
  .topbar .wordmark { display: inline-block; font-size: 18px; }
  .topbar .brand { gap: 8px; }
}
@media (max-width: 360px) { .topbar .wordmark { font-size: 16px; } }

/* Turnstile (xd-97): di solito vuoto; compare solo quando Cloudflare chiede un tocco */
.ts-box:not(:empty) { margin: 8px 0 12px; display: flex; justify-content: center; }

/* lista utenti: cam accesa (xd-100). Pubblica = telecamera verde; su richiesta = telecamera arancio con lucchetto nell'angolo */
.user-row .cam-ic { position: relative; width: 32px; height: 32px; border-radius: 10px; border: 1px solid rgba(46, 229, 157, .5); background: rgba(46, 229, 157, .1); box-shadow: 0 0 10px rgba(46, 229, 157, .25); cursor: pointer; }
.user-row .cam-ic svg { width: 17px; height: 17px; }
.user-row .cam-ic.priv { color: #ffb547; border-color: rgba(255, 181, 71, .55); background: rgba(255, 181, 71, .1); box-shadow: 0 0 10px rgba(255, 181, 71, .25); }
.user-row .cam-ic.priv:hover { background: rgba(255, 181, 71, .2); }
.user-row .cam-lock { position: absolute; top: -5px; right: -5px; width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; background: #ffb547; color: #2a1800; box-shadow: 0 0 0 2px var(--panel-solid); }
.user-row .cam-ic .cam-lock svg { width: 9px; height: 9px; stroke-width: 2.6; }
