/* ============================================================
   MARKETTISTI ANONIMI — style.css
   ============================================================ */

/* ── TOKENS ── */
:root {
  /* ── Palette landing (brand colors) ── */
  --purple:    #8446ff;
  --orange:    #ff8134;
  --green:     #c8ee6d;
  --cream:     #fdfaf6;

  /* ── App dark theme ── */
  --bg:        #0d0d14;
  --surface:   #13131e;
  --surface2:  #1a1a2a;
  --border:    rgba(255,255,255,0.08);

  /* ── Accents mappati sulla landing palette ── */
  --accent:    #8446ff;   /* purple  — era #8446ff */
  --accent2:   #ff8134;   /* orange  — era #ff8134 */
  --accent3:   #c8ee6d;   /* green   — era #c8ee6d */
  --gold:      #ff8134;   /* orange  — era #ff8134 */

  --text:      #f0f0f8;
  --muted:     #8888aa;
  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 8px 40px rgba(0,0,0,.5);
  --glow:      0 0 28px rgba(132,70,255,.25);
  --circ:      169.65; /* 2π×27 */
}

/* ── RESET ── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body { font-family:'Comfortaa',sans-serif; background:var(--bg); color:var(--text); min-height:100vh; overflow-x:hidden; line-height:1.5; }
h1,h2,h3,h4 { font-family:'Bricolage Grotesque',sans-serif; line-height:1.2; }
button { cursor:pointer; font-family:inherit; }
a { color:var(--accent); text-decoration:none; }
a:hover { text-decoration:underline; }
img { max-width:100%; display:block; }

/* ── HIDDEN ── */
.hidden { display:none !important; }

/* ── LAYOUT ── */
#app { min-height:100vh; display:flex; flex-direction:column; }
.screen { display:none; flex:1; flex-direction:column; animation:fadeUp .32s ease both; }
.screen.active { display:flex; }
@keyframes fadeUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }

.page-wrap { max-width:860px; width:100%; margin:0 auto; padding:22px 16px 72px; }

/* ── LOADER ── */
#global-loader { position:fixed; inset:0; z-index:9999; background:var(--bg); display:flex; align-items:center; justify-content:center; flex-direction:column; gap:18px; transition:opacity .4s; }
.loader-logo { width:84px; height:84px; border-radius:50%; border:3px solid var(--accent); object-fit:cover; box-shadow:var(--glow); }
.loader-text { font-size:14px; color:var(--muted); }
.spinner { width:36px; height:36px; border:3px solid var(--border); border-top-color:var(--accent); border-radius:50%; animation:spin .7s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ── NAVBAR ── */
#navbar { position:sticky; top:0; z-index:100; background:rgba(10,10,15,.9); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px); border-bottom:1px solid var(--border); padding:11px 20px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.nav-logo { display:flex; align-items:center; gap:10px; cursor:pointer; user-select:none; flex-shrink:0; }
.nav-logo-img { width:40px; height:40px; border-radius:50%; border:2px solid var(--accent); object-fit:cover; box-shadow:var(--glow); }
.nav-brand { font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:14px; line-height:1.25; }
.nav-brand span { color:var(--accent); }
.nav-links { display:flex; gap:5px; align-items:center; flex-wrap:wrap; }
.nav-btn { background:transparent; border:1px solid var(--border); color:var(--muted); font-size:12px; padding:5px 12px; border-radius:20px; transition:all .2s; white-space:nowrap; }
.nav-btn:hover { border-color:var(--accent); color:var(--accent); }
.nav-btn.primary { background:var(--accent); border-color:var(--accent); color:#fff; font-weight:600; }
.nav-btn.primary:hover { background:#6b33d4; }
.nav-btn.danger { border-color:transparent; color:var(--muted); }
.nav-btn.danger:hover { border-color:var(--accent); color:var(--accent); }



/* ── BUTTONS ── */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:12px 26px; border-radius:var(--radius-sm); font-family:'Bricolage Grotesque',sans-serif; font-weight:600; font-size:15px; cursor:pointer; border:none; transition:all .2s; text-decoration:none; white-space:nowrap; user-select:none; }
.btn-primary { background:var(--accent); color:#fff; }
.btn-primary:hover { background:#6b33d4; transform:translateY(-1px); box-shadow:var(--glow); }
.btn-outline { background:transparent; color:var(--text); border:1px solid var(--border); }
.btn-outline:hover { border-color:var(--accent); color:var(--accent); }
.btn-ghost { background:transparent; color:var(--muted); border:none; }
.btn-ghost:hover { color:var(--text); }
.btn-danger { background:rgba(132,70,255,.12); color:var(--accent); border:1px solid rgba(132,70,255,.28); }
.btn-danger:hover { background:var(--accent); color:#fff; }
.btn-lg { padding:15px 34px; font-size:17px; border-radius:var(--radius); }
.btn-sm { padding:7px 14px; font-size:13px; }
.btn-full { width:100%; }
.btn:disabled { opacity:.45; cursor:not-allowed; transform:none !important; box-shadow:none !important; }

/* ── CARDS ── */
.card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:24px; }

/* ── FORMS ── */
.form-group { display:flex; flex-direction:column; gap:6px; }
label { font-size:12px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; }
input,select,textarea { background:var(--surface2); border:1px solid var(--border); border-radius:var(--radius-sm); color:var(--text); font-family:'Comfortaa',sans-serif; font-size:15px; padding:11px 14px; outline:none; transition:border-color .2s,box-shadow .2s; width:100%; appearance:none; -webkit-appearance:none; }
input:focus,select:focus,textarea:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(132,70,255,.1); }
input::placeholder,textarea::placeholder { color:var(--muted); }
select { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888899' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 13px center; padding-right:34px; }
select option { background:var(--surface2); color:var(--text); }
textarea { resize:vertical; min-height:80px; }

.form-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }

.form-note { font-size:12px; color:var(--muted); margin-top:4px; }

/* Checkbox pills */
.checkbox-group { display:flex; flex-wrap:wrap; gap:7px; margin-top:4px; }
.checkbox-pill { padding:6px 13px; border-radius:20px; border:1px solid var(--border); font-size:13px; color:var(--muted); cursor:pointer; transition:all .2s; user-select:none; }
.checkbox-pill:hover { border-color:rgba(132,70,255,.4); color:var(--text); }
.checkbox-pill.selected { border-color:var(--accent); color:var(--accent); background:rgba(132,70,255,.1); }

/* Consent */
.consent-group { display:flex; flex-direction:column; gap:13px; }
.consent-label { display:flex; gap:12px; align-items:flex-start; cursor:pointer; font-size:14px; color:var(--text); text-transform:none; letter-spacing:0; font-weight:400; }
.consent-label input[type="checkbox"] { width:18px; height:18px; min-width:18px; accent-color:var(--accent); margin-top:2px; cursor:pointer; opacity:1 !important; visibility:visible !important; position:relative !important; -webkit-appearance:checkbox !important; appearance:checkbox !important; }

/* Messages */
.error-msg { color:#ff6b85; font-size:13px; padding:10px 14px; background:rgba(132,70,255,.08); border-radius:var(--radius-sm); border:1px solid rgba(132,70,255,.22); }
.success-msg { color:var(--accent3); font-size:13px; padding:10px 14px; background:rgba(200,238,109,.08); border-radius:var(--radius-sm); border:1px solid rgba(200,238,109,.22); }

/* ── STEPS BAR ── */
.steps-bar { display:flex; align-items:center; gap:7px; margin-bottom:22px; }
.step-dot { width:8px; height:8px; border-radius:50%; background:var(--border); transition:all .3s; }
.step-dot.active { background:var(--accent); width:22px; border-radius:4px; }
.step-dot.done { background:var(--accent3); }
.steps-label { margin-left:auto; font-size:12px; color:var(--muted); }
.step-title { font-size:16px; font-weight:700; margin-bottom:14px; }
.step-btn-row { display:flex; gap:10px; margin-top:4px; }
.step-btn-row .btn-outline { flex:1; }
.step-btn-row .btn-primary  { flex:2; }
.reg-step-panel { display:flex; flex-direction:column; gap:14px; }

/* ── AUTH ── */
.auth-wrap { max-width:480px; width:100%; margin:0 auto; padding:32px 16px 48px; }
.auth-logo { width:60px; height:60px; border-radius:50%; border:2px solid var(--accent); object-fit:cover; box-shadow:var(--glow); margin:0 auto 16px; }
.auth-title { font-size:26px; font-weight:800; text-align:center; margin-bottom:6px; }
.auth-sub { font-size:14px; color:var(--muted); text-align:center; margin-bottom:22px; }
.auth-switch { text-align:center; font-size:13px; color:var(--muted); margin-top:4px; }

/* ── LANDING ── */
#screen-landing { background:radial-gradient(ellipse at 15% 55%,rgba(132,70,255,.13) 0%,transparent 55%),radial-gradient(ellipse at 82% 18%,rgba(255,129,52,.09) 0%,transparent 50%),var(--bg); align-items:center; justify-content:center; min-height:100vh; padding:40px 20px; }
.landing-inner { max-width:700px; text-align:center; }
.landing-logo { width:100px; height:100px; border-radius:50%; border:3px solid var(--accent); object-fit:cover; box-shadow:var(--glow); margin:0 auto 20px; }
.landing-eyebrow { font-size:12px; letter-spacing:.15em; text-transform:uppercase; color:var(--accent); margin-bottom:12px; }
.landing-title { font-size:clamp(34px,6vw,62px); font-weight:800; line-height:1.06; margin-bottom:16px; }
.landing-title span { color:var(--accent); }
.landing-sub { font-size:17px; color:var(--muted); max-width:500px; margin:0 auto 32px; line-height:1.65; }
.landing-cta-row { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; margin-bottom:52px; }
.landing-features { display:grid; grid-template-columns:repeat(auto-fit,minmax(148px,1fr)); gap:13px; text-align:left; }
.feature-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:17px; }
.feature-icon { font-size:24px; margin-bottom:9px; }
.feature-title { font-family:'Bricolage Grotesque',sans-serif; font-weight:700; font-size:13px; margin-bottom:4px; }
.feature-desc { font-size:12px; color:var(--muted); line-height:1.5; }

/* ── PROGRESS BAR ── */
.progress-bar-wrap { background:var(--surface2); border-radius:8px; height:6px; overflow:hidden; width:100%; margin-bottom:6px; }
.progress-bar-fill { height:100%; background:linear-gradient(90deg,var(--accent),var(--accent2)); border-radius:8px; transition:width .4s ease; }

/* ── DASHBOARD ── */
.dash-hero { background:linear-gradient(135deg,var(--surface) 0%,var(--surface2) 100%); border:1px solid var(--border); border-radius:var(--radius); padding:24px; margin-bottom:20px; display:flex; align-items:center; gap:16px; }
.dash-avatar { width:56px; height:56px; border-radius:50%; flex-shrink:0; background:linear-gradient(135deg,var(--accent),var(--accent2)); display:flex; align-items:center; justify-content:center; font-family:'Bricolage Grotesque',sans-serif; font-size:20px; font-weight:800; color:#fff; }
.dash-greeting { font-size:20px; font-weight:800; }
.dash-sub { font-size:13px; color:var(--muted); margin-top:3px; }
.stats-row { display:grid; grid-template-columns:repeat(3,1fr); gap:11px; margin-bottom:20px; }

.stat-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:16px 18px; }
.stat-num { font-family:'Bricolage Grotesque',sans-serif; font-size:26px; font-weight:800; }
.stat-lbl { font-size:12px; color:var(--muted); margin-top:2px; }
.section-title { font-size:17px; font-weight:700; margin-bottom:14px; }

/* Quick links row */
.quick-links { display:flex; gap:10px; margin-bottom:22px; flex-wrap:wrap; }
.quick-link-btn { flex:1; min-width:120px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); padding:10px 14px; font-family:'Comfortaa',sans-serif; font-size:13px; color:var(--muted); cursor:pointer; transition:all .2s; display:flex; align-items:center; gap:6px; justify-content:center; }
.quick-link-btn:hover { border-color:var(--accent); color:var(--accent); }

/* ── HUB GRID (Dashboard) ── */
.hub-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hub-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  transition: all .22s;
  position: relative;
  overflow: hidden;
}
.hub-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}
.hub-card--giochi::before     { background: var(--accent); }
.hub-card--incontri::before   { background: var(--accent2); }
.hub-card--regalini::before   { background: var(--accent3); }
.hub-card--profilo::before    { background: var(--muted); }
.hub-card--medagliere::before { background: var(--accent2); }

