/* Artis Messenger — tema «2006»: vetro azzurro, finestre lucide, Tahoma. */
:root {
  --font: Tahoma, "Segoe UI", Verdana, "DejaVu Sans", sans-serif;
  --title-font: "Trebuchet MS", Tahoma, Verdana, sans-serif;
  --ink: #000;
  --muted: #6d6d6d;
  --link: #0033cc;
  --navy: #1b3a73;
  --edge: #7f9db9;
  --panel-top: #f3f8ff;
  --panel-bot: #d5e5fa;
  --hover-1: #f2f8ff;
  --hover-2: #d9eafe;
  --hover-edge: #8db2e3;
  --sel-1: #dcebfd;
  --sel-2: #c1dcfc;
  --sel-edge: #7da2ce;
  --title-1: #0997ff; --title-2: #0053ee; --title-3: #0050ee; --title-4: #0066ff; --title-5: #003dd7;
  --scene-1: #bfe0ff; --scene-2: #ffffff; --scene-accent: #2a6fd6;
}
html[data-scene="verde"] { --scene-1: #c7f2b6; --scene-accent: #2f9a1f; }
html[data-scene="rosa"] { --scene-1: #ffd1e6; --scene-accent: #d0408a; }
html[data-scene="arancio"] { --scene-1: #ffe0b8; --scene-accent: #e07a10; }
html[data-scene="viola"] { --scene-1: #e2d4ff; --scene-accent: #6a3fd0; }
html[data-scene="grafite"] { --scene-1: #d6dbe3; --scene-accent: #44546e; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 12px/1.35 var(--font);
  color: var(--ink);
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  /* scrivania originale: cielo azzurro con aurora morbida */
  background:
    radial-gradient(1200px 500px at 15% 110%, rgba(140, 220, 120, .55), transparent 60%),
    radial-gradient(900px 420px at 85% 105%, rgba(90, 190, 255, .55), transparent 60%),
    radial-gradient(1400px 600px at 50% -20%, #ffffff 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, #2f7fe0 0%, #64aef5 38%, #a9d7ff 70%, #dff2ff 100%);
}
body::before { /* scie di luce stile 2006 */
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 18% at 30% 72%, rgba(255, 255, 255, .45), transparent 70%),
    radial-gradient(50% 12% at 70% 64%, rgba(255, 255, 255, .35), transparent 70%);
  transform: rotate(-6deg);
}
input, textarea, select, button { font: inherit; color: inherit; }
a { color: var(--link); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
img { -webkit-user-drag: none; }

/* ---------- finestre ---------- */
#desk { position: fixed; inset: 0 0 30px 0; }
.win {
  position: absolute;
  display: flex; flex-direction: column;
  min-width: 260px; min-height: 200px;
  background: #ece9d8;
  border: 1px solid #0831d9;
  border-top: 0;
  border-radius: 8px 8px 3px 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .08), 4px 6px 18px rgba(0, 20, 80, .45);
  overflow: hidden;
}
.win.inactive { border-color: #6b8fd8; }
.win.inactive .titlebar { filter: saturate(.55) brightness(1.12); }
.titlebar {
  height: 29px; flex: none;
  display: flex; align-items: center; gap: 6px;
  padding: 0 4px 0 7px;
  color: #fff;
  font: bold 13px var(--title-font);
  text-shadow: 1px 1px 0 #0f1089;
  background: linear-gradient(180deg,
    var(--title-1) 0%, var(--title-2) 8%, var(--title-3) 40%, var(--title-4) 88%,
    var(--title-4) 93%, #005bff 95%, var(--title-5) 96%, var(--title-5) 100%);
  border-radius: 7px 7px 0 0;
  cursor: default;
}
.titlebar .ticon { width: 16px; height: 16px; flex: none; }
.titlebar .ttext { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbtn {
  width: 21px; height: 21px; flex: none;
  border: 1px solid #fff; border-radius: 3px;
  background: linear-gradient(180deg, #4d8cff 0%, #1f5fe8 45%, #0d4ad6 55%, #3b7bff 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
  display: grid; place-items: center; padding: 0; cursor: pointer;
}
.tbtn:hover { filter: brightness(1.15); }
.tbtn:active { filter: brightness(.9); }
.tbtn svg { width: 11px; height: 11px; }
.tbtn.close { background: linear-gradient(180deg, #f39b7a 0%, #e0562d 40%, #c8381b 60%, #e46a3e 100%); }
.winbody { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.resize { position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; cursor: nwse-resize; z-index: 3;
  background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,.18) 50%, transparent 58%, rgba(0,0,0,.18) 58%, transparent 66%, rgba(0,0,0,.18) 66%, transparent 74%); }
.win.max { inset: 0 !important; width: auto !important; height: auto !important; border-radius: 0; }
.win.shake { animation: shake .5s linear 2; }
@keyframes shake {
  0%, 100% { translate: 0 0; } 10% { translate: -9px 3px; } 20% { translate: 8px -4px; } 30% { translate: -10px -2px; }
  40% { translate: 9px 4px; } 50% { translate: -7px 2px; } 60% { translate: 8px -3px; } 70% { translate: -6px 4px; }
  80% { translate: 6px -2px; } 90% { translate: -4px 1px; }
}

/* ---------- pannello azzurro (corpo stile Messenger) ---------- */
.mpanel {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--scene-1) 0%, var(--scene-2) 150px, #fff 100%);
}
.menubar { display: flex; gap: 0; padding: 1px 2px; background: linear-gradient(#fbfdff, #e9f1fc); border-bottom: 1px solid #c5d6ee; }
.menubar button { border: 1px solid transparent; background: none; padding: 2px 7px; cursor: pointer; border-radius: 2px; }
.menubar button:hover { border-color: var(--hover-edge); background: linear-gradient(var(--hover-1), var(--hover-2)); }

/* ---------- immagine personale con cornice di stato ---------- */
.dp {
  position: relative; flex: none;
  width: 56px; height: 56px; padding: 4px;
  border-radius: 7px;
  background: linear-gradient(180deg, #f6f6f6, #cfcfcf);
  border: 1px solid #8f8f8f;
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(0,0,0,.25);
}
.dp img { width: 100%; height: 100%; border-radius: 3px; display: block; border: 1px solid rgba(0,0,0,.35); object-fit: cover; background: #fff; }
.dp::after { content: ""; position: absolute; inset: 1px; border-radius: 6px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 45%); }
.dp.on { background: linear-gradient(180deg, #d8ffb8 0%, #63d93a 45%, #2e9e12 55%, #7be34f 100%); border-color: #2b7d12; }
.dp.away { background: linear-gradient(180deg, #fff1b8 0%, #ffc531 45%, #e08a00 55%, #ffd45c 100%); border-color: #b86f00; }
.dp.busy { background: linear-gradient(180deg, #ffd0c0 0%, #ff5a36 45%, #c8240c 55%, #ff7d58 100%); border-color: #9a1a08; }
.dp.off { background: linear-gradient(180deg, #fafafa 0%, #d2d2d2 45%, #a9a9a9 55%, #dcdcdc 100%); border-color: #7d7d7d; }
.dp.big { width: 104px; height: 104px; padding: 5px; border-radius: 9px; }
.dp.huge { width: 120px; height: 120px; padding: 6px; border-radius: 10px; }
.dp.small { width: 36px; height: 36px; padding: 3px; border-radius: 5px; }

/* ---------- campi e bottoni 2006 ---------- */
.field {
  border: 1px solid var(--edge); background: #fff; padding: 3px 5px; border-radius: 2px;
  outline: none; width: 100%;
}
.field:focus { border-color: #3d7bd9; box-shadow: 0 0 0 1px #a8c8f5; }
.btn {
  min-width: 75px; padding: 4px 12px;
  border: 1px solid #003c74; border-radius: 3px;
  background: linear-gradient(180deg, #fff 0%, #f4f4f0 50%, #e6e5dd 51%, #d6d4c8 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7);
  cursor: pointer;
}
.btn:hover { box-shadow: inset 0 0 0 2px #f8b636; }
.btn:active { background: linear-gradient(180deg, #e3e2da, #f2f1ea); }
.btn:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.btn.primary { box-shadow: inset 0 0 0 2px #96b8ef; font-weight: bold; }
.btn.glossy {
  border-radius: 14px; min-width: 110px; padding: 5px 18px; color: #fff; font-weight: bold;
  text-shadow: 0 1px 1px rgba(0,0,40,.6);
  border: 1px solid #1d4a96;
  background: linear-gradient(180deg, #9fd2ff 0%, #4ba2f5 48%, #1c74e2 52%, #57b0ff 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 1px 2px rgba(0,0,0,.3);
}
.btn.glossy.green { border-color: #1d6a0c; background: linear-gradient(180deg, #c6ff9a 0%, #5fd23c 48%, #2fa514 52%, #6be34a 100%); }
.btn.glossy:hover { filter: brightness(1.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 0 6px rgba(80,170,255,.9); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.check { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.check input { margin: 0; }
.tool {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid transparent; border-radius: 3px; background: none; padding: 2px 4px; cursor: pointer;
}
.tool:hover { border-color: var(--hover-edge); background: linear-gradient(var(--hover-1), var(--hover-2)); }
.tool:active, .tool.on { border-color: var(--sel-edge); background: linear-gradient(var(--sel-2), var(--sel-1)); }
.tool img, .tool svg { display: block; }
.sep { width: 1px; align-self: stretch; margin: 2px 3px; background: linear-gradient(transparent, #9db7dd, transparent); }

/* ---------- finestra di accesso ---------- */
.login { align-items: center; padding: 14px 22px 10px; gap: 7px; text-align: left; overflow: auto; }
.brand { display: flex; align-items: center; gap: 8px; align-self: stretch; margin-bottom: 4px; }
.brand .word { font: bold 22px var(--title-font); color: #1c4ea8; letter-spacing: -.3px; text-shadow: 0 1px 0 #fff; }
.brand .word b { color: #2f9a1f; }
.brand .by { font-size: 10px; color: #4a6fa8; margin-left: auto; text-align: right; line-height: 1.2; }
.login .dp { margin: 4px 0 6px; }
.login label.cap { align-self: stretch; color: #1b3a73; margin-top: 3px; }
.login .row { align-self: stretch; display: flex; gap: 6px; align-items: center; }
.login .status-pick { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border: 1px solid transparent; border-radius: 3px; cursor: pointer; background: none; color: var(--link); }
.login .status-pick:hover { border-color: var(--hover-edge); background: linear-gradient(var(--hover-1), var(--hover-2)); }
.login .checks { align-self: stretch; display: flex; flex-direction: column; gap: 3px; margin: 3px 0 4px; }
.login .links { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-top: 6px; }
.login .foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 6px; color: #4a6fa8; font-size: 11px; align-self: stretch; justify-content: center; }
.login .err { color: #c00; align-self: stretch; text-align: center; min-height: 15px; }
.signing { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 18px; }
.spin { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- elenco contatti ---------- */
.mehead { display: flex; gap: 8px; padding: 8px 8px 6px; align-items: flex-start;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.9), rgba(255,255,255,0) 60%), radial-gradient(60% 50% at 0% 100%, rgba(255,255,255,.35), transparent 70%); }
.mehead .info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.nickbtn { display: flex; align-items: center; gap: 4px; max-width: 100%; border: 1px solid transparent; border-radius: 3px; background: none; padding: 1px 4px; cursor: pointer; text-align: left; }
.nickbtn:hover { border-color: var(--hover-edge); background: linear-gradient(var(--hover-1), var(--hover-2)); }
.nickbtn .n { font-weight: bold; font-size: 13px; color: #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nickbtn .s { color: #444; white-space: nowrap; }
.psm { border: 1px solid transparent; background: none; padding: 1px 4px; width: 100%; color: #444; border-radius: 2px; outline: none; }
.psm:hover { border-color: #c7d6ea; background: rgba(255,255,255,.6); }
.psm:focus { border-color: var(--edge); background: #fff; }
.psm::placeholder { color: #7a8aa3; }
.nowplay { display: flex; align-items: center; gap: 3px; color: #555; font-size: 11px; padding-left: 4px; }
.toolsrow { display: flex; align-items: center; gap: 2px; padding: 2px 6px; border-top: 1px solid rgba(125, 162, 206, .45); border-bottom: 1px solid rgba(125, 162, 206, .45); background: linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.15)); }
.search { display: flex; align-items: center; gap: 4px; padding: 5px 8px; }
.searchbox { flex: 1; display: flex; align-items: center; border: 1px solid #a5bfdf; border-radius: 10px; background: #fff; padding: 1px 6px; box-shadow: inset 0 1px 2px rgba(0,0,0,.12); }
.searchbox input { border: 0; outline: none; flex: 1; padding: 2px 3px; background: transparent; min-width: 0; }
.list { flex: 1; overflow: auto; padding: 2px 4px 8px; background: #fff; border-top: 1px solid #c5d6ee; }
.grp { display: flex; align-items: center; gap: 4px; margin-top: 4px; padding: 2px 4px; color: var(--navy); font-weight: bold; cursor: pointer; border: 1px solid transparent; border-radius: 3px; }
.grp:hover { border-color: var(--hover-edge); background: linear-gradient(var(--hover-1), var(--hover-2)); }
.grp .tri { width: 9px; height: 9px; transition: transform .1s; }
.grp.collapsed .tri { transform: rotate(-90deg); }
.grp .cnt { font-weight: normal; color: #4b6a9b; }
.crow { display: flex; align-items: center; gap: 5px; padding: 1px 4px 1px 16px; min-height: 21px; border: 1px solid transparent; border-radius: 3px; cursor: default; white-space: nowrap; }
.crow:hover { border-color: var(--hover-edge); background: linear-gradient(var(--hover-1), var(--hover-2)); }
.crow.sel { border-color: var(--sel-edge); background: linear-gradient(var(--sel-1), var(--sel-2)); }
.crow .orb { width: 14px; height: 14px; flex: none; }
.crow .cn { overflow: hidden; text-overflow: ellipsis; flex: none; max-width: 62%; }
.crow .cp { color: #7b7b7b; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.crow.offline .cn { color: #6d6d6d; }
.crow .flag { width: 14px; height: 14px; flex: none; }
.crow.big { min-height: 44px; padding-left: 12px; }
.crow.big .mini { width: 34px; height: 34px; padding: 2px; border-radius: 5px; }
.emo { width: 19px; height: 19px; vertical-align: -5px; margin: 0 1px; }
.emo.s { width: 15px; height: 15px; vertical-align: -3px; }
.banner { margin: 6px; border: 1px solid #9db7dd; border-radius: 4px; padding: 6px 8px; display: flex; gap: 8px; align-items: center; cursor: pointer;
  background: linear-gradient(135deg, #ffffff, #e9f3ff 55%, #d0e6ff); box-shadow: inset 0 1px 0 #fff; }
.banner .t { font-weight: bold; color: #1c4ea8; }
.banner .d { color: #555; font-size: 11px; }
.empty { text-align: center; color: #666; padding: 24px 12px; }

/* ---------- menu a tendina ---------- */
.menu {
  position: fixed; z-index: 9000; min-width: 170px; padding: 2px;
  background: #fff; border: 1px solid #8a8a8a; box-shadow: 3px 3px 4px rgba(0,0,0,.3);
}
.menu .mi { display: flex; align-items: center; gap: 8px; padding: 3px 22px 3px 6px; cursor: pointer; white-space: nowrap; }
.menu .mi:hover { background: #316ac5; color: #fff; }
.menu .mi .ic { width: 16px; height: 16px; display: grid; place-items: center; flex: none; }
.menu .mi.dis { color: #999; pointer-events: none; }
.menu .msep { height: 1px; margin: 3px 2px; background: #c5c5c5; }
.menu .mi.chk::after { content: "✓"; position: absolute; right: 8px; }
.menu .mi { position: relative; }

/* ---------- conversazione ---------- */
.chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat .bigbar { display: flex; align-items: flex-end; gap: 1px; padding: 3px 6px 2px; background: linear-gradient(180deg, #fbfdff 0%, #e2eefc 60%, #cfe2fa 100%); border-bottom: 1px solid #a9c3e6; }
.bigtool { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 2px 5px 1px; min-width: 50px; border: 1px solid transparent; border-radius: 3px; background: none; cursor: pointer; font-size: 11px; color: #1b3a73; }
.bigtool:hover { border-color: var(--hover-edge); background: linear-gradient(var(--hover-1), var(--hover-2)); }
.bigtool:active { background: linear-gradient(var(--sel-2), var(--sel-1)); }
.chat .tohead { padding: 5px 8px 4px; display: flex; flex-direction: column; gap: 1px; background: linear-gradient(var(--scene-1), rgba(255,255,255,.6)); border-bottom: 1px solid #c5d6ee; }
.chat .tohead .to { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat .tohead .to b { font-size: 13px; }
.chat .tohead .p { color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat .secure { display: inline-flex; align-items: center; gap: 3px; color: #1d7a0c; font-size: 11px; }
.chat .main { flex: 1; min-height: 0; display: flex; gap: 8px; padding: 8px; background: linear-gradient(180deg, var(--scene-2), var(--scene-1) 260%); }
.chat .left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.chat .right { width: 116px; flex: none; display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 8px; }
.chat .right .lbl { font-size: 11px; color: #555; text-align: center; max-width: 116px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.histbox { flex: 1; min-height: 60px; overflow: auto; background: #fff; border: 1px solid var(--edge); border-radius: 3px; padding: 6px 8px; user-select: text; box-shadow: inset 0 1px 2px rgba(0,0,0,.08); }
.msg { margin: 0 0 6px; }
.msg .who { color: #555; }
.msg .txt { padding-left: 12px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg .txt + .txt { margin-top: 2px; }
.msg .ts { color: #999; font-size: 10px; margin-left: 4px; }
.sys { color: #5a5a5a; margin: 6px 0; display: flex; gap: 6px; align-items: flex-start; }
.sys img { flex: none; margin-top: 1px; }
.sys.line { border-top: 1px solid #d6dfec; border-bottom: 1px solid #d6dfec; padding: 4px 0; color: #1b3a73; font-weight: bold; }
.sys.warn { color: #9a4a00; }
.sys .acts { display: flex; gap: 8px; margin-top: 3px; }
.inkimg { max-width: 100%; border: 1px solid #ddd; border-radius: 3px; background: #fff; margin-left: 12px; }
.filecard { margin: 4px 0 6px 12px; padding: 6px 8px; border: 1px solid #b8cbe6; border-radius: 4px; background: linear-gradient(#fbfdff, #e9f2fd); display: flex; gap: 8px; align-items: center; }
.filecard .bar { height: 8px; border: 1px solid #7f9db9; border-radius: 2px; background: #fff; overflow: hidden; margin-top: 3px; }
.filecard .bar i { display: block; height: 100%; background: linear-gradient(#a8f08a, #3fbf1a); width: 0; }
.fmtbar { display: flex; align-items: center; gap: 1px; padding: 1px 2px; }
.inputrow { display: flex; gap: 6px; height: 74px; flex: none; }
.inputrow textarea, .inputrow .inkpad {
  flex: 1; resize: none; border: 1px solid var(--edge); border-radius: 3px; padding: 4px 6px; outline: none; background: #fff;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.08); user-select: text;
}
.inputrow textarea:focus { border-color: #3d7bd9; }
.inputrow .inkpad { padding: 0; cursor: crosshair; touch-action: none; }
.sendcol { display: flex; flex-direction: column; gap: 4px; width: 64px; }
.sendcol .btn { min-width: 0; padding: 4px 4px; }
.sendcol .btn.send { flex: 1; font-weight: bold; }
.modetabs { display: flex; gap: 2px; }
.modetabs button { border: 1px solid #a9c3e6; border-top: 0; border-radius: 0 0 3px 3px; background: linear-gradient(#e3eefc, #fff); padding: 1px 4px; cursor: pointer; }
.modetabs button.on { background: #fff; border-color: var(--edge); }
.statusbar { flex: none; padding: 3px 8px; font-size: 11px; color: #555; border-top: 1px solid #c5d6ee; background: linear-gradient(#f5f9ff, #e0ebfa); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 19px; }
.statusbar.typing { color: #1b3a73; }

/* finestra della chiamata dentro la conversazione */
.callpane { display: flex; gap: 8px; align-items: stretch; background: #10213f; border-radius: 4px; padding: 6px; color: #fff; }
.callpane video { background: #000; border-radius: 3px; width: 100%; height: 100%; object-fit: cover; }
.callpane .remote { flex: 1; min-height: 120px; position: relative; }
.callpane .local { position: absolute; right: 6px; bottom: 6px; width: 30%; max-width: 120px; aspect-ratio: 4/3; border: 1px solid #fff; border-radius: 3px; overflow: hidden; }
.callpane .ctl { display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.callpane .ctl .tool { color: #fff; }

/* ---------- emoticon / animazioni (selettori) ---------- */
.picker { position: fixed; z-index: 9000; background: #fff; border: 1px solid #7f9db9; box-shadow: 3px 3px 6px rgba(0,0,0,.3); padding: 4px; border-radius: 2px; }
.picker .grid { display: grid; grid-template-columns: repeat(8, 26px); gap: 2px; }
.picker .grid button { width: 26px; height: 26px; border: 1px solid transparent; background: none; padding: 1px; border-radius: 2px; cursor: pointer; }
.picker .grid button:hover { border-color: #316ac5; background: #e3edfc; }
.picker .foot { border-top: 1px solid #ddd; margin-top: 4px; padding-top: 3px; font-size: 11px; color: #555; min-height: 16px; }
.winks { display: grid; grid-template-columns: repeat(3, 84px); gap: 4px; }
.winks button { height: 64px; border: 1px solid #c5d6ee; border-radius: 4px; background: linear-gradient(#fff, #eef4fd); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; }
.winks button:hover { border-color: #316ac5; }

/* animazioni a tutta finestra */
.anim-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 20; }
.anim-layer .p { position: absolute; will-change: transform, opacity; }
@keyframes rise { from { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(calc(var(--rise, 500px) * -1)) scale(1.2) rotate(20deg); opacity: 0; } }
@keyframes fall { from { transform: translateY(-20%) rotate(0); opacity: 0; } 10% { opacity: 1; } to { transform: translateY(120vh) rotate(360deg); opacity: .8; } }
@keyframes pop { 0% { transform: scale(.2); opacity: 0; } 30% { transform: scale(1.25); opacity: 1; } 55% { transform: scale(1); } 85% { opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes burst { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.3); opacity: 0; } }

/* ---------- avvisi (toast) ---------- */
#toasts { position: fixed; right: 10px; bottom: 40px; z-index: 9500; display: flex; flex-direction: column-reverse; gap: 8px; }
.toast {
  width: 240px; border: 1px solid #3c6fc2; border-radius: 5px; overflow: hidden; cursor: pointer;
  background: linear-gradient(180deg, #ffffff 0%, #e8f2ff 60%, #cfe2fc 100%);
  box-shadow: 2px 3px 10px rgba(0, 20, 80, .45);
  animation: slideup .35s ease-out;
}
.toast .th { display: flex; align-items: center; gap: 5px; padding: 3px 6px; color: #fff; font: bold 11px var(--title-font);
  background: linear-gradient(180deg, #5aa2ff, #1f62d9); text-shadow: 1px 1px 0 #0f2f89; }
.toast .th .x { margin-left: auto; opacity: .85; }
.toast .tb { display: flex; gap: 8px; padding: 8px; align-items: center; min-height: 64px; }
.toast .tb .t { font-size: 12px; }
.toast .tb .t b { display: block; }
@keyframes slideup { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- barra delle finestre ---------- */
#taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 30px; z-index: 8000;
  display: flex; align-items: center; gap: 3px; padding: 0 6px;
  background: linear-gradient(180deg, #3a80f5 0%, #245edb 9%, #2257d5 50%, #1f4fc7 90%, #1941a5 100%);
  border-top: 1px solid #0b2f8a;
}
#taskbar .tlogo { display: flex; align-items: center; gap: 5px; padding: 0 12px 0 6px; height: 26px; border-radius: 0 10px 10px 0; color: #fff; font: bold italic 13px var(--title-font); text-shadow: 1px 1px 1px #0b3a0b;
  background: linear-gradient(180deg, #5fd23c 0%, #3aa81e 45%, #2f9a14 55%, #4ec42c 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.5); margin-right: 6px; cursor: pointer; }
#taskbar .tw { height: 23px; max-width: 170px; min-width: 110px; display: flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 3px; color: #fff; cursor: pointer; overflow: hidden;
  background: linear-gradient(180deg, #5c9bff, #3b78ec 40%, #2d68df); border: 1px solid #1b3fa0; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); white-space: nowrap; text-overflow: ellipsis; }
#taskbar .tw.act { background: linear-gradient(180deg, #1e4fbf, #2a5fd2); box-shadow: inset 1px 1px 2px rgba(0,0,0,.4); }
#taskbar .tw.flash { animation: flash 1s steps(1) infinite; }
@keyframes flash { 50% { background: linear-gradient(180deg, #ffd27a, #ffa61f); color: #3a2000; } }
#taskbar .tray { margin-left: auto; display: flex; align-items: center; gap: 6px; height: 100%; padding: 0 10px; color: #fff; font-size: 11px;
  background: linear-gradient(180deg, #1ca2f4, #128be6 40%, #0f7fd8); border-left: 1px solid #0b4fa8; box-shadow: inset 1px 0 0 #4ec0ff; }

/* ---------- finestre di dialogo ---------- */
.dlg { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: #ece9d8; flex: 1; overflow: auto; }
.dlg.blue { background: linear-gradient(180deg, var(--scene-1), #fff 200px); }
.dlg h3 { margin: 0 0 2px; font-size: 13px; color: var(--navy); }
.dlg .acts { display: flex; justify-content: flex-end; gap: 6px; margin-top: auto; padding-top: 6px; }
.dlg .dpgrid { display: grid; grid-template-columns: repeat(4, 64px); gap: 6px; }
.dlg .dpgrid button { padding: 3px; border: 2px solid transparent; border-radius: 4px; background: #fff; cursor: pointer; }
.dlg .dpgrid button.on { border-color: #316ac5; }
.dlg .dpgrid img { width: 54px; height: 54px; display: block; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid #919b9c; }
.tabs button { border: 1px solid #919b9c; border-bottom: 0; border-radius: 3px 3px 0 0; padding: 3px 10px; background: linear-gradient(#fff, #ecebe5); cursor: pointer; margin-bottom: -1px; }
.tabs button.on { background: #fcfcfe; border-top: 2px solid #ffc83c; padding-top: 2px; }
.tabpage { background: #fcfcfe; border: 1px solid #919b9c; border-top: 0; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 220px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 10px; align-items: center; }
.safety { white-space: pre-line; font: 13px/1.6 "Lucida Console", "Courier New", monospace; letter-spacing: 1px; background: #fff; border: 1px solid #c5d6ee; border-radius: 3px; padding: 6px 10px; user-select: text; }
.devrow { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border: 1px solid #d6dfec; border-radius: 3px; background: #fff; }
.devrow .grow { flex: 1; }
.badge { display: inline-block; padding: 0 5px; border-radius: 7px; font-size: 10px; background: #e3f6dc; color: #1d6a0c; border: 1px solid #9fd38a; }

/* ---------- tris (attività) ---------- */
.tris { display: grid; grid-template-columns: repeat(3, 44px); gap: 3px; margin: 6px 0 6px 12px; }
.tris button { width: 44px; height: 44px; border: 1px solid #9db7dd; border-radius: 4px; background: linear-gradient(#fff, #eaf2fd); font: bold 24px var(--title-font); cursor: pointer; }
.tris button.x { color: #1c74e2; } .tris button.o { color: #e0562d; }

/* ---------- telefono e finestre strette ---------- */
@media (max-width: 760px) and (hover: none), (max-width: 500px) {
  html:not(.no-mobile) body { background: #2f7fe0; }
  html:not(.no-mobile) #desk { inset: 0; }
  html:not(.no-mobile) #taskbar, html:not(.no-mobile) #toasts { display: none; }
  html:not(.no-mobile) .win { inset: 0 !important; width: auto !important; height: auto !important; min-width: 0 !important; min-height: 0 !important; border-radius: 0; border: 0; box-shadow: none; padding-top: env(safe-area-inset-top); background: #2f7fe0; }
  html:not(.no-mobile) .win .winbody { background: #ece9d8; padding-bottom: env(safe-area-inset-bottom); }
  html:not(.no-mobile) .titlebar { border-radius: 0; height: 40px; font-size: 15px; }
  html:not(.no-mobile) .tbtn { width: 30px; height: 30px; }
  html:not(.no-mobile) .tbtn.min, html:not(.no-mobile) .tbtn.max, html:not(.no-mobile) .resize, html:not(.no-mobile) .win[data-kind="main"] .tbtn.close { display: none; }
  html:not(.no-mobile) .crow { min-height: 34px; font-size: 14px; }
  html:not(.no-mobile) .grp { font-size: 14px; padding: 5px 4px; }
  html:not(.no-mobile) .chat .right { display: none; }
  html:not(.no-mobile) .chat .bigbar { overflow-x: auto; }
  html:not(.no-mobile) .bigtool { min-width: 58px; }
  html:not(.no-mobile) .inputrow { height: 64px; }
  html:not(.no-mobile) .inputrow textarea { font-size: 16px; }
  html:not(.no-mobile) .field { font-size: 16px; padding: 6px 7px; }
  html:not(.no-mobile) #mtoast { display: block; }
}
#mtoast { display: none; position: fixed; top: calc(env(safe-area-inset-top) + 6px); left: 6px; right: 6px; z-index: 9600; }
#mtoast .toast { width: auto; }

/* ======================================================================
   Modalità di disposizione
   ====================================================================== */
#dock-left, #dock-right { display: none; }

@media (min-width: 761px), (hover: hover) and (min-width: 501px) {
  /* --- pagina pulita (web): elenco a sinistra, conversazioni a schede --- */
  body.mode-docked { background: linear-gradient(180deg, #e9f1fb 0%, #d4e3f5 100%); }
  body.mode-docked::before { display: none; }
  body.mode-docked #taskbar { display: none; }
  body.mode-docked #desk { inset: 0; display: flex; gap: 12px; padding: 12px; }
  body.mode-docked #toasts { bottom: 12px; }
  body.mode-docked #dock-left { display: block; width: 340px; flex: none; position: relative; }
  body.mode-docked #dock-right { display: flex; flex-direction: column; flex: 1; min-width: 0; position: relative; }
  .win.where-dockleft { position: absolute; inset: 0; min-width: 0; }
  #dock-tabs { display: flex; gap: 3px; padding: 0 6px; align-items: flex-end; min-height: 0; flex: none; }
  #dock-right.has-tabs #dock-tabs { min-height: 30px; }
  .dtab {
    display: flex; align-items: center; gap: 6px; max-width: 210px; min-width: 120px; height: 27px; padding: 0 8px;
    border: 1px solid #0831d9; border-bottom: 0; border-radius: 7px 7px 0 0; cursor: pointer; color: #fff;
    font: bold 12px var(--title-font); text-shadow: 1px 1px 0 #0f1089;
    background: linear-gradient(180deg, #7aa9f2 0%, #4d7fdc 50%, #3f72d2 100%); opacity: .82;
  }
  .dtab .tl { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dtab .x { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 3px; font: bold 13px/1 var(--font); }
  .dtab .x:hover { background: #e0562d; }
  .dtab.cur { opacity: 1; height: 29px; background: linear-gradient(180deg, var(--title-1) 0%, var(--title-2) 12%, var(--title-3) 45%, var(--title-4) 100%); }
  .dtab.flash { animation: flash 1s steps(1) infinite; }
  #dock-panes { position: relative; flex: 1; min-height: 0; }
  #dock-right:not(.has-tabs) #dock-panes { display: none; }
  #dock-right.has-tabs #dock-empty { display: none; }
  .win.where-tab { position: absolute; inset: 0; display: none; border-top: 1px solid #0831d9; border-radius: 0 6px 3px 3px; min-width: 0; min-height: 0; }
  .win.where-tab.cur { display: flex; }
  .win.where-tab > .titlebar { display: none; }
  #dock-empty { flex: 1; display: grid; place-items: center; border: 1px solid #b9cde8; border-radius: 8px;
    background: radial-gradient(80% 60% at 50% 30%, #ffffff, rgba(255,255,255,.35)); color: #1b3a73; text-align: center; }
  #dock-empty .wel { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 460px; padding: 20px; }
  #dock-empty .wel h2 { margin: 0; font: bold 24px var(--title-font); color: #1c4ea8; }
  #dock-empty .wel h2 b { color: #2f9a1f; }
  #dock-empty .wel .dl { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

}
/* --- app per computer: la finestra principale riempie la finestra vera (anche stretta) --- */
body.mode-native { background: #ece9d8; }
body.mode-native::before, body.mode-native #taskbar { display: none; }
body.mode-native #desk { inset: 0; }
.win.where-full { position: absolute; inset: 0; border: 0; border-radius: 0; box-shadow: none; min-width: 0; min-height: 0; }
/* finestra popup (conversazioni nell'app per computer) */
body.popup-body { background: #ece9d8; }
body.popup-body::before { display: none; }
body.popup-body > .win { position: fixed; inset: 0; border: 0; border-radius: 0; box-shadow: none; min-width: 0; min-height: 0; }
body.popup-body .resize { display: none; }
/* app Electron: si trascina dalla barra del titolo disegnata da noi */
body.is-electron .titlebar { -webkit-app-region: drag; }
body.is-electron .titlebar .tbtn { -webkit-app-region: no-drag; }

/* ======================================================================
   Tema «Mac OS X 2006» (Aqua e metallo spazzolato), come Messenger per Mac
   ====================================================================== */
html[data-skin="aqua"] {
  --font: "Lucida Grande", "Lucida Sans Unicode", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --title-font: "Lucida Grande", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --navy: #2b2b2b; --edge: #8e8e8e; --link: #0a4fd6;
  --hover-1: #eef3fd; --hover-2: #dbe6fb; --hover-edge: #a9bde6;
  --metal: linear-gradient(180deg, rgba(255,255,255,.55) 0, rgba(255,255,255,0) 60px),
           repeating-linear-gradient(0deg, rgba(255,255,255,.10) 0 1px, rgba(0,0,0,.035) 1px 2px, rgba(255,255,255,.04) 2px 3px),
           linear-gradient(180deg, #e9e9e9 0%, #cfcfcf 55%, #b8b8b8 100%);
}
html[data-skin="aqua"] body { font-size: 11.5px;
  background: radial-gradient(120% 80% at 20% 0%, #9fd0ff 0%, rgba(159,208,255,0) 55%), radial-gradient(90% 70% at 90% 100%, #2f4fbf 0%, rgba(47,79,191,0) 60%), linear-gradient(160deg, #3a7be0 0%, #1a3f9a 55%, #0d2466 100%); }
html[data-skin="aqua"] body::before { background: radial-gradient(70% 30% at 40% 60%, rgba(255,255,255,.25), transparent 70%), radial-gradient(40% 20% at 70% 35%, rgba(255,255,255,.18), transparent 70%); transform: rotate(-14deg); }
html[data-skin="aqua"] body.mode-docked { background: linear-gradient(180deg, #e8e8e8, #c9c9c9); }
html[data-skin="aqua"] body.mode-native, html[data-skin="aqua"] body.popup-body { background: #d6d6d6; }

/* finestra: metallo unico, semafori a sinistra, titolo centrato */
html[data-skin="aqua"] .win { background: var(--metal); border: 1px solid #6d6d6d; border-radius: 7px 7px 5px 5px; box-shadow: 0 12px 30px rgba(0,0,0,.45), 0 0 0 .5px rgba(0,0,0,.4); }
html[data-skin="aqua"] .win.inactive { border-color: #8a8a8a; }
html[data-skin="aqua"] .win.inactive .titlebar { filter: none; color: #8a8a8a; }
html[data-skin="aqua"] .win.inactive .tbtn { background: radial-gradient(circle at 50% 30%, #fdfdfd, #c9c9c9 70%, #a9a9a9); border-color: #8f8f8f; }
html[data-skin="aqua"] .titlebar { height: 22px; background: transparent; color: #2a2a2a; text-shadow: 0 1px 0 rgba(255,255,255,.75); font: 13px var(--title-font); justify-content: center; padding: 0 8px; gap: 7px; border-radius: 0; }
html[data-skin="aqua"] .titlebar .ticon { display: none; }
html[data-skin="aqua"] .titlebar .ttext { text-align: center; order: 0; margin-right: 52px; }
html[data-skin="aqua"] .tbtn { width: 13px; height: 13px; border-radius: 50%; border: 1px solid; box-shadow: inset 0 1px 1px rgba(255,255,255,.85), 0 1px 0 rgba(255,255,255,.4); }
html[data-skin="aqua"] .tbtn svg { opacity: 0; width: 7px; height: 7px; }
html[data-skin="aqua"] .titlebar:hover .tbtn svg { opacity: .7; }
html[data-skin="aqua"] .tbtn svg * { stroke: #400 !important; fill: #400 !important; }
html[data-skin="aqua"] .tbtn.close { order: -3; border-color: #a5281e; background: radial-gradient(circle at 50% 30%, #ffd7cf, #f35c4a 55%, #c2251a); }
html[data-skin="aqua"] .tbtn.min { order: -2; border-color: #b07d12; background: radial-gradient(circle at 50% 30%, #fff1c6, #f8bd2b 55%, #c98a0b); }
html[data-skin="aqua"] .tbtn.max { order: -1; border-color: #2f7d22; background: radial-gradient(circle at 50% 30%, #dcffd0, #5fd243 55%, #2e9a1d); }
html[data-skin="aqua"] .tbtn.min svg *, html[data-skin="aqua"] .tbtn.max svg * { stroke: #3a2a00 !important; fill: #3a2a00 !important; }
html[data-skin="aqua"] .titlebar:not(:has(.tbtn.min)) .ttext { margin-right: 22px; }

/* pannelli */
html[data-skin="aqua"] .mpanel { background: transparent; }
html[data-skin="aqua"] .menubar { background: transparent; border-bottom: 1px solid rgba(0,0,0,.15); }
html[data-skin="aqua"] .menubar button:hover, html[data-skin="aqua"] .tool:hover, html[data-skin="aqua"] .bigtool:hover, html[data-skin="aqua"] .nickbtn:hover, html[data-skin="aqua"] .grp:hover {
  border-color: rgba(0,0,0,.18); background: rgba(255,255,255,.35); }
html[data-skin="aqua"] .mehead { background: transparent; }
html[data-skin="aqua"] .toolsrow { background: transparent; border-color: rgba(0,0,0,.18); }
html[data-skin="aqua"] .searchbox { border-radius: 11px; border-color: #7d7d7d; box-shadow: inset 0 1px 2px rgba(0,0,0,.3); }
html[data-skin="aqua"] .list { margin: 0 8px; border: 1px solid #7a7a7a; border-radius: 2px; background: #fff; box-shadow: inset 0 1px 2px rgba(0,0,0,.15); }
html[data-skin="aqua"] .grp { color: #333; font-size: 11px; text-transform: none; }
html[data-skin="aqua"] .grp .cnt { color: #777; }
html[data-skin="aqua"] .crow { border-radius: 0; margin: 0 -4px; padding-left: 20px; }
html[data-skin="aqua"] .crow:nth-of-type(even) { background: #f1f5fb; }
html[data-skin="aqua"] .crow:hover { border-color: transparent; background: #e3ebf9; }
html[data-skin="aqua"] .crow.sel { border-color: transparent; color: #fff; background: linear-gradient(180deg, #6c9bf0, #3d72dc 50%, #2c5fc8); }
html[data-skin="aqua"] .crow.sel .cp, html[data-skin="aqua"] .crow.sel .muted, html[data-skin="aqua"] .crow.sel .cn { color: #fff; }
html[data-skin="aqua"] .banner { margin: 8px; border-color: #8a8a8a; border-radius: 6px; background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.45)); }
html[data-skin="aqua"] .banner .t { color: #1d1d1d; }

/* cornici delle immagini personali: più sobrie, come sul Mac */
html[data-skin="aqua"] .dp { border-radius: 5px; padding: 3px; background: #fff; border: 1px solid #8a8a8a; box-shadow: 0 2px 5px rgba(0,0,0,.35); }
html[data-skin="aqua"] .dp::after { display: none; }
html[data-skin="aqua"] .dp.on { box-shadow: 0 0 0 2px #56c93a, 0 2px 6px rgba(0,0,0,.35); }
html[data-skin="aqua"] .dp.away { box-shadow: 0 0 0 2px #f5b225, 0 2px 6px rgba(0,0,0,.35); }
html[data-skin="aqua"] .dp.busy { box-shadow: 0 0 0 2px #e84a33, 0 2px 6px rgba(0,0,0,.35); }
html[data-skin="aqua"] .dp.off { box-shadow: 0 2px 6px rgba(0,0,0,.3); }

/* bottoni Aqua */
html[data-skin="aqua"] .btn { border-radius: 11px; border: 1px solid #7b7b7b; padding: 3px 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f1f1 48%, #dcdcdc 52%, #f4f4f4 100%); box-shadow: 0 1px 1px rgba(0,0,0,.2); }
html[data-skin="aqua"] .btn:hover { box-shadow: 0 1px 1px rgba(0,0,0,.2); filter: brightness(1.03); }
html[data-skin="aqua"] .btn.primary, html[data-skin="aqua"] .btn.glossy, html[data-skin="aqua"] .btn.send {
  color: #000; font-weight: normal; text-shadow: none; border: 1px solid #2c4f9e;
  background: linear-gradient(180deg, #d9ebff 0%, #8ec2fb 45%, #4f97f2 52%, #8fd0ff 100%); box-shadow: inset 0 1px 1px rgba(255,255,255,.9), 0 1px 2px rgba(0,0,0,.35); }
html[data-skin="aqua"] .btn.glossy.green { border-color: #2c4f9e; background: linear-gradient(180deg, #d9ebff 0%, #8ec2fb 45%, #4f97f2 52%, #8fd0ff 100%); }
html[data-skin="aqua"] .field { border-color: #8a8a8a; border-radius: 0; box-shadow: inset 0 1px 2px rgba(0,0,0,.2); }
html[data-skin="aqua"] .field:focus { box-shadow: 0 0 0 3px rgba(80,140,240,.55); border-color: #5b8ad6; }

/* accesso */
html[data-skin="aqua"] .login { background: transparent; }
html[data-skin="aqua"] .brand .word { color: #1d1d1d; font-weight: bold; text-shadow: 0 1px 0 #fff; }
html[data-skin="aqua"] .brand .word b { color: #2a6fd6; }
html[data-skin="aqua"] .brand .by, html[data-skin="aqua"] .login .foot { color: #555; }
html[data-skin="aqua"] .login label.cap { color: #222; }

/* conversazione: barra strumenti unificata e colonna con l'immagine */
html[data-skin="aqua"] .chat .bigbar { background: transparent; border-bottom: 1px solid rgba(0,0,0,.2); padding-top: 0; }
html[data-skin="aqua"] .bigtool { color: #222; font-size: 10.5px; }
html[data-skin="aqua"] .chat .tohead { background: rgba(255,255,255,.35); border-bottom: 1px solid rgba(0,0,0,.18); }
html[data-skin="aqua"] .chat .main { background: transparent; }
html[data-skin="aqua"] .histbox { border-color: #7a7a7a; border-radius: 0; }
html[data-skin="aqua"] .msg .who { color: #2a5bc9; font-weight: bold; }
html[data-skin="aqua"] .msg .who .ts { font-weight: normal; }
html[data-skin="aqua"] .inputrow textarea { border-color: #7a7a7a; border-radius: 0; }
html[data-skin="aqua"] .statusbar { background: transparent; border-top: 1px solid rgba(0,0,0,.15); color: #444; }
html[data-skin="aqua"] .sys.line { color: #333; border-color: rgba(0,0,0,.12); }
html[data-skin="aqua"] .modetabs button { border-color: #8a8a8a; background: linear-gradient(#f6f6f6, #d8d8d8); }
html[data-skin="aqua"] .modetabs button.on { background: #fff; }

/* menu e selettori */
html[data-skin="aqua"] .menu, html[data-skin="aqua"] .picker { border: 1px solid rgba(0,0,0,.3); border-radius: 5px; background: rgba(255,255,255,.96); box-shadow: 0 6px 18px rgba(0,0,0,.35); padding: 4px 0; }
html[data-skin="aqua"] .picker { padding: 5px; }
html[data-skin="aqua"] .menu .mi:hover { background: linear-gradient(180deg, #6c9bf0, #3d72dc); color: #fff; }

/* avvisi in stile «fumo» (come le notifiche Mac del 2006) */
html[data-skin="aqua"] .toast { border: 0; border-radius: 10px; background: rgba(20,20,20,.82); color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
html[data-skin="aqua"] .toast .th { background: none; text-shadow: none; color: #ddd; font: bold 11px var(--title-font); }
html[data-skin="aqua"] .toast .muted { color: #bbb; }

/* finestre di dialogo e schede */
html[data-skin="aqua"] .dlg, html[data-skin="aqua"] .dlg.blue { background: var(--metal); }
html[data-skin="aqua"] .tabs { border-bottom: 0; justify-content: center; gap: 0; position: relative; z-index: 1; margin-bottom: -11px; }
html[data-skin="aqua"] .tabs button { margin: 0; border: 1px solid #7b7b7b; border-radius: 0; padding: 3px 12px; background: linear-gradient(180deg, #fff, #ececec 48%, #dadada 52%, #f2f2f2); }
html[data-skin="aqua"] .tabs button:first-child { border-radius: 11px 0 0 11px; }
html[data-skin="aqua"] .tabs button:last-child { border-radius: 0 11px 11px 0; }
html[data-skin="aqua"] .tabs button.on { border-top: 1px solid #2c4f9e; padding-top: 3px; border-color: #2c4f9e; background: linear-gradient(180deg, #d9ebff 0%, #8ec2fb 45%, #4f97f2 52%, #8fd0ff 100%); }
html[data-skin="aqua"] .tabpage { background: rgba(255,255,255,.35); border: 1px solid rgba(0,0,0,.25); border-radius: 4px; padding-top: 20px; }
html[data-skin="aqua"] .dtab { color: #222; text-shadow: 0 1px 0 #fff; border-color: #7b7b7b; background: linear-gradient(180deg, #f6f6f6, #d6d6d6); font: 12px var(--title-font); }
html[data-skin="aqua"] .dtab.cur { background: var(--metal); color: #000; }
html[data-skin="aqua"] .win.where-tab { border-color: #6d6d6d; border-radius: 0 5px 5px 5px; }
html[data-skin="aqua"] #dock-empty { border-color: #a9a9a9; background: radial-gradient(80% 60% at 50% 30%, #fff, rgba(255,255,255,.4)); color: #333; }
html[data-skin="aqua"] #dock-empty .wel h2 { color: #1d1d1d; }
html[data-skin="aqua"] #dock-empty .wel h2 b { color: #2a6fd6; }

/* barra in basso della modalità nostalgia → Dock */
html[data-skin="aqua"] #taskbar { left: 50%; right: auto; transform: translateX(-50%); bottom: 4px; height: 34px; border-radius: 6px; border: 1px solid rgba(255,255,255,.5);
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.25)); backdrop-filter: blur(6px); padding: 0 8px; }
html[data-skin="aqua"] #taskbar .tlogo { background: none; box-shadow: none; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
html[data-skin="aqua"] #taskbar .tw { background: rgba(255,255,255,.35); border-color: rgba(255,255,255,.5); color: #111; }
html[data-skin="aqua"] #taskbar .tw.act { background: rgba(255,255,255,.7); }
html[data-skin="aqua"] #taskbar .tray { background: none; border: 0; box-shadow: none; color: #111; }

/* barre di scorrimento d'epoca */
html[data-skin="aqua"] ::-webkit-scrollbar { width: 15px; height: 15px; }
html[data-skin="aqua"] ::-webkit-scrollbar-track { background: linear-gradient(90deg, #d9d9d9, #f6f6f6 40%, #ececec); border-left: 1px solid #b8b8b8; }
html[data-skin="aqua"] ::-webkit-scrollbar-thumb { border-radius: 8px; border: 2px solid transparent; background-clip: padding-box;
  background-image: linear-gradient(90deg, #3c76d8, #a9d1ff 45%, #6aa8f7 55%, #2f63c4); }
html[data-skin="luna"] ::-webkit-scrollbar { width: 17px; height: 17px; }
html[data-skin="luna"] ::-webkit-scrollbar-track { background: #f3f1ec; border-left: 1px solid #e6e3da; }
html[data-skin="luna"] ::-webkit-scrollbar-thumb { border: 1px solid #fff; border-radius: 3px; background: linear-gradient(90deg, #c8d7fb, #b8cdf9 40%, #a9c2f6); box-shadow: inset 0 0 0 1px #9db5ef; }

/* sul telefono il tema Mac tiene i semafori ma a tutta pagina */
@media (max-width: 760px) and (hover: none), (max-width: 500px) {
  html:not(.no-mobile)[data-skin="aqua"] .titlebar { height: 40px; font-size: 16px; }
  html:not(.no-mobile)[data-skin="aqua"] .tbtn { width: 18px; height: 18px; }
  html:not(.no-mobile)[data-skin="aqua"] .win { background: var(--metal); }
  html:not(.no-mobile)[data-skin="aqua"] .win .winbody { background: transparent; }
}

/* ======================================================================
   Tema «GNOME 2006» (Clearlooks), come aMSN e Gaim su Linux
   ====================================================================== */
html[data-skin="gnome"] {
  --font: "DejaVu Sans", "Bitstream Vera Sans", Verdana, sans-serif;
  --title-font: "DejaVu Sans", "Bitstream Vera Sans", Verdana, sans-serif;
  --navy: #2e3436; --edge: #9d9c9b; --link: #204a87;
  --hover-1: #f5f4f2; --hover-2: #e8e6e2; --hover-edge: #b8b6b2;
  --cl-bg: #edeceb; --cl-sel: #86abd9; --cl-sel-d: #5f87bd;
}
html[data-skin="gnome"] body { font-size: 12px;
  background: radial-gradient(90% 60% at 30% 20%, #8aa7cc 0%, rgba(138,167,204,0) 60%), linear-gradient(180deg, #5d7aa3 0%, #3a5682 60%, #2c4166 100%); }
html[data-skin="gnome"] body::before { background: radial-gradient(60% 25% at 60% 70%, rgba(255,255,255,.12), transparent 70%); }
html[data-skin="gnome"] body.mode-docked { background: linear-gradient(180deg, #e0dfdc, #cfcdc9); }
html[data-skin="gnome"] body.mode-native, html[data-skin="gnome"] body.popup-body { background: var(--cl-bg); }

/* finestra Metacity/Clearlooks */
html[data-skin="gnome"] .win { background: var(--cl-bg); border: 1px solid #3d5e8f; border-radius: 4px 4px 0 0; box-shadow: 2px 4px 14px rgba(0,0,0,.4); }
html[data-skin="gnome"] .win.inactive { border-color: #8a8a88; }
html[data-skin="gnome"] .win.inactive .titlebar { filter: none; background: linear-gradient(180deg, #ecebe9, #d8d6d2); color: #6c6c6a; text-shadow: none; }
html[data-skin="gnome"] .titlebar { height: 24px; border-radius: 3px 3px 0 0; padding: 0 3px 0 6px; gap: 5px; color: #fff;
  font: bold 12.5px var(--title-font); text-shadow: 0 1px 1px rgba(0,0,0,.35);
  background: linear-gradient(180deg, #8eb1de 0%, #6f97cf 45%, #5a85c3 55%, #4f78b5 100%); }
html[data-skin="gnome"] .titlebar .ttext { text-align: center; }
html[data-skin="gnome"] .tbtn { width: 19px; height: 18px; border-radius: 3px; border: 1px solid rgba(30,50,90,.55);
  background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,.12)); box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
html[data-skin="gnome"] .tbtn.close { background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,.12)); }
html[data-skin="gnome"] .tbtn:hover { background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,.3)); }
html[data-skin="gnome"] .win.inactive .tbtn { border-color: #a5a4a1; }
html[data-skin="gnome"] .win.inactive .tbtn svg * { stroke: #777 !important; fill: #777 !important; }

/* pannelli */
html[data-skin="gnome"] .mpanel { background: var(--cl-bg); }
html[data-skin="gnome"] .menubar { background: linear-gradient(180deg, #f3f2f1, #e4e2df); border-bottom: 1px solid #c9c7c3; }
html[data-skin="gnome"] .menubar button:hover { border-color: var(--cl-sel-d); background: var(--cl-sel); color: #fff; border-radius: 2px; }
html[data-skin="gnome"] .mehead { background: linear-gradient(180deg, #fbfbfa, var(--cl-bg)); }
html[data-skin="gnome"] .toolsrow { background: linear-gradient(180deg, #f6f5f4, #e7e5e2); border-color: #cac8c4; }
html[data-skin="gnome"] .tool:hover, html[data-skin="gnome"] .bigtool:hover, html[data-skin="gnome"] .nickbtn:hover, html[data-skin="gnome"] .grp:hover { border-color: #a9a7a3; background: linear-gradient(180deg, #ffffff, #ecebe8); border-radius: 3px; }
html[data-skin="gnome"] .searchbox { border-radius: 3px; border-color: #a3a19d; box-shadow: inset 0 1px 1px rgba(0,0,0,.12); }
html[data-skin="gnome"] .list { border-top: 1px solid #b9b7b3; }
html[data-skin="gnome"] .grp { color: #2e3436; }
html[data-skin="gnome"] .grp .cnt { color: #6e6e6c; }
html[data-skin="gnome"] .crow { border-radius: 0; }
html[data-skin="gnome"] .crow:hover { border-color: transparent; background: #eef2f8; }
html[data-skin="gnome"] .crow.sel { border-color: var(--cl-sel-d); color: #fff; background: linear-gradient(180deg, #96b6df, var(--cl-sel) 50%, #7aa0d2); }
html[data-skin="gnome"] .crow.sel .cp, html[data-skin="gnome"] .crow.sel .muted, html[data-skin="gnome"] .crow.sel .cn { color: #fff; }
html[data-skin="gnome"] .banner { border-color: #b9b7b3; border-radius: 3px; background: linear-gradient(180deg, #fff, #f0efed); }
html[data-skin="gnome"] .banner .t { color: #204a87; }

/* immagini personali: cornice semplice con bordo di stato (come aMSN) */
html[data-skin="gnome"] .dp { border-radius: 3px; padding: 3px; background: #fff; border: 2px solid #9d9c9b; box-shadow: none; }
html[data-skin="gnome"] .dp::after { display: none; }
html[data-skin="gnome"] .dp.on { border-color: #4e9a06; }
html[data-skin="gnome"] .dp.away { border-color: #f57900; }
html[data-skin="gnome"] .dp.busy { border-color: #cc0000; }

/* bottoni e campi Clearlooks */
html[data-skin="gnome"] .btn { border-radius: 3px; border: 1px solid #9c9a94; padding: 4px 12px;
  background: linear-gradient(180deg, #fdfdfc 0%, #f1f0ee 50%, #e2e0dc 100%); box-shadow: inset 0 1px 0 #fff; }
html[data-skin="gnome"] .btn:hover { box-shadow: inset 0 1px 0 #fff; background: linear-gradient(180deg, #ffffff, #f6f5f3 50%, #eae8e5); }
html[data-skin="gnome"] .btn.primary { box-shadow: inset 0 1px 0 #fff, 0 0 0 1px var(--cl-sel); font-weight: normal; }
html[data-skin="gnome"] .btn.glossy, html[data-skin="gnome"] .btn.glossy.green, html[data-skin="gnome"] .btn.send {
  color: #2e3436; text-shadow: none; font-weight: bold; border-radius: 3px; border: 1px solid #9c9a94;
  background: linear-gradient(180deg, #fdfdfc 0%, #f1f0ee 50%, #e2e0dc 100%); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px var(--cl-sel); }
html[data-skin="gnome"] .field { border-color: #9d9c9b; border-radius: 2px; box-shadow: inset 0 1px 1px rgba(0,0,0,.1); }
html[data-skin="gnome"] .field:focus { border-color: var(--cl-sel-d); box-shadow: 0 0 0 1px var(--cl-sel); }

/* accesso */
html[data-skin="gnome"] .brand .word { color: #204a87; }
html[data-skin="gnome"] .brand .word b { color: #4e9a06; }
html[data-skin="gnome"] .brand .by, html[data-skin="gnome"] .login .foot { color: #555753; }
html[data-skin="gnome"] .login label.cap { color: #2e3436; }

/* conversazione */
html[data-skin="gnome"] .chat .bigbar { background: linear-gradient(180deg, #f6f5f4, #e4e2df); border-bottom: 1px solid #c4c2be; }
html[data-skin="gnome"] .bigtool { color: #2e3436; }
html[data-skin="gnome"] .chat .tohead { background: #f6f5f4; border-bottom: 1px solid #d0cecb; }
html[data-skin="gnome"] .chat .main { background: var(--cl-bg); }
html[data-skin="gnome"] .histbox, html[data-skin="gnome"] .inputrow textarea { border-color: #9d9c9b; border-radius: 2px; }
html[data-skin="gnome"] .msg .who { color: #204a87; font-weight: bold; }
html[data-skin="gnome"] .msg .who .ts { font-weight: normal; color: #888a85; }
html[data-skin="gnome"] .statusbar { background: var(--cl-bg); border-top: 1px solid #d0cecb; color: #555753; }
html[data-skin="gnome"] .sys.line { color: #2e3436; border-color: #d3d7cf; }

/* menu, avvisi, schede */
html[data-skin="gnome"] .menu, html[data-skin="gnome"] .picker { border: 1px solid #9d9c9b; border-radius: 0; background: #f7f6f5; box-shadow: 2px 3px 6px rgba(0,0,0,.25); }
html[data-skin="gnome"] .menu .mi:hover { background: linear-gradient(180deg, #96b6df, #7aa0d2); color: #fff; }
html[data-skin="gnome"] .toast { border: 1px solid #8f8d89; border-radius: 6px; background: linear-gradient(180deg, #fefefe, #ecebe8); }
html[data-skin="gnome"] .toast .th { background: none; color: #2e3436; text-shadow: none; font: bold 11.5px var(--title-font); }
html[data-skin="gnome"] .dlg, html[data-skin="gnome"] .dlg.blue { background: var(--cl-bg); }
html[data-skin="gnome"] .tabs { border-bottom: 1px solid #9d9c9b; }
html[data-skin="gnome"] .tabs button { border-color: #9d9c9b; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #e8e6e3, #dad8d4); }
html[data-skin="gnome"] .tabs button.on { background: #f6f5f4; border-top: 2px solid var(--cl-sel); }
html[data-skin="gnome"] .tabpage { background: #f6f5f4; border-color: #9d9c9b; }
html[data-skin="gnome"] .dtab { color: #2e3436; text-shadow: none; font-weight: normal; border-color: #9d9c9b; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #e8e6e3, #d6d4d0); }
html[data-skin="gnome"] .dtab.cur { background: var(--cl-bg); font-weight: bold; }
html[data-skin="gnome"] .win.where-tab { border-color: #9d9c9b; border-radius: 0 3px 0 0; }
html[data-skin="gnome"] #dock-empty { border-color: #b9b7b3; background: radial-gradient(80% 60% at 50% 30%, #fff, rgba(255,255,255,.5)); color: #2e3436; }
html[data-skin="gnome"] #dock-empty .wel h2 { color: #204a87; }
html[data-skin="gnome"] #dock-empty .wel h2 b { color: #4e9a06; }

/* pannello in basso di GNOME 2 con l'elenco finestre */
html[data-skin="gnome"] #taskbar { height: 26px; border-top: 1px solid #fff; background: linear-gradient(180deg, #ecebe9, #dcdad6); box-shadow: 0 -1px 0 #a5a39f; }
html[data-skin="gnome"] #taskbar .tlogo { background: none; box-shadow: none; color: #2e3436; text-shadow: none; font-style: normal; height: 22px; }
html[data-skin="gnome"] #taskbar .tw { height: 21px; border-radius: 2px; color: #2e3436; border-color: transparent; background: none; box-shadow: none; }
html[data-skin="gnome"] #taskbar .tw:hover { border-color: #a9a7a3; background: linear-gradient(180deg, #fff, #eceae7); }
html[data-skin="gnome"] #taskbar .tw.act { border-color: #8f8d89; background: linear-gradient(180deg, #d4d2ce, #e4e2df); box-shadow: inset 0 1px 2px rgba(0,0,0,.2); }
html[data-skin="gnome"] #taskbar .tw.flash { animation: flash-g 1s steps(1) infinite; }
@keyframes flash-g { 50% { background: var(--cl-sel); color: #fff; } }
html[data-skin="gnome"] #taskbar .tray { background: none; border-left: 1px solid #c4c2be; box-shadow: none; color: #2e3436; }

/* barre di scorrimento Clearlooks */
html[data-skin="gnome"] ::-webkit-scrollbar { width: 15px; height: 15px; }
html[data-skin="gnome"] ::-webkit-scrollbar-track { background: #dedcd8; border-left: 1px solid #c4c2be; }
html[data-skin="gnome"] ::-webkit-scrollbar-thumb { border-radius: 3px; border: 1px solid #7c95b8; background: linear-gradient(90deg, #b6cbe7, #9ab5dc 50%, #8aa9d4); }
