/* ── Tonnara Tycoon — Styles ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy1: #070f1a;
  --navy2: #0b1828;
  --card:  #111d2c;
  --card2: #162234;
  --border: rgba(60,120,180,0.22);
  --teal:  #38c8c0;
  --gold:  #e8a83a;
  --red:   #e05050;
  --green: #4ecb82;
  --text:  #d8e8f8;
  --dim:   #5a7a9a;
  --radius: 14px;
  --tab-h: 56px;
}

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;            /* kill pull-to-refresh + overscroll bounce when swiping */
  background: var(--navy1);
  color: var(--text);
  font-family: 'Geist Mono', 'SF Mono', 'Menlo', monospace;
  font-size: 13px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;            /* 📱 niente scroll/contenuti che escono lateralmente */
}

/* ── 📱💻 Responsive hardening globale (iPhone · Android · PC) ── */
body { overflow-wrap: anywhere; word-break: break-word; }            /* testi lunghi non sforano */
img, video, svg { max-width: 100%; height: auto; }   /* NB: <canvas> ESCLUSO — è dimensionato via JS (pesca/minigiochi) */
table { max-width: 100%; }
input, textarea, select { max-width: 100%; }
pre, code { white-space: pre-wrap; word-break: break-word; }
/* 💻 PC: app centrata con cornice (non resta nuda sullo sfondo) */
@media (min-width: 481px) {
  body { background: radial-gradient(circle at 50% -10%, #0c1d33, #05080f); }
  #app { box-shadow: 0 0 0 1px rgba(60,120,180,.18), 0 18px 60px rgba(0,0,0,.5); }
}
/* 💻 DESKTOP vero (≥900px): l'app diventa un "dispositivo" centrato con cornice, glow e sfondo brandizzato
   → riempie bene lo schermo grande senza stravolgere il layout mobile (480px). */
@media (min-width: 900px) {
  body {
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 50% -5%, #0e2a49 0%, #0a1d33 33%, #050a12 72%);
  }
  #app {
    height: min(100%, 940px);
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid rgba(120,180,230,.14);
    box-shadow: 0 0 0 1px rgba(80,150,210,.18), 0 28px 80px rgba(0,0,0,.6), 0 0 150px rgba(24,90,150,.22);
  }
  /* watermark di brand sui lati vuoti (lingua-neutro → niente problemi i18n) */
  body::before {
    content: "⚓ SOVEREIGN SEAS";
    position: fixed; top: 36px; left: 0; right: 0; z-index: 0;
    text-align: center; pointer-events: none;
    font-size: 12px; font-weight: 700; letter-spacing: .45em;
    color: rgba(150,195,235,.28);
  }
}
/* 📱 Telefoni piccoli (≤360px, es. iPhone SE/mini Android): un filo più compatto */
@media (max-width: 360px) {
  html, body { font-size: 12px; }
}
/* 🔒 LOCK VERTICALE: su telefono girato (landscape, altezza bassa) copri tutto con l'overlay
   "tieni il telefono in verticale". Il PC (landscape ma alto) e i tablet NON sono toccati (max-height:600px). */
#rotate-lock { display: none; }
@media (orientation: landscape) and (max-height: 600px) and (pointer: coarse) {
  #rotate-lock {
    display: flex; position: fixed; inset: 0; z-index: 100000;
    flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 12px; padding: 24px;
    background: linear-gradient(180deg, #06121e, #0a1d2e); color: var(--text);
  }
  #rotate-lock .rl-ic { font-size: 56px; animation: rl-tip 1.8s ease-in-out infinite; }
  #rotate-lock .rl-t { font-size: 18px; font-weight: 900; }
  #rotate-lock .rl-s { font-size: 12px; color: var(--dim); max-width: 300px; line-height: 1.5; }
}
@keyframes rl-tip { 0%, 55% { transform: rotate(0); } 78%, 100% { transform: rotate(-88deg); } }

/* (Old ocean tap-zone styles removed — the top area is now the home chat,
   styled inline in index.html. Those legacy rules conflicted with the new ones.) */

/* Float labels */
.float-label {
  position: absolute;
  pointer-events: none;
  font-size: 15px;
  font-weight: bold;
  color: #e8a83a;
  text-shadow: 0 0 10px rgba(232,168,58,0.4);
  animation: float-up 1.2s ease-out forwards;
}
@keyframes float-up {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-50px) scale(0.8); }
}

/* ── Stats bar ── */
#stats-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 4px 0 0;
  background: transparent;                 /* sits inside the header now */
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 4px 3px;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }

.stat-label {
  font-size: 8px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1px;
}

.stat-value {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}
.stat-value.gold { color: var(--gold); }
.stat-value.teal { color: var(--teal); }

/* ── Tab bar ── */
#tab-bar {
  display: flex;
  background: var(--navy2);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;             /* 5 tab fisse + Altro: niente scorrimento orizzontale */
  /* Keep the bottom tab row clear of the iPhone home indicator */
  padding-bottom: env(safe-area-inset-bottom, 0);
}
#tab-bar::-webkit-scrollbar { display: none; }

.tab-btn {
  flex: 1 1 0;                  /* colonne uguali → ben distribuite su tutta la larghezza */
  min-width: 0;
  padding: 8px 4px 6px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--dim);
  font-family: inherit;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.15s;
  position: relative;
  overflow: hidden;            /* l'etichetta non deborda sul bottone stretto */
}
.tab-btn.active { color: var(--teal); }
.tab-btn.active::after {
  content: '';
  position: absolute;
  top: 0; left: 8px; right: 8px;
  height: 2px;
  background: var(--teal);
  border-radius: 0 0 3px 3px;
}
.tab-symbol {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  font-weight: bold;
  background: rgba(255,255,255,0.04);
  transition: background 0.15s, transform 0.15s;
}
.tab-btn.active .tab-symbol {
  background: rgba(56,200,192,0.18);
  color: var(--teal);
  transform: translateY(-1px);
}
.tab-label {
  white-space: nowrap;
  font-weight: 700;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;   /* su schermi stretti tronca con … invece di debordare */
}

/* ── Tab content ── */
#tab-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(60,120,180,0.2) transparent;
}

.tab-panel { display: none; padding: 12px; padding-bottom: 20px; }
/* 🎬 fade-in morbido al cambio schermata (solo opacità → niente reflow, niente flash nero) */
.tab-panel.active { display: block; animation: tabIn .16s ease-out; }
@keyframes tabIn { from { opacity: .4; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tab-panel.active { animation: none; } }

/* ── Buttons ── */
.btn {
  border: none; border-radius: 10px; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 700;
  padding: 8px 14px;
  transition: opacity 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.btn-teal { background: var(--teal); color: #071826; }
.btn-gold { background: var(--gold); color: #0b1020; }
.btn-red  { background: var(--red);  color: #fff; }
.btn-dim  { background: rgba(255,255,255,0.06); color: var(--dim); border: 1px solid var(--border); }
.btn-full { width: 100%; display: block; text-align: center; padding: 10px; }

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
}
.card-alt { background: var(--card2); }
.card-gold { border-color: rgba(232,168,58,0.3); }
.card-teal { border-color: rgba(56,200,192,0.3); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.card-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--teal);
}

/* ── Section labels ── */
.section-label {
  font-size: 9px; color: var(--dim);
  text-transform: uppercase; letter-spacing: 0.2em;
  margin: 10px 0 6px;
  display: flex; align-items: center; gap: 8px;
}
.section-label::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--border);
}

/* ── Upgrade row ── */
.upgrade-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  transition: border-color 0.15s;
}
.upgrade-row.locked { opacity: 0.4; pointer-events: none; }
.upgrade-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(56,200,192,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.upgrade-info { flex: 1; min-width: 0; }
.upgrade-name { font-size: 12px; font-weight: 700; color: var(--text); }
.upgrade-desc { font-size: 10px; color: var(--dim); margin-top: 2px; }
.upgrade-owned {
  font-size: 10px; color: var(--teal);
  background: rgba(56,200,192,0.1);
  border-radius: 6px; padding: 2px 6px;
  margin-top: 2px; display: inline-block;
}
.upgrade-buy {
  display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0;
}
.upgrade-cost { font-size: 11px; font-weight: 700; color: var(--gold); }
.upgrade-cost.affordable { color: var(--green); }
.upgrade-cost.locked { color: var(--dim); }

/* Category filter */
.cat-filters {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px;
  margin-bottom: 10px; scrollbar-width: none;
}
.cat-filters::-webkit-scrollbar { display: none; }
.cat-btn {
  flex: 0 0 auto;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--dim);
  font-size: 10px; font-weight: 700; font-family: inherit;
  cursor: pointer; text-transform: uppercase; letter-spacing: 0.06em;
  transition: all 0.15s;
}
.cat-btn.active {
  background: rgba(56,200,192,0.15);
  border-color: rgba(56,200,192,0.45);
  color: var(--teal);
}

/* ── Progress bar ── */
.progress-wrap {
  background: rgba(255,255,255,0.06);
  border-radius: 4px; overflow: hidden; height: 5px;
}
.progress-fill {
  height: 100%; border-radius: 4px;
  background: var(--teal);
  transition: width 0.3s ease;
}
.progress-fill.gold { background: var(--gold); }

/* ── Milestone row ── */
.ms-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
}
.ms-row.done { border-color: rgba(232,168,58,0.3); }
.ms-num {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  background: rgba(255,255,255,0.06); color: var(--dim);
  flex-shrink: 0;
}
.ms-row.done .ms-num { background: rgba(232,168,58,0.2); color: var(--gold); }
.ms-info { flex: 1; min-width: 0; }
.ms-label { font-size: 12px; font-weight: 700; color: var(--dim); }
.ms-row.done .ms-label { color: var(--gold); }
.ms-reward { font-size: 10px; color: var(--dim); margin-top: 2px; }
.ms-pct { font-size: 10px; color: var(--teal); flex-shrink: 0; }

/* ── Bank ── */
.bank-balance {
  font-size: 28px; font-weight: 700;
  color: var(--teal); text-align: center;
  margin: 8px 0;
}
.bank-row {
  display: flex; gap: 8px; margin-bottom: 8px;
}
.bank-input {
  flex: 1; min-width: 0; box-sizing: border-box; width: 100%; padding: 8px 10px;   /* min-width:0 + border-box → niente overflow in flex/grid */
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text); font-family: inherit; font-size: 16px;   /* 16px: evita lo zoom automatico iOS al focus */
  outline: none;
}
.bank-input:focus { border-color: rgba(56,200,192,0.5); }

/* ── Leaderboard ── */
.lb-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  margin-bottom: 4px;
  background: var(--card);
  border: 1px solid var(--border);
}
.lb-row.you { border-color: rgba(232,168,58,0.4); background: rgba(232,168,58,0.06); }
.lb-rank {
  width: 28px; font-size: 11px; font-weight: 700; text-align: center;
  color: var(--dim);
}
.lb-row:nth-child(1) .lb-rank, .lb-row.rank1 .lb-rank { color: #FFD700; }
.lb-row:nth-child(2) .lb-rank, .lb-row.rank2 .lb-rank { color: #C0C0C0; }
.lb-row:nth-child(3) .lb-rank, .lb-row.rank3 .lb-rank { color: #CD7F32; }
.lb-name { flex: 1; font-size: 12px; font-weight: 600; }
.lb-score { font-size: 11px; color: var(--gold); font-weight: 700; }

/* ── Settings ── */
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 6px;
}
.settings-label { font-size: 12px; font-weight: 600; color: var(--text); }
.settings-desc { font-size: 10px; color: var(--dim); margin-top: 2px; }

/* Toggle */
.toggle {
  position: relative; width: 42px; height: 24px; cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  transition: background 0.2s;
}
.toggle input:checked + .toggle-track { background: var(--teal); }
.toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: #fff; border-radius: 50%;
  transition: transform 0.2s;
}
.toggle input:checked ~ .toggle-thumb { transform: translateX(18px); }

/* Lang select */
.lang-select {
  padding: 6px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text); font-family: inherit; font-size: 12px;
  cursor: pointer; outline: none;
}

/* ── Coin packs ── */
.coin-pack {
  display: flex; align-items: center; gap: 10px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.coin-pack:active { transform: scale(0.98); }
.coin-pack.popular { border-color: rgba(232,168,58,0.45); }
.coin-amount { font-size: 20px; font-weight: 700; color: var(--gold); }
.coin-label { font-size: 10px; color: var(--dim); margin-top: 2px; }
.coin-badge {
  padding: 2px 6px; border-radius: 5px;
  font-size: 9px; font-weight: 700;
  background: rgba(78,203,130,0.2); color: var(--green);
  letter-spacing: 0.05em;
}
.coin-price { font-size: 14px; font-weight: 700; color: var(--text); margin-left: auto; }

/* ── Premium plans ── */
.premium-plan {
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 14px;
  margin-bottom: 8px;
  background: var(--card);
  position: relative;
}
.premium-plan.popular { border-color: rgba(232,168,58,0.5); }
.premium-plan.owned { opacity: 0.7; }
.plan-badge {
  position: absolute; top: -1px; right: 12px;
  background: var(--gold); color: #071826;
  font-size: 8px; font-weight: 700; letter-spacing: 0.1em;
  padding: 3px 8px; border-radius: 0 0 8px 8px;
}
.plan-name { font-size: 16px; font-weight: 700; color: var(--text); }
.plan-price { font-size: 22px; font-weight: 700; color: var(--gold); margin: 4px 0; }
.plan-feature {
  font-size: 11px; color: var(--dim);
  padding: 3px 0; display: flex; align-items: center; gap: 6px;
}
.plan-feature::before { content: '✓'; color: var(--teal); font-weight: 700; }

/* ── Hub / cage / export ── */
.species-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 20px;
  font-size: 10px; font-weight: 700;
  cursor: pointer; transition: all 0.15s;
  border: 1px solid transparent;
}
.port-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px; border-radius: var(--radius);
  background: var(--card2); border: 1px solid var(--border);
  margin-bottom: 5px; cursor: pointer;
  transition: border-color 0.15s;
}
.port-row.selected { border-color: var(--teal); }
.port-flag { font-size: 18px; }
.port-info { flex: 1; min-width: 0; }
.port-name { font-size: 12px; font-weight: 700; }
.port-time { font-size: 10px; color: var(--dim); }
.port-price { font-size: 12px; font-weight: 700; color: var(--gold); }

/* ── Toast ── */
#milestone-toast {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: rgba(11,24,40,0.95);
  border: 1px solid rgba(232,168,58,0.45);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 12px; font-weight: 700;
  color: var(--gold);
  display: none;
  flex-direction: column; gap: 6px;
  min-width: 160px; max-width: min(300px, 90vw);   /* entra anche su schermi stretti */
  box-sizing: border-box;
  backdrop-filter: blur(8px);
  /* 🚫 niente selezione/copia del testo e i tap passano ai controlli sotto (es. tasti del mini-game) */
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  pointer-events: none;
}
#milestone-toast button { pointer-events: auto; }   /* il tasto Chiudi resta cliccabile */
/* 🎮 Durante un gioco a schermo intero (pesca purse / mini-game) il toast va nella fascia alto-centrale,
   così NON copre i tasti in basso né l'HUD in alto. */
#milestone-toast.toast-game { top: 22%; bottom: auto; }
#milestone-toast.visible { display: flex; }
#toast-text { text-align: center; }
#toast-bar-wrap { height: 3px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
#toast-bar { height: 100%; background: var(--gold); width: 100%; transition: width 0.1s linear; }

/* ── Offline modal ── */
#offline-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4,10,20,0.88);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
#offline-modal.visible { display: flex; }
.modal-box {
  background: var(--card);
  border: 1px solid rgba(56,200,192,0.35);
  border-radius: 20px;
  padding: 24px;
  max-width: 320px; width: 100%;
  text-align: center;
}
.modal-icon { font-size: 48px; margin-bottom: 12px; }
.modal-title { font-size: 18px; font-weight: 700; color: var(--teal); margin-bottom: 8px; }
.modal-earned { font-size: 28px; font-weight: 700; color: var(--gold); margin: 8px 0 16px; }
.modal-desc { font-size: 12px; color: var(--dim); margin-bottom: 16px; }

/* ── Cage bar ── */
.cage-bar-wrap {
  background: rgba(255,255,255,0.06); border-radius: 8px; height: 12px;
  overflow: hidden; margin: 6px 0;
  position: relative;
}
.cage-bar-fill {
  height: 100%; background: var(--teal);
  transition: width 0.5s ease;
  border-radius: 8px;
}

/* Animations */
@keyframes pulse-glow {
  0%,100% { box-shadow: 0 0 0 0 rgba(56,200,192,0); }
  50%      { box-shadow: 0 0 0 6px rgba(56,200,192,0.12); }
}
.pulse { animation: pulse-glow 2s infinite; }

/* ── Scrollbars ── */
#tab-content::-webkit-scrollbar { width: 4px; }
#tab-content::-webkit-scrollbar-track { background: transparent; }
#tab-content::-webkit-scrollbar-thumb { background: rgba(60,120,180,0.2); border-radius: 2px; }