.hub-card:hover {
  border-color: rgba(255,255,255,.14);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.3);
}
.hub-card-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
}
.hub-card--giochi .hub-card-icon     { background: rgba(132,70,255,.1); }
.hub-card--incontri .hub-card-icon   { background: rgba(255,129,52,.1); }
.hub-card--regalini .hub-card-icon   { background: rgba(200,238,109,.1); }
.hub-card--profilo .hub-card-icon    { background: rgba(136,136,170,.1); }
.hub-card--medagliere .hub-card-icon { background: rgba(255,129,52,.1); }

.hub-card-content { flex: 1; min-width: 0; }
.hub-card-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 16px; font-weight: 800;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 3px;
}
.hub-card-desc {
  font-size: 12px; color: var(--muted); line-height: 1.5;
}
.hub-card-arrow {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 20px; font-weight: 800;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform .2s, color .2s;
}
.hub-card:hover .hub-card-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* ── GIOCHI GRID ── */
.giochi-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gioco-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all .22s;
}
.gioco-card--quiz {
  cursor: pointer;
  border-color: rgba(132,70,255,.2);
}
.gioco-card--quiz:hover {
  border-color: rgba(132,70,255,.4);
  transform: translateY(-3px);
  box-shadow: 0 0 32px rgba(132,70,255,.15);
}
.gioco-card--quiz::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.gioco-card--soon {
  opacity: .55;
  cursor: default;
}
.gioco-card-badge {
  display: inline-block;
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent3);
  background: rgba(200,238,109,.08);
  border: 1px solid rgba(200,238,109,.18);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.gioco-card-badge--soon {
  color: var(--muted);
  background: rgba(136,136,170,.06);
  border-color: rgba(136,136,170,.15);
}
.gioco-card-icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.gioco-card-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 20px; font-weight: 800;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 8px;
}
.gioco-card-desc {
  font-size: 13px; color: var(--muted); line-height: 1.65;
  margin-bottom: 14px;
}
.gioco-card-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 18px;
}
.gioco-meta-chip {
  font-size: 11px; font-weight: 600;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
}
.gioco-card-cta {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 14px; font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: .04em;
}
.gioco-card-cta--soon {
  color: var(--muted);
}

/* ── Sfida Veloce card in giochi grid ── */
.gioco-card--sfida {
  cursor: pointer;
  border-color: rgba(255,129,52,.2);
}
.gioco-card--sfida:hover {
  border-color: rgba(255,129,52,.4);
  transform: translateY(-3px);
  box-shadow: 0 0 32px rgba(255,129,52,.12);
}
.gioco-card--sfida::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent2), #ffd700);
}

/* ── Sfida Veloce: Topbar ── */
.sfida-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.sfida-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.sfida-q-counter {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.sfida-score-live {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent3);
}
.sfida-timer-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 200px;
}
.sfida-timer-bar-bg {
  flex: 1;
  height: 8px;
  background: var(--surface2);
  border-radius: 4px;
  overflow: hidden;
}
.sfida-timer-bar {
  height: 100%;
  width: 100%;
  background: var(--accent3);
  border-radius: 4px;
  transition: width 0.3s linear, background-color 0.3s;
}
.sfida-timer-bar.warn { background: var(--accent2); }
.sfida-timer-bar.danger { background: #ff4d6d; }
.sfida-timer-num {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--accent3);
  min-width: 28px;
  text-align: right;
  transition: color 0.3s;
}
.sfida-timer-num.warn { color: var(--accent2); }
.sfida-timer-num.danger { color: #ff4d6d; }

/* ── Sfida Stats Box ── */
.sfida-stats-box {
  margin-top: 20px;
}

/* ── Sfida Result Badges ── */
.sfida-badge-unlock-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 12px;
  color: var(--accent3);
}
.sfida-badges-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}
.sfida-badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid rgba(200,238,109,.2);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.sfida-badge-item .sfida-badge-emoji {
  font-size: 20px;
}

/* ── COMING SOON BOX ── */
.coming-soon-box {
  text-align: center;
  padding: 60px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.coming-soon-icon { font-size: 56px; margin-bottom: 16px; }
.coming-soon-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px; font-weight: 800;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 8px;
}
.coming-soon-desc {
  font-size: 13px; color: var(--muted); line-height: 1.65;
}

/* ── ENCICLOPEDIA ── */
.enc-header { margin-bottom: 20px; }

.enc-search-wrap { margin-bottom: 14px; }
.enc-search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Comfortaa', sans-serif;
  font-size: 14px;
  padding: 14px 18px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.enc-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(132,70,255,.1);
}
.enc-search-input::placeholder { color: var(--muted); }

.enc-filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.enc-filter {
  font-size: 11px; font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  font-family: 'Comfortaa', sans-serif;
}
.enc-filter:hover { border-color: var(--accent); color: var(--accent); }
.enc-filter.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Nozione cards list */
.enc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.enc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.enc-card:hover {
  border-color: rgba(132,70,255,.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.enc-card-emoji { font-size: 24px; flex-shrink: 0; margin-top: 2px; }
.enc-card-body { flex: 1; min-width: 0; }
.enc-card-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 14px; font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.enc-card-preview {
  font-size: 12px; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.enc-card-cat {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent);
  margin-top: 6px;
}

/* Nozione detail */
.enc-detail {
  animation: fadeUp .3s ease both;
}
.enc-detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 14px;
}
.enc-detail-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 20px; font-weight: 800;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 6px;
}
.enc-detail-cat {
  font-size: 11px; font-weight: 600;
  color: var(--accent); text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 16px;
}
.enc-detail-body {
  font-size: 14px; color: var(--muted); line-height: 1.8;
}
.enc-detail-body strong { color: var(--text); }
.enc-detail-body p { margin-bottom: 12px; }
.enc-detail-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.enc-tag {
  font-size: 10px; font-weight: 600;
  color: var(--muted); background: var(--surface2);
  border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 20px;
}

/* Nozione rich content */
.enc-video-wrap {
  position: relative;
  width: 100%; height: 0;
  padding-top: 56.25%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 16px 0;
  border: 1px solid var(--border);
}
.enc-video-wrap iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; border: none;
}
.enc-sources {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.enc-sources-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 8px;
}
.enc-source-link {
  display: block;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 4px;
  text-decoration: none;
  word-break: break-all;
}
.enc-source-link:hover { text-decoration: underline; }

/* Infographic (SVG/HTML) */
.enc-infographic {
  margin: 16px 0;
  padding: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}
.enc-infographic svg { max-width: 100%; height: auto; display: block; margin: 0 auto; }

/* Infographic bar chart */
.enc-bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding-top: 10px; }
.enc-bar-col { display: flex; flex-direction: column; align-items: center; flex: 1; gap: 4px; }
.enc-bar {
  width: 100%; min-width: 28px;
  border-radius: 6px 6px 0 0;
  transition: height .4s ease;
}
.enc-bar-label { font-size: 10px; color: var(--muted); text-align: center; font-weight: 600; }
.enc-bar-value { font-family: 'Bricolage Grotesque', sans-serif; font-size: 11px; font-weight: 700; color: var(--text); }

/* Infographic flow */
.enc-flow { display: flex; align-items: center; gap: 0; flex-wrap: wrap; justify-content: center; padding: 8px 0; }
.enc-flow-step {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 14px; min-width: 80px;
}
.enc-flow-icon { font-size: 22px; }
.enc-flow-label { font-size: 11px; font-weight: 700; color: var(--text); text-align: center; }
.enc-flow-sub { font-size: 9px; color: var(--muted); text-align: center; }
.enc-flow-arrow { font-size: 18px; color: var(--accent); font-weight: 800; margin: 0 2px; }

