/* =========================================================
   John Palle Esplosive — stile "cartoon"
   ========================================================= */
:root {
  --bg: #1c0a38; --ink: #fff8ea; --mute: #bba8de; --line: #170828;
  --panel: #2c1554; --panel2: #23103f;
  --hot: #ff6b1a; --yel: #ffd23f; --red: #ff3b4f; --grn: #22c37a; --blu: #3a7bff;
  --paper: #fffbf0; --cream2: #efe0bd;
  --display: 'Lilita One', 'Bangers', Impact, sans-serif;
  --comic: 'Bangers', Impact, sans-serif;
  --outline: 2px 0 var(--line), -2px 0 var(--line), 0 2px var(--line), 0 -2px var(--line), 1.5px 1.5px var(--line), -1.5px -1.5px var(--line), 1.5px -1.5px var(--line), -1.5px 1.5px var(--line);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink); font: 700 16px/1.35 Nunito, system-ui, sans-serif;
  background:
    radial-gradient(1000px 600px at 50% -10%, rgba(255, 107, 26, .25), transparent 60%),
    radial-gradient(900px 700px at -10% 110%, rgba(140, 40, 220, .45), transparent 60%),
    radial-gradient(800px 600px at 110% 90%, rgba(230, 57, 70, .25), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  overscroll-behavior: none; -webkit-user-select: none; user-select: none;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ''; position: fixed; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.075' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='32' cy='48' r='13'/%3E%3Cpath d='M28 35v-5h8v5'/%3E%3Cpath d='M32 30c0-7 7-10 12-6'/%3E%3Cpath d='M48 19l3-4M50 24l5 0M45 16l-1-5'/%3E%3Cpath d='M112 22l4 10 10 1-8 7 3 10-9-5-9 5 3-10-8-7 10-1z'/%3E%3Cpath d='M118 108v16M110 116h16'/%3E%3Cpath d='M20 120c7-7 14 7 21 0s14 7 21 0'/%3E%3Ccircle cx='80' cy='86' r='3'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 160px 160px;
}
#app { position: relative; z-index: 1; min-height: 100vh; }
input, select, button { font: inherit; color: inherit; }
input, select { -webkit-user-select: text; user-select: text; }
b, strong { font-weight: 900; }
.hot { color: var(--hot); }
.small { color: var(--mute); font-size: 13px; }
a { color: var(--yel); }
h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .5px; }
.screen { max-width: 560px; margin: 0 auto; padding: 12px 16px calc(18px + env(safe-area-inset-bottom)); }
.center { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 85vh; text-align: center; }

/* ---------- logo ---------- */
.logo { font-family: var(--comic); font-weight: 400; letter-spacing: 2px; line-height: .86; margin: 0; text-align: center; }
.logo span {
  display: block; font-size: 58px; color: var(--paper);
  text-shadow: 3px 0 var(--line), -3px 0 var(--line), 0 3px var(--line), 0 -3px var(--line), 2.5px 2.5px var(--line), -2.5px -2.5px var(--line), 2.5px -2.5px var(--line), -2.5px 2.5px var(--line), 0 7px 0 var(--line), 0 11px 0 rgba(0, 0, 0, .3);
}
.logo span:nth-child(1) { transform: rotate(-4deg) translateX(-18px); }
.logo span:nth-child(2) { color: var(--yel); transform: rotate(2deg) translateX(14px); }
.logo .hot { font-size: 66px; color: var(--hot); animation: throb 1.8s ease-in-out infinite; }
.logo.big span { font-size: clamp(56px, 7vw, 120px); }
.logo.big .hot { font-size: clamp(62px, 7.8vw, 132px); }
.logo.sm span { display: inline; font-size: 26px; text-shadow: 2px 2px 0 var(--line), -1px -1px 0 var(--line); transform: none; }
.logo.sm .hot { font-size: 26px; animation: none; }
@keyframes throb { 50% { transform: scale(1.05) rotate(-1.5deg); } }
.hero { text-align: center; }
.tag { color: var(--mute); margin: 16px auto 18px; max-width: 320px; }
.ball { font-size: 64px; }
.ball.spin { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 50% { transform: translateY(-8px); } }

.showcase { position: relative; height: 158px; margin: 6px auto 10px; width: 250px; }
.showcase .card { position: absolute; left: 50%; top: 12px; width: 92px; margin-left: -46px; cursor: default; }
.showcase .sc1 { transform: translateX(-64px) rotate(-16deg); animation: float1 4s ease-in-out infinite; }
.showcase .sc3 { transform: translateX(64px) rotate(16deg); animation: float3 4s ease-in-out infinite .6s; }
.showcase .sc2 { z-index: 2; top: 0; width: 106px; margin-left: -53px; animation: float2 3s ease-in-out infinite; }
@keyframes float1 { 50% { transform: translateX(-68px) translateY(-6px) rotate(-19deg); } }
@keyframes float2 { 50% { transform: translateY(-8px) rotate(3deg); } }
@keyframes float3 { 50% { transform: translateX(68px) translateY(-5px) rotate(19deg); } }

/* ---------- pannelli / form ---------- */
.panel, .codebox, .joinhow {
  background: var(--panel); border: 3px solid var(--line); border-radius: 26px;
  box-shadow: 0 6px 0 var(--line), 0 20px 40px rgba(0, 0, 0, .35), inset 0 3px 0 rgba(255, 255, 255, .08);
}
.panel { padding: 18px; }
label { display: block; font-size: 13px; color: var(--mute); margin: 4px 0 6px; text-transform: uppercase; letter-spacing: 1px; font-weight: 900; }
input:not([type]), input[type=text], select {
  width: 100%; padding: 12px 14px; border-radius: 14px; border: 3px solid var(--line);
  background: #170828; color: var(--ink); font-size: 18px; outline: none; box-shadow: inset 0 3px 0 rgba(0, 0, 0, .35); transition: border-color .15s;
}
input:focus, select:focus { border-color: var(--yel); }
input::placeholder { color: rgba(255, 255, 255, .3); }
select:disabled { opacity: .75; }
.avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin: 12px 0 16px; }
.av { aspect-ratio: 1; border-radius: 14px; border: 3px solid var(--line); background: #1d0c36; font-size: 24px; cursor: pointer; padding: 0; box-shadow: 0 3px 0 var(--line); transition: transform .12s; }
.av.on { background: var(--yel); transform: translateY(-3px) rotate(-4deg); box-shadow: 0 5px 0 var(--line); }
.join-row { display: flex; gap: 8px; }
.join-row input { text-transform: uppercase; letter-spacing: 8px; text-align: center; font-family: var(--display); font-size: 26px; flex: 1; min-width: 0; padding: 9px; }
.or { text-align: center; margin: 16px 0; position: relative; color: var(--mute); font-size: 12px; text-transform: uppercase; letter-spacing: 2px; }
.or::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed rgba(255, 255, 255, .14); }
.or span { background: var(--panel); padding: 0 12px; position: relative; }
.tvjoin .or span { background: var(--bg); }
.foot { display: flex; justify-content: center; gap: 10px; margin: 20px 0; flex-wrap: wrap; }
.lnk { background: none; border: 0; color: var(--yel); cursor: pointer; text-decoration: none; padding: 8px 10px; font-weight: 900; border-radius: 12px; }
.foot .lnk { background: var(--panel); border: 3px solid var(--line); box-shadow: 0 3px 0 var(--line); }