/* ── Fishing Game Canvas ── */
/* ── Warehouse card (shop) ───────────────────────────────────────────────── */
.warehouse-card {
  margin: 10px 10px 4px;
  padding: 10px 12px 12px;
  background: linear-gradient(135deg, rgba(26,74,127,0.40) 0%, rgba(7,24,38,0.55) 100%);
  border: 1px solid rgba(56,200,192,0.3);
  border-radius: 12px;
}
.warehouse-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--dim); text-transform: uppercase; margin-bottom: 8px;
}
.warehouse-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 6px;
}
.wh-cell {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 4px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  text-align: center; gap: 2px;
}
.wh-cell.wh-has-stock {
  border-color: rgba(56,200,192,0.45);
  background: rgba(56,200,192,0.08);
}
.wh-cell.wh-locked {
  opacity: 0.5;
  border-style: dashed;
  filter: grayscale(0.5);
}
.wh-icon   { font-size: 20px; line-height:1.2; display:flex; align-items:center; justify-content:center; }
.wh-icon svg { width:40px; height:21px; display:block; overflow:visible; }
.upgrade-icon svg { width:32px; height:17px; display:block; overflow:visible; }
.wh-label  { font-size: 10px; font-weight: 700; color: var(--text); }
.wh-count  { font-size: 15px; font-weight: 900; color: #38c8c0; line-height:1; }
.wh-price  { font-size: 9px; color: var(--dim); }
.wh-price strong { color: #e8a83a; }
.wh-hint   { font-size: 8px; color: var(--dim); opacity:0.7; }
.wh-btn    { margin-top: 4px; padding: 4px 6px; font-size: 10px; border-radius: 6px;
             width: 100%; border: 1px solid rgba(255,255,255,0.12);
             background: rgba(255,255,255,0.07); color: var(--dim); cursor: pointer; }
.wh-btn.btn-teal { background: rgba(56,200,192,0.88); color: #071826;
                   border-color: transparent; font-weight: 700; }


#fishing-wrap {
  position: fixed; inset: 0; z-index: 600;
  display: none;
  background: #071826;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
#fishing-wrap.visible { display: flex; flex-direction: column; justify-content: flex-start; padding-top: calc(env(safe-area-inset-top, 0px) + 8px); }
#fishing-canvas {
  display: block; width: 100%; flex: 1 1 auto; min-height: 0; cursor: crosshair;
  touch-action: none;   /* let the game own touch gestures (no scroll/zoom hijack) */
}
#fishing-hud {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: flex-start;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) calc(12px + env(safe-area-inset-right, 0px)) 8px calc(12px + env(safe-area-inset-left, 0px));
  background: linear-gradient(to bottom, rgba(4,14,24,0.9) 0%, transparent 100%);
  pointer-events: none;
}
#fishing-hud-left {
  display: flex; flex-direction: column; gap: 1px; pointer-events: none;
  background: linear-gradient(160deg, rgba(10,24,38,0.74), rgba(6,16,28,0.62));
  border: 1px solid rgba(120,200,235,0.18);
  border-left: 3px solid rgba(232,168,58,0.9);
  border-radius: 12px;
  padding: 8px 12px 9px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.07);
}
#fg-close-btn {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 12px); right: calc(12px + env(safe-area-inset-right, 0px)); z-index: 30;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid rgba(220,60,60,0.6);
  background: rgba(10,20,36,0.88); color: #ff6b6b;
  font-size: 15px; font-weight: 900; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  pointer-events: all;
}
#fg-close-btn:hover { background: rgba(220,60,60,0.55); color: #fff; }
#fg-close-btn:active { transform: scale(0.93); }
#fishing-controls {
  display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: nowrap;
  margin-top: auto;   /* pin to the bottom of the fullscreen overlay */
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0));
  background: rgba(4,14,24,0.95);
  border-top: 1px solid rgba(56,200,192,0.15);
}
/* 🎰 Slot machine reels */
.slot-reel {
  width: 74px; height: 74px; display: flex; align-items: center; justify-content: center;
  font-size: 46px; line-height: 1;
  background: #0a1c2e; border: 2px solid var(--gold, #e8a83a); border-radius: 12px;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.55); overflow: hidden;
}
.slot-reel.spinning { filter: blur(0.6px); opacity: 0.92; }
/* Real swordfish image symbol — readable on both the light reels and the dark Sugar Rush grid */
.spada-sym {
  width: 1.25em; height: 1.25em; object-fit: contain; vertical-align: middle; display: inline-block;
  filter: drop-shadow(0 0 1.5px rgba(255,255,255,0.85)) drop-shadow(0 1px 1px rgba(0,0,0,0.4));
}
/* 💰 Progressive jackpot banner — sticky so it stays visible while spinning */
.jackpot-banner {
  position: sticky; top: 0; z-index: 30;
  text-align: center; border-radius: 14px; padding: 11px 10px 12px; margin-bottom: 10px;
  background: linear-gradient(135deg, #4a2e00, #8a5a00 40%, #e8a83a 50%, #8a5a00 60%, #4a2e00);
  background-size: 200% 100%; border: 1.5px solid #ffd970;
  box-shadow: 0 0 18px rgba(232,168,58,0.45), inset 0 0 12px rgba(255,217,112,0.25);
  animation: jpShine 4s linear infinite;
}
.jackpot-banner.jp-flash { animation: jpShine 4s linear infinite, jpFlash .6s ease; }
@keyframes jpShine { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
@keyframes jpFlash {
  0%   { box-shadow: 0 0 18px rgba(232,168,58,0.45), inset 0 0 12px rgba(255,217,112,0.25); }
  35%  { box-shadow: 0 0 36px rgba(255,236,160,0.95), inset 0 0 24px rgba(255,236,160,0.7); }
  100% { box-shadow: 0 0 18px rgba(232,168,58,0.45), inset 0 0 12px rgba(255,217,112,0.25); }
}
.jp-live {
  font-size: 8px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: #fff; opacity: .92; display: flex; align-items: center; justify-content: center; gap: 5px; margin-bottom: 3px;
}
.jp-live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #ff4d4d;
  box-shadow: 0 0 0 0 rgba(255,77,77,0.7); animation: jpLive 1.4s infinite;
}
@keyframes jpLive {
  0%   { box-shadow: 0 0 0 0 rgba(255,77,77,0.7); }
  70%  { box-shadow: 0 0 0 6px rgba(255,77,77,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,77,77,0); }
}
.jp-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: #fff6d8; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.jp-amount {
  font-size: 30px; font-weight: 900; color: #fff; line-height: 1.15; margin: 2px 0;
  text-shadow: 0 0 10px rgba(255,217,112,0.9), 0 2px 4px rgba(0,0,0,0.6);
  font-variant-numeric: tabular-nums; animation: jpPulse 1.6s ease-in-out infinite;
}
@keyframes jpPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.jp-odds { font-size: 8.5px; color: #ffeccf; opacity: 0.92; line-height: 1.4; }
/* 🍬 Sugar Rush grid */
.sugar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px;
  max-width: 320px; margin: 0 auto; padding: 6px;
  background: rgba(0,0,0,0.25); border-radius: 10px;
}
.sugar-cell {
  position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 21px; line-height: 1; border-radius: 7px; background: rgba(255,255,255,0.04);
  transition: transform .12s, box-shadow .12s;
}
.sugar-cell.win {
  transform: scale(1.12); background: rgba(255,255,255,0.22);
  box-shadow: 0 0 10px 2px rgba(247,179,255,0.8); z-index: 2;
}
/* ⛶ Slot/Pesca Rush fullscreen play overlay */
#slot-fs { display: none; }
#slot-fs.open {
  display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 850;
  background: radial-gradient(circle at 50% 0%, #0a2e44, #05121e 70%);
}
#slot-fs-bar {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px;
  background: rgba(4,14,24,0.85); border-bottom: 1px solid rgba(56,200,192,0.18);
}
#slot-fs-title { font-size: 16px; font-weight: 800; color: #7fe3ff; }
#slot-fs-close {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  color: #fff; font-size: 18px; font-weight: 800; cursor: pointer; line-height: 1;
}
#slot-fs-close:active { background: rgba(255,255,255,0.2); }
#slot-fs-body {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 12px 12px calc(env(safe-area-inset-bottom, 0px) + 16px);
}
#slot-fs-body #slot-game-card { width: min(96vw, 470px); margin: 0 auto; }
#slot-fs-body .sugar-grid { max-width: min(86vw, 44vh); }
#slot-fs-body .slot-reel { width: 84px; height: 84px; font-size: 52px; }
.sugar-cell.scatter {
  background: radial-gradient(circle, rgba(255,210,90,0.35), rgba(255,150,30,0.15));
  box-shadow: 0 0 12px 3px rgba(255,200,80,0.9); z-index: 3;
  animation: scatGlow 0.9s ease-in-out infinite;
}
@keyframes scatGlow { 0%,100% { transform: scale(1); } 50% { transform: scale(1.14); } }
.sugar-mult {
  position: absolute; bottom: -2px; right: -2px;
  font-size: 8px; font-weight: 900; color: #fff; background: #2080d0;
  border-radius: 6px; padding: 0 3px; line-height: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
/* 🀄 Mahjong board */
.mj-board {
  position: relative; width: 100%; max-width: 300px; height: 252px; margin: 0 auto;
}
.mj-tile {
  position: absolute; width: 30px; height: 38px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
  background: linear-gradient(155deg, #fffdf2, #e6dfc8); color: #1a2a3a;
  border: 1px solid #b8ad8a; box-shadow: 1.5px 1.5px 0 #9c906c, inset 0 0 2px #fff;
  user-select: none; cursor: default; transition: transform .1s, box-shadow .1s;
}
.mj-tile.free { cursor: pointer; }
.mj-tile.free:active { transform: scale(0.94); }
.mj-tile.blocked { filter: brightness(0.7) saturate(0.7); }
.mj-tile.sel { outline: 2px solid #38c8c0; box-shadow: 0 0 9px 2px rgba(56,200,192,0.85), 1.5px 1.5px 0 #9c906c; transform: scale(1.07); }
.fishing-btn {
  padding: 9px 11px; border-radius: 18px;
  border: none; font-family: inherit; font-size: 11px; font-weight: 800;
  white-space: nowrap; cursor: pointer; transition: transform .1s, box-shadow .2s;
}
.fishing-btn:active { transform: scale(0.94); }
.fbn-deploy  { background: rgba(56,200,192,0.95); color: #071826; box-shadow: 0 3px 12px rgba(56,200,192,0.35); }
.fbn-close   { background: rgba(246,166,35,0.95); color: #071826; }
.fbn-cancel  { background: rgba(220,60,60,0.75); color: #fff; }
.fbn-disabled { opacity: 0.3; pointer-events: none; box-shadow: none !important; }
/* When closing the net is possible, the Chiudi Rete button pulses to grab attention */
.fbn-close:not(.fbn-disabled) { animation: fbn-pulse 1s ease-in-out infinite; }
@keyframes fbn-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(246,166,35,0.55); }
  50%     { box-shadow: 0 0 0 10px rgba(246,166,35,0); }
}

/* ── Global Chat (Rival Regions style) ── */
/* Chat fills the whole tab-content area so there is no empty gap below it,
   and it grows/shrinks correctly when the fishing panel is collapsed. */
#panel-chat { padding: 0; }
#panel-chat.active { height: 100%; }
/* While typing in chat, hide the bottom tab bar so the input sits directly
   above the on-screen keyboard (clean chat layout, more messages visible). */
/* Chat is now at the TOP (home), not above the keyboard — keep the bottom tabs visible while typing */
/* #app.chat-typing #tab-bar { display: none; } */
.chat-wrap {
  display: flex; flex-direction: column;
  height: 100%; min-height: 0;
  background: #2a2d31;
}

/* Language tabs (ITALIANO / ENGLISH) */
.chat-tabs {
  flex-shrink: 0; position: relative;
  display: flex; align-items: stretch;
  background: #303338;
  border-bottom: 1px solid rgba(0,0,0,0.35);
}
.chat-tab {
  flex: 1; background: transparent; border: none; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 700;
  letter-spacing: 0.05em; color: #8a8f96;
  padding: 9px 8px 8px;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.chat-tab.active { color: #f2f4f7; border-bottom-color: #4f6bed; }
.chat-presence {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; color: #8a8f96; font-weight: 700;
}
.chat-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4ecb82;
  box-shadow: 0 0 0 0 rgba(78,203,130,0.6);
  animation: chatPulse 2s infinite;
}
.chat-dot.offline { background: var(--red); animation: none; }
@keyframes chatPulse {
  0%   { box-shadow: 0 0 0 0 rgba(78,203,130,0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(78,203,130,0); }
  100% { box-shadow: 0 0 0 0 rgba(78,203,130,0); }
}

/* Messages feed */
.chat-messages {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 6px 0 8px; display: flex; flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.14) transparent;
}
.chat-loading, .chat-empty {
  margin: auto; text-align: center; color: #8a8f96;
  font-size: 12px; line-height: 1.6;
}
.chat-empty-icon { font-size: 42px; margin-bottom: 8px; animation: chatBob 2.4s ease-in-out infinite; }
@keyframes chatBob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-7px)} }

/* Message rows — ultra-compact: tiny avatar, inline name + text */
.chat-row {
  display: flex; align-items: flex-start; gap: 5px;
  padding: 1px 8px;
  transition: background 0.12s;
}
.chat-row:hover { background: rgba(255,255,255,0.02); }

.chat-av {
  width: 20px; height: 20px; border-radius: 3px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 800; color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,0.4);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  overflow: hidden; margin-top: 2px;
}
.chat-av-img { background-size: cover; background-position: center; background-repeat: no-repeat; }
.chat-av-emoji { font-size: 13px; text-shadow: none; }

.chat-body { flex: 1; min-width: 0; }
.chat-line1 {
  display: flex; align-items: baseline; gap: 5px; margin-bottom: 0;
}
.chat-name {
  font-size: 8.5px; font-weight: 700; color: #d6dae0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 60%;
}
.chat-ts {
  font-size: 7px; color: #8d929a; flex-shrink: 0; margin-left: auto;
}
.chat-text {
  font-size: 10.5px; color: #ffffff; line-height: 1.3;
  word-break: break-word; white-space: pre-wrap;
}

/* New-message: subtle fade-in only, no colored highlight */
.chat-new { animation: chatFadeIn 0.3s ease-out; }
@keyframes chatFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Emoji quick bar (toggled via the paperclip) */
.chat-emoji-bar {
  flex-shrink: 0;
  display: flex; gap: 2px; overflow-x: auto;
  padding: 6px 8px;
  border-top: 1px solid rgba(0,0,0,0.3);
  background: #303338;
  scrollbar-width: none;
}
.chat-emoji-bar::-webkit-scrollbar { display: none; }
.chat-emoji {
  background: transparent; border: none; cursor: pointer;
  font-size: 20px; padding: 3px 5px; border-radius: 8px;
  flex-shrink: 0; transition: transform 0.12s, background 0.12s;
}
.chat-emoji:active { transform: scale(1.3); background: rgba(255,255,255,0.08); }

/* Input row */
.chat-input-row {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 7px;
  padding: 7px 10px 9px;
  border-top: 1px solid rgba(0,0,0,0.3);
  background: #2a2d31;
}
.chat-attach {
  background: transparent; border: none; cursor: pointer;
  font-size: 19px; color: #9aa0a8; flex-shrink: 0;
  padding: 3px 5px; line-height: 1;
  transition: color 0.15s, transform 0.12s;
}
.chat-attach.active { color: #4f6bed; transform: rotate(-20deg); }
.chat-input {
  flex: 1;
  background: #34373c;
  border: 1px solid #44474d;
  border-radius: 4px;
  padding: 9px 12px;
  color: #eef0f3;
  font-family: inherit; font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}
.chat-input::placeholder { color: #8a8f96; }
.chat-input:focus { border-color: #4f6bed; }
.chat-send {
  border: none; cursor: pointer;
  background: #4f6bed;
  border-radius: 4px; width: 42px; height: 38px;
  flex-shrink: 0; color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s, background 0.15s;
}
.chat-send:active { transform: scale(0.92); background: #3f59d8; }
.chat-send.sending { opacity: 0.6; pointer-events: none; }

/* Locked state */
.chat-locked {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 50px 24px;
  height: 100%; min-height: 320px;
  background: #2a2d31;
}
.chat-locked-icon { font-size: 56px; margin-bottom: 14px; animation: chatBob 2.4s ease-in-out infinite; }
.chat-locked-title {
  font-size: 18px; font-weight: 800; color: #f2f4f7; margin-bottom: 8px;
}
.chat-locked-sub { font-size: 12px; color: #8a8f96; line-height: 1.6; max-width: 260px; }

/* ── Profile settings ── */
.profile-card { padding: 14px; }
.profile-top { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.profile-av {
  width: 70px; height: 70px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--teal), #2a8c86);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 2px 8px rgba(0,0,0,0.3);
  overflow: hidden;
}
.profile-av-img { background-size: cover; background-position: center; }
.profile-av-emoji { font-size: 38px; }
.profile-top-info { flex: 1; min-width: 0; }
.profile-name { font-size: 15px; font-weight: 800; color: var(--text); }
.profile-uid { font-size: 10px; color: var(--dim); margin-top: 1px; }
.profile-btn-sm { font-size: 11px; padding: 6px 10px; cursor: pointer; }
.profile-sub {
  font-size: 10px; color: var(--dim); text-transform: uppercase;
  letter-spacing: 0.08em; margin: 12px 0 6px;
}
.profile-emoji-row {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.profile-emoji {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--navy2); border: 1px solid var(--border);
  font-size: 20px; cursor: pointer; transition: transform 0.12s, border-color 0.12s;
}
.profile-emoji:active { transform: scale(1.2); border-color: var(--teal); }
.profile-accent-row { display: flex; flex-wrap: wrap; gap: 7px; }
.profile-accent {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer;
  transition: transform 0.12s;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
}
.profile-accent.sel { border-color: #fff; transform: scale(1.12); }
.profile-bio {
  width: 100%; resize: none; height: 56px;
  background: var(--navy2); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px;
  color: var(--text); font-family: inherit; font-size: 12px;
  outline: none;
}
.profile-bio:focus { border-color: var(--teal); }

/* ── Chat mode bar (Globale / Amici) ── */
.chat-mode-bar {
  flex-shrink: 0; display: flex; gap: 6px;
  padding: 7px 8px; background: #303338;
  border-bottom: 1px solid rgba(0,0,0,0.3);
}
.chat-mode {
  flex: 1; background: #34373c; border: 1px solid #44474d; cursor: pointer;
  font-family: inherit; font-size: 11px; font-weight: 700; color: #b6bcc4;
  padding: 7px 6px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: background 0.15s, color 0.15s;
}
.chat-mode.active { background: #4f6bed; border-color: #4f6bed; color: #fff; }
.chat-mode-badge {
  background: #e05050; color: #fff; font-size: 9px; font-weight: 800;
  min-width: 15px; height: 15px; border-radius: 8px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ── Friends list ── */
.friends-scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 4px 0; scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.14) transparent;
}
.friends-section {
  font-size: 9px; color: #8a8f96; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 10px 12px 4px; font-weight: 700;
}
.friends-empty { text-align: center; color: #8a8f96; font-size: 11px; padding: 18px 12px; line-height: 1.6; }
.friend-row {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 12px; transition: background 0.12s;
}
.friend-clickable { cursor: pointer; }
.friend-clickable:active { background: rgba(255,255,255,0.04); }
.friend-info { flex: 1; min-width: 0; }
.friend-name {
  font-size: 12px; font-weight: 700; color: #eef0f3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 6px;
}
.friend-uid { font-size: 9px; color: #8a8f96; }
.friend-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.friend-dm-hint { font-size: 14px; opacity: 0.7; }
.friend-btn {
  border: none; cursor: pointer; border-radius: 5px;
  width: 28px; height: 28px; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.fb-ok { background: #4ecb82; color: #06210f; }
.fb-no { background: #44474d; color: #e0e3e7; }
.fb-del { background: transparent; color: #8a8f96; }
.friend-unread {
  background: #e05050; color: #fff; font-size: 9px; font-weight: 800;
  min-width: 15px; height: 15px; border-radius: 8px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ── DM view ── */
.dm-header {
  flex-shrink: 0; display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; background: #303338;
  border-bottom: 1px solid rgba(0,0,0,0.3);
}
.dm-back {
  background: transparent; border: none; cursor: pointer;
  color: #b6bcc4; font-size: 26px; line-height: 1; padding: 0 6px 2px;
  flex-shrink: 0;
}
.dm-peer { min-width: 0; flex: 1; }
.dm-peer-name { font-size: 13px; font-weight: 700; color: #eef0f3; }
.dm-peer-uid { font-size: 9px; color: #8a8f96; }
.dm-money-btn {
  flex-shrink: 0; background: rgba(232,168,58,0.14); border: 1px solid rgba(232,168,58,0.4);
  border-radius: 9px; cursor: pointer; font-size: 18px; line-height: 1;
  padding: 6px 9px; margin-left: 6px;
}
.dm-money-btn:active { transform: scale(0.93); }
.tx-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 2500;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.tx-box {
  background: #2a2d31; border: 1px solid rgba(232,168,58,0.35); border-radius: 16px;
  padding: 20px; width: 100%; max-width: 340px; box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.tx-title { font-size: 16px; font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.tx-sub { font-size: 11px; color: var(--dim); margin-bottom: 14px; }
.tx-input {
  width: 100%; box-sizing: border-box; background: #1d2024; border: 1px solid #3a3e44;
  border-radius: 10px; color: #fff; font-size: 18px; font-weight: 700; text-align: center;
  padding: 12px; margin-bottom: 10px;
}
.tx-note { font-size: 10px; color: var(--dim); line-height: 1.5; margin-bottom: 14px; }
.tx-actions { display: flex; gap: 8px; }
.tx-actions .btn { flex: 1; }
.dm-messages { padding: 8px 10px; gap: 0; }
.dm-msg { display: flex; margin-bottom: 5px; }
.dm-msg.mine { justify-content: flex-end; }
.dm-bubble {
  max-width: 76%; background: #34373c;
  border-radius: 10px 10px 10px 3px; padding: 6px 9px;
  font-size: 12px; color: #fff; line-height: 1.35;
  word-break: break-word; white-space: pre-wrap;
}
.dm-msg.mine .dm-bubble {
  background: #4f6bed; border-radius: 10px 10px 3px 10px;
}
.dm-text { display: inline; }
.dm-time { font-size: 8px; color: rgba(255,255,255,0.5); margin-left: 8px; float: right; margin-top: 4px; }

/* ── Collapsible section header (arrow toggle) ── */
.collapse-header {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 10px; color: var(--dim);
  text-transform: uppercase; letter-spacing: 0.18em;
  margin: 8px 0 6px; padding: 4px 0; user-select: none;
}
.collapse-header .collapse-line { flex: 1; height: 1px; background: var(--border); }
.collapse-header .collapse-arrow {
  font-size: 18px; line-height: 1; color: var(--teal); letter-spacing: 0;
  width: 22px; text-align: center; flex-shrink: 0;
}
.collapse-header:active { opacity: 0.7; }

/* ── Chat moderator badge & delete ── */
.chat-mod-badge { font-size: 9px; margin-left: 3px; vertical-align: middle; }
/* 👑 Founder highlight */
.chat-name-founder { color: #ffd970 !important; font-weight: 800; text-shadow: 0 0 6px rgba(255,217,112,0.45); }
.chat-founder-badge {
  font-size: 9px; font-weight: 900; margin-left: 5px; vertical-align: middle;
  color: #1a1206; background: linear-gradient(90deg, #ffd970, #e8a83a);
  padding: 1px 6px; border-radius: 7px; letter-spacing: .05em; white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
/* 👑 Supporter highlight (distinct from the gold DEV crown) */
.chat-name-supporter { color: #8fd0ff !important; font-weight: 800; }
.chat-supporter-badge {
  font-size: 9px; font-weight: 900; margin-left: 5px; vertical-align: middle;
  color: #06283d; background: linear-gradient(90deg, #cfe9ff, #6db4e6);
  padding: 1px 6px; border-radius: 7px; letter-spacing: .04em; white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
/* 🏅 Pioniere — uno dei primi 10 giocatori registrati */
.chat-pioneer-badge {
  font-size: 9px; font-weight: 900; margin-left: 5px; vertical-align: middle;
  color: #2a1500; background: linear-gradient(90deg, #ffe7a0, #ff9d3c);
  padding: 1px 6px; border-radius: 7px; letter-spacing: .04em; white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
/* 🏅 Distintivo speciale */
.chat-custom-badge {
  font-size: 9px; font-weight: 900; margin-left: 5px; vertical-align: middle;
  color: #04231f; background: linear-gradient(90deg, #9af0e6, #38c8c0);
  padding: 1px 6px; border-radius: 7px; letter-spacing: .04em; white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
/* @mentions */
.chat-mention { color: #38c8c0; font-weight: 700; background: rgba(56,200,192,0.12); border-radius: 4px; padding: 0 2px; }

/* 🏦 Banchiere del Porto */
.banker-cash { font-size: 12px; color: #f2c477; font-weight: 700; background: rgba(232,168,58,0.1); border: 1px solid rgba(232,168,58,0.3); border-radius: 10px; padding: 7px 12px; margin: 2px 0 6px; text-align: center; }
.banker-cash b { color: var(--gold); }
.banker-intro { font-size: 10px; color: var(--dim); margin: 2px 0 10px; line-height: 1.5; }
.banker-grid { display: flex; flex-direction: column; gap: 10px; }
.banker-card {
  background: linear-gradient(160deg, rgba(10,30,52,0.96), rgba(7,22,36,0.96));
  border: 1px solid rgba(56,200,192,0.18); border-radius: 14px; padding: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.banker-card.hot { border-color: rgba(78,203,130,0.5); box-shadow: 0 0 14px rgba(78,203,130,0.25); }
.banker-card.offer { border-color: rgba(232,168,58,0.6); box-shadow: 0 0 16px rgba(232,168,58,0.3); }
.bk-offer { font-size: 10px; font-weight: 800; color: #1a1206; text-align: center; margin-bottom: 8px;
  background: linear-gradient(90deg, #ffd970, #e8a83a); border-radius: 8px; padding: 4px 6px; letter-spacing: .02em; }
.bk-head { display: flex; align-items: center; gap: 7px; width: 100%; background: none; border: none; color: var(--text); font-family: inherit; cursor: pointer; padding: 4px 2px; }
.bk-mini { font-size: 10px; color: var(--dim); margin-left: auto; white-space: nowrap; }
.bk-chev { font-size: 12px; color: #38c8c0; flex-shrink: 0; }
.bk-body { margin-top: 8px; }
.banker-card.open { border-color: rgba(56,200,192,0.45); }
.bk-ico { font-size: 22px; line-height: 1; }
.bk-ico img { width: 24px; height: 24px; object-fit: contain; vertical-align: middle; }
.bk-name { font-size: 14px; font-weight: 800; color: var(--text); flex: 1; }
.bk-have { font-size: 11px; color: var(--gold); font-weight: 700; white-space: nowrap; }
.bk-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.bk-chip { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 4px; border-radius: 10px; font-size: 9px; text-transform: uppercase; letter-spacing: .03em; text-align: center; }
.bk-chip b { font-size: 14px; font-weight: 900; }
.bk-chip span { opacity: .8; }
.bk-sell { background: rgba(78,203,130,0.12); border: 1px solid rgba(78,203,130,0.35); color: #7fe3a6; }
.bk-buy  { background: rgba(232,168,58,0.12); border: 1px solid rgba(232,168,58,0.35); color: #f2c477; }
.bk-stock { height: 6px; border-radius: 4px; background: rgba(255,255,255,0.07); overflow: hidden; margin-bottom: 3px; }
.bk-stock-fill { height: 100%; background: linear-gradient(90deg, #38c8c0, #4ecb82); border-radius: 4px; transition: width .3s; }
.bk-stock-lbl { font-size: 9px; color: var(--dim); margin-bottom: 4px; }
.bk-actions { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.bk-actions .bank-input { flex: 1; min-width: 0; }
.bk-actions .btn { flex-shrink: 0; }

/* 🪟 Sezioni banca a tendina */
.bank-collapse { margin-bottom: 8px; border: 1px solid rgba(56,200,192,0.18); border-radius: 12px; overflow: hidden; background: rgba(10,28,46,0.5); }
.bank-collapse-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: rgba(56,200,192,0.08); border: none; color: var(--text);
  font-family: inherit; font-size: 13px; font-weight: 800; padding: 11px 14px; cursor: pointer;
}
.bank-collapse-head.open { background: rgba(56,200,192,0.14); }
.bank-collapse-arrow { color: #38c8c0; font-size: 13px; }
.bank-collapse-body { padding: 10px 12px 4px; }

/* 🎮 Mini Game hub */
.mg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mg-card { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center;
  background: linear-gradient(160deg, rgba(12,32,54,0.96), rgba(7,22,36,0.96));
  border: 1px solid rgba(56,200,192,0.22); border-radius: 16px; padding: 16px 10px;
  cursor: pointer; color: var(--text); font-family: inherit; transition: transform .1s, box-shadow .2s; }
.mg-card:active { transform: scale(0.96); }
.mg-card:hover { box-shadow: 0 0 16px rgba(56,200,192,0.25); border-color: rgba(56,200,192,0.5); }
.mg-card-ico { font-size: 38px; line-height: 1; }
.mg-card-name { font-size: 14px; font-weight: 800; color: var(--gold); }
.mg-card-desc { font-size: 10px; color: var(--dim); line-height: 1.4; min-height: 28px; }
.mg-card-go { margin-top: 4px; font-size: 11px; font-weight: 800; color: #38c8c0; }
/* fullscreen game panel (opened from the hub) */
.tab-panel.mg-full {
  position: fixed; inset: 0; z-index: 870; background: #071826;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top,0px) + 52px) 12px calc(env(safe-area-inset-bottom,0px) + 16px);
}
/* floating mini-game control bar */
#mg-controls {
  position: fixed; top: calc(env(safe-area-inset-top,0px) + 8px); left: 8px; right: 8px; z-index: 880;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; pointer-events: none;
}
#mg-controls button { pointer-events: auto; }
#mg-back {
  background: rgba(10,20,36,0.94); border: 1px solid rgba(56,200,192,0.4); color: #38c8c0;
  font-family: inherit; font-size: 13px; font-weight: 800; padding: 7px 14px; border-radius: 20px; cursor: pointer;
}
#mg-fulltoggle {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(10,20,36,0.94);
  border: 1px solid rgba(255,255,255,0.25); color: #fff; font-size: 16px; cursor: pointer;
}
/* 🎮 Mini-giochi: il doppio-tap rapido faceva partire la SELEZIONE testo / il menu "copia" iOS (e lo zoom-doppio-tap).
   Disattivo selezione, callout e tap-highlight SOLO nelle schermate dei mini-giochi (altrove il testo resta selezionabile). */
#panel-tretfish, #panel-abisso, #panel-palombaro, #panel-mulinello, .tab-panel.mg-full, #mg-controls,
#panel-tretfish *, #panel-abisso *, #panel-palombaro *, #panel-mulinello *, .tab-panel.mg-full *, #mg-controls * {
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
  -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
#panel-tretfish canvas, #panel-abisso canvas, #panel-palombaro canvas, #panel-mulinello canvas { touch-action: none; }
#panel-tretfish button, #panel-abisso button, #panel-palombaro button, #panel-mulinello button, #mg-controls button { touch-action: manipulation; }
/* 📱 iOS — fix DEFINITIVO: mentre giochi a QUALSIASI mini-game o alla pesca (html.playing) disattiva selezione,
   menu Copia/Traduci/Cerca e zoom-doppio-tap su TUTTO, con !important (vince su qualsiasi stile inline). */
html.playing, html.playing * {
  -webkit-user-select: none !important; -moz-user-select: none !important; user-select: none !important;
  -webkit-touch-callout: none !important; -webkit-tap-highlight-color: transparent !important;
}
html.playing { touch-action: manipulation; }
html.playing canvas { touch-action: none; }
/* 🖥️ PC (mouse+hover) vs touch: mostra i comandi giusti. Di default si vede la versione touch. */
.desktop-only { display: none; }
html.desktop .touch-only { display: none; }
html.desktop .desktop-only { display: revert; }

/* 🧭 Primi Passi — banner obiettivo guidato sempre visibile (anti-abbandono) */
#starter-banner { margin: 0 10px 8px; }
.stb-wrap { display: flex; align-items: center; gap: 10px; background: linear-gradient(135deg, rgba(43,184,176,.16), rgba(232,168,58,.12)); border: 1px solid rgba(56,200,192,.35); border-radius: 12px; padding: 9px 11px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.stb-ic { font-size: 24px; line-height: 1; flex: none; }
.stb-main { flex: 1; min-width: 0; }
.stb-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stb-tag { font-size: 10px; font-weight: 800; color: #7fe0ff; letter-spacing: .03em; }
.stb-rw { font-size: 10px; font-weight: 700; color: #ffd24d; }
.stb-lbl { font-size: 13px; font-weight: 800; color: #eaf4fb; margin: 2px 0 4px; }
.stb-bar { height: 6px; border-radius: 4px; background: rgba(0,0,0,.35); overflow: hidden; }
.stb-bar i { display: block; height: 100%; background: linear-gradient(90deg, #38c8c0, #4ecb82); border-radius: 4px; transition: width .4s; }
.stb-tip { font-size: 10px; color: var(--dim); margin-top: 4px; line-height: 1.4; }
.stb-claim { flex: none; background: linear-gradient(180deg, #ffd24d, #e0a838); color: #241500; border: 0; border-radius: 10px; padding: 9px 14px; font-weight: 900; font-size: 13px; cursor: pointer; animation: stbpulse 1.4s ease-in-out infinite; }
@keyframes stbpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.stb-all { font-size: 9px; font-weight: 700; color: #9fd0e6; margin-left: auto; opacity: .85; }
.stb-go { flex: none; background: linear-gradient(180deg, #2bb8b0, #178079); color: #fff; border: 0; border-radius: 10px; padding: 9px 15px; font-weight: 900; font-size: 13px; cursor: pointer; animation: stbpulse 1.6s ease-in-out infinite; }
.sr-go { color: #2bd0c4; font-weight: 900; font-size: 12px; }
html.playing #starter-banner { display: none !important; }

/* 🧭 Mappa completa Primi Passi (modale) + pulsante sulla Ruota */
.sr-overlay { position: fixed; inset: 0; z-index: 9000; background: rgba(3,10,18,.78); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sr-card { width: 100%; max-width: 420px; max-height: 86vh; overflow-y: auto; background: linear-gradient(180deg,#0b1f30,#081623); border: 1px solid rgba(56,200,192,.3); border-radius: 16px; padding: 16px 15px; box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.sr-head { font-size: 16px; font-weight: 900; color: #eaf4fb; display: flex; align-items: center; gap: 8px; }
.sr-cnt { margin-left: auto; font-size: 12px; font-weight: 800; color: #7fe0ff; background: rgba(56,200,192,.14); border: 1px solid rgba(56,200,192,.3); border-radius: 20px; padding: 2px 10px; }
.sr-sub { font-size: 11px; color: var(--dim); margin: 4px 0 12px; }
.sr-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; margin-bottom: 7px; border: 1px solid transparent; }
.sr-row.done { background: rgba(78,203,130,.08); border-color: rgba(78,203,130,.22); }
.sr-row.cur { background: linear-gradient(135deg,rgba(43,184,176,.18),rgba(232,168,58,.12)); border-color: rgba(56,200,192,.45); }
.sr-row.lock { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.06); opacity: .6; }
.sr-ic { font-size: 20px; line-height: 1; flex: none; width: 26px; text-align: center; }
.sr-mid { flex: 1; min-width: 0; }
.sr-lbl { font-size: 12.5px; font-weight: 700; color: #eaf4fb; }
.sr-row.lock .sr-lbl { color: #9fb3c8; }
.sr-bar { height: 5px; border-radius: 3px; background: rgba(0,0,0,.35); overflow: hidden; margin-top: 5px; }
.sr-bar i { display: block; height: 100%; background: linear-gradient(90deg,#38c8c0,#4ecb82); border-radius: 3px; }
.sr-rw { flex: none; font-size: 11px; font-weight: 800; color: #ffd24d; }
.sr-row.done .sr-rw { color: #4ecb82; }
.sr-wheelbtn { display: inline-block; margin: 2px 0 8px; padding: 7px 14px; border-radius: 20px; background: linear-gradient(135deg,rgba(43,184,176,.2),rgba(232,168,58,.16)); border: 1px solid rgba(56,200,192,.4); color: #eaf4fb; font-size: 12px; font-weight: 800; cursor: pointer; }
.chat-mention.me { color: #ffd970; background: rgba(255,217,112,0.18); }
.chat-row.mentioned { background: rgba(255,217,112,0.07); border-left: 2px solid #ffd970; border-radius: 6px; }
.chat-mention-dd {
  position: absolute; bottom: 100%; left: 8px; right: 8px; margin-bottom: 4px; z-index: 30;
  background: #0c1c2e; border: 1px solid rgba(56,200,192,0.4); border-radius: 10px;
  overflow: hidden; box-shadow: 0 -4px 16px rgba(0,0,0,0.5); max-height: 180px; overflow-y: auto;
}
.chat-mention-item { padding: 9px 12px; font-size: 13px; color: #38c8c0; font-weight: 700; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.05); }
.chat-mention-item:hover, .chat-mention-item:active { background: rgba(56,200,192,0.15); }
.chat-del-btn {
  background: transparent; border: none; cursor: pointer;
  color: #e05050; font-size: 11px; padding: 0 2px; margin-left: 6px;
  opacity: 0.7;
}
.chat-del-btn:active { opacity: 1; transform: scale(1.2); }

/* ── Moderator panel ── */
.chat-mod-toggle { background: rgba(232,168,58,0.15) !important; }
.mod-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(4,14,24,0.92); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.mod-panel {
  background: #0a1e34; border: 1px solid rgba(232,168,58,0.35);
  border-radius: 16px; padding: 22px; width: min(380px, 94vw);
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.mod-title {
  font-size: 16px; font-weight: 800; color: var(--gold);
  text-align: center; margin-bottom: 14px;
}
/* 🛡️ Pannello Fondatore — Command Center (variante 3) */
.fp3-panel { padding: 0; width: min(440px, 96vw); max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; }
.fp3-top { display: flex; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.fp3-shield { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: linear-gradient(180deg, rgba(232,168,58,.22), rgba(232,168,58,.05)); border: 1px solid rgba(232,168,58,.4); flex-shrink: 0; }
.fp3-ttl { font-size: 15px; font-weight: 900; color: var(--text); }
.fp3-sub { font-size: 9px; color: var(--gold); font-weight: 800; letter-spacing: .07em; }
.fp3-x { margin-left: auto; color: var(--dim); font-size: 20px; cursor: pointer; padding: 0 4px; }
.fp3-body { display: flex; min-height: 0; flex: 1; }
.fp3-rail { width: 60px; background: #061320; border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; padding: 10px 0; gap: 6px; flex-shrink: 0; }
.fp3-rail button { width: 46px; height: 46px; border: none; border-radius: 12px; background: none; color: var(--dim); font-size: 18px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.fp3-rail button .rl { font-size: 7px; font-weight: 800; letter-spacing: .04em; }
.fp3-rail button.on { background: linear-gradient(180deg, rgba(232,168,58,.22), rgba(232,168,58,.05)); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(232,168,58,.35); }
.fp3-main { flex: 1; min-width: 0; padding: 14px; overflow-y: auto; }
.fp3-stats { display: flex; gap: 7px; margin-bottom: 14px; }
.fp3-stat { flex: 1; background: linear-gradient(180deg, #0d2237, #0a1b2c); border: 1px solid var(--border); border-radius: 11px; padding: 9px 6px; text-align: center; }
.fp3-stat .sv { font-size: 15px; font-weight: 900; color: var(--gold); }
.fp3-stat .sl { font-size: 8px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.fp3-pane { display: none; }
.fp3-pane.on { display: block; animation: fp3fade .2s; }
@keyframes fp3fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

/* 🏅 Tornei */
.trn-hero { position: relative; overflow: hidden; border-radius: 16px; padding: 14px; background: linear-gradient(135deg, rgba(232,168,58,.18), rgba(155,124,255,.12)); border: 1px solid rgba(232,168,58,.4); margin-bottom: 6px; }
.trn-sweep { position: absolute; top: 0; left: -60%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent); animation: trnsweep 3.2s ease-in-out infinite; }
@keyframes trnsweep { 0% { left: -60%; } 60%,100% { left: 130%; } }
.trn-live { font-size: 10px; font-weight: 800; color: var(--green); letter-spacing: .04em; }
.trn-title { font-size: 19px; font-weight: 900; color: var(--text); margin: 3px 0 1px; }
.trn-metric { font-size: 11px; color: var(--gold); font-weight: 700; }
.trn-prizes { display: flex; gap: 6px; margin: 11px 0; }
.trn-prize { flex: 1; background: rgba(0,0,0,.22); border: 1px solid var(--border); border-radius: 10px; padding: 7px 4px; text-align: center; }
.trn-prize span { font-size: 16px; display: block; }
.trn-prize b { font-size: 11px; color: var(--gold); }
.trn-me { display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,.25); border-radius: 11px; padding: 9px 12px; }
.trn-me-l { font-size: 9px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; }
.trn-me-v { font-size: 17px; font-weight: 900; color: var(--gold); }
.trn-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 6px; background: var(--card); }
.trn-row.me { border-color: rgba(232,168,58,.55); background: rgba(232,168,58,.08); }
.trn-rank { width: 30px; text-align: center; font-weight: 900; font-size: 14px; color: var(--dim); flex-shrink: 0; }
.trn-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trn-score { font-size: 13px; font-weight: 800; color: var(--teal); flex-shrink: 0; }
.trn-sched { display: flex; justify-content: space-between; align-items: center; padding: 11px; border: 1px dashed var(--border); border-radius: 11px; margin-bottom: 6px; }
.trn-pool { font-size: 13px; font-weight: 800; color: var(--gold); flex-shrink: 0; }

/* 🪤 Gabbia */
.gab-summary { border: 1px solid rgba(74,163,255,.4); background: linear-gradient(180deg, rgba(74,163,255,.10), transparent); border-radius: 13px; padding: 11px 13px; margin-bottom: 10px; }
.gab-summary .tick { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.gab-warn { font-size: 11px; color: #ffb38a; background: rgba(255,90,42,.1); border: 1px solid rgba(255,90,42,.35); border-radius: 10px; padding: 8px 11px; margin-bottom: 10px; line-height: 1.45; }
.gab-cage { border: 1px solid var(--border); border-radius: 13px; padding: 12px; margin-bottom: 9px; background: linear-gradient(180deg, var(--card), var(--card2)); transition: opacity .2s; }
.gab-cage.off { opacity: .6; }
.gab-bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.gab-bar > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--teal), var(--gold)); transition: width .3s; }
.sw { width: 44px; height: 24px; border-radius: 14px; background: rgba(255,255,255,.12); position: relative; flex-shrink: 0; cursor: pointer; transition: .2s; border: 1px solid var(--border); }
.sw span { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #7f9bb3; transition: .2s; }
.sw.on { background: rgba(78,203,130,.3); border-color: rgba(78,203,130,.6); }
.sw.on span { left: 22px; background: var(--green); }

/* 📬 Posta a due caselle */
.posta-tab { flex: 1; border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--dim); font-size: 12px; font-weight: 800; padding: 9px; border-radius: 10px; cursor: pointer; }
.posta-tab.on { background: linear-gradient(180deg, rgba(56,200,192,.2), rgba(56,200,192,.05)); color: var(--teal); border-color: rgba(56,200,192,.4); }
.posta-tab .pt-c { font-size: 10px; background: #e35; color: #fff; border-radius: 8px; padding: 0 5px; margin-left: 4px; }
.posta-tab .pt-c:empty { display: none; }
.mod-section {
  font-size: 10px; color: var(--dim); text-transform: uppercase;
  letter-spacing: 0.1em; margin: 4px 0 6px; font-weight: 700;
}

/* ── Market event banner ── */
.event-banner {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, rgba(78,203,130,0.15), rgba(56,200,192,0.08));
  border: 1px solid rgba(78,203,130,0.4); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 10px;
}
.event-banner .event-fire { font-size: 22px; animation: chatBob 2s ease-in-out infinite; }
.event-banner b { color: var(--text); font-size: 12px; }
.warehouse-cell.wh-hot { border-color: rgba(78,203,130,0.5); box-shadow: 0 0 0 1px rgba(78,203,130,0.25); }

/* 🎣 Banner evento di pesca (potenzia il pescato) */
.fe-banner {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, rgba(56,200,192,0.18), rgba(31,122,147,0.10));
  border: 1px solid rgba(78,205,196,0.45); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 12px;
  box-shadow: 0 0 14px rgba(78,205,196,0.12);
}
.fe-banner.fe-bad {
  background: linear-gradient(135deg, rgba(226,62,122,0.14), rgba(80,20,40,0.08));
  border-color: rgba(255,138,138,0.45); box-shadow: 0 0 14px rgba(226,62,122,0.10);
}
.fe-banner .fe-emoji { font-size: 26px; animation: chatBob 2.4s ease-in-out infinite; }
.fe-banner b { color: var(--text); font-size: 12.5px; }

/* 🏦 Offerta proattiva del banchiere */
.bk-offer-card {
  background: linear-gradient(135deg, rgba(244,183,63,0.16), rgba(31,122,147,0.08));
  border: 1px solid rgba(244,183,63,0.45); border-radius: 14px;
  padding: 12px; margin-bottom: 12px;
  box-shadow: 0 0 16px rgba(244,183,63,0.12);
}
.bk-offer-top { display: flex; align-items: center; gap: 10px; }
.bk-offer-top .bk-offer-ic { font-size: 26px; animation: chatBob 2.6s ease-in-out infinite; }
.bk-offer-card b { color: var(--text); }
.bk-offer-deal {
  display: flex; justify-content: space-between; align-items: center;
  margin: 10px 0; padding: 8px 10px; border-radius: 10px;
  background: rgba(8,22,38,0.55); font-size: 13px; color: var(--text);
}
.bk-offer-deal .bk-offer-tot { color: #7fe3a6; }
.bk-offer-btns { display: flex; gap: 8px; }
.bk-offer-btns .btn { flex: 1; padding: 11px; font-size: 13px; border-radius: 11px; }

/* ── ❓ Tooltip universale ── */
.tip-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%; margin-left: 5px;
  background: rgba(56,200,192,0.18); border: 1px solid rgba(56,200,192,0.5);
  color: #8fe3dd; font-size: 9px; font-weight: 800; cursor: pointer;
  vertical-align: middle; flex-shrink: 0; line-height: 1; user-select: none;
}
.tip-ico:active { transform: scale(0.88); }
.tip-overlay {
  display: none; position: fixed; inset: 0; z-index: 2300;
  background: rgba(4,10,20,0.72); backdrop-filter: blur(3px);
  align-items: center; justify-content: center; padding: 20px;
}
.tip-overlay.visible { display: flex; }
.tip-card {
  width: 100%; max-width: 380px; background: linear-gradient(160deg, #10243a, #0a1626);
  border: 1px solid rgba(56,200,192,0.4); border-radius: 16px; padding: 18px;
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
}
.tip-card h4 { font-size: 15px; font-weight: 800; color: #38c8c0; margin: 0 0 8px; }
.tip-card p { font-size: 12.5px; color: var(--text); line-height: 1.6; margin: 0 0 14px; white-space: pre-line; }
.tip-card button { width: 100%; padding: 11px; border-radius: 11px; border: none; background: var(--teal); color: #06202a; font-weight: 800; font-size: 13px; cursor: pointer; }

/* ── 🌍 Riserva Mondiale Globale ── */
#reserve-bar {
  flex-shrink: 0; display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; cursor: pointer; position: relative; overflow: hidden;
  background: linear-gradient(90deg, rgba(124,92,255,0.15), rgba(56,200,192,0.09), rgba(232,168,58,0.12));
  border-bottom: 1px solid rgba(124,92,255,0.3);
}
#reserve-bar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 25%, rgba(201,184,255,0.16) 47%, rgba(255,255,255,0.22) 50%, rgba(201,184,255,0.16) 53%, transparent 75%);
  transform: translateX(-110%); animation: rsvShimmer 7s ease-in-out infinite;
}
@keyframes rsvShimmer { 0% { transform: translateX(-110%); } 55%,100% { transform: translateX(110%); } }
/* 💡 linea di luce che scorre in basso, lenta e leggera (flusso di luce) */
#reserve-bar .rsv-bar-flow {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px; pointer-events: none; opacity: 0.7;
  background: linear-gradient(90deg, transparent, #7c5cff, #38c8c0, #e8a83a, transparent);
  background-size: 50% 100%; background-repeat: no-repeat;
  animation: rsvFlowLine 6.5s linear infinite;
}
@keyframes rsvFlowLine { 0% { background-position: -60% 0; } 100% { background-position: 160% 0; } }
#reserve-bar .rsv-globe { font-size: 22px; animation: rsvSpin 22s linear infinite; filter: drop-shadow(0 0 5px rgba(124,92,255,0.55)); }
@keyframes rsvSpin { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } }
#reserve-bar .rsv-mid { flex: 1; min-width: 0; }
#reserve-bar .rsv-label { font-size: 8.5px; letter-spacing: 0.14em; color: #c9b8ff; font-weight: 800; display: flex; align-items: center; gap: 6px; }
#reserve-bar .rsv-live { color: #7fe3a6; font-size: 7.5px; letter-spacing: 0.1em; animation: rsvLive 3.2s ease-in-out infinite; }
@keyframes rsvLive { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }
#reserve-bar .rsv-value {
  font-size: 13px; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums;
  letter-spacing: 0; text-shadow: 0 0 12px rgba(124,92,255,0.7); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  will-change: contents;
}
#reserve-bar .rsv-chev { font-size: 15px; opacity: 0.85; flex-shrink: 0; }
/* lampo quando entrano davvero le tasse */
.rsv-bump { animation: rsvBump 0.5s ease-out; }
@keyframes rsvBump { 0% { color: #7fe3a6; text-shadow: 0 0 22px rgba(127,227,166,0.9); transform: scale(1.04); } 100% { color: #fff; transform: scale(1); } }

.rsv-overlay {
  display: none; position: fixed; inset: 0; z-index: 2100;
  background: radial-gradient(circle at 50% 30%, rgba(20,12,48,0.92), rgba(4,8,20,0.96));
  backdrop-filter: blur(6px); align-items: center; justify-content: center; padding: 16px;
}
.rsv-overlay.visible { display: flex; }
.rsv-panel {
  width: 100%; max-width: 372px; position: relative;
  background: linear-gradient(160deg, #141033, #0a1426);
  border: 1px solid rgba(124,92,255,0.45); border-radius: 18px;
  padding: 16px 13px 13px; box-shadow: 0 0 50px rgba(124,92,255,0.3);
  max-height: 88vh; overflow-y: auto;
}
.rsv-close { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--dim); font-size: 17px; cursor: pointer; }
.rsv-panel-title { text-align: center; font-size: 15px; font-weight: 900; background: linear-gradient(90deg, #c9b8ff, #38c8c0, #e8a83a); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.rsv-panel-sub { text-align: center; font-size: 9px; color: var(--dim); margin-top: 1px; margin-bottom: 9px; }
.rsv-bigwrap { text-align: center; margin-bottom: 9px; }
.rsv-big {
  font-size: clamp(12px, 4vw, 16px); font-weight: 900; color: #fff; line-height: 1.12;
  text-shadow: 0 0 22px rgba(124,92,255,0.7); font-variant-numeric: tabular-nums;
  letter-spacing: 0; white-space: nowrap; max-width: 100%; overflow: hidden;
  will-change: transform, contents;
}
.rsv-sci { font-size: 11px; color: #c9b8ff; margin-top: 3px; font-weight: 700; }
.rsv-flowchart { height: 22px; border-radius: 9px; overflow: hidden; position: relative; background: rgba(8,14,30,0.7); border: 1px solid rgba(124,92,255,0.22); margin-bottom: 9px; }
.rsv-flow-anim {
  position: absolute; top: 0; bottom: 0; width: 55%;
  background: linear-gradient(90deg, transparent, rgba(56,200,192,0.4), transparent);
  animation: rsvFlowMove 6.5s ease-in-out infinite;
}
.rsv-flow-anim2 { background: linear-gradient(90deg, transparent, rgba(232,168,58,0.34), transparent); animation-duration: 9s; animation-delay: 2s; }
@keyframes rsvFlowMove { 0% { left: -55%; } 100% { left: 100%; } }

/* 📥📤 Statistiche in entrata / uscita (dettaglio completo) */
.rsv-stats { display: flex; flex-direction: column; gap: 6px; }
.rsv-group { background: rgba(8,14,30,0.55); border: 1px solid var(--border); border-radius: 11px; padding: 6px 8px; }
.rsv-group-h { display: flex; justify-content: space-between; align-items: center; font-size: 9.5px; font-weight: 800; letter-spacing: 0.06em; padding-bottom: 5px; margin-bottom: 3px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.rsv-group-h.in { color: #7fe3a6; }
.rsv-group-h.out { color: #ff9b9b; }
.rsv-group-h span { font-variant-numeric: tabular-nums; }
.rsv-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 3px 0; font-size: 10px; color: var(--dim); }
.rsv-row span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rsv-row b { font-variant-numeric: tabular-nums; font-size: 11px; transition: color .6s ease; flex-shrink: 0; }
.rsv-row b.pos, .rsv-group-h.in span, .rsv-net b.pos { color: #4ecb82; }
.rsv-row b.neg, .rsv-group-h.out span, .rsv-net b.neg { color: #ff8a8a; }
.rsv-net { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(124,92,255,0.08); border: 1px solid rgba(124,92,255,0.25); font-size: 12px; font-weight: 800; color: var(--text); }
.rsv-net b { font-variant-numeric: tabular-nums; font-size: 14px; }
.rsv-note { font-size: 9px; color: var(--dim); line-height: 1.45; margin-top: 8px; text-align: center; }

/* ── Rival-Regions style market offers ── */
/* ☰ Menu "Altro" — griglia delle sezioni secondarie */
.more-sheet-ov {
  position: fixed; inset: 0; z-index: 900; display: none;
  align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(2px);
}
.more-sheet {
  width: 100%; max-width: 520px; background: #0c1c2e;
  border-top: 1px solid var(--border); border-radius: 18px 18px 0 0;
  padding: 12px 12px calc(env(safe-area-inset-bottom, 0px) + 14px);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.55);
  animation: moreUp .2s ease;
}
@keyframes moreUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.more-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 800; color: var(--gold); margin-bottom: 12px; padding: 0 2px; }
.more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.more-item {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 13px;
  padding: 13px 4px 9px; display: flex; flex-direction: column; align-items: center; gap: 5px;
  cursor: pointer; color: var(--text); transition: transform .12s, border-color .12s, background .12s;
}
.more-item:active { transform: scale(0.94); }
.more-item.active { border-color: var(--teal); background: rgba(56,200,192,0.14); }
.more-ic { font-size: 24px; line-height: 1; }
.more-nm { font-size: 9px; font-weight: 700; text-align: center; }

.mkt-offer {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 8px;
}
/* 🐟 Griglia mercato giocatori (tipo banchiere): tocca una cella per aprire la tenda */
.mkt-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px;
}
.mkt-cell {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 6px 8px; text-align: center; cursor: pointer; color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 3px; transition: border-color .15s, background .15s;
}
.mkt-cell:active { transform: scale(0.97); }
.mkt-cell.empty { opacity: 0.45; }
.mkt-cell.open { border-color: var(--teal); background: rgba(56,200,192,0.10); }
.mkt-cell-ic { font-size: 24px; line-height: 1; }
.mkt-cell-ic img { width: 24px; height: 24px; object-fit: contain; vertical-align: middle; }
.mkt-cell-lbl { font-size: 11px; font-weight: 700; }
.mkt-cell-meta { font-size: 9px; color: var(--gold); }
.mkt-cell.empty .mkt-cell-meta { color: var(--dim); }
.mkt-tenda {
  background: rgba(56,200,192,0.05); border: 1px solid rgba(56,200,192,0.25);
  border-radius: 12px; padding: 10px; margin-bottom: 10px;
  animation: tendaOpen .18s ease;
}
@keyframes tendaOpen { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.mkt-tenda-head { font-size: 12px; font-weight: 800; color: var(--teal); margin-bottom: 8px; }
.mkt-offer-head { display: flex; align-items: center; gap: 10px; }
.mkt-offer-head .chat-av { width: 40px; height: 40px; border-radius: 6px; font-size: 14px; }
.mkt-offer-head .chat-av-emoji { font-size: 24px; }
.mkt-seller { flex: 1; min-width: 0; }
.mkt-seller-name { font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkt-fish { font-size: 11px; color: var(--dim); margin-top: 1px; }
.mkt-qtybox { text-align: right; flex-shrink: 0; }
.mkt-qty { font-size: 13px; font-weight: 800; color: var(--text); }
.mkt-unit { font-size: 10px; color: var(--gold); }
.mkt-buy-row { display: flex; gap: 8px; margin-top: 10px; }
.mkt-amt {
  width: 90px; flex-shrink: 0; background: var(--navy2); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; color: var(--text); font-family: inherit; font-size: 16px; outline: none;
}
.mkt-amt:focus { border-color: var(--teal); }
.mkt-buy-btn { flex: 1; font-size: 13px; }
.mkt-mine-note { font-size: 10px; color: var(--dim); margin-top: 8px; text-align: center; }

/* ── Friends online/offline status ── */
.friend-av-wrap { position: relative; flex-shrink: 0; }
.friend-status {
  position: absolute; bottom: -1px; right: -1px;
  width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid #2a2d31;
}
.friend-status.on  { background: #4ecb82; }
.friend-status.off { background: #6b7280; }
.fr-online  { color: #4ecb82; font-weight: 700; }
.fr-offline { color: #8a8f96; }

/* 🚢 Battaglia Navale */
.nav-grid { display: grid; gap: 3px; margin: 0 auto; max-width: 300px; }
.nav-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 15px; border-radius: 4px; background: rgba(40,90,160,0.16); border: 1px solid rgba(56,120,200,0.3); user-select: none; }
.nav-cell.nav-fire { cursor: pointer; background: rgba(56,200,192,0.14); border-color: rgba(56,200,192,0.45); }
.nav-cell.nav-fire:active { background: rgba(56,200,192,0.4); }
.nav-cell.nav-ship { background: rgba(150,160,175,0.35); border-color: rgba(200,210,220,0.5); }
.nav-cell.nav-hit { background: rgba(255,90,90,0.35); border-color: rgba(255,90,90,0.6); }
.nav-cell.nav-miss { background: rgba(255,255,255,0.05); color: var(--dim); }

/* 🚢 Battaglia Navale — schermo intero */
#naval-fs .nav-grid { max-width: min(460px, 92vw); gap: 4px; }
#naval-fs .nav-cell { font-size: 22px; border-radius: 6px; }

/* ════════════════════════════════════════════════════════════════════
   ✨ POLISH LAYER — colori, profondità e fluidità (override sicuri)
   ════════════════════════════════════════════════════════════════════ */

/* Bottoni: feedback tattile + gradiente e ombra morbida per dare profondità */
.btn { transition: transform .12s ease, filter .15s ease, opacity .15s ease, box-shadow .15s ease; }
.btn:active { transform: scale(.95); filter: brightness(1.05); }
.btn-teal { background: linear-gradient(180deg, #46d6ce, #2bb3ab); box-shadow: 0 2px 10px rgba(56,200,192,0.22); }
.btn-gold { background: linear-gradient(180deg, #f2bc55, #dd9722); box-shadow: 0 2px 10px rgba(232,168,58,0.22); }
.btn-red  { background: linear-gradient(180deg, #ec6a6a, #d23f3f); box-shadow: 0 2px 10px rgba(224,80,80,0.18); }
.btn-full:active { transform: scale(.985); }

/* Input: glow al focus per chiarezza */
.bank-input:focus, .auth-input:focus, .chat-input:focus, .profile-bio:focus {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 2px rgba(56,200,192,0.20);
  outline: none;
}

/* Card: transizione morbida del bordo + leggera profondità */
.card { transition: border-color .2s ease, box-shadow .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.18); }

/* Cambio scheda fluido: lieve dissolvenza del contenuto */
.tab-panel.active { animation: ttPanelFade .2s ease; }
@keyframes ttPanelFade { from { opacity: .35; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* Tab in basso: simbolo più reattivo + scorrimento fluido */
.tab-btn { transition: color .15s ease, transform .12s ease; }
.tab-btn:active { transform: scale(.92); }
.tab-symbol { transition: background .15s ease, transform .15s ease; }
#tab-content { scroll-behavior: smooth; }

/* Valori statistiche e saldo: transizione colore morbida */
.stat-value, #stat-money, #stat-tax, #stat-click { transition: color .25s ease; }

/* Pillola online: glow più vivo */
#online-pill { backdrop-filter: blur(2px); }

/* Pulse dolce per i banner (bonus/news) — già presente, qui reso più fluido */
#welcome-bonus-banner, #news-banner { transition: background .2s ease; }

/* 🎡 Ruota della Fortuna giornaliera — design luminoso */
/* 🌊 Sfondo della schermata ruota — mare notturno con aloni luminosi */
#panel-ruota {
  background:
    radial-gradient(circle at 50% 32%, rgba(232,168,58,0.16), rgba(232,168,58,0) 45%),
    radial-gradient(circle at 18% 12%, rgba(124,92,255,0.18), rgba(124,92,255,0) 40%),
    radial-gradient(circle at 85% 80%, rgba(56,200,192,0.14), rgba(56,200,192,0) 42%),
    linear-gradient(180deg, #0a1f33 0%, #071a2b 50%, #04101c 100%);
}
.wheel-wrap { position: relative; width: 250px; height: 250px; filter: drop-shadow(0 0 22px rgba(232,168,58,0.35)); }
.wheel-pointer { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); font-size: 30px; color: var(--gold);
  z-index: 5; filter: drop-shadow(0 2px 4px rgba(0,0,0,.7)); animation: wheelPoint 1.6s ease-in-out infinite; }
@keyframes wheelPoint { 0%,100%{ transform: translateX(-50%) translateY(0); } 50%{ transform: translateX(-50%) translateY(3px); } }
.wheel { width: 250px; height: 250px; border-radius: 50%; position: relative;
  border: 8px solid #0c2436; transform: rotate(0deg); will-change: transform;
  box-shadow: 0 0 0 3px var(--gold), 0 0 26px rgba(232,168,58,0.55), 0 10px 34px rgba(0,0,0,.6), inset 0 0 30px rgba(0,0,0,.35); }
.wheel::after { content:''; position:absolute; inset:0; border-radius:50%; pointer-events:none;
  background: radial-gradient(circle at 50% 18%, rgba(255,255,255,.28), rgba(255,255,255,0) 42%); }
.wheel-lbl { position: absolute; top: 50%; left: 50%; width: 64px; margin: 0; text-align: center;
  font-size: 13px; font-weight: 900; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.85), 0 0 6px rgba(0,0,0,.5); pointer-events: none; letter-spacing: .02em; }
.wheel-hub { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 56px; height: 56px;
  border-radius: 50%; background: radial-gradient(circle at 40% 32%, #1a4c66, #06121d); display: flex; align-items: center;
  justify-content: center; font-size: 24px; border: 3px solid var(--gold); z-index: 4;
  box-shadow: 0 2px 10px rgba(0,0,0,.6), 0 0 14px rgba(232,168,58,0.5); }
#wheel-spin { box-shadow: 0 0 18px rgba(232,168,58,0.5); animation: wheelGlow 1.8s ease-in-out infinite; }
@keyframes wheelGlow { 0%,100%{ box-shadow: 0 0 14px rgba(232,168,58,0.4); } 50%{ box-shadow: 0 0 26px rgba(232,168,58,0.75); } }
/* 💡 Corona di lampadine stile Coin Master (sul bordo dorato, lampeggio alternato) */
.wheel-lights { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.wheel-bulb { position: absolute; top: 50%; left: 50%; width: 9px; height: 9px; border-radius: 50%;
  background: #fff6c4; box-shadow: 0 0 8px 2px rgba(255,214,110,.95); animation: bulbTw 0.9s ease-in-out infinite; }
.wheel-bulb:nth-child(2n) { animation-delay: .45s; }
@keyframes bulbTw {
  0%,100% { opacity: 1; box-shadow: 0 0 10px 3px rgba(255,214,110,.95); }
  50%     { opacity: .28; box-shadow: 0 0 3px 1px rgba(255,180,70,.35); }
}
/* bordo dorato più ricco + alone caldo */
.wheel { border-color: #1a3a52; box-shadow: 0 0 0 4px #e8a83a, 0 0 0 7px #b9842a, 0 0 30px rgba(232,168,58,0.6), 0 10px 36px rgba(0,0,0,.6), inset 0 0 30px rgba(0,0,0,.35); }
.wheel-wrap { filter: drop-shadow(0 0 26px rgba(232,168,58,0.45)); }

/* ⚓ Nuova schermata Gilda (redesign segmentato) */
.g-hero { position:relative; border-radius:18px; overflow:hidden; border:1px solid rgba(232,168,58,.35); background:linear-gradient(135deg,#16314a,#101f30); padding:16px; margin-bottom:12px; }
.g-hero::after { content:""; position:absolute; right:-40px; top:-40px; width:170px; height:170px; border-radius:50%; background:radial-gradient(circle,rgba(232,168,58,.22),transparent 65%); }
.g-rank { position:absolute; top:12px; right:12px; z-index:2; background:var(--gold); color:#071826; font-weight:900; font-size:12px; padding:4px 11px; border-radius:30px; box-shadow:0 6px 16px rgba(232,168,58,.35); }
.g-hero-row { display:flex; align-items:center; gap:13px; position:relative; z-index:1; }
.g-crest { width:58px; height:58px; border-radius:15px; display:flex; align-items:center; justify-content:center; font-size:30px; background:linear-gradient(145deg,#1c3a55,#0e2034); border:1px solid rgba(56,200,192,.4); box-shadow:0 0 22px rgba(56,200,192,.22); flex-shrink:0; }
.g-name { font-size:19px; font-weight:900; color:var(--gold); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.g-tag { font-size:12px; color:var(--teal); }
.g-meta { font-size:10px; color:var(--dim); margin-top:3px; }
.g-lvl { margin-top:12px; position:relative; z-index:1; }
.g-lvl-top { display:flex; justify-content:space-between; font-size:10px; color:var(--dim); margin-bottom:5px; }
.gbar { height:10px; border-radius:7px; background:#0a1726; border:1px solid var(--border); overflow:hidden; }
.gbar.big { height:12px; }
.gbar > i { display:block; height:100%; border-radius:7px; background:linear-gradient(90deg,var(--teal),var(--gold)); transition:width .8s cubic-bezier(.2,.8,.2,1); }
.g-stats { display:flex; gap:9px; margin-bottom:12px; }
.g-stat { flex:1; background:linear-gradient(180deg,var(--card),var(--card2)); border:1px solid var(--border); border-radius:13px; padding:11px; text-align:center; }
.g-stat .v { font-size:16px; font-weight:900; }
.g-stat .v.teal { color:var(--teal); } .g-stat .v.gold { color:var(--gold); } .g-stat .v.green { color:var(--green); }
.g-stat .l { font-size:8px; color:var(--dim); margin-top:3px; text-transform:uppercase; letter-spacing:1px; }
.g-seg { display:flex; background:#0b1828; border:1px solid var(--border); border-radius:13px; padding:4px; margin-bottom:12px; }
.g-seg button { flex:1; border:0; background:transparent; color:var(--dim); font-family:inherit; font-size:11px; font-weight:700; padding:9px 2px; border-radius:9px; cursor:pointer; transition:.2s; display:flex; flex-direction:column; align-items:center; gap:2px; }
.g-seg button span { font-size:16px; }
.g-seg button.on { background:linear-gradient(180deg,#16314a,#102338); color:var(--text); box-shadow:0 3px 12px rgba(0,0,0,.4); }
.g-tab { display:none; animation:gfade .3s ease; }
.g-tab.on { display:block; }
@keyframes gfade { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
.gd-lbl { font-size:11px; font-weight:800; color:var(--dim); text-transform:uppercase; letter-spacing:1px; margin:10px 2px 8px; }
.gd-r { display:flex; justify-content:space-between; align-items:center; font-size:13px; padding:9px 0; border-bottom:1px solid rgba(255,255,255,.05); }
.gd-r span { color:var(--dim); }
.gm-row { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid rgba(255,255,255,.05); }
.gm-row:last-child { border-bottom:0; }
.gm-av { width:38px; height:38px; border-radius:11px; display:flex; align-items:center; justify-content:center; font-size:18px; background:#13283d; border:1px solid var(--border); flex-shrink:0; }
.gm-name { font-size:12px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gm-sub { font-size:9px; color:var(--dim); margin-top:2px; }
.gm-role { font-size:8px; font-weight:800; padding:2px 7px; border-radius:20px; margin-left:5px; }
.gm-role.own { background:rgba(232,168,58,.15); color:var(--gold); }

/* 🎣 Tab Pesca redesign "Arcade Bold" */
.pesca-play { position:relative; overflow:hidden; border-radius:18px; padding:22px 16px; text-align:center; margin-bottom:12px; background:linear-gradient(135deg,#1a3450,#0e2034); border:1px solid rgba(232,168,58,0.4); }
.pesca-play .pp-sweep { position:absolute; top:0; bottom:0; width:50%; pointer-events:none; background:linear-gradient(90deg,transparent,rgba(232,168,58,0.18),transparent); transform:skewX(-20deg); animation:ppSweep 3s ease-in-out infinite; }
@keyframes ppSweep { 0%{left:-50%} 60%,100%{left:120%} }
.pesca-play .pp-e { font-size:54px; position:relative; z-index:1; filter:drop-shadow(0 6px 16px rgba(56,200,192,0.5)); }
.pesca-play .pp-img { display:block; margin:0 auto 2px; height:132px; width:auto; max-width:90%; position:relative; z-index:1; filter:drop-shadow(0 10px 18px rgba(0,0,0,0.55)); }
.pesca-play .pp-t { position:relative; z-index:1; font-size:18px; font-weight:900; color:var(--gold); margin-top:4px; letter-spacing:.02em; }
.pesca-play .pp-sub { position:relative; z-index:1; font-size:10px; color:var(--dim); margin-top:6px; }
.pesca-play .pp-go { position:relative; z-index:1; width:100%; margin-top:14px; font-size:15px; font-weight:900; color:#06222a; border:0; cursor:pointer; background:linear-gradient(90deg,var(--teal),#56e0d8); padding:14px; border-radius:14px; box-shadow:0 10px 30px rgba(56,200,192,0.4); animation:ppPulse 1.7s ease-in-out infinite; }
@keyframes ppPulse { 50%{transform:scale(1.03)} }
.pesca-tiles { display:flex; gap:9px; margin-bottom:12px; }
.pesca-tile { flex:1; position:relative; overflow:hidden; background:linear-gradient(180deg,var(--card),var(--card2)); border:1px solid var(--border); border-radius:13px; padding:12px 8px; text-align:center; }
.pesca-tile .pt-ac { position:absolute; top:0; left:0; right:0; height:3px; }
.pesca-tile.c1 .pt-ac { background:var(--gold); } .pesca-tile.c2 .pt-ac { background:var(--green); } .pesca-tile.c3 .pt-ac { background:var(--teal); }
.pesca-tile .pt-e { font-size:22px; } .pesca-tile .pt-l { font-size:8px; color:var(--dim); margin-top:3px; text-transform:uppercase; letter-spacing:1px; }
.pesca-tile .pt-v { font-size:13px; font-weight:900; margin-top:2px; }

/* 🛒 Negozio redesign "Shop Premium" */
.shopp-uc { display:flex; align-items:center; gap:12px; position:relative; overflow:hidden;
  background:linear-gradient(180deg,var(--card),var(--card2)); border:1px solid var(--border);
  border-radius:15px; padding:12px; margin-bottom:9px; }
.shopp-uc.locked { opacity:.55; }
.shopp-med { width:50px; height:50px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-size:24px; flex-shrink:0; border:2px solid var(--teal); background:rgba(255,255,255,0.03); }
.shopp-info { flex:1; min-width:0; }
.shopp-nm { font-size:13px; font-weight:800; display:flex; align-items:center; gap:5px; flex-wrap:wrap; }
.shopp-own { font-size:8px; font-weight:800; background:rgba(255,255,255,0.06); color:var(--text); border-radius:20px; padding:2px 7px; }
.shopp-ds { font-size:9px; color:var(--teal); margin-top:3px; }
.shopp-by { padding:10px 14px; font-size:11px; border-radius:11px; background:linear-gradient(90deg,var(--gold),#f2c477);
  color:#231603; font-weight:900; flex-shrink:0; text-align:center; border:0; cursor:pointer; line-height:1.2; }
.shopp-by:disabled { opacity:.4; cursor:not-allowed; filter:grayscale(.4); }
.shopp-by small { display:block; font-size:8px; font-weight:700; opacity:.8; }
.shopp-lock { font-size:11px; font-weight:800; color:var(--dim); flex-shrink:0; text-align:center; padding:8px 10px; }

/* 🏦 Banca redesign "Cards Dashboard" */
.bankd-balc { background:linear-gradient(135deg,#103048,#0c1c30); border:1px solid rgba(56,200,192,.35); border-radius:16px; padding:18px; margin-bottom:12px; text-align:center; }
.bankd-lab { font-size:9px; color:var(--dim); letter-spacing:1px; text-transform:uppercase; }
.bankd-bal { font-size:28px; font-weight:900; color:var(--teal); margin:4px 0; }
.bankd-meta { font-size:10px; color:var(--dim); }
.bankd-acts { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-bottom:12px; }
.bankd-ac { background:linear-gradient(180deg,var(--card),var(--card2)); border:1px solid var(--border); border-radius:14px; padding:14px 12px; cursor:pointer; text-align:center; transition:.15s; }
.bankd-ac:hover { transform:translateY(-2px); border-color:rgba(56,200,192,.4); }
.bankd-ac .e { font-size:26px; } .bankd-ac .t { font-size:12px; font-weight:800; margin-top:6px; } .bankd-ac .s { font-size:9px; color:var(--dim); margin-top:2px; }

/* 📈 Finanza redesign "Wallet Cards" */
.fin-hero { position:relative; overflow:hidden; border-radius:16px; padding:18px; margin-bottom:12px; background:linear-gradient(120deg,#1a2f10,#0e2034); border:1px solid rgba(232,168,58,.25); text-align:center; }
.fin-hl { font-size:9px; color:var(--dim); letter-spacing:1px; text-transform:uppercase; }
.fin-hv { font-size:27px; font-weight:900; color:var(--gold); margin:3px 0; }
.fin-hs { font-size:9px; color:var(--dim); }
.fin-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:9px; margin-bottom:12px; }
.fin-gt { background:linear-gradient(180deg,var(--card),var(--card2)); border:1px solid var(--border); border-radius:13px; padding:12px 6px; text-align:center; cursor:pointer; transition:.15s; }
.fin-gt:hover { transform:translateY(-2px); }
.fin-gt.on { border-color:rgba(56,200,192,.5); background:rgba(56,200,192,.08); }
.fin-gt .e { font-size:22px; } .fin-gt .t { font-size:10px; font-weight:800; margin-top:5px; }

/* 🤝 Mercato Giocatori — REDESIGN PREMIUM (h1023). Scopato su .mkt-wrap per non toccare altre schermate. */
.mkt-wrap .cat-filters { display:flex; gap:7px; margin-bottom:12px; overflow:visible; }
.mkt-wrap .cat-btn { flex:1; padding:9px 6px; border-radius:13px; border:1px solid var(--border); background:rgba(255,255,255,.03); color:var(--dim); font-size:11px; font-weight:800; letter-spacing:.02em; text-transform:none; text-align:center; transition:all .15s; }
.mkt-wrap .cat-btn.active { background:linear-gradient(180deg,rgba(56,200,192,.22),rgba(56,200,192,.10)); border-color:rgba(56,200,192,.5); color:#bdfdf7; box-shadow:0 2px 12px rgba(56,200,192,.12),inset 0 1px 0 rgba(255,255,255,.06); }
/* griglia pesci */
.mkt-wrap .mkt-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; margin-bottom:12px; }
.mkt-wrap .mkt-cell { position:relative; background:linear-gradient(180deg,#14222f,#0e1a27); border:1px solid var(--border); border-radius:16px; padding:13px 6px 10px; text-align:center; cursor:pointer; color:var(--text); display:flex; flex-direction:column; align-items:center; gap:5px; transition:transform .12s ease,border-color .15s,box-shadow .15s; box-shadow:inset 0 1px 0 rgba(255,255,255,.04); }
.mkt-wrap .mkt-cell:active { transform:scale(.96); }
.mkt-wrap .mkt-cell.empty { opacity:.4; }
.mkt-wrap .mkt-cell.open { border-color:rgba(56,200,192,.6); box-shadow:0 0 0 1px rgba(56,200,192,.35),0 6px 20px rgba(56,200,192,.14); }
.mkt-wrap .mkt-cell-ic { font-size:27px; line-height:1; filter:drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.mkt-wrap .mkt-cell-ic img { width:27px; height:27px; object-fit:contain; vertical-align:middle; }
.mkt-wrap .mkt-cell-lbl { font-size:11px; font-weight:800; }
.mkt-wrap .mkt-cell-meta { font-size:10px; font-weight:800; color:var(--gold); background:rgba(232,168,58,.12); padding:2px 8px; border-radius:999px; }
.mkt-wrap .mkt-cell.empty .mkt-cell-meta { color:var(--dim); background:rgba(255,255,255,.04); }
/* tenda offerte */
.mkt-wrap .mkt-tenda { background:linear-gradient(180deg,rgba(56,200,192,.06),rgba(56,200,192,.02)); border:1px solid rgba(56,200,192,.28); border-radius:18px; padding:13px; margin-bottom:12px; animation:tendaOpen .2s ease; }
.mkt-wrap .mkt-tenda-head { display:flex; align-items:center; font-size:13px; font-weight:800; color:#bdfdf7; margin-bottom:11px; }
/* card offerta */
.mkt-wrap .mkt-offer { background:linear-gradient(180deg,#14212f,#0f1b29); border:1px solid var(--border); border-radius:16px; padding:13px; margin-bottom:10px; box-shadow:inset 0 1px 0 rgba(255,255,255,.04); }
.mkt-wrap .mkt-offer-head { display:flex; align-items:center; gap:11px; margin-bottom:11px; }
.mkt-wrap .mkt-offer-head .chat-av { width:42px; height:42px; border-radius:11px; border:1px solid var(--border); font-size:14px; flex-shrink:0; }
.mkt-wrap .mkt-offer-head .chat-av-emoji { font-size:22px; }
.mkt-wrap .mkt-seller { flex:1; min-width:0; }
.mkt-wrap .mkt-seller-name { font-size:13px; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mkt-wrap .mkt-fish { font-size:11px; color:var(--dim); margin-top:2px; }
.mkt-wrap .mkt-qtybox { text-align:right; flex-shrink:0; }
.mkt-wrap .mkt-qty { font-size:10px; color:var(--dim); text-transform:uppercase; letter-spacing:.04em; }
.mkt-wrap .mkt-unit { font-size:17px; font-weight:900; color:var(--gold); line-height:1.1; }
.mkt-wrap .mkt-unit small { font-size:10px; font-weight:700; color:var(--dim); }
/* pannello acquisto */
.mkt-wrap .mkt-buy { background:rgba(7,15,26,.5); border:1px solid var(--border); border-radius:13px; padding:10px; display:flex; flex-direction:column; gap:8px; }
.mkt-wrap .mkt-row { display:flex; align-items:center; gap:7px; }
.mkt-wrap .mkt-lbl { font-size:10px; color:var(--dim); min-width:74px; font-weight:700; }
.mkt-wrap .mkt-step { width:38px; height:38px; border-radius:11px; background:rgba(255,255,255,.05); border:1px solid var(--border); color:var(--text); font-size:19px; font-weight:700; line-height:1; cursor:pointer; flex-shrink:0; transition:transform .1s,background .15s; }
.mkt-wrap .mkt-step:active { transform:scale(.9); background:rgba(56,200,192,.18); }
.mkt-wrap .mkt-inp { flex:1; min-width:0; width:auto; text-align:center; font-weight:800; font-size:16px; background:#0a1726; border:1px solid var(--border); border-radius:11px; color:var(--text); padding:9px; outline:none; font-family:inherit; transition:border-color .15s,box-shadow .15s; }
.mkt-wrap .mkt-inp:focus { border-color:var(--teal); box-shadow:0 0 0 3px rgba(56,200,192,.12); }
.mkt-wrap .mkt-quick { display:flex; gap:6px; }
.mkt-wrap .mkt-qbtn { flex:1; font-size:11px; font-weight:800; padding:7px; border-radius:10px; background:rgba(255,255,255,.04); border:1px solid var(--border); color:var(--dim); cursor:pointer; transition:all .12s; }
.mkt-wrap .mkt-qbtn:active { background:rgba(56,200,192,.18); color:#bdfdf7; transform:scale(.96); }
.mkt-wrap .mkt-meta { font-size:10px; color:var(--dim); text-align:center; }
.mkt-wrap .mkt-buy-btn { width:100%; flex:none; padding:13px; border-radius:13px; border:none; background:linear-gradient(135deg,#3ad6ce,#23a59d); color:#04231f; font-size:15px; font-weight:900; cursor:pointer; box-shadow:0 4px 16px rgba(56,200,192,.25); transition:transform .1s,box-shadow .15s; font-family:inherit; }
.mkt-wrap .mkt-buy-btn:active { transform:translateY(1px) scale(.99); box-shadow:0 2px 8px rgba(56,200,192,.2); }
.mkt-wrap .mkt-mine-note { font-size:10px; color:var(--dim); margin-top:8px; text-align:center; }
.mkt-cell.open { border-color:var(--teal); background:rgba(56,200,192,.12); }

/* 🧮 ORDER BOOK / BORSA (design #1) */
.mkt-wrap .ob-chips { display:flex; gap:7px; overflow-x:auto; padding-bottom:7px; margin-bottom:11px; scrollbar-width:none; }
.mkt-wrap .ob-chips::-webkit-scrollbar { display:none; }
.mkt-wrap .ob-chip { flex:0 0 auto; display:flex; flex-direction:column; align-items:center; gap:2px; padding:7px 12px; border-radius:13px; background:linear-gradient(180deg,#14222f,#0e1a27); border:1px solid var(--border); color:var(--text); font-weight:700; cursor:pointer; transition:transform .1s,border-color .15s,background .15s; }
.mkt-wrap .ob-chip:active { transform:scale(.95); }
.mkt-wrap .ob-chip.on { border-color:var(--teal); background:rgba(56,200,192,.14); color:#bdfdf7; box-shadow:0 2px 12px rgba(56,200,192,.12); }
.mkt-wrap .ob-chip.empty { opacity:.42; }
.mkt-wrap .ob-chip-ic { font-size:20px; line-height:1; }
.mkt-wrap .ob-chip-ic img { width:20px; height:20px; object-fit:contain; vertical-align:middle; }
.mkt-wrap .ob-chip-lbl { font-size:10px; }
.mkt-wrap .ob-chip-p { font-size:9px; font-weight:800; color:var(--gold); }
.mkt-wrap .ob-chip.empty .ob-chip-p { color:var(--dim); }
.mkt-wrap .ob-top { display:flex; justify-content:space-between; align-items:center; font-size:11px; color:var(--dim); font-weight:700; padding:0 4px 8px; }
.mkt-wrap .ob-top b { color:var(--text); }
.mkt-wrap .ob-top-r { display:flex; align-items:center; gap:8px; }
.mkt-wrap .ob-refresh { width:28px; height:28px; border-radius:8px; background:rgba(255,255,255,.04); border:1px solid var(--border); color:var(--dim); font-size:12px; cursor:pointer; }
.mkt-wrap .ob-empty { text-align:center; padding:26px 12px; color:var(--dim); font-size:12px; }
.mkt-wrap .ob-row { background:linear-gradient(180deg,#14212f,#0f1b29); border:1px solid var(--border); border-radius:13px; margin-bottom:7px; overflow:hidden; transition:border-color .15s,box-shadow .15s; }
.mkt-wrap .ob-row.open { border-color:rgba(56,200,192,.5); box-shadow:0 0 0 1px rgba(56,200,192,.25); }
.mkt-wrap .ob-main { display:flex; align-items:center; gap:9px; padding:9px 11px; cursor:pointer; }
.mkt-wrap .ob-av .chat-av { width:30px; height:30px; border-radius:8px; font-size:12px; }
.mkt-wrap .ob-av .chat-av-emoji { font-size:16px; }
.mkt-wrap .ob-nm { flex:1; min-width:0; font-size:12px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mkt-wrap .ob-q { font-size:10px; color:var(--dim); text-align:right; min-width:50px; }
.mkt-wrap .ob-pr { font-size:15px; font-weight:900; color:var(--gold); text-align:right; min-width:56px; }
.mkt-wrap .ob-go { font-size:11px; font-weight:800; color:var(--teal); flex-shrink:0; }
.mkt-wrap .ob-tag { font-size:13px; flex-shrink:0; }
.mkt-wrap .ob-buy { padding:0 11px 11px; }
.mkt-cell-meta { font-weight:700; }

/* 🏛️ Immobili redesign "Luxury Showcase" */
.imm-sc { position:relative; overflow:hidden; border-radius:16px; margin-bottom:10px; border:1px solid var(--border); background:linear-gradient(115deg,#1a2740,#0d1b2c); }
.imm-sc.has { border-color:rgba(232,168,58,.5); }
.imm-glow { position:absolute; right:-30px; top:-30px; width:130px; height:130px; border-radius:50%; background:radial-gradient(circle,rgba(232,168,58,.16),transparent 65%); }
.imm-in { position:relative; z-index:1; display:flex; align-items:center; gap:13px; padding:14px; }
.imm-e { font-size:38px; flex-shrink:0; filter:drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.imm-info { flex:1; min-width:0; }
.imm-nm { font-size:14px; font-weight:900; color:var(--gold); }
.imm-lo { font-size:9px; color:var(--dim); margin-top:1px; }
.imm-rt { display:inline-block; font-size:10px; color:var(--teal); background:rgba(56,200,192,.1); border-radius:20px; padding:3px 9px; margin-top:5px; }
.imm-owned { flex-shrink:0; text-align:center; color:var(--teal); font-weight:700; font-size:10px; line-height:1.4; }
.imm-by { flex-shrink:0; white-space:nowrap; font-size:11px; }

/* 🍽️ Ristoranti redesign "Michelin Premium" */
.rist-plate { position:relative; overflow:hidden; border-radius:18px; padding:22px 16px; text-align:center; margin-bottom:10px; background:radial-gradient(circle at 50% 0,#2a2410,#0d1b2c 70%); border:1px solid rgba(232,168,58,.45); }
.rist-ring { width:88px; height:88px; border-radius:50%; margin:0 auto 8px; display:flex; align-items:center; justify-content:center; font-size:40px; background:radial-gradient(circle,#15273c,#0c1a2a); border:2px solid rgba(232,168,58,.5); box-shadow:0 0 30px rgba(232,168,58,.3); }
.rist-nm { font-size:18px; font-weight:900; color:var(--gold); }
.rist-stars { font-size:15px; margin-top:3px; letter-spacing:3px; }
.rist-sub { font-size:10px; color:var(--dim); margin-top:5px; }
.rist-il { font-size:9px; color:var(--dim); text-transform:uppercase; letter-spacing:1px; margin-top:8px; }
.rist-inc { font-size:22px; font-weight:900; }
.rist-plbl { font-size:11px; color:var(--dim); margin-bottom:8px; }
.rist-pantry { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.rist-pq { background:#13283d; border:1px solid var(--border); border-radius:11px; padding:9px; font-size:11px; display:flex; justify-content:space-between; align-items:center; }
.rist-pq b { color:var(--teal); }
.rist-pq img { width:16px; height:16px; vertical-align:middle; }

/* 🎮 Minigiochi redesign "Featured + List" */
.mgf { position:relative; overflow:hidden; border-radius:16px; padding:16px; margin-bottom:12px; cursor:pointer; background:linear-gradient(120deg,#3a2d10,#0e1c2e); border:1px solid rgba(232,168,58,.45); }
.mgf-sweep { position:absolute; top:0; bottom:0; width:50%; pointer-events:none; background:linear-gradient(90deg,transparent,rgba(232,168,58,.18),transparent); transform:skewX(-20deg); animation:mgfSweep 3s ease-in-out infinite; }
@keyframes mgfSweep { 0%{left:-50%} 60%,100%{left:120%} }
.mgf-lab { position:relative; z-index:1; font-size:9px; color:var(--green); letter-spacing:1px; }
.mgf-t { position:relative; z-index:1; font-size:18px; font-weight:900; color:var(--gold); margin:3px 0; }
.mgf-s { position:relative; z-index:1; font-size:10px; color:var(--dim); line-height:1.4; }
.mgf-go { position:relative; z-index:1; margin-top:10px; display:inline-block; font-size:12px; font-weight:900; background:linear-gradient(90deg,var(--gold),#f2c477); color:#231603; padding:9px 18px; border-radius:11px; }
.mgl { display:flex; align-items:center; gap:11px; background:linear-gradient(180deg,var(--card),var(--card2)); border:1px solid var(--border); border-radius:12px; padding:11px; margin-bottom:8px; cursor:pointer; transition:border-color .15s; }
.mgl:hover { border-color:rgba(56,200,192,.4); }
.mgl-ic { width:42px; height:42px; border-radius:11px; background:#13283d; border:1px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:21px; flex-shrink:0; }
.mgl-info { flex:1; min-width:0; } .mgl-nm { font-size:12px; font-weight:800; } .mgl-ds { font-size:9px; color:var(--dim); margin-top:1px; }
.mgl-go { margin-left:auto; font-size:11px; color:var(--teal); font-weight:800; flex-shrink:0; }

/* ⚡ Energia redesign "Power Hub" */
.ene-gauge { position:relative; width:150px; height:150px; margin:4px auto 10px; }
.ene-gc { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.ene-gc .v { font-size:26px; font-weight:900; }
.ene-gc .l { font-size:9px; color:var(--dim); }
.ene-three { display:flex; gap:8px; }
.ene-t { flex:1; background:linear-gradient(180deg,var(--card),var(--card2)); border:1px solid var(--border); border-radius:12px; padding:10px 6px; }
.ene-t .v { font-size:14px; font-weight:900; }
.ene-t .l { font-size:8px; color:var(--dim); margin-top:2px; text-transform:uppercase; letter-spacing:.5px; }

/* 💬 Chat redesign "Channels" (on-brand navy/teal, pillole + bolle) */
.chat-tabs { background:transparent; border-bottom:1px solid var(--border); padding:8px 8px 5px; gap:6px; }
.chat-tab { flex:0 0 auto; border-radius:20px; border:1px solid var(--border); background:#0b1828; color:var(--dim); padding:6px 13px; font-size:10px; letter-spacing:0; border-bottom:1px solid var(--border); }
.chat-tab.active { color:var(--teal); background:rgba(56,200,192,.15); border-color:rgba(56,200,192,.4); border-bottom-color:rgba(56,200,192,.4); }
.chat-presence { color:var(--green); }
.chat-mode-bar { gap:6px; }
.chat-mode { border-radius:20px; background:#0b1828; border:1px solid var(--border); color:var(--dim); }
.chat-mode.active { background:rgba(56,200,192,.15); border-color:rgba(56,200,192,.4); color:var(--teal); }
.chat-row { padding:3px 8px; }
.chat-name { font-size:9.5px; color:var(--teal); }
.chat-text { background:var(--card2); border:1px solid var(--border); border-radius:4px 12px 12px 12px; padding:7px 10px; display:inline-block; font-size:11px; margin-top:3px; max-width:100%; }
.chat-row.mine .chat-text { background:#16314a; border-color:rgba(56,200,192,.3); border-radius:12px 4px 12px 12px; }

/* ⚙️ Impostazioni redesign "Cards Grid" */
.set-hero { display:flex; align-items:center; gap:13px; background:linear-gradient(135deg,#13314a,#0e2034); border:1px solid rgba(56,200,192,.3); border-radius:16px; padding:14px; margin-bottom:12px; }
.set-av { width:60px; height:60px; border-radius:16px; background:#13283d; border:1px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:28px; flex-shrink:0; }
.set-nm { font-size:15px; font-weight:900; color:var(--gold); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.set-uid { font-size:9px; color:var(--dim); margin-top:2px; }
.set-label-row { font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--teal); margin:4px 2px 8px; }
.set-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:9px; margin-bottom:14px; }
.set-gc { background:linear-gradient(180deg,var(--card),var(--card2)); border:1px solid var(--border); border-radius:13px; padding:13px 6px; text-align:center; cursor:pointer; transition:.15s; }
.set-gc:hover { transform:translateY(-2px); border-color:rgba(56,200,192,.4); }
.set-gc.active { border-color:var(--teal); background:linear-gradient(180deg,rgba(56,200,192,.18),rgba(56,200,192,.06)); box-shadow:0 0 0 1px rgba(56,200,192,.35) inset; }
.set-gc .e { font-size:24px; }
.set-gc .t { font-size:10px; font-weight:800; margin-top:5px; }

/* 🎯 Missioni — Quest Board */
.qb-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.qb-t { font-size:14px; font-weight:900; color:var(--gold); } .qb-tm { font-size:10px; color:var(--dim); }
.qb-board { background:linear-gradient(160deg,#1a1206,#0e1c2e); border:1px solid rgba(232,168,58,.4); border-radius:16px; padding:13px; margin-bottom:12px; }
.qb-bt { font-size:12px; font-weight:900; color:var(--gold); text-align:center; margin-bottom:10px; letter-spacing:1px; }
.qb-tk { background:rgba(255,255,255,.04); border:1px dashed rgba(232,168,58,.4); border-radius:10px; padding:10px; margin-bottom:8px; display:flex; align-items:center; gap:9px; }
.qb-tk.done { border-style:solid; border-color:rgba(78,203,130,.5); }
.qb-e { font-size:22px; flex-shrink:0; }
.qb-info { flex:1; min-width:0; } .qb-nm { font-size:12px; font-weight:700; } .qb-sub { font-size:9px; color:var(--dim); margin:2px 0 5px; }
.qb-bar { height:7px; border-radius:5px; background:#0a1726; border:1px solid var(--border); overflow:hidden; }
.qb-bar > i { display:block; height:100%; background:linear-gradient(90deg,var(--teal),var(--gold)); }
.qb-st { flex-shrink:0; font-size:12px; font-weight:800; } .qb-st.ok { color:var(--green); } .qb-st.no { color:var(--dim); }
.qb-claim { flex-shrink:0; padding:8px 12px; font-size:13px; }
.qb-chest { text-align:center; background:linear-gradient(180deg,var(--card),var(--card2)); border:1px solid rgba(78,203,130,.4); border-radius:14px; padding:14px; }
.qb-ce { font-size:34px; } .qb-ct { font-size:12px; font-weight:800; margin:5px 0; } .qb-cs { font-size:10px; color:var(--dim); }

/* 📱 iOS: font-size ≥16px su TUTTI i campi → niente zoom automatico al focus (con user-scalable=no resterebbe zoomato) */
input[type="text"], input[type="number"], input[type="email"], input[type="password"],
input[type="datetime-local"], input[type="search"], input[type="tel"], textarea, select {
  font-size: 16px;
}

/* 🏛️ Governo */
.gov-hero { border: 1px solid rgba(232,168,58,.4); background: linear-gradient(180deg, rgba(232,168,58,.10), transparent); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.gov-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
/* ── 🏛️ Governo · "Senato Oro" (proto #2) — istituzionale: oro su marmo scuro, serif ── */
.gov-policy-on { font-size: 12px; color: #f2c477; background: rgba(232,168,58,.10); border: 1px solid rgba(232,168,58,.4); border-radius: 10px; padding: 9px 11px; margin-bottom: 10px; line-height: 1.45; }
/* 📜 Policy — tocco ampio, chiaro, fluido (selettore durata + lista) */
#panel-governo .btn { min-height: 44px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
#panel-governo .gov-tile, #panel-governo .gov-dur, #panel-governo .gov-pol, #panel-governo .btn { user-select: none; }
.gov-dur-row { display: flex; gap: 8px; margin-bottom: 12px; }
.gov-dur { flex: 1; min-height: 50px; border-radius: 12px; border: 1px solid rgba(232,168,58,.3); background: rgba(0,0,0,.25); color: #e9dcc0; font-weight: 800; font-size: 14px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; transition: transform .08s, background .15s, border-color .15s; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.gov-dur small { font-size: 10px; font-weight: 700; opacity: .7; }
.gov-dur:active { transform: scale(.95); }
.gov-dur.on { background: linear-gradient(180deg, #e8a83a, #c8862a); border-color: #e8a83a; color: #1a1206; box-shadow: 0 2px 10px rgba(232,168,58,.4); }
.gov-dur.on small { opacity: .85; }
.gov-pol-list { display: flex; flex-direction: column; gap: 8px; }
.gov-pol { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 60px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.22); color: #e9dcc0; text-align: left; cursor: pointer; transition: transform .08s, border-color .15s, background .15s; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.gov-pol:active { transform: scale(.98); }
.gov-pol.on { border-color: #e8a83a; background: rgba(232,168,58,.14); box-shadow: inset 0 0 0 1px rgba(232,168,58,.4); }
.gov-pol.poor { opacity: .55; }
.gov-pol-rank { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 14px; background: linear-gradient(180deg, #3a3526, #211d12); border: 1px solid rgba(232,168,58,.5); color: #f2c477; font-family: Georgia, serif; }
.gov-pol.on .gov-pol-rank { background: linear-gradient(180deg, #f6d57a, #c8862a); color: #1a1206; border-color: #f6d57a; }
.gov-pol-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gov-pol-mid b { font-size: 13.5px; line-height: 1.2; }
.gov-pol-mid small { font-size: 11px; color: rgba(233,220,192,.6); line-height: 1.2; }
.gov-pol-cost { flex: 0 0 auto; text-align: right; font-weight: 800; font-size: 13px; color: #f6d57a; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-family: Georgia, serif; }
.gov-pol-cost em { font-style: normal; font-size: 9px; color: #ff8a8a; font-weight: 600; }
/* 🏆 Classifica nazioni (Governo + selettore nazione) */
.nat-lb { display: flex; flex-direction: column; gap: 6px; }
.nat-lb-row { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 11px; border: 1px solid rgba(232,168,58,.22); background: rgba(232,168,58,.05); }
.nat-lb-row.mine { border-color: rgba(232,168,58,.6); background: rgba(232,168,58,.13); box-shadow: inset 0 0 0 1px rgba(232,168,58,.3); }
.nat-lb-rank { flex: 0 0 24px; text-align: center; font-weight: 900; font-size: 14px; color: #f2c477; }
.nat-lb-flag { flex: 0 0 auto; font-size: 22px; }
.nat-lb-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; font-weight: 700; color: #e9dcc0; overflow: hidden; }
.nat-lb-name em { font-style: normal; color: var(--teal); font-size: 10px; font-weight: 800; }
.nat-lb-name small { font-size: 10px; color: rgba(233,220,192,.6); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nat-lb-stats { flex: 0 0 auto; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.nat-lb-stats b { font-size: 13px; font-weight: 800; color: #f6d57a; font-family: Georgia, serif; }
.nat-lb-stats small { font-size: 10px; color: rgba(233,220,192,.7); }
.gov-card { border: 1px solid rgba(232,168,58,.4); border-radius: 13px; padding: 12px; margin-bottom: 10px; background: linear-gradient(180deg, #16120a, #0b0905); box-shadow: inset 0 1px 0 rgba(246,213,122,.08); }
.gov-cand { display: flex; align-items: center; gap: 10px; border: 1px solid rgba(232,168,58,.25); border-radius: 11px; padding: 9px 11px; margin-bottom: 7px; background: rgba(232,168,58,.05); }
.gov-cand.me { border-color: rgba(232,168,58,.6); background: rgba(232,168,58,.1); }
.gov-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 12px; }
.gov-tile { background: rgba(232,168,58,.07); border: 1px solid rgba(232,168,58,.28); border-radius: 12px; padding: 11px 12px; min-width: 0; }
.gov-tile .k { font-size: 10px; color: rgba(242,196,119,.72); text-transform: uppercase; letter-spacing: .5px; }
.gov-tile .v { font-size: 17px; font-weight: 800; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f2c477; font-family: Georgia, 'Times New Roman', serif; }
.gov-tile .v.gold { color: #f6d57a; }
.gov-tile .v.sm { font-size: 13px; }
.gov-gauge { position: relative; width: 124px; height: 124px; margin: 6px auto 0; border-radius: 50%; box-shadow: 0 0 0 1px rgba(232,168,58,.25); }
.gov-gauge-in { position: absolute; inset: 13px; border-radius: 50%; background: #0b0905; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 800; font-size: 13px; color: #f2c477; line-height: 1.2; padding: 6px; font-family: Georgia, serif; }
.gov-gauge-cap { text-align: center; font-size: 11px; color: var(--dim); margin: 8px 0 12px; }
.gov-bar { margin-bottom: 9px; border: 1px solid rgba(232,168,58,.12); border-radius: 10px; padding: 8px 9px; }
.gov-bar.me { border-color: rgba(232,168,58,.5); background: rgba(232,168,58,.08); }
.gov-bar-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; margin-bottom: 5px; }
.gov-bar-top b { font-weight: 700; }
.gov-track { height: 9px; background: rgba(0,0,0,.35); border-radius: 6px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.gov-fill { height: 100%; background: linear-gradient(90deg, #c8862a, #f6d57a); border-radius: 6px; transition: width .55s cubic-bezier(.22,1,.36,1); position: relative; }
.gov-fill::after { content: ''; position: absolute; inset: 0; border-radius: 6px; background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 55%); }
.gov-fill.lead { background: linear-gradient(90deg, #e8a83a, #ffe9a8); box-shadow: 0 0 10px rgba(246,213,122,.5); }
/* 🗳️ Schede candidato (consenso/elezioni) — più chiare e premium */
.gov-cands { display: flex; flex-direction: column; gap: 9px; margin-bottom: 8px; }
.gov-cand2 { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 15px; border: 1px solid rgba(232,168,58,.18); background: linear-gradient(180deg, rgba(232,168,58,.05), rgba(0,0,0,.18)); }
.gov-cand2.me { border-color: rgba(56,200,192,.55); background: linear-gradient(180deg, rgba(56,200,192,.1), rgba(0,0,0,.18)); }
.gov-cand2.leader { border-color: rgba(246,213,122,.6); background: linear-gradient(180deg, rgba(246,213,122,.14), rgba(0,0,0,.18)); box-shadow: 0 2px 14px rgba(232,168,58,.18); }
.gov-cand2-rank { flex: 0 0 26px; text-align: center; font-size: 18px; font-weight: 900; color: #f2c477; }
.gov-cand2-av { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 18px; color: #1a1206; background: linear-gradient(180deg, #f6d57a, #c8862a); border: 1px solid rgba(246,213,122,.6); position: relative; font-family: Georgia, serif; }
.gov-cand2.me .gov-cand2-av { background: linear-gradient(180deg, #6fe6da, #2a9c92); border-color: rgba(111,230,218,.6); }
.gov-cand2-crown { position: absolute; top: -12px; left: 50%; transform: translateX(-50%) rotate(8deg); font-size: 15px; }
.gov-cand2-body { flex: 1; min-width: 0; }
.gov-cand2-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.gov-cand2-top b { font-size: 14px; font-weight: 800; color: #f0e6d0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gov-you { color: var(--teal); font-size: 10px; font-weight: 800; }
.gov-cand2-pct { flex: 0 0 auto; font-size: 15px; font-weight: 900; color: #f6d57a; font-family: Georgia, serif; }
.gov-cand2-bot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 7px; }
.gov-cand2-bot .muted { font-size: 11px; }
.gov-vote-btn { font-size: 11.5px; padding: 7px 16px; min-height: 38px; width: auto; border-radius: 10px; touch-action: manipulation; }
/* 🗳️ Seggi gilda — card più leggibile */
.gov-bar { margin-bottom: 9px; border: 1px solid rgba(232,168,58,.16); border-radius: 13px; padding: 11px 12px; background: linear-gradient(180deg, rgba(232,168,58,.04), rgba(0,0,0,.15)); }
.gov-bar.me { border-color: rgba(232,168,58,.5); background: linear-gradient(180deg, rgba(232,168,58,.1), rgba(0,0,0,.15)); }
#panel-governo .section-label { color: #f2c477; font-family: Georgia, 'Times New Roman', serif; letter-spacing: .3px; }
/* 🏆 Classifica contributori al Tesoro */
.gov-contrib-list { display: flex; flex-direction: column; gap: 7px; }
.gov-contrib-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; border: 1px solid rgba(232,168,58,.16); background: linear-gradient(180deg, rgba(232,168,58,.045), rgba(0,0,0,.16)); }
.gov-contrib-row.me { border-color: rgba(56,200,192,.55); background: linear-gradient(180deg, rgba(56,200,192,.1), rgba(0,0,0,.18)); }
.gov-contrib-rank { flex: 0 0 30px; text-align: center; font-size: 16px; font-weight: 900; color: #f2c477; font-family: Georgia, serif; }
.gov-contrib-av { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 15px; color: #1a1206; background: linear-gradient(180deg, #f6d57a, #c8862a); border: 1px solid rgba(246,213,122,.55); font-family: Georgia, serif; }
.gov-contrib-row.me .gov-contrib-av { background: linear-gradient(180deg, #6fe6da, #2a9c92); border-color: rgba(111,230,218,.6); }
.gov-contrib-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gov-contrib-mid b { font-size: 13.5px; font-weight: 800; color: #f0e6d0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gov-contrib-mid small { font-size: 10.5px; color: var(--dim); }
.gov-contrib-tot { flex: 0 0 auto; font-size: 14px; font-weight: 900; color: #f6d57a; font-family: Georgia, serif; white-space: nowrap; }

@keyframes palaBig { 0% { transform: scale(.4); opacity: 0 } 40% { transform: scale(1.1); opacity: 1 } 100% { transform: scale(1); opacity: 1 } }
@keyframes palaFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes palaShake { 0%,100% { transform: translateY(0) rotate(-4deg) } 50% { transform: translateY(-3px) rotate(4deg) } }
@keyframes palaRise { 0% { transform: translateY(60px) scale(.5) rotate(-12deg); opacity: 0 } 55% { transform: translateY(-8px) scale(1.12) rotate(6deg); opacity: 1 } 100% { transform: translateY(0) scale(1) rotate(0) } }
@keyframes palaBubble { from { transform: translateY(0); opacity: .7 } to { transform: translateY(-120px); opacity: 0 } }
/* 🙈 Nascondi il conteggio dei giocatori attivi/online (header + presenza chat) — richiesta utente */
#online-pill { display: none !important; }
.chat-presence { display: none !important; }

/* ⚓ GILDE — nuovo hero con immagine personalizzata (build h2300) */
.g-hero2 { position: relative; border-radius: 18px; overflow: hidden; padding: 14px; margin-bottom: 12px; min-height: 132px; border: 1px solid rgba(232,168,58,.35); box-shadow: 0 8px 26px rgba(0,0,0,.45); }
.g-hero2-bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.g-hero2-shade { position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(6,18,30,.40), rgba(6,18,30,.90)); }
.g-hero2 > *:not(.g-hero2-bg):not(.g-hero2-shade) { position: relative; z-index: 2; }
.g-hero2-rank { position: absolute; top: 10px; left: 13px; font-size: 24px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.7)); }
.g-hero2-edit { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.5); color: #fff; font-size: 15px; cursor: pointer; }
.g-hero2-row { display: flex; align-items: center; gap: 12px; margin-top: 30px; }
.g-crest2 { flex-shrink: 0; width: 68px; height: 68px; border-radius: 16px; overflow: hidden; border: 2px solid rgba(246,213,122,.75); box-shadow: 0 4px 14px rgba(0,0,0,.55); background: linear-gradient(135deg,#13344c,#0a1d2e); display: flex; align-items: center; justify-content: center; font-size: 34px; }
.g-crest2 img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-hero2-info { min-width: 0; flex: 1; }
.g-name2 { font-size: 18px; font-weight: 900; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-tag2 { font-size: 12px; color: #7fe0d8; }
.g-meta2 { font-size: 11px; color: #d6e6f2; margin-top: 3px; text-shadow: 0 1px 4px rgba(0,0,0,.7); }
.g-lvl2 { margin-top: 12px; }
.g-lvl2-top { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; color: #f6d57a; margin-bottom: 4px; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.g-lvl2-bar { height: 8px; border-radius: 5px; background: rgba(0,0,0,.45); overflow: hidden; }
.g-lvl2-bar i { display: block; height: 100%; background: linear-gradient(90deg,#e8a83a,#f6d57a); border-radius: 5px; transition: width .5s cubic-bezier(.22,1,.36,1); }
.g-addimg { display: block; width: 100%; margin-top: 11px; padding: 9px; border-radius: 11px; border: 1px dashed rgba(246,213,122,.55); background: rgba(232,168,58,.14); color: #f6d57a; font-weight: 800; font-size: 12px; cursor: pointer; }

/* ══════════ 🛢️ FABBRICA / RAFFINERIA — design premium ══════════ */
#panel-fabbrica { padding-bottom: 28px; }
.fac-hero { position: relative; border-radius: 16px; padding: 18px 16px; margin-bottom: 8px; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, rgba(56,200,192,.18), transparent 60%), linear-gradient(135deg, #0e2233, #0a1726);
  border: 1px solid rgba(56,200,192,.25); }
.fac-hero::after { content: "🛢️"; position: absolute; right: -10px; bottom: -16px; font-size: 88px; opacity: .10; transform: rotate(-12deg); }
.fac-hero h2 { font-size: 18px; font-weight: 800; margin: 0 0 5px; display: flex; align-items: center; gap: 8px; }
.fac-hero p { font-size: 11px; color: var(--dim); margin: 0; line-height: 1.45; max-width: 88%; }
.fac-label { font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--teal); text-transform: uppercase; margin: 16px 0 9px; }
.fac-card { border-radius: 14px; padding: 14px; margin-bottom: 12px; background: linear-gradient(160deg, var(--card2), var(--card)); border: 1px solid rgba(255,255,255,.06); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.fac-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.fac-name { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 7px; }
.fac-chip { font-size: 11px; font-weight: 700; color: var(--teal); background: rgba(56,200,192,.12); border: 1px solid rgba(56,200,192,.25); padding: 3px 10px; border-radius: 999px; }
.fac-stats { display: flex; gap: 8px; margin-bottom: 12px; }
.fac-stat { flex: 1; text-align: center; border-radius: 11px; padding: 10px 6px; background: rgba(7,15,26,.55); border: 1px solid rgba(255,255,255,.05); }
.fac-stat .l { font-size: 9px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.fac-stat .v { font-size: 14px; font-weight: 800; }
.fac-stat.cassa .v { color: var(--gold); }
.fac-stat.gas .v { color: #f2b34e; }
.fac-stat.dia .v { color: #8fd5ff; }
.fac-actions { display: flex; gap: 8px; margin-bottom: 11px; }
.fac-btn { flex: 1; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 10px; font-size: 12px; font-weight: 700; cursor: pointer; background: var(--card2); color: #dcebf7; transition: transform .08s, background .15s; }
.fac-btn:active { transform: scale(.97); }
.fac-btn.gas { background: rgba(242,179,78,.14); border-color: rgba(242,179,78,.3); color: #f2c477; }
.fac-btn.dia { background: rgba(143,213,255,.12); border-color: rgba(143,213,255,.3); color: #bfe6ff; }
.fac-btn.teal { background: var(--teal); color: #071826; border-color: transparent; }
.fac-btn.ghost { background: transparent; }
.fac-field { margin-bottom: 10px; }
.fac-field .fl { font-size: 10px; color: var(--dim); margin-bottom: 5px; display: block; }
.fac-row { display: flex; gap: 6px; }
.fac-row .bank-input { flex: 1; }
.fac-mini { flex: none; min-width: 46px; }
.fac-sell { margin-top: 8px; border-top: 1px solid rgba(255,255,255,.06); padding-top: 10px; }
.fac-sell summary { font-size: 11px; color: var(--dim); cursor: pointer; list-style: none; }
.fac-sell summary::-webkit-details-marker { display: none; }
.fac-hire { display: flex; align-items: center; gap: 12px; border-radius: 12px; padding: 12px 13px; margin-bottom: 9px; background: var(--card); border: 1px solid rgba(255,255,255,.06); }
.fac-hire-info { flex: 1; }
.fac-hire .nm { font-size: 13px; font-weight: 700; }
.fac-hire .ow { font-size: 10px; color: var(--dim); }
.fac-hire .wk { font-size: 10px; color: var(--dim); margin-top: 3px; }
.fac-hire-pay { text-align: right; }
.fac-hire-pay .wg { font-size: 17px; font-weight: 800; color: var(--gold); line-height: 1; }
.fac-hire-pay .wgu { font-size: 9px; color: var(--dim); }
.fac-hire.top { border: 1px solid rgba(232,168,58,.55); background: linear-gradient(135deg, rgba(232,168,58,.10), var(--card)); box-shadow: inset 0 0 0 1px rgba(232,168,58,.15); }
.fac-badge-top { display: inline-block; font-size: 9px; font-weight: 800; color: #0b1020; background: var(--gold); padding: 2px 8px; border-radius: 999px; margin-bottom: 5px; letter-spacing: .03em; }
.fac-job { border-radius: 14px; padding: 14px; margin-bottom: 10px; background: linear-gradient(160deg, #10261f, #0c1b26); border: 1px solid rgba(56,200,192,.25); }
.fac-job .jn { font-size: 14px; font-weight: 800; }
.fac-job .jm { font-size: 11px; color: var(--dim); margin: 4px 0 10px; }
.fac-vip { font-size: 12px; color: #4ecb82; text-align: center; padding: 9px; background: rgba(78,203,130,.1); border-radius: 10px; font-weight: 700; }
.fac-cool { font-size: 12px; text-align: center; padding: 11px; color: var(--dim); }
.fac-cta { width: 100%; border: none; border-radius: 12px; padding: 13px; font-size: 13px; font-weight: 800; cursor: pointer; background: linear-gradient(135deg, var(--teal), #2aa19a); color: #06181f; box-shadow: 0 6px 16px rgba(56,200,192,.25); }
.fac-cta:disabled { opacity: .5; box-shadow: none; cursor: default; }
.fac-leave { width: 100%; margin-top: 7px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 9px; font-size: 11px; cursor: pointer; background: transparent; color: var(--dim); }
.fac-empty { font-size: 11px; color: var(--dim); padding: 16px; text-align: center; background: var(--card); border-radius: 12px; }
.fac-warn { font-size: 10px; color: #ff9a8a; background: rgba(255,120,110,.08); border: 1px solid rgba(255,120,110,.2); border-radius: 8px; padding: 7px 9px; margin-bottom: 10px; }
.fac-offer { border-radius: 12px; padding: 13px; margin-bottom: 9px; background: linear-gradient(135deg, rgba(232,168,58,.08), var(--card)); border: 1px solid rgba(232,168,58,.3); }
.fac-offer .ot { font-size: 12px; margin-bottom: 10px; }
.fac-offer-actions { display: flex; gap: 8px; }
.fac-seg { display: flex; gap: 5px; background: rgba(7,15,26,.6); border: 1px solid rgba(255,255,255,.06); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.fac-seg button { flex: 1; border: none; background: transparent; color: var(--dim); font-size: 12px; font-weight: 700; padding: 9px 4px; border-radius: 9px; cursor: pointer; transition: background .15s, color .15s; }
.fac-seg button.on { background: var(--teal); color: #06181f; }
.fac-seg-dot { display: inline-block; min-width: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; text-align: center; border-radius: 999px; background: var(--gold); color: #0b1020; vertical-align: middle; }
.fac-subl { font-size: 10px; color: var(--dim); margin: 10px 0 6px; font-weight: 700; }
.fac-onsale { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #6fe0a0; background: rgba(78,203,130,.08); border: 1px solid rgba(78,203,130,.22); border-radius: 8px; padding: 7px 10px; margin: 9px 0 4px; }
/* depositi proprietario (semplificato) */
.fac-dep { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.fac-dep-row { display: flex; align-items: center; gap: 11px; background: rgba(7,15,26,.55); border: 1px solid rgba(255,255,255,.05); border-radius: 12px; padding: 11px 13px; }
.fac-dep-ic { font-size: 20px; flex: none; }
.fac-dep-info { flex: 1; min-width: 0; }
.fac-dep-l { font-size: 9px; color: var(--dim); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.fac-dep-v { font-size: 15px; font-weight: 800; }
.fac-dep-v.gas { color: #f2b34e; }
.fac-dep-v.dia { color: #8fd5ff; }
.fac-dep-v.cassa { color: var(--gold); }
.fac-dep-note { font-size: 10px; color: var(--dim); flex: none; }
.fac-manage { margin-top: 10px; border-top: 1px solid rgba(255,255,255,.06); padding-top: 10px; }
.fac-manage > summary { font-size: 12px; color: var(--teal); font-weight: 700; cursor: pointer; list-style: none; padding: 2px 0; }
.fac-manage > summary::-webkit-details-marker { display: none; }

/* 🎡 RUOTA GIORNALIERA — redesign premium (h2130): cornice metallica, divisori, lancetta 3D, mozzo lucido */
.wheel-glowbase{ position:absolute; left:50%; bottom:-8px; width:220px; height:50px; transform:translateX(-50%); border-radius:50%;
  background:radial-gradient(ellipse, rgba(232,168,58,.42), transparent 70%); filter:blur(7px); z-index:0; pointer-events:none; }
.wheel{ border-color:#0b2235 !important;
  box-shadow:0 0 0 3px #fff0c8, 0 0 0 9px #e8a83a, 0 0 0 12px #8a5e16, 0 0 36px rgba(232,168,58,.65), 0 12px 42px rgba(0,0,0,.6), inset 0 0 34px rgba(0,0,0,.42) !important; }
.wheel-divs{ position:absolute; inset:0; border-radius:50%; pointer-events:none; z-index:2;
  background:repeating-conic-gradient(from 0deg, transparent 0 44.3deg, rgba(0,0,0,.5) 44.3deg 44.7deg, rgba(255,236,180,.55) 44.7deg 45deg); }
.wheel-mark{ position:absolute; top:-14px; left:50%; transform:translateX(-50%); z-index:7; width:0; height:0;
  border-left:14px solid transparent; border-right:14px solid transparent; border-top:28px solid var(--gold);
  filter:drop-shadow(0 3px 4px rgba(0,0,0,.65)); animation:wheelPoint 1.6s ease-in-out infinite; }
.wheel-mark::before{ content:''; position:absolute; top:-25px; left:-9px; width:17px; height:17px; border-radius:50%;
  background:radial-gradient(circle at 35% 30%,#fff3d6,var(--gold2)); box-shadow:0 0 0 3px #5e3f12, 0 2px 6px rgba(0,0,0,.6); }
.wheel-hub{ width:60px !important; height:60px !important; font-size:25px !important; border:4px solid #f2c477 !important;
  background:radial-gradient(circle at 38% 30%,#2a6f8e,#06151f) !important;
  box-shadow:0 2px 12px rgba(0,0,0,.7), 0 0 16px rgba(232,168,58,.6), inset 0 2px 6px rgba(255,255,255,.22) !important; }
.wheel-lbl{ font-size:12.5px !important; }

/* ☸️ TIMONE — ruota giornaliera redesign (h2200): timone di nave + entrata cinematografica */
.hlm-stage{position:relative;width:300px;height:300px;display:flex;align-items:center;justify-content:center;margin-top:6px}
.hlm-cinema{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) translateY(-150vh);transition:transform 1.5s cubic-bezier(.4,.05,.35,1.05)}
.hlm-cinema.down{transform:translate(-50%,-50%)}
.hlm-cinema.instant{transition:none}
.hlm-rope{position:absolute;left:50%;bottom:calc(50% + 140px);transform:translateX(-50%);width:7px;height:150vh;border-radius:3px;
  background:repeating-linear-gradient(45deg,#6b4e22 0 5px,#caa148 5px 9px,#6b4e22 9px 14px);box-shadow:0 0 4px rgba(0,0,0,.5)}
.hlm-ptr{position:absolute;top:calc(50% - 150px);left:50%;transform:translateX(-50%);z-index:20;width:0;height:0;border-left:13px solid transparent;border-right:13px solid transparent;border-top:26px solid var(--gold);filter:drop-shadow(0 3px 4px rgba(0,0,0,.7));animation:wheelPoint 1.6s ease-in-out infinite}
.hlm-handles{position:absolute;left:50%;top:50%;width:0;height:0;z-index:4;pointer-events:none}
.hlm-handle{position:absolute;left:0;top:0;width:14px;height:42px;margin:-21px -7px;transform-origin:50% 50%}
.hlm-spoke{position:absolute;left:50%;top:0;transform:translateX(-50%);width:7px;height:26px;border-radius:5px;background:linear-gradient(90deg,#8a5e16,#f7d488,#8a5e16);box-shadow:0 1px 2px rgba(0,0,0,.5)}
.hlm-knob{position:absolute;left:50%;bottom:-3px;transform:translateX(-50%);width:15px;height:15px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff0c8,#b9842a);box-shadow:0 0 0 2px #5e3f12,0 2px 4px rgba(0,0,0,.5)}
.hlm-rim{position:absolute;left:50%;top:50%;width:262px;height:262px;margin:-131px;border-radius:50%;z-index:2;
  background:conic-gradient(from -90deg,#7a5a22,#d8b25e,#5e441a,#caa148,#7a5a22,#d8b25e,#5e441a,#caa148,#7a5a22);
  box-shadow:0 0 0 3px #3a2a0d,0 14px 44px rgba(0,0,0,.6),0 0 40px rgba(232,168,58,.4)}
.hlm-rim::after{content:'';position:absolute;inset:13px;border-radius:50%;box-shadow:inset 0 0 0 3px rgba(0,0,0,.4),inset 0 0 22px rgba(0,0,0,.6)}
.hlm-wheel{position:absolute;left:50%;top:50%;width:236px;height:236px;margin:-118px;border-radius:50%;z-index:3;overflow:hidden;transition:transform 5.4s cubic-bezier(.13,.82,.25,1)}
.hlm-divs{position:absolute;inset:0;border-radius:50%;pointer-events:none;background:repeating-conic-gradient(from 0deg,transparent 0 29.4deg,rgba(0,0,0,.5) 29.4deg 29.7deg,rgba(255,236,180,.45) 29.7deg 30deg)}
.hlm-lbl{position:absolute;top:50%;left:50%;width:58px;text-align:center;font-size:11px;font-weight:900;pointer-events:none;text-shadow:0 1px 2px rgba(0,0,0,.8)}
.hlm-cap{position:absolute;left:50%;top:50%;width:60px;height:60px;margin:-30px;border-radius:50%;z-index:8;
  background:radial-gradient(circle at 38% 30%,#f7d488,#9c6a1e);border:4px solid #5e441a;
  box-shadow:0 3px 12px rgba(0,0,0,.7),inset 0 2px 5px rgba(255,255,255,.4);display:flex;align-items:center;justify-content:center;font-size:24px}
/* ☸️ pulsante timone nel toolbar header (giro disponibile) — override del vecchio #wheel-banner */
#wheel-banner.hlm-badge{position:relative;left:auto;top:auto;bottom:auto;right:auto;z-index:auto;width:36px;height:36px;border-radius:11px;border:1.5px solid var(--gold);flex-shrink:0;overflow:visible;
  background:radial-gradient(circle at 38% 30%,#1c4a63,#0a2233)!important;border-bottom-color:var(--gold)!important;display:flex;align-items:center;justify-content:center;cursor:pointer;
  box-shadow:0 4px 0 #3a2a0d,0 5px 10px rgba(0,0,0,.4),0 0 10px rgba(242,196,119,.5);animation:hlmBadge 2.2s ease-in-out infinite;padding:0;transition:transform .05s}
#wheel-banner.hlm-badge:active{transform:translateY(2px);box-shadow:0 2px 0 #3a2a0d,0 0 10px rgba(242,196,119,.5)}
@keyframes hlmBadge{0%,100%{box-shadow:0 4px 0 #3a2a0d,0 5px 10px rgba(0,0,0,.4),0 0 8px rgba(242,196,119,.4)}50%{box-shadow:0 4px 0 #3a2a0d,0 5px 10px rgba(0,0,0,.4),0 0 16px rgba(242,196,119,.85)}}
#wheel-banner.hlm-badge .wbb-text{font-size:0;color:var(--gold);display:flex;align-items:center;justify-content:center}#wheel-banner.hlm-badge .wbb-text b{display:none}
#wheel-banner.hlm-badge .wbb-btn{display:none}
/* pallino verde "free" in alto a destra, come il badge posta */
#wheel-banner.hlm-badge::after{content:'';position:absolute;top:-3px;right:-3px;width:10px;height:10px;background:var(--green);border:2px solid #0a2233;border-radius:50%;box-shadow:0 0 6px rgba(78,203,130,.9)}
/* timone SVG dentro il pulsante */
.wbb-text .hlm-ico{width:22px;height:22px;vertical-align:middle;flex:0 0 auto;filter:drop-shadow(0 1px 2px rgba(0,0,0,.5))}
#wheel-banner.hlm-badge .hlm-ico{width:26px;height:26px;animation:hlmIcoSpin 10s linear infinite}
@keyframes hlmIcoSpin{to{transform:rotate(360deg)}}