/* Infographic comparison table */
.enc-compare { width: 100%; border-collapse: collapse; margin: 8px 0; }
.enc-compare th {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent); padding: 8px 10px; text-align: left;
  border-bottom: 2px solid var(--accent);
}
.enc-compare td {
  font-size: 12px; color: var(--text); padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.enc-compare tr:last-child td { border-bottom: none; }

/* Empty state */
.enc-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 14px;
}

/* AI Assistant */
.enc-ai-section {
  background: var(--surface);
  border: 1px solid rgba(132,70,255,.2);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 8px;
}
.enc-ai-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.enc-ai-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(132,70,255,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.enc-ai-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 16px; font-weight: 800;
  text-transform: uppercase;
  color: var(--text);
}
.enc-ai-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.enc-ai-chat {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.enc-ai-msg {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.65;
  max-width: 90%;
  word-wrap: break-word;
}
.enc-ai-msg--user {
  background: var(--accent);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.enc-ai-msg--ai {
  background: var(--surface2);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}
.enc-ai-msg--ai strong { color: var(--accent3); }
.enc-ai-msg--loading {
  color: var(--muted);
  font-style: italic;
}

.enc-ai-input-row {
  display: flex; gap: 8px;
}
.enc-ai-input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Comfortaa', sans-serif;
  font-size: 13px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s;
}
.enc-ai-input:focus { border-color: var(--accent); }
.enc-ai-input::placeholder { color: var(--muted); }
.enc-ai-send {
  width: 44px; height: 44px;
  background: var(--accent);
  border: none; border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  flex-shrink: 0;
}
.enc-ai-send:hover { background: #6b33d4; }
.enc-ai-send:disabled { opacity: .5; cursor: not-allowed; }
.enc-ai-disclaimer {
  font-size: 10px; color: var(--muted);
  text-align: center; margin-top: 8px;
}

/* Hub card color for enciclopedia */
.hub-card--enciclopedia::before { background: #10b981; }
.hub-card--enciclopedia .hub-card-icon { background: rgba(16,185,129,.1); }

/* ── REGALINI ── */
.reg-hero {
  text-align: center;
  padding: 10px 0 28px;
}
.reg-hero-icon { font-size: 52px; margin-bottom: 8px; }
.reg-hero-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 32px; font-weight: 800;
  text-transform: uppercase; letter-spacing: -.02em;
  color: var(--text);
  margin-bottom: 8px;
}
.reg-hero-sub {
  font-size: 14px; color: var(--muted); line-height: 1.6;
  max-width: 420px; margin: 0 auto;
}

/* Card base */
.reg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 14px;
  position: relative;
  transition: border-color .2s, box-shadow .2s;
}
.reg-card:hover {
  border-color: rgba(255,255,255,.12);
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}

/* Best regalino */
.reg-card--best {
  border-color: rgba(132,70,255,.25);
  background: linear-gradient(135deg, rgba(132,70,255,.05) 0%, rgba(255,129,52,.03) 100%);
  margin-bottom: 20px;
}
.reg-card--best::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 16px 16px 0 0;
}
.reg-card--best:hover {
  border-color: rgba(132,70,255,.45);
  box-shadow: 0 0 32px rgba(132,70,255,.1);
}
.reg-best-tag {
  display: inline-block;
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent2);
  background: rgba(255,129,52,.08);
  border: 1px solid rgba(255,129,52,.2);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 18px;
}

/* Highlight & free card borders */
.reg-card--highlight { border-color: rgba(255,129,52,.18); }
.reg-card--highlight:hover { border-color: rgba(255,129,52,.35); }
.reg-card--free { border-color: rgba(200,238,109,.18); }
.reg-card--free:hover { border-color: rgba(200,238,109,.35); }

/* Brand row */
.reg-brand-row {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
}
.reg-brand-logo {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px; font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.reg-brand-logo--hostinger { background: #673de6; }
.reg-brand-logo--holafly   { background: #3b82f6; font-size: 20px; }
.reg-brand-logo--bidmamba   { background: #f59e0b; font-size: 22px; }
.reg-brand-logo--adobe      { background: #ff0000; font-size: 14px; letter-spacing: -.02em; }
.reg-brand-logo--academe    { background: #10b981; font-size: 13px; }
.reg-brand-logo--prompt     { background: linear-gradient(135deg, var(--accent), var(--accent3)); font-size: 14px; }

.reg-brand-info { flex: 1; min-width: 0; }
.reg-brand-name {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px; font-weight: 800;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.2;
}
.reg-brand-what {
  font-size: 11px; color: var(--muted); font-weight: 500;
  margin-top: 3px; line-height: 1.4;
}

/* Description */
.reg-card-desc {
  font-size: 13px; color: var(--muted); line-height: 1.7;
  margin-bottom: 16px;
}
.reg-card-desc strong { color: var(--text); }

/* Value row */
.reg-card-value {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.reg-value-badge {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 14px; font-weight: 800;
  color: var(--accent3);
  background: rgba(200,238,109,.08);
  border: 1px solid rgba(200,238,109,.2);
  padding: 5px 14px;
  border-radius: 8px;
  white-space: nowrap;
}
.reg-value-badge--best {
  color: var(--accent);
  background: rgba(132,70,255,.08);
  border-color: rgba(132,70,255,.2);
  font-size: 18px; padding: 6px 16px;
}
.reg-value-badge--fire {
  color: var(--accent2);
  background: rgba(255,129,52,.08);
  border-color: rgba(255,129,52,.2);
}
.reg-value-badge--free {
  color: var(--accent3);
  background: rgba(200,238,109,.1);
  border-color: rgba(200,238,109,.25);
}
.reg-value-note {
  font-size: 12px; color: var(--muted);
}

/* Code box */
.reg-code-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
}
.reg-code-label {
  font-size: 10px; color: var(--muted);
  text-transform: uppercase; font-weight: 600;
  letter-spacing: .06em;
}
.reg-code-value {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 14px; font-weight: 800;
  color: var(--text);
  letter-spacing: .06em;
}

/* Contact info */
.reg-card-contact {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.reg-contact-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
}
.reg-contact-icon { font-size: 14px; flex-shrink: 0; }

/* CTA button */
.reg-card-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  color: #fff;
  background: var(--accent);
  border: none;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all .2s;
  cursor: pointer;
}
.reg-card-btn:hover {
  background: #6b33d4;
  transform: translateY(-1px);
  text-decoration: none;
}
.reg-card-btn--best {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  padding: 14px 26px; font-size: 14px;
}
.reg-card-btn--best:hover { opacity: .9; background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.reg-card-btn--free {
  background: transparent;
  color: var(--accent3);
  border: 1px solid rgba(200,238,109,.25);
}
.reg-card-btn--free:hover { background: rgba(200,238,109,.08); }

/* Section label */
.reg-section-label {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Footer note */
.reg-footer-note {
  text-align: center;
  font-size: 13px; color: var(--muted);
  padding: 28px 0 10px;
  line-height: 1.65;
}

.cat-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(188px,1fr)); gap:12px; }
.cat-card { background:var(--surface); border:1px solid var(--border); border-left-width:4px; border-radius:var(--radius); padding:20px; cursor:pointer; transition:all .22s; }
.cat-card:hover { transform:translateY(-3px); box-shadow:var(--glow); }
.cat-icon { font-size:32px; margin-bottom:10px; }
.cat-name { font-family:'Bricolage Grotesque',sans-serif; font-weight:700; font-size:15px; }
.cat-topics { font-size:12px; color:var(--muted); margin-top:4px; line-height:1.4; }

/* ── LEVEL ── */
.screen-title { font-size:24px; font-weight:800; margin-bottom:6px; margin-top:4px; }
.screen-sub { font-size:14px; color:var(--muted); margin-bottom:24px; }
.back-btn { margin-bottom:12px; padding-left:0; }
.level-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(178px,1fr)); gap:13px; }
.level-card { background:var(--surface); border:2px solid var(--border); border-radius:var(--radius); padding:22px; cursor:pointer; text-align:center; transition:all .22s; }
.level-card.beginner:hover    { border-color:var(--accent3); box-shadow:0 0 22px rgba(200,238,109,.18); transform:translateY(-3px); }
.level-card.intermediate:hover{ border-color:var(--accent2); box-shadow:0 0 22px rgba(255,129,52,.18); transform:translateY(-3px); }
.level-card.advanced:hover    { border-color:var(--accent);  box-shadow:var(--glow); transform:translateY(-3px); }
.level-icon { font-size:36px; margin-bottom:11px; }
.level-name { font-family:'Bricolage Grotesque',sans-serif; font-weight:700; font-size:17px; }
.level-desc { font-size:13px; color:var(--muted); margin-top:5px; line-height:1.45; }
.level-pass-note { font-size:11px; color:var(--muted); margin-top:9px; border-top:1px solid var(--border); padding-top:9px; }

/* ── QUIZ ── */
.quiz-wrap { max-width:680px; }
.quiz-header { display:flex; align-items:center; gap:14px; margin-bottom:12px; }
.quiz-meta { flex:1; min-width:0; }
.quiz-cat-badge { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--accent); margin-bottom:3px; }
.quiz-question-counter { font-size:12px; color:var(--muted); }

/* Timer */
.timer-ring-wrap { position:relative; width:64px; height:64px; flex-shrink:0; }
.timer-ring-wrap svg { transform:rotate(-90deg); display:block; }
.timer-ring-bg   { fill:none; stroke:var(--surface2); stroke-width:5; }
.timer-ring-fill { fill:none; stroke:var(--accent3); stroke-width:5; stroke-linecap:round; stroke-dasharray:169.65; stroke-dashoffset:0; transition:stroke-dashoffset 1s linear,stroke .4s; }
.timer-number { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-family:'Bricolage Grotesque',sans-serif; font-size:17px; font-weight:800; pointer-events:none; }

/* Questions */
.question-text { font-family:'Bricolage Grotesque',sans-serif; font-size:clamp(17px,3vw,21px); font-weight:700; line-height:1.45; margin:18px 0 16px; }
.answers-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:16px; }

.answer-btn { background:var(--surface); border:2px solid var(--border); border-radius:var(--radius); padding:14px 16px; color:var(--text); font-family:'Comfortaa',sans-serif; font-size:14px; text-align:left; cursor:pointer; transition:all .18s; line-height:1.4; width:100%; }
.answer-btn:hover:not(:disabled) { border-color:var(--accent); background:rgba(132,70,255,.05); }
.answer-btn.correct { border-color:var(--accent3)!important; background:rgba(200,238,109,.1)!important; color:var(--accent3)!important; }
.answer-btn.wrong   { border-color:var(--accent)!important;  background:rgba(132,70,255,.1)!important; color:var(--accent)!important; }
.answer-btn:disabled { cursor:default; }
.q-feedback { padding:11px 15px; border-radius:var(--radius-sm); font-size:13px; font-weight:500; margin-bottom:13px; line-height:1.5; }

/* ── RESULT ── */
.result-wrap { max-width:540px; }
.result-hero { text-align:center; padding:28px 20px 20px; }
.result-icon  { font-size:68px; margin-bottom:12px; line-height:1; }
.score-big    { font-family:'Bricolage Grotesque',sans-serif; font-size:72px; font-weight:800; line-height:1; margin-bottom:8px; }
.score-big span { font-size:28px; color:var(--muted); }
.result-title { font-size:34px; font-weight:800; margin-bottom:7px; }
.result-sub   { font-size:15px; color:var(--muted); line-height:1.55; }
.result-actions { display:flex; flex-direction:column; gap:9px; margin-top:18px; }

.result-badge-wrap { background:linear-gradient(135deg,rgba(255,129,52,.08),rgba(132,70,255,.08)); border:1px solid rgba(255,129,52,.22); border-radius:var(--radius); padding:24px; display:flex; flex-direction:column; align-items:center; gap:10px; text-align:center; margin:6px 0; }
.badge-unlocked-label { font-size:11px; text-transform:uppercase; letter-spacing:.12em; color:var(--gold); }
.badge-unlocked-name  { font-family:'Bricolage Grotesque',sans-serif; font-weight:700; font-size:17px; }
.badge-unlocked-level { font-size:12px; color:var(--muted); }
.result-badge-icon-el { width:80px; height:80px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:36px; border:2px solid var(--gold); }

/* Share row */
.share-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:center; }
.share-label { font-size:12px; color:var(--muted); }
.share-btn { width:36px; height:36px; border-radius:50%; border:1px solid var(--border); background:var(--surface2); font-size:13px; font-weight:700; cursor:pointer; transition:all .2s; display:flex; align-items:center; justify-content:center; color:var(--text); }
.share-btn:hover { transform:scale(1.1); }
.share-tw:hover { border-color:#1da1f2; color:#1da1f2; }
.share-li:hover { border-color:#0077b5; color:#0077b5; }
.share-wa:hover { border-color:#25d366; color:#25d366; }
.share-cp:hover { border-color:var(--accent3); color:var(--accent3); }

/* ── BADGES ── */
.filter-row { display:flex; gap:7px; flex-wrap:wrap; margin-bottom:18px; }
.filter-btn { padding:6px 14px; border-radius:20px; border:1px solid var(--border); background:transparent; color:var(--muted); font-size:12px; cursor:pointer; transition:all .2s; }
.filter-btn:hover { border-color:var(--accent); color:var(--accent); }
.filter-btn.active { background:var(--accent); border-color:var(--accent); color:#fff; }

.badges-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(142px,1fr)); gap:12px; }
.badge-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px; display:flex; flex-direction:column; align-items:center; gap:8px; text-align:center; transition:all .22s; }
.badge-card.earned:hover { border-color:var(--gold); box-shadow:0 0 18px rgba(255,129,52,.16); }
.badge-icon { width:64px; height:64px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:28px; border:2px solid; }
.badge-name  { font-family:'Bricolage Grotesque',sans-serif; font-weight:700; font-size:12px; line-height:1.3; }
.badge-level { font-size:11px; color:var(--muted); }
.badge-earned-tag { font-size:10px; color:var(--accent3); }

/* ── PROFILE ── */
.profile-wrap { max-width:640px; }
.profile-header { display:flex; align-items:center; gap:16px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:24px; margin-bottom:20px; }
.profile-avatar-big { width:72px; height:72px; border-radius:50%; flex-shrink:0; background:linear-gradient(135deg,var(--accent),var(--accent2)); display:flex; align-items:center; justify-content:center; font-family:'Bricolage Grotesque',sans-serif; font-size:24px; font-weight:800; color:#fff; }
.profile-name { font-size:20px; font-weight:800; }
.profile-role { font-size:13px; color:var(--muted); margin-top:3px; }
.profile-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-bottom:20px; }

.profile-item { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); padding:12px 14px; }
.profile-item-label { font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:.07em; margin-bottom:2px; }
.profile-item-val   { font-size:14px; font-weight:500; }
.profile-actions { display:flex; gap:10px; flex-wrap:wrap; }