/* ---------- bottoni ---------- */
.btn {
  --b: #6a4bb0;
  border: 3px solid var(--line); border-radius: 16px; padding: 11px 16px; color: #fff; cursor: pointer;
  font-family: var(--display); font-size: 18px; letter-spacing: .5px; text-shadow: var(--outline);
  background: linear-gradient(180deg, color-mix(in srgb, var(--b) 75%, #fff 25%) 0 45%, var(--b) 45%);
  box-shadow: 0 5px 0 var(--line), 0 10px 18px rgba(0, 0, 0, .3), inset 0 3px 0 rgba(255, 255, 255, .3);
  transition: transform .08s, box-shadow .08s, filter .15s; touch-action: manipulation;
}
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--line), inset 0 3px 0 rgba(255, 255, 255, .3); }
.btn:disabled { filter: grayscale(.9) brightness(.65); cursor: default; }
.btn.big { width: 100%; padding: 15px; font-size: 23px; margin-top: 12px; }
.btn.orange { --b: #ff6b1a; }
.btn.green { --b: #1fb873; }
.btn.blue { --b: #3a7bff; }
.btn.red { --b: #ff3b4f; }
.ico { width: 38px; height: 38px; border-radius: 12px; border: 3px solid var(--line); background: var(--panel); box-shadow: 0 3px 0 var(--line); cursor: pointer; font-size: 17px; padding: 0; display: inline-flex; align-items: center; justify-content: center; opacity: .55; }
.ico.on { opacity: 1; background: #4a2a86; }
.ico:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.tb-r { display: inline-flex; gap: 6px; align-items: center; }
.ib { display: inline-block; width: 15px; height: 20px; margin-right: 8px; vertical-align: -3px; border-radius: 3px; border: 2px solid #fff; background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .5) 0 2px, transparent 2px 4px); box-shadow: 2px 2px 0 var(--line); transform: rotate(-8deg); }

/* =========================================================
   CARTE
   ========================================================= */
.card {
  --c: #555; position: relative; flex: none; width: 92px; aspect-ratio: 5 / 7;
  border: 3px solid var(--line); border-radius: 13px 15px 12px 14px / 14px 12px 15px 13px;
  background: var(--paper); container-type: inline-size; cursor: pointer; color: var(--line);
  box-shadow: 0 4px 0 var(--line), 0 10px 18px rgba(0, 0, 0, .35);
  transition: transform .18s cubic-bezier(.2, 1.4, .4, 1), box-shadow .18s;
}
.cf {
  height: 100%; display: flex; flex-direction: column; padding: calc(var(--u, 1cqw) * 5) calc(var(--u, 1cqw) * 5) calc(var(--u, 1cqw) * 3); border-radius: inherit; overflow: hidden; position: relative;
  background: radial-gradient(rgba(23, 8, 40, .07) 1px, transparent 1.4px) 0 0 / calc(var(--u, 1cqw) * 5) calc(var(--u, 1cqw) * 5), var(--paper);
}
.ch {
  position: relative; z-index: 2; min-height: calc(var(--u, 1cqw) * 27); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: var(--c); color: #fff; border: 2px solid var(--line); border-radius: calc(var(--u, 1cqw) * 7) calc(var(--u, 1cqw) * 6) calc(var(--u, 1cqw) * 7) calc(var(--u, 1cqw) * 6); padding: calc(var(--u, 1cqw) * 2) calc(var(--u, 1cqw) * 3);
  font-family: var(--display); font-size: calc(var(--u, 1cqw) * 11); line-height: 1.02; text-transform: uppercase; letter-spacing: .3px;
  text-shadow: 1px 1px 0 var(--line), -1px -1px 0 var(--line), 1px -1px 0 var(--line), -1px 1px 0 var(--line), 0 calc(var(--u, 1cqw) * 1.2) 0 var(--line);
  box-shadow: 0 calc(var(--u, 1cqw) * 1.6) 0 var(--line), inset 0 calc(var(--u, 1cqw) * 2) 0 rgba(255, 255, 255, .25); transform: rotate(-2deg);
}
.ch small { font-size: calc(var(--u, 1cqw) * 7.5); line-height: 1; letter-spacing: calc(var(--u, 1cqw) * 1.2); color: var(--yel); margin: calc(var(--u, 1cqw) * .5) 0 calc(var(--u, 1cqw) * 1); }
.ca {
  flex: 1; margin: calc(var(--u, 1cqw) * 5) calc(var(--u, 1cqw) * 2) calc(var(--u, 1cqw) * 3); border: 2px solid var(--line); border-radius: 46% 54% 50% 50% / 52% 46% 54% 48%;
  display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative;
  background:
    repeating-conic-gradient(from 0deg at 50% 55%, rgba(255, 255, 255, .22) 0 9deg, transparent 9deg 20deg),
    radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--c) 35%, #fff 65%), color-mix(in srgb, var(--c) 75%, #fff 25%) 50%, var(--c) 95%);
  box-shadow: inset 0 -calc(var(--u, 1cqw) * 4) 0 rgba(0, 0, 0, .14);
}
.ce { font-size: calc(var(--u, 1cqw) * 44); line-height: 1; transform: rotate(-6deg); filter: drop-shadow(0 calc(var(--u, 1cqw) * 2) 0 rgba(23, 8, 40, .4)); position: relative; z-index: 1; transition: transform .2s; }
.cs { min-height: calc(var(--u, 1cqw) * 20); display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 calc(var(--u, 1cqw) * 2); font-size: calc(var(--u, 1cqw) * 9.6); font-weight: 900; line-height: 1.05; color: var(--line); }
.card .ord { position: absolute; top: -10px; right: -10px; width: 26px; height: 26px; border-radius: 50%; background: var(--yel); color: var(--line); border: 3px solid var(--line); font: 14px/20px var(--display); text-align: center; z-index: 3; }

/* tipi speciali */
.card.k-bomb { background: repeating-linear-gradient(-45deg, var(--yel) 0 7px, var(--line) 7px 14px); animation: danger 1s ease-in-out infinite alternate; }
.card.k-bomb .cf { margin: calc(var(--u, 1cqw) * 4); height: calc(100% - calc(var(--u, 1cqw) * 8)); border: 2px solid var(--line); border-radius: calc(var(--u, 1cqw) * 8); background: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.4px) 0 0 / calc(var(--u, 1cqw) * 5) calc(var(--u, 1cqw) * 5), #24112f; }
.card.k-bomb .ch { background: var(--red); }
.card.k-bomb .cs { color: var(--yel); }
.card.k-bomb .ca { background: repeating-conic-gradient(from 0deg at 50% 55%, rgba(255, 255, 255, .25) 0 9deg, transparent 9deg 20deg), radial-gradient(circle at 50% 55%, #fff4b0, #ffb21a 30%, #ff4a1a 62%, #a3001b 98%); }
.card.k-bomb .ce { animation: tick .45s ease-in-out infinite alternate; }
@keyframes danger { to { box-shadow: 0 4px 0 var(--line), 0 0 26px rgba(255, 59, 79, .9); } }
@keyframes tick { to { transform: rotate(7deg) scale(1.07); } }
.card.k-nope .ca::before { content: ''; position: absolute; top: 12%; right: 12%; bottom: 12%; left: 12%; border: calc(var(--u, 1cqw) * 3) solid rgba(255, 255, 255, .55); border-radius: 50%; }
.card.k-nope .ca::after { content: ''; position: absolute; width: calc(var(--u, 1cqw) * 3); height: 80%; background: rgba(255, 255, 255, .55); transform: rotate(45deg); }
.card.k-john .ch { background: linear-gradient(180deg, #ffe07a, #e9a100); color: #fff; }
.card.k-john .ch small { color: #fff; }
.card.t-j_dj .ch { background: linear-gradient(90deg, #ff3bd4, #06a3b8 55%, #6ef0ff); }
.card.t-j_dj .ch small { color: #fff; letter-spacing: calc(var(--u, 1cqw) * .5); }
.card.t-j_dj .ca { background: repeating-conic-gradient(from 0deg at 50% 55%, rgba(255, 255, 255, .25) 0 9deg, transparent 9deg 20deg), radial-gradient(circle at 50% 55%, #c6fbff, #ff7ae6 45%, #4a1aa8 95%); }
.card.t-j_dj .ce { animation: groove .6s ease-in-out infinite alternate; }
@keyframes groove { from { transform: rotate(-10deg) translateY(calc(var(--u, 1cqw) * 1)); } to { transform: rotate(8deg) translateY(-calc(var(--u, 1cqw) * 1)); } }

/* stati */
.card.sel { transform: translateY(-14px) rotate(-3deg) scale(1.04); box-shadow: 0 0 0 3px var(--yel), 0 4px 0 3px var(--line), 0 0 30px rgba(255, 210, 63, .8); z-index: 2; }
.card.sel .ce { transform: rotate(4deg) scale(1.1); }
.card.fresh { animation: dealIn .55s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes dealIn { from { transform: translateY(-140px) rotate(-30deg) scale(.5); opacity: 0; } }
.card.small { width: 70px; border-width: 2.5px; }
.card.small .cs { display: none; }
.card.small .ch { font-size: calc(var(--u, 1cqw) * 12.5); }
.card.small .ca { margin-bottom: calc(var(--u, 1cqw) * 4); }
.card.empty { background: transparent; border: 3px dashed rgba(255, 255, 255, .25); color: var(--mute); display: flex; align-items: center; justify-content: center; box-shadow: none; width: 70px; font-size: 12px; cursor: default; }
.mini { display: inline-flex; align-items: center; gap: 3px; background: var(--c); color: #fff; border: 2px solid var(--line); border-radius: 9px; padding: 0 7px; white-space: nowrap; font-family: var(--display); font-weight: 400; letter-spacing: .3px; text-shadow: 1px 1px 0 var(--line), -1px -1px 0 var(--line); box-shadow: 0 2px 0 var(--line); }

/* retro carta / mazzo */
.cardback {
  position: relative; width: 66px; aspect-ratio: 5 / 7; border: 3px solid var(--line); border-radius: 13px 15px 12px 14px / 14px 12px 15px 13px; container-type: inline-size; background: var(--paper);
  box-shadow: 5px 5px 0 -2px var(--paper), 5px 5px 0 1px var(--line), 10px 10px 0 -2px var(--paper), 10px 10px 0 1px var(--line), 14px 18px 22px rgba(0, 0, 0, .5);
}
.cb-in {
  position: absolute; top: calc(var(--u, 1cqw) * 5); right: calc(var(--u, 1cqw) * 5); bottom: calc(var(--u, 1cqw) * 5); left: calc(var(--u, 1cqw) * 5); border-radius: calc(var(--u, 1cqw) * 9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--u, 1cqw) * 1);
  border: 2px solid var(--line); overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, #ff8a3d 0 22%, transparent 23%),
    repeating-conic-gradient(from 0deg at 50% 42%, #5b23a8 0 12deg, #3d1580 12deg 24deg);
}
.cb-emb { font-size: calc(var(--u, 1cqw) * 36); line-height: 1; filter: drop-shadow(0 calc(var(--u, 1cqw) * 2) 0 var(--line)); transform: rotate(-10deg); margin-top: calc(var(--u, 1cqw) * 6); }
.cb-t { font-family: var(--comic); font-size: calc(var(--u, 1cqw) * 21); color: var(--yel); letter-spacing: calc(var(--u, 1cqw) * 1); line-height: 1; text-shadow: 1px 1px 0 var(--line), -1px -1px 0 var(--line), 1px -1px 0 var(--line), -1px 1px 0 var(--line), 0 calc(var(--u, 1cqw) * 1.5) 0 var(--line); }

/* =========================================================
   LOBBY
   ========================================================= */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 44px; }
.topbar .lnk { font-size: 17px; }
.codebox { text-align: center; padding: 16px; margin: 8px 0 14px; }
.code { font-family: var(--comic); font-size: 72px; letter-spacing: 12px; color: var(--yel); line-height: 1; margin: 2px 0 10px; text-shadow: 3px 0 var(--line), -3px 0 var(--line), 0 3px var(--line), 0 -3px var(--line), 0 8px 0 var(--line); }
.code.huge { font-size: clamp(70px, 9vw, 160px); }
.qr { width: 160px; height: 160px; border-radius: 18px; background: #fff; padding: 8px; display: block; margin: 0 auto 10px; border: 3px solid var(--line); box-shadow: 0 5px 0 var(--line); transform: rotate(-2deg); }
.qr.big { width: clamp(200px, 21vw, 340px); height: auto; aspect-ratio: 1; margin: 0; }
h3 { margin: 18px 0 8px; font-size: 20px; }
.plist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.plist li { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 3px solid var(--line); border-radius: 16px; padding: 7px 10px; box-shadow: 0 3px 0 var(--line); }
.plist .pa { font-size: 24px; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #1d0c36; border: 3px solid var(--pc); }
.plist .pn { flex: 1; font-size: 17px; }
.plist i { color: var(--mute); font-style: normal; font-size: 13px; }
.badge { font-size: 12px; background: var(--yel); color: var(--line); border-radius: 99px; padding: 2px 9px; border: 2px solid var(--line); }
.badge.off { background: #ff9aa5; }
.x { background: #ff9aa5; color: var(--line); border: 2px solid var(--line); border-radius: 10px; width: 32px; height: 32px; cursor: pointer; font-weight: 900; }
.settings { display: grid; gap: 8px; }
.settings label { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--panel); border: 3px solid var(--line); padding: 7px 8px 7px 14px; border-radius: 14px; margin: 0; color: var(--ink); font-size: 14px; text-transform: none; letter-spacing: 0; font-weight: 800; }
.settings select { width: auto; padding: 6px 10px; font-size: 15px; }
.wait { text-align: center; padding: 18px; background: var(--panel); border: 3px dashed rgba(255, 255, 255, .2); border-radius: 16px; margin-top: 16px; }
.tip { color: var(--mute); font-size: 13px; text-align: center; margin-top: 14px; }

/* =========================================================
   PARTITA (telefono)
   ========================================================= */
.game { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding-bottom: calc(12px + env(safe-area-inset-bottom)); transition: padding .2s; }
.game.has-sheet { padding-bottom: 250px; }
.game.myturn::before { content: ''; position: fixed; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; z-index: 30; box-shadow: inset 0 0 0 4px var(--yel), inset 0 0 44px rgba(255, 210, 63, .35); animation: glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { opacity: .4; } }

.reacts { display: flex; justify-content: space-between; gap: 4px; background: var(--panel); border: 3px solid var(--line); border-radius: 16px; padding: 5px; margin: 6px 0 2px; box-shadow: 0 3px 0 var(--line); animation: drop .2s; }
.reacts button { flex: 1; font-size: 24px; background: none; border: 0; cursor: pointer; padding: 4px 0; border-radius: 10px; }
.reacts button:active { transform: scale(1.3); background: rgba(255, 255, 255, .1); }
.floatr { position: absolute; bottom: -80px; display: flex; flex-direction: column; align-items: center; animation: floatUp 2.6s cubic-bezier(.25, .8, .4, 1) forwards; }
.floatr .fe { font-size: 52px; filter: drop-shadow(0 4px 0 var(--line)); animation: sway .5s ease-in-out infinite alternate; }
.floatr .fn { font-family: var(--display); font-size: 14px; background: var(--pc); color: #fff; text-shadow: var(--outline); border: 2px solid var(--line); border-radius: 99px; padding: 0 9px; }
.tv .floatr .fe, body.tvmode .floatr .fe { font-size: 90px; }
body.tvmode .floatr .fn { font-size: 24px; }
@keyframes floatUp { 0% { transform: translateY(0) scale(.5); opacity: 0; } 15% { opacity: 1; transform: translateY(-15vh) scale(1.1); } 80% { opacity: 1; } 100% { transform: translateY(-75vh) scale(1); opacity: 0; } }
@keyframes sway { from { transform: rotate(-10deg); } to { transform: rotate(10deg); } }

/* giocatori */
.strip { display: flex; gap: 4px; overflow-x: auto; padding: 12px 4px 6px; scrollbar-width: none; justify-content: safe center; }
.strip::-webkit-scrollbar { display: none; }
.chip { flex: none; width: 72px; text-align: center; position: relative; }
.ring { --p: 1; position: relative; width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; padding: 4px; background: var(--pc); border: 3px solid var(--line); box-shadow: 0 3px 0 var(--line); transition: transform .2s; }
.chip.cur .ring { background: conic-gradient(var(--yel) calc(var(--p) * 360deg), #3a2266 0); box-shadow: 0 3px 0 var(--line), 0 0 22px rgba(255, 210, 63, .6); transform: scale(1.1); }
.pa { width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; background: radial-gradient(circle at 50% 35%, #44207e, #1d0b38); border: 2px solid var(--line); }
.cnt { position: absolute; right: -8px; bottom: -6px; min-width: 25px; height: 25px; padding: 0 5px; border-radius: 13px; background: var(--paper); color: var(--line); border: 2.5px solid var(--line); font: 13px/20px var(--display); }
.tx { position: absolute; left: -8px; bottom: -6px; height: 25px; padding: 0 6px; border-radius: 13px; background: var(--hot); color: #fff; border: 2.5px solid var(--line); font: 13px/20px var(--display); text-shadow: 1px 1px 0 var(--line); animation: pop .4s; }
.crown { position: absolute; top: -13px; left: 50%; transform: translateX(-50%) rotate(-8deg); font-size: 17px; filter: drop-shadow(0 2px 0 var(--line)); }
.chip .pn { font-size: 12px; margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 900; }
.chip .ps { font-size: 10px; color: var(--mute); text-transform: uppercase; letter-spacing: .5px; min-height: 13px; }
.chip.cur .pn, .chip.cur .ps { color: var(--yel); }
.chip.dead { opacity: .5; filter: grayscale(1); }
.chip.off .pa { opacity: .45; }

/* tavolo */
.table {
  display: grid; grid-template-columns: auto auto 1fr; gap: 16px; align-items: center; padding: 18px 16px 20px; margin-top: 6px; border-radius: 28px; position: relative;
  border: 3px solid var(--line);
  background: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1.5px) 0 0 / 7px 7px, radial-gradient(ellipse at 50% 30%, #44268f, #2a1561 60%, #1d0d48);
  box-shadow: inset 0 0 0 5px #c48a36, inset 0 0 0 8px #6b4214, inset 0 0 0 10px var(--line), inset 0 14px 30px rgba(0, 0, 0, .5), 0 6px 0 var(--line), 0 16px 30px rgba(0, 0, 0, .45);
}
.deck { position: relative; display: flex; flex-direction: column; align-items: center; }
.dc { position: absolute; bottom: -12px; left: 50%; transform: translateX(-62%); background: var(--yel); color: var(--line); border: 3px solid var(--line); font: 17px/22px var(--display); min-width: 38px; padding: 0 8px; border-radius: 14px; text-align: center; z-index: 2; box-shadow: 0 3px 0 var(--line); }
.pile { position: relative; width: 70px; aspect-ratio: 5 / 7; }
.pile .card { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; }
.pile .card.under { transform: rotate(-12deg) translate(-6px, 2px); filter: brightness(.7); }
.pile .card.top { transform: rotate(6deg); animation: land .35s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes land { from { transform: translateY(-40px) rotate(-20deg) scale(1.2); opacity: 0; } }
.status { font-size: 15px; line-height: 1.3; min-width: 0; }
.status .st { margin-top: 8px; }
.status .mini { font-size: 14px; }
.timer { position: relative; height: 14px; background: #170828; border: 2px solid var(--line); border-radius: 99px; margin-top: 10px; overflow: hidden; }
.timer i { position: absolute; top: 0; right: auto; bottom: 0; left: 0; background: linear-gradient(180deg, #ffe680, var(--yel) 50%, #f0b400 50%); border-radius: 99px; transition: width .2s linear; }
.timer b { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); font-size: 10px; line-height: 1; color: #fff; text-shadow: var(--outline); }
.timer.red i, .timer.low i { background: linear-gradient(180deg, #ff8090, var(--red) 50%, #d01c38 50%); }

/* rischio esplosione */
.risk { --pct: 0%; display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; row-gap: 5px; background: #170828; border: 3px solid var(--line); border-radius: 16px; padding: 5px 10px 7px 6px; box-shadow: 0 3px 0 var(--line); }
.risk .rb { font-size: 26px; grid-row: span 2; animation: rattle 1.2s ease-in-out infinite; }
.risk .rt { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; line-height: 1; min-width: 0; }
.risk .rt b { font-family: var(--display); font-weight: 400; font-size: 24px; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.risk .rt small { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--mute); }
.risk .rbar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.risk .rbar i { display: block; height: 100%; width: var(--pct); border-radius: 99px; background: var(--rc); transition: width .5s; }
.risk.r-low { --rc: #3ddc84; } .risk.r-low b { color: #6ff0a8; }
.risk.r-mid { --rc: var(--yel); } .risk.r-mid b { color: var(--yel); }
.risk.r-high { --rc: var(--hot); } .risk.r-high b { color: #ff9a5c; } .risk.r-high .rb { animation-duration: .5s; }
.risk.r-max { --rc: var(--red); border-color: var(--red); animation: alarm .8s ease-in-out infinite alternate; } .risk.r-max b { color: #ff8090; } .risk.r-max .rb { animation-duration: .25s; }
@keyframes rattle { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(-14deg); } 90% { transform: rotate(12deg); } }
@keyframes alarm { to { box-shadow: 0 3px 0 var(--line), 0 0 22px rgba(255, 59, 79, .8); } }

.log { list-style: none; padding: 0; margin: 16px 0 6px; font-size: 13px; color: var(--mute); }
.log li { padding: 3px 0 3px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid rgba(255, 255, 255, .12); }
.log li:first-child { color: var(--ink); font-size: 14px; border-left-color: var(--yel); animation: slideIn .3s; }
@keyframes slideIn { from { transform: translateX(-12px); opacity: 0; } }
.k-boom { color: #ff8a8a !important; }
.k-big, .k-nope { color: var(--yel) !important; }
.info { min-height: 44px; font-size: 13px; background: var(--panel2); border: 3px solid var(--line); border-radius: 16px; padding: 8px 12px; margin-top: auto; color: #eadfff; }
.hand { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 10px; padding: 26px 3px 16px; max-height: 52vh; max-height: 52dvh; overflow-y: auto; scrollbar-width: none; }
.hand::-webkit-scrollbar { display: none; }
.hand .card { width: 100%; }
.nohand { color: var(--mute); padding: 30px; grid-column: 1 / -1; text-align: center; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions .btn { padding: 14px 8px; font-size: 19px; }
.iamdead .hand { filter: grayscale(1); opacity: .5; }

/* =========================================================
   MODALI / SHEET
   ========================================================= */
.modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(8, 2, 20, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; z-index: 50; animation: fade .2s; }
.mbox { position: relative; width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; overflow: auto; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: var(--panel); border: 3px solid var(--line); border-bottom: 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .5), inset 0 3px 0 rgba(255, 255, 255, .08); animation: up .3s cubic-bezier(.2, 1.2, .4, 1); -webkit-user-select: text; user-select: text; }
.modal.danger .mbox { background: #12583b; box-shadow: 0 -10px 50px rgba(34, 195, 122, .4); }
.modal.over .mbox { text-align: center; }
.mbox h2 { margin: 0 0 8px; font-size: 30px; line-height: 1.05; text-shadow: var(--outline), 0 4px 0 var(--line); }
.mbox p { margin: 6px 0 12px; color: #e8dcff; }
.mx { position: absolute; top: 12px; right: 12px; background: var(--panel2); border: 3px solid var(--line); color: #fff; width: 38px; height: 38px; border-radius: 12px; cursor: pointer; font-size: 15px; box-shadow: 0 3px 0 var(--line); }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(60px); opacity: 0; } }
.grid { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 14px 0; }
.grid .card:not(.small) { width: 96px; }
.peek .pk { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--yel); font-family: var(--display); font-size: 18px; }
.peek .card.small { width: 90px; }
.targets { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 12px; }
.tgt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px; border-radius: 18px; border: 3px solid var(--line); background: var(--panel2); box-shadow: 0 4px 0 var(--line); color: var(--ink); cursor: pointer; font-weight: 900; }
.tgt:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.tgt .pa { width: 58px; height: 58px; font-size: 30px; border: 3px solid var(--pc); }
.tgt small { color: var(--mute); }
.tgt:disabled { opacity: .35; }
.placer { margin: 18px 0 10px; }
.placer input { width: 100%; accent-color: var(--yel); height: 34px; }
.poslabel { text-align: center; font-family: var(--display); font-size: 21px; color: var(--yel); margin-top: 6px; text-shadow: 0 2px 0 var(--line); }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.row3 .btn { font-size: 15px; padding: 10px 6px; }
.row2 { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.row2 .btn.big { margin: 0; flex: 1.4; }
.row2 > .btn:not(.big), .row2 > span { flex: 1; text-align: center; }
.alter { list-style: none; padding: 0; display: grid; gap: 8px; counter-reset: a; }
.alter li { display: flex; align-items: center; gap: 14px; background: var(--panel2); border: 3px solid var(--line); border-radius: 16px; padding: 8px 12px; }
.alter li::before { counter-increment: a; content: counter(a) "ª"; font-family: var(--display); font-size: 28px; color: var(--yel); width: 34px; text-shadow: 0 2px 0 var(--line); }
.arrows { margin-left: auto; display: flex; flex-direction: column; gap: 8px; }
.rules ol { padding-left: 20px; }
.rules-cards { display: grid; gap: 12px; }
.rc { display: flex; gap: 14px; align-items: center; background: var(--panel2); border: 3px solid var(--line); border-radius: 16px; padding: 8px; }
.rc p { margin: 0; font-size: 14px; }
.win-av { font-size: 96px; line-height: 1.1; animation: bob 1.5s ease-in-out infinite; filter: drop-shadow(0 6px 0 var(--line)); }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0 auto; max-width: 560px;
  background: #5c0f24; border: 3px solid var(--line); border-bottom: 0; border-radius: 26px 26px 0 0;
  padding: 14px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(255, 59, 79, .35), inset 0 3px 0 rgba(255, 255, 255, .1); animation: up .25s cubic-bezier(.2, 1.2, .4, 1);
}
.sheet::before { content: '⚡ MOSSA IN CORSO'; display: block; font: 12px var(--display); letter-spacing: 1.5px; color: #ff9aa5; margin-bottom: 4px; }
.sheet.noped { background: #33081a; }
.sheet-t { font-size: 17px; }
.nopes { color: var(--yel); margin-top: 6px; font-size: 14px; font-weight: 900; }
.sheet .btn.red { animation: nudge 1s ease-in-out infinite; }
@keyframes nudge { 50% { transform: scale(1.04) rotate(-1deg); } }

/* =========================================================
   TOAST / EFFETTI
   ========================================================= */
#toasts { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 6px; width: min(92vw, 440px); pointer-events: none; }
.toast { background: var(--panel); border: 3px solid var(--line); border-radius: 16px; padding: 10px 14px; box-shadow: 0 4px 0 var(--line), 0 12px 26px rgba(0, 0, 0, .45); animation: drop .3s cubic-bezier(.2, 1.3, .4, 1); transition: opacity .4s, transform .4s; }
.toast.err { background: #6b1426; }
.toast.cardt { background: #3b2470; }
.toast.out { opacity: 0; transform: translateY(-10px); }
@keyframes drop { from { transform: translateY(-24px); opacity: 0; } }
#conn { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); background: var(--red); border: 3px solid var(--line); padding: 6px 16px; border-radius: 99px; z-index: 120; font-size: 13px; }
#fx { position: fixed; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.burst { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; animation: burstIn .3s ease-out, burstOut .4s ease-in forwards; animation-delay: 0s, var(--d, 1.5s); }
.burst.boom { background: radial-gradient(circle, rgba(255, 230, 100, .97), rgba(255, 100, 20, .92) 25%, rgba(190, 0, 30, .88) 55%, rgba(20, 0, 10, .96) 85%); --d: 2.1s; }
.burst.boom::before { content: ''; position: absolute; top: -50%; right: -50%; bottom: -50%; left: -50%; background: repeating-conic-gradient(rgba(255, 255, 255, .14) 0 6deg, transparent 6deg 14deg); animation: spin 6s linear infinite; }
.burst.defuse { background: radial-gradient(circle, rgba(34, 195, 122, .8), rgba(8, 40, 25, .65) 70%); --d: 1.6s; }
.burst.nope { --d: 1.1s; background: radial-gradient(circle, rgba(255, 59, 79, .35), transparent 70%); }
.burst.attack { background: radial-gradient(circle, rgba(255, 107, 26, .6), transparent 70%); --d: 1.2s; }
.burst.fly { --d: 1.1s; }
.burst.rev { --d: .8s; }
.burst > * { position: relative; }
.big-e { font-size: 140px; line-height: 1; animation: pop .5s cubic-bezier(.2, 2, .4, 1); filter: drop-shadow(0 8px 0 var(--line)); }
.bt { font-family: var(--comic); font-size: 88px; letter-spacing: 4px; color: var(--paper); text-shadow: 4px 0 var(--line), -4px 0 var(--line), 0 4px var(--line), 0 -4px var(--line), 3px 3px var(--line), -3px -3px var(--line), 3px -3px var(--line), -3px 3px var(--line), 0 10px 0 var(--line); animation: pop .45s cubic-bezier(.2, 2, .4, 1) .05s backwards; }
.boom .bt { color: var(--yel); font-size: 110px; }
.bs { font-family: var(--display); font-size: 25px; text-shadow: var(--outline), 0 4px 0 var(--line); padding: 0 16px; }
.stamp { font-family: var(--comic); font-size: 72px; letter-spacing: 2px; color: #fff; background: var(--red); padding: 4px 28px; border: 6px solid var(--line); outline: 4px solid #fff; outline-offset: -12px; border-radius: 16px; transform: rotate(-12deg); animation: stamp .35s cubic-bezier(.2, 2, .4, 1); box-shadow: 0 10px 0 var(--line), 0 20px 40px rgba(0, 0, 0, .6); text-shadow: var(--outline); }
.flycards { display: flex; gap: 14px; animation: flyIn .5s cubic-bezier(.2, 1.4, .4, 1); }
.flycards .card { width: min(30vw, 230px); }
@keyframes flyIn { from { transform: translateY(70vh) rotate(25deg) scale(.5); } }
.spin1 { animation: spin .8s ease-in-out; }
@keyframes pop { from { transform: scale(.2); opacity: 0; } }
@keyframes stamp { from { transform: scale(3) rotate(-12deg); opacity: 0; } }
@keyframes burstIn { from { opacity: 0; } }
@keyframes burstOut { to { opacity: 0; } }
.shake { animation: shake .6s; }
@keyframes shake { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); } 30%, 50%, 70% { transform: translate(-9px, 3px); } 40%, 60% { transform: translate(9px, -3px); } }
.confetti span { position: absolute; top: -40px; animation: fall 3.2s linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.wiggle { animation: wiggle .5s; }
@keyframes wiggle { 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }

/* =========================================================
   TV
   ========================================================= */
.screen.tv { max-width: none; min-height: 100vh; padding: 2vw 3vw; }
.tvjoin { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; max-width: 660px !important; margin: 0 auto; text-align: center; }
.tvjoin .join-row { width: 100%; }
.audio-btn { position: fixed; right: 18px; bottom: 18px; z-index: 60; border: 3px solid var(--line); border-radius: 99px; padding: 11px 20px; color: #fff; font-family: var(--display); font-size: 18px; cursor: pointer; background: var(--hot); box-shadow: 0 5px 0 var(--line); text-shadow: var(--outline); animation: nudge 1.2s ease-in-out infinite; }
.tvlobby { display: grid; grid-template-columns: 1.1fr 1fr; gap: 4vw; align-items: center; }
.tvl-left { display: flex; flex-direction: column; align-items: center; }
.joinhow { display: flex; gap: 2.5vw; align-items: center; justify-content: center; margin-top: 3vw; padding: 2vw 2.4vw; }
.joinhow .small { font-size: clamp(14px, 1.3vw, 24px); text-transform: uppercase; letter-spacing: 2px; }
.url { font-family: var(--display); font-size: clamp(16px, 1.8vw, 34px); color: var(--paper); margin-bottom: 1vw; white-space: nowrap; }
.tvl-right h2 { font-size: clamp(30px, 3vw, 58px); margin: 0 0 1.2vw; text-shadow: var(--outline), 0 4px 0 var(--line); }
.tvplayers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1vw; }
.tvp { display: flex; align-items: center; gap: 1.2vw; background: var(--panel); border: 3px solid var(--line); box-shadow: 0 4px 0 var(--line); border-radius: 20px; padding: .8vw 1.2vw; font-family: var(--display); font-size: clamp(16px, 1.7vw, 32px); }
.tvp .pa { width: clamp(40px, 4vw, 76px); height: clamp(40px, 4vw, 76px); font-size: clamp(24px, 2.4vw, 46px); border: 4px solid var(--pc); flex: none; }
.pop { animation: pop .45s cubic-bezier(.2, 1.8, .4, 1); }
.hint { color: var(--mute); font-size: clamp(14px, 1.3vw, 24px); margin-top: 2vw; }

.tvgame { display: grid; grid-template-rows: auto auto 1fr auto; gap: 1.4vw; height: 100vh; overflow: hidden; }
.tv-top { display: flex; justify-content: space-between; align-items: center; color: var(--mute); font-size: clamp(13px, 1.2vw, 22px); }
.tv-players { display: flex; gap: 1.6vw; justify-content: center; flex-wrap: wrap; padding-top: 1vw; }
.chip.big { width: 9vw; min-width: 80px; }
.chip.big .ring { width: 6.4vw; height: 6.4vw; min-width: 60px; min-height: 60px; padding: .35vw; }
.chip.big .pa { font-size: clamp(28px, 3.3vw, 62px); }
.chip.big .cnt, .chip.big .tx { height: clamp(24px, 2.2vw, 40px); min-width: clamp(24px, 2.2vw, 40px); line-height: calc(clamp(24px, 2.2vw, 40px) - 5px); font-size: clamp(13px, 1.3vw, 24px); border-radius: 99px; }
.chip.big .crown { font-size: clamp(16px, 1.6vw, 30px); top: -1.4vw; }
.chip.big .pn { font-size: clamp(13px, 1.3vw, 26px); }
.chip.big .ps { font-size: clamp(10px, .8vw, 16px); }
.chip.big.cur .ring { transform: scale(1.12); }
.tv-mid {
  display: grid; grid-template-columns: auto auto 1fr; gap: 4.5vw; align-items: center; padding: 2.5vw 4.5vw; margin: 0 2vw; border-radius: 22vw / 12vw;
  border: 4px solid var(--line);
  background: radial-gradient(rgba(255, 255, 255, .045) 1px, transparent 1.5px) 0 0 / 9px 9px, radial-gradient(ellipse at 50% 35%, #4a2a9a, #2a1561 60%, #1a0b42);
  box-shadow: inset 0 0 0 .6vw #c48a36, inset 0 0 0 1vw #6b4214, inset 0 0 0 calc(1vw + 4px) var(--line), inset 0 2vw 4vw rgba(0, 0, 0, .55), 0 1vw 0 var(--line), 0 2vw 4vw rgba(0, 0, 0, .5);
}
.deck.huge .cardback { width: 11vw; border-width: 4px; }
.deck.huge .dc { font-size: clamp(18px, 2.2vw, 42px); line-height: 1.25; padding: 0 1vw; border-radius: 99px; bottom: auto; top: calc(11vw * 1.4 - 1.2vw); }
.deck.huge .dl { margin-top: 3.6vw; color: var(--mute); font-size: clamp(11px, 1vw, 20px); }
.risk.big { margin-bottom: 1.2vw; max-width: 26vw; padding: .5vw 1vw .7vw .6vw; border-radius: 1.2vw; min-width: 13vw; }
.risk.big .rb { font-size: clamp(24px, 2.6vw, 50px); }
.risk.big .rt b { font-size: clamp(22px, 2.6vw, 50px); }
.risk.big .rt small { font-size: clamp(9px, .75vw, 15px); }
.risk.big .rbar { height: clamp(6px, .6vw, 12px); }
.fan { position: relative; width: 15vw; aspect-ratio: 5 / 7; }
.fan .card { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; cursor: default; border-width: 4px; }
.fan .card.under:nth-child(1) { transform: rotate(-14deg) translate(-1.6vw, .6vw); filter: brightness(.6); }
.fan .card.under:nth-child(2) { transform: rotate(-6deg) translate(-.6vw, .2vw); filter: brightness(.8); }
.fan .card.top { transform: rotate(5deg); animation: land .4s cubic-bezier(.2, 1.4, .4, 1); }
.fan .card.empty { position: static; width: 100%; height: 100%; }
.tv-status { font-size: clamp(18px, 2.1vw, 44px); }
.tv-status .mini { font-size: .85em; }
.tv-status .timer { height: max(14px, 1.2vw); margin: 1vw 0; }
.tv-status .timer b { font-size: clamp(10px, .8vw, 18px); }
.turnis { font-family: var(--display); text-shadow: 0 3px 0 var(--line); }
.turnis .x { color: var(--hot); }
.announce { margin-top: 1.4vw; font-size: clamp(15px, 1.6vw, 34px); background: var(--panel2); border: 3px solid var(--line); box-shadow: 0 4px 0 var(--line); border-radius: 20px; padding: 1vw 1.5vw; animation: slideIn .35s; }
.pend.noped { color: #ff9aa5; }
.pend.noped .mini { text-decoration: line-through; }
.pend .nopes { display: block; }
.winner { font-family: var(--comic); font-size: clamp(42px, 5vw, 110px); color: var(--yel); text-shadow: 3px 3px 0 var(--line), -3px -3px 0 var(--line), 3px -3px 0 var(--line), -3px 3px 0 var(--line), 0 8px 0 var(--line); line-height: 1; }
.winner .win-av { font-size: 1.4em; }
.tv-log { list-style: none; margin: 0 2vw; padding: 1vw 2vw; background: var(--panel2); border: 3px solid var(--line); border-radius: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: .2vw 2vw; font-size: clamp(12px, 1.05vw, 22px); color: var(--mute); }
.tv-log li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-log li:first-child { color: var(--ink); }
.tv .card { cursor: default; }

@media (max-width: 900px) {
  .tvlobby { grid-template-columns: 1fr; }
  .tv-mid { grid-template-columns: 1fr 1fr; border-radius: 40px; }
  .tv-status { grid-column: 1 / -1; }
  .tv-log { grid-template-columns: 1fr; }
  .tvgame { height: auto; overflow: visible; }
}
@media (max-width: 370px) {
  .hand { grid-template-columns: repeat(3, 1fr); }
  .logo span { font-size: 48px; }
  .logo .hot { font-size: 54px; }
  .tb-r { gap: 4px; }
  .ico { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* =========================================================
   v3: illustrazioni, avatar, TV regista
   ========================================================= */
.avsvg { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; line-height: 1; flex: none; }
.avsvg svg { width: 100%; height: 100%; display: block; overflow: visible; }
.avsvg.sm { width: 1.7em; height: 1.7em; vertical-align: -.5em; margin-right: .25em; }
.avsvg.md { width: 56px; height: 56px; }
.avsvg.xl { width: 128px; height: 128px; }
.avsvg.dead { filter: grayscale(1) brightness(.7); opacity: .7; }
.cart { width: 88%; height: 88%; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; transform: rotate(-3deg); transition: transform .2s; }
.cart svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 calc(var(--u, 1cqw) * 1.5) 0 rgba(23, 8, 40, .35)); }
.card.sel .cart { transform: rotate(4deg) scale(1.08); }
.card.k-bomb .cart { animation: tick .45s ease-in-out infinite alternate; }
.card.t-j_dj .cart { animation: groove .6s ease-in-out infinite alternate; }
.cb-art { width: calc(var(--u, 1cqw) * 70); height: calc(var(--u, 1cqw) * 70); margin-top: calc(var(--u, 1cqw) * 4); transform: rotate(-8deg); }
.cb-art svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 calc(var(--u, 1cqw) * 2) 0 var(--line)); }
.cb-in .cb-t { margin-top: -calc(var(--u, 1cqw) * 4); }

/* nuove carte */
.card.k-padded { background: repeating-linear-gradient(-45deg, #ffd0e6 0 7px, #ff7eb6 7px 14px); }
.card.k-padded .cf { margin: calc(var(--u, 1cqw) * 4); height: calc(100% - calc(var(--u, 1cqw) * 8)); border: 2px solid var(--line); border-radius: calc(var(--u, 1cqw) * 8); }
.card.k-padded .ch { background: #ff4f9a; }
.card.k-super .ch { background: linear-gradient(180deg, #ff5a5a, #c1121f); }
.card.k-super .ch small { color: var(--yel); }
.card.k-super .ca { background: repeating-conic-gradient(from 0deg at 50% 55%, rgba(255, 240, 120, .45) 0 9deg, transparent 9deg 20deg), radial-gradient(circle at 50% 55%, #fff6b0, color-mix(in srgb, var(--c) 70%, #fff 30%) 45%, var(--c) 95%); }
.card.k-super { box-shadow: 0 4px 0 var(--line), 0 0 0 3px #ffd23f inset, 0 10px 18px rgba(0, 0, 0, .35); }
.card.t-bonsy .ch { background: linear-gradient(90deg, #00a6a6, #00c2a8); }

/* telefono: home / lobby */
.howto { margin: 16px 0 0; padding: 12px 14px; background: var(--panel2); border: 3px dashed rgba(255, 255, 255, .2); border-radius: 16px; font-size: 14px; color: #e8dcff; }
.aved { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin: 6px 0 4px; }
.avprev { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.avprev .avsvg.xl { width: 104px; height: 104px; filter: drop-shadow(0 5px 0 var(--line)); animation: bob 2.2s ease-in-out infinite; }
.avprev .btn { padding: 6px 10px; font-size: 14px; }
.avopts { display: grid; gap: 6px; min-width: 0; }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.sw { aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--line); background: var(--sw); cursor: pointer; padding: 0; box-shadow: 0 2px 0 var(--line); }
.sw.on { outline: 3px solid var(--yel); outline-offset: 1px; transform: scale(1.1); }
.avrow { display: grid; grid-template-columns: 64px 30px 1fr 30px; align-items: center; gap: 4px; font-size: 13px; }
.avrow .ico { width: 30px; height: 30px; font-size: 12px; border-radius: 9px; }
.avk { color: var(--mute); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; font-weight: 900; }
.avl { text-align: center; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-tag { display: inline-flex; align-items: center; gap: 2px; font-size: 15px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.joined { text-align: center; padding: 14px; background: #12583b; border: 3px solid var(--line); border-radius: 20px; box-shadow: 0 5px 0 var(--line); margin: 8px 0 4px; }
.big-ok { font-family: var(--display); font-size: 28px; text-shadow: var(--outline), 0 3px 0 var(--line); }
.joined p { margin: 6px 0 0; }
.mini-players { display: flex; flex-wrap: wrap; gap: 8px; }
.mp { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 3px solid var(--line); border-radius: 99px; padding: 3px 12px 3px 4px; font-size: 14px; }
.mp .avsvg { width: 34px; height: 34px; }
.mp i { font-style: normal; font-weight: 900; }

/* telefono: partita */
.banner { margin: 8px 0 4px; padding: 10px 14px; background: var(--panel); border: 3px solid var(--line); border-radius: 18px; box-shadow: 0 4px 0 var(--line); font-size: 17px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.banner.go { background: linear-gradient(180deg, #ff8a3d, #ff6b1a); font-size: 15px; }
#app .banner.go > b { font-family: var(--display); font-weight: 400; font-size: 30px; letter-spacing: 1px; text-shadow: var(--outline), 0 3px 0 var(--line); }
.banner.go .x { font-family: var(--display); font-size: 20px; color: var(--yel); text-shadow: var(--outline); }
.banner .timer { flex-basis: 100%; margin-top: 4px; }
.banner.dead { background: #3a0d1c; }
.mystat { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.mystat:empty { display: none; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; background: var(--panel2); border: 2.5px solid var(--pc, var(--line)); font-size: 13px; font-weight: 900; }
.pill.warn { background: #ff4f9a; color: #fff; border-color: var(--line); animation: nudge 1s ease-in-out infinite; }
.game .info { margin-top: 6px; }
.game .hand { max-height: none; flex: 1; align-content: start; }
.tgt .avsvg.md { width: 62px; height: 62px; }
.tgt.on { background: #4a2a86; box-shadow: 0 0 0 3px var(--yel), 0 4px 0 var(--line); }
.win-av .avsvg.xl { width: 140px; height: 140px; }

/* TV: lobby */
body.tvmode #app { min-height: 100vh; }
.tvlobby2 { display: flex; flex-direction: column; gap: 1.2vw; height: 100vh; overflow: auto; padding: 1.4vw 2.4vw !important; }
.tv-top { display: flex; justify-content: space-between; align-items: center; gap: 1vw; color: var(--mute); font-size: clamp(13px, 1.1vw, 22px); }
.lob-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: 2.4vw; align-items: start; }
.lob-grid.with-board { grid-template-columns: minmax(0, .75fr) minmax(0, 1.5fr) minmax(0, .8fr); }
.lob-join { display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--panel); border: 3px solid var(--line); border-radius: 26px; box-shadow: 0 6px 0 var(--line); padding: 1.6vw; gap: .3vw; }
.lob-join .qr.big { width: min(100%, 19vw); margin-bottom: .8vw; }
.lob-join .small { font-size: clamp(12px, 1vw, 20px); text-transform: uppercase; letter-spacing: 1.5px; }
.lob-main { min-width: 0; display: flex; flex-direction: column; }
.lob-main h2 { margin: 0 0 .8vw; font-size: clamp(24px, 2.4vw, 46px); text-shadow: var(--outline), 0 4px 0 var(--line); }
.lob-main h3 { margin: 1.2vw 0 .6vw; font-size: clamp(16px, 1.5vw, 28px); }
.lob-main .tvplayers { grid-template-columns: repeat(auto-fill, minmax(min(15vw, 260px), 1fr)); gap: .8vw; }
.tvp { position: relative; padding: .5vw 1vw .5vw .5vw; font-size: clamp(14px, 1.35vw, 26px); }
.tvp .avsvg.md { width: clamp(40px, 3.6vw, 70px); height: clamp(40px, 3.6vw, 70px); }
.tvn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tvp .x { width: 28px; height: 28px; font-size: 12px; opacity: .55; flex: none; }
.tvp .x:hover { opacity: 1; }
.bot { font-style: normal; font-size: .6em; background: var(--blu); color: #fff; border: 2px solid var(--line); border-radius: 8px; padding: 0 5px; vertical-align: middle; font-family: var(--display); letter-spacing: .5px; }
.addbot { justify-content: center; cursor: pointer; color: var(--mute); border-style: dashed; background: transparent; box-shadow: none; min-height: clamp(50px, 4.6vw, 84px); }
.addbot:hover { color: var(--ink); border-color: var(--yel); }
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8vw; }
.mode { display: flex; flex-direction: column; align-items: center; gap: .2vw; padding: .8vw .6vw; border-radius: 18px; border: 3px solid var(--line); background: var(--panel); box-shadow: 0 4px 0 var(--line); cursor: pointer; text-align: center; color: var(--ink); }
.mode b { font-family: var(--display); font-weight: 400; font-size: clamp(15px, 1.4vw, 26px); }
.mode small { color: var(--mute); font-size: clamp(10px, .8vw, 15px); line-height: 1.2; }
.mde { font-size: clamp(22px, 2.4vw, 44px); }
.mode.on { background: #4a2a86; box-shadow: 0 0 0 3px var(--yel), 0 4px 0 var(--line); transform: translateY(-3px); }
.tvset { grid-template-columns: 1fr 1fr; margin-top: .9vw; }
.tvset label { font-size: clamp(12px, .95vw, 18px); }
.lob-main .btn.start { font-size: clamp(20px, 2vw, 38px); padding: 1vw; margin-top: 1.2vw; }
.board { background: var(--panel); border: 3px solid var(--line); border-radius: 22px; box-shadow: 0 5px 0 var(--line); padding: 1vw 1.2vw; }
.board h3 { margin: 0 0 .6vw; font-size: clamp(16px, 1.4vw, 28px); }
.board ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .4vw; }
.board li { display: flex; align-items: center; gap: .5vw; font-size: clamp(13px, 1.1vw, 22px); background: var(--panel2); border-radius: 12px; padding: .3vw .6vw; }
.board .md { width: 1.8em; text-align: center; }
.board .bn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 900; }
.board .bw { color: var(--mute); font-size: .8em; }
.board li b { font-family: var(--display); font-weight: 400; font-size: 1.4em; color: var(--yel); min-width: 1.6em; text-align: right; text-shadow: 0 2px 0 var(--line); }

/* TV: tavolo */
.tvgame2 { display: flex; flex-direction: column; height: 100vh; overflow: hidden; padding: 1vw 1.6vw !important; }
.stage { position: relative; flex: 1; min-height: 0; margin-top: .6vw; }
.felt {
  position: absolute; top: 13%; right: 12%; bottom: 14%; left: 12%; border-radius: 50%; border: 4px solid var(--line);
  background: radial-gradient(rgba(255, 255, 255, .045) 1px, transparent 1.5px) 0 0 / 9px 9px, radial-gradient(ellipse at 50% 35%, #4a2a9a, #2a1561 60%, #1a0b42);
  box-shadow: inset 0 0 0 .7vw #c48a36, inset 0 0 0 1.1vw #6b4214, inset 0 0 0 calc(1.1vw + 4px) var(--line), inset 0 2vw 4vw rgba(0, 0, 0, .55), 0 1vw 0 var(--line), 0 2vw 5vw rgba(0, 0, 0, .55);
  transition: filter .5s;
}
.tablec { position: absolute; top: 24%; right: 22%; bottom: 25%; left: 22%; display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 2.4vw; align-items: center; z-index: 2; }
.tvgame2 .deck.huge .cardback { width: 7.6vw; }
.tvgame2 .deck.huge .dc { top: calc(7.6vw * 1.4 - 1.4vw); font-size: clamp(16px, 1.8vw, 36px); }
.tvgame2 .fan { width: 9vw; }
.tvgame2 .tv-status { font-size: clamp(16px, 1.6vw, 34px); min-width: 0; }
.tvgame2 .announce { font-size: clamp(13px, 1.15vw, 24px); margin-top: .9vw; padding: .6vw 1vw; }
.tvgame2 .timer { margin: .7vw 0; }
.corner { position: absolute; z-index: 3; }
.corner.tl { left: 0; top: 0; }
.corner.bl { left: 0; bottom: 0; max-width: 30vw; }
.tvgame2 .risk.big { margin: 0; max-width: none; }
.padleft { margin-top: .5vw; font-size: clamp(11px, .9vw, 18px); }
.tvgame2 .tv-log { margin: 0; padding: .6vw 1vw; display: block; font-size: clamp(11px, .85vw, 17px); opacity: .9; }
.tvgame2 .tv-log li { padding: 1px 0; }
.seat { position: absolute; transform: translate(-50%, -50%); z-index: 4; width: 11vw; text-align: center; transition: transform .35s cubic-bezier(.2, 1.3, .4, 1), opacity .3s, filter .3s; }
.seat .ring { width: 6.6vw; height: 6.6vw; min-width: 56px; min-height: 56px; margin: 0 auto; padding: .25vw; border-width: 4px; }
.seat .ring > .avsvg { background: radial-gradient(circle at 50% 35%, #44207e, #1d0b38); border-radius: 50%; border: 2px solid var(--line); padding: 10%; }
.seat.cur .ring { background: conic-gradient(var(--yel) calc(var(--p) * 360deg), #3a2266 0); box-shadow: 0 3px 0 var(--line), 0 0 30px rgba(255, 210, 63, .7); }
.seat.cur { transform: translate(-50%, -50%) scale(1.15); z-index: 6; }
.seat .cnt { height: clamp(22px, 2vw, 38px); min-width: clamp(22px, 2vw, 38px); line-height: calc(clamp(22px, 2vw, 38px) - 5px); font-size: clamp(12px, 1.2vw, 22px); border-radius: 99px; right: -10%; bottom: -6%; }
.padb, .betb { position: absolute; font-size: clamp(14px, 1.4vw, 26px); filter: drop-shadow(0 2px 0 var(--line)); }
.padb { left: -14%; top: -8%; animation: bob 1.2s ease-in-out infinite; }
.betb { right: -22%; top: -6%; font: clamp(11px, 1vw, 20px) var(--display); background: var(--paper); color: var(--line); border: 2.5px solid var(--line); border-radius: 99px; padding: 0 .4em; filter: none; }
.seat .pn { font-family: var(--display); font-size: clamp(14px, 1.35vw, 28px); margin-top: .5vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--outline), 0 3px 0 var(--line); }
.seat.cur .pn { color: var(--yel); }
.seat .ps { font-size: clamp(10px, .8vw, 16px); color: var(--mute); text-transform: uppercase; letter-spacing: .5px; min-height: 1.2em; font-weight: 900; }
.seat.cur .ps { color: var(--yel); }
.seat .team { display: inline-block; font-size: clamp(10px, .8vw, 16px); background: var(--pc); color: #fff; border: 2px solid var(--line); border-radius: 99px; padding: 0 .6em; font-weight: 900; text-shadow: 1px 1px 0 var(--line); }
.seat.dead { opacity: .55; }
.seat.dead .ring { background: #444; }
.seat-fan { position: relative; height: 2.6vw; margin-bottom: -.8vw; }
.seat-fan i { position: absolute; left: 50%; bottom: 0; width: 1.5vw; height: 2.1vw; margin-left: -.75vw; border-radius: 3px; border: 2px solid var(--line); background: repeating-conic-gradient(from 0deg at 50% 50%, #5b23a8 0 20deg, #3d1580 20deg 40deg); transform-origin: 50% 140%; transform: rotate(calc(var(--k) * 9deg)); }
/* telecamera: zoom su chi pesca quando il rischio è alto */
.spotlight .felt { filter: brightness(.6); }
.spotlight .seat:not(.spot) { filter: brightness(.45) grayscale(.4); }
.seat.spot { transform: translate(-50%, -50%) scale(1.45); z-index: 8; }
.seat.spot .ring { animation: spotPulse .9s ease-in-out infinite alternate; }
.spotlight .stage::after { content: ''; position: absolute; top: -5%; right: -5%; bottom: -5%; left: -5%; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(0, 0, 0, .55) 75%); }
.spotmsg { font-family: var(--display); color: #ff9a5c; font-size: .8em; animation: nudge 1s ease-in-out infinite; text-shadow: 0 2px 0 var(--line); }
@keyframes spotPulse { to { box-shadow: 0 3px 0 var(--line), 0 0 60px rgba(255, 80, 60, .95); } }

/* TV: fine partita */
.tvover { display: flex; flex-direction: column; height: 100vh; overflow: hidden; padding: 1.4vw 2.4vw !important; }
.over-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 2vw; align-items: start; margin-top: 1vw; }
.podium { text-align: center; }
.winners { display: flex; justify-content: center; gap: 1.5vw; flex-wrap: wrap; }
.wcard { display: flex; flex-direction: column; align-items: center; gap: .4vw; font-family: var(--display); font-size: clamp(18px, 1.8vw, 36px); text-shadow: var(--outline); }
.wcard .avsvg.xl { width: 13vw; height: 13vw; filter: drop-shadow(0 8px 0 var(--line)); animation: bob 1.5s ease-in-out infinite; }
.podium .winner { margin: 1vw 0; font-size: clamp(32px, 3.6vw, 80px); }
.ranking { list-style: none; padding: 0; margin: 0; display: grid; gap: .4vw; text-align: left; }
.ranking li { display: flex; align-items: center; gap: .5vw; background: var(--panel); border: 3px solid var(--line); border-radius: 14px; padding: .3vw .8vw; font-size: clamp(13px, 1.1vw, 22px); font-weight: 900; }
.ranking .rk { font-family: var(--display); color: var(--yel); width: 1.4em; }
.ranking li span:nth-child(3) { flex: 1; }
.awards h3 { margin: 0 0 .8vw; font-size: clamp(18px, 1.6vw, 32px); }
.award { display: flex; align-items: center; gap: 1vw; background: var(--panel); border: 3px solid var(--line); border-radius: 18px; box-shadow: 0 4px 0 var(--line); padding: .7vw 1vw; margin-bottom: .8vw; animation: pop .5s cubic-bezier(.2, 1.8, .4, 1) backwards; }
.award:nth-child(3) { animation-delay: .15s; } .award:nth-child(4) { animation-delay: .3s; } .award:nth-child(5) { animation-delay: .45s; } .award:nth-child(6) { animation-delay: .6s; } .award:nth-child(7) { animation-delay: .75s; }
.award .ae { font-size: clamp(28px, 2.6vw, 52px); }
.award b { font-family: var(--display); font-weight: 400; font-size: clamp(16px, 1.4vw, 28px); color: var(--yel); }
.aw-who { font-size: clamp(13px, 1vw, 20px); }
.over-btns { display: grid; gap: .6vw; margin-top: 1vw; }
.over-btns .btn.big { margin: 0; font-size: clamp(16px, 1.5vw, 30px); }

/* effetti TV */
.flyer { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 95; will-change: transform; }
.flyer .flycards { animation: none; }
.flyer .flycards .card { width: clamp(110px, 12vw, 230px); }
.flyer.back .cardback { width: var(--w); box-shadow: 0 10px 20px rgba(0, 0, 0, .5); }
.burst.sus { z-index: 96; background: radial-gradient(circle, rgba(50, 14, 80, .93), rgba(5, 0, 15, .97) 70%); animation: burstIn .2s ease-out; }
.suspense { display: flex; align-items: center; gap: 4vw; }
.suspense .avsvg.xl { width: 22vmin; height: 22vmin; animation: shiverA .12s linear infinite; }
.cardback.shiver { width: 18vmin; animation: shiverA .1s linear infinite, grow var(--d, 1.2s) ease-in forwards; }
@keyframes shiverA { 0% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-3px, 2px) rotate(-2deg); } 50% { transform: translate(3px, -1px) rotate(1deg); } 75% { transform: translate(-2px, -2px) rotate(2deg); } }
@keyframes grow { to { scale: 1.35; } }
.burst.padded { background: radial-gradient(circle, rgba(255, 126, 182, .75), rgba(60, 0, 40, .7) 70%); --d: 1.6s; }
.burst.mirror { background: radial-gradient(circle, rgba(79, 157, 222, .55), rgba(5, 10, 30, .85) 70%); --d: 4.4s; }
.mirror-hand { display: flex; flex-wrap: wrap; justify-content: center; gap: 1vw; max-width: 90vw; margin-top: 2vh; }
.mirror-hand .card { width: clamp(80px, 9vw, 170px); animation: pop .4s cubic-bezier(.2, 1.8, .4, 1) backwards; }
.floatr.fromseat { transform: translateX(-50%); bottom: auto; animation: floatSeat 2.6s cubic-bezier(.25, .8, .4, 1) forwards; }
@keyframes floatSeat { 0% { transform: translate(-50%, 20px) scale(.4); opacity: 0; } 15% { opacity: 1; transform: translate(-50%, -20px) scale(1.15); } 80% { opacity: 1; } 100% { transform: translate(-50%, -26vh) scale(1); opacity: 0; } }

@media (max-width: 1000px) {
  .lob-grid, .lob-grid.with-board, .over-grid { grid-template-columns: 1fr; }
  .tvlobby2, .tvover { height: auto; overflow: visible; }
  .modes { grid-template-columns: 1fr 1fr; }
}

/* --- compatibilità browser vecchi (smart TV) --- */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .btn { background: linear-gradient(180deg, rgba(255, 255, 255, .25) 0 45%, transparent 45%), var(--b); }
  .ca { background: repeating-conic-gradient(from 0deg at 50% 55%, rgba(255, 255, 255, .22) 0 9deg, transparent 9deg 20deg), radial-gradient(circle at 50% 55%, rgba(255, 255, 255, .7), rgba(255, 255, 255, .15) 55%, transparent 95%), var(--c); }
  .card.k-super .ca { background: radial-gradient(circle at 50% 55%, #fff6b0, transparent 70%), var(--c); }
}
.no-cq .card, .no-cq .cardback { overflow: hidden; }

/* --- v4: effetti nuovi --- */
.flycap { text-align: center; margin-top: 10px; font-family: var(--display); font-size: clamp(18px, 1.8vw, 34px); color: #fff; text-shadow: var(--outline), 0 3px 0 var(--line); white-space: nowrap; }
.flyer .flycards { justify-content: center; }
.burst.shuffle { --d: 1.2s; background: radial-gradient(circle, rgba(110, 60, 35, .9), rgba(25, 8, 40, .95) 70%); }
.shuf { position: relative; width: 40vmin; height: 34vmin; }
.shc { position: absolute; left: 50%; top: 50%; width: 15vmin; margin: -10.5vmin 0 0 -7.5vmin; animation: riffle 1.15s cubic-bezier(.5, 0, .3, 1) both; animation-delay: calc(var(--i) * 25ms); z-index: var(--i); }
.shc .cardback { width: 15vmin; box-shadow: 0 6px 12px rgba(0, 0, 0, .5); }
@keyframes riffle {
  0% { transform: translate(0, calc(var(--i) * -2px)) rotate(0); }
  30% { transform: translate(calc(var(--s) * 13vmin), calc(var(--i) * -2px)) rotate(calc(var(--s) * 14deg)); }
  45% { transform: translate(calc(var(--s) * 13vmin), calc(var(--i) * -2px - 3vmin)) rotate(calc(var(--s) * -8deg)); }
  75% { transform: translate(0, calc(var(--i) * -3px)) rotate(calc(var(--s) * 3deg)); }
  100% { transform: translate(0, calc(var(--i) * -2px)) rotate(0); }
}
.burst.chiara { --d: 2.6s; background: radial-gradient(circle, rgba(255, 46, 136, .96), rgba(60, 0, 30, .97) 70%); animation: burstIn .2s ease-out, burstOut .4s ease-in forwards, scream .08s linear infinite; animation-delay: 0s, var(--d), 0s; }
.ch-art { width: 34vmin; height: 34vmin; animation: pop .4s cubic-bezier(.2, 2, .4, 1); }
.ch-art svg { width: 100%; height: 100%; filter: drop-shadow(0 8px 0 var(--line)); }
.bt.chi { font-size: clamp(30px, 6.4vw, 120px); letter-spacing: 2px; color: #ffd6ec; max-width: 96vw; word-break: break-all; line-height: .95; animation: pop .45s cubic-bezier(.2, 2, .4, 1) .05s backwards, stretch 2.4s ease-out .2s both; }
@keyframes stretch { from { letter-spacing: -6px; } to { letter-spacing: 6px; } }
@keyframes scream { 0% { transform: translate(0, 0); } 25% { transform: translate(-4px, 3px); } 50% { transform: translate(4px, -2px); } 75% { transform: translate(-3px, -3px); } }
.burst.meganight { --d: 3.3s; background: radial-gradient(circle at 50% 40%, #6b1fd1, #1b0640 60%, #05000f); overflow: hidden; }
.burst.meganight::before { content: ''; position: absolute; left: -50%; top: -50%; right: -50%; bottom: -50%; background: repeating-conic-gradient(rgba(255, 60, 200, .22) 0 8deg, rgba(60, 220, 255, .15) 8deg 16deg, transparent 16deg 30deg); animation: spin 3s linear infinite; }
.mn-art { width: 34vmin; height: 34vmin; animation: pop .5s cubic-bezier(.2, 2, .4, 1), bob 1s ease-in-out infinite .5s; }
.mn-art svg { width: 100%; height: 100%; }
.bt.mn { color: #ff7ae6; font-size: clamp(44px, 8vw, 150px); animation: pop .45s cubic-bezier(.2, 2, .4, 1) .7s backwards, discoHue 1s linear infinite; }
@keyframes discoHue { 0% { color: #ff7ae6; } 33% { color: #6ef0ff; } 66% { color: #ffd23f; } }
.mn-lights { position: absolute; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none; }
.mn-lights i { position: absolute; top: -10%; width: 6vw; height: 120%; left: calc(var(--x, 50) * 1%); background: linear-gradient(180deg, rgba(255, 255, 255, .35), transparent 70%); transform-origin: top center; animation: beam 1.4s ease-in-out infinite alternate; mix-blend-mode: screen; }
.mn-lights i:nth-child(odd) { background: linear-gradient(180deg, rgba(255, 80, 220, .45), transparent 70%); animation-duration: 1.1s; }
.mn-lights i:nth-child(3n) { background: linear-gradient(180deg, rgba(80, 230, 255, .45), transparent 70%); animation-duration: .9s; }
.mn-lights i:nth-child(1) { left: 2%; animation-delay: -0.00s; }
.mn-lights i:nth-child(2) { left: 9%; animation-delay: -0.23s; }
.mn-lights i:nth-child(3) { left: 16%; animation-delay: -0.46s; }
.mn-lights i:nth-child(4) { left: 23%; animation-delay: -0.69s; }
.mn-lights i:nth-child(5) { left: 30%; animation-delay: -0.92s; }
.mn-lights i:nth-child(6) { left: 37%; animation-delay: -1.15s; }
.mn-lights i:nth-child(7) { left: 44%; animation-delay: -1.38s; }
.mn-lights i:nth-child(8) { left: 51%; animation-delay: -0.21s; }
.mn-lights i:nth-child(9) { left: 58%; animation-delay: -0.44s; }
.mn-lights i:nth-child(10) { left: 65%; animation-delay: -0.67s; }
.mn-lights i:nth-child(11) { left: 72%; animation-delay: -0.90s; }
.mn-lights i:nth-child(12) { left: 79%; animation-delay: -1.13s; }
.mn-lights i:nth-child(13) { left: 86%; animation-delay: -1.36s; }
.mn-lights i:nth-child(14) { left: 93%; animation-delay: -0.19s; }
@keyframes beam { from { transform: rotate(-25deg); } to { transform: rotate(25deg); } }
.burst.event { --d: 2s; background: radial-gradient(circle, rgba(120, 70, 20, .92), rgba(30, 8, 50, .96) 70%); }
.evtag { font-family: var(--display); font-size: clamp(16px, 1.6vw, 30px); background: var(--yel); color: var(--line); border: 3px solid var(--line); border-radius: 99px; padding: 2px 16px; margin-bottom: 1vh; transform: rotate(-3deg); animation: pop .4s cubic-bezier(.2, 2, .4, 1); }
.burst.event .xray { margin-top: 2vh; animation: pop .5s cubic-bezier(.2, 2, .4, 1) .3s backwards; }
.burst.event .xray .card { width: clamp(110px, 14vw, 240px); filter: drop-shadow(0 0 30px rgba(120, 220, 255, .9)); }
.burst.event:has(.xray) { --d: 3.9s; }
.burst { z-index: 96; }