/* ── LEADERBOARD ── */
.tab-row { display:flex; gap:7px; margin-bottom:18px; background:var(--surface); border-radius:var(--radius-sm); padding:4px; }
.tab-btn { flex:1; padding:8px; border-radius:8px; font-family:'Comfortaa',sans-serif; font-size:13px; font-weight:500; border:none; background:transparent; color:var(--muted); cursor:pointer; transition:all .2s; }
.tab-btn.active { background:var(--surface2); color:var(--text); }
.tab-btn:hover:not(.active) { color:var(--text); }

.my-rank-card { background:linear-gradient(135deg,rgba(132,70,255,.1),rgba(255,129,52,.1)); border:1px solid rgba(132,70,255,.25); border-radius:var(--radius); padding:14px 20px; display:flex; align-items:center; gap:12px; margin-bottom:18px; }
.my-rank-label { font-size:12px; color:var(--muted); }
.my-rank-num { font-family:'Bricolage Grotesque',sans-serif; font-size:22px; font-weight:800; color:var(--accent); margin-left:auto; }
.my-rank-pts { font-size:13px; color:var(--muted); }

.lb-list { display:flex; flex-direction:column; gap:9px; }
.lb-row { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:14px 16px; display:flex; align-items:center; gap:13px; transition:all .2s; }
.lb-row.me { border-color:rgba(132,70,255,.35); background:rgba(132,70,255,.04); }
.lb-rank { font-family:'Bricolage Grotesque',sans-serif; font-size:18px; font-weight:800; width:28px; text-align:center; flex-shrink:0; }
.lb-rank.gold   { color:var(--gold); }
.lb-rank.silver { color:#aab4be; }
.lb-rank.bronze { color:#cd7f32; }
.lb-avatar { width:38px; height:38px; border-radius:50%; background:linear-gradient(135deg,var(--accent),var(--accent2)); display:flex; align-items:center; justify-content:center; font-family:'Bricolage Grotesque',sans-serif; font-size:13px; font-weight:800; color:#fff; flex-shrink:0; }
.lb-info { flex:1; min-width:0; }
.lb-name { font-family:'Bricolage Grotesque',sans-serif; font-weight:700; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lb-sub  { font-size:11px; color:var(--muted); margin-top:2px; }
.lb-score { text-align:right; flex-shrink:0; }
.lb-pts  { font-family:'Bricolage Grotesque',sans-serif; font-size:16px; font-weight:800; color:var(--gold); }
.lb-bdg  { font-size:11px; color:var(--muted); }
.lb-you-tag { font-size:10px; color:var(--accent); margin-left:4px; }

/* ── HISTORY ── */
.history-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:18px; }


.history-list { display:flex; flex-direction:column; gap:9px; }
.history-item { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:14px 16px; display:flex; align-items:center; gap:13px; transition:all .2s; }
.history-item:hover { border-color:rgba(255,255,255,.12); }
.history-cat-icon { font-size:28px; flex-shrink:0; }
.history-info { flex:1; min-width:0; }
.history-title { font-family:'Bricolage Grotesque',sans-serif; font-weight:700; font-size:14px; }
.history-meta  { font-size:11px; color:var(--muted); margin-top:2px; }
.history-score { text-align:right; flex-shrink:0; }
.history-pts { font-family:'Bricolage Grotesque',sans-serif; font-size:17px; font-weight:800; }
.history-pts.pass { color:var(--accent3); }
.history-pts.fail { color:var(--accent); }
.history-badge-tag { font-size:10px; color:var(--gold); margin-top:2px; }
.history-retry { font-size:11px; color:var(--muted); margin-top:2px; cursor:pointer; }
.history-retry:hover { color:var(--accent); }

/* ── ADMIN ── */
.admin-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:4px; }
.admin-search-row { display:flex; gap:9px; flex-wrap:wrap; margin-bottom:14px; }
.admin-search-input { flex:1; min-width:180px; }
.admin-select { width:auto; flex-shrink:0; }
.admin-questions-list { display:flex; flex-direction:column; gap:9px; }
.admin-q-item { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); padding:13px 15px; display:flex; align-items:flex-start; gap:12px; }
.admin-q-text { flex:1; font-size:13px; line-height:1.45; }
.admin-q-meta { font-size:11px; color:var(--muted); margin-top:4px; }
.admin-q-tag { display:inline-block; padding:2px 8px; border-radius:10px; font-size:10px; font-weight:600; margin-right:4px; border:1px solid; }
.admin-q-actions { display:flex; gap:6px; flex-shrink:0; }
.admin-q-btn { padding:5px 10px; border-radius:6px; font-size:11px; font-weight:600; cursor:pointer; border:1px solid var(--border); background:transparent; color:var(--muted); transition:all .2s; }
.admin-q-btn:hover { border-color:var(--accent); color:var(--accent); }
.admin-q-btn.del:hover { border-color:var(--accent); background:rgba(132,70,255,.1); }
.admin-stats-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px; }

/* ── TOAST ── */
#toast-wrap { position:fixed; bottom:22px; right:18px; display:flex; flex-direction:column; gap:8px; z-index:9998; pointer-events:none; }
.toast { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); padding:12px 17px; font-size:13px; max-width:300px; animation:fadeUp .3s ease; box-shadow:var(--shadow); pointer-events:auto; }
.toast.success { border-color:rgba(200,238,109,.35); }
.toast.error   { border-color:rgba(132,70,255,.35); }

/* ── BOTTOM NAV ── */
#bottom-nav { display:none; position:fixed; bottom:0; left:0; right:0; background:rgba(10,10,15,.96); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px); border-top:1px solid var(--border); align-items:center; justify-content:space-around; padding:8px 0 max(env(safe-area-inset-bottom),8px); z-index:100; }
#bottom-nav.visible { display:flex; }
body.has-nav { padding-bottom:68px; }

/* ── Safe area iPhone X+ ── */
#bottom-nav {
  padding-bottom: max(env(safe-area-inset-bottom), 8px);
}
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  body.has-nav { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
}

.bnav-btn { display:flex; flex-direction:column; align-items:center; gap:2px; background:none; border:none; color:var(--muted); padding:3px 10px; border-radius:8px; transition:all .2s; min-width:52px; }
.bnav-icon  { font-size:19px; }
.bnav-label { font-size:9px; font-family:'Comfortaa',sans-serif; }
.bnav-btn.active { color:var(--accent); }
.bnav-btn:hover  { color:var(--text); }

/* ── MISC ── */
.loading-placeholder { color:var(--muted); font-size:14px; padding:20px 0; }
.empty-state { text-align:center; padding:40px 20px; color:var(--muted); font-size:14px; }
.empty-state-icon { font-size:48px; margin-bottom:12px; }

/* ── CUSTOM TOGGLE (sostituisce checkbox native per compatibilità Safari) ── */
.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  transition: all .2s;
  user-select: none;
  -webkit-user-select: none;
}
.toggle-row:hover { border-color: rgba(132,70,255,.4); }
.toggle-row.active { border-color: var(--accent); background: rgba(132,70,255,.08); }
.toggle-row span { font-size: 14px; color: var(--text); line-height: 1.5; padding-top: 1px; }
.toggle-box {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: transparent;
  transition: all .2s;
  margin-top: 1px;
}
.toggle-row.active .toggle-box {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* ── PROFILE EDIT MODE ── */
.profile-header-info { display:flex; flex-direction:column; }
#profile-edit-mode .card { padding:20px; }
#profile-edit-mode h3.section-title { margin-bottom:8px; }

.profile-edit-saving {
  opacity:.6;
  pointer-events:none;
}

/* Animazione transizione view↔edit */
#profile-view-mode, #profile-edit-mode {
  transition: opacity .2s ease;
}

/* ═══════════════════════════════════════════════════════════
   FEEDBACK WIDGET — Live Chat Style
   ═══════════════════════════════════════════════════════════ */

/* ── Bottone flottante ── */
.fb-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9100;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8446ff, #ff8134);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(132,70,255,.5), 0 1px 4px rgba(0,0,0,.4);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
  flex-shrink: 0;
}
.fb-btn:hover       { transform: scale(1.1);  box-shadow: 0 6px 32px rgba(132,70,255,.6); }
.fb-btn.fb-active   { transform: scale(.95);  box-shadow: 0 2px 12px rgba(132,70,255,.4); }
body.has-nav .fb-btn { bottom: 76px; }

/* ── Pannello live chat ── */
.fb-panel {
  position: fixed;
  bottom: 92px;
  right: 24px;
  z-index: 9099;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: 88vh;
  background: #0f0f18;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.8), 0 0 0 1px rgba(132,70,255,.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity .2s ease, transform .25s cubic-bezier(.34,1.56,.64,1);
  transform-origin: bottom right;
}
body.has-nav .fb-panel { bottom: 144px; }

.fb-hidden  { opacity:0; transform:scale(.9) translateY(16px); pointer-events:none; }
.fb-visible { opacity:1; transform:scale(1)  translateY(0);    pointer-events:auto; }

/* ── Header ── */
.fb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(132,70,255,.18) 0%, rgba(255,129,52,.08) 100%);
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.fb-header-left     { display:flex; align-items:center; gap:10px; }
.fb-avatar-wrap     { position:relative; flex-shrink:0; }
.fb-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg,#8446ff,#ff8134);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.fb-online-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  background: #c8ee6d;
  border-radius: 50%;
  border: 2px solid #0f0f18;
  animation: fb-pulse 2s infinite;
}
@keyframes fb-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(200,238,109,.4); }
  50%      { box-shadow: 0 0 0 4px rgba(200,238,109,0); }
}
.fb-title    { font-family:'Bricolage Grotesque',sans-serif; font-weight:700; font-size:14px; color:#f0f0f8; line-height:1.2; }
.fb-subtitle { font-size:11px; color:#c8ee6d; margin-top:2px; letter-spacing:.01em; }

.fb-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  border: none;
  color: #888899;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .18s;
  flex-shrink: 0;
  line-height: 1;
}
.fb-close:hover { background:rgba(255,255,255,.12); color:#f0f0f8; }

/* ── Body scrollabile ── */
#fb-form {
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
}
#fb-form::-webkit-scrollbar { width:4px; }
#fb-form::-webkit-scrollbar-track { background:transparent; }
#fb-form::-webkit-scrollbar-thumb { background:rgba(255,255,255,.1); border-radius:4px; }

/* ── Bubble iniziale (messaggio del bot) ── */
.fb-bubble {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 4px;
}
.fb-bubble-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg,#8446ff,#ff8134);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.fb-bubble-text {
  background: rgba(255,255,255,.07);
  border-radius: 16px 16px 16px 4px;
  padding: 10px 14px;
  font-size: 13px;
  color: #d0d0e8;
  line-height: 1.55;
  max-width: calc(100% - 40px);
}

/* ── Tipo feedback ── */
.fb-type-label {
  font-size: 11px;
  font-weight: 600;
  color: #666677;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 2px;
}
.fb-type-row { display:flex; gap:8px; }
.fb-type-btn {
  flex: 1;
  padding: 9px 8px;
  border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: #888899;
  font-family: 'Comfortaa',sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s;
  text-align: center;
  line-height: 1.4;
}
.fb-type-btn:hover { border-color:rgba(132,70,255,.35); color:#d0d0e8; }
.fb-type-btn.fb-type-active {
  background: rgba(132,70,255,.12);
  border-color: #8446ff;
  color: #8446ff;
}

/* ── Textarea ── */
.fb-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(255,255,255,.09);
  border-radius: 14px;
  padding: 8px 8px 8px 12px;
  transition: border-color .2s;
}
.fb-input-row:focus-within { border-color: rgba(132,70,255,.5); }

.fb-textarea {
  flex: 1;
  background: transparent;
  border: none;
  color: #f0f0f8;
  font-family: 'Comfortaa',sans-serif;
  font-size: 13px;
  resize: none;
  outline: none;
  line-height: 1.5;
  max-height: 100px;
  min-height: 20px;
}
.fb-textarea::placeholder { color: #44445a; }

.fb-send-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg,#8446ff,#ff8134);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
  padding: 0;
}
.fb-send-btn:hover   { transform:scale(1.08); }
.fb-send-btn:active  { transform:scale(.95); }
.fb-send-btn:disabled { opacity:.4; cursor:not-allowed; transform:none; }

/* ── Campo nome ── */
.fb-name-row { display:flex; flex-direction:column; gap:4px; }
.fb-name-row label { font-size:11px; color:#555566; }
.fb-name-row input {
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(255,255,255,.08);
  border-radius: 10px;
  color: #f0f0f8;
  font-family: 'Comfortaa',sans-serif;
  font-size:13px;
  padding: 8px 12px;
  outline: none;
  transition: border-color .2s;
}
.fb-name-row input:focus { border-color:rgba(132,70,255,.4); }

/* ── Success ── */
#fb-success {
  padding: 32px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.fb-success-icon { font-size: 44px; }
.fb-success-title {
  font-family: 'Bricolage Grotesque',sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #f0f0f8;
}
.fb-success-sub { font-size:13px; color:#888899; line-height:1.5; }

/* ── DELETE ACCOUNT ZONE ── */
.delete-account-zone {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.delete-account-copy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.delete-account-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  opacity: .5;
}
.delete-account-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
}
.delete-account-sub {
  font-size: 12px;
  color: #555566;
  line-height: 1.55;
}
.btn-delete-account {
  background: transparent;
  border: 1px solid rgba(132,70,255,.2);
  border-radius: var(--radius-sm);
  color: rgba(132,70,255,.5);
  font-family: 'Comfortaa', sans-serif;
  font-size: 13px;
  padding: 9px 18px;
  cursor: pointer;
  transition: all .25s;
  align-self: flex-start;
}
.btn-delete-account:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(132,70,255,.06);
}

/* Modal conferma eliminazione */
.delete-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeUp .2s ease;
}
.delete-modal {
  background: var(--surface);
  border: 1px solid rgba(132,70,255,.25);
  border-radius: var(--radius);
  padding: 28px 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
}
.delete-modal-icon { font-size: 44px; margin-bottom: 14px; }
.delete-modal-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 20px; margin-bottom: 10px; }
.delete-modal-text { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 22px; }
.delete-modal-input-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; display: block; text-align: left; }
.delete-modal-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ── SELECTED ANSWER (nessun feedback immediato) ── */
.answer-btn.selected-answer {
  background: rgba(132,70,255,.1);
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 0 2px rgba(132,70,255,.2);
  transform: translateY(-1px);
}
/* Hover su risposte non ancora bloccate */
.answer-btn:not(:disabled):not(.selected-answer):hover {
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.04);
}

/* ── QUIZ REVIEW (riepilogo risposte) ── */
.review-section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.review-section-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 16px;
}
.review-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
}
.review-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.review-num {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 13px;
}
.review-header.review-correct { border-bottom-color: rgba(200,238,109,.25); }
.review-header.review-wrong   { border-bottom-color: rgba(132,70,255,.25); }
.review-header.review-timeout { border-bottom-color: rgba(255,129,52,.25); }

.review-question {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 10px;
  line-height: 1.5;
}
.review-your-answer {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.review-wrong-text  { color: var(--accent);  font-weight: 600; }
.review-correct-text{ color: var(--accent3); font-weight: 600; }
.review-correct-answer {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.review-explanation {
  font-size: 12px;
  color: var(--muted);
  background: rgba(255,255,255,.04);
  border-left: 3px solid var(--accent2);
  border-radius: 0 6px 6px 0;
  padding: 8px 12px;
  margin-top: 10px;
  line-height: 1.6;
}

.review-section { margin-top:40px; border-top:1px solid var(--border); padding-top:28px; }
.review-section-title { font-family:'Bricolage Grotesque',sans-serif; font-weight:700; font-size:17px; margin-bottom:20px; }

/* ── Review item ── */
.review-item {
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  margin-bottom:14px;
  overflow:hidden;
  transition:border-color .2s;
}
.review-item:hover { border-color:rgba(255,255,255,.15); }

/* Header */
.review-header {
  padding:10px 14px;
  font-size:12px;
  font-weight:600;
  display:flex;
  align-items:center;
  gap:8px;
}
.review-correct { background:rgba(200,238,109,.08);  border-left:3px solid var(--accent3); }
.review-wrong   { background:rgba(132,70,255,.08);  border-left:3px solid var(--accent); }
.review-timeout { background:rgba(255,129,52,.08);  border-left:3px solid var(--accent2); }
.review-status-icon { font-size:15px; }
.review-num  { flex:1; color:var(--muted); }
.review-cat-tag { font-size:10px; color:var(--muted); opacity:.6; }

/* Question text */
.review-question {
  padding:12px 14px 10px;
  font-size:14px;
  font-weight:600;
  line-height:1.5;
  border-bottom:1px solid var(--border);
}

/* Answers grid */
.review-answers-grid {
  padding:10px 14px;
  display:flex;
  flex-direction:column;
  gap:6px;
  border-bottom:1px solid var(--border);
}
.review-ans-item {
  display:flex;
  align-items:flex-start;
  gap:8px;
  padding:7px 10px;
  border-radius:8px;
  font-size:13px;
  color:var(--muted);
  background:rgba(255,255,255,.02);
  border:1px solid transparent;
  line-height:1.45;
}
.review-ans-correct {
  background:rgba(200,238,109,.08);
  border-color:rgba(200,238,109,.25);
  color:var(--accent3);
}
.review-ans-wrong {
  background:rgba(132,70,255,.08);
  border-color:rgba(132,70,255,.25);
  color:var(--accent);
  text-decoration:line-through;
  opacity:.8;
}
.review-ans-icon { font-size:12px; font-weight:700; flex-shrink:0; margin-top:1px; }
.review-ans-dot {
  width:6px; height:6px;
  border-radius:50%;
  background:rgba(255,255,255,.12);
  flex-shrink:0;
  margin-top:5px;
}

/* No explanation fallback */
.review-no-explanation { padding:8px 14px; }

/* ── ACCORDION ── */
.review-accordion-btn {
  width:100%;
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  background:none;
  border:none;
  border-top:1px solid var(--border);
  color:var(--muted);
  font-family:'Comfortaa',sans-serif;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  text-align:left;
  transition:background .2s, color .2s;
}
.review-accordion-btn:hover {
  background:rgba(255,255,255,.03);
  color:var(--text);
}
.review-accordion-btn.open {
  color:var(--accent2);
  background:rgba(255,129,52,.04);
}
.review-accordion-icon { font-size:15px; flex-shrink:0; }
.review-accordion-btn span:nth-child(2) { flex:1; }
.review-accordion-chevron {
  font-size:10px;
  transition:transform .3s ease;
  flex-shrink:0;
}
.review-accordion-btn.open .review-accordion-chevron { transform:rotate(180deg); }

/* Accordion body */
.review-accordion-body {
  max-height:0;
  overflow:hidden;
  transition:max-height .35s ease;
}
.review-accordion-body.open { /* max-height set via JS */ }
.review-explanation-text {
  padding:14px 16px;
  font-size:13px;
  color:#a0a0b8;
  line-height:1.7;
  background:rgba(255,129,52,.04);
  border-top:1px solid rgba(255,129,52,.1);
}




/* ── LANDING WIP BANNER ── */
.landing-wip-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(132,70,255,.08);
  border: 1px solid rgba(132,70,255,.2);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 480px;
  margin: 0 auto 8px;
}
.landing-wip-banner strong { color: var(--text); font-weight: 600; }
.wip-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  border-radius: 50%;
  background: var(--accent3);
  margin-top: 4px;
  animation: pulse-wip 2s ease-in-out infinite;
}
@keyframes pulse-wip {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,238,109,.4); }
  50%       { box-shadow: 0 0 0 6px rgba(200,238,109,0); }
}

/* ── Future event card ── */
.ev-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  position: relative;
  transition: border-color .2s, box-shadow .2s;
}
.ev-card:hover { border-color: rgba(132,70,255,.35); box-shadow: 0 6px 28px rgba(0,0,0,.25); }

.ev-card--featured {
  border-color: rgba(132,70,255,.25);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(132,70,255,.04) 100%);
}
.ev-card--special {
  border-color: rgba(255,129,52,.25);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(255,129,52,.04) 100%);
}

.ev-card-featured-tag {
  position: absolute; top: -1px; left: 20px;
  background: var(--accent); color: #fff;
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  padding: 3px 10px; border-radius: 0 0 8px 8px;
}
.ev-card-special-tag {
  position: absolute; top: -1px; left: 20px;
  background: var(--accent2); color: #fff;
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  padding: 3px 10px; border-radius: 0 0 8px 8px;
}

.ev-card-top { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 14px; margin-top: 10px; }

.ev-card-date {
  background: var(--accent);
  border-radius: 12px; padding: 12px 14px;
  text-align: center; min-width: 64px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center;
}
.ev-card-date--special { background: var(--accent2); }
.ev-date-num   { font-family: 'Bricolage Grotesque', sans-serif; font-size: 32px; font-weight: 800; color: #fff; line-height: 1; }
.ev-date-month { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.75); margin-top: 2px; }
.ev-date-year  { font-size: 9px; color: rgba(255,255,255,.5); margin-top: 1px; }

.ev-card-main { flex: 1; }
.ev-card-num   { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 4px; }
.ev-card-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px; font-weight: 800; text-transform: uppercase;
  color: var(--text); margin-bottom: 10px; line-height: 1.2;
}
.ev-card-meta-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-meta {
  font-size: 11px; font-weight: 600; color: var(--muted);
  background: var(--surface2); padding: 3px 9px; border-radius: 20px;
}

.ev-card-desc {
  font-size: 13px; color: var(--muted); line-height: 1.7;
  margin-bottom: 16px;
}

.ev-card-takeaways { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.ev-card-takeaways--special .ev-takeaway { border-color: rgba(255,129,52,.2); }
.ev-takeaway {
  font-size: 12px; color: var(--text); font-weight: 500;
  padding: 7px 12px; border-radius: 8px;
  border: 1px solid rgba(132,70,255,.15);
  background: rgba(132,70,255,.04);
}

.ev-card-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ev-card-note { font-size: 11px; color: var(--muted); font-style: italic; }

/* ── Timeline eventi passati ── */
.ev-timeline { position: relative; padding-left: 28px; display: flex; flex-direction: column; gap: 0; }
.ev-timeline::before {
  content: ''; position: absolute; left: 7px; top: 12px; bottom: 12px;
  width: 2px; background: var(--border);
}

.ev-timeline-item { position: relative; margin-bottom: 20px; }
.ev-timeline-dot {
  position: absolute; left: -24px; top: 14px;
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  z-index: 1;
}
.ev-timeline-dot--green  { border-color: var(--accent3); background: rgba(200,238,109,.15); }
.ev-timeline-dot--purple { border-color: var(--accent);  background: rgba(132,70,255,.15); }

.ev-timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  transition: border-color .2s;
}
.ev-timeline-card:hover { border-color: rgba(255,255,255,.14); }
.ev-timeline-card--origin { border-color: rgba(132,70,255,.2); }

.ev-timeline-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px; margin-bottom: 8px; flex-wrap: wrap;
}
.ev-timeline-num   { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 3px; }
.ev-timeline-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 15px; text-transform: uppercase; color: var(--text); }
.ev-timeline-date  { font-size: 11px; color: var(--muted); white-space: nowrap; flex-shrink: 0; margin-top: 2px; }
.ev-timeline-guest { font-size: 11px; color: var(--accent3); font-weight: 600; margin-bottom: 10px; }
.ev-timeline-desc  { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 12px; }

.ev-timeline-highlight {
  display: flex; align-items: flex-start; gap: 8px;
  background: rgba(200,238,109,.06);
  border: 1px solid rgba(200,238,109,.15);
  border-radius: 8px; padding: 9px 12px;
  font-size: 12px; color: var(--text); line-height: 1.55;
}
.ev-timeline-highlight--purple {
  background: rgba(132,70,255,.06);
  border-color: rgba(132,70,255,.15);
}
.ev-highlight-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }

/* Mobile */
@media (max-width: 480px) {
  .ev-hero { padding: 28px 16px 24px; }
  .ev-hero-title { font-size: 1.7rem; }
  .ev-card-top { flex-direction: column; gap: 12px; }
  .ev-card-date { flex-direction: row; align-items: center; gap: 10px; padding: 10px; }
  .ev-date-num { font-size: 22px; }
  .ev-timeline { padding-left: 20px; }
  .ev-timeline-dot { left: -17px; }
  .ev-timeline-header { flex-direction: column; gap: 2px; }
  .ev-card-actions { flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════════════════════
   INCONTRI — UI completa
   ══════════════════════════════════════════════ */

/* ── Filtro pill ── */
.ev-filter-row {
  display: flex; gap: 8px; margin-bottom: 18px;
}
.ev-filter-pill {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 7px 16px; border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface); color: var(--muted);
  cursor: pointer; transition: all .2s;
}
.ev-filter-pill.active,
.ev-filter-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(132,70,255,.08);
}

/* ── Stats ── */
.ev-stats-row { margin-bottom: 24px; }
.ev-count { transition: none; }

/* ── Fade-in animation ── */
@keyframes evFadeUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}
.ev-fade-item {
  opacity: 0;
  animation: evFadeUp .45s ease forwards;
  animation-delay: var(--ev-delay, 0s);
}

/* ── Upcoming cards ── */
.ev-upcoming-card {
  margin-bottom: 14px;
  position: relative; overflow: hidden;
}
.ev-upcoming-card--special {
  border-color: rgba(255,129,52,.22);
}
.ev-upcoming-card--special::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,129,52,.04) 0%, transparent 60%);
  pointer-events: none;
}
.ev-special-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent2);
  background: rgba(255,129,52,.1); border: 1px solid rgba(255,129,52,.2);
  padding: 3px 9px; border-radius: 20px; margin-bottom: 12px;
}
.ev-upcoming-top {
  display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px;
}
.ev-cal-block {
  border-radius: 10px; padding: 10px 13px;
  text-align: center; min-width: 54px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.ev-cal-purple { background:rgba(132,70,255,.12); border:1px solid rgba(132,70,255,.22); }
.ev-cal-orange  { background:rgba(255,129,52,.12);  border:1px solid rgba(255,129,52,.22); }
.ev-cal-day {
  font-family:'Bricolage Grotesque',sans-serif;
  font-size:28px; font-weight:800; line-height:1; color:var(--text);
}
.ev-cal-purple .ev-cal-day { color:var(--accent); }
.ev-cal-orange  .ev-cal-day { color:var(--accent2); }
.ev-cal-month { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--muted); }

.ev-upcoming-head { flex:1; }
.ev-upcoming-eyebrow { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--muted); margin-bottom:4px; }
.ev-upcoming-title {
  font-family:'Bricolage Grotesque',sans-serif;
  font-size:17px; font-weight:800; text-transform:uppercase;
  color:var(--text); line-height:1.2; margin-bottom:5px;
}
.ev-upcoming-guest { font-size:12px; color:var(--accent3); font-weight:600; }

/* ── Countdown ── */
.ev-countdown {
  display: flex; align-items: center; gap: 6px;
  background: rgba(132,70,255,.07);
  border: 1px solid rgba(132,70,255,.15);
  border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 14px;
  justify-content: center;
}
.ev-countdown--orange {
  background: rgba(255,129,52,.07);
  border-color: rgba(255,129,52,.15);
}
.ev-countdown-unit { display:flex; flex-direction:column; align-items:center; min-width:38px; }
.ev-cd-num {
  font-family:'Bricolage Grotesque',sans-serif;
  font-size:22px; font-weight:800; line-height:1; color:var(--accent);
  transition: color .3s;
}
.ev-countdown--orange .ev-cd-num { color:var(--accent2); }
.ev-cd-lbl { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); margin-top:2px; }
.ev-countdown-sep { font-size:18px; font-weight:800; color:var(--border); align-self:flex-start; margin-top:4px; }

/* ── Meta chips ── */
.ev-meta-chips { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:14px; }
.ev-chip { font-size:11px; font-weight:600; color:var(--muted); background:var(--surface2); border:1px solid var(--border); padding:3px 9px; border-radius:20px; }
.ev-chip--warn { color:var(--accent2); border-color:rgba(255,129,52,.2); background:rgba(255,129,52,.06); }

.ev-desc { font-size:13px; color:var(--muted); line-height:1.7; margin-bottom:14px; }

.ev-takeaway-row { display:flex; flex-direction:column; gap:6px; margin-bottom:18px; }
.ev-pill-take {
  font-size:12px; font-weight:500; color:var(--text);
  background:rgba(132,70,255,.06); border:1px solid rgba(132,70,255,.12);
  border-radius:var(--radius-sm); padding:7px 12px;
}
.ev-pill-take--orange { background:rgba(255,129,52,.06); border-color:rgba(255,129,52,.12); }

.ev-upcoming-footer {
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  padding-top:14px; border-top:1px solid var(--border);
}
.ev-footer-note { font-size:11px; color:var(--muted); font-style:italic; text-decoration:none; }
.ev-footer-note:hover { color:var(--text); }

/* Prenota button states */
.ev-prenota-btn.booked {
  background: var(--accent3) !important;
  border-color: var(--accent3) !important;
  color: #111 !important;
  pointer-events: none;
}
.ev-cal-link {
  font-size:12px; font-weight:600; color:var(--accent3);
  text-decoration:none; display:inline-flex; align-items:center; gap:4px;
  padding:6px 12px; border-radius:20px;
  background:rgba(200,238,109,.08); border:1px solid rgba(200,238,109,.2);
  transition:all .2s;
}
.ev-cal-link:hover { background:rgba(200,238,109,.15); }

/* ── Timeline passati ── */
.ev-timeline-wrap { display:flex; flex-direction:column; }
.ev-tl-item { display:flex; gap:12px; align-items:stretch; }
.ev-tl-spine { display:flex; flex-direction:column; align-items:center; flex-shrink:0; padding-top:18px; }
.ev-tl-dot { width:12px; height:12px; border-radius:50%; border:2px solid var(--border); background:var(--bg); flex-shrink:0; z-index:1; }
.ev-tl-dot--green  { border-color:var(--accent3); background:rgba(200,238,109,.12); }
.ev-tl-dot--purple { border-color:var(--accent);  background:rgba(132,70,255,.12); }
.ev-tl-line { width:2px; flex:1; min-height:20px; background:var(--border); margin-top:4px; }

.ev-tl-card { flex:1; margin-bottom:12px; cursor:pointer; }
.ev-tl-card--origin { border-color:rgba(132,70,255,.2); }

/* Accordion header */
.ev-tl-card-header {
  display:flex; justify-content:space-between; align-items:flex-start;
  gap:10px; flex-wrap:wrap;
  user-select:none;
}
.ev-tl-card-header-left { flex:1; }
.ev-tl-header-right { display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex-shrink:0; }
.ev-tl-label  { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--muted); margin-bottom:3px; }
.ev-tl-title  { font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:15px; text-transform:uppercase; color:var(--text); }
.ev-tl-guest  { font-size:11px; color:var(--accent3); font-weight:600; margin-top:3px; }
.ev-tl-done-tag { font-size:10px; font-weight:700; color:var(--accent3); background:rgba(200,238,109,.08); border:1px solid rgba(200,238,109,.15); padding:3px 9px; border-radius:20px; white-space:nowrap; }

.ev-accordion-chevron {
  font-size:10px; color:var(--muted);
  transition:transform .3s ease;
}
.ev-tl-card.open .ev-accordion-chevron { transform:rotate(180deg); }

/* Accordion body */
.ev-tl-accordion-body {
  max-height: 0; overflow:hidden;
  transition: max-height .35s ease, padding .3s ease;
  padding-top: 0;
}
.ev-tl-card.open .ev-tl-accordion-body {
  max-height: 400px;
  padding-top: 14px;
}

.ev-tl-desc { font-size:13px; color:var(--muted); line-height:1.7; margin-bottom:10px; }
.ev-tl-highlight {
  display:flex; align-items:flex-start; gap:8px;
  background:rgba(200,238,109,.05); border:1px solid rgba(200,238,109,.12);
  border-radius:var(--radius-sm); padding:8px 11px;
  font-size:12px; color:var(--text); line-height:1.55;
}
.ev-tl-highlight--purple { background:rgba(132,70,255,.05); border-color:rgba(132,70,255,.12); }

/* ── Past event cards (v2) ── */
.ev-past-card {
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.ev-past-card:hover { border-color: rgba(200,238,109,.25); box-shadow: 0 6px 28px rgba(0,0,0,.25); }
.ev-past-card--origin { border-color: rgba(132,70,255,.2); }
.ev-past-card--origin:hover { border-color: rgba(132,70,255,.35); }

.ev-origin-tag {
  position: absolute; top: 12px; right: 14px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent); background: rgba(132,70,255,.08);
  border: 1px solid rgba(132,70,255,.18);
  padding: 3px 10px; border-radius: 20px;
}

.ev-past-top {
  display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px;
}
.ev-past-head { flex: 1; }
.ev-past-eyebrow {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted); margin-bottom: 4px;
}
.ev-past-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 17px; font-weight: 800; text-transform: uppercase;
  color: var(--text); line-height: 1.2; margin-bottom: 5px;
}
.ev-past-speaker { font-size: 12px; color: var(--accent3); font-weight: 600; }

.ev-past-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.ev-past-takeaways {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px;
}
.ev-past-takeaway {
  font-size: 11px; font-weight: 500; color: var(--text);
  background: rgba(200,238,109,.05); border: 1px solid rgba(200,238,109,.1);
  border-radius: var(--radius-sm); padding: 5px 10px;
}
.ev-past-card--origin .ev-past-takeaway {
  background: rgba(132,70,255,.05); border-color: rgba(132,70,255,.1);
}

.ev-past-highlight {
  display: flex; align-items: flex-start; gap: 8px;
  border-radius: var(--radius-sm); padding: 8px 11px;
  font-size: 12px; color: var(--text); line-height: 1.55;
  margin-bottom: 14px;
}

.ev-past-footer {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-top: 14px; border-top: 1px solid var(--border);
}

.ev-slides-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent3); text-decoration: none;
  background: rgba(200,238,109,.06);
  border: 1px solid rgba(200,238,109,.18);
  padding: 10px 18px; border-radius: var(--radius-sm);
  transition: all .2s;
}
.ev-slides-btn:hover {
  background: rgba(200,238,109,.14);
  border-color: rgba(200,238,109,.3);
  text-decoration: none;
  transform: translateY(-1px);
}
.ev-slides-btn svg { flex-shrink: 0; }

.ev-slides-soon {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted); font-style: italic;
}
.ev-slides-soon svg { flex-shrink: 0; opacity: .5; }

/* Canva embed */
.ev-slides-section { width: 100%; }
.ev-embed-wrap {
  margin-top: 14px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.ev-embed-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 56.25%;
}
.ev-embed-container iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border: none;
}

/* Green calendar block for past events */
.ev-cal-green {
  background: rgba(200,238,109,.1);
  border: 1px solid rgba(200,238,109,.2);
}
.ev-cal-green .ev-cal-day { color: var(--accent3); }

/* ════════════════════════════════════════════════════════
   RESPONSIVE — Mobile First
   Breakpoint unico: 600px (smartphone)
   ════════════════════════════════════════════════════════ */

@media (max-width: 600px) {

  /* ── Layout base ── */
  .page-wrap { padding: 16px 14px 80px; }

  /* ── Navbar ── */
  #navbar { padding: 9px 12px; }
  .nav-brand { font-size: 12px; }
  #nav-user-links { display: none !important; }
  #nav-auth-links .nav-btn { font-size: 11px; padding: 5px 10px; }

  /* ── Landing screen ── */
  #screen-landing { padding: 28px 16px 40px; }
  .landing-logo { width: 76px; height: 76px; }
  .landing-title { font-size: clamp(28px, 8vw, 44px); }
  .landing-sub { font-size: 15px; margin-bottom: 24px; }
  .landing-cta-row { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 36px; }
  .landing-cta-row .btn { width: 100%; justify-content: center; }
  .landing-features { grid-template-columns: 1fr 1fr; gap: 10px; }
  .landing-wip-banner { font-size: 12px; padding: 10px 13px; }

  /* ── Auth / Register ── */
  .auth-wrap { padding: 20px 14px 40px; }
  .auth-title { font-size: 22px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .step-btn-row { flex-direction: column; }
  .step-btn-row .btn-outline,
  .step-btn-row .btn-primary { flex: none; width: 100%; }

  /* ── Dashboard ── */
  .dash-hero { padding: 18px; gap: 12px; }
  .dash-avatar { width: 46px; height: 46px; font-size: 16px; }
  .dash-greeting { font-size: 17px; }
  .stats-row { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
  .stat-card { padding: 12px 10px; }
  .stat-num { font-size: 20px; }
  .stat-lbl { font-size: 10px; }
  .quick-links { gap: 7px; }
  .quick-link-btn { font-size: 12px; padding: 9px 10px; min-width: 0; flex: 1; }
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .cat-card { padding: 16px 14px; }
  .cat-icon { font-size: 26px; margin-bottom: 7px; }
  .cat-name { font-size: 13px; }
  .cat-topics { font-size: 11px; }
  /* Hub cards mobile */
  .hub-card { padding: 14px 16px; gap: 12px; }
  .hub-card-icon { width: 42px; height: 42px; font-size: 22px; }
  .hub-card-title { font-size: 14px; }
  .hub-card-desc { font-size: 11px; }
  .hub-card-arrow { font-size: 16px; }
  /* Giochi mobile */
  .gioco-card { padding: 18px; }
  .gioco-card-icon { font-size: 32px; margin-bottom: 10px; }
  .gioco-card-title { font-size: 17px; }
  .gioco-card-desc { font-size: 12px; }
  .gioco-meta-chip { font-size: 10px; padding: 3px 8px; }
  .coming-soon-box { padding: 40px 16px; }
  .coming-soon-icon { font-size: 44px; }
  /* Regalini mobile */
  .reg-hero-title { font-size: 26px; }
  .reg-hero-sub { font-size: 13px; }
  .reg-card { padding: 18px; }
  .reg-brand-logo { width: 42px; height: 42px; font-size: 15px; }
  .reg-brand-name { font-size: 16px; }
  .reg-brand-what { font-size: 10px; }
  .reg-card-desc { font-size: 12px; }
  .reg-card-btn { width: 100%; justify-content: center; }
  .reg-card-value { flex-wrap: wrap; }
  .reg-code-box { flex-wrap: wrap; gap: 4px; }
  .reg-card-contact { font-size: 11px; }

  /* ── Level ── */
  .screen-title { font-size: 20px; }
  .screen-sub { font-size: 13px; margin-bottom: 18px; }
  .level-grid { grid-template-columns: 1fr; gap: 10px; }
  .level-card { padding: 18px; display: flex; align-items: center; gap: 14px; text-align: left; }
  .level-icon { font-size: 28px; margin-bottom: 0; flex-shrink: 0; }
  .level-name { font-size: 16px; }
  .level-desc { font-size: 12px; margin-top: 3px; }
  .level-pass-note { font-size: 10px; margin-top: 6px; padding-top: 6px; }

  /* ── Quiz ── */
  .quiz-header { gap: 10px; margin-bottom: 10px; }
  .timer-ring-wrap { width: 52px; height: 52px; }
  .timer-ring-wrap svg { width: 52px; height: 52px; }
  .timer-number { font-size: 14px; }
  .question-text { font-size: 16px; margin: 14px 0 12px; }
  .answers-grid { grid-template-columns: 1fr; gap: 8px; }
  .answer-btn { font-size: 13px; padding: 13px 14px; }

  /* ── Result ── */
  .result-wrap { padding: 0; }
  .result-score { font-size: 52px; }
  .result-actions { gap: 8px; }
  .result-actions .btn { font-size: 13px; padding: 11px 16px; }

  /* ── Review accordion ── */
  .review-question { font-size: 13px; }
  .review-ans-item { font-size: 12px; padding: 6px 9px; }
  .review-accordion-btn { font-size: 12px; padding: 9px 12px; }

  /* ── Badges ── */
  .filter-row { gap: 5px; flex-wrap: wrap; }
  .filter-btn { font-size: 11px; padding: 5px 10px; }
  .badges-grid { grid-template-columns: repeat(3, 1fr); gap: 9px; }
  .badge-card { padding: 13px 8px; }
  .badge-icon { font-size: 26px; width: 50px; height: 50px; }
  .badge-name { font-size: 10px; }
  .badge-level { font-size: 9px; }

  /* ── Leaderboard ── */
  .tab-row { gap: 4px; }
  .tab-btn { font-size: 12px; padding: 7px 6px; }
  .my-rank-card { padding: 11px 14px; gap: 10px; }
  .lb-row { padding: 11px 12px; gap: 10px; }
  .lb-avatar { width: 32px; height: 32px; font-size: 11px; }
  .lb-name { font-size: 13px; }
  .lb-sub  { font-size: 10px; }
  .lb-pts  { font-size: 14px; }

  /* ── History ── */
  .history-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .history-item { padding: 11px 12px; gap: 10px; }
  .history-cat-icon { font-size: 22px; }
  .history-title { font-size: 13px; }
  .history-pts { font-size: 14px; }

  /* ── Profile ── */
  .profile-header { padding: 18px; gap: 12px; flex-direction: column; align-items: flex-start; }
  .profile-avatar-big { width: 58px; height: 58px; font-size: 20px; }
  .profile-name { font-size: 18px; }
  .profile-grid { grid-template-columns: 1fr; gap: 7px; }
  .profile-actions { flex-direction: column; }
  .profile-actions .btn { width: 100%; }

  /* ── Incontri screen ── */
  .ev-filter-row { gap: 6px; margin-bottom: 14px; }
  .ev-filter-pill { font-size: 11px; padding: 6px 13px; }
  .ev-stats-row { grid-template-columns: repeat(3, 1fr); }
  .ev-stats-row .stat-num { font-size: 16px; }
  .ev-stats-row .stat-lbl { font-size: 9px; }
  .ev-upcoming-top { gap: 10px; }
  .ev-cal-day { font-size: 22px; }
  .ev-upcoming-title { font-size: 15px; }
  .ev-countdown { gap: 4px; padding: 8px 10px; }
  .ev-cd-num { font-size: 17px; }
  .ev-countdown-unit { min-width: 30px; }
  .ev-countdown-sep { font-size: 14px; }
  .ev-upcoming-footer { flex-direction: column; align-items: stretch; gap: 8px; }
  .ev-upcoming-footer .btn { width: 100%; justify-content: center; }
  .ev-cal-link { justify-content: center; }
  .ev-tl-item { gap: 8px; }
  .ev-tl-card-header { flex-wrap: wrap; }
  .ev-tl-header-right { flex-direction: row; align-items: center; gap: 8px; }
  .ev-takeaway-row { gap: 5px; }
  .ev-pill-take { font-size: 11px; padding: 6px 10px; }
  /* Past cards mobile */
  .ev-past-top { flex-wrap: wrap; gap: 10px; }
  .ev-past-title { font-size: 15px; }
  .ev-past-footer { flex-direction: column; align-items: stretch; gap: 8px; }
  .ev-slides-btn { justify-content: center; width: 100%; }
  .ev-past-takeaways { gap: 4px; }
  .ev-past-takeaway { font-size: 10px; padding: 4px 8px; }
  .ev-origin-tag { position: static; margin-bottom: 10px; display: inline-block; }

  /* ── Feedback widget ── */
  .fb-btn { width: 48px; height: 48px; bottom: 78px; right: 16px; }
  .fb-panel { right: 12px; left: 12px; width: auto; bottom: 136px; }
  body.has-nav .fb-btn { bottom: 78px; }
  body.has-nav .fb-panel { bottom: 136px; }

  /* ── Toast ── */
  #toast-wrap { bottom: 80px; right: 12px; left: 12px; align-items: center; }
  .toast { max-width: 100%; width: 100%; text-align: center; }

  /* ── Bottom nav ── */
  .bnav-btn { min-width: 0; padding: 3px 6px; flex: 1; }
  .bnav-icon { font-size: 18px; }
  .bnav-label { font-size: 8px; }

  /* ── Buttons ── */
  .btn-full { width: 100%; }
  .btn-lg { font-size: 14px; padding: 13px 20px; }
}

/* ── Extra small phones (< 380px) ── */
@media (max-width: 380px) {
  .landing-features { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .badges-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: 1fr; }
  .ev-stats-row { grid-template-columns: 1fr; }
  .ev-countdown { flex-wrap: wrap; justify-content: center; gap: 8px; }
}

/* ── Tablet (601px–900px) ── */
@media (min-width: 601px) and (max-width: 900px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .level-grid { grid-template-columns: repeat(3, 1fr); }
  .landing-cta-row { justify-content: center; }
}

/* ── Touch devices — bigger tap targets ── */
@media (hover: none) and (pointer: coarse) {
  .answer-btn { min-height: 52px; }
  .btn { min-height: 44px; }
  .nav-btn { min-height: 36px; }
  .quick-link-btn { min-height: 46px; }
  .ev-filter-pill { min-height: 38px; }
  .tab-btn { min-height: 40px; }
  .bnav-btn { min-height: 48px; }
  .ev-tl-card { cursor: pointer; -webkit-tap-highlight-color: rgba(132,70,255,.1); }
  .cat-card { -webkit-tap-highlight-color: rgba(132,70,255,.08); }
}
